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" 32 #include "common/text-to-speech.h" 34 #include "engines/engine.h" 36 #include "parallaction/input.h" 37 #include "parallaction/inventory.h" 38 #include "parallaction/objects.h" 39 #include "parallaction/disk.h" 40 #include "parallaction/detection.h" 70 kEnginePauseJobs = (1 << 1),
71 kEngineWalking = (1 << 3),
72 kEngineChangeLocation = (1 << 4),
73 kEngineBlockInput = (1 << 5),
74 kEngineDragging = (1 << 6),
75 kEngineTransformedDonna = (1 << 7),
78 kEngineReturn = (1 << 10)
98 extern uint32 g_engineFlags;
99 extern char g_saveData1[];
100 extern uint32 g_globalFlags;
101 extern const char *g_dinoName;
102 extern const char *g_donnaName;
103 extern const char *g_doughName;
104 extern const char *g_drkiName;
105 extern const char *g_minidinoName;
106 extern const char *g_minidonnaName;
107 extern const char *g_minidoughName;
108 extern const char *g_minidrkiName;
118 class DialogueManager;
119 class MenuInputHelper;
127 class LocationParser_ns;
128 class LocationParser_br;
129 class ProgramParser_ns;
130 class ProgramParser_br;
131 class BalloonManager;
161 uint16 _followerStartFrame;
180 ZonePtr findZone(
const char *name);
182 void cleanup(
bool removeAll);
183 void freeZones(
bool removeAll);
185 int getScale(
int z)
const;
196 static const char _prefixMini[];
197 static const char _suffixTras[];
198 static const char _empty[];
203 void bind(
const char *name);
204 const char *getName()
const;
205 const char *getBaseName()
const;
206 const char *getFullName()
const;
222 void setName(
const char *name);
223 const char *getName()
const;
224 const char *getBaseName()
const;
225 const char *getFullName()
const;
232 const char *characterName;
238 {
nullptr, 0,
true },
239 {
"dough", 1,
true },
240 {
"donna", 0,
false },
243 {
"ddd.talk", 1,
true },
244 {
nullptr, 0,
false },
245 {
nullptr, 2,
true },
246 {
"police.talk", 4,
true },
247 {
"vecchio.talk", 5,
true },
248 {
"karaoke.talk", 6,
true },
249 {
"suicida.talk", 7,
true },
250 {
"direttore.talk", 8,
true },
251 {
"guardiano.talk", 9,
true },
252 {
"sento.talk", 10,
true },
253 {
"giocatore.talk", 11,
true },
254 {
"mona.talk", 12,
true },
255 {
"monaco2.talk", 13,
true },
256 {
"uccello.talk", 14,
true },
257 {
"guru.talk", 15,
true },
258 {
"monaco1.talk", 16,
true },
259 {
"segretario.talk", 17,
true },
260 {
"imperatore.talk", 18,
true },
261 {
"secondo.talk", 19,
true },
262 {
"taxista.talk", 20,
true },
263 {
"bemutsu.talk", 21,
true },
264 {
"negro.talk", 22,
true },
265 {
"punk.talk", 23,
true },
266 {
"chan.talk", 24,
true },
267 {
"donna0.talk", 0,
false },
268 {
"maxkos.talk", 25,
true },
269 {
nullptr, 26,
true },
270 {
"drki.talk", 3,
true },
271 {
"barman.talk", 27,
true },
272 {
"losco.talk", 28,
true },
273 {
"mitsu.talk", 29,
true },
274 {
"autoradio.talk", 30,
true },
275 {
"passa1.talk", 31,
true },
276 {
"passa2.talk", 1,
false },
277 {
"passa3.talk", 32,
true },
278 {
"giornalaio.talk", 33,
true },
279 {
"pazza1.talk", 2,
false },
280 {
"pazza2.talk", 3,
false },
281 {
"pazza3.talk", 4,
false },
282 {
"citofono.talk", 34,
true },
283 {
"perdelook.talk", 0,
false },
284 {
"tele.talk", 35,
true },
285 {
"dough.talk", 1,
true },
286 {
"donna.talk", 0,
false },
287 {
"guanti.talk", 36,
true },
288 {
"cuoco.talk", 37,
true },
289 {
"punks.talk", 38,
true },
290 {
nullptr, 39,
true },
291 {
"punko.talk", 40,
true },
292 {
"hotdog.talk", 41,
true },
293 {
"cameriera.talk", 5,
false },
294 {
"rice1.talk", 42,
true },
295 {
nullptr, 43,
true },
296 {
"segretaria.talk", 6,
false },
297 {
"robot.talk", 44,
true },
298 {
"portiere.talk", 45,
true },
299 {
"figaro.talk", 46,
true },
300 {
"ominos.talk", 47,
true },
301 {
"cassiera.talk", 7,
false },
302 {
"dino.talk", 2,
true }
307 enum PlayableCharacterVoiceID {
314 static const int kNarratorVoiceID = 0;
318 #define NUM_LOCATIONS 120 324 int getGameType()
const;
325 uint32 getFeatures()
const;
352 void pauseEngineIntern(
bool pause)
override;
376 Table *_globalFlagsNames;
377 Table *_objectsNames;
379 Table *_callableNames;
380 Table *_localFlagNames;
384 DialogueManager *_dialogueMan;
390 uint32 _localFlags[NUM_LOCATIONS];
391 char _locationNames[NUM_LOCATIONS][32];
392 int16 _currentLocationIndex;
393 uint16 _numLocations;
396 char _characterName1[50];
397 int _characterVoiceID;
404 void runGameFrame(
int event);
407 void runDialogueFrame();
408 void exitDialogueMode();
409 void runCommentFrame();
410 void enterCommentMode(
ZonePtr z);
411 void exitCommentMode();
416 void doLocationEnterTransition();
417 void allocateLocationSlot(
const char *name);
418 void finalizeLocationParsing();
420 void destroyDialogueManager();
426 uint getInternLanguage();
427 void setInternLanguage(uint
id);
428 void enterDialogueMode(
ZonePtr z);
429 void scheduleLocationSwitch(
const char *location);
430 void showSlide(
const char *name,
int x = 0,
int y = 0);
433 void setLocationFlags(uint32 flags);
434 void clearLocationFlags(uint32 flags);
435 void toggleLocationFlags(uint32 flags);
436 uint32 getLocationFlags();
437 bool checkSpecialZoneBox(
ZonePtr z, uint32 type, uint x, uint y);
438 bool checkZoneBox(
ZonePtr z, uint32 type, uint x, uint y);
439 bool checkZoneType(
ZonePtr z, uint32 type);
440 bool checkLinkedAnimBox(
ZonePtr z, uint32 type, uint x, uint y);
441 ZonePtr hitZone(uint32 type, uint16 x, uint16 y);
444 void updateDoor(
ZonePtr z,
bool close);
445 void showZone(
ZonePtr z,
bool visible);
446 void highlightInventoryItem(ItemPosition pos);
447 int16 getHoverInventoryItem(int16 x, int16 y);
448 int addInventoryItem(ItemName item);
449 int addInventoryItem(ItemName item, uint32 value);
450 void dropItem(uint16 v);
451 bool isItemInInventory(int32 v);
453 int16 getInventoryItemIndex(int16 pos);
454 void openInventory();
455 void closeInventory();
456 void sayText(
const Common::String &text, Common::TextToSpeechManager::Action action)
const;
457 void setTTSVoice(
int id)
const;
458 void stopTextToSpeech()
const;
460 virtual void parseLocation(
const char* name) = 0;
461 virtual void changeLocation() = 0;
462 virtual void changeCharacter(
const char *name) = 0;
463 virtual void callFunction(uint index,
void* parm) = 0;
464 virtual void runPendingZones() = 0;
465 virtual void cleanupGame() = 0;
466 virtual void updateWalkers() = 0;
467 virtual void scheduleWalk(int16 x, int16 y,
bool fromUser) = 0;
468 virtual DialogueManager *createDialogueManager(
ZonePtr z) = 0;
469 virtual bool processGameEvent(
int event) = 0;
493 void parseLocation(
const char *filename)
override;
494 void changeLocation()
override;
495 void changeCharacter(
const char *name)
override;
496 void callFunction(uint index,
void* parm)
override;
497 void runPendingZones()
override;
498 void cleanupGame()
override;
499 void updateWalkers()
override;
500 void scheduleWalk(int16 x, int16 y,
bool fromUser)
override;
501 DialogueManager *createDialogueManager(
ZonePtr z)
override;
502 bool processGameEvent(
int event)
override;
503 void cleanInventory(
bool keepVerbs);
504 void changeBackground(
const char *background,
const char *mask = 0,
const char *path = 0);
514 void initResources();
515 void initInventory();
516 void destroyInventory();
517 void setupBalloonManager();
519 void startCreditSequence();
520 void startEndPartSequence();
522 void freeLocation(
bool removeAll);
523 void freeCharacter();
524 void destroyTestResultLabels();
525 void startMovingSarcophagus(
ZonePtr sarc);
526 void stopMovingSarcophagus();
531 const Callable *_callables;
538 int16 _sarcophagusDeltaX;
539 bool _movingSarcophagus;
540 uint16 _freeSarcophagusSlotX;
543 static const Callable _dosCallables[25];
544 static const Callable _amigaCallables[25];
546 GfxObj *_testResultLabels[2];
551 void _c_play_boogie(
void *);
552 void _c_startIntro(
void *);
553 void _c_endIntro(
void *);
554 void _c_moveSheet(
void *);
555 void _c_sketch(
void *);
556 void _c_shade(
void *);
557 void _c_score(
void *);
558 void _c_fade(
void *);
559 void _c_moveSarc(
void *);
560 void _c_contaFoglie(
void *);
561 void _c_zeroFoglie(
void *);
562 void _c_trasformata(
void *);
563 void _c_offMouse(
void *);
564 void _c_onMouse(
void *);
565 void _c_setMask(
void *);
566 void _c_endComment(
void *);
567 void _c_frankenstein(
void *);
568 void _c_finito(
void *);
569 void _c_ridux(
void *);
570 void _c_testResult(
void *);
573 void _c_null(
void *);
576 void _c_projector(
void *);
577 void _c_HBOff(
void *);
578 void _c_offSound(
void *);
579 void _c_startMusic(
void *);
580 void _c_closeMusic(
void *);
581 void _c_HBOn(
void *);
586 #define NUM_ZONES 100 598 void parseLocation(
const char* name)
override;
599 void changeLocation()
override;
600 void changeCharacter(
const char *name)
override;
601 void callFunction(uint index,
void* parm)
override;
602 void runPendingZones()
override;
603 void cleanupGame()
override;
604 void updateWalkers()
override;
605 void scheduleWalk(int16 x, int16 y,
bool fromUser)
override;
606 DialogueManager *createDialogueManager(
ZonePtr z)
override;
607 bool processGameEvent(
int event)
override;
609 void setupSubtitles(
const char *s,
const char *s2,
int y);
610 void clearSubtitles();
612 Inventory *findInventory(
const char *name);
613 void linkUnlinkedZoneAnimations();
615 void testCounterCondition(
const Common::String &name,
int op,
int value);
616 void restoreOrSaveZoneFlags(
ZonePtr z,
bool restore);
626 int getMusicStatus();
627 void enableSfx(
bool enable);
628 void enableMusic(
bool enable);
630 const char **_audioCommandsNamesRes;
631 static const char *_partNames[];
636 #if 0 // disabled since I couldn't find any references to lip sync in the scripts 638 uint _subtitleLipSync;
643 uint32 _zoneFlags[NUM_LOCATIONS][NUM_ZONES];
654 Table *_countersNames;
657 void initResources();
658 void initInventory();
659 void destroyInventory();
661 void cleanInventory(
bool keepVerbs);
662 void setupBalloonManager();
665 void freeLocation(
bool removeAll);
667 void startGui(
bool showSplash);
668 void startIngameMenu();
669 void freeCharacter();
672 const Callable *_callables;
673 static const Callable _dosCallables[6];
674 static const Callable _amigaCallables[6];
682 void _c_null(
void *);
683 void _c_blufade(
void *);
684 void _c_resetpalette(
void *);
685 void _c_ferrcycle(
void *);
686 void _c_lipsinc(
void *);
687 void _c_albcycle(
void *);
688 void _c_password(
void *);
Definition: inventory.h:84
EngineFeature
Definition: engine.h:260
ErrorCode getCode() const
Definition: error.h:112
Definition: graphics.h:433
Definition: parallaction.h:231
No error occurred.
Definition: error.h:48
Definition: parallaction.h:189
Definition: inventory.h:32
Definition: parallaction.h:474
Definition: inventory.h:56
Common::Error run() override
Definition: parallaction.h:343
Definition: saveload.h:29
Definition: graphics.h:53
Definition: graphics.h:411
Definition: parallaction.h:133
Definition: detection.h:43
Definition: parallaction.h:588
Definition: graphics.h:300
Definition: parallaction.h:211
Language
Definition: language.h:45
Definition: objects.h:509