Gob::GobEngine Class Reference

#include <gob.h>

+ Inheritance diagram for Gob::GobEngine:
+ Collaboration diagram for Gob::GobEngine:

Public Member Functions

const char * getLangDesc (int16 language) const
void validateLanguage ()
void validateVideoMode (int16 videoMode)
void pauseGame ()
EndiannessMethod getEndiannessMethod () const
Endianness getEndianness () const
Common::Platform getPlatform () const
GameType getGameType () const
bool isCD () const
bool isEGA () const
bool hasAdLib () const
bool isSCNDemo () const
bool isBATDemo () const
bool is640x480 () const
bool is800x600 () const
bool isTrueColor () const
bool isDemo () const
bool hasResourceSizeWorkaround () const
bool isCurrentTot (const Common::String &tot) const
void setTrueColor (bool trueColor)
const Graphics::PixelFormatgetPixelFormat () const
 GobEngine (OSystem *syst)
 ~GobEngine () override
void initGame (const GOBGameDescription *gd)
- Public Member Functions inherited from Engine
 Engine (OSystem *syst)
virtual ~Engine ()
virtual void initializePath (const Common::FSNode &gamePath)
 Init SearchMan according to the game path. More...
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...
void setDebugger (GUI::Debugger *debugger)
 Sets the engine's debugger. More...
GUI::DebuggergetOrCreateDebugger ()
 Return the engine's debugger instance, or create one if none is present. More...
virtual void flipMute ()
 Flip mute all sound option. More...
virtual Common::String getSaveStateName (int slot) const
 Generates the savegame filename. More...
virtual Common::Error loadGameState (int slot)
 Load a game state. More...
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 Load a game state. More...
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
virtual bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
virtual Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 Save a game state. More...
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 Save a game state. More...
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
bool saveGameDialog ()
 Shows the ScummVM save dialog, allowing users to save their game. More...
bool loadGameDialog ()
 Shows the ScummVM Restore dialog, allowing users to load a game. More...
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...
void handleAutoSave ()
 Checks for whether it's time to do an autosave, and if so, does it. More...
void saveAutosaveIfEnabled ()
 Does an autosave immediately if autosaves are turned on. More...
virtual bool canSaveAutosaveCurrently ()
 Indicates whether an autosave can currently be saved. More...
virtual int getAutosaveSlot () const
 Returns the slot that should be used for autosaves. More...
bool shouldPerformAutoSave (int lastSaveTime)

Public Attributes

Common::RandomSource _rnd
Common::Language _language
uint16 _width
uint16 _height
uint8 _mode
Graphics::PixelFormat _pixelFormat
Common::String _startStk
Common::String _startTot
uint32 _demoIndex
bool _copyProtection
bool _noMusic
bool _resourceSizeWorkaround
- Public Attributes inherited from Engine

Static Public Attributes

static const Common::Language _gobToScummVMLang []

Private Member Functions

Common::Error run () override
 Init the engine and start its main loop. More...
bool hasFeature (EngineFeature f) const override
 Determine whether the engine supports the specified feature. More...
void pauseEngineIntern (bool pause) override
 Actual implementation of pauseEngine by subclasses. More...
void syncSoundSettings () override
 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...
Common::Error initGameParts ()
Common::Error initGraphics ()
void deinitGameParts ()

Private Attributes

GameType _gameType
int32 _features
Common::Platform _platform
EndiannessMethod _endiannessMethod
uint32 _pauseStart

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature { kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime }
 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 MetaEnginegetMetaEngine ()
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)
- Protected Attributes inherited from Engine
const Common::String _targetName

Detailed Description

Definition at line 172 of file gob.h.

Constructor & Destructor Documentation

◆ GobEngine()

Gob::GobEngine::GobEngine ( OSystem syst)

Definition at line 118 of file gob.cpp.

◆ ~GobEngine()

Gob::GobEngine::~GobEngine ( )

Definition at line 156 of file gob.cpp.

Member Function Documentation

◆ deinitGameParts()

void Gob::GobEngine::deinitGameParts ( )

Definition at line 678 of file gob.cpp.

◆ getEndianness()

Endianness Gob::GobEngine::getEndianness ( ) const

Definition at line 193 of file gob.cpp.

