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

Protected Member Functions

Common::Error run ()
 Init the engine and start its main loop. More...
 
virtual bool hasFeature (EngineFeature f) const
 Misc Engine. More...
 
virtual DebuggergetDebugger ()
 Return the engine's debugger instance, if any. 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...
 

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

Definition at line 84 of file lastexpress.cpp.

Member Function Documentation

◆ backupEventHandlers()

void LastExpress::LastExpressEngine::backupEventHandlers ( )

Event Handling.

Definition at line 281 of file lastexpress.cpp.

◆ getCursor()

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

Definition at line 85 of file lastexpress.h.

◆ getDebugger()

virtual Debugger* LastExpress::LastExpressEngine::getDebugger ( )
inlineprotectedvirtual

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 75 of file lastexpress.h.

◆ getFont()

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

Definition at line 86 of file lastexpress.h.

◆ getFrameCounter()

uint32 LastExpress::LastExpressEngine::getFrameCounter ( ) const

Definition at line 161 of file lastexpress.cpp.

◆ getGameLogic()

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

Definition at line 87 of file lastexpress.h.

◆ getGameMenu()

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

Definition at line 88 of file lastexpress.h.

◆ getGraphicsManager()

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

Definition at line 91 of file lastexpress.h.

◆ getRandom()

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

Definition at line 82 of file lastexpress.h.

◆ getResourceManager()

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

Definition at line 92 of file lastexpress.h.

◆ getSceneManager()

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

Definition at line 93 of file lastexpress.h.

◆ getSoundManager()

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

Definition at line 94 of file lastexpress.h.

◆ handleEvents()

bool LastExpress::LastExpressEngine::handleEvents ( )

Definition at line 185 of file lastexpress.cpp.

◆ hasFeature()

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

Misc Engine.

Reimplemented from Engine.

Definition at line 318 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 166 of file lastexpress.cpp.

◆ restoreEventHandlers()

void LastExpress::LastExpressEngine::restoreEventHandlers ( )

Definition at line 289 of file lastexpress.cpp.

◆ run()

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

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 304 of file lastexpress.cpp.

Member Data Documentation

◆ _cursor

Cursor* LastExpress::LastExpressEngine::_cursor
private

Definition at line 119 of file lastexpress.h.

◆ _debugger

Debugger* LastExpress::LastExpressEngine::_debugger
private

Definition at line 115 of file lastexpress.h.

◆ _eventMouse

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

Definition at line 134 of file lastexpress.h.

◆ _eventMouseBackup

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

Definition at line 137 of file lastexpress.h.

◆ _eventTick

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

Definition at line 135 of file lastexpress.h.

◆ _eventTickBackup

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

Definition at line 138 of file lastexpress.h.

◆ _font

Font* LastExpress::LastExpressEngine::_font
private

Definition at line 120 of file lastexpress.h.

◆ _gameDescription

const ADGameDescription* LastExpress::LastExpressEngine::_gameDescription
private

Definition at line 111 of file lastexpress.h.

◆ _graphicsMan

GraphicsManager* LastExpress::LastExpressEngine::_graphicsMan
private

Definition at line 128 of file lastexpress.h.

◆ _lastFrameCount

uint32 LastExpress::LastExpressEngine::_lastFrameCount
private

Definition at line 125 of file lastexpress.h.

◆ _logic

Logic* LastExpress::LastExpressEngine::_logic
private

Definition at line 121 of file lastexpress.h.

◆ _menu

Menu* LastExpress::LastExpressEngine::_menu
private

Definition at line 122 of file lastexpress.h.

◆ _pixelFormat

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

Definition at line 112 of file lastexpress.h.

◆ _random

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

Definition at line 116 of file lastexpress.h.

◆ _resMan

ResourceManager* LastExpress::LastExpressEngine::_resMan
private

Definition at line 129 of file lastexpress.h.

◆ _sceneMan

SceneManager* LastExpress::LastExpressEngine::_sceneMan
private

Definition at line 130 of file lastexpress.h.

◆ _soundMan

SoundManager* LastExpress::LastExpressEngine::_soundMan
private

Definition at line 131 of file lastexpress.h.


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