Sword25::Sword25Engine Class Reference

#include <sword25.h>

Inheritance diagram for Sword25::Sword25Engine:
Collaboration diagram for Sword25::Sword25Engine:

Public Member Functions

 Sword25Engine (OSystem *syst, const ADGameDescription *gameDesc)
virtual ~Sword25Engine ()
uint32 getGameFlags () 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...

Public Attributes

const ADGameDescription_gameDescription
- Public Attributes inherited from Engine

Protected Member Functions

virtual Common::Error run ()
 Init the engine and start its main loop. More...
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...
void shutdown ()
- 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 Member Functions

Common::Error appStart ()
bool appMain ()
bool appEnd ()
bool loadPackages ()

Private Attributes


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 bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
- Protected Attributes inherited from Engine
const Common::String _targetName

Detailed Description

Definition at line 69 of file sword25.h.

Constructor & Destructor Documentation

◆ Sword25Engine()

Sword25::Sword25Engine::Sword25Engine ( OSystem syst,
const ADGameDescription gameDesc 

Definition at line 62 of file sword25.cpp.

◆ ~Sword25Engine()

Sword25::Sword25Engine::~Sword25Engine ( )

Definition at line 75 of file sword25.cpp.

Member Function Documentation

◆ appEnd()

bool Sword25::Sword25Engine::appEnd ( )

Definition at line 145 of file sword25.cpp.

◆ appMain()

bool Sword25::Sword25Engine::appMain ( )

Definition at line 136 of file sword25.cpp.

◆ appStart()

Common::Error Sword25::Sword25Engine::appStart ( )

Definition at line 97 of file sword25.cpp.

◆ getDebugger()

GUI::Debugger* Sword25::Sword25Engine::getDebugger ( )

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 89 of file sword25.h.

◆ getGameFlags()

uint32 Sword25::Sword25Engine::getGameFlags ( ) const

Definition at line 32 of file detection.cpp.

◆ hasFeature()

bool Sword25::Sword25Engine::hasFeature ( EngineFeature  f) const

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 197 of file sword25.cpp.

◆ loadPackages()

bool Sword25::Sword25Engine::loadPackages ( )

Definition at line 156 of file sword25.cpp.

◆ run()

Common::Error Sword25::Sword25Engine::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Implements Engine.

Definition at line 80 of file sword25.cpp.

◆ shutdown()

void Sword25::Sword25Engine::shutdown ( )

Member Data Documentation

◆ _console

Sword25Console* Sword25::Sword25Engine::_console

Definition at line 77 of file sword25.h.

◆ _gameDescription

const ADGameDescription* Sword25::Sword25Engine::_gameDescription

Definition at line 99 of file sword25.h.

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