22 #ifndef TEENAGENT_TEENAGENT_H 23 #define TEENAGENT_TEENAGENT_H 25 #include "engines/engine.h" 27 #include "audio/mixer.h" 29 #include "common/random.h" 30 #include "common/array.h" 32 #include "gui/debugger.h" 34 #include "teenagent/console.h" 35 #include "teenagent/dialog.h" 65 #define TEENAGENT_DAT_VERSION 6 66 #define TEENAGENT_SAVEGAME_VERSION 1 83 enum TEENAGENTActions {
86 kActionCloseInventory,
87 kActionToggleInventory,
91 const uint16 kScreenWidth = 320;
92 const uint16 kScreenHeight = 200;
109 enum Action { kActionNone, kActionExamine, kActionUse };
113 inline void cancel() { _action = kActionNone; }
115 bool processCallback(uint16 addr);
116 inline Scene *getScene() {
return scene; }
120 bool showMetropolis();
121 int skipEvents()
const;
126 void displayMessage(uint32 addr, CharacterID characterID = kMark, uint16 x = 0, uint16 y = 0);
127 void displayMessage(
const Common::String &str, uint16 voiceIndex, CharacterID characterID = kMark, uint16 x = 0, uint16 y = 0);
128 void displayAsyncMessage(uint32 addr, uint16 x, uint16 y, uint16 firstFrame, uint16 lastFrame, CharacterID characterID = kMark);
129 void displayAsyncMessageInSlot(uint32 addr, byte slot, uint16 firstFrame, uint16 lastFrame, byte color = textColorMark);
130 void displayCredits(uint32 addr, uint16 timer = 0);
131 void displayCutsceneMessage(uint32 addr, uint16 x, uint16 y);
132 void moveTo(
const Common::Point &dst, byte o,
bool warp =
false);
133 void moveTo(uint16 x, uint16 y, byte o,
bool warp =
false);
135 void moveRel(int16 x, int16 y, byte o,
bool warp =
false);
136 void playActorAnimation(uint16
id,
bool async =
false,
bool ignore =
false);
137 void playAnimation(uint16
id, byte slot,
bool async =
false,
bool ignore =
false,
bool loop =
false);
138 void loadScene(byte
id,
const Common::Point &pos, byte o = 0);
139 void loadScene(byte
id, uint16 x, uint16 y, byte o = 0);
140 void enableOn(
bool enable =
true);
141 void setOns(byte
id, byte value, byte sceneId = 0);
142 void setLan(byte
id, byte value, byte sceneId = 0);
143 void setFlag(uint16 addr, byte value);
144 byte getFlag(uint16 addr);
146 void rejectMessage();
147 void bookColorMessage();
149 void playMusic(byte
id);
150 void playSound(byte
id, byte skipFrames);
151 void playSoundNow(
Pack *pack, uint32
id);
152 void playVoiceNow(
Pack *pack, uint32
id);
154 void enableObject(byte
id, byte sceneId = 0);
155 void disableObject(byte
id, byte sceneId = 0);
158 void waitAnimation();
159 void waitLanAnimationFrame(byte slot, uint16 frame);
160 void setTimerCallback(uint16 addr, uint16 frames);
162 void displayCredits();
165 void wait(uint16 frames);
175 void setMusic(byte
id);
177 void sayText(
const Common::String &text,
bool isSubtitle =
false);
178 void stopTextToSpeech();
179 void setTTSVoice(CharacterID characterID)
const;
185 uint16 _previousVoiceId;
188 void processObject();
189 bool trySelectedObject();
199 uint _markDelay, _gameDelay;
204 void fnPoleClimbFail();
206 void fnGetOutOfLake();
207 void fnGuardDrinking();
208 void fnEgoDefaultPosition();
210 void fnEgoScaredBySpider();
211 void fnMoveToLadderAndLeaveCellar();
212 void fnLeaveCellar();
213 void fnPutRockInHole();
214 void fnEgoBottomRightTurn();
215 bool fnCheckingDrawers();
216 void fnDrawerOpenMessage();
217 bool fnRobotSafeAlreadyUnlockedCheck();
218 void fnRobotSafeUnlockCheck();
219 bool fnMansionIntrusionAttempt();
220 void fnSecondMansionIntrusion();
221 void fnThirdMansionIntrusion();
222 void fnFourthMansionIntrusion();
223 void fnFifthMansionIntrusion();
224 void fnSixthMansionIntrusion();
227 void fnEgoSuspiciousPosition();
228 void fnGivingFlowerToOldLady();
229 void fnGiveAnotherFlowerToOldLady();
230 void fnGivingFlowerToAnne();
231 void fnGiveAnotherFlowerToAnne();
EngineFeature
Definition: engine.h:260
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: teenagent.h:104
Definition: advancedDetector.h:164
Definition: teenagent.h:94
Definition: display_client.h:58
Definition: objects.h:158
Definition: resources.h:1522
Definition: algorithm.h:29
Definition: audiostream.h:50
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: teenagent.h:103
Definition: inventory.h:141