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;
61 kActionTogglePanelStyle,
62 kActionToggleTextSpeech,
70 kCursorArrowRight = 2,
78 kCursorStateNormal = 0,
79 kCursorStateDialog = 1,
80 kCursorStateDisabledHidden = 2
84 kPanelStateNormal = 0,
85 kPanelStateShrinking = 1,
86 kPanelStateExpanding = 2
97 kPanelTypeLoadSavePlayQuit = 2,
98 kPanelTypeLoadSaveSavegame = 3
112 kVerbFirst = kVerbWalk,
116 enum VerbPreposition {
117 kVerbPrepositionNone = 0,
119 kVerbPrepositionWith = 11,
120 kVerbPrepositionTo = 12
133 kLocationHotelRoom = 1,
134 kLocationBackAlley = 2,
135 kLocationSeedyStreet = 3,
136 kLocationBakersShop = 4,
137 kLocationBakersKitchen = 5,
138 kLocationStripJoint = 6,
139 kLocationPoliceHQ = 7,
140 kLocationPoliceCell = 8,
142 kLocationFishShop = 10,
143 kLocationBurgerJoint = 11,
144 kLocationRecordShop = 12,
145 kLocationDentist = 13,
146 kLocationPlugShop = 14,
147 kLocationTouristInfo = 15,
149 kLocationRoystonsHomeHallway = 17,
150 kLocationRoystonsHomeBoxroom = 18,
152 kLocationOutsideMuseum = 20,
153 kLocationInsideMuseum = 21,
154 kLocationFishingTrawler = 22,
155 kLocationWarehouseCutscene = 23,
156 kLocationStoreRoom = 24,
157 kLocationVentSystem = 25,
158 kLocationSubwayTunnel = 26,
159 kLocationStrangeRoom = 27,
160 kLocationTopCorridor = 28,
161 kLocationSubmarineHangar = 29,
162 kLocationBunkRoom = 30,
163 kLocationBottomCorridor = 31,
164 kLocationKitchen = 32,
165 kLocationCommandCentre = 33,
166 kLocationSubmarineHatch = 34,
167 kLocationSubmarineWalkway = 35,
168 kLocationSubmarineBridge = 36,
169 kLocationSubmarineOffice = 37,
170 kLocationSubmarineEngineRoom = 38,
171 kLocationLuxuryApartment = 39,
172 kLocationFarDocks = 40,
173 kLocationAlleyway = 41,
174 kLocationBasement = 42,
175 kLocationTateTowerEntrance = 43,
176 kLocationRooftop = 44,
177 kLocationConferenceRoom = 45,
178 kLocationAnteChamber = 46,
179 kLocationHelipad = 47,
180 kLocationCorridor = 48,
181 kLocationWaitingRoom = 49,
182 kLocationkLocationCorridorCutscene = 50,
184 kLocationMachineRoom = 52,
185 kLocationRecordShopPartThree = 53,
186 kLocationPlugShopPartThree = 54,
187 kLocationTouristInfoPartThree = 55,
188 kLocationDentistPartThree = 56,
189 kLocationFishShopPartThree = 57,
190 kLocationInsideMuseumPartThree = 58,
191 kLocationBakersShopPartThree = 59,
192 kLocationStripJointPartThree = 60,
193 kLocationParkPartThree = 61,
194 kLocationDocksPartThree = 62,
197 kLocationSeedyStreetPartThree = 65,
198 kLocationMallPartThree = 66,
199 kLocationBurgerJointPartThree = 67,
200 kLocationOutsideMuseumPartThree = 68,
201 kLocation69Cutscene = 69,
202 kLocationComputerScreen = 70,
203 kLocationParkCutscene = 71,
204 kLocationSeedyStreetCutscene = 72,
205 kLocationJesusCutscene1 = 73,
206 kLocationCredits = 74,
207 kLocation75Cutscene = 75,
208 kLocationBeachCutscene = 76,
209 kLocationHospitalCutscene = 77,
210 kLocation78Cutscene = 78,
211 kLocationElvisCutscene = 79,
212 kLocationPyramidCutscene = 80,
213 kLocationCleopatraCutscene = 81,
214 kLocationJesusCutscene2 = 82,
216 kLocationNewPart = 98,
220 kLocationInitDemo = 9
241 int _gfxBackgroundOffset;
243 int _backgroundOffset;
249 uint8 *_animationData;
251 int _defaultUpdateDelay;
257 bool _nextAnimationFrame;
258 bool _prevAnimationFrame;
286 int _firstFrameIndex;
300 int _animInitCounter;
301 int _animCurrentCounter;
302 int _animLastCounter;
328 CursorStyle _cursorStyle;
332 int _startFxSpriteState;
333 int _startFxSpriteNum;
335 int _stopFxSpriteState;
336 int _stopFxSpriteNum;
340 int _flagValueStartFx;
341 int _flagValueStopFx;
357 kFadePaletteStep = 5,
358 kDefaultCharSpeechSoundCounter = 1,
359 kMaxSoundVolume = 127,
361 kAutoSaveSlot = kLastSaveSlot
367 kInputKeyTogglePanelStyle,
368 kInputKeyToggleTextSpeech,
375 enum CompressedSoundType {
385 CompressedSound() : _compressedSoundType(-1), _compressedSoundFlags(0) {}
393 int _compressedSoundType;
394 uint16 _compressedSoundFlags;
398 inline int scaleMixerVolume(
int volume,
int max = 100) {
405 warning(
"scaleMixerVolume: Adjusting volume %d to %d", volume, max);
411 Common::String generateGameStateFileName(
const char *target,
int slot,
bool prefixOnly =
false);
419 kLocationAnimationsTableSize = 20,
420 kLocationObjectsTableSize = 10,
421 kActionsTableSize = 100,
422 kFlagsTableSize = 300,
423 kLocationSoundsTableSize = 30,
424 kLocationMusicsTableSize = 4,
425 kSpriteFramesTableSize = 200,
426 kSprA02TableSize = 20,
427 kSprC02TableSize = 40,
428 kDataTableSize = 500,
429 kSpeechHistoryTableSize = 5,
445 kSavegameNoError = 0,
446 kSavegameInvalidTypeError,
447 kSavegameInvalidVersionError,
448 kSavegameNotFoundError,
459 WARN_UNUSED_RESULT
static SavegameError readSavegameHeader(
const char *target,
int slot,
SavegameHeader &header);
460 bool canSaveAutosaveCurrently()
override;
462 static bool isAutosaveAllowed(
const char *target);
465 int getRandomNumber();
466 void allocateBuffers();
468 void resetVariables();
470 void waitForTimer(
int ticksCount);
472 void updateCursorPos(
int x,
int y);
473 void setCursorStyle(CursorStyle style);
474 void setCursorState(CursorState state);
475 void showCursor(
bool visible);
476 void setupNewLocation();
477 void copyLocBitmap(
const char *filename,
int offset,
bool isMask);
478 void updateMouseState();
479 void updateCharPositionHelper();
480 void updateCharPosition();
481 void updateFlagsForCharPosition();
482 void fadeOutPalette(
int colorsCount = 256);
483 void fadeInPalette(
int colorsCount = 256);
484 void fadePaletteColor(
int color,
int step);
485 void setBlackPalette();
489 void updateCharactersPath();
490 void setSoundVolumeDistance();
491 void updateData3DrawFlag();
493 void updateSfxData3_1();
494 void updateSfxData3_2();
496 void handleMouseOnPanel();
497 void togglePanelStyle();
498 void redrawPanelOverBackground();
499 void drawConversationTexts();
500 void updateScreenScrolling();
501 void updateGameHints();
502 void startCharacterSounds();
503 void updateSoundsTypes3_4();
505 void execData3PreUpdate();
506 void drawBackgroundSprites();
507 void drawCurrentSprite();
508 void setVolumeSound(
int index,
int volume);
509 void setVolumeMusic(
int index,
int volume);
510 void startSound(
int offset,
int index,
int volume);
511 void stopSound(
int index);
512 bool isSoundPlaying(
int index);
513 void startMusic(
int offset,
int index,
int volume);
514 void stopMusic(
int index);
515 void startSpeechSound(
int num,
int volume);
516 void stopSpeechSound();
517 bool isSpeechSoundPlaying();
518 void rememberSpeechSound();
519 void redrawPanelItems();
520 void redrawPanelItemsHelper();
521 void drawSprite(
int i);
522 void clearItemsGfx();
523 void drawPausedInfoBar();
524 const uint8 *getStringBuf(
int type)
const;
525 void drawInfoString();
526 void drawGameHintString();
527 void updateCharacterAnimation();
528 void execData3PostUpdate();
529 void addObjectToInventory(
int num);
530 void removeObjectFromInventory(
int num);
533 void updateSprites();
534 void updateSprite(
int i);
535 void drawStringInteger(
int num,
int x,
int y,
int digits);
536 void drawStringAlt(
int x,
int y,
int color,
const uint8 *str,
int strLen = -1);
537 void drawItemString(
int x,
int num,
const uint8 *str);
538 void drawCreditsString(
int x,
int y,
int num);
539 void updateCharSpeechSound(
bool displayText);
540 void updateItemsGfxColors(
int bit0,
int bit7);
541 bool testLocationMask(
int x,
int y);
542 int getStringWidth(
int num,
const uint8 *ptr);
543 int getPositionForLine(
int num,
const uint8 *ptr);
544 void resetCharacterAnimationIndex(
int count);
545 int readTableInstructionCode(
int *index);
546 int readTableInstructionParam(
int len);
547 int executeTableInstruction();
548 void moveUpInventoryObjects();
549 void moveDownInventoryObjects();
550 void setActionVerbUnderCursor();
551 int getObjectUnderCursor();
552 void setSelectedObjectKey();
553 void setCharacterAnimation(
int count,
int spr);
554 bool testLocationMaskArea(
int xBase,
int yBase,
int xPos,
int yPos);
555 void handleMouseClickOnInventoryObject();
556 int setCharacterUnderCursor();
557 int setLocationAnimationUnderCursor();
558 void setActionForInventoryObject();
559 void setActionState();
560 void playSpeechForAction(
int i);
561 void drawSpeechText(
int xStart,
int y,
const uint8 *dataPtr,
int num,
int color);
562 bool splitSpeechTextLines(
const uint8 *dataPtr,
int pos,
int x,
int &lineCharsCount,
int &lineWidth);
563 void drawSpeechTextLine(
const uint8 *dataPtr,
int pos,
int count,
int x,
int y, uint8 color);
564 void redrawScreen(
int offset);
566 void addDirtyRect(
int x,
int y,
int w,
int h);
568 void execData3PreUpdate_locationNum1();
569 void execData3PreUpdate_locationNum1Helper1();
570 void execData3PreUpdate_locationNum1Helper2();
571 int execData3PreUpdate_locationNum1Helper3(
int dx,
int dy);
572 void execData3PostUpdate_locationNum1();
573 void updateSprite_locationNum2();
574 void execData3PreUpdate_locationNum2();
575 void execData3PreUpdate_locationNum2Helper();
576 void updateSprite_locationNum3_0(
int i);
577 void updateSprite_locationNum3_1(
int i);
578 void updateSprite_locationNum3_2(
int i);
579 void execData3PreUpdate_locationNum3();
580 void updateSprite_locationNum4(
int i);
581 void execData3PreUpdate_locationNum4();
582 void updateSprite_locationNum5_0();
583 void updateSprite_locationNum5_1(
int i);
584 void updateSprite_locationNum6_0(
int i);
585 void updateSprite_locationNum6_1(
int i);
586 void updateSprite_locationNum6_2(
int i);
587 void execData3PreUpdate_locationNum6();
588 void execData3PreUpdate_locationNum6Helper1();
589 void execData3PreUpdate_locationNum6Helper2(
int dstOffset,
const uint8 *src);
590 void execData3PreUpdate_locationNum6Helper3(
int dstOffset,
const uint8 *src);
591 void execData3PostUpdate_locationNum6();
592 void updateSprite_locationNum7_0(
int i);
593 void updateSprite_locationNum7_1(
int i);
594 void updateSprite_locationNum8_0(
int i);
595 void updateSprite_locationNum8_1(
int i);
596 void execData3PostUpdate_locationNum8();
597 void updateSprite_locationNum9_0(
int i);
598 void updateSprite_locationNum9_1(
int i);
599 void updateSprite_locationNum9_2(
int i);
600 void execData3PreUpdate_locationNum9();
601 void execData3PostUpdate_locationNum9();
602 void updateSprite_locationNum10();
603 void execData3PreUpdate_locationNum10();
604 void updateSprite_locationNum11_0(
int i);
605 void updateSprite_locationNum11_1(
int i);
606 void updateSprite_locationNum11_2(
int i);
607 void updateSprite_locationNum11_3(
int i);
608 void updateSprite_locationNum11_4(
int i);
609 void updateSprite_locationNum12_0(
int i);
610 void updateSprite_locationNum12_1(
int i);
611 void execData3PreUpdate_locationNum12();
612 void updateSprite_locationNum13(
int i);
613 void execData3PreUpdate_locationNum13();
614 void updateSprite_locationNum14(
int i);
615 void execData3Update_locationNum14();
616 void execData3PreUpdate_locationNum14();
617 void execData3PreUpdate_locationNum14Helper1(
int i);
618 void execData3PreUpdate_locationNum14Helper2(
int i);
619 void execData3PostUpdate_locationNum14();
620 void updateSprite_locationNum15_0(
int i);
621 void updateSprite_locationNum15_1(
int i);
622 void updateSprite_locationNum15_2(
int i);
623 void execData3PreUpdate_locationNum15();
624 void updateSprite_locationNum16_0(
int i);
625 void updateSprite_locationNum16_1(
int i);
626 void updateSprite_locationNum16_2(
int i);
627 void execData3PreUpdate_locationNum16();
628 void updateSprite_locationNum17();
629 void updateSprite_locationNum18();
630 void updateSprite_locationNum19_0(
int i);
631 void updateSprite_locationNum19_1(
int i);
632 void updateSprite_locationNum19_2(
int i);
633 void updateSprite_locationNum19_3(
int i);
634 void execData3PreUpdate_locationNum19();
635 void updateSprite_locationNum21();
636 void execData3PreUpdate_locationNum21();
637 void execData3PostUpdate_locationNum21();
638 void updateSprite_locationNum22();
639 void execData3PreUpdate_locationNum22();
640 void updateSprite_locationNum23_0(
int i);
641 void updateSprite_locationNum23_1(
int i);
642 void updateSprite_locationNum23_2(
int i);
643 void updateSprite_locationNum23_3(
int i);
644 void updateSprite_locationNum24_0(
int i);
645 void updateSprite_locationNum24_1(
int i);
646 void updateSprite_locationNum24_2(
int i);
647 void updateSprite_locationNum24_3(
int i);
648 void execData3PreUpdate_locationNum24();
649 void execData3PostUpdate_locationNum24();
650 void execData3PreUpdate_locationNum25();
651 void updateSprite_locationNum26_0(
int i);
652 void updateSprite_locationNum26_1(
int i);
653 void execData3PreUpdate_locationNum26();
654 void updateSprite_locationNum27(
int i);
655 void execData3PreUpdate_locationNum27();
656 void execData3PostUpdate_locationNum27();
657 void updateSprite_locationNum28_0(
int i);
658 void updateSprite_locationNum28_1(
int i);
659 void updateSprite_locationNum28_2(
int i);
660 void execData3PreUpdate_locationNum28();
661 void execData3PostUpdate_locationNum28();
662 void updateSprite_locationNum29_0(
int i);
663 void updateSprite_locationNum29_1(
int i);
664 void updateSprite_locationNum29_2(
int i);
665 void execData3PreUpdate_locationNum29();
666 void updateSprite_locationNum30_34(
int i);
667 void execData3PreUpdate_locationNum30();
668 void updateSprite_locationNum31_0(
int i);
669 void updateSprite_locationNum31_1(
int i);
670 void execData3PreUpdate_locationNum31();
671 void updateSprite_locationNum32_0(
int i);
672 void execData3PreUpdate_locationNum32();
673 void execData3PostUpdate_locationNum32();
674 void updateSprite_locationNum33_0(
int i);
675 void updateSprite_locationNum33_1(
int i);
676 void updateSprite_locationNum33_2(
int i);
677 void execData3PreUpdate_locationNum33();
678 void execData3PreUpdate_locationNum34();
679 void execData3PreUpdate_locationNum35();
680 void updateSprite_locationNum36(
int i);
681 void execData3PreUpdate_locationNum36();
682 void updateSprite_locationNum37(
int i);
683 void execData3PreUpdate_locationNum38();
684 void updateSprite_locationNum41(
int i);
685 void execData3PreUpdate_locationNum41();
686 void updateSprite_locationNum42(
int i);
687 void execData3PreUpdate_locationNum42();
688 void updateSprite_locationNum43_2(
int i);
689 void updateSprite_locationNum43_3(
int i);
690 void updateSprite_locationNum43_4(
int i);
691 void updateSprite_locationNum43_5(
int i);
692 void updateSprite_locationNum43_6(
int i);
693 void execData3PreUpdate_locationNum43();
694 void execData3PreUpdate_locationNum44();
695 void updateSprite_locationNum48(
int i);
696 void updateSprite_locationNum49(
int i);
697 void execData3PreUpdate_locationNum49();
698 void updateSprite_locationNum50(
int i);
699 void updateSprite_locationNum51(
int i);
700 void execData3PreUpdate_locationNum52();
701 void updateSprite_locationNum53_0(
int i);
702 void updateSprite_locationNum53_1(
int i);
703 void execData3PreUpdate_locationNum53();
704 void updateSprite_locationNum54(
int i);
705 void updateSprite_locationNum55(
int i);
706 void updateSprite_locationNum56(
int i);
707 void updateSprite_locationNum57_0(
int i);
708 void updateSprite_locationNum57_1(
int i);
709 void execData3PreUpdate_locationNum57();
710 void updateSprite_locationNum58(
int i);
711 void execData3PreUpdate_locationNum58();
712 void updateSprite_locationNum59(
int i);
713 void updateSprite_locationNum60_0(
int i);
714 void updateSprite_locationNum60_1(
int i);
715 void execData3PostUpdate_locationNum60();
716 void updateSprite_locationNum61_0(
int i);
717 void updateSprite_locationNum61_1(
int i);
718 void updateSprite_locationNum61_2(
int i);
719 void execData3PreUpdate_locationNum61();
720 void updateSprite_locationNum63_0(
int i);
721 void updateSprite_locationNum63_1(
int i);
722 void updateSprite_locationNum63_2(
int i);
723 void updateSprite_locationNum63_3(
int i);
724 void updateSprite_locationNum63_4(
int i);
725 void execData3PreUpdate_locationNum63();
726 void execData3PreUpdate_locationNum64();
727 void updateSprite_locationNum65(
int i);
728 void execData3PreUpdate_locationNum65();
729 void updateSprite_locationNum66_0(
int i);
730 void updateSprite_locationNum66_1(
int i);
731 void updateSprite_locationNum66_2(
int i);
732 void updateSprite_locationNum66_3(
int i);
733 void updateSprite_locationNum66_4(
int i);
734 void execData3PreUpdate_locationNum66();
735 void execData3PostUpdate_locationNum66();
736 void updateSprite_locationNum69_1(
int i);
737 void updateSprite_locationNum69_2(
int i);
738 void updateSprite_locationNum69_3(
int i);
739 void execData3PreUpdate_locationNum70();
740 void execData3PreUpdate_locationNum70Helper();
741 void updateSprite_locationNum71(
int i);
742 void updateSprite_locationNum72(
int i);
743 void updateSprite_locationNum74(
int i);
744 void updateSprite_locationNum79(
int i);
745 void updateSprite_locationNum81_0(
int i);
746 void updateSprite_locationNum81_1(
int i);
747 void updateSprite_locationNum82(
int i);
749 template<
class S> SavegameError saveOrLoadGameStateData(S &s);
758 bool canLoadOrSave()
const;
761 virtual bool existsSavegame();
763 void handleIntroSequence();
764 void handleCreditsSequence();
765 void handleCongratulationsSequence();
766 void handleNewPartSequence();
767 void handleMeanwhileSequence();
768 void handleMapSequence();
769 void copyMapRect(
int x,
int y,
int w,
int h);
770 bool handleSpecialObjectSelectionSequence();
772 uint8 *loadFile(
const char *filename, uint8 *p);
773 void loadImage(
const char *filename, uint8 *dst,
int a);
777 void loadCharsetHelper();
778 void loadCharSizeDta();
781 int loadCTable01(
int *framesCount);
786 int loadDataHelper(
int offset,
int index);
790 void loadActionFile();
792 void loadSprA02_01();
793 void unloadSprA02_01();
794 void loadSprC02_01();
795 void unloadSprC02_01();
798 void loadActionsTable();
810 uint32 _lastFrameTime;
811 int _mainLoopCounter1;
812 int _mainLoopCounter2;
814 int _flagsTable[kFlagsTableSize];
818 Location _nextLocation;
821 bool _displayGameHints;
822 int _execData3Counter;
823 int _currentSaveLoadGameState;
825 int _gameHintsCounter;
826 int _gameHintsStringNum;
828 bool _displaySpeechText;
829 bool _displayHintsText;
833 uint8 *_cursorGfxBuf;
834 uint8 *_charsetGfxBuf;
837 uint8 *_spritesGfxBuf;
838 uint8 *_locationBackgroundGfxBuf;
841 uint8 *_quadBackgroundGfxBuf;
843 uint8 *_panelObjectsGfxBuf;
848 uint8 *_locationBackgroundMaskBuf;
851 uint8 _charWidthTable[256];
852 const uint8 *_locationWidthTable;
853 uint8 *_locationHeightTable;
855 int _mousePosX, _mousePosY;
856 int _prevMousePosX, _prevMousePosY;
857 int _mouseButtonsMask;
859 int _saveOrLoadGamePanel;
860 int _mouseIdleCounter;
861 bool _leftMouseButtonPressed;
862 bool _rightMouseButtonPressed;
864 bool _mouseWheelDown;
866 bool _inputKeys[kInputKeyCount];
867 CursorStyle _cursorStyle;
868 CursorState _cursorState;
869 bool _updateCursorFlag;
871 PanelStyle _panelStyle;
872 PanelState _panelState;
873 PanelType _panelType;
874 bool _forceRedrawPanelItems;
875 int _redrawPanelItemsCounter;
876 int _panelObjectsOffsetTable[50];
877 int _switchPanelCounter;
878 int _conversationOptionsCount;
880 bool _panelLockedFlag;
881 int _conversationOptionLinesCount;
882 int _inventoryItemsState[50];
883 int _inventoryObjectsList[40];
884 int _inventoryObjectsOffset;
885 int _inventoryObjectsCount;
886 int _lastInventoryObjectIndex;
888 uint8 *_sprA02Table[kSprA02TableSize];
889 uint8 *_sprC02Table[kSprC02TableSize];
890 Action _actionsTable[kActionsTableSize];
893 int _locationObjectsCount;
894 Sprite _spritesTable[kMaxCharacters];
897 int _locationAnimationsCount;
898 Data _dataTable[kDataTableSize];
900 CharPos _charPosTable[kMaxCharacters];
902 LocationSound _locationSoundsTable[kLocationSoundsTableSize];
903 int _locationSoundsCount;
904 LocationMusic _locationMusicsTable[kLocationMusicsTableSize];
905 int _locationMusicsCount;
910 int _currentFxVolume;
917 int _miscSoundFxNum[2];
918 int _speechHistoryTable[kSpeechHistoryTableSize];
919 int _charSpeechSoundCounter;
920 int _miscSoundFxDelayCounter[2];
921 int _characterSoundFxDelayCounter;
922 int _characterSoundFxNum;
923 int _speechSoundBaseNum;
925 int _pendingActionIndex;
926 int _pendingActionDelay;
927 int _charPositionFlagNum;
928 int _charPositionFlagValue;
930 Verb _currentActionVerb;
931 Verb _previousActionVerb;
933 int _selectedObjectNum;
934 int _selectedObjectType;
935 int _selectedCharacterNum;
936 int _actionObj1Type, _actionObj2Type;
937 int _actionObj1Num, _actionObj2Num;
938 bool _actionRequiresTwoObjects;
939 bool _actionVerbLocked;
942 bool _selectedObjectLocationMask;
948 Location _locationObjectLocation;
949 int _locationObjectToX;
950 int _locationObjectToY;
951 int _locationObjectToX2;
952 int _locationObjectToY2;
953 int _locationObjectToWalkX2;
954 int _locationObjectToWalkY2;
956 int _selectedCharacterDirection;
957 int _selectedCharacter2Num;
958 int _currentActionObj1Num, _currentActionObj2Num;
959 int _currentInfoString1SourceType, _currentInfoString2SourceType;
960 int _speechActionCounterTable[9];
961 int _actionCharacterNum;
965 bool _stopActionOnSoundFlag;
966 bool _stopActionOnSpeechFlag;
967 bool _stopActionOnPanelLock;
968 int _csDataTableCount;
969 int _stopActionCounter;
970 int _actionTextColor;
971 int _nextTableToLoadIndex;
972 int _nextTableToLoadTable[6];
973 int _soundInstructionIndex;
974 const uint8 *_tableInstructionsPtr;
975 int _tableInstructionObj1Table[6];
976 int _tableInstructionObj2Table[6];
977 bool _tableInstructionFlag;
978 int _tableInstructionItemNum1, _tableInstructionItemNum2;
979 int _instructionsActionsTable[6];
980 bool _validInstructionId;
982 SpriteFrame _spriteFramesTable[kSpriteFramesTableSize];
984 int _spriteAnimationFramesTable[500];
985 int _spriteAnimationFrameIndex;
986 int _backgroundSpriteCurrentFrame;
987 int _backgroundSpriteLastFrame;
988 int _backgroundSpriteCurrentAnimation;
989 bool _disableCharactersPath;
990 bool _skipCurrentCharacterDraw;
993 const uint8 *_characterSpeechDataPtr;
995 int _characterAnimationsTable[200];
996 int _characterStateTable[200];
997 int _backgroundSprOffset;
998 int _mainSpritesBaseOffset;
999 int _currentSpriteAnimationLength;
1000 int _currentSpriteAnimationFrame;
1001 int _currentSpriteAnimationFrame2;
1002 int _characterAnimationIndex;
1003 int _characterFacingDirection;
1004 int _characterPrevFacingDirection;
1005 bool _characterBackFrontFacing;
1006 bool _characterPrevBackFrontFacing;
1007 int _characterAnimationNum;
1008 int _noCharacterAnimationChange;
1009 int _characterSpriteAnimationFrameCounter;
1010 bool _locationMaskIgnore;
1011 int _locationMaskType;
1012 int _locationMaskCounter;
1013 int _handleMapCounter;
1014 bool _noPositionChangeAfterMap;
1015 bool _changeBackgroundSprite;
1016 bool _updateSpriteFlag1;
1017 bool _updateSpriteFlag2;
1019 bool _mirroredDrawing;
1020 uint8 *_loadLocBufPtr;
1021 uint8 *_backgroundSpriteDataPtr;
1022 int _locationHeight;
1024 int _currentGfxBackgroundCounter;
1025 uint8 *_currentGfxBackground;
1026 int _fadePaletteCounter;
1027 uint8 _currentPalette[768];
1029 int _dirtyRectsPrevCount, _dirtyRectsCount;
1032 int _updateLocationFadePaletteCounter;
1033 int _updateLocationCounter;
1034 int _updateLocationPos;
1035 int _updateLocationXPosTable[5], _updateLocationYPosTable[5];
1036 int _updateLocationFlagsTable[5];
1037 int _updateLocationXPosTable2[10], _updateLocationYPosTable2[10];
1038 int _updateLocationYMaxTable[3];
1039 int _updateLocation14Step[10];
1040 int _updateLocation14ObjNum[10];
1041 int _updateLocation14Delay[10];
1042 int _updateLocationCounter2;
1043 bool _updateLocationFlag;
1044 int _updateLocation70StringLen;
1045 uint8 _updateLocation70String[20];
1047 static const uint8 _locationWidthTableGame[85];
1048 static const uint8 _locationWidthTableDemo[70];
1049 static const uint8 _sprA02LookupTable[88];
1050 static const uint8 _sprC02LookupTable[100];
1051 static const uint8 _sprC02LookupTable2[100];
1052 static const int _staticData3Table[1600];
1053 static uint8 _locationHeightTableGame[80];
1054 static uint8 _locationHeightTableDemo[70];
1055 static int _objectKeysPosXTable[80];
1056 static int _objectKeysPosYTable[80];
1057 static int _objectKeysLocationTable[80];
1058 static int _mapSequenceFlagsLocationTable[70];
1059 static const uint8 _charWidthCharset1[224];
1060 static const uint8 _charWidthCharset2[58];
1064 kFirstAnimationSequenceGame = 17,
1065 kFirstAnimationSequenceDemo = 13
1068 enum AnimationSoundType {
1069 kAnimationSoundType8BitsRAW,
1070 kAnimationSoundType16BitsRAW,
1071 kAnimationSoundTypeWAV
1076 kSoundsList_Seq9_10,
1077 kSoundsList_Seq21_20,
1078 kSoundsList_Seq13_14,
1079 kSoundsList_Seq15_16,
1080 kSoundsList_Seq27_28,
1081 kSoundsList_Seq17_18,
1082 kSoundsList_Seq19_20
1096 int soundList1Count;
1097 int soundList2Count;
1098 int soundSeqDataCount;
1106 kSequenceFrameTime = 55
1124 void loadSounds(
int num);
1126 void updateSounds();
1127 void fadeInPalette();
1128 void fadeOutPalette();
1129 void unloadAnimation();
1130 uint8 *loadPicture(
const char *fileName);
1131 void openAnimation(
int index,
const char *fileName);
1132 bool decodeNextAnimationFrame(
int index,
bool copyDirtyRects =
true);
1133 void loadIntroSeq17_18();
1134 void playIntroSeq17_18();
1135 void loadIntroSeq19_20();
1136 void playIntroSeq19_20();
1137 void displayLoadingScreen();
1138 void initPicPart4();
1139 void drawPicPart4();
1140 void loadIntroSeq3_4();
1141 void playIntroSeq3_4();
1142 void drawPic2Part10();
1143 void drawPic1Part10();
1144 void loadIntroSeq9_10();
1145 void playIntroSeq9_10();
1146 void loadIntroSeq21_22();
1147 void playIntroSeq21_22();
1148 void loadIntroSeq13_14();
1149 void playIntroSeq13_14();
1150 void loadIntroSeq15_16();
1151 void playIntroSeq15_16();
1152 void loadIntroSeq27_28();
1153 void playIntroSeq27_28();
1154 void getRGBPalette(
int index);
1162 bool _changeToNextSequence;
1164 int _updateFuncIndex;
1166 uint8 _animationPalette[256 * 3];
1167 int _soundSeqDataCount;
1168 int _soundSeqDataIndex;
1170 uint8 *_offscreenBuffer;
1171 int _updateScreenWidth;
1172 bool _updateScreenPicture;
1173 int _updateScreenCounter;
1174 int _updateScreenIndex;
1177 uint32 _lastFrameTime;
1178 uint8 *_picBufPtr, *_pic2BufPtr;
1184 static const char *
const _audioFileNamesTable[];
EngineFeature
Definition: engine.h:253
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:1109
Definition: tucker.h:1102
Definition: flic_decoder.h:49
SoundType
Definition: mixer.h:62
int getAutosaveSlot() const override
Definition: tucker.h:753
bool skipThumbnail(Common::SeekableReadStream &in)
Definition: audiostream.h:109
Common::String getSaveStateName(int slot) const override
Definition: tucker.h:754
Definition: tucker.h:1085
Language
Definition: language.h:45
Definition: tucker.h:1093