ScummVM
Xeen::XeenEngine Class Referenceabstract

#include <xeen.h>

Inheritance diagram for Xeen::XeenEngine:
Collaboration diagram for Xeen::XeenEngine:

Classes

struct  ExtendedOptions
 Container to a set of options newly introduced under ScummVM. More...
 

Public Member Functions

 XeenEngine (OSystem *syst, const XeenGameDescription *gameDesc)
 
virtual ~XeenEngine ()
 
uint32 getFeatures () const
 Returns the features. More...
 
Common::Language getLanguage () const
 Returns the game language. More...
 
Common::Platform getPlatform () const
 Returns the game's platform. More...
 
uint32 getGameID () const
 Gets the game Id. More...
 
uint32 getSpecificGameId () const
 Returns the game Id, but with a reuslt of Clouds or Dark Side for World of Xeen, depending on which side the player is currently on. More...
 
uint32 getGameFeatures () const
 Returns the game features. More...
 
bool getIsCD () const
 Returns true if the game is the CD version. More...
 
int getRandomNumber (int maxNumber)
 Returns a random number. More...
 
int getRandomNumber (int minNumber, int maxNumber)
 Returns a random number. More...
 
bool shouldExit () const
 Returns true if the game should be exited (either quitting, exiting to the main menu, or loading a savegame) More...
 
bool isLoadPending () const
 Returns true if a savegame load is pending. More...
 
virtual Common::Error loadGameState (int slot)
 Load a savegame. More...
 
virtual Common::Error saveGameState (int slot, const Common::String &desc)
 Save the game. More...
 
virtual void syncSoundSettings ()
 Updates sound settings. More...
 
virtual bool canLoadGameStateCurrently ()
 Returns true if a savegame can currently be loaded. More...
 
virtual bool canSaveGameStateCurrently ()
 Returns true if the game can currently be saved. More...
 
virtual void showCutscene (const Common::String &name, int status, uint score)
 Show a cutscene. More...
 
virtual void dream ()=0
 Dream sequence. More...
 
void saveSettings ()
 Saves engine settings. More...
 
void GUIError (const Common::String &msg)
 Show an error message in a GUI dialog. More...
 
void autoSaveCheck (int &lastSaveTime)
 Checks if an auto save should be done, and if so, takes care of it. 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 GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. 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 Common::String printMil (uint value)
 
static Common::String printK (uint value)
 
static Common::String printK2 (uint value)
 
- 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

Combat_combat
 
Debugger_debugger
 
EventsManager_events
 
FileManager_files
 
Interface_interface
 
LocationManager_locations
 
Map_map
 
Party_party
 
Patcher_patcher
 
Resources_resources
 
SavesManager_saves
 
Screen_screen
 
Scripts_scripts
 
Sound_sound
 
Spells_spells
 
Windows_windows
 
Mode _mode
 
GameMode _gameMode
 
bool _noDirectionSense
 
bool _startupWindowActive
 
uint _endingScore
 
bool _gameWon [3]
 
uint _finalScore
 
ExtendedOptions _extOptions
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

virtual void showStartup ()=0
 Show the starting sequence/intro. More...
 
virtual void showMainMenu ()=0
 Show the startup menu. More...
 
virtual void playGame ()
 Play the game. More...
 
virtual void death ()=0
 Death cutscene. 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...
 

Protected Attributes

int _loadSaveSlot
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Private Member Functions

bool initialize ()
 Initializes all the engine sub-objects. More...
 
void loadSettings ()
 Load settings. More...
 
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...
 
void outerGameLoop ()
 Outer gameplay loop responsible for dispatching control to game-specific intros, main menus, or to play the actual game. More...
 
void gameLoop ()
 Inner game loop. More...
 
void play ()
 Plays the actual game. More...
 

Private Attributes

const XeenGameDescription_gameDescription
 
Common::RandomSource _randomSource
 

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

Detailed Description

Definition at line 109 of file xeen.h.

Constructor & Destructor Documentation

◆ XeenEngine()

Xeen::XeenEngine::XeenEngine ( OSystem syst,
const XeenGameDescription gameDesc 
)

Definition at line 36 of file xeen.cpp.

◆ ~XeenEngine()

Xeen::XeenEngine::~XeenEngine ( )
virtual

Definition at line 71 of file xeen.cpp.

Member Function Documentation

◆ autoSaveCheck()

void Xeen::XeenEngine::autoSaveCheck ( int lastSaveTime)

Checks if an auto save should be done, and if so, takes care of it.

Definition at line 329 of file xeen.cpp.

◆ canLoadGameStateCurrently()

bool Xeen::XeenEngine::canLoadGameStateCurrently ( )
virtual

Returns true if a savegame can currently be loaded.

Reimplemented from Engine.

Definition at line 195 of file xeen.cpp.

◆ canSaveGameStateCurrently()

bool Xeen::XeenEngine::canSaveGameStateCurrently ( )
virtual

Returns true if the game can currently be saved.

Reimplemented from Engine.

Definition at line 199 of file xeen.cpp.

◆ death()

virtual void Xeen::XeenEngine::death ( )
protectedpure virtual

◆ dream()

virtual void Xeen::XeenEngine::dream ( )
pure virtual

◆ gameLoop()

void Xeen::XeenEngine::gameLoop ( )
private

Inner game loop.

Definition at line 262 of file xeen.cpp.

◆ getFeatures()

uint32 Xeen::XeenEngine::getFeatures ( ) const

Returns the features.

Definition at line 60 of file detection.cpp.

◆ getGameFeatures()

uint32 Xeen::XeenEngine::getGameFeatures ( ) const

Returns the game features.

Definition at line 56 of file detection.cpp.

◆ getGameID()

uint32 Xeen::XeenEngine::getGameID ( ) const

Gets the game Id.

Definition at line 44 of file detection.cpp.

◆ getIsCD()

bool Xeen::XeenEngine::getIsCD ( ) const

Returns true if the game is the CD version.

Definition at line 72 of file detection.cpp.

◆ getLanguage()

Common::Language Xeen::XeenEngine::getLanguage ( ) const

Returns the game language.

Definition at line 64 of file detection.cpp.

◆ getPlatform()

Common::Platform Xeen::XeenEngine::getPlatform ( ) const

Returns the game's platform.

Definition at line 68 of file detection.cpp.

◆ getRandomNumber() [1/2]

int Xeen::XeenEngine::getRandomNumber ( int  maxNumber)

Returns a random number.

Definition at line 178 of file xeen.cpp.

◆ getRandomNumber() [2/2]

int Xeen::XeenEngine::getRandomNumber ( int  minNumber,
int  maxNumber 
)

Returns a random number.

Definition at line 182 of file xeen.cpp.

◆ getSpecificGameId()

uint32 Xeen::XeenEngine::getSpecificGameId ( ) const

Returns the game Id, but with a reuslt of Clouds or Dark Side for World of Xeen, depending on which side the player is currently on.

Definition at line 48 of file detection.cpp.

◆ GUIError()

void Xeen::XeenEngine::GUIError ( const Common::String msg)

Show an error message in a GUI dialog.

Definition at line 325 of file xeen.cpp.

◆ hasFeature()

bool Xeen::XeenEngine::hasFeature ( EngineFeature  f) const
privatevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 155 of file detection.cpp.

◆ initialize()

bool Xeen::XeenEngine::initialize ( )
private

Initializes all the engine sub-objects.

Definition at line 91 of file xeen.cpp.

◆ isLoadPending()

bool Xeen::XeenEngine::isLoadPending ( ) const
inline

Returns true if a savegame load is pending.

Definition at line 257 of file xeen.h.

◆ loadGameState()

Common::Error Xeen::XeenEngine::loadGameState ( int  slot)
virtual

Load a savegame.

Reimplemented from Engine.

Definition at line 190 of file xeen.cpp.

◆ loadSettings()

void Xeen::XeenEngine::loadSettings ( )
private

Load settings.

Definition at line 125 of file xeen.cpp.

◆ outerGameLoop()

void Xeen::XeenEngine::outerGameLoop ( )
private

Outer gameplay loop responsible for dispatching control to game-specific intros, main menus, or to play the actual game.

Definition at line 149 of file xeen.cpp.

◆ play()

void Xeen::XeenEngine::play ( )
private

Plays the actual game.

Definition at line 213 of file xeen.cpp.

◆ playGame()

void Xeen::XeenEngine::playGame ( )
protectedvirtual

Play the game.

Definition at line 204 of file xeen.cpp.

◆ printK()

Common::String Xeen::XeenEngine::printK ( uint  value)
static

Definition at line 296 of file xeen.cpp.

◆ printK2()

Common::String Xeen::XeenEngine::printK2 ( uint  value)
static

Definition at line 301 of file xeen.cpp.

◆ printMil()

Common::String Xeen::XeenEngine::printMil ( uint  value)
static

Definition at line 291 of file xeen.cpp.

◆ run()

Common::Error Xeen::XeenEngine::run ( )
privatevirtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 142 of file xeen.cpp.

◆ saveGameState()

Common::Error Xeen::XeenEngine::saveGameState ( int  slot,
const Common::String desc 
)
virtual

Save the game.

Reimplemented from Engine.

Definition at line 186 of file xeen.cpp.

