ScummVM
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)
 
GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
const Graphics::PixelFormatgetPixelFormat () const
 
 GobEngine (OSystem *syst)
 
virtual ~GobEngine ()
 
void initGame (const GOBGameDescription *gd)
 
- 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 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 void initKeymap ()
 
virtual void deinitKeymap ()
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
virtual Common::Error loadGameState (int slot)
 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)
 Save a game state. More...
 
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
 

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
 
GobConsole_console
 
bool _resourceSizeWorkaround
 
Global_global
 
Util_util
 
DataIO_dataIO
 
Game_game
 
Sound_sound
 
Video_video
 
Draw_draw
 
Goblin_goblin
 
Init_init
 
Map_map
 
Mult_mult
 
PalAnim_palAnim
 
Scenery_scenery
 
Inter_inter
 
SaveLoad_saveLoad
 
VideoPlayer_vidPlayer
 
PreGob_preGob
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Static Public Attributes

static const Common::Language _gobToScummVMLang []
 

Private Member Functions

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

Definition at line 155 of file gob.cpp.

Member Function Documentation

◆ deinitGameParts()

void Gob::GobEngine::deinitGameParts ( )
private

Definition at line 678 of file gob.cpp.

◆ getDebugger()

GUI::Debugger* Gob::GobEngine::getDebugger ( )
inlinevirtual

Return the engine's debugger instance, if any.

Used by error() to invoke the debugger when a severe error is reported.

Reimplemented from Engine.

Definition at line 260 of file gob.h.

◆ 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
privatevirtual

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 ( )
private

Definition at line 407 of file gob.cpp.

◆ initGraphics()

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

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)
privatevirtual

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 ( )
privatevirtual

Init the engine and start its main loop.

Returns
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 ( )
privatevirtual

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).

Note
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.
Todo:
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
private

Definition at line 178 of file gob.h.

◆ _features

int32 Gob::GobEngine::_features
private

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
private

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
static

◆ _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
private

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
private

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: