ScummVM API documentation
Ultima::Shared::UltimaEngine Class Referenceabstract
Inheritance diagram for Ultima::Shared::UltimaEngine:
Engine Ultima::Nuvie::NuvieEngine Ultima::Shared::UltimaEarlyEngine Ultima::Ultima4::Ultima4Engine

Public Member Functions

 UltimaEngine (OSystem *syst, const Ultima::UltimaGameDescription *gameDesc)
 
bool hasFeature (EngineFeature f) const override
 
uint32 getFeatures () const
 
Common::Language getLanguage () const
 
GameId getGameId () const
 
bool isEnhanced () const
 
void GUIError (const Common::U32String &msg)
 
uint getRandomNumber (uint maxVal)
 
uint getRandomNumber (uint min, uint max)
 
Common::FSNode getGameDirectory () const
 
virtual bool canLoadGameStateCurrently (bool isAutosave)=0
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
virtual bool canSaveGameStateCurrently (bool isAutosave)=0
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
- 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 bool canSaveAutosaveCurrently ()
 
virtual int getAutosaveSlot () const
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 
virtual Common::Error run ()=0
 
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 ()
 
bool enhancementEnabled (int32 cls)
 
virtual void syncSoundSettings ()
 
virtual void applyGameSettings ()
 
virtual void flipMute ()
 
virtual Common::String getSaveStateName (int slot) const
 
virtual Common::Error loadGameState (int slot)
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Protected Member Functions

virtual bool initialize ()
 
virtual void deinitialize ()
 
virtual bool isDataRequired (Common::Path &folder, int &majorVersion, int &minorVersion)
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 

Protected Attributes

const UltimaGameDescription_gameDescription
 
Common::Archive_dataArchive
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 
int32 _activeEnhancements = kEnhGameBreakingBugFixes
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 
static bool shouldQuit ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Member Function Documentation

◆ initialize()

virtual bool Ultima::Shared::UltimaEngine::initialize ( )
protectedvirtual

Initializes needed data for the engine

Reimplemented in Ultima::Ultima4::Ultima4Engine, and Ultima::Nuvie::NuvieEngine.

◆ deinitialize()

virtual void Ultima::Shared::UltimaEngine::deinitialize ( )
inlineprotectedvirtual

Deinitialize the engine

◆ isDataRequired()

virtual bool Ultima::Shared::UltimaEngine::isDataRequired ( Common::Path folder,
int &  majorVersion,
int &  minorVersion 
)
inlineprotectedvirtual

Returns the data archive folder and version that's required

Reimplemented in Ultima::Ultima4::Ultima4Engine, and Ultima::Nuvie::NuvieEngine.

◆ hasFeature()

bool Ultima::Shared::UltimaEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Returns supported engine features

Reimplemented from Engine.

◆ getFeatures()

uint32 Ultima::Shared::UltimaEngine::getFeatures ( ) const

Returns game features

◆ getLanguage()

Common::Language Ultima::Shared::UltimaEngine::getLanguage ( ) const

Return the game's language

◆ getGameId()

GameId Ultima::Shared::UltimaEngine::getGameId ( ) const

Returns the game type being played

◆ isEnhanced()

bool Ultima::Shared::UltimaEngine::isEnhanced ( ) const
inline

Returns true if the game is running an enhanced version as compared to the original game

◆ GUIError()

void Ultima::Shared::UltimaEngine::GUIError ( const Common::U32String msg)

Show a message in a GUI dialog

◆ getRandomNumber() [1/2]

uint Ultima::Shared::UltimaEngine::getRandomNumber ( uint  maxVal)
inline

Get a random number

◆ getRandomNumber() [2/2]

uint Ultima::Shared::UltimaEngine::getRandomNumber ( uint  min,
uint  max 
)
inline

Gets a random number

◆ getGameDirectory()

Common::FSNode Ultima::Shared::UltimaEngine::getGameDirectory ( ) const

Returns a file system node for the game directory

◆ canLoadGameStateCurrently() [1/2]

virtual bool Ultima::Shared::UltimaEngine::canLoadGameStateCurrently ( bool  isAutosave)
pure virtual

Indicates whether a game state can be loaded.

Parameters
isAutosaveFlags whether it's an autosave check

Implemented in Ultima::Shared::UltimaEarlyEngine, Ultima::Ultima4::Ultima4Engine, and Ultima::Nuvie::NuvieEngine.

◆ canLoadGameStateCurrently() [2/2]

bool Ultima::Shared::UltimaEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
inlineoverridevirtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

◆ canSaveGameStateCurrently() [1/2]

virtual bool Ultima::Shared::UltimaEngine::canSaveGameStateCurrently ( bool  isAutosave)
pure virtual

Indicates whether a game state can be saved.

Parameters
isAutosaveFlags whether it's an autosave check

Implemented in Ultima::Shared::UltimaEarlyEngine, Ultima::Ultima4::Ultima4Engine, and Ultima::Nuvie::NuvieEngine.

◆ canSaveGameStateCurrently() [2/2]

bool Ultima::Shared::UltimaEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
inlineoverridevirtual

Indicates whether a game state can be saved.

Reimplemented from Engine.


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