ScummVM
TsAGE::TSageEngine Class Reference

#include <tsage.h>

Inheritance diagram for TsAGE::TSageEngine:
Collaboration diagram for TsAGE::TSageEngine:

Public Member Functions

 TSageEngine (OSystem *system, const tSageGameDescription *gameDesc)
 
 ~TSageEngine ()
 
virtual bool hasFeature (EngineFeature f) const
 Determine whether the engine supports the specified feature. More...
 
GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
const char * getGameId () const
 
uint32 getGameID () const
 
uint32 getFeatures () const
 
Common::String getPrimaryFilename () const
 
virtual Common::Error init ()
 
virtual Common::Error run ()
 Init the engine and start its main loop. More...
 
virtual bool canLoadGameStateCurrently ()
 Returns true if it is currently okay to restore a game. More...
 
virtual bool canSaveGameStateCurrently ()
 Returns true if it is currently okay to save the game. More...
 
virtual Common::Error loadGameState (int slot)
 Load the savegame at the specified slot index. More...
 
virtual Common::Error saveGameState (int slot, const Common::String &desc)
 Save the game to the given slot index, and with the given name. 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::String generateSaveName (int slot)
 Support method that generates a savegame name. More...
 
void initialize ()
 
void deinitialize ()
 
- 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...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 

Public Attributes

MemoryManager _memoryManager
 
Debugger_debugger
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Private Attributes

const tSageGameDescription_gameDescription
 

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 62 of file tsage.h.

Constructor & Destructor Documentation

◆ TSageEngine()

TsAGE::TSageEngine::TSageEngine ( OSystem system,
const tSageGameDescription gameDesc 
)

Definition at line 37 of file tsage.cpp.

◆ ~TSageEngine()

TsAGE::TSageEngine::~TSageEngine ( )

Definition at line 61 of file tsage.cpp.

Member Function Documentation

◆ canLoadGameStateCurrently()

bool TsAGE::TSageEngine::canLoadGameStateCurrently ( )
virtual

Returns true if it is currently okay to restore a game.

Reimplemented from Engine.

Definition at line 151 of file tsage.cpp.

◆ canSaveGameStateCurrently()

bool TsAGE::TSageEngine::canSaveGameStateCurrently ( )
virtual

Returns true if it is currently okay to save the game.

Reimplemented from Engine.

Definition at line 158 of file tsage.cpp.

◆ deinitialize()

void TsAGE::TSageEngine::deinitialize ( )

Definition at line 129 of file tsage.cpp.

◆ generateSaveName()

Common::String TsAGE::TSageEngine::generateSaveName ( int  slot)

Support method that generates a savegame name.

Parameters
slotSlot number

Definition at line 180 of file tsage.cpp.

◆ getDebugger()

GUI::Debugger* TsAGE::TSageEngine::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 72 of file tsage.h.

◆ getFeatures()

uint32 TsAGE::TSageEngine::getFeatures ( ) const

Definition at line 50 of file detection.cpp.

◆ getGameId()

const char * TsAGE::TSageEngine::getGameId ( ) const

Definition at line 42 of file detection.cpp.

◆ getGameID()

uint32 TsAGE::TSageEngine::getGameID ( ) const

Definition at line 46 of file detection.cpp.

◆ getPrimaryFilename()

Common::String TsAGE::TSageEngine::getPrimaryFilename ( ) const

Definition at line 54 of file detection.cpp.

◆ hasFeature()

bool TsAGE::TSageEngine::hasFeature ( EngineFeature  f) const
virtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 67 of file tsage.cpp.

◆ init()

Common::Error TsAGE::TSageEngine::init ( void  )
virtual

Definition at line 55 of file tsage.cpp.

◆ initialize()

void TsAGE::TSageEngine::initialize ( )

Definition at line 74 of file tsage.cpp.

◆ loadGameState()

Common::Error TsAGE::TSageEngine::loadGameState ( int  slot)
virtual

Load the savegame at the specified slot index.

Reimplemented from Engine.

Definition at line 165 of file tsage.cpp.

◆ run()

Common::Error TsAGE::TSageEngine::run ( )
virtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 137 of file tsage.cpp.

◆ saveGameState()

Common::Error TsAGE::TSageEngine::saveGameState ( int  slot,
const Common::String desc 
)
virtual

Save the game to the given slot index, and with the given name.

Reimplemented from Engine.

Definition at line 172 of file tsage.cpp.

◆ syncSoundSettings()

void TsAGE::TSageEngine::syncSoundSettings ( )
virtual

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 184 of file tsage.cpp.

Member Data Documentation

◆ _debugger

Debugger* TsAGE::TSageEngine::_debugger

Definition at line 71 of file tsage.h.

◆ _gameDescription

const tSageGameDescription* TsAGE::TSageEngine::_gameDescription
private

Definition at line 64 of file tsage.h.

◆ _memoryManager

MemoryManager TsAGE::TSageEngine::_memoryManager

Definition at line 70 of file tsage.h.


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