ScummVM
HDB::HDBGame Class Reference

#include <hdb.h>

Inheritance diagram for HDB::HDBGame:
Collaboration diagram for HDB::HDBGame:

Public Member Functions

 HDBGame (OSystem *syst, const ADGameDescription *gameDesc)
 
 ~HDBGame ()
 
virtual bool hasFeature (Engine::EngineFeature f) const
 Determine whether the engine supports the specified feature. More...
 
virtual void initializePath (const Common::FSNode &gamePath)
 Init SearchMan according to the game path. More...
 
virtual Common::Error run ()
 Init the engine and start its main loop. More...
 
const char * getGameId () const
 
const char * getGameFile () const
 
uint32 getGameFlags () const
 
Common::Platform getPlatform () const
 
bool isDemo () const
 
bool isPPC () const
 
bool isHandango () const
 
bool init ()
 
void save (Common::OutSaveFile *out)
 
void loadSaveFile (Common::InSaveFile *in)
 
void start ()
 
bool restartMap ()
 
bool startMap (const char *name)
 
void changeMap (const char *name)
 
virtual Common::Error saveGameState (int slot, const Common::String &desc)
 Save a game state. More...
 
virtual Common::Error loadGameState (int slot)
 Load a game state. More...
 
virtual bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
 
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
 
void saveGame (Common::OutSaveFile *out)
 
void loadGame (Common::InSaveFile *in)
 
Common::String genSaveFileName (uint slot, bool lua)
 
void saveWhenReady (int slot)
 
void loadWhenReady (int slot)
 
void setGameState (GameState gs)
 
GameState getGameState ()
 
void changeGameState ()
 
void paint ()
 
void moveMap (int x, int y)
 
void startMoveMap (int x, int y)
 
void setTargetXY (int x, int y)
 
void useEntity (AIEntity *e)
 
void setupProgressBar (int maxCount)
 
void drawProgressBar ()
 
void makeProgress ()
 
void checkProgress ()
 
void stopProgress ()
 
void drawLoadingScreen ()
 
int getActionMode ()
 
void setActionMode (int status)
 
void togglePause ()
 
bool getPause ()
 
void resetTimer ()
 
uint32 getTime ()
 
uint32 getTimeSlice ()
 
uint32 getTimeSliceDelta ()
 
const Common::StringgetTargetName ()
 
int getDebug ()
 
void setDebug (int flag)
 
bool isVoiceless ()
 
char * lastMapName ()
 
char * currentMapName ()
 
char * getInMapName ()
 
void setInMapName (const char *name)
 
void changeLevel (const char *name)
 
int32 getStarsMonkeystone7 ()
 
int32 getStarsMonkeystone14 ()
 
int32 getStarsMonkeystone21 ()
 
void setStarsMonkeystone7 (int32 value)
 
void setStarsMonkeystone14 (int32 value)
 
void setStarsMonkeystone21 (int32 value)
 
void setCheatingOn ()
 
bool getCheatingOn ()
 
- Public Member Functions inherited from Engine
void pauseEngine (bool pause)
 Pause or resume the engine. More...
 
bool isPaused () const
 Return whether the engine is currently paused or not. More...
 
void openMainMenuDialog ()
 Run the Global Main Menu Dialog. More...
 
uint32 getTotalPlayTime () const
 Get the total play time. More...
 
void setTotalPlayTime (uint32 time=0)
 Set the game time counter to the specified time. More...
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
void checkCD ()
 On some systems, check if the game appears to be run from CD. More...
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 Prepare an error string, which is printed by the error() function. More...
 
virtual GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
virtual void syncSoundSettings ()
 Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc. More...
 
virtual void initKeymap ()
 
virtual void deinitKeymap ()
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 

Public Attributes

const ADGameDescription_gameDescription
 
int _screenWidth
 
int _screenHeight
 
int _screenDrawWidth
 
int _screenDrawHeight
 
int _progressY
 
FileMan_fileMan
 
Gfx_gfx
 
LuaScript_lua
 
Map_map
 
AI_ai
 
Input_input
 
Menu_menu
 
Sound_sound
 
Window_window
 
Common::RandomSource_rnd
 
Save _saveHeader
 
bool _gameShutdown
 
Graphics::PixelFormat _format
 
Picture_progressGfx
 
Picture_progressMarkGfx
 
Picture_loadingScreenGfx
 
Picture_logoGfx
 
bool _progressActive
 
int _progressCurrent
 
int _progressXOffset
 
