25 #include "audio/mixer.h" 27 #include "common/array.h" 28 #include "common/events.h" 29 #include "common/file.h" 30 #include "common/memstream.h" 31 #include "common/random.h" 32 #include "common/str.h" 33 #include "common/substream.h" 34 #include "common/system.h" 36 #include "engines/engine.h" 38 #include "bbvs/detection.h" 53 struct SceneObjectDef;
54 struct SceneObjectInit;
63 #define BBVS_SAVEGAME_VERSION 0 96 kActionCmdWalkObject = 3,
97 kActionCmdMoveObject = 4,
98 kActionCmdAnimObject = 5,
99 kActionCmdSetCameraPos = 7,
100 kActionCmdPlaySpeech = 8,
101 kActionCmdPlaySound = 10,
102 kActionCmdStartBackgroundSound = 11,
103 kActionCmdStopBackgroundSound = 12
108 kCondSceneObjectVerb = 2,
109 kCondBgObjectVerb = 3,
110 kCondSceneObjectInventory = 4,
111 kCondBgObjectInventory = 5,
112 kCondHasInventoryItem = 6,
113 kCondHasNotInventoryItem = 7,
115 kCondIsNotGameVar = 9,
116 kCondIsPrevSceneNum = 10,
117 kCondIsCurrTalkObject = 11,
118 kCondIsDialogItem = 12,
119 kCondIsCameraNum = 13,
120 kCondIsNotPrevSceneNum = 14,
121 kCondDialogItem0 = 15,
122 kCondIsButtheadAtBgObject = 16,
123 kCondIsNotSceneVisited = 17,
124 kCondIsSceneVisited = 18,
125 kCondIsCameraNumTransition = 19
129 kActResAddInventoryItem = 1,
130 kActResRemoveInventoryItem = 2,
131 kActResSetGameVar = 3,
132 kActResUnsetGameVar = 4,
133 kActResStartDialog = 5,
134 kActResChangeScene = 6
138 kLeftButtonClicked = 1,
139 kRightButtonClicked = 2,
141 kRightButtonDown = 8,
142 kAnyButtonClicked = kLeftButtonClicked | kRightButtonClicked,
143 kAnyButtonDown = kLeftButtonDown | kRightButtonDown
151 int16 x, y, width, height;
160 int16 left, top, right, bottom;
172 int turnValue, turnCount, turnTicks;
182 sceneObjectDef =
nullptr;
199 int sceneObjectIndex;
213 int16 x, y, width, height;
222 const int kSnapshotSize = 23072;
223 const int kSceneObjectsCount = 64;
224 const int kSceneSoundsCount = 8;
225 const int kInventoryItemStatusCount = 50;
226 const int kDialogItemStatusCount = 50;
227 const int kGameVarsCount = 2000;
228 const int kSceneVisitedCount = 64;
230 const int kMainMenu = 44;
231 const int kCredits = 45;
233 const int kMaxDistance = 0xFFFFFF;
234 static const int8 kWalkTurnTbl[] = {
235 7, 9, 4, 8, 6, 10, 5, 11
246 void continueGameFromQuickSave();
247 void setNewSceneNum(
int newSceneNum);
252 bool isLoogieDemo()
const;
253 bool isLoogieAltDemo()
const;
264 #ifdef USE_TRANSLATION 279 int _mouseX, _mouseY;
281 Common::KeyCode _keyCode;
283 int _mouseCursorSpriteIndex;
293 int _activeItemIndex;
294 int _currTalkObjectIndex;
298 int _newSceneNum, _prevSceneNum, _currSceneNum;
299 int _playVideoNumber;
301 int _dialogSlotCount;
302 byte _dialogItemStatus[kDialogItemStatusCount];
304 byte _gameVars[kGameVarsCount];
305 byte _sceneVisited[kSceneVisitedCount];
309 int _currInventoryItem;
310 byte _inventoryItemStatus[kInventoryItemStatusCount];
311 int _inventoryButtonIndex;
314 uint32 _currActionCommandTimeStamp;
315 int _currActionCommandIndex;
325 byte _backgroundSoundsActive[kSceneSoundsCount];
332 int _walkableRectsCount;
338 WalkArea *_sourceWalkArea, *_destWalkArea;
339 Common::Point _sourceWalkAreaPt, _destWalkAreaPt, _finalWalkPt;
340 int _currWalkDistance;
341 bool _walkReachedDestArea;
347 char _easterEggInput[7];
350 int getRandom(
int max);
352 void drawDebugInfo();
358 bool evalCameraCondition(
Conditions &conditions,
int value);
359 int evalDialogCondition(
Conditions &conditions);
362 void updateBackgroundSounds();
364 void loadScene(
int sceneNum);
365 void initScene(
bool sounds);
367 bool update(
int mouseX,
int mouseY, uint mouseButtons, Common::KeyCode keyCode);
369 void buildDrawList(
DrawList &drawList);
372 void updateDialog(
bool clicked);
373 void updateInventory(
bool clicked);
374 void updateScene(
bool clicked);
377 bool processCurrAction();
378 void skipCurrAction();
382 void updateWalkableRects();
390 WalkInfo *addWalkInfo(int16 x, int16 y,
int delta,
int direction, int16 midPtX, int16 midPtY,
int walkAreaIndex);
394 void canWalkToDest(
WalkArea *walkArea,
int infoCount);
396 void walkFindPath(
WalkArea *sourceWalkArea,
int infoCount);
398 void walkFoundPath(
int count);
400 void updateSceneObjectsTurnValue();
401 void updateDialogConditions();
403 void playSpeech(
int soundNum);
406 void playSound(uint soundNum,
bool loop =
false);
407 void stopSound(uint soundNum);
410 bool runMinigame(
int minigameNum);
411 void playVideo(
int videoNum);
414 void checkEasterEgg(
char key);
418 enum kReadSaveHeaderError {
420 kRSHEInvalidType = 1,
421 kRSHEInvalidVersion = 2,
442 void savegame(
const char *filename,
const char *description);
443 void loadgame(
const char *filename);
444 bool existsSavegame(
int num);
448 void allocSnapshot();
452 void writeContinueSavegame();
458 #endif // BBVS_BBVS_H
EngineFeature
Definition: engine.h:250
Definition: graphics.h:38
Definition: graphics.h:43
Definition: advancedDetector.h:120
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: bbvs.h:439
Definition: default_display_client.h:78
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: bbvs.h:438
Definition: spritemodule.h:47
Definition: gamemodule.h:55
Definition: gamemodule.h:70
int getAutosaveSlot() const override
Definition: bbvs.h:260
bool skipThumbnail(Common::SeekableReadStream &in)
int16 x
Definition: rect.h:46
int16 y
Definition: rect.h:47
Definition: gamemodule.h:105
Definition: gamemodule.h:87
Definition: gamemodule.h:45
Definition: gamemodule.h:132
Definition: memstream.h:155
Definition: gamemodule.h:59