◆ saveSettings()

void Xeen::XeenEngine::saveSettings ( )

Saves engine settings.

Definition at line 313 of file xeen.cpp.

◆ shouldExit()

bool Xeen::XeenEngine::shouldExit ( ) const
inline

Returns true if the game should be exited (either quitting, exiting to the main menu, or loading a savegame)

Definition at line 252 of file xeen.h.

◆ showCutscene()

virtual void Xeen::XeenEngine::showCutscene ( const Common::String name,
int  status,
uint  score 
)
inlinevirtual

Show a cutscene.

Parameters
nameName of cutscene
statusFor World of Xeen, Goober status
scoreFinal score

Reimplemented in Xeen::SwordsOfXeen::SwordsOfXeenEngine, and Xeen::WorldOfXeen::WorldOfXeenEngine.

Definition at line 290 of file xeen.h.

◆ showMainMenu()

virtual void Xeen::XeenEngine::showMainMenu ( )
protectedpure virtual

◆ showStartup()

virtual void Xeen::XeenEngine::showStartup ( )
protectedpure virtual

Show the starting sequence/intro.

Implemented in Xeen::SwordsOfXeen::SwordsOfXeenEngine, and Xeen::WorldOfXeen::WorldOfXeenEngine.

◆ syncSoundSettings()

void Xeen::XeenEngine::syncSoundSettings ( )
virtual

Updates sound settings.

Reimplemented from Engine.

Definition at line 306 of file xeen.cpp.

Member Data Documentation

◆ _combat

Combat* Xeen::XeenEngine::_combat

Definition at line 175 of file xeen.h.

◆ _debugger

Debugger* Xeen::XeenEngine::_debugger

Definition at line 176 of file xeen.h.

◆ _endingScore

uint Xeen::XeenEngine::_endingScore

Definition at line 195 of file xeen.h.

◆ _events

EventsManager* Xeen::XeenEngine::_events

Definition at line 177 of file xeen.h.

◆ _extOptions

ExtendedOptions Xeen::XeenEngine::_extOptions

Definition at line 198 of file xeen.h.

◆ _files

FileManager* Xeen::XeenEngine::_files

Definition at line 178 of file xeen.h.

◆ _finalScore

uint Xeen::XeenEngine::_finalScore

Definition at line 197 of file xeen.h.

◆ _gameDescription

const XeenGameDescription* Xeen::XeenEngine::_gameDescription
private

Definition at line 120 of file xeen.h.

◆ _gameMode

GameMode Xeen::XeenEngine::_gameMode

Definition at line 192 of file xeen.h.

◆ _gameWon

bool Xeen::XeenEngine::_gameWon[3]

Definition at line 196 of file xeen.h.

◆ _interface

Interface* Xeen::XeenEngine::_interface

Definition at line 179 of file xeen.h.

◆ _loadSaveSlot

int Xeen::XeenEngine::_loadSaveSlot
protected

Definition at line 153 of file xeen.h.

◆ _locations

LocationManager* Xeen::XeenEngine::_locations

Definition at line 180 of file xeen.h.

◆ _map

Map* Xeen::XeenEngine::_map

Definition at line 181 of file xeen.h.

◆ _mode

Mode Xeen::XeenEngine::_mode

Definition at line 191 of file xeen.h.

◆ _noDirectionSense

bool Xeen::XeenEngine::_noDirectionSense

Definition at line 193 of file xeen.h.

◆ _party

Party* Xeen::XeenEngine::_party

Definition at line 182 of file xeen.h.

◆ _patcher

Patcher* Xeen::XeenEngine::_patcher

Definition at line 183 of file xeen.h.

◆ _randomSource

Common::RandomSource Xeen::XeenEngine::_randomSource
private

Definition at line 121 of file xeen.h.

◆ _resources

Resources* Xeen::XeenEngine::_resources

Definition at line 184 of file xeen.h.

◆ _saves

SavesManager* Xeen::XeenEngine::_saves

Definition at line 185 of file xeen.h.

◆ _screen

Screen* Xeen::XeenEngine::_screen

Definition at line 186 of file xeen.h.

◆ _scripts

Scripts* Xeen::XeenEngine::_scripts

Definition at line 187 of file xeen.h.

◆ _sound

Sound* Xeen::XeenEngine::_sound

Definition at line 188 of file xeen.h.

◆ _spells

Spells* Xeen::XeenEngine::_spells

Definition at line 189 of file xeen.h.

◆ _startupWindowActive

bool Xeen::XeenEngine::_startupWindowActive

Definition at line 194 of file xeen.h.

◆ _windows

Windows* Xeen::XeenEngine::_windows

Definition at line 190 of file xeen.h.


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