ScummVM API documentation
Bbvs::BbvsEngine Class Reference
Inheritance diagram for Bbvs::BbvsEngine:
Engine

Classes

struct  SaveHeader
 

Public Types

enum  kReadSaveHeaderError { kRSHENoError = 0, kRSHEInvalidType = 1, kRSHEInvalidVersion = 2, kRSHEIoError = 3 }
 
- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 

Public Member Functions

 BbvsEngine (OSystem *syst, const ADGameDescription *gd)
 
void newGame ()
 
void continueGameFromQuickSave ()
 
void setNewSceneNum (int newSceneNum)
 
const Common::String getTargetName ()
 
bool isDemo () const
 
bool isLoogieDemo () const
 
bool isLoogieAltDemo () const
 
int getAutosaveSlot () const override
 
void updateEvents ()
 
int getRandom (int max)
 
void drawDebugInfo ()
 
void drawScreen ()
 
void updateGame ()
 
bool evalCondition (Conditions &conditions)
 
bool evalCameraCondition (Conditions &conditions, int value)
 
int evalDialogCondition (Conditions &conditions)
 
void evalActionResults (ActionResults &results)
 
void updateBackgroundSounds ()
 
void loadScene (int sceneNum)
 
void initScene (bool sounds)
 
bool changeScene ()
 
bool update (int mouseX, int mouseY, uint mouseButtons, Common::CustomEventType customAction)
 
void buildDrawList (DrawList &drawList)
 
void updateVerbs ()
 
void updateDialog (bool clicked)
 
void updateInventory (bool clicked)
 
void updateScene (bool clicked)
 
bool performActionCommand (ActionCommand *actionCommand)
 
bool processCurrAction ()
 
void skipCurrAction ()
 
void updateCommon ()
 
void updateWalkableRects ()
 
void startWalkObject (SceneObject *sceneObject)
 
void updateWalkObject (SceneObject *sceneObject)
 
void walkObject (SceneObject *sceneObject, const Common::Point &destPt, int walkSpeed)
 
void turnObject (SceneObject *sceneObject)
 
int rectSubtract (const Common::Rect &rect1, const Common::Rect &rect2, Common::Rect *outRects)
 
WalkInfoaddWalkInfo (int16 x, int16 y, int delta, int direction, int16 midPtX, int16 midPtY, int walkAreaIndex)
 
void initWalkAreas (SceneObject *sceneObject)
 
WalkAreagetWalkAreaAtPos (const Common::Point &pt)
 
bool canButtheadWalkToDest (const Common::Point &destPt)
 
void canWalkToDest (WalkArea *walkArea, int infoCount)
 
bool walkTestLineWalkable (const Common::Point &sourcePt, const Common::Point &destPt, WalkInfo *walkInfo)
 
void walkFindPath (WalkArea *sourceWalkArea, int infoCount)
 
int calcDistance (const Common::Point &pt1, const Common::Point &pt2)
 
void walkFoundPath (int count)
 
void updateSceneObjectsTurnValue ()
 
void updateDialogConditions ()
 
void playSpeech (int soundNum)
 
void stopSpeech ()
 
void playSound (uint soundNum, bool loop=false)
 
void stopSound (uint soundNum)
 
void stopSounds ()
 
bool runMinigame (int minigameNum)
 
void playVideo (int videoNum)
 
void runMainMenu ()
 
void checkEasterEgg (char key)
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error loadGameState (int slot) override
 
Common::Error saveGameState (int slot, const Common::String &description, bool isAutosave=false) override
 
void savegame (const char *filename, const char *description)
 
void loadgame (const char *filename)
 
bool existsSavegame (int num)
 
void allocSnapshot ()
 
void freeSnapshot ()
 
void saveSnapshot ()
 
void writeContinueSavegame ()
 
- Public Member Functions inherited from Engine
MetaEnginegetMetaEngine () const
 
void setMetaEngine (MetaEngine *metaEngine)
 
PauseToken pauseEngine ()
 
bool isPaused () const
 
void openMainMenuDialog ()
 
uint32 getTotalPlayTime () const
 
void setTotalPlayTime (uint32 time=0)
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
bool existExtractedCDAudioFiles (uint track=1)
 
bool isDataAndCDAudioReadFromSameCD ()
 
void warnMissingExtractedCDAudio ()
 
void handleAutoSave ()
 
void saveAutosaveIfEnabled ()
 
virtual bool canSaveAutosaveCurrently ()
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 
virtual GUI::DebuggergetDebugger () final
 
void setDebugger (GUI::Debugger *debugger)
 
