21 #ifndef DRAGONS_DRAGONS_H 22 #define DRAGONS_DRAGONS_H 24 #include "gui/EventRecorder.h" 25 #include "engines/engine.h" 26 #include "dragons/specialopcodes.h" 27 #include "dragons/detection.h" 41 enum kReadSaveHeaderError {
44 kRSHEInvalidVersion = 2,
53 ENGINE_FLAG_10 = 0x10,
54 ENGINE_FLAG_20 = 0x20,
55 ENGINE_FLAG_40 = 0x40,
56 ENGINE_FLAG_80 = 0x80,
57 ENGINE_FLAG_100 = 0x100,
58 ENGINE_FLAG_200 = 0x200,
59 ENGINE_FLAG_400 = 0x400,
60 ENGINE_FLAG_800 = 0x800,
61 ENGINE_FLAG_1000_SUBTITLES_DISABLED = 0x1000,
62 ENGINE_FLAG_8000 = 0x8000,
64 ENGINE_FLAG_10000 = 0x10000,
65 ENGINE_FLAG_20000 = 0x20000,
66 ENGINE_FLAG_80000 = 0x80000,
67 ENGINE_FLAG_100000 = 0x100000,
68 ENGINE_FLAG_200000 = 0x200000,
69 ENGINE_FLAG_400000 = 0x400000,
70 ENGINE_FLAG_2000000 = 0x2000000,
71 ENGINE_FLAG_4000000 = 0x4000000,
72 ENGINE_FLAG_8000000 = 0x8000000,
73 ENGINE_FLAG_20000000 = 0x20000000,
74 ENGINE_FLAG_80000000 = 0x80000000
78 ENGINE_UNK1_FLAG_1 = 1,
79 ENGINE_UNK1_FLAG_2 = 2,
80 ENGINE_UNK1_FLAG_4 = 4,
81 ENGINE_UNK1_FLAG_8 = 8,
82 ENGINE_UNK1_FLAG_10 = 0x10,
83 ENGINE_UNK1_FLAG_20 = 0x20,
84 ENGINE_UNK1_FLAG_40 = 0x40,
85 ENGINE_UNK1_FLAG_80 = 0x80
108 kDragonsActionSquare,
109 kDragonsActionTriangle,
110 kDragonsActionCircle,
114 kDragonsActionSelect,
115 kDragonsActionChangeCommand,
116 kDragonsActionInventory,
121 kDragonsActionDebugGfx,
152 int16 flameOffsetIdx;
153 int16 loadingFlamesUpdateCounter;
154 int16 loadingFlamesRiseCounter;
159 loadingFlamesUpdateCounter = 0;
160 loadingFlamesRiseCounter = 0;
162 memset(flames, 0,
ARRAYSIZE(flames)*
sizeof(flames[0]));
163 memset(quads, 0,
ARRAYSIZE(quads)*
sizeof(quads[0]));
177 uint16 _flickerInitialSceneDirection;
187 bool _isLoadingDialogAudio;
190 void loadCurrentSceneMsf();
202 uint32 _nextUpdatetime;
206 uint32 _flickerIdleCounter;
207 uint32 _bit_flags_8006fbd8;
210 uint16 _run_func_ptr_unk_countdown_timer;
217 bool _leftMouseButtonUp;
218 bool _leftMouseButtonDown;
219 bool _rightMouseButtonUp;
237 MouseWheel _mouseWheel;
243 void (*_sceneUpdateFunction)();
244 void (*_vsyncUpdateFunction)();
262 void syncSoundSettings()
override;
264 void updateActorSequences();
265 void setFlags(uint32 flags);
266 void clearFlags(uint32 flags);
267 uint32 getMultipleFlags(uint32 flags);
268 uint32 getAllFlags();
269 void setAllFlags(uint32 flags);
270 bool isFlagSet(uint32 flag);
271 bool isUnkFlagSet(uint32 flag);
273 void setUnkFlags(uint32 flags);
274 void clearUnkFlags(uint32 flags);
276 byte *getBackgroundPalette();
278 uint16 getVar(uint16 offset);
279 void setVar(uint16 offset, uint16 value);
280 uint16 getCurrentSceneId()
const;
282 void waitForFrames(uint16 numFrames);
283 void waitForFramesAllowSkip(uint16 numFrames);
286 void playOrStopSound(uint16 soundId);
288 void fadeFromBlack();
289 void fadeFromBlackExcludingFont();
290 void fadeFromBlack(uint32 flags);
293 void fadeToBlackExcludingFont();
294 void fadeToBlack(uint32 flags);
296 uint16 ipt_img_file_related();
297 void performAction();
299 void reset_screen_maybe();
302 void loadScene(uint16 sceneId);
306 void runSceneUpdaterFunction();
307 void setSceneUpdateFunction(
void (*newUpdateFunction)());
308 void clearSceneUpdateFunction();
309 void (*getSceneUpdateFunction())();
311 void setVsyncUpdateFunction(
void (*newUpdateFunction)());
312 bool isVsyncUpdaterFunctionRunning();
313 void runVsyncUpdaterFunction();
315 bool isActionButtonPressed();
316 bool isLeftKeyPressed();
317 bool isRightKeyPressed();
318 bool isUpKeyPressed();
319 bool isDownKeyPressed();
320 bool isSquareButtonPressed();
321 bool isTriangleButtonPressed();
322 bool isCircleButtonPressed();
323 bool isCrossButtonPressed();
324 bool isL1ButtonPressed();
325 bool isR1ButtonPressed();
326 bool checkForActionButtonRelease();
327 bool checkForDownKeyRelease();
328 bool checkForUpKeyRelease();
329 bool checkForWheelUp();
330 bool checkForWheelDown();
334 uint16 getRand(uint16 max);
336 void setupPalette1();
340 void loadingScreenUpdate();
345 uint16 getBigFileTotalRecords();
346 uint32 getBigFileInfoTblFromDragonEXE();
347 uint32 getFontOffsetFromDragonEXE();
348 uint32 getSpeechTblOffsetFromDragonEXE();
349 uint32 getCutscenePaletteOffsetFromDragonEXE();
350 uint32 defaultResponseOffsetFromDragonEXE();
351 uint16 getCursorHandPointerSequenceID();
352 uint32 getMiniGame3StartingDialog();
353 uint32 getMiniGame3PickAHatDialog();
354 uint32 getMiniGame3DataOffset();
355 uint32 getDialogTextId(uint32 textId);
357 bool savegame(
const char *filename,
const char *description);
358 bool loadgame(
const char *filename);
360 void updateHandler();
361 void updatePathfindingActors();
362 void updatePaletteCycling();
363 void updateFlickerIdleAnimation();
366 uint32 calulateTimeLeft();
368 uint16 getIniFromImg();
369 void runINIScripts();
370 void engineFlag0x20UpdateFunction();
373 bool isInputEnabled();
374 bool checkForInventoryButtonRelease();
376 void walkFlickerToObject();
378 void seedRandom(int32 seed);
379 uint32 shuffleRandState();
381 void initializeSound();
383 void SomeInitSound_fun_8003f64c();
385 void initSubtitleFlag();
387 void loadingScreen();
391 bool checkAudioVideoFiles();
392 bool validateAVFile(
const char *filename);
394 uint32 getDialogTextIdGrb(uint32 textId);
395 uint32 getDialogTextIdDe(uint32 textId);
396 uint32 getDialogTextIdFr(uint32 textId);
403 #endif //DRAGONS_DRAGONS_H #define ARRAYSIZE(x)
Definition: util.h:91
Definition: dragons.h:148
Definition: background.h:36
Definition: dragonflg.h:49
EngineFeature
Definition: engine.h:253
Definition: dragonini.h:64
Definition: sequenceopcodes.h:57
Definition: dragonobd.h:30
Definition: dragonvar.h:30
Definition: dragonrms.h:42
Definition: inventory.h:46
bool skipThumbnail(Common::SeekableReadStream &in)
Definition: strplayer.h:30
Definition: detection.h:34
Definition: scriptopcodes.h:54
Definition: dragonini.h:43
Definition: dragons.h:167
Definition: dragonimg.h:42
Language
Definition: language.h:45