22 #ifndef ILLUSIONS_ILLUSIONS_H 23 #define ILLUSIONS_ILLUSIONS_H 25 #include "illusions/graphics.h" 26 #include "audio/mixer.h" 29 #include "common/array.h" 30 #include "common/events.h" 31 #include "common/file.h" 32 #include "common/memstream.h" 33 #include "common/random.h" 34 #include "common/str.h" 35 #include "common/substream.h" 36 #include "common/system.h" 38 #include "engines/engine.h" 39 #include "graphics/surface.h" 40 #include "illusions/detection.h" 44 enum ILLUSIONSAction {
56 char *debugW2I(uint16 *wstr);
57 void swapBytesInWideString(byte * wstr);
59 #define ILLUSIONS_SAVEGAME_VERSION 0 62 class BaseResourceReader;
66 class ActorInstanceList;
68 class BackgroundInstanceList;
69 class BackgroundResource;
86 class TalkInstanceList;
88 class UpdateFunctions;
90 class ScreenPaletteBase;
125 uint32 _nextTempThreadId;
126 bool _doScriptThreadInit;
137 bool _unpauseControlActorFlag;
138 uint32 _lastUpdateTime;
140 int _resumeFromSavegameRequested;
141 int _savegameSlotNum;
143 uint32 _savegameSceneId;
144 uint32 _savegameThreadId;
149 uint32 _subtitleDuration;
154 int16 _menuChoiceOfs;
156 int getGameId()
const;
159 void runUpdateFunctions();
160 int updateActors(uint flags);
161 int updateSequences(uint flags);
162 int updateGraphics(uint flags);
163 int updateSoundMan(uint flags);
164 int updateSprites(uint flags);
166 uint32 getElapsedUpdateTime();
168 int getRandom(
int max);
169 int convertPanXCoord(int16 x);
171 bool isSoundActive();
173 virtual void updateFader() {};
174 virtual void clearFader() {};
175 virtual void pauseFader() {};
176 virtual void unpauseFader() {};
177 virtual bool isVideoPlaying() {
return false; }
179 void setCurrFontId(uint32 fontId);
180 bool checkActiveTalkThreads();
181 void setTextDuration(
int kind, uint32 duration);
182 uint32 clipTextDuration(uint32 duration);
183 void getDefaultTextDimensions(
WidthHeight &dimensions);
184 void setDefaultTextDimensions(
WidthHeight &dimensions);
188 uint16 getSubtitleDuration();
189 void setSubtitleDuration(uint16 duration);
193 virtual void setDefaultTextCoords() = 0;
194 virtual void loadSpecialCode(uint32 resId) = 0;
195 virtual void unloadSpecialCode(uint32 resId) = 0;
196 virtual void notifyThreadId(uint32 &threadId) = 0;
197 virtual bool testMainActorFastWalk(
Control *control) = 0;
198 virtual bool testMainActorCollision(
Control *control) = 0;
199 virtual Control *getObjectControl(uint32 objectId) = 0;
200 virtual Common::Point getNamedPointPosition(uint32 namedPointId) = 0;
201 virtual uint32 getPriorityFromBase(int16 priority) = 0;
202 virtual uint32 getPrevScene() = 0;
203 virtual uint32 getCurrentScene() = 0;
204 virtual bool isCursorObject(uint32 actorTypeId, uint32 objectId) = 0;
205 virtual void setCursorControlRoutine(
Control *control) = 0;
206 virtual void placeCursorControl(
Control *control, uint32 sequenceId) = 0;
207 virtual void setCursorControl(
Control *control) = 0;
208 virtual void showCursor() = 0;
209 virtual void hideCursor() = 0;
210 virtual void startScriptThreadSimple(uint32 threadId, uint32 callingThreadId) = 0;
211 virtual uint32 startTempScriptThread(byte *scriptCodeIp, uint32 callingThreadId,
212 uint32 value8, uint32 valueC, uint32 value10) = 0;
216 enum kReadSaveHeaderError {
218 kRSHEInvalidType = 1,
219 kRSHEInvalidVersion = 2,
241 bool savegame(
const char *filename,
const char *description);
242 bool loadgame(
const char *filename);
243 bool existsSavegame(
int num);
251 #endif // ILLUSIONS_ILLUSIONS_H
Definition: backgroundresource.h:209
Definition: talkresource.h:78
Definition: dictionary.h:85
Definition: resourcesystem.h:85
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: illusions.h:236
Definition: detection.h:34
Definition: atari-screen.h:60
Definition: graphics.h:31
Definition: atari-cursor.h:38
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: illusions.h:237
Definition: scriptopcodes.h:48
bool skipThumbnail(Common::SeekableReadStream &in)
Definition: specialcode.h:44
Definition: resourcereader.h:29
Definition: screentext.h:56
const Common::String _targetName
Definition: engine.h:181
Common::Error loadGameState(int slot) override
Definition: scriptstack.h:27
Definition: actorresource.h:51
Definition: gamestate.h:30
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave=false) override
Definition: actorresource.h:112
Definition: scriptresource.h:114
Definition: updatefunctions.h:49
Definition: illusions.h:92
Definition: actorresource.h:76
Language
Definition: language.h:45