22 #ifndef TUCKER_TUCKER_H 23 #define TUCKER_TUCKER_H 25 #include "common/file.h" 26 #include "common/util.h" 27 #include "common/endian.h" 28 #include "common/events.h" 29 #include "common/random.h" 30 #include "common/savefile.h" 31 #include "common/stream.h" 33 #include "video/flic_decoder.h" 35 #include "audio/mixer.h" 37 #include "engines/engine.h" 39 #include "tucker/console.h" 40 #include "tucker/detection.h" 43 class RewindableAudioStream;
59 kCursorArrowRight = 2,
67 kCursorStateNormal = 0,
68 kCursorStateDialog = 1,
69 kCursorStateDisabledHidden = 2
73 kPanelStateNormal = 0,
74 kPanelStateShrinking = 1,
75 kPanelStateExpanding = 2
86 kPanelTypeLoadSavePlayQuit = 2,
87 kPanelTypeLoadSaveSavegame = 3
101 kVerbFirst = kVerbWalk,
105 enum VerbPreposition {
106 kVerbPrepositionNone = 0,
108 kVerbPrepositionWith = 11,
109 kVerbPrepositionTo = 12
122 kLocationHotelRoom = 1,
123 kLocationBackAlley = 2,
124 kLocationSeedyStreet = 3,
125 kLocationBakersShop = 4,
126 kLocationBakersKitchen = 5,
127 kLocationStripJoint = 6,
128 kLocationPoliceHQ = 7,
129 kLocationPoliceCell = 8,
131 kLocationFishShop = 10,
132 kLocationBurgerJoint = 11,
133 kLocationRecordShop = 12,
134 kLocationDentist = 13,
135 kLocationPlugShop = 14,
136 kLocationTouristInfo = 15,
138 kLocationRoystonsHomeHallway = 17,
139 kLocationRoystonsHomeBoxroom = 18,
141 kLocationOutsideMuseum = 20,
142 kLocationInsideMuseum = 21,
143 kLocationFishingTrawler = 22,
144 kLocationWarehouseCutscene = 23,
145 kLocationStoreRoom = 24,
146 kLocationVentSystem = 25,
147 kLocationSubwayTunnel = 26,
148 kLocationStrangeRoom = 27,
149 kLocationTopCorridor = 28,
150 kLocationSubmarineHangar = 29,
151 kLocationBunkRoom = 30,
152 kLocationBottomCorridor = 31,
153 kLocationKitchen = 32,
154 kLocationCommandCentre = 33,
155 kLocationSubmarineHatch = 34,
156 kLocationSubmarineWalkway = 35,
157 kLocationSubmarineBridge = 36,
158 kLocationSubmarineOffice = 37,
159 kLocationSubmarineEngineRoom = 38,
160 kLocationLuxuryApartment = 39,
161 kLocationFarDocks = 40,
162 kLocationAlleyway = 41,
163 kLocationBasement = 42,
164 kLocationTateTowerEntrance = 43,
165 kLocationRooftop = 44,
166 kLocationConferenceRoom = 45,
167 kLocationAnteChamber = 46,
168 kLocationHelipad = 47,
169 kLocationCorridor = 48,
170 kLocationWaitingRoom = 49,
171 kLocationkLocationCorridorCutscene = 50,
173 kLocationMachineRoom = 52,
174 kLocationRecordShopPartThree = 53,
175 kLocationPlugShopPartThree = 54,
176 kLocationTouristInfoPartThree = 55,
177 kLocationDentistPartThree = 56,
178 kLocationFishShopPartThree = 57,
179 kLocationInsideMuseumPartThree = 58,
180 kLocationBakersShopPartThree = 59,
181 kLocationStripJointPartThree = 60,
182 kLocationParkPartThree = 61,
183 kLocationDocksPartThree = 62,
186 kLocationSeedyStreetPartThree = 65,
187 kLocationMallPartThree = 66,
188 kLocationBurgerJointPartThree = 67,
189 kLocationOutsideMuseumPartThree = 68,
190 kLocation69Cutscene = 69,
191 kLocationComputerScreen = 70,
192 kLocationParkCutscene = 71,
193 kLocationSeedyStreetCutscene = 72,
194 kLocationJesusCutscene1 = 73,
195 kLocationCredits = 74,
196 kLocation75Cutscene = 75,
197 kLocationBeachCutscene = 76,
198 kLocationHospitalCutscene = 77,
199 kLocation78Cutscene = 78,
200 kLocationElvisCutscene = 79,
201 kLocationPyramidCutscene = 80,
202 kLocationCleopatraCutscene = 81,
203 kLocationJesusCutscene2 = 82,
205 kLocationNewPart = 98,
209 kLocationInitDemo = 9
230 int _gfxBackgroundOffset;
232 int _backgroundOffset;
238 uint8 *_animationData;
240 int _defaultUpdateDelay;
246 bool _nextAnimationFrame;
247 bool _prevAnimationFrame;
275 int _firstFrameIndex;
289 int _animInitCounter;
290 int _animCurrentCounter;
291 int _animLastCounter;
317 CursorStyle _cursorStyle;
321 int _startFxSpriteState;
322 int _startFxSpriteNum;
324 int _stopFxSpriteState;
325 int _stopFxSpriteNum;
329 int _flagValueStartFx;
330 int _flagValueStopFx;
346 kFadePaletteStep = 5,
347 kDefaultCharSpeechSoundCounter = 1,
348 kMaxSoundVolume = 127,
350 kAutoSaveSlot = kLastSaveSlot
356 kInputKeyTogglePanelStyle,
357 kInputKeyToggleTextSpeech,
364 enum CompressedSoundType {
374 CompressedSound() : _compressedSoundType(-1), _compressedSoundFlags(0) {}
382 int _compressedSoundType;
383 uint16 _compressedSoundFlags;
387 inline int scaleMixerVolume(
int volume,
int max = 100) {
394 warning(
"scaleMixerVolume: Adjusting volume %d to %d", volume, max);
400 Common::String generateGameStateFileName(
const char *target,
int slot,
bool prefixOnly =
false);
408 kLocationAnimationsTableSize = 20,
409 kLocationObjectsTableSize = 10,
410 kActionsTableSize = 100,
411 kFlagsTableSize = 300,
412 kLocationSoundsTableSize = 30,
413 kLocationMusicsTableSize = 4,
414 kSpriteFramesTableSize = 200,
415 kSprA02TableSize = 20,
416 kSprC02TableSize = 40,
417 kDataTableSize = 500,
418 kSpeechHistoryTableSize = 5,
434 kSavegameNoError = 0,
435 kSavegameInvalidTypeError,
436 kSavegameInvalidVersionError,
437 kSavegameNotFoundError,
448 WARN_UNUSED_RESULT
static SavegameError readSavegameHeader(
const char *target,
int slot,
SavegameHeader &header);
449 bool canSaveAutosaveCurrently()
override;
451 static bool isAutosaveAllowed(
const char *target);
454 int getRandomNumber();
455 void allocateBuffers();
457 void resetVariables();
459 void waitForTimer(
int ticksCount);
461 void updateCursorPos(
int x,
int y);
462 void setCursorStyle(CursorStyle style);
463 void setCursorState(CursorState state);
464 void showCursor(
bool visible);
465 void setupNewLocation();
466 void copyLocBitmap(
const char *filename,
int offset,
bool isMask);
467 void updateMouseState();
468 void updateCharPositionHelper();
469 void updateCharPosition();
470 void updateFlagsForCharPosition();
471 void fadeOutPalette(
int colorsCount = 256);
472 void fadeInPalette(
int colorsCount = 256);
473 void fadePaletteColor(
int color,
int step);
474 void setBlackPalette();
478 void updateCharactersPath();
479 void setSoundVolumeDistance();
480 void updateData3DrawFlag();
482 void updateSfxData3_1();
483 void updateSfxData3_2();
485 void handleMouseOnPanel();
486 void togglePanelStyle();
487 void redrawPanelOverBackground();
488 void drawConversationTexts();
489 void updateScreenScrolling();
490 void updateGameHints();
491 void startCharacterSounds();
492 void updateSoundsTypes3_4();
494 void execData3PreUpdate();
495 void drawBackgroundSprites();
496 void drawCurrentSprite();
497 void setVolumeSound(
int index,
int volume);
498 void setVolumeMusic(
int index,
int volume);
499 void startSound(
int offset,
int index,
int volume);
500 void stopSound(
int index);
501 bool isSoundPlaying(
int index);
502 void startMusic(
int offset,
int index,
int volume);
503 void stopMusic(
int index);
504 void startSpeechSound(
int num,
int volume);
505 void stopSpeechSound();
506 bool isSpeechSoundPlaying();
507 void rememberSpeechSound();
508 void redrawPanelItems();
509 void redrawPanelItemsHelper();
510 void drawSprite(
int i);
511 void clearItemsGfx();
512 void drawPausedInfoBar();
513 const uint8 *getStringBuf(
int type)
const;
514 void drawInfoString();
515 void drawGameHintString();
516 void updateCharacterAnimation();
517 void execData3PostUpdate();
518 void addObjectToInventory(
int num);
519 void removeObjectFromInventory(
int num);
522 void updateSprites();
523 void updateSprite(
int i);
524 void drawStringInteger(
int num,
int x,
int y,
int digits);
525 void drawStringAlt(
int x,
int y,
int color,
const uint8 *str,
int strLen = -1);
526 void drawItemString(
int x,
int num,
const uint8 *str);
527 void drawCreditsString(
int x,
int y,
int num);
528 void updateCharSpeechSound(
bool displayText);
529 void updateItemsGfxColors(
int bit0,
int bit7);
530 bool testLocationMask(
int x,
int y);
531 int getStringWidth(
int num,
const uint8 *ptr);
532 int getPositionForLine(
int num,
const uint8 *ptr);
533 void resetCharacterAnimationIndex(
int count);
534 int readTableInstructionCode(
int *index);
535 int readTableInstructionParam(
int len);
536 int executeTableInstruction();
537 void moveUpInventoryObjects();
538 void moveDownInventoryObjects();
539 void setActionVerbUnderCursor();
540 int getObjectUnderCursor();
541 void setSelectedObjectKey();
542 void setCharacterAnimation(
int count,
int spr);
543 bool testLocationMaskArea(
int xBase,
int yBase,
int xPos,
int yPos);
544 void handleMouseClickOnInventoryObject();
545 int setCharacterUnderCursor();
546 int setLocationAnimationUnderCursor();
547 void setActionForInventoryObject();
548 void setActionState();
549 void playSpeechForAction(
int i);
550 void drawSpeechText(
int xStart,
int y,
const uint8 *dataPtr,
int num,
int color);
551 bool splitSpeechTextLines(
const uint8 *dataPtr,
int pos,
int x,
int &lineCharsCount,
int &lineWidth);
552 void drawSpeechTextLine(
const uint8 *dataPtr,
int pos,
int count,
int x,
int y, uint8 color);
553 void redrawScreen(
int offset);
555 void addDirtyRect(
int x,
int y,
int w,
int h);
557 void execData3PreUpdate_locationNum1();
558 void execData3PreUpdate_locationNum1Helper1();
559 void execData3PreUpdate_locationNum1Helper2();
560 int execData3PreUpdate_locationNum1Helper3(
int dx,
int dy);
561 void execData3PostUpdate_locationNum1();
562 void updateSprite_locationNum2();
563 void execData3PreUpdate_locationNum2();
564 void execData3PreUpdate_locationNum2Helper();
565 void updateSprite_locationNum3_0(
int i);
566 void updateSprite_locationNum3_1(
int i);
567 void updateSprite_locationNum3_2(
int i);
568 void execData3PreUpdate_locationNum3();
569 void updateSprite_locationNum4(
int i);
570 void execData3PreUpdate_locationNum4();
571 void updateSprite_locationNum5_0();
572 void updateSprite_locationNum5_1(
int i);
573 void updateSprite_locationNum6_0(
int i);
574 void updateSprite_locationNum6_1(
int i);
575 void updateSprite_locationNum6_2(
int i);
576 void execData3PreUpdate_locationNum6();
577 void execData3PreUpdate_locationNum6Helper1();
578 void execData3PreUpdate_locationNum6Helper2(
int dstOffset,
const uint8 *src);
579 void execData3PreUpdate_locationNum6Helper3(
int dstOffset,
const uint8 *src);
580 void execData3PostUpdate_locationNum6();
581 void updateSprite_locationNum7_0(
int i);
582 void updateSprite_locationNum7_1(
int i);
583 void updateSprite_locationNum8_0(
int i);
584 void updateSprite_locationNum8_1(
int i);
585 void execData3PostUpdate_locationNum8();
586 void updateSprite_locationNum9_0(
int i);
587 void updateSprite_locationNum9_1(
int i);
588 void updateSprite_locationNum9_2(
int i);
589 void execData3PreUpdate_locationNum9();
590 void execData3PostUpdate_locationNum9();
591 void updateSprite_locationNum10();
592 void execData3PreUpdate_locationNum10();
593 void updateSprite_locationNum11_0(
int i);
594 void updateSprite_locationNum11_1(
int i);
595 void updateSprite_locationNum11_2(
int i);
596 void updateSprite_locationNum11_3(
int i);
597 void updateSprite_locationNum11_4(
int i);
598 void updateSprite_locationNum12_0(
int i);
599 void updateSprite_locationNum12_1(
int i);
600 void execData3PreUpdate_locationNum12();
601 void updateSprite_locationNum13(
int i);
602 void execData3PreUpdate_locationNum13();
603 void updateSprite_locationNum14(
int i);
604 void execData3Update_locationNum14();
605 void execData3PreUpdate_locationNum14();
606 void execData3PreUpdate_locationNum14Helper1(
int i);
607 void execData3PreUpdate_locationNum14Helper2(
int i);
608 void execData3PostUpdate_locationNum14();
609 void updateSprite_locationNum15_0(
int i);
610 void updateSprite_locationNum15_1(
int i);
611 void updateSprite_locationNum15_2(
int i);
612 void execData3PreUpdate_locationNum15();
613 void updateSprite_locationNum16_0(
int i);
614 void updateSprite_locationNum16_1(
int i);
615 void updateSprite_locationNum16_2(
int i);
616 void execData3PreUpdate_locationNum16();
617 void updateSprite_locationNum17();
618 void updateSprite_locationNum18();
619 void updateSprite_locationNum19_0(
int i);
620 void updateSprite_locationNum19_1(
int i);
621 void updateSprite_locationNum19_2(
int i);
622 void updateSprite_locationNum19_3(
int i);
623 void execData3PreUpdate_locationNum19();
624 void updateSprite_locationNum21();
625 void execData3PreUpdate_locationNum21();
626 void execData3PostUpdate_locationNum21();
627 void updateSprite_locationNum22();
628 void execData3PreUpdate_locationNum22();
629 void updateSprite_locationNum23_0(
int i);
630 void updateSprite_locationNum23_1(
int i);
631 void updateSprite_locationNum23_2(
int i);
632 void updateSprite_locationNum23_3(
int i);
633 void updateSprite_locationNum24_0(
int i);
634 void updateSprite_locationNum24_1(
int i);
635 void updateSprite_locationNum24_2(
int i);
636 void updateSprite_locationNum24_3(
int i);
637 void execData3PreUpdate_locationNum24();
638 void execData3PostUpdate_locationNum24();
639 void execData3PreUpdate_locationNum25();
640 void updateSprite_locationNum26_0(
int i);
641 void updateSprite_locationNum26_1(
int i);
642 void execData3PreUpdate_locationNum26();
643 void updateSprite_locationNum27(
int i);
644 void execData3PreUpdate_locationNum27();
645 void execData3PostUpdate_locationNum27();
646 void updateSprite_locationNum28_0(
int i);
647 void updateSprite_locationNum28_1(
int i);
648 void updateSprite_locationNum28_2(
int i);
649 void execData3PreUpdate_locationNum28();
650 void execData3PostUpdate_locationNum28();
651 void updateSprite_locationNum29_0(
int i);
652 void updateSprite_locationNum29_1(
int i);
653 void updateSprite_locationNum29_2(
int i);
654 void execData3PreUpdate_locationNum29();
655 void updateSprite_locationNum30_34(
int i);
656 void execData3PreUpdate_locationNum30();
657 void updateSprite_locationNum31_0(
int i);
658 void updateSprite_locationNum31_1(
int i);
659 void execData3PreUpdate_locationNum31();
660 void updateSprite_locationNum32_0(
int i);
661 void execData3PreUpdate_locationNum32();
662 void execData3PostUpdate_locationNum32();
663 void updateSprite_locationNum33_0(
int i);
664 void updateSprite_locationNum33_1(
int i);
665 void updateSprite_locationNum33_2(
int i);
666 void execData3PreUpdate_locationNum33();
667 void execData3PreUpdate_locationNum34();
668 void execData3PreUpdate_locationNum35();
669 void updateSprite_locationNum36(
int i);
670 void execData3PreUpdate_locationNum36();
671 void updateSprite_locationNum37(
int i);
672 void execData3PreUpdate_locationNum38();
673 void updateSprite_locationNum41(
int i);
674 void execData3PreUpdate_locationNum41();
675 void updateSprite_locationNum42(
int i);
676 void execData3PreUpdate_locationNum42();
677 void updateSprite_locationNum43_2(
int i);
678 void updateSprite_locationNum43_3(
int i);
679 void updateSprite_locationNum43_4(
int i);
680 void updateSprite_locationNum43_5(
int i);
681 void updateSprite_locationNum43_6(
int i);
682 void execData3PreUpdate_locationNum43();
683 void execData3PreUpdate_locationNum44();
684 void updateSprite_locationNum48(
int i);
685 void updateSprite_locationNum49(
int i);
686 void execData3PreUpdate_locationNum49();
687 void updateSprite_locationNum50(
int i);
688 void updateSprite_locationNum51(
int i);
689 void execData3PreUpdate_locationNum52();
690 void updateSprite_locationNum53_0(
int i);
691 void updateSprite_locationNum53_1(
int i);
692 void execData3PreUpdate_locationNum53();
693 void updateSprite_locationNum54(
int i);
694 void updateSprite_locationNum55(
int i);
695 void updateSprite_locationNum56(
int i);
696 void updateSprite_locationNum57_0(
int i);
697 void updateSprite_locationNum57_1(
int i);
698 void execData3PreUpdate_locationNum57();
699 void updateSprite_locationNum58(
int i);
700 void execData3PreUpdate_locationNum58();
701 void updateSprite_locationNum59(
int i);
702 void updateSprite_locationNum60_0(
int i);
703 void updateSprite_locationNum60_1(
int i);
704 void execData3PostUpdate_locationNum60();
705 void updateSprite_locationNum61_0(
int i);
706 void updateSprite_locationNum61_1(
int i);
707 void updateSprite_locationNum61_2(
int i);
708 void execData3PreUpdate_locationNum61();
709 void updateSprite_locationNum63_0(
int i);
710 void updateSprite_locationNum63_1(
int i);
711 void updateSprite_locationNum63_2(
int i);
712 void updateSprite_locationNum63_3(
int i);
713 void updateSprite_locationNum63_4(
int i);
714 void execData3PreUpdate_locationNum63();
715 void execData3PreUpdate_locationNum64();
716 void updateSprite_locationNum65(
int i);
717 void execData3PreUpdate_locationNum65();
718 void updateSprite_locationNum66_0(
int i);
719 void updateSprite_locationNum66_1(
int i);
720 void updateSprite_locationNum66_2(
int i);
721 void updateSprite_locationNum66_3(
int i);
722 void updateSprite_locationNum66_4(
int i);
723 void execData3PreUpdate_locationNum66();
724 void execData3PostUpdate_locationNum66();
725 void updateSprite_locationNum69_1(
int i);
726 void updateSprite_locationNum69_2(
int i);
727 void updateSprite_locationNum69_3(
int i);
728 void execData3PreUpdate_locationNum70();
729 void execData3PreUpdate_locationNum70Helper();
730 void updateSprite_locationNum71(
int i);
731 void updateSprite_locationNum72(
int i);
732 void updateSprite_locationNum74(
int i);
733 void updateSprite_locationNum79(
int i);
734 void updateSprite_locationNum81_0(
int i);
735 void updateSprite_locationNum81_1(
int i);
736 void updateSprite_locationNum82(
int i);
738 template<
class S> SavegameError saveOrLoadGameStateData(S &s);
747 bool canLoadOrSave()
const;
750 virtual bool existsSavegame();
752 void handleIntroSequence();
753 void handleCreditsSequence();
754 void handleCongratulationsSequence();
755 void handleNewPartSequence();
756 void handleMeanwhileSequence();
757 void handleMapSequence();
758 void copyMapRect(
int x,
int y,
int w,
int h);
759 bool handleSpecialObjectSelectionSequence();
761 uint8 *loadFile(
const char *filename, uint8 *p);
762 void loadImage(
const char *filename, uint8 *dst,
int a);
766 void loadCharsetHelper();
767 void loadCharSizeDta();
770 int loadCTable01(
int *framesCount);
775 int loadDataHelper(
int offset,
int index);
779 void loadActionFile();
781 void loadSprA02_01();
782 void unloadSprA02_01();
783 void loadSprC02_01();
784 void unloadSprC02_01();
787 void loadActionsTable();
799 uint32 _lastFrameTime;
800 int _mainLoopCounter1;
801 int _mainLoopCounter2;
803 int _flagsTable[kFlagsTableSize];
807 Location _nextLocation;
810 bool _displayGameHints;
811 int _execData3Counter;
812 int _currentSaveLoadGameState;
814 int _gameHintsCounter;
815 int _gameHintsStringNum;
817 bool _displaySpeechText;
818 bool _displayHintsText;
822 uint8 *_cursorGfxBuf;
823 uint8 *_charsetGfxBuf;
826 uint8 *_spritesGfxBuf;
827 uint8 *_locationBackgroundGfxBuf;
830 uint8 *_quadBackgroundGfxBuf;
832 uint8 *_panelObjectsGfxBuf;
837 uint8 *_locationBackgroundMaskBuf;
840 uint8 _charWidthTable[256];
841 const uint8 *_locationWidthTable;
842 uint8 *_locationHeightTable;
844 int _mousePosX, _mousePosY;
845 int _prevMousePosX, _prevMousePosY;
846 int _mouseButtonsMask;
848 int _saveOrLoadGamePanel;
849 int _mouseIdleCounter;
850 bool _leftMouseButtonPressed;
851 bool _rightMouseButtonPressed;
853 bool _mouseWheelDown;
855 bool _inputKeys[kInputKeyCount];
856 CursorStyle _cursorStyle;
857 CursorState _cursorState;
858 bool _updateCursorFlag;
860 PanelStyle _panelStyle;
861 PanelState _panelState;
862 PanelType _panelType;
863 bool _forceRedrawPanelItems;
864 int _redrawPanelItemsCounter;
865 int _panelObjectsOffsetTable[50];
866 int _switchPanelCounter;
867 int _conversationOptionsCount;
869 bool _panelLockedFlag;
870 int _conversationOptionLinesCount;
871 int _inventoryItemsState[50];
872 int _inventoryObjectsList[40];
873 int _inventoryObjectsOffset;
874 int _inventoryObjectsCount;
875 int _lastInventoryObjectIndex;
877 uint8 *_sprA02Table[kSprA02TableSize];
878 uint8 *_sprC02Table[kSprC02TableSize];
879 Action _actionsTable[kActionsTableSize];
882 int _locationObjectsCount;
883 Sprite _spritesTable[kMaxCharacters];
886 int _locationAnimationsCount;
887 Data _dataTable[kDataTableSize];
889 CharPos _charPosTable[kMaxCharacters];
891 LocationSound _locationSoundsTable[kLocationSoundsTableSize];
892 int _locationSoundsCount;
893 LocationMusic _locationMusicsTable[kLocationMusicsTableSize];
894 int _locationMusicsCount;
899 int _currentFxVolume;
906 int _miscSoundFxNum[2];
907 int _speechHistoryTable[kSpeechHistoryTableSize];
908 int _charSpeechSoundCounter;
909 int _miscSoundFxDelayCounter[2];
910 int _characterSoundFxDelayCounter;
911 int _characterSoundFxNum;
912 int _speechSoundBaseNum;
914 int _pendingActionIndex;
915 int _pendingActionDelay;
916 int _charPositionFlagNum;
917 int _charPositionFlagValue;
919 Verb _currentActionVerb;
920 Verb _previousActionVerb;
922 int _selectedObjectNum;
923 int _selectedObjectType;
924 int _selectedCharacterNum;
925 int _actionObj1Type, _actionObj2Type;
926 int _actionObj1Num, _actionObj2Num;
927 bool _actionRequiresTwoObjects;
928 bool _actionVerbLocked;
931 bool _selectedObjectLocationMask;
937 Location _locationObjectLocation;
938 int _locationObjectToX;
939 int _locationObjectToY;
940 int _locationObjectToX2;
941 int _locationObjectToY2;
942 int _locationObjectToWalkX2;
943 int _locationObjectToWalkY2;
945 int _selectedCharacterDirection;
946 int _selectedCharacter2Num;
947 int _currentActionObj1Num, _currentActionObj2Num;
948 int _currentInfoString1SourceType, _currentInfoString2SourceType;
949 int _speechActionCounterTable[9];
950 int _actionCharacterNum;
954 bool _stopActionOnSoundFlag;
955 bool _stopActionOnSpeechFlag;
956 bool _stopActionOnPanelLock;
957 int _csDataTableCount;
958 int _stopActionCounter;
959 int _actionTextColor;
960 int _nextTableToLoadIndex;
961 int _nextTableToLoadTable[6];
962 int _soundInstructionIndex;
963 const uint8 *_tableInstructionsPtr;
964 int _tableInstructionObj1Table[6];
965 int _tableInstructionObj2Table[6];
966 bool _tableInstructionFlag;
967 int _tableInstructionItemNum1, _tableInstructionItemNum2;
968 int _instructionsActionsTable[6];
969 bool _validInstructionId;
971 SpriteFrame _spriteFramesTable[kSpriteFramesTableSize];
973 int _spriteAnimationFramesTable[500];
974 int _spriteAnimationFrameIndex;
975 int _backgroundSpriteCurrentFrame;
976 int _backgroundSpriteLastFrame;
977 int _backgroundSpriteCurrentAnimation;
978 bool _disableCharactersPath;
979 bool _skipCurrentCharacterDraw;
982 const uint8 *_characterSpeechDataPtr;
984 int _characterAnimationsTable[200];
985 int _characterStateTable[200];
986 int _backgroundSprOffset;
987 int _mainSpritesBaseOffset;
988 int _currentSpriteAnimationLength;
989 int _currentSpriteAnimationFrame;
990 int _currentSpriteAnimationFrame2;
991 int _characterAnimationIndex;
992 int _characterFacingDirection;
993 int _characterPrevFacingDirection;
994 bool _characterBackFrontFacing;
995 bool _characterPrevBackFrontFacing;
996 int _characterAnimationNum;
997 int _noCharacterAnimationChange;
998 int _characterSpriteAnimationFrameCounter;
999 bool _locationMaskIgnore;
1000 int _locationMaskType;
1001 int _locationMaskCounter;
1002 int _handleMapCounter;
1003 bool _noPositionChangeAfterMap;
1004 bool _changeBackgroundSprite;
1005 bool _updateSpriteFlag1;
1006 bool _updateSpriteFlag2;
1008 bool _mirroredDrawing;
1009 uint8 *_loadLocBufPtr;
1010 uint8 *_backgroundSpriteDataPtr;
1011 int _locationHeight;
1013 int _currentGfxBackgroundCounter;
1014 uint8 *_currentGfxBackground;
1015 int _fadePaletteCounter;
1016 uint8 _currentPalette[768];
1018 int _dirtyRectsPrevCount, _dirtyRectsCount;
1021 int _updateLocationFadePaletteCounter;
1022 int _updateLocationCounter;
1023 int _updateLocationPos;
1024 int _updateLocationXPosTable[5], _updateLocationYPosTable[5];
1025 int _updateLocationFlagsTable[5];
1026 int _updateLocationXPosTable2[10], _updateLocationYPosTable2[10];
1027 int _updateLocationYMaxTable[3];
1028 int _updateLocation14Step[10];
1029 int _updateLocation14ObjNum[10];
1030 int _updateLocation14Delay[10];
1031 int _updateLocationCounter2;
1032 bool _updateLocationFlag;
1033 int _updateLocation70StringLen;
1034 uint8 _updateLocation70String[20];
1036 static const uint8 _locationWidthTableGame[85];
1037 static const uint8 _locationWidthTableDemo[70];
1038 static const uint8 _sprA02LookupTable[88];
1039 static const uint8 _sprC02LookupTable[100];
1040 static const uint8 _sprC02LookupTable2[100];
1041 static const int _staticData3Table[1600];
1042 static uint8 _locationHeightTableGame[80];
1043 static uint8 _locationHeightTableDemo[70];
1044 static int _objectKeysPosXTable[80];
1045 static int _objectKeysPosYTable[80];
1046 static int _objectKeysLocationTable[80];
1047 static int _mapSequenceFlagsLocationTable[70];
1048 static const uint8 _charWidthCharset1[224];
1049 static const uint8 _charWidthCharset2[58];
1053 kFirstAnimationSequenceGame = 17,
1054 kFirstAnimationSequenceDemo = 13
1057 enum AnimationSoundType {
1058 kAnimationSoundType8BitsRAW,
1059 kAnimationSoundType16BitsRAW,
1060 kAnimationSoundTypeWAV
1065 kSoundsList_Seq9_10,
1066 kSoundsList_Seq21_20,
1067 kSoundsList_Seq13_14,
1068 kSoundsList_Seq15_16,
1069 kSoundsList_Seq27_28,
1070 kSoundsList_Seq17_18,
1071 kSoundsList_Seq19_20
1085 int soundList1Count;
1086 int soundList2Count;
1087 int soundSeqDataCount;
1095 kSequenceFrameTime = 55
1113 void loadSounds(
int num);
1115 void updateSounds();
1116 void fadeInPalette();
1117 void fadeOutPalette();
1118 void unloadAnimation();
1119 uint8 *loadPicture(
const char *fileName);
1120 void openAnimation(
int index,
const char *fileName);
1121 bool decodeNextAnimationFrame(
int index,
bool copyDirtyRects =
true);
1122 void loadIntroSeq17_18();
1123 void playIntroSeq17_18();
1124 void loadIntroSeq19_20();
1125 void playIntroSeq19_20();
1126 void displayLoadingScreen();
1127 void initPicPart4();
1128 void drawPicPart4();
1129 void loadIntroSeq3_4();
1130 void playIntroSeq3_4();
1131 void drawPic2Part10();
1132 void drawPic1Part10();
1133 void loadIntroSeq9_10();
1134 void playIntroSeq9_10();
1135 void loadIntroSeq21_22();
1136 void playIntroSeq21_22();
1137 void loadIntroSeq13_14();
1138 void playIntroSeq13_14();
1139 void loadIntroSeq15_16();
1140 void playIntroSeq15_16();
1141 void loadIntroSeq27_28();
1142 void playIntroSeq27_28();
1143 void getRGBPalette(
int index);
1151 bool _changeToNextSequence;
1153 int _updateFuncIndex;
1155 uint8 _animationPalette[256 * 3];
1156 int _soundSeqDataCount;
1157 int _soundSeqDataIndex;
1159 uint8 *_offscreenBuffer;
1160 int _updateScreenWidth;
1161 bool _updateScreenPicture;
1162 int _updateScreenCounter;
1163 int _updateScreenIndex;
1166 uint32 _lastFrameTime;
1167 uint8 *_picBufPtr, *_pic2BufPtr;
1173 static const char *
const _audioFileNamesTable[];
EngineFeature
Definition: engine.h:250
static String format(MSVC_PRINTF const char *fmt,...) GCC_PRINTF(1
Definition: savefile.h:54
void warning(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
Definition: tucker.h:1098
Definition: tucker.h:1091
Definition: flic_decoder.h:49
SoundType
Definition: mixer.h:62
int getAutosaveSlot() const override
Definition: tucker.h:742
bool skipThumbnail(Common::SeekableReadStream &in)
Definition: audiostream.h:109
Common::String getSaveStateName(int slot) const override
Definition: tucker.h:743
Definition: tucker.h:1074
Language
Definition: language.h:45
Definition: tucker.h:1082