int _progressMax
 
Common::Array< uint32_frames
 
Common::OutSaveFile_currentOutSaveFile
 
Common::InSaveFile_currentInSaveFile
 
bool active
 
int slot
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Private Attributes

uint32 _timePlayed
 
uint32 _timeSlice
 
uint32 _prevTimeSlice
 
uint32 _timeSeconds
 
uint32 _tiempo
 
bool _systemInit
 
GameState _gameState
 
int _actionMode
 
bool _pauseFlag
 
bool _cheating
 
int _debugFlag
 
Tile_debugLogo
 
int _dx
 
int _dy
 
char _currentMapname [64]
 
char _lastMapname [64]
 
char _currentLuaName [64]
 
char _lastLuaName [64]
 
char _inMapName [32]
 
int32 _monkeystone7
 
int32 _monkeystone14
 
int32 _monkeystone21
 
bool _changeLevel
 
char _changeMapname [64]
 
struct {
   bool   active
 
   int   slot
 
_saveInfo
 
struct {
   bool   active
 
   int   slot
 
_loadInfo
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsJoystick
}
 A feature in this context means an ability of the engine which can be either available or not. More...
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 Request the engine to quit. More...
 
static bool shouldQuit ()
 Return whether the ENGINE should quit respectively should return to the launcher. More...
 
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Detailed Description

Definition at line 138 of file hdb.h.

Constructor & Destructor Documentation

◆ HDBGame()

HDB::HDBGame::HDBGame ( OSystem syst,
const ADGameDescription gameDesc 
)

Definition at line 46 of file hdb.cpp.

◆ ~HDBGame()

HDB::HDBGame::~HDBGame ( )

Definition at line 117 of file hdb.cpp.

Member Function Documentation

◆ canLoadGameStateCurrently()

bool HDB::HDBGame::canLoadGameStateCurrently ( )
virtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 86 of file saveload.cpp.

◆ canSaveGameStateCurrently()

bool HDB::HDBGame::canSaveGameStateCurrently ( )
virtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 35 of file saveload.cpp.

◆ changeGameState()

void HDB::HDBGame::changeGameState ( )

Definition at line 198 of file hdb.cpp.

◆ changeLevel()

void HDB::HDBGame::changeLevel ( const char *  name)
inline

Definition at line 295 of file hdb.h.

◆ changeMap()

void HDB::HDBGame::changeMap ( const char *  name)
inline

Definition at line 193 of file hdb.h.

◆ checkProgress()

void HDB::HDBGame::checkProgress ( )

Definition at line 825 of file hdb.cpp.

◆ currentMapName()

char* HDB::HDBGame::currentMapName ( )
inline

Definition at line 291 of file hdb.h.

◆ drawLoadingScreen()

void HDB::HDBGame::drawLoadingScreen ( )

Definition at line 836 of file hdb.cpp.

◆ drawProgressBar()

void HDB::HDBGame::drawProgressBar ( )

Definition at line 815 of file hdb.cpp.

◆ genSaveFileName()

Common::String HDB::HDBGame::genSaveFileName ( uint  slot,
bool  lua 
)

Definition at line 384 of file saveload.cpp.

◆ getActionMode()

int HDB::HDBGame::getActionMode ( )
inline

Definition at line 243 of file hdb.h.

◆ getCheatingOn()

bool HDB::HDBGame::getCheatingOn ( )
inline

Definition at line 314 of file hdb.h.

◆ getDebug()

int HDB::HDBGame::getDebug ( )
inline

Definition at line 278 of file hdb.h.

◆ getGameFile()

const char * HDB::HDBGame::getGameFile ( ) const

Definition at line 42 of file detection.cpp.

◆ getGameFlags()

uint32 HDB::HDBGame::getGameFlags ( ) const

Definition at line 46 of file detection.cpp.

◆ getGameId()

const char * HDB::HDBGame::getGameId ( ) const

Definition at line 39 of file detection.cpp.

◆ getGameState()

GameState HDB::HDBGame::getGameState ( )
inline

Definition at line 220 of file hdb.h.

◆ getInMapName()

char* HDB::HDBGame::getInMapName ( )
inline

Definition at line 292 of file hdb.h.

◆ getPause()

bool HDB::HDBGame::getPause ( )
inline

Definition at line 254 of file hdb.h.

◆ getPlatform()

Common::Platform HDB::HDBGame::getPlatform ( ) const

Definition at line 40 of file detection.cpp.

◆ getStarsMonkeystone14()

int32 HDB::HDBGame::getStarsMonkeystone14 ( )
inline

Definition at line 304 of file hdb.h.

◆ getStarsMonkeystone21()

int32 HDB::HDBGame::getStarsMonkeystone21 ( )
inline

Definition at line 305 of file hdb.h.

◆ getStarsMonkeystone7()

int32 HDB::HDBGame::getStarsMonkeystone7 ( )
inline

Definition at line 303 of file hdb.h.

◆ getTargetName()

const Common::String* HDB::HDBGame::getTargetName ( )
inline

Definition at line 274 of file hdb.h.

◆ getTime()

uint32 HDB::HDBGame::getTime ( )
inline

Definition at line 262 of file hdb.h.

◆ getTimeSlice()

uint32 HDB::HDBGame::getTimeSlice ( )
inline

Definition at line 266 of file hdb.h.

◆ getTimeSliceDelta()

uint32 HDB::HDBGame::getTimeSliceDelta ( )
inline

Definition at line 270 of file hdb.h.

◆ hasFeature()

bool HDB::HDBGame::hasFeature ( Engine::EngineFeature  f) const
virtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 202 of file detection.cpp.

◆ init()

bool HDB::HDBGame::init ( void  )

Definition at line 143 of file hdb.cpp.

◆ initializePath()

void HDB::HDBGame::initializePath ( const Common::FSNode gamePath)
virtual

Init SearchMan according to the game path.

By default it adds the directory in non-flat mode with a depth of 4 as priority 0 to SearchMan.

Parameters
gamePathThe base directory of the game data.

Reimplemented from Engine.

Definition at line 193 of file hdb.cpp.

◆ isDemo()

bool HDB::HDBGame::isDemo ( ) const

Definition at line 50 of file detection.cpp.

◆ isHandango()

bool HDB::HDBGame::isHandango ( ) const

Definition at line 58 of file detection.cpp.

◆ isPPC()

bool HDB::HDBGame::isPPC ( ) const

Definition at line 54 of file detection.cpp.

◆ isVoiceless()

bool HDB::HDBGame::isVoiceless ( )
inline

Definition at line 281 of file hdb.h.

◆ lastMapName()

char* HDB::HDBGame::lastMapName ( )
inline

Definition at line 290 of file hdb.h.

◆ loadGame()

void HDB::HDBGame::loadGame ( Common::InSaveFile in)

Definition at line 167 of file saveload.cpp.

◆ loadGameState()

Common::Error HDB::HDBGame::loadGameState ( int  slot)
virtual

Load a game state.

Parameters
slotthe slot from which a savestate should be loaded
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 90 of file saveload.cpp.

◆ loadSaveFile()

void HDB::HDBGame::loadSaveFile ( Common::InSaveFile in)

Definition at line 218 of file saveload.cpp.

◆ loadWhenReady()

void HDB::HDBGame::loadWhenReady ( int  slot)
inline

Definition at line 212 of file hdb.h.

◆ makeProgress()

void HDB::HDBGame::makeProgress ( )
inline

Definition at line 233 of file hdb.h.

◆ moveMap()

void HDB::HDBGame::moveMap ( int  x,
int  y 
)

Definition at line 546 of file hdb.cpp.

◆ paint()

void HDB::HDBGame::paint ( )

Definition at line 349 of file hdb.cpp.

◆ resetTimer()

void HDB::HDBGame::resetTimer ( )
inline

Definition at line 258 of file hdb.h.

◆ restartMap()

bool HDB::HDBGame::restartMap ( )

Definition at line 237 of file hdb.cpp.

◆ run()

Common::Error HDB::HDBGame::run ( )
virtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 892 of file hdb.cpp.

◆ save()

void HDB::HDBGame::save ( Common::OutSaveFile out)

Definition at line 208 of file saveload.cpp.

◆ saveGame()

void HDB::HDBGame::saveGame ( Common::OutSaveFile out)

Definition at line 133 of file saveload.cpp.

◆ saveGameState()

Common::Error HDB::HDBGame::saveGameState ( int  slot,
const Common::String desc 
)
virtual

Save a game state.

Parameters
slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 39 of file saveload.cpp.

◆ saveWhenReady()

void HDB::HDBGame::saveWhenReady ( int  slot)
inline

Definition at line 207 of file hdb.h.

◆ setActionMode()

void HDB::HDBGame::setActionMode ( int  status)
inline

Definition at line 246 of file hdb.h.

◆ setCheatingOn()

void HDB::HDBGame::setCheatingOn ( )
inline

Definition at line 311 of file hdb.h.

◆ setDebug()

void HDB::HDBGame::setDebug ( int  flag)
inline

Definition at line 279 of file hdb.h.

◆ setGameState()

void HDB::HDBGame::setGameState ( GameState  gs)
inline

Definition at line 217 of file hdb.h.

◆ setInMapName()

void HDB::HDBGame::setInMapName ( const char *  name)

Definition at line 879 of file hdb.cpp.

◆ setStarsMonkeystone14()

void HDB::HDBGame::setStarsMonkeystone14 ( int32  value)
inline

Definition at line 308 of file hdb.h.

◆ setStarsMonkeystone21()

void HDB::HDBGame::setStarsMonkeystone21 ( int32  value)
inline

Definition at line 309 of file hdb.h.

◆ setStarsMonkeystone7()

void HDB::HDBGame::setStarsMonkeystone7 ( int32  value)
inline

Definition at line 307 of file hdb.h.

◆ setTargetXY()

void HDB::HDBGame::setTargetXY ( int  x,
int  y 
)

Definition at line 389 of file hdb.cpp.

◆ setupProgressBar()

void HDB::HDBGame::setupProgressBar ( int  maxCount)

Definition at line 809 of file hdb.cpp.

◆ start()

void HDB::HDBGame::start ( )

Definition at line 231 of file hdb.cpp.

◆ startMap()

bool HDB::HDBGame::startMap ( const char *  name)

Definition at line 324 of file hdb.cpp.

◆ startMoveMap()

void HDB::HDBGame::startMoveMap ( int  x,
int  y 
)

Definition at line 541 of file hdb.cpp.

◆ stopProgress()

void HDB::HDBGame::stopProgress ( )
inline

Definition at line 238 of file hdb.h.

◆ togglePause()

void HDB::HDBGame::togglePause ( )
inline

Definition at line 250 of file hdb.h.

◆ useEntity()

void HDB::HDBGame::useEntity ( AIEntity e)

Definition at line 560 of file hdb.cpp.

Member Data Documentation

◆ _actionMode

int HDB::HDBGame::_actionMode
private

Definition at line 345 of file hdb.h.

◆ _ai

AI* HDB::HDBGame::_ai

Definition at line 174 of file hdb.h.

◆ _changeLevel

bool HDB::HDBGame::_changeLevel
private

Definition at line 366 of file hdb.h.

◆ _changeMapname

char HDB::HDBGame::_changeMapname[64]
private

Definition at line 367 of file hdb.h.

◆ _cheating

bool HDB::HDBGame::_cheating
private

Definition at line 349 of file hdb.h.

◆ _currentInSaveFile

Common::InSaveFile* HDB::HDBGame::_currentInSaveFile

Definition at line 331 of file hdb.h.

◆ _currentLuaName

char HDB::HDBGame::_currentLuaName[64]
private

Definition at line 357 of file hdb.h.

◆ _currentMapname

char HDB::HDBGame::_currentMapname[64]
private

Definition at line 354 of file hdb.h.

◆ _currentOutSaveFile

Common::OutSaveFile* HDB::HDBGame::_currentOutSaveFile

Definition at line 330 of file hdb.h.

◆ _debugFlag

int HDB::HDBGame::_debugFlag
private

Definition at line 350 of file hdb.h.

◆ _debugLogo

Tile* HDB::HDBGame::_debugLogo
private

Definition at line 351 of file hdb.h.

◆ _dx

int HDB::HDBGame::_dx
private

Definition at line 352 of file hdb.h.

◆ _dy

int HDB::HDBGame::_dy
private

Definition at line 352 of file hdb.h.

◆ _fileMan

FileMan* HDB::HDBGame::_fileMan

Definition at line 170 of file hdb.h.

◆ _format

Graphics::PixelFormat HDB::HDBGame::_format

Definition at line 320 of file hdb.h.

◆ _frames

Common::Array<uint32> HDB::HDBGame::_frames

Definition at line 328 of file hdb.h.

◆ _gameDescription

const ADGameDescription* HDB::HDBGame::_gameDescription

Definition at line 149 of file hdb.h.

◆ _gameShutdown

bool HDB::HDBGame::_gameShutdown

Definition at line 319 of file hdb.h.

◆ _gameState

GameState HDB::HDBGame::_gameState
private

Definition at line 344 of file hdb.h.

◆ _gfx

Gfx* HDB::HDBGame::_gfx

Definition at line 171 of file hdb.h.

◆ _inMapName

char HDB::HDBGame::_inMapName[32]
private

Definition at line 360 of file hdb.h.

◆ _input

Input* HDB::HDBGame::_input

Definition at line 175 of file hdb.h.

◆ _lastLuaName

char HDB::HDBGame::_lastLuaName[64]
private

Definition at line 358 of file hdb.h.

◆ _lastMapname

char HDB::HDBGame::_lastMapname[64]
private

Definition at line 355 of file hdb.h.

◆ _loadInfo

struct { ... } HDB::HDBGame::_loadInfo

◆ _loadingScreenGfx

Picture* HDB::HDBGame::_loadingScreenGfx

Definition at line 323 of file hdb.h.

◆ _logoGfx

Picture * HDB::HDBGame::_logoGfx

Definition at line 323 of file hdb.h.

◆ _lua

LuaScript* HDB::HDBGame::_lua

Definition at line 172 of file hdb.h.

◆ _map

Map* HDB::HDBGame::_map

Definition at line 173 of file hdb.h.

◆ _menu

Menu* HDB::HDBGame::_menu

Definition at line 176 of file hdb.h.

◆ _monkeystone14

int32 HDB::HDBGame::_monkeystone14
private

Definition at line 363 of file hdb.h.

◆ _monkeystone21

int32 HDB::HDBGame::_monkeystone21
private

Definition at line 364 of file hdb.h.

◆ _monkeystone7

int32 HDB::HDBGame::_monkeystone7
private

Definition at line 362 of file hdb.h.

◆ _pauseFlag

bool HDB::HDBGame::_pauseFlag
private

Definition at line 348 of file hdb.h.

◆ _prevTimeSlice

uint32 HDB::HDBGame::_prevTimeSlice
private

Definition at line 336 of file hdb.h.

◆ _progressActive

bool HDB::HDBGame::_progressActive

Definition at line 324 of file hdb.h.

◆ _progressCurrent

int HDB::HDBGame::_progressCurrent

Definition at line 325 of file hdb.h.

◆ _progressGfx

Picture* HDB::HDBGame::_progressGfx

Definition at line 322 of file hdb.h.

◆ _progressMarkGfx

Picture * HDB::HDBGame::_progressMarkGfx

Definition at line 322 of file hdb.h.

◆ _progressMax

int HDB::HDBGame::_progressMax

Definition at line 325 of file hdb.h.

◆ _progressXOffset

int HDB::HDBGame::_progressXOffset

Definition at line 325 of file hdb.h.

◆ _progressY

int HDB::HDBGame::_progressY

Definition at line 164 of file hdb.h.

◆ _rnd

Common::RandomSource* HDB::HDBGame::_rnd

Definition at line 181 of file hdb.h.

◆ _saveHeader

Save HDB::HDBGame::_saveHeader

Definition at line 318 of file hdb.h.

◆ _saveInfo

struct { ... } HDB::HDBGame::_saveInfo

◆ _screenDrawHeight

int HDB::HDBGame::_screenDrawHeight

Definition at line 163 of file hdb.h.

◆ _screenDrawWidth

int HDB::HDBGame::_screenDrawWidth

Definition at line 162 of file hdb.h.

◆ _screenHeight

int HDB::HDBGame::_screenHeight

Definition at line 161 of file hdb.h.

◆ _screenWidth

int HDB::HDBGame::_screenWidth

Definition at line 160 of file hdb.h.

◆ _sound

Sound* HDB::HDBGame::_sound

Definition at line 177 of file hdb.h.

◆ _systemInit

bool HDB::HDBGame::_systemInit
private

Definition at line 343 of file hdb.h.

◆ _tiempo

uint32 HDB::HDBGame::_tiempo
private

Definition at line 339 of file hdb.h.

◆ _timePlayed

uint32 HDB::HDBGame::_timePlayed
private

Definition at line 335 of file hdb.h.

◆ _timeSeconds

uint32 HDB::HDBGame::_timeSeconds
private

Definition at line 337 of file hdb.h.

◆ _timeSlice

uint32 HDB::HDBGame::_timeSlice
private

Definition at line 336 of file hdb.h.

◆ _window

Window* HDB::HDBGame::_window

Definition at line 178 of file hdb.h.

◆ active

bool HDB::HDBGame::active

Definition at line 370 of file hdb.h.

◆ slot

int HDB::HDBGame::slot

Definition at line 371 of file hdb.h.


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