◆ getEndiannessMethod()

EndiannessMethod Gob::GobEngine::getEndiannessMethod ( ) const

Definition at line 189 of file gob.cpp.

◆ getGameType()

GameType Gob::GobEngine::getGameType ( ) const

Definition at line 206 of file gob.cpp.

◆ getLangDesc()

const char * Gob::GobEngine::getLangDesc ( int16  language) const

Definition at line 161 of file gob.cpp.

◆ getPixelFormat()

const Graphics::PixelFormat & Gob::GobEngine::getPixelFormat ( ) const

Definition at line 254 of file gob.cpp.

◆ getPlatform()

Common::Platform Gob::GobEngine::getPlatform ( ) const

Definition at line 202 of file gob.cpp.

◆ hasAdLib()

bool Gob::GobEngine::hasAdLib ( ) const

Definition at line 218 of file gob.cpp.

◆ hasFeature()

bool Gob::GobEngine::hasFeature ( EngineFeature  f) const

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 169 of file detection.cpp.

◆ hasResourceSizeWorkaround()

bool Gob::GobEngine::hasResourceSizeWorkaround ( ) const

Definition at line 246 of file gob.cpp.

◆ initGame()

void Gob::GobEngine::initGame ( const GOBGameDescription gd)

Definition at line 196 of file detection.cpp.

◆ initGameParts()

Common::Error Gob::GobEngine::initGameParts ( )

Definition at line 407 of file gob.cpp.

◆ initGraphics()

Common::Error Gob::GobEngine::initGraphics ( )

Definition at line 698 of file gob.cpp.

◆ is640x480()

bool Gob::GobEngine::is640x480 ( ) const

Definition at line 230 of file gob.cpp.

◆ is800x600()

bool Gob::GobEngine::is800x600 ( ) const

Definition at line 234 of file gob.cpp.

◆ isBATDemo()

bool Gob::GobEngine::isBATDemo ( ) const

Definition at line 226 of file gob.cpp.

◆ isCD()

bool Gob::GobEngine::isCD ( ) const

Definition at line 210 of file gob.cpp.

◆ isCurrentTot()

bool Gob::GobEngine::isCurrentTot ( const Common::String tot) const

Definition at line 250 of file gob.cpp.

◆ isDemo()

bool Gob::GobEngine::isDemo ( ) const

Definition at line 242 of file gob.cpp.

◆ isEGA()

bool Gob::GobEngine::isEGA ( ) const

Definition at line 214 of file gob.cpp.

◆ isSCNDemo()

bool Gob::GobEngine::isSCNDemo ( ) const

Definition at line 222 of file gob.cpp.

◆ isTrueColor()

bool Gob::GobEngine::isTrueColor ( ) const

Definition at line 238 of file gob.cpp.

◆ pauseEngineIntern()

void Gob::GobEngine::pauseEngineIntern ( bool  pause)

Actual implementation of pauseEngine by subclasses.

See there for details.

Reimplemented from Engine.

Definition at line 369 of file gob.cpp.

◆ pauseGame()

void Gob::GobEngine::pauseGame ( )

Definition at line 397 of file gob.cpp.

◆ run()

Common::Error Gob::GobEngine::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Implements Engine.

Definition at line 286 of file gob.cpp.

◆ setTrueColor()

void Gob::GobEngine::setTrueColor ( bool  trueColor)

Definition at line 258 of file gob.cpp.

◆ syncSoundSettings()

void Gob::GobEngine::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.

values accordingly. The default implementation sets the volume levels of all mixer sound types according to the config entries of the active domain. When overwriting, call the default implementation first, then adjust the volumes further (if required).

When setting volume levels, respect the "mute" config entry.
The volume for the plain sound type is reset to the maximum volume. If the engine can associate its own value for this type, it needs to overwrite this member and set it accordingly.
find a better name for this

Reimplemented from Engine.

Definition at line 388 of file gob.cpp.

◆ validateLanguage()

void Gob::GobEngine::validateLanguage ( )

Definition at line 167 of file gob.cpp.

◆ validateVideoMode()

void Gob::GobEngine::validateVideoMode ( int16  videoMode)

Definition at line 183 of file gob.cpp.

Member Data Documentation

◆ _console

