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 106 kActionCmdWalkObject = 3,
107 kActionCmdMoveObject = 4,
108 kActionCmdAnimObject = 5,
109 kActionCmdSetCameraPos = 7,
110 kActionCmdPlaySpeech = 8,
111 kActionCmdPlaySound = 10,
112 kActionCmdStartBackgroundSound = 11,
113 kActionCmdStopBackgroundSound = 12
118 kCondSceneObjectVerb = 2,
119 kCondBgObjectVerb = 3,
120 kCondSceneObjectInventory = 4,
121 kCondBgObjectInventory = 5,
122 kCondHasInventoryItem = 6,
123 kCondHasNotInventoryItem = 7,
125 kCondIsNotGameVar = 9,
126 kCondIsPrevSceneNum = 10,
127 kCondIsCurrTalkObject = 11,
128 kCondIsDialogItem = 12,
129 kCondIsCameraNum = 13,
130 kCondIsNotPrevSceneNum = 14,
131 kCondDialogItem0 = 15,
132 kCondIsButtheadAtBgObject = 16,
133 kCondIsNotSceneVisited = 17,
134 kCondIsSceneVisited = 18,
135 kCondIsCameraNumTransition = 19
139 kActResAddInventoryItem = 1,
140 kActResRemoveInventoryItem = 2,
141 kActResSetGameVar = 3,
142 kActResUnsetGameVar = 4,
143 kActResStartDialog = 5,
144 kActResChangeScene = 6
148 kLeftButtonClicked = 1,
149 kRightButtonClicked = 2,
151 kRightButtonDown = 8,
152 kAnyButtonClicked = kLeftButtonClicked | kRightButtonClicked,
153 kAnyButtonDown = kLeftButtonDown | kRightButtonDown
161 int16 x, y, width, height;
170 int16 left, top, right, bottom;
182 int turnValue, turnCount, turnTicks;
192 sceneObjectDef =
nullptr;
209 int sceneObjectIndex;
223 int16 x, y, width, height;
232 const int kSnapshotSize = 23072;
233 const int kSceneObjectsCount = 64;
234 const int kSceneSoundsCount = 8;
235 const int kInventoryItemStatusCount = 50;
236 const int kDialogItemStatusCount = 50;
237 const int kGameVarsCount = 2000;
238 const int kSceneVisitedCount = 64;
240 const int kMainMenu = 44;
241 const int kCredits = 45;
243 const int kMaxDistance = 0xFFFFFF;
244 static const int8 kWalkTurnTbl[] = {
245 7, 9, 4, 8, 6, 10, 5, 11
256 void continueGameFromQuickSave();
257 void setNewSceneNum(
int newSceneNum);
262 bool isLoogieDemo()
const;
263 bool isLoogieAltDemo()
const;
274 #ifdef USE_TRANSLATION 289 int _mouseX, _mouseY;
291 Common::KeyCode _keyCode;
294 int _mouseCursorSpriteIndex;
304 int _activeItemIndex;
305 int _currTalkObjectIndex;
309 int _newSceneNum, _prevSceneNum, _currSceneNum;
310 int _playVideoNumber;
312 int _dialogSlotCount;
313 byte _dialogItemStatus[kDialogItemStatusCount];
315 byte _gameVars[kGameVarsCount];
316 byte _sceneVisited[kSceneVisitedCount];
320 int _currInventoryItem;
321 byte _inventoryItemStatus[kInventoryItemStatusCount];
322 int _inventoryButtonIndex;
325 uint32 _currActionCommandTimeStamp;
326 int _currActionCommandIndex;
336 byte _backgroundSoundsActive[kSceneSoundsCount];
343 int _walkableRectsCount;
349 WalkArea *_sourceWalkArea, *_destWalkArea;
350 Common::Point _sourceWalkAreaPt, _destWalkAreaPt, _finalWalkPt;
351 int _currWalkDistance;
352 bool _walkReachedDestArea;
358 char _easterEggInput[7];
361 int getRandom(
int max);
363 void drawDebugInfo();
369 bool evalCameraCondition(
Conditions &conditions,
int value);
370 int evalDialogCondition(
Conditions &conditions);
373 void updateBackgroundSounds();
375 void loadScene(
int sceneNum);
376 void initScene(
bool sounds);
380 void buildDrawList(
DrawList &drawList);
383 void updateDialog(
bool clicked);
384 void updateInventory(
bool clicked);
385 void updateScene(
bool clicked);
388 bool processCurrAction();
389 void skipCurrAction();
393 void updateWalkableRects();
401 WalkInfo *addWalkInfo(int16 x, int16 y,
int delta,
int direction, int16 midPtX, int16 midPtY,
int walkAreaIndex);
405 void canWalkToDest(
WalkArea *walkArea,
int infoCount);
407 void walkFindPath(
WalkArea *sourceWalkArea,
int infoCount);
409 void walkFoundPath(
int count);
411 void updateSceneObjectsTurnValue();
412 void updateDialogConditions();
414 void playSpeech(
int soundNum);
417 void playSound(uint soundNum,
bool loop =
false);
418 void stopSound(uint soundNum);
421 bool runMinigame(
int minigameNum);
422 void playVideo(
int videoNum);
425 void checkEasterEgg(
char key);
429 enum kReadSaveHeaderError {
431 kRSHEInvalidType = 1,
432 kRSHEInvalidVersion = 2,
453 void savegame(
const char *filename,
const char *description);
454 void loadgame(
const char *filename);
455 bool existsSavegame(
int num);
459 void allocSnapshot();
463 void writeContinueSavegame();
469 #endif // BBVS_BBVS_H
EngineFeature
Definition: engine.h:253
Definition: graphics.h:38
Definition: graphics.h:43
Definition: advancedDetector.h:163
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: bbvs.h:450
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: bbvs.h:449
Definition: spritemodule.h:47
Definition: atari-screen.h:60
uint32 CustomEventType
Definition: events.h:193
Definition: gamemodule.h:55
Definition: gamemodule.h:70
int getAutosaveSlot() const override
Definition: bbvs.h:270
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