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/events.h" 42 #include "tot/graphics.h" 43 #include "tot/mouse.h" 44 #include "tot/sound.h" 45 #include "tot/types.h" 49 struct 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();
93 void lookAtObject(byte objectNumber);
94 void useInventoryObjectWithInventoryObject(uint obj1, uint obj2);
95 void pickupScreenObject();
96 void useScreenObject();
97 void openScreenObject();
98 void closeScreenObject();
100 void handleAction(byte invPos);
101 void loadInventory();
103 void calculateRoute(byte zone1, byte zone2,
bool extraCorrection =
false,
bool zonavedada =
false);
105 void advanceAnimations(
bool barredZone,
bool animateMouse);
106 void updateSecondaryAnimationDepth();
107 void updateMainCharacterDepth();
109 void initializeObjectFile();
111 void scrollLeft(uint horizontalPos);
112 void scrollRight(uint horizontalPos);
113 TextEntry readTextRegister(uint numRegister);
115 void readConversationFile();
121 void nicheAnimation(byte nicheDir, int32 bitmap);
122 void replaceBackpack(byte obj1, uint obj2);
123 void dropObjectInScreen(
ScreenObject *replacementObject);
124 void calculateTrajectory(uint finalX, uint finalY);
125 void animatedSequence(uint numSequence);
126 void initScreenPointers();
129 void loadCharAnimation();
130 void animateGive(uint dir, uint height);
131 void animatePickup1(uint dir, uint height);
132 void animatePickup2(uint dir, uint height);
133 void animateOpen2(uint dir, uint height);
137 void loadScreenLayerWithDepth(uint coordx, uint coordy, uint bitmapSize, int32 bitmapIndex, uint depth);
138 void loadScreenLayer(uint coordx, uint coordy, uint picSize, int32 pic, uint prof);
139 void readBitmap(int32 bitmapOffset, byte *bitmap, uint bitmapSize, uint errorCode);
140 void updateAltScreen(byte altScreenNumber);
142 void freeInventory();
143 void updateInventory(byte index);
144 void updateObject(uint filePos);
147 void saveItemRegister();
149 void saveTemporaryGame();
151 void putIcon(uint posX, uint posY, uint iconNumber);
152 void drawInventory(byte direction, byte limit);
155 void checkMouseGrid();
157 void firstIntroduction();
158 void readAlphaGraph(
Common::String &data,
int length,
int x,
int y, byte barColor);
161 void copyProtection();
163 void mainMenu(
bool fade);
165 void soundControls();
166 void sacrificeScene();
170 void assembleCompleteBackground(byte *image, uint coordx, uint coordy);
171 void assembleScreen(
bool scroll =
false);
172 void disableSecondAnimation();
177 void resetGameState();
180 void processEvents(
bool &escapePressed);
181 void oldProcessEvents(
bool &escapePressed);
196 bool _showMouseGrid =
false;
197 bool _showScreenGrid =
false;
198 bool _showGameGrid =
false;
199 bool _drawObjectAreas =
false;
207 bool _roomChange =
false;
208 bool _isTVOn =
false;
209 bool _isVasePlaced =
false;
210 bool _isScytheTaken =
false;
211 bool _isTridentTaken =
false;
212 bool _isPottersWheelDelivered =
false;
213 bool _isMudDelivered =
false;
214 bool _isGreenDevilDelivered =
false;
215 bool _isRedDevilCaptured =
false;
216 bool _isPottersManualDelivered =
false;
217 bool _isCupboardOpen =
false;
218 bool _isChestOpen =
false;
219 bool _isTrapSet =
false;
220 bool _isPeterCoughing =
false;
222 bool _isSealRemoved =
false;
223 bool _inGame =
false;
224 bool _firstTimeDone =
false;
225 bool _isIntroSeen =
false;
226 bool _shouldQuitGame =
false;
227 bool _startNewGame =
false;
228 bool _continueGame =
false;
229 bool _isSavingDisabled =
false;
230 bool _isDrawingEnabled =
false;
231 bool _isSecondaryAnimationEnabled =
false;
246 uint _mainCharFrameSize = 0;
248 uint _secondaryAnimFrameSize = 0;
393 bool _list1Complete =
false,
394 _list2Complete =
false,
395 _obtainedList1 =
false,
396 _obtainedList2 =
false;
400 _firstTimeTopicB[kCharacterCount] = {
false },
401 _firstTimeTopicC[kCharacterCount] = {
false },
402 _bookTopic[kCharacterCount] = {
false },
403 _mintTopic[kCharacterCount] = {
false };
405 bool _caves[5] = {
false };
412 int32 _screenSize = 65520;
450 uint _currentRoomNumber = 0;
452 bool _isLoadingFromLauncher =
false;
454 bool _saveAllowed =
false;
472 byte *_spriteBackground =
nullptr;
477 uint32 getFeatures()
const;
505 void loadScreenData(uint screenNumber);
506 void clearScreenLayers();
507 void clearAnimation();
508 void buttonBorder(uint x1, uint y1, uint x2, uint y2, byte color1, byte color2, byte color3, byte color4, byte color5);
509 void drawMenu(byte menuNumber);
510 void drawLeftArrow(uint x, uint y);
511 void drawRightArrow(uint x, uint y);
514 void sayLine(uint textRef, byte textColor, byte shadowColor, uint &responseNumber,
bool isWithinConversation);
515 void goToObject(byte zone1, byte zone2);
516 void readObject(uint objPos);
518 void drawInventory();
519 void drawInventoryMask();
520 void setRoomTrajectories(
int height,
int width, TRAJECTORIES_OP op,
bool fixGrids =
true);
523 void initializeScreenFile();
527 #define SHOULD_QUIT ::Tot::g_engine->shouldQuit() byte _oldActionCode
Definition: tot.h:256
Common::File _verbFile
Definition: tot.h:323
byte * _screenLayers[kNumScreenOverlays]
Definition: tot.h:426
Definition: graphics.h:32
byte _trajectorySteps
Definition: tot.h:260
EngineFeature
Definition: engine.h:258
byte * _sceneBackground
Definition: tot.h:439
byte _destinationX
Definition: tot.h:284
int _xframe2
Definition: tot.h:318
bool hasFeature(EngineFeature f) const override
Definition: tot.h:491
byte _cpCounter
Definition: tot.h:280
Common::Error run() override
Definition: advancedDetector.h:164
ObjectInfo _depthMap[kNumScreenOverlays]
Definition: tot.h:422
Definition: memstream.h:397
uint _currentTrajectoryIndex
Definition: tot.h:361
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
uint getRandomNumber(uint max)
byte _secondaryAnimDirCount
Definition: tot.h:276
byte _maxXGrid
Definition: tot.h:374
uint16 _dirtyMainSpriteX
Definition: tot.h:466
uint16 _characterPosX
Definition: tot.h:314
void syncSoundSettings() override
Definition: serializer.h:79
bool _firstTimeTopicA[kCharacterCount]
Definition: tot.h:399
uint _secondaryAnimWidth
Definition: tot.h:297
uint _niche[2][4]
Definition: tot.h:339
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
byte * _characterDirtyRect
Definition: tot.h:444
byte _mouseGridForSecondaryAnim[10][10]
Definition: tot.h:383
byte _secondaryAnimationFrameCount
Definition: tot.h:272
CharacterAnim _mainCharAnimation
Definition: tot.h:245
byte _inventoryPosition
Definition: tot.h:241
uint _trajectoryLength
Definition: tot.h:357
uint _currentSecondaryTrajectoryIndex
Definition: tot.h:365
uint _oldposx
Definition: tot.h:305
byte * _curCharacterAnimationFrame
Definition: tot.h:430
Common::String _oldInventoryObjectName
Definition: tot.h:327
Route _mainRoute
Definition: tot.h:347
byte _iframe
Definition: tot.h:417
uint16 _firstList[5]
Definition: tot.h:410
Common::String getGameId() const
byte _gamePart
Definition: tot.h:268
byte _movementGridForSecondaryAnim[10][10]
Definition: tot.h:379
byte _doorIndex
Definition: tot.h:264
byte _actionCode
Definition: tot.h:252
uint _backpackObjectCode
Definition: tot.h:301
byte * _curSecondaryAnimationFrame
Definition: tot.h:434
Common::Point _trajectory[300]
Definition: tot.h:352
uint _dirtyMainSpriteX2
Definition: tot.h:471
Common::String _characterName
Definition: tot.h:332
byte _charFacingDirection
Definition: tot.h:292
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave=false) override
uint32 getRandomNumber(uint maxNum)
Definition: tot.h:487
byte * _inventoryIconBitmaps[kInventoryIconCount]
Definition: tot.h:237
byte _maskMouseSecondaryAnim[10][10]
Definition: tot.h:391
Common::Error loadGameStream(Common::SeekableReadStream *stream) override
byte * _backgroundCopy
Definition: tot.h:448
byte _currentZone
Definition: tot.h:369
byte _maskGridSecondaryAnim[10][10]
Definition: tot.h:387
int _element1
Definition: tot.h:310
uint _oldGridX
Definition: tot.h:459
Language
Definition: language.h:45