25#include "common/error.h"
26#include "common/events.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/events.h"
42#include "tot/graphics.h"
49struct TotGameDescription;
83 void loadScrollData(uint roomCode,
bool rightScroll, uint horizontalPos,
int scrollCorrection);
84 void drawText(uint number);
85 void displayLoading();
87 void sprites(
bool drawCharacter);
89 void originalSaveLoadScreen();
91 bool autosaveExists();
94 void lookAtObject(
byte objectNumber);
95 void useInventoryObjectWithInventoryObject(int16 obj1, int16 obj2);
96 void pickupScreenObject();
97 void useScreenObject();
98 void openScreenObject();
99 void closeScreenObject();
101 void handleAction(
byte invPos);
102 void loadInventory();
104 void calculateRoute(
byte zone1,
byte zone2,
bool extraCorrection =
false,
bool zonavedada =
false);
106 void advanceAnimations(
bool barredZone,
bool animateMouse);
107 void updateSecondaryAnimationDepth();
108 void updateMainCharacterDepth();
110 void initializeObjectFile();
112 void scrollLeft(uint horizontalPos);
113 void scrollRight(uint horizontalPos);
114 TextEntry readTextRegister(uint numRegister);
116 void readConversationFile();
122 void nicheAnimation(
byte nicheDir, int32 bitmap);
123 void replaceBackpack(
byte obj1, uint obj2);
124 void dropObjectInScreen(
ScreenObject *replacementObject);
125 void calculateTrajectory(uint finalX, uint finalY);
126 void animatedSequence(uint numSequence);
127 void initScreenPointers();
130 void loadCharAnimation();
131 void animateGive(uint dir, uint height);
132 void animatePickup1(uint dir, uint height);
133 void animatePickup2(uint dir, uint height);
134 void animateOpen2(uint dir, uint height);
138 void loadScreenLayerWithDepth(uint coordx, uint coordy, uint bitmapSize, int32 bitmapIndex, uint depth);
139 void loadScreenLayer(uint coordx, uint coordy, uint picSize, int32 pic, uint prof);
140 void readBitmap(int32 bitmapOffset,
byte *bitmap, uint bitmapSize, uint errorCode);
141 void updateAltScreen(
byte altScreenNumber);
143 void freeInventory();
144 void updateInventory(
byte index);
145 void updateObject(uint filePos);
148 void saveItemRegister();
150 void saveTemporaryGame();
152 void putIcon(uint posX, uint posY, uint iconNumber);
153 void drawInventory(
byte direction,
byte limit);
156 void checkMouseGrid();
158 void firstIntroduction();
159 void readAlphaGraph(
Common::String &data,
int length,
int x,
int y,
byte barColor);
162 void copyProtection();
164 void mainMenu(
bool fade);
166 void soundControls();
167 void sacrificeScene();
171 void assembleCompleteBackground(
byte *image, uint coordx, uint coordy);
172 void assembleScreen(
bool scroll =
false);
173 void disableSecondAnimation();
178 void resetGameState();
181 void processEvents(
bool &escapePressed);
182 void oldProcessEvents(
bool &escapePressed);
197 bool _showMouseGrid =
false;
198 bool _showScreenGrid =
false;
199 bool _showGameGrid =
false;
200 bool _drawObjectAreas =
false;
208 bool _roomChange =
false;
209 bool _isTVOn =
false;
210 bool _isVasePlaced =
false;
211 bool _isScytheTaken =
false;
212 bool _isTridentTaken =
false;
213 bool _isPottersWheelDelivered =
false;
214 bool _isMudDelivered =
false;
215 bool _isGreenDevilDelivered =
false;
216 bool _isRedDevilCaptured =
false;
217 bool _isPottersManualDelivered =
false;
218 bool _isCupboardOpen =
false;
219 bool _isChestOpen =
false;
220 bool _isTrapSet =
false;
221 bool _isPeterCoughing =
false;
223 bool _isSealRemoved =
false;
224 bool _inGame =
false;
225 bool _firstTimeDone =
false;
226 bool _isIntroSeen =
false;
227 bool _shouldQuitGame =
false;
228 bool _startNewGame =
false;
229 bool _continueGame =
false;
230 bool _isSavingDisabled =
false;
231 bool _isDrawingEnabled =
false;
232 bool _isSecondaryAnimationEnabled =
false;
247 uint _mainCharFrameSize = 0;
249 uint _secondaryAnimFrameSize = 0;
394 bool _list1Complete =
false,
395 _list2Complete =
false,
396 _obtainedList1 =
false,
397 _obtainedList2 =
false;
401 _firstTimeTopicB[kCharacterCount] = {
false },
402 _firstTimeTopicC[kCharacterCount] = {
false },
403 _bookTopic[kCharacterCount] = {
false },
404 _mintTopic[kCharacterCount] = {
false };
406 bool _caves[5] = {
false };
413 int32 _screenSize = 65520;
451 uint _currentRoomNumber = 0;
453 bool _isLoadingFromLauncher =
false;
455 bool _saveAllowed =
false;
473 byte *_spriteBackground =
nullptr;
478 uint32 getFeatures()
const;
506 void loadScreenData(uint screenNumber);
507 void clearScreenLayers();
508 void clearAnimation();
509 void buttonBorder(uint x1, uint y1, uint x2, uint y2,
byte color1,
byte color2,
byte color3,
byte color4,
byte color5);
510 void drawMenu(
byte menuNumber);
511 void drawLeftArrow(uint x, uint y);
512 void drawRightArrow(uint x, uint y);
515 void sayLine(uint textRef,
byte textColor,
byte shadowColor, uint &responseNumber,
bool isWithinConversation);
516 void goToObject(
byte zone1,
byte zone2);
517 void readObject(uint objPos);
519 void drawInventory();
520 void drawInventoryMask();
521 void setRoomTrajectories(
int height,
int width, TRAJECTORIES_OP op,
bool fixGrids =
true);
524 void initializeScreenFile();
528#define SHOULD_QUIT ::Tot::g_engine->shouldQuit()
Definition: memstream.h:397
uint getRandomNumber(uint max)
Definition: serializer.h:80
EngineFeature
Definition: engine.h:282
@ kSupportsReturnToLauncher
Definition: engine.h:296
@ kSupportsSavingDuringRuntime
Definition: engine.h:314
@ kSupportsLoadingDuringRuntime
Definition: engine.h:305
Definition: graphics.h:32
uint _currentTrajectoryIndex
Definition: tot.h:362
byte * _inventoryIconBitmaps[kInventoryIconCount]
Definition: tot.h:238
int _element1
Definition: tot.h:311
byte _destinationX
Definition: tot.h:285
Common::File _verbFile
Definition: tot.h:324
byte _mouseGridForSecondaryAnim[10][10]
Definition: tot.h:384
byte _oldActionCode
Definition: tot.h:257
int _xframe2
Definition: tot.h:319
bool _firstTimeTopicA[kCharacterCount]
Definition: tot.h:400
byte _iframe
Definition: tot.h:418
void syncSoundSettings() override
Common::Point _trajectory[300]
Definition: tot.h:353
uint _dirtyMainSpriteX2
Definition: tot.h:472
uint _oldposx
Definition: tot.h:306
byte _maskGridSecondaryAnim[10][10]
Definition: tot.h:388
byte _cpCounter
Definition: tot.h:281
byte _movementGridForSecondaryAnim[10][10]
Definition: tot.h:380
Common::String getGameId() const
uint _oldGridX
Definition: tot.h:460
bool hasFeature(EngineFeature f) const override
Definition: tot.h:492
byte _maxXGrid
Definition: tot.h:375
Common::String _oldInventoryObjectName
Definition: tot.h:328
byte _maskMouseSecondaryAnim[10][10]
Definition: tot.h:392
uint16 _characterPosX
Definition: tot.h:315
byte * _sceneBackground
Definition: tot.h:440
uint _backpackObjectCode
Definition: tot.h:302
byte _gamePart
Definition: tot.h:269
byte * _characterDirtyRect
Definition: tot.h:445
uint16 _firstList[5]
Definition: tot.h:411
byte _currentZone
Definition: tot.h:370
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave=false) override
uint _currentSecondaryTrajectoryIndex
Definition: tot.h:366
uint _niche[2][4]
Definition: tot.h:340
byte * _curSecondaryAnimationFrame
Definition: tot.h:435
uint _trajectoryLength
Definition: tot.h:358
byte _secondaryAnimationFrameCount
Definition: tot.h:273
byte * _screenLayers[kNumScreenOverlays]
Definition: tot.h:427
byte _doorIndex
Definition: tot.h:265
ObjectInfo _depthMap[kNumScreenOverlays]
Definition: tot.h:423
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Common::Error run() override
byte * _backgroundCopy
Definition: tot.h:449
byte * _curCharacterAnimationFrame
Definition: tot.h:431
Route _mainRoute
Definition: tot.h:348
uint _secondaryAnimWidth
Definition: tot.h:298
uint32 getRandomNumber(uint maxNum)
Definition: tot.h:488
byte _inventoryPosition
Definition: tot.h:242
Common::String _characterName
Definition: tot.h:333
byte _actionCode
Definition: tot.h:253
CharacterAnim _mainCharAnimation
Definition: tot.h:246
Common::Error loadGameStream(Common::SeekableReadStream *stream) override
uint16 _dirtyMainSpriteX
Definition: tot.h:467
byte _trajectorySteps
Definition: tot.h:261
byte _secondaryAnimDirCount
Definition: tot.h:277
byte _charFacingDirection
Definition: tot.h:293
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Language
Definition: language.h:45
Definition: advancedDetector.h:164