ScummVM API documentation
Titanic::TitanicEngine Class Reference
Inheritance diagram for Titanic::TitanicEngine:
Engine

Public Member Functions

 TitanicEngine (OSystem *syst, const TitanicGameDescription *gameDesc)
 
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
 
void syncSoundSettings () override
 
uint32 getFeatures () const
 
Common::Language getLanguage () const
 
bool isGerman () const
 
uint getRandomNumber (uint max)
 
double getRandomFloat ()
 
CString getSavegameName (int slot)
 
- 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
 
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 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 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 ()
 

Public Attributes

Events_events
 
CFilesManager_filesManager
 
CMovieManager _movieManager
 
Graphics::Screen_screen
 
OSScreenManager_screenManager
 
CMainGameWindow_window
 
Common::RandomSource _randomSource
 
CScriptHandler_scriptHandler
 
TTscriptBase_script
 
CTrueTalkManager_trueTalkManager
 
CExeResources _exeResources
 
StringArray _itemNames
 
StringArray _itemDescriptions
 
StringArray _itemIds
 
StringArray _roomNames
 
Strings _strings
 
CString _stateRoomExitView
 
int _loadSaveSlot
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

void initializePath (const Common::FSNode &gamePath) override
 
Common::Error run () override
 
bool hasFeature (EngineFeature f) const override
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 

Protected Attributes

const TitanicGameDescription_gameDescription
 
- 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 bool warnUserAboutUnsupportedAddOn (Common::String addOnName)
 
static void errorAddingAddOnWithoutBaseGame (Common::String addOnName, Common::String gameId)
 
static void errorUnsupportedGame (Common::String extraMsg)
 

Member Function Documentation

◆ initializePath()

void Titanic::TitanicEngine::initializePath ( const Common::FSNode gamePath)
overrideprotectedvirtual

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.

◆ run()

Common::Error Titanic::TitanicEngine::run ( )
overrideprotectedvirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ hasFeature()

bool Titanic::TitanicEngine::hasFeature ( EngineFeature  f) const
overrideprotectedvirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool Titanic::TitanicEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Returns true if a savegame can be loaded

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool Titanic::TitanicEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Returns true if the game can be saved

Reimplemented from Engine.

◆ loadGameState()

Common::Error Titanic::TitanicEngine::loadGameState ( int  slot)
overridevirtual

Called by the GMM to load a savegame

Reimplemented from Engine.

◆ saveGameState()

Common::Error Titanic::TitanicEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 
)
overridevirtual

Called by the GMM to save the game

Reimplemented from Engine.

◆ syncSoundSettings()

void Titanic::TitanicEngine::syncSoundSettings ( )
overridevirtual

Handles updates to the sound levels

Reimplemented from Engine.

◆ getFeatures()

uint32 Titanic::TitanicEngine::getFeatures ( ) const

Gets the game features

◆ getLanguage()

Common::Language Titanic::TitanicEngine::getLanguage ( ) const

Returns the language for the game

◆ isGerman()

bool Titanic::TitanicEngine::isGerman ( ) const
inline

Returns true if it's the German version

◆ getRandomNumber()

uint Titanic::TitanicEngine::getRandomNumber ( uint  max)
inline

Returns a uniform random unsigned integer in the interval [0, max]

◆ getRandomFloat()

double Titanic::TitanicEngine::getRandomFloat ( )
inline

Returns a uniform random floating point number in the interval [0.0, 65535.0]

◆ getSavegameName()

CString Titanic::TitanicEngine::getSavegameName ( int  slot)

Checks whether a savegame exists for the given slot, and if it exists, returns it's description


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