ScummVM API documentation
MM::Xeen::XeenEngine Class Referenceabstract
Inheritance diagram for MM::Xeen::XeenEngine:
MM::MMEngine Engine MM::Xeen::SwordsOfXeen::SwordsOfXeenEngine MM::Xeen::WorldOfXeen::WorldOfXeenEngine

Public Member Functions

 XeenEngine (OSystem *syst, const MM::MightAndMagicGameDescription *gameDesc)
 
uint32 getSpecificGameId () const
 
uint32 getGameFeatures () const
 
int getRandomNumber (int maxNumber)
 
int getRandomNumber (int minNumber, int maxNumber)
 
bool shouldExit () const
 
bool isLoadPending () const
 
Common::Error loadGameState (int slot) override
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 
void syncSoundSettings () override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveAutosaveCurrently () override
 
virtual void showCutscene (const Common::String &name, int status, uint score)
 
virtual void dream ()=0
 
void saveSettings ()
 
void GUIError (const Common::U32String &msg)
 
- Public Member Functions inherited from MM::MMEngine
 MMEngine (OSystem *syst, const MM::MightAndMagicGameDescription *gameDesc)
 
bool hasFeature (EngineFeature f) const override
 
uint32 getFeatures () const
 
Common::Language getLanguage () const
 
Common::Platform getPlatform () const
 
uint32 getGameID () const
 
bool getIsCD () const
 
uint getRandomNumber (int max)
 
- Public Member Functions inherited from Engine
MetaEnginegetMetaEngine () const
 
void setMetaEngine (MetaEngine *metaEngine)
 
PauseToken pauseEngine ()
 
bool isPaused () const
 
void openMainMenuDialog ()
 
uint32 getTotalPlayTime () const
 
void setTotalPlayTime (uint32 time=0)
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
bool existExtractedCDAudioFiles (uint track=1)
 
bool isDataAndCDAudioReadFromSameCD ()
 
void warnMissingExtractedCDAudio ()
 
void handleAutoSave ()
 
void saveAutosaveIfEnabled ()
 
virtual int getAutosaveSlot () const
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 
virtual GUI::DebuggergetDebugger () final
 
void setDebugger (GUI::Debugger *debugger)
 
GUI::DebuggergetOrCreateDebugger ()
 
virtual void applyGameSettings ()
 
virtual void flipMute ()
 
virtual Common::String getSaveStateName (int slot) const
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

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 ()
 
static bool shouldQuit ()
 
static MetaEngineDetectiongetMetaEngineDetection ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 

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
 
CCArchive_xeenCc = nullptr
 
CCArchive_darkCc = nullptr
 
CCArchive_introCc = nullptr
 
SaveArchive_xeenSave = nullptr
 
SaveArchive_darkSave = nullptr
 
BaseCCArchive_currentArchive = nullptr
 
SaveArchive_currentSave = nullptr
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

virtual void showStartup ()=0
 
virtual void showMainMenu ()=0
 
virtual void playGame ()
 
virtual void death ()=0
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 

Protected Attributes

int _loadSaveSlot
 
- Protected Attributes inherited from MM::MMEngine
const MightAndMagicGameDescription_gameDescription
 
Common::RandomSource _randomSource
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 

Member Function Documentation

◆ showStartup()

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

Show the starting sequence/intro

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

◆ showMainMenu()

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

◆ playGame()

virtual void MM::Xeen::XeenEngine::playGame ( )
protectedvirtual

Play the game

◆ death()

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

◆ getSpecificGameId()

uint32 MM::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

◆ getGameFeatures()

uint32 MM::Xeen::XeenEngine::getGameFeatures ( ) const

Returns the game features

◆ getRandomNumber() [1/2]

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

Returns a random number

◆ getRandomNumber() [2/2]

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

Returns a random number

◆ shouldExit()

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

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

◆ isLoadPending()

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

Returns true if a savegame load is pending

◆ loadGameState()

Common::Error MM::Xeen::XeenEngine::loadGameState ( int  slot)
overridevirtual

Load a savegame

Reimplemented from Engine.

◆ saveGameState()

Common::Error MM::Xeen::XeenEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 
)
overridevirtual

Save the game

Reimplemented from Engine.

◆ syncSoundSettings()

void MM::Xeen::XeenEngine::syncSoundSettings ( )
overridevirtual

Updates sound settings

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool MM::Xeen::XeenEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Returns true if a savegame can currently be loaded

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool MM::Xeen::XeenEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Returns true if the game can currently be saved

Reimplemented from Engine.

◆ canSaveAutosaveCurrently()

bool MM::Xeen::XeenEngine::canSaveAutosaveCurrently ( )
overridevirtual

Returns true if an autosave can be created

Reimplemented from Engine.

◆ showCutscene()

virtual void MM::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 MM::Xeen::SwordsOfXeen::SwordsOfXeenEngine, and MM::Xeen::WorldOfXeen::WorldOfXeenEngine.

◆ dream()

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

◆ saveSettings()

void MM::Xeen::XeenEngine::saveSettings ( )

Saves engine settings

◆ GUIError()

void MM::Xeen::XeenEngine::GUIError ( const Common::U32String msg)

Show an error message in a GUI dialog


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