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 () override
Common::Error init ()
Common::Error go ()
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 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...
void pauseEngineIntern (bool pause) override
 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
bool isEGA () const
Common::Error loadGameState (int slot) override
 Load a game state. More...
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 Save a game state. More...
bool canLoadGameStateCurrently () override
 Indicates whether a game state can be loaded. More...
bool canSaveGameStateCurrently () override
 Indicates whether a game state can be saved. More...
- 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 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 Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 Save a game state. 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)

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

Private Member Functions

const char * generateSaveName (int slotNumber)

Private Attributes

bool _initialized
int _gameToLoad
uint8 _saveVersion
Common::RandomSource _rnd
const LureGameDescription_gameDescription

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

bool Lure::LureEngine::canLoadGameStateCurrently ( )

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 128 of file lure.h.

◆ canSaveGameStateCurrently()

bool Lure::LureEngine::canSaveGameStateCurrently ( )

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 131 of file lure.h.

◆ detectSave()

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

Definition at line 257 of file lure.cpp.

◆ disk()

Disk& Lure::LureEngine::disk ( )

Definition at line 106 of file lure.h.

◆ gameToLoad()

int Lure::LureEngine::gameToLoad ( )

Definition at line 109 of file lure.h.

◆ generateSaveName()

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

Definition at line 181 of file lure.cpp.

◆ getFeatures()

uint32 Lure::LureEngine::getFeatures ( ) const

Definition at line 40 of file detection.cpp.

◆ getLanguage()

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

Definition at line 41 of file detection.cpp.

◆ getLureLanguage()

LureLanguage Lure::LureEngine::getLureLanguage ( ) const

Definition at line 44 of file detection.cpp.

◆ getPlatform()

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

Definition at line 42 of file detection.cpp.

◆ getReference()

LureEngine & Lure::LureEngine::getReference ( )

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

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 276 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

Definition at line 119 of file lure.h.

◆ loadGame()

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

Definition at line 212 of file lure.cpp.

◆ loadGameState()

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

Load a game state.

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

Reimplemented from Engine.

Definition at line 121 of file lure.h.

◆ pauseEngineIntern()

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

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

Definition at line 108 of file lure.h.

◆ run()

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

Init the engine and start its main loop.

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

Common::Error Lure::LureEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 

Save a game state.

slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
isAutosaveExpected to be true if an autosave is being created
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 124 of file lure.h.

◆ saveVersion()

uint8 Lure::LureEngine::saveVersion ( )

Definition at line 113 of file lure.h.

◆ syncSoundSettings()

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

Member Data Documentation

◆ _disk

Disk* Lure::LureEngine::_disk

Definition at line 71 of file lure.h.

◆ _events

Events* Lure::LureEngine::_events

Definition at line 75 of file lure.h.

◆ _fights

FightsManager* Lure::LureEngine::_fights

Definition at line 79 of file lure.h.

◆ _gameDescription

const LureGameDescription* Lure::LureEngine::_gameDescription

Definition at line 84 of file lure.h.

◆ _gameToLoad

int Lure::LureEngine::_gameToLoad

Definition at line 69 of file lure.h.

◆ _initialized

bool Lure::LureEngine::_initialized

Definition at line 68 of file lure.h.

◆ _menu

Menu* Lure::LureEngine::_menu

Definition at line 76 of file lure.h.

◆ _mouse

Mouse* Lure::LureEngine::_mouse

Definition at line 74 of file lure.h.

◆ _resources

Resources* Lure::LureEngine::_resources

Definition at line 72 of file lure.h.

◆ _rnd

Common::RandomSource Lure::LureEngine::_rnd

Definition at line 80 of file lure.h.

◆ _room

Room* Lure::LureEngine::_room

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

Definition at line 70 of file lure.h.

◆ _screen

Screen* Lure::LureEngine::_screen

Definition at line 73 of file lure.h.

◆ _strings

StringData* Lure::LureEngine::_strings

Definition at line 77 of file lure.h.

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