GUI::DebuggergetOrCreateDebugger ()
 
bool enhancementEnabled (int32 cls)
 
virtual void syncSoundSettings ()
 
virtual void applyGameSettings ()
 
virtual void flipMute ()
 
virtual Common::String getSaveStateName (int slot) const
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Static Public Member Functions

static Common::String getSavegameFilename (const Common::String &target, int num)
 
static WARN_UNUSED_RESULT kReadSaveHeaderError readSaveHeader (Common::SeekableReadStream *in, SaveHeader &header, bool skipThumbnail=true)
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 
static bool shouldQuit ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 

Public Attributes

const ADGameDescription_gameDescription
 
Common::RandomSource_random
 
GameModule_gameModule
 
SpriteModule_spriteModule
 
SoundMan_sound
 
Screen_screen
 
int _bootSaveSlot
 
int _mouseX
 
int _mouseY
 
uint _mouseButtons
 
Common::KeyCode _keyCode
 
Common::CustomEventType _customAction
 
int _mouseCursorSpriteIndex
 
int _gameState
 
int _gameTicks
 
Common::Point _mousePos
 
Common::Point _verbPos
 
Common::Point _walkMousePos
 
int _activeItemType
 
int _activeItemIndex
 
int _currTalkObjectIndex
 
Common::Point _cameraPos
 
Common::Point _newCameraPos
 
int _newSceneNum
 
int _prevSceneNum
 
int _currSceneNum
 
int _playVideoNumber
 
int _dialogSlotCount
 
byte _dialogItemStatus [kDialogItemStatusCount]
 
byte _gameVars [kGameVarsCount]
 
byte _sceneVisited [kSceneVisitedCount]
 
int _currVerbNum
 
int _currInventoryItem
 
byte _inventoryItemStatus [kInventoryItemStatusCount]
 
int _inventoryButtonIndex
 
Action_currAction
 
uint32 _currActionCommandTimeStamp
 
int _currActionCommandIndex
 
Common::Array< Action * > _walkAreaActions
 
SceneObject _sceneObjects [kSceneObjectsCount]
 
Common::Array< SceneObjectAction_sceneObjectActions
 
SceneObject_buttheadObject
 
SceneObject_beavisObject
 
int _currCameraNum
 
byte _backgroundSoundsActive [kSceneSoundsCount]
 
Audio::SoundHandle _speechSoundHandle
 
int _walkAreasCount
 
WalkArea _walkAreas [80]
 
int _walkInfosCount
 
WalkInfo _walkInfos [256]
 
int _walkableRectsCount
 
Common::Rect _walkableRects [256]
 
Common::Rect _tempWalkableRects1 [256]
 
Common::Rect _tempWalkableRects2 [256]
 
WalkInfo_walkInfoPtrs [256]
 
WalkArea_sourceWalkArea
 
WalkArea_destWalkArea
 
Common::Point _sourceWalkAreaPt
 
Common::Point _destWalkAreaPt
 
Common::Point _finalWalkPt
 
int _currWalkDistance
 
bool _walkReachedDestArea
 
bool _hasSnapshot
 
byte * _snapshot
 
Common::SeekableMemoryWriteStream_snapshotStream
 
char _easterEggInput [7]
 
bool _isSaveAllowed
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

Common::Error run () override
 
bool hasFeature (EngineFeature f) const override
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 

Additional Inherited Members

- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 
int32 _activeEnhancements = kEnhGameBreakingBugFixes
 

Member Function Documentation

◆ run()

Common::Error Bbvs::BbvsEngine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ hasFeature()

bool Bbvs::BbvsEngine::hasFeature ( EngineFeature  f) const
overrideprotectedvirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ getAutosaveSlot()

int Bbvs::BbvsEngine::getAutosaveSlot ( ) const
inlineoverridevirtual

Disable support for ScummVM autosaves. This engine automatically saves to slot zero on every room change. The Continue button on the main menu loads this save.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool Bbvs::BbvsEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
inlineoverridevirtual

Indicate whether a game state can be loaded.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool Bbvs::BbvsEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
inlineoverridevirtual

Indicate whether a game state can be saved.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ loadGameState()

Common::Error Bbvs::BbvsEngine::loadGameState ( int  slot)
overridevirtual

Load a game state.

Parameters
slotThe slot from which a save state should be loaded.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ saveGameState()

Common::Error Bbvs::BbvsEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 
)
overridevirtual

Save a game state.

Parameters
slotThe slot into which the save state should be stored.
descDescription for the save state, entered by the user.
isAutosaveExpected to be true if an autosave is being created.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.


The documentation for this class was generated from the following file: