21 #ifndef DRAGONS_DRAGONS_H 22 #define DRAGONS_DRAGONS_H 24 #include "engines/engine.h" 25 #include "dragons/detection.h" 26 #include "common/rect.h" 40 enum kReadSaveHeaderError {
43 kRSHEInvalidVersion = 2,
52 ENGINE_FLAG_10 = 0x10,
53 ENGINE_FLAG_20 = 0x20,
54 ENGINE_FLAG_40 = 0x40,
55 ENGINE_FLAG_80 = 0x80,
56 ENGINE_FLAG_100 = 0x100,
57 ENGINE_FLAG_200 = 0x200,
58 ENGINE_FLAG_400 = 0x400,
59 ENGINE_FLAG_800 = 0x800,
60 ENGINE_FLAG_1000_SUBTITLES_DISABLED = 0x1000,
61 ENGINE_FLAG_8000 = 0x8000,
63 ENGINE_FLAG_10000 = 0x10000,
64 ENGINE_FLAG_20000 = 0x20000,
65 ENGINE_FLAG_80000 = 0x80000,
66 ENGINE_FLAG_100000 = 0x100000,
67 ENGINE_FLAG_200000 = 0x200000,
68 ENGINE_FLAG_400000 = 0x400000,
69 ENGINE_FLAG_2000000 = 0x2000000,
70 ENGINE_FLAG_4000000 = 0x4000000,
71 ENGINE_FLAG_8000000 = 0x8000000,
72 ENGINE_FLAG_20000000 = 0x20000000,
73 ENGINE_FLAG_80000000 = 0x80000000
77 ENGINE_UNK1_FLAG_1 = 1,
78 ENGINE_UNK1_FLAG_2 = 2,
79 ENGINE_UNK1_FLAG_4 = 4,
80 ENGINE_UNK1_FLAG_8 = 8,
81 ENGINE_UNK1_FLAG_10 = 0x10,
82 ENGINE_UNK1_FLAG_20 = 0x20,
83 ENGINE_UNK1_FLAG_40 = 0x40,
84 ENGINE_UNK1_FLAG_80 = 0x80
107 kDragonsActionSquare,
108 kDragonsActionTriangle,
109 kDragonsActionCircle,
113 kDragonsActionSelect,
114 kDragonsActionChangeCommand,
115 kDragonsActionInventory,
120 kDragonsActionDebugGfx,
151 int16 flameOffsetIdx;
152 int16 loadingFlamesUpdateCounter;
153 int16 loadingFlamesRiseCounter;
158 loadingFlamesUpdateCounter = 0;
159 loadingFlamesRiseCounter = 0;
161 memset(flames, 0,
ARRAYSIZE(flames)*
sizeof(flames[0]));
162 memset(quads, 0,
ARRAYSIZE(quads)*
sizeof(quads[0]));
176 uint16 _flickerInitialSceneDirection;
186 bool _isLoadingDialogAudio;
189 void loadCurrentSceneMsf();
201 uint32 _nextUpdatetime;
205 uint32 _flickerIdleCounter;
206 uint32 _bit_flags_8006fbd8;
209 uint16 _run_func_ptr_unk_countdown_timer;
216 bool _leftMouseButtonUp;
217 bool _leftMouseButtonDown;
218 bool _rightMouseButtonUp;
236 MouseWheel _mouseWheel;
242 void (*_sceneUpdateFunction)();
243 void (*_vsyncUpdateFunction)();
261 void syncSoundSettings()
override;
263 void updateActorSequences();
264 void setFlags(uint32 flags);
265 void clearFlags(uint32 flags);
266 uint32 getMultipleFlags(uint32 flags);
267 uint32 getAllFlags();
268 void setAllFlags(uint32 flags);
269 bool isFlagSet(uint32 flag);
270 bool isUnkFlagSet(uint32 flag);
272 void setUnkFlags(uint32 flags);
273 void clearUnkFlags(uint32 flags);
275 byte *getBackgroundPalette();
277 uint16 getVar(uint16 offset);
278 void setVar(uint16 offset, uint16 value);
279 uint16 getCurrentSceneId()
const;
281 void waitForFrames(uint16 numFrames);
282 void waitForFramesAllowSkip(uint16 numFrames);
285 void playOrStopSound(uint16 soundId);
287 void fadeFromBlack();
288 void fadeFromBlackExcludingFont();
289 void fadeFromBlack(uint32 flags);
292 void fadeToBlackExcludingFont();
293 void fadeToBlack(uint32 flags);
295 uint16 ipt_img_file_related();
296 void performAction();
298 void reset_screen_maybe();
301 void loadScene(uint16 sceneId);
305 void runSceneUpdaterFunction();
306 void setSceneUpdateFunction(
void (*newUpdateFunction)());
307 void clearSceneUpdateFunction();
308 void (*getSceneUpdateFunction())();
310 void setVsyncUpdateFunction(
void (*newUpdateFunction)());
311 bool isVsyncUpdaterFunctionRunning();
312 void runVsyncUpdaterFunction();
314 bool isActionButtonPressed();
315 bool isLeftKeyPressed();
316 bool isRightKeyPressed();
317 bool isUpKeyPressed();
318 bool isDownKeyPressed();
319 bool isSquareButtonPressed();
320 bool isTriangleButtonPressed();
321 bool isCircleButtonPressed();
322 bool isCrossButtonPressed();
323 bool isL1ButtonPressed();
324 bool isR1ButtonPressed();
325 bool checkForActionButtonRelease();
326 bool checkForDownKeyRelease();
327 bool checkForUpKeyRelease();
328 bool checkForWheelUp();
329 bool checkForWheelDown();
333 uint16 getRand(uint16 max);
335 void setupPalette1();
339 void loadingScreenUpdate();
344 uint16 getBigFileTotalRecords();
345 uint32 getBigFileInfoTblFromDragonEXE();
346 uint32 getFontOffsetFromDragonEXE();
347 uint32 getSpeechTblOffsetFromDragonEXE();
348 uint32 getCutscenePaletteOffsetFromDragonEXE();
349 uint32 defaultResponseOffsetFromDragonEXE();
350 uint16 getCursorHandPointerSequenceID();
351 uint32 getMiniGame3StartingDialog();
352 uint32 getMiniGame3PickAHatDialog();
353 uint32 getMiniGame3DataOffset();
354 uint32 getDialogTextId(uint32 textId);
356 bool savegame(
const char *filename,
const char *description);
357 bool loadgame(
const char *filename);
359 void updateHandler();
360 void updatePathfindingActors();
361 void updatePaletteCycling();
362 void updateFlickerIdleAnimation();
365 uint32 calulateTimeLeft();
367 uint16 getIniFromImg();
368 void runINIScripts();
369 void engineFlag0x20UpdateFunction();
372 bool isInputEnabled();
373 bool checkForInventoryButtonRelease();
375 void walkFlickerToObject();
377 void seedRandom(int32 seed);
378 uint32 shuffleRandState();
380 void initializeSound();
382 void SomeInitSound_fun_8003f64c();
384 void initSubtitleFlag();
386 void loadingScreen();
390 bool checkAudioVideoFiles();
391 bool validateAVFile(
const char *filename);
393 uint32 getDialogTextIdGrb(uint32 textId);
394 uint32 getDialogTextIdDe(uint32 textId);
395 uint32 getDialogTextIdFr(uint32 textId);
402 #endif //DRAGONS_DRAGONS_H #define ARRAYSIZE(x)
Definition: util.h:103
Definition: dragons.h:147
Definition: background.h:36
Definition: dragonflg.h:48
EngineFeature
Definition: engine.h:260
Definition: dragonini.h:63
Definition: sequenceopcodes.h:57
Definition: dragonobd.h:28
Definition: dragonvar.h:30
Definition: dragonrms.h:40
Definition: inventory.h:44
bool skipThumbnail(Common::SeekableReadStream &in)
Definition: strplayer.h:30
Definition: detection.h:34
Definition: scriptopcodes.h:54
Definition: dragonini.h:42
Definition: dragons.h:166
Definition: dragonimg.h:40
Language
Definition: language.h:45