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)
 
void sayText (const Common::String &text, Common::TextToSpeechManager::Action action=Common::TextToSpeechManager::QUEUE_NO_REPEAT) const
 
void stopTextToSpeech () const
 
Common::U32String convertSpanishText (const Common::String &text) const
 
- 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
virtual void showHotspots (bool show)
 
MetaEngine * getMetaEngine () const
 
void setMetaEngine (MetaEngine *metaEngine)
 
PauseToken pauseEngine ()
 
bool isPaused () const
 
void openMainMenuDialog ()
 
uint32 getTotalPlayTime () const
 
void setTotalPlayTime (uint32 time=0)
 
Common::TimerManager * getTimerManager ()
 
Common::EventManager * getEventManager ()
 
Common::SaveFileManager * getSaveFileManager ()
 
bool existExtractedCDAudioFiles (uint track=1)
 
bool isDataAndCDAudioReadFromSameCD ()
 
void warnMissingExtractedCDAudio ()
 
void handleAutoSave ()
 
void saveAutosaveIfEnabled ()
 
virtual bool canSaveAutosaveCurrently ()
 
virtual int getAutosaveSlot () const
 
virtual bool gameTypeHasAddOns () const
 
virtual bool dirCanBeGameAddOn (const Common::FSDirectory &dir) const
 
virtual bool dirMustBeGameAddOn (const Common::FSDirectory &dir) const
 
Common::ErrorCode updateAddOns (const MetaEngine *metaEngine) 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::Debugger * getDebugger () final
 
void setDebugger (GUI::Debugger *debugger)
 
GUI::Debugger * getOrCreateDebugger ()
 
bool enhancementEnabled (int32 cls) const
 
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 bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static bool warnUserAboutUnsupportedAddOn (Common::String addOnName)
 
static void warnUserAboutTestingMode ()
 
static void errorAddingAddOnWithoutBaseGame (Common::String addOnName, Common::String gameId)
 
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
 
bool _mouseMoved
 
TTSLanguage _ttsLanguage
 
Common::CodePage _ttsTextEncoding
 
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)
 
virtual void getHotspotPositions (Common::Array< Graphics::HotspotInfo > &hotspots)
 
virtual void drawHotspots ()
 
virtual bool hotspotDirty () const
 

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
 
int32 _activeEnhancements = kEnhGameBreakingBugFixes
 
bool _showHotspots
 
bool _hotspotForceRedraw
 
bool _hotspotPrevCursorVisible
 

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

◆ sayText()

void MM::Xeen::XeenEngine::sayText ( const Common::String &  text,
Common::TextToSpeechManager::Action  action = Common::TextToSpeechManager::QUEUE_NO_REPEAT 
) const

Voice text with the text-to-speech system

◆ stopTextToSpeech()

void MM::Xeen::XeenEngine::stopTextToSpeech ( ) const

Stop the text-to-speech system's speech

◆ convertSpanishText()

Common::U32String MM::Xeen::XeenEngine::convertSpanishText ( const Common::String &  text) const

Convert text to a custom encoding for Spanish text

Parameters
textText to convert
Returns
Converted string

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