22 #ifndef TRECISION_TRECISION_H 23 #define TRECISION_TRECISION_H 25 #include "common/str-array.h" 26 #include "common/keyboard.h" 27 #include "common/str.h" 28 #include "common/serializer.h" 29 #include "common/stream.h" 30 #include "engines/advancedDetector.h" 31 #include "engines/engine.h" 32 #include "graphics/surface.h" 34 #include "trecision/defines.h" 35 #include "trecision/fastfile.h" 36 #include "trecision/struct.h" 37 #include "trecision/scheduler.h" 50 class AnimTypeManager;
57 #define SAVE_VERSION_ORIGINAL_MIN 102 58 #define SAVE_VERSION_ORIGINAL_MAX 109 59 #define SAVE_VERSION_SCUMMVM_MIN 110 60 #define SAVE_VERSION_SCUMMVM 110 62 #define MAXROOMS 100 // Game rooms 63 #define MAXOBJ 1400 // Game objects 64 #define MAXINVENTORY 150 // Inventory Items 65 #define MAXSAVEFILE 12 67 enum TrecisionGameId {
72 enum TrecisionMessageIds {
73 kMessageSavePosition = 9,
74 kMessageEmptySpot = 10,
75 kMessageLoadPosition = 11,
76 kMessageConfirmExit = 13,
77 kMessageDemoOver = 17,
106 void refreshInventory(uint8 startIcon, uint8 startLine);
107 void moveInventoryLeft();
108 void moveInventoryRight();
110 void rollInventory(uint8 status);
117 void processScriptFrame();
120 void processMouseMovement();
123 void doRoomIn(uint16 curObj);
124 void doRoomOut(uint16 curObj);
125 void doMouseExamine(uint16 curObj);
126 void doMouseOperate(uint16 curObj);
127 void doMouseTake(uint16 curObj);
129 void doScreenUseWithScreen();
133 void processCurrentMessage();
136 char *getNextSentence();
140 static bool isBetween(
int a,
int x,
int b);
143 bool canPlayerInteract();
149 TrecisionGameId _gameId;
152 uint16 _curScriptFrame[10];
168 TrecisionGameId getGameId()
const {
return _gameId; }
169 bool isDemo()
const {
return _gameDescription->flags &
ADGF_DEMO; }
170 bool isAmiga()
const {
return _gameDescription->platform == Common::kPlatformAmiga; }
183 void setInventoryStart(uint8 startIcon, uint8 startLine);
184 void showInventoryName(uint16 obj,
bool showhide);
187 int8 iconPos(uint8 icon);
188 void removeIcon(uint8 icon);
189 void addIcon(uint8 icon);
190 void replaceIcon(uint8 oldIcon, uint8 newIcon);
191 void openInventory();
192 void closeInventory();
193 void closeInventoryImmediately();
199 void playScript(uint16
id);
202 void startCharacterAction(uint16 action, uint16 newRoom, uint8 newPos, uint16 sent);
203 void doMouseTalk(uint16 curObj);
204 void changeRoom(uint16 room, uint16 action = 0, byte position = 0);
207 uint16 textLength(
const Common::String &text, uint16 begin = 0, uint16 end = 0);
208 Common::KeyCode waitKey();
209 void waitDelay(uint32 val);
213 float sinCosAngle(
float sinus,
float cosinus);
214 float dist2D(
float x1,
float y1,
float x2,
float y2);
215 float dist3D(
float x1,
float y1,
float z1,
float x2,
float y2,
float z2);
219 int getRoomObjectIndex(uint16 objectId);
220 int floatComp(
float f1,
float f2)
const;
229 void setObjectVisible(uint16 objectId,
bool visible);
230 void refreshObject(uint16 objectId);
231 bool isObjectVisible(uint16 objectId);
232 void setObjectAnim(uint16 objectId, uint16 animId);
237 void readExtraObj2C();
238 void readPositionerSnapshots();
246 bool _controlPanelSave =
false;
250 SRoom _room[MAXROOMS];
260 uint16 _curInventory;
265 uint8 _inventoryStatus;
267 uint8 _inventoryRefreshStartIcon;
268 uint8 _inventoryRefreshStartLine;
269 int16 _inventoryCounter;
270 bool _flagInventoryLocked;
271 uint8 _inventorySpeedIndex;
272 uint32 _inventoryScrollTime;
283 const char *_objName[MAXOBJNAME];
284 const char *_sentence[MAXSENTENCE];
285 const char *_sysText[MAXSYSTEXT];
295 bool _mouseMoved, _mouseLeftBtn, _mouseRightBtn;
296 Common::KeyCode _curKey;
298 bool _flagScriptActive;
300 uint16 _scriptFirstFrame[MAXSCRIPT];
318 bool _flagDialogActive;
319 bool _flagDialogMenuActive;
321 bool _flagPaintCharacter;
322 bool _flagShowCharacter;
323 bool _flagSomeoneSpeaks;
324 bool _flagCharacterSpeak;
325 bool _flagUseWithStarted;
326 bool _flagNoPaintScreen;
332 uint32 _characterSpeakTime;
338 uint32 _pauseStartTime;
341 uint8
static const defActionLen[hLAST + 1] = {
EngineFeature
Definition: engine.h:250
Definition: scheduler.h:34
Definition: fastfile.h:38
Definition: advancedDetector.h:120
Definition: trecision.h:99
Definition: animtype.h:38
Definition: serializer.h:79
Definition: renderer3d.h:41
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: trecision.h:172
Definition: animmanager.h:49
Definition: scheduler.h:55
Definition: pathfinding3d.h:89
Definition: graphics.h:36
Definition: trecision.h:94
Definition: trecision.h:87
Definition: list_intern.h:51
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: trecision.h:173
Definition: graphics.h:42
Add "-demo" to gameid.
Definition: advancedDetector.h:113