ScummVM
LastExpress::LastExpressEngine Class Reference

#include <lastexpress.h>

+ Inheritance diagram for LastExpress::LastExpressEngine:
+ Collaboration diagram for LastExpress::LastExpressEngine:

Public Member Functions

 LastExpressEngine (OSystem *syst, const ADGameDescription *gd)
 
 ~LastExpressEngine () override
 
Common::RandomSourcegetRandom ()
 
CursorgetCursor () const
 
FontgetFont () const
 
LogicgetGameLogic () const
 
MenugetGameMenu () const
 
GraphicsManagergetGraphicsManager () const
 
ResourceManagergetResourceManager () const
 
SceneManagergetSceneManager () const
 
SoundManagergetSoundManager () const
 
bool handleEvents ()
 
void pollEvents ()
 
void backupEventHandlers ()
 Event Handling. More...
 
void restoreEventHandlers ()
 
void setEventHandlers (EventHandler::EventFunction *eventMouse, EventHandler::EventFunction *eventTick)
 
bool isDemo () const
 
uint32 getFrameCounter () const
 
- 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 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 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)
 

Protected Member Functions

Common::Error run () override
 Init the engine and start its main loop. More...
 
bool hasFeature (EngineFeature f) const override
 Misc Engine. More...
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 

Private Attributes

const ADGameDescription_gameDescription
 
Graphics::PixelFormat _pixelFormat
 
Debugger_debugger
 
Common::RandomSource _random
 
Cursor_cursor
 
Font_font
 
Logic_logic
 
Menu_menu
 
uint32 _lastFrameCount
 
GraphicsManager_graphicsMan
 
ResourceManager_resMan
 
SceneManager_sceneMan
 
SoundManager_soundMan
 
EventHandler::EventFunction_eventMouse
 
EventHandler::EventFunction_eventTick
 
EventHandler::EventFunction_eventMouseBackup
 
EventHandler::EventFunction_eventTickBackup
 

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...
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 
- 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 70 of file lastexpress.h.

Constructor & Destructor Documentation

◆ LastExpressEngine()

LastExpress::LastExpressEngine::LastExpressEngine ( OSystem syst,
const ADGameDescription gd 
)

Definition at line 55 of file lastexpress.cpp.

◆ ~LastExpressEngine()

LastExpress::LastExpressEngine::~LastExpressEngine ( )
override

Definition at line 84 of file lastexpress.cpp.

Member Function Documentation

◆ backupEventHandlers()

void LastExpress::LastExpressEngine::backupEventHandlers ( )

Event Handling.

Definition at line 275 of file lastexpress.cpp.

◆ getCursor()

Cursor* LastExpress::LastExpressEngine::getCursor ( ) const
inline

Definition at line 84 of file lastexpress.h.

◆ getFont()

Font* LastExpress::LastExpressEngine::getFont ( ) const
inline

Definition at line 85 of file lastexpress.h.

◆ getFrameCounter()

uint32 LastExpress::LastExpressEngine::getFrameCounter ( ) const

Definition at line 162 of file lastexpress.cpp.

◆ getGameLogic()

Logic* LastExpress::LastExpressEngine::getGameLogic ( ) const
inline

Definition at line 86 of file lastexpress.h.

◆ getGameMenu()

Menu* LastExpress::LastExpressEngine::getGameMenu ( ) const
inline

Definition at line 87 of file lastexpress.h.

◆ getGraphicsManager()

GraphicsManager* LastExpress::LastExpressEngine::getGraphicsManager ( ) const
inline

Definition at line 90 of file lastexpress.h.

◆ getRandom()

Common::RandomSource& LastExpress::LastExpressEngine::getRandom ( )
inline

Definition at line 81 of file lastexpress.h.

◆ getResourceManager()

ResourceManager* LastExpress::LastExpressEngine::getResourceManager ( ) const
inline

Definition at line 91 of file lastexpress.h.

◆ getSceneManager()

SceneManager* LastExpress::LastExpressEngine::getSceneManager ( ) const
inline

