ScummVM API documentation
Ultima::Ultima8::Ultima8Engine Class Reference
Inheritance diagram for Ultima::Ultima8::Ultima8Engine:
Engine

Public Member Functions

 Ultima8Engine (OSystem *syst, const Ultima::UltimaGameDescription *gameDesc)
 
void initializePath (const Common::FSNode &gamePath) override
 
bool hasFeature (EngineFeature f) const override
 
Common::Language getLanguage () const
 
bool setupGame ()
 
Common::Error startupGame ()
 
void changeVideoMode (int width, int height)
 
const GameInfogetGameInfo () const
 Get current GameInfo struct.
 
RenderSurfacegetRenderScreen ()
 
Graphics::ScreengetScreen () const
 
Common::Error runGame ()
 
virtual void handleEvent (const Common::Event &event)
 
void handleActionDown (KeybindingAction action)
 
void handleActionUp (KeybindingAction action)
 
void paint ()
 
 INTRINSIC (I_getCurrentTimerTick)
 
 INTRINSIC (I_setAvatarInStasis)
 
 INTRINSIC (I_getAvatarInStasis)
 
 INTRINSIC (I_getTimeInGameHours)
 
 INTRINSIC (I_getTimeInMinutes)
 
 INTRINSIC (I_getTimeInSeconds)
 
 INTRINSIC (I_setTimeInGameHours)
 
 INTRINSIC (I_avatarCanCheat)
 
 INTRINSIC (I_getCrusaderTeleporting)
 
 INTRINSIC (I_setCrusaderTeleporting)
 
 INTRINSIC (I_clrCrusaderTeleporting)
 
 INTRINSIC (I_makeAvatarACheater)
 
 INTRINSIC (I_closeItemGumps)
 
 INTRINSIC (I_setCruStasis)
 
 INTRINSIC (I_clrCruStasis)
 
 INTRINSIC (I_moveKeyDownRecently)
 
void setAvatarInStasis (bool stat)
 
bool isAvatarInStasis () const
 
void toggleAvatarInStasis ()
 
bool isPaintEditorItems () const
 
void togglePaintEditorItems ()
 
bool isShowTouchingItems () const
 
void toggleShowTouchingItems ()
 
bool isCrusaderTeleporting () const
 
void setCrusaderTeleporting (bool flag)
 
void setCruStasis (bool flag)
 
bool isCruStasis () const
 
void moveKeyEvent ()
 
bool moveKeyDownRecently ()
 
uint32 getGameTimeInSeconds ()
 
GameMapGumpgetGameMapGump ()
 
GumpgetDesktopGump ()
 
GumpgetGump (uint16 gumpid)
 
void addGump (Gump *gump)
 
AvatarMoverProcessgetAvatarMoverProcess ()
 
Common::RandomSourcegetRandomSource ()
 
void syncSoundSettings () override
 
void applyGameSettings () override
 
void openConfigDialog ()
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error loadGameState (int slot) 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) override
 
bool newGame (int saveSlot=-1)
 
void setError (Common::Error &error)
 
unsigned int getInversion () const
 
void setInversion (unsigned int i)
 
bool isInverted ()
 
bool areCheatsEnabled () const
 
void setCheatMode (bool enabled)
 
bool hasCheated () const
 
void makeCheater ()
 
bool isInterpolationEnabled () const
 
- 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 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 flipMute ()
 
virtual Common::String getSaveStateName (int slot) const
 
void setGameToLoadSlot (int slot)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Static Public Member Functions

static Ultima8Engineget_instance ()
 
- 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)
 

Static Public Attributes

static const int U8_DEFAULT_SCREEN_WIDTH = 320
 
static const int U8_DEFAULT_SCREEN_HEIGHT = 200
 
static const int CRUSADER_DEFAULT_SCREEN_WIDTH = 640
 
static const int CRUSADER_DEFAULT_SCREEN_HEIGHT = 480
 
static const int U8_HIRES_SCREEN_WIDTH = 640
 
static const int U8_HIRES_SCREEN_HEIGHT = 400
 
static const int CRUSADER_HIRES_SCREEN_WIDTH = 1024
 
static const int CRUSADER_HIRES_SCREEN_HEIGHT = 768
 

Protected Member Functions

Common::Error run () override
 
Common::Error initialize ()
 
void deinitialize ()
 
void pauseEngineIntern (bool pause) override
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 
- 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::Ultima8::Ultima8Engine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ pauseEngineIntern()

void Ultima::Ultima8::Ultima8Engine::pauseEngineIntern ( bool  pause)
overrideprotectedvirtual

Actual implementation of pauseEngine by subclasses.

See also
Engine::pauseEngine

Reimplemented from Engine.

◆ initializePath()

void Ultima::Ultima8::Ultima8Engine::initializePath ( const Common::FSNode gamePath)
overridevirtual

Initialize SearchMan according to the game path.

By default, this adds the directory in non-flat mode with a depth of 4 as priority 0 to SearchMan.

Parameters
gamePathThe base directory of the game data.

Reimplemented from Engine.

◆ hasFeature()

bool Ultima::Ultima8::Ultima8Engine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ addGump()

void Ultima::Ultima8::Ultima8Engine::addGump ( Gump gump)

add a gump to the right core gump (such as desktopgump)

Parameters
gumpthe gump to be added

◆ syncSoundSettings()

void Ultima::Ultima8::Ultima8Engine::syncSoundSettings ( )
overridevirtual

Notifies the engine that the sound settings may have changed

Reimplemented from Engine.

◆ applyGameSettings()

void Ultima::Ultima8::Ultima8Engine::applyGameSettings ( )
overridevirtual

Notifies the engine that the game settings may have changed

Reimplemented from Engine.

◆ openConfigDialog()

void Ultima::Ultima8::Ultima8Engine::openConfigDialog ( )

Opens the config dialog and apply setting after close

◆ canLoadGameStateCurrently()

bool Ultima::Ultima8::Ultima8Engine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
inlineoverridevirtual

Returns true if a savegame can be loaded

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool Ultima::Ultima8::Ultima8Engine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Returns true if the game can be saved

Reimplemented from Engine.

◆ loadGameState()

Common::Error Ultima::Ultima8::Ultima8Engine::loadGameState ( int  slot)
overridevirtual

Load a game

Reimplemented from Engine.

◆ saveGameState()

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

Saves the game

Reimplemented from Engine.

◆ loadGameStream()

Common::Error Ultima::Ultima8::Ultima8Engine::loadGameStream ( Common::SeekableReadStream stream)
overridevirtual

Load a game state

Reimplemented from Engine.

◆ saveGameStream()

Common::Error Ultima::Ultima8::Ultima8Engine::saveGameStream ( Common::WriteStream stream,
bool  isAutosave 
)
overridevirtual

Handles saving savegame state to a stream

Reimplemented from Engine.

◆ newGame()

bool Ultima::Ultima8::Ultima8Engine::newGame ( int  saveSlot = -1)

start a new game

Returns
true if successful.

◆ setError()

void Ultima::Ultima8::Ultima8Engine::setError ( Common::Error error)

Sets an error to end the engine run loop

Parameters
errorThe error to return from the engine

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