ScummVM
Lure::LureEngine Class Reference

#include <lure.h>

Inheritance diagram for Lure::LureEngine:
Collaboration diagram for Lure::LureEngine:

Public Member Functions

 LureEngine (OSystem *system, const LureGameDescription *gameDesc)
 
 ~LureEngine ()
 
Common::Error init ()
 
Common::Error go ()
 
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 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 pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 
Diskdisk ()
 
Common::RandomSourcernd ()
 
int gameToLoad ()
 
bool loadGame (uint8 slotNumber)
 
bool saveGame (uint8 slotNumber, Common::String &caption)
 
Common::StringdetectSave (int slotNumber)
 
uint8 saveVersion ()
 
uint32 getFeatures () const
 
LureLanguage getLureLanguage () const
 
Common::Language getLanguage () const
 
Common::Platform getPlatform () const
 
virtual GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
bool isEGA () const
 
virtual Common::Error loadGameState (int slot)
 Load a game state. More...
 
virtual Common::Error saveGameState (int slot, const Common::String &desc)
 Save 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...
 
- 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...
 

Static Public Member Functions

static LureEnginegetReference ()
 
- 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...
 

Public Attributes

bool _saveLoadAllowed
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Private Member Functions

const char * generateSaveName (int slotNumber)
 

Private Attributes

bool _initialized
 
int _gameToLoad
 
uint8 _saveVersion
 
Disk_disk
 
Resources_resources
 
Screen_screen
 
Mouse_mouse
 
Events_events
 
Menu_menu
 
StringData_strings
 
Room_room
 
FightsManager_fights
 
Common::RandomSource _rnd
 
const LureGameDescription_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...
 
- 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 66 of file lure.h.

Constructor & Destructor Documentation

◆ LureEngine()

Lure::LureEngine::LureEngine ( OSystem system,
const LureGameDescription gameDesc 
)

Definition at line 42 of file lure.cpp.

◆ ~LureEngine()

Lure::LureEngine::~LureEngine ( )

Definition at line 102 of file lure.cpp.

Member Function Documentation

◆ canLoadGameStateCurrently()

virtual bool Lure::LureEngine::canLoadGameStateCurrently ( )
inlinevirtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 129 of file lure.h.

◆ canSaveGameStateCurrently()

virtual bool Lure::LureEngine::canSaveGameStateCurrently ( )
inlinevirtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 132 of file lure.h.

◆ detectSave()

Common::String * Lure::LureEngine::detectSave ( int  slotNumber)

Definition at line 261 of file lure.cpp.

◆ disk()

Disk& Lure::LureEngine::disk ( )
inline

Definition at line 106 of file lure.h.

◆ gameToLoad()

int Lure::LureEngine::gameToLoad ( )
inline

Definition at line 109 of file lure.h.

◆ generateSaveName()

const char * Lure::LureEngine::generateSaveName ( int  slotNumber)
private

Definition at line 181 of file lure.cpp.

◆ getDebugger()

GUI::Debugger * Lure::LureEngine::getDebugger ( )
virtual

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 251 of file lure.cpp.

◆ getFeatures()

uint32 Lure::LureEngine::getFeatures ( ) const

Definition at line 39 of file detection.cpp.

◆ getLanguage()

Common::Language Lure::LureEngine::getLanguage ( ) const

Definition at line 40 of file detection.cpp.

◆ getLureLanguage()

LureLanguage Lure::LureEngine::getLureLanguage ( ) const

Definition at line 43 of file detection.cpp.

◆ getPlatform()

Common::Platform Lure::LureEngine::getPlatform ( ) const

Definition at line 41 of file detection.cpp.

◆ getReference()

LureEngine & Lure::LureEngine::getReference ( )
static

Definition at line 122 of file lure.cpp.

◆ go()

Common::Error Lure::LureEngine::go ( )

Definition at line 126 of file lure.cpp.

◆ hasFeature()

bool Lure::LureEngine::hasFeature ( EngineFeature  f) const
virtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 243 of file detection.cpp.

◆ init()

Common::Error Lure::LureEngine::init ( void  )

Definition at line 53 of file lure.cpp.

◆ isEGA()

bool Lure::LureEngine::isEGA ( ) const
inline

Definition at line 120 of file lure.h.

◆ loadGame()

bool Lure::LureEngine::loadGame ( uint8  slotNumber)

Definition at line 212 of file lure.cpp.

◆ loadGameState()

virtual Common::Error Lure::LureEngine::loadGameState ( int  slot)
inlinevirtual

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 122 of file lure.h.

◆ pauseEngineIntern()

void Lure::LureEngine::pauseEngineIntern ( bool  pause)
virtual

Actual implementation of pauseEngine by subclasses.

See there for details.

Reimplemented from Engine.

Definition at line 171 of file lure.cpp.

◆ rnd()

Common::RandomSource& Lure::LureEngine::rnd ( )
inline

Definition at line 108 of file lure.h.

◆ run()

virtual Common::Error Lure::LureEngine::run ( )
inlinevirtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 95 of file lure.h.

◆ saveGame()

bool Lure::LureEngine::saveGame ( uint8  slotNumber,
Common::String caption 
)

Definition at line 188 of file lure.cpp.

◆ saveGameState()

virtual Common::Error Lure::LureEngine::saveGameState ( int  slot,
const Common::String desc 
)
inlinevirtual

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 125 of file lure.h.

◆ saveVersion()

uint8 Lure::LureEngine::saveVersion ( )
inline

Definition at line 113 of file lure.h.

◆ syncSoundSettings()

void Lure::LureEngine::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 255 of file lure.cpp.

Member Data Documentation

◆ _disk

Disk* Lure::LureEngine::_disk
private

Definition at line 71 of file lure.h.

◆ _events

Events* Lure::LureEngine::_events
private

Definition at line 75 of file lure.h.

◆ _fights

FightsManager* Lure::LureEngine::_fights
private

Definition at line 79 of file lure.h.

◆ _gameDescription

const LureGameDescription* Lure::LureEngine::_gameDescription
private

Definition at line 84 of file lure.h.

◆ _gameToLoad

int Lure::LureEngine::_gameToLoad
private

Definition at line 69 of file lure.h.

◆ _initialized

bool Lure::LureEngine::_initialized
private

Definition at line 68 of file lure.h.

◆ _menu

Menu* Lure::LureEngine::_menu
private

Definition at line 76 of file lure.h.

◆ _mouse

Mouse* Lure::LureEngine::_mouse
private

Definition at line 74 of file lure.h.

◆ _resources

Resources* Lure::LureEngine::_resources
private

Definition at line 72 of file lure.h.

◆ _rnd

Common::RandomSource Lure::LureEngine::_rnd
private

Definition at line 80 of file lure.h.

◆ _room

Room* Lure::LureEngine::_room
private

Definition at line 78 of file lure.h.

◆ _saveLoadAllowed

bool Lure::LureEngine::_saveLoadAllowed

Definition at line 90 of file lure.h.

◆ _saveVersion

uint8 Lure::LureEngine::_saveVersion
private

Definition at line 70 of file lure.h.

◆ _screen

Screen* Lure::LureEngine::_screen
private

Definition at line 73 of file lure.h.

◆ _strings

StringData* Lure::LureEngine::_strings
private

Definition at line 77 of file lure.h.


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