Definition at line 92 of file lastexpress.h.

◆ getSoundManager()

SoundManager* LastExpress::LastExpressEngine::getSoundManager ( ) const
inline

Definition at line 93 of file lastexpress.h.

◆ handleEvents()

bool LastExpress::LastExpressEngine::handleEvents ( )

Definition at line 186 of file lastexpress.cpp.

◆ hasFeature()

bool LastExpress::LastExpressEngine::hasFeature ( EngineFeature  f) const
overrideprotectedvirtual

Misc Engine.

Reimplemented from Engine.

Definition at line 312 of file lastexpress.cpp.

◆ isDemo()

bool LastExpress::LastExpressEngine::isDemo ( ) const

Definition at line 256 of file detection.cpp.

◆ pollEvents()

void LastExpress::LastExpressEngine::pollEvents ( )

Definition at line 167 of file lastexpress.cpp.

◆ restoreEventHandlers()

void LastExpress::LastExpressEngine::restoreEventHandlers ( )

Definition at line 283 of file lastexpress.cpp.

◆ run()

Common::Error LastExpress::LastExpressEngine::run ( )
overrideprotectedvirtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 107 of file lastexpress.cpp.

◆ setEventHandlers()

void LastExpress::LastExpressEngine::setEventHandlers ( EventHandler::EventFunction eventMouse,
EventHandler::EventFunction eventTick 
)

Definition at line 298 of file lastexpress.cpp.

Member Data Documentation

◆ _cursor

Cursor* LastExpress::LastExpressEngine::_cursor
private

Definition at line 118 of file lastexpress.h.

◆ _debugger

Debugger* LastExpress::LastExpressEngine::_debugger
private

Definition at line 114 of file lastexpress.h.

◆ _eventMouse

EventHandler::EventFunction* LastExpress::LastExpressEngine::_eventMouse
private

Definition at line 133 of file lastexpress.h.

◆ _eventMouseBackup

EventHandler::EventFunction* LastExpress::LastExpressEngine::_eventMouseBackup
private

Definition at line 136 of file lastexpress.h.

◆ _eventTick

EventHandler::EventFunction* LastExpress::LastExpressEngine::_eventTick
private

Definition at line 134 of file lastexpress.h.

◆ _eventTickBackup

EventHandler::EventFunction* LastExpress::LastExpressEngine::_eventTickBackup
private

Definition at line 137 of file lastexpress.h.

◆ _font

Font* LastExpress::LastExpressEngine::_font
private

Definition at line 119 of file lastexpress.h.

◆ _gameDescription

const ADGameDescription* LastExpress::LastExpressEngine::_gameDescription
private

Definition at line 110 of file lastexpress.h.

◆ _graphicsMan

GraphicsManager* LastExpress::LastExpressEngine::_graphicsMan
private

Definition at line 127 of file lastexpress.h.

◆ _lastFrameCount

uint32 LastExpress::LastExpressEngine::_lastFrameCount
private

Definition at line 124 of file lastexpress.h.

◆ _logic

Logic* LastExpress::LastExpressEngine::_logic
private

Definition at line 120 of file lastexpress.h.

◆ _menu

Menu* LastExpress::LastExpressEngine::_menu
private

Definition at line 121 of file lastexpress.h.

◆ _pixelFormat

Graphics::PixelFormat LastExpress::LastExpressEngine::_pixelFormat
private

Definition at line 111 of file lastexpress.h.

◆ _random

Common::RandomSource LastExpress::LastExpressEngine::_random
private

Definition at line 115 of file lastexpress.h.

◆ _resMan

ResourceManager* LastExpress::LastExpressEngine::_resMan
private

Definition at line 128 of file lastexpress.h.

◆ _sceneMan

SceneManager* LastExpress::LastExpressEngine::_sceneMan
private

Definition at line 129 of file lastexpress.h.

◆ _soundMan

SoundManager* LastExpress::LastExpressEngine::_soundMan
private

Definition at line 130 of file lastexpress.h.


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