22 #ifndef PARALLACTION_PARALLACTION_H 23 #define PARALLACTION_PARALLACTION_H 25 #include "common/str.h" 26 #include "common/stack.h" 27 #include "common/array.h" 28 #include "common/func.h" 29 #include "common/random.h" 30 #include "common/savefile.h" 31 #include "common/textconsole.h" 33 #include "engines/engine.h" 35 #include "parallaction/input.h" 36 #include "parallaction/inventory.h" 37 #include "parallaction/objects.h" 38 #include "parallaction/disk.h" 39 #include "parallaction/detection.h" 58 kDebugParser = 1 << 2,
59 kDebugDialogue = 1 << 3,
60 kDebugGraphics = 1 << 4,
65 kDebugInventory = 1 << 9
69 kEnginePauseJobs = (1 << 1),
70 kEngineWalking = (1 << 3),
71 kEngineChangeLocation = (1 << 4),
72 kEngineBlockInput = (1 << 5),
73 kEngineDragging = (1 << 6),
74 kEngineTransformedDonna = (1 << 7),
77 kEngineReturn = (1 << 10)
91 extern uint32 g_engineFlags;
92 extern char g_saveData1[];
93 extern uint32 g_globalFlags;
94 extern const char *g_dinoName;
95 extern const char *g_donnaName;
96 extern const char *g_doughName;
97 extern const char *g_drkiName;
98 extern const char *g_minidinoName;
99 extern const char *g_minidonnaName;
100 extern const char *g_minidoughName;
101 extern const char *g_minidrkiName;
111 class DialogueManager;
112 class MenuInputHelper;
120 class LocationParser_ns;
121 class LocationParser_br;
122 class ProgramParser_ns;
123 class ProgramParser_br;
124 class BalloonManager;
154 uint16 _followerStartFrame;
173 ZonePtr findZone(
const char *name);
175 void cleanup(
bool removeAll);
176 void freeZones(
bool removeAll);
178 int getScale(
int z)
const;
189 static const char _prefixMini[];
190 static const char _suffixTras[];
191 static const char _empty[];
196 void bind(
const char *name);
197 const char *getName()
const;
198 const char *getBaseName()
const;
199 const char *getFullName()
const;
215 void setName(
const char *name);
216 const char *getName()
const;
217 const char *getBaseName()
const;
218 const char *getFullName()
const;
225 #define NUM_LOCATIONS 120 231 int getGameType()
const;
232 uint32 getFeatures()
const;
259 void pauseEngineIntern(
bool pause)
override;
283 Table *_globalFlagsNames;
284 Table *_objectsNames;
286 Table *_callableNames;
287 Table *_localFlagNames;
291 DialogueManager *_dialogueMan;
297 uint32 _localFlags[NUM_LOCATIONS];
298 char _locationNames[NUM_LOCATIONS][32];
299 int16 _currentLocationIndex;
300 uint16 _numLocations;
303 char _characterName1[50];
310 void runGameFrame(
int event);
313 void runDialogueFrame();
314 void exitDialogueMode();
315 void runCommentFrame();
316 void enterCommentMode(
ZonePtr z);
317 void exitCommentMode();
322 void doLocationEnterTransition();
323 void allocateLocationSlot(
const char *name);
324 void finalizeLocationParsing();
326 void destroyDialogueManager();
332 uint getInternLanguage();
333 void setInternLanguage(uint
id);
334 void enterDialogueMode(
ZonePtr z);
335 void scheduleLocationSwitch(
const char *location);
336 void showSlide(
const char *name,
int x = 0,
int y = 0);
339 void setLocationFlags(uint32 flags);
340 void clearLocationFlags(uint32 flags);
341 void toggleLocationFlags(uint32 flags);
342 uint32 getLocationFlags();
343 bool checkSpecialZoneBox(
ZonePtr z, uint32 type, uint x, uint y);
344 bool checkZoneBox(
ZonePtr z, uint32 type, uint x, uint y);
345 bool checkZoneType(
ZonePtr z, uint32 type);
346 bool checkLinkedAnimBox(
ZonePtr z, uint32 type, uint x, uint y);
347 ZonePtr hitZone(uint32 type, uint16 x, uint16 y);
350 void updateDoor(
ZonePtr z,
bool close);
351 void showZone(
ZonePtr z,
bool visible);
352 void highlightInventoryItem(ItemPosition pos);
353 int16 getHoverInventoryItem(int16 x, int16 y);
354 int addInventoryItem(ItemName item);
355 int addInventoryItem(ItemName item, uint32 value);
356 void dropItem(uint16 v);
357 bool isItemInInventory(int32 v);
359 int16 getInventoryItemIndex(int16 pos);
360 void openInventory();
361 void closeInventory();
363 virtual void parseLocation(
const char* name) = 0;
364 virtual void changeLocation() = 0;
365 virtual void changeCharacter(
const char *name) = 0;
366 virtual void callFunction(uint index,
void* parm) = 0;
367 virtual void runPendingZones() = 0;
368 virtual void cleanupGame() = 0;
369 virtual void updateWalkers() = 0;
370 virtual void scheduleWalk(int16 x, int16 y,
bool fromUser) = 0;
371 virtual DialogueManager *createDialogueManager(
ZonePtr z) = 0;
372 virtual bool processGameEvent(
int event) = 0;
394 void parseLocation(
const char *filename)
override;
395 void changeLocation()
override;
396 void changeCharacter(
const char *name)
override;
397 void callFunction(uint index,
void* parm)
override;
398 void runPendingZones()
override;
399 void cleanupGame()
override;
400 void updateWalkers()
override;
401 void scheduleWalk(int16 x, int16 y,
bool fromUser)
override;
402 DialogueManager *createDialogueManager(
ZonePtr z)
override;
403 bool processGameEvent(
int event)
override;
404 void cleanInventory(
bool keepVerbs);
405 void changeBackground(
const char *background,
const char *mask = 0,
const char *path = 0);
415 void initResources();
416 void initInventory();
417 void destroyInventory();
418 void setupBalloonManager();
420 void startCreditSequence();
421 void startEndPartSequence();
423 void freeLocation(
bool removeAll);
424 void freeCharacter();
425 void destroyTestResultLabels();
426 void startMovingSarcophagus(
ZonePtr sarc);
427 void stopMovingSarcophagus();
432 const Callable *_callables;
439 int16 _sarcophagusDeltaX;
440 bool _movingSarcophagus;
441 uint16 _freeSarcophagusSlotX;
444 static const Callable _dosCallables[25];
445 static const Callable _amigaCallables[25];
447 GfxObj *_testResultLabels[2];
452 void _c_play_boogie(
void *);
453 void _c_startIntro(
void *);
454 void _c_endIntro(
void *);
455 void _c_moveSheet(
void *);
456 void _c_sketch(
void *);
457 void _c_shade(
void *);
458 void _c_score(
void *);
459 void _c_fade(
void *);
460 void _c_moveSarc(
void *);
461 void _c_contaFoglie(
void *);
462 void _c_zeroFoglie(
void *);
463 void _c_trasformata(
void *);
464 void _c_offMouse(
void *);
465 void _c_onMouse(
void *);
466 void _c_setMask(
void *);
467 void _c_endComment(
void *);
468 void _c_frankenstein(
void *);
469 void _c_finito(
void *);
470 void _c_ridux(
void *);
471 void _c_testResult(
void *);
474 void _c_null(
void *);
477 void _c_projector(
void *);
478 void _c_HBOff(
void *);
479 void _c_offSound(
void *);
480 void _c_startMusic(
void *);
481 void _c_closeMusic(
void *);
482 void _c_HBOn(
void *);
487 #define NUM_ZONES 100 499 void parseLocation(
const char* name)
override;
500 void changeLocation()
override;
501 void changeCharacter(
const char *name)
override;
502 void callFunction(uint index,
void* parm)
override;
503 void runPendingZones()
override;
504 void cleanupGame()
override;
505 void updateWalkers()
override;
506 void scheduleWalk(int16 x, int16 y,
bool fromUser)
override;
507 DialogueManager *createDialogueManager(
ZonePtr z)
override;
508 bool processGameEvent(
int event)
override;
510 void setupSubtitles(
const char *s,
const char *s2,
int y);
511 void clearSubtitles();
513 Inventory *findInventory(
const char *name);
514 void linkUnlinkedZoneAnimations();
516 void testCounterCondition(
const Common::String &name,
int op,
int value);
517 void restoreOrSaveZoneFlags(
ZonePtr z,
bool restore);
527 int getMusicStatus();
528 void enableSfx(
bool enable);
529 void enableMusic(
bool enable);
531 const char **_audioCommandsNamesRes;
532 static const char *_partNames[];
537 #if 0 // disabled since I couldn't find any references to lip sync in the scripts 539 uint _subtitleLipSync;
544 uint32 _zoneFlags[NUM_LOCATIONS][NUM_ZONES];
555 Table *_countersNames;
558 void initResources();
559 void initInventory();
560 void destroyInventory();
562 void cleanInventory(
bool keepVerbs);
563 void setupBalloonManager();
566 void freeLocation(
bool removeAll);
568 void startGui(
bool showSplash);
569 void startIngameMenu();
570 void freeCharacter();
573 const Callable *_callables;
574 static const Callable _dosCallables[6];
575 static const Callable _amigaCallables[6];
583 void _c_null(
void *);
584 void _c_blufade(
void *);
585 void _c_resetpalette(
void *);
586 void _c_ferrcycle(
void *);
587 void _c_lipsinc(
void *);
588 void _c_albcycle(
void *);
589 void _c_password(
void *);
Definition: inventory.h:84
EngineFeature
Definition: engine.h:253
ErrorCode getCode() const
Definition: error.h:115
Definition: graphics.h:431
No error occurred.
Definition: error.h:48
Definition: parallaction.h:182
Definition: inventory.h:32
Definition: parallaction.h:377
Definition: inventory.h:56
Common::Error run() override
Definition: parallaction.h:250
Definition: saveload.h:29
Definition: graphics.h:53
Definition: graphics.h:409
Definition: parallaction.h:126
Definition: detection.h:43
Definition: parallaction.h:489
Definition: graphics.h:300
Definition: parallaction.h:204
Language
Definition: language.h:45
Definition: objects.h:509