GobConsole* Gob::GobEngine::_console

Definition at line 212 of file gob.h.

◆ _copyProtection

bool Gob::GobEngine::_copyProtection

Definition at line 209 of file gob.h.

◆ _dataIO

DataIO* Gob::GobEngine::_dataIO

Definition at line 218 of file gob.h.

◆ _demoIndex

uint32 Gob::GobEngine::_demoIndex

Definition at line 207 of file gob.h.

◆ _draw

Draw* Gob::GobEngine::_draw

Definition at line 222 of file gob.h.

◆ _endiannessMethod

EndiannessMethod Gob::GobEngine::_endiannessMethod

Definition at line 178 of file gob.h.

◆ _features

int32 Gob::GobEngine::_features

Definition at line 175 of file gob.h.

◆ _game

Game* Gob::GobEngine::_game

Definition at line 219 of file gob.h.

◆ _gameType

GameType Gob::GobEngine::_gameType

Definition at line 174 of file gob.h.

◆ _global

Global* Gob::GobEngine::_global

Definition at line 216 of file gob.h.

◆ _goblin

Goblin* Gob::GobEngine::_goblin

Definition at line 223 of file gob.h.

◆ _gobToScummVMLang

const Common::Language Gob::GobEngine::_gobToScummVMLang

◆ _height

uint16 Gob::GobEngine::_height

Definition at line 200 of file gob.h.

◆ _init

Init* Gob::GobEngine::_init

Definition at line 224 of file gob.h.

◆ _inter

Inter* Gob::GobEngine::_inter

Definition at line 229 of file gob.h.

◆ _language

Common::Language Gob::GobEngine::_language

Definition at line 198 of file gob.h.

◆ _map

Map* Gob::GobEngine::_map

Definition at line 225 of file gob.h.

◆ _mode

uint8 Gob::GobEngine::_mode

Definition at line 201 of file gob.h.

◆ _mult

Mult* Gob::GobEngine::_mult

Definition at line 226 of file gob.h.

◆ _noMusic

bool Gob::GobEngine::_noMusic

Definition at line 210 of file gob.h.

◆ _palAnim

PalAnim* Gob::GobEngine::_palAnim

Definition at line 227 of file gob.h.

◆ _pauseStart

uint32 Gob::GobEngine::_pauseStart

Definition at line 180 of file gob.h.

◆ _pixelFormat

Graphics::PixelFormat Gob::GobEngine::_pixelFormat

Definition at line 203 of file gob.h.

◆ _platform

Common::Platform Gob::GobEngine::_platform

Definition at line 176 of file gob.h.

◆ _preGob

PreGob* Gob::GobEngine::_preGob

Definition at line 232 of file gob.h.

◆ _resourceSizeWorkaround

bool Gob::GobEngine::_resourceSizeWorkaround

Definition at line 214 of file gob.h.

◆ _rnd

Common::RandomSource Gob::GobEngine::_rnd

Definition at line 196 of file gob.h.

◆ _saveLoad

SaveLoad* Gob::GobEngine::_saveLoad

Definition at line 230 of file gob.h.

◆ _scenery

Scenery* Gob::GobEngine::_scenery

Definition at line 228 of file gob.h.

◆ _sound

Sound* Gob::GobEngine::_sound

Definition at line 220 of file gob.h.

◆ _startStk

Common::String Gob::GobEngine::_startStk

Definition at line 205 of file gob.h.

◆ _startTot

Common::String Gob::GobEngine::_startTot

Definition at line 206 of file gob.h.

◆ _util

Util* Gob::GobEngine::_util

Definition at line 217 of file gob.h.

◆ _video

Video* Gob::GobEngine::_video

Definition at line 221 of file gob.h.

◆ _vidPlayer

VideoPlayer* Gob::GobEngine::_vidPlayer

Definition at line 231 of file gob.h.

◆ _width

uint16 Gob::GobEngine::_width

Definition at line 199 of file gob.h.

The documentation for this class was generated from the following files:
Definition: language.h:42
Definition: language.h:54
Definition: language.h:53
Definition: language.h:44
Definition: language.h:48
Definition: language.h:49
Definition: language.h:55
Definition: language.h:45
Definition: language.h:51
Definition: language.h:59
Definition: language.h:63