ScummVM API documentation
Ultima::Ultima4::Ultima4Engine Class Reference
Inheritance diagram for Ultima::Ultima4::Ultima4Engine:
Ultima::Shared::UltimaEngine Engine

Public Member Functions

 Ultima4Engine (OSystem *syst, const Ultima::UltimaGameDescription *gameDesc)
 
bool canLoadGameStateCurrently (bool isAutosave=false) override
 
bool canSaveGameStateCurrently (bool isAutosave=false) override
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 
Common::Error loadGameStream (Common::SeekableReadStream *stream) override
 
Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false) override
 
void setToJourneyOnwards ()
 
void quitGame ()
 
- Public Member Functions inherited from Ultima::Shared::UltimaEngine
 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
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
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 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)
 
void setGameToLoadSlot (int slot)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Public Attributes

Armors_armors
 
Codex_codex
 
Config_config
 
Context_context
 
Death_death
 
DialogueLoaders_dialogueLoaders
 
GameController_game
 
Items_items
 
MapLoaders_mapLoaders
 
Moongates_moongates
 
Music_music
 
ResponseParts_responseParts
 
SaveGame_saveGame
 
Screen_screen
 
Shrines_shrines
 
SoundManager_soundManager
 
Spells_spells
 
TileMaps_tileMaps
 
TileRules_tileRules
 
TileSets_tileSets
 
Weapons_weapons
 
Std::vector< Common::String_hawkwindText
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

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

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)
 
- Protected Attributes inherited from Ultima::Shared::UltimaEngine
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
 

Member Function Documentation

◆ run()

Common::Error Ultima::Ultima4::Ultima4Engine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ initialize()

bool Ultima::Ultima4::Ultima4Engine::initialize ( )
overrideprotectedvirtual

Initializes needed data for the engine

Reimplemented from Ultima::Shared::UltimaEngine.

◆ isDataRequired()

bool Ultima::Ultima4::Ultima4Engine::isDataRequired ( Common::Path folder,
int &  majorVersion,
int &  minorVersion 
)
overrideprotectedvirtual

Returns the data archive folder and version that's required

Reimplemented from Ultima::Shared::UltimaEngine.

◆ canLoadGameStateCurrently()

bool Ultima::Ultima4::Ultima4Engine::canLoadGameStateCurrently ( bool  isAutosave = false)
overridevirtual

Returns true if a savegame can be loaded

Implements Ultima::Shared::UltimaEngine.

◆ canSaveGameStateCurrently()

bool Ultima::Ultima4::Ultima4Engine::canSaveGameStateCurrently ( bool  isAutosave = false)
overridevirtual

Returns true if the game can be saved

Implements Ultima::Shared::UltimaEngine.

◆ saveGameState()

Common::Error Ultima::Ultima4::Ultima4Engine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 
)
overridevirtual

Save a game state.

Parameters
slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
isAutosaveExpected to be true if an autosave is being created
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

◆ loadGameStream()

Common::Error Ultima::Ultima4::Ultima4Engine::loadGameStream ( Common::SeekableReadStream stream)
overridevirtual

Load a game state.

Parameters
streamthe stream to load the savestate from
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

◆ saveGameStream()

Common::Error Ultima::Ultima4::Ultima4Engine::saveGameStream ( Common::WriteStream stream,
bool  isAutosave = false 
)
overridevirtual

Save a game state.

Parameters
streamThe write stream to save the savegame data to
isAutosaveExpected to be true if an autosave is being created
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

◆ setToJourneyOnwards()

void Ultima::Ultima4::Ultima4Engine::setToJourneyOnwards ( )

Specifies to load the previous save as the actual game starts. Used by the main menu when the Journey Onwards option is selected

◆ quitGame()

void Ultima::Ultima4::Ultima4Engine::quitGame ( )

Flags to quit the game


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