25 #include "common/error.h" 26 #include "common/events.h" 27 #include "common/fs.h" 28 #include "common/hash-str.h" 29 #include "common/memstream.h" 30 #include "common/random.h" 31 #include "common/scummsys.h" 32 #include "common/serializer.h" 33 #include "common/system.h" 34 #include "common/util.h" 35 #include "engines/engine.h" 36 #include "engines/savestate.h" 37 #include "graphics/screen.h" 39 #include "tot/chrono.h" 40 #include "tot/detection.h" 41 #include "tot/graphics.h" 42 #include "tot/mouse.h" 43 #include "tot/sound.h" 44 #include "tot/types.h" 48 struct TotGameDescription;
69 void loadScrollData(uint roomCode,
bool rightScroll, uint horizontalPos,
int scrollCorrection);
70 void drawText(uint number);
71 void displayLoading();
73 void sprites(
bool drawCharacter);
74 void saveGameToRegister();
75 void originalSaveLoadScreen();
79 void lookAtObject(byte objectNumber);
80 void useInventoryObjectWithInventoryObject(uint obj1, uint obj2);
81 void pickupScreenObject();
82 void useScreenObject();
83 void openScreenObject();
84 void closeScreenObject();
86 void handleAction(byte invPos);
89 void calculateRoute(byte zone1, byte zone2,
bool extraCorrection =
false,
bool zonavedada =
false);
91 void advanceAnimations(
bool barredZone,
bool animateMouse);
92 void updateSecondaryAnimationDepth();
93 void updateMainCharacterDepth();
95 void initializeObjectFile();
97 void scrollLeft(uint horizontalPos);
98 void scrollRight(uint horizontalPos);
99 TextEntry readTextRegister(uint numRegister);
101 void readConversationFile();
107 void nicheAnimation(byte nicheDir, int32 bitmap);
108 void replaceBackpack(byte obj1, uint obj2);
109 void dropObjectInScreen(
ScreenObject replacementObject);
110 void calculateTrajectory(uint finalX, uint finalY);
111 void animatedSequence(uint numSequence);
112 void initScreenPointers();
115 void loadCharAnimation();
116 void animateGive(uint dir, uint height);
117 void animatePickup1(uint dir, uint height);
118 void animatePickup2(uint dir, uint height);
119 void animateOpen2(uint dir, uint height);
123 void loadScreenLayerWithDepth(uint coordx, uint coordy, uint bitmapSize, int32 bitmapIndex, uint depth);
124 void loadScreenLayer(uint coordx, uint coordy, uint picSize, int32 pic, uint prof);
125 void readBitmap(int32 bitmapOffset, byte *bitmap, uint bitmapSize, uint errorCode);
126 void updateAltScreen(byte altScreenNumber);
128 void freeInventory();
129 void updateInventory(byte index);
130 void updateObject(uint filePos);
133 void saveItemRegister();
135 void saveTemporaryGame();
137 void putIcon(uint posX, uint posY, uint iconNumber);
138 void drawInventory(byte direction, byte limit);
141 void checkMouseGrid();
143 void firstIntroduction();
144 void readAlphaGraph(
Common::String &data,
int length,
int x,
int y, byte barColor);
145 void readAlphaGraphSmall(
Common::String &data,
int length,
int x,
int y, byte barColor, byte textColor,
char startChar =
'\0');
147 void copyProtection();
149 void mainMenu(
bool fade);
151 void soundControls();
152 void sacrificeScene();
156 void assembleCompleteBackground(byte *image, uint coordx, uint coordy);
157 void assembleScreen(
bool scroll =
false);
158 void disableSecondAnimation();
162 void clearCurrentInventoryObject();
164 void resetGameState();
178 bool _showMouseGrid =
false;
179 bool _showScreenGrid =
false;
180 bool _showGameGrid =
false;
181 bool _drawObjectAreas =
false;
189 bool _roomChange =
false;
190 bool _isTVOn =
false;
191 bool _isVasePlaced =
false;
192 bool _isScytheTaken =
false;
193 bool _isTridentTaken =
false;
194 bool _isPottersWheelDelivered =
false;
195 bool _isMudDelivered =
false;
196 bool _isGreenDevilDelivered =
false;
197 bool _isRedDevilCaptured =
false;
198 bool _isPottersManualDelivered =
false;
199 bool _isCupboardOpen =
false;
200 bool _isChestOpen =
false;
201 bool _isTrapSet =
false;
202 bool _isPeterCoughing =
false;
204 bool _isSealRemoved =
false;
205 bool _inGame =
false;
206 bool _firstTimeDone =
false;
207 bool _isIntroSeen =
false;
208 bool _shouldQuitGame =
false;
209 bool _startNewGame =
false;
210 bool _continueGame =
false;
211 bool _isSavingDisabled =
false;
212 bool _isDrawingEnabled =
false;
213 bool _isSecondaryAnimationEnabled =
false;
228 uint _mainCharFrameSize;
230 uint _secondaryAnimFrameSize;
375 bool _list1Complete =
false,
376 _list2Complete =
false,
377 _obtainedList1 =
false,
378 _obtainedList2 =
false;
382 _firstTimeTopicB[kCharacterCount] = {
false },
383 _firstTimeTopicC[kCharacterCount] = {
false },
384 _bookTopic[kCharacterCount] = {
false },
385 _mintTopic[kCharacterCount] = {
false };
387 bool _caves[5] = {
false };
394 int32 _screenSize = 65520;
432 uint _currentRoomNumber = 0;
434 bool _isLoadingFromLauncher =
false;
436 bool _saveAllowed =
false;
456 byte *_spriteBackground;
461 uint32 getFeatures()
const;
489 void loadScreenData(uint screenNumber);
490 void clearScreenLayers();
491 void clearAnimation();
492 void buttonBorder(uint x1, uint y1, uint x2, uint y2, byte color1, byte color2, byte color3, byte color4, byte color5);
493 void drawMenu(byte menuNumber);
496 void sayLine(uint textRef, byte textColor, byte shadowColor, uint &responseNumber,
bool isWithinConversation);
497 void goToObject(byte zone1, byte zone2);
498 void readObject(uint objPos);
500 void drawInventory();
501 void drawInventoryMask();
502 void setRoomTrajectories(
int height,
int width, TRAJECTORIES_OP op,
bool fixGrids =
true);
505 void initializeScreenFile();
509 #define SHOULD_QUIT ::Tot::g_engine->shouldQuit() byte _oldActionCode
Definition: tot.h:238
Common::File _verbFile
Definition: tot.h:305
byte * _screenLayers[kNumScreenOverlays]
Definition: tot.h:408
Definition: graphics.h:32
byte _trajectorySteps
Definition: tot.h:242
EngineFeature
Definition: engine.h:260
byte * _sceneBackground
Definition: tot.h:421
byte _destinationX
Definition: tot.h:266
int _xframe2
Definition: tot.h:300
bool hasFeature(EngineFeature f) const override
Definition: tot.h:475
byte _cpCounter
Definition: tot.h:262
Common::Error run() override
Definition: advancedDetector.h:164
ObjectInfo _depthMap[kNumScreenOverlays]
Definition: tot.h:404
Definition: memstream.h:394
uint _currentTrajectoryIndex
Definition: tot.h:343
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
uint getRandomNumber(uint max)
byte _secondaryAnimDirCount
Definition: tot.h:258
byte _maxXGrid
Definition: tot.h:356
uint16 _dirtyMainSpriteX
Definition: tot.h:450
uint16 _characterPosX
Definition: tot.h:296
Definition: serializer.h:79
bool _firstTimeTopicA[kCharacterCount]
Definition: tot.h:381
uint _secondaryAnimWidth
Definition: tot.h:279
uint _niche[2][4]
Definition: tot.h:321
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
byte * _characterDirtyRect
Definition: tot.h:426
byte _mouseGridForSecondaryAnim[10][10]
Definition: tot.h:365
byte _secondaryAnimationFrameCount
Definition: tot.h:254
CharacterAnim _mainCharAnimation
Definition: tot.h:227
byte _inventoryPosition
Definition: tot.h:223
uint _trajectoryLength
Definition: tot.h:339
uint _currentSecondaryTrajectoryIndex
Definition: tot.h:347
uint _oldposx
Definition: tot.h:287
byte * _curCharacterAnimationFrame
Definition: tot.h:412
Common::String _oldInventoryObjectName
Definition: tot.h:309
Route _mainRoute
Definition: tot.h:329
byte _iframe
Definition: tot.h:399
uint16 _firstList[5]
Definition: tot.h:392
Common::String getGameId() const
byte _gamePart
Definition: tot.h:250
byte _movementGridForSecondaryAnim[10][10]
Definition: tot.h:361
byte _doorIndex
Definition: tot.h:246
byte _actionCode
Definition: tot.h:234
uint _backpackObjectCode
Definition: tot.h:283
byte * _curSecondaryAnimationFrame
Definition: tot.h:416
Common::Point _trajectory[300]
Definition: tot.h:334
uint _dirtyMainSpriteX2
Definition: tot.h:455
Common::String _characterName
Definition: tot.h:314
byte _charFacingDirection
Definition: tot.h:274
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave=false) override
uint32 getRandomNumber(uint maxNum)
Definition: tot.h:471
byte * _inventoryIconBitmaps[kInventoryIconCount]
Definition: tot.h:219
byte _maskMouseSecondaryAnim[10][10]
Definition: tot.h:373
Common::Error loadGameStream(Common::SeekableReadStream *stream) override
byte * _backgroundCopy
Definition: tot.h:430
byte _currentZone
Definition: tot.h:351
byte _maskGridSecondaryAnim[10][10]
Definition: tot.h:369
int _element1
Definition: tot.h:292
uint _oldGridX
Definition: tot.h:441
Language
Definition: language.h:45