ScummVM API documentation
Sherlock::SherlockEngine Class Referenceabstract
Inheritance diagram for Sherlock::SherlockEngine:
Engine Sherlock::Scalpel::ScalpelEngine Sherlock::Tattoo::TattooEngine

Public Member Functions

 SherlockEngine (OSystem *syst, const SherlockGameDescription *gameDesc)
 
Common::Error run () override
 
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
 
virtual void saveConfig ()
 
virtual bool isDemo () const
 
GameType getGameID () const
 
Common::Platform getPlatform () const
 
Common::Language getLanguage () const
 
int getRandomNumber (int limit)
 
bool readFlags (int flagNum)
 
void setFlags (int flagNum)
 
void setFlagsDirect (int flagNum)
 
void synchronize (Serializer &s)
 
- 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 ()
 
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

const SherlockGameDescription_gameDescription
 
Animation_animation
 
Debugger_debugger
 
Events_events
 
FixedText_fixedText
 
Inventory_inventory
 
Journal_journal
 
Map_map
 
Music_music
 
People_people
 
Resources_res
 
SaveManager_saves
 
Scene_scene
 
Screen_screen
 
Sound_sound
 
Talk_talk
 
UserInterface_ui
 
Common::RandomSource _randomSource
 
Common::Array< bool > _flags
 
bool _useEpilogue2
 
int _loadGameSlot
 
bool _canLoadSave
 
bool _showOriginalSavesDialog
 
bool _interactiveFl
 
bool _isScreenDoubled
 
bool _startupAutosave
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

virtual void initialize ()
 
virtual void showOpening ()=0
 
virtual void startScene ()
 
bool hasFeature (EngineFeature f) const override
 
virtual void loadConfig ()
 
- 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 Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Member Function Documentation

◆ initialize()

virtual void Sherlock::SherlockEngine::initialize ( )
protectedvirtual

Does basic initialization of the game engine

Reimplemented in Sherlock::Scalpel::ScalpelEngine, and Sherlock::Tattoo::TattooEngine.

◆ hasFeature()

bool Sherlock::SherlockEngine::hasFeature ( EngineFeature  f) const
overrideprotectedvirtual

Returns a list of features the game itself supports

Reimplemented from Engine.

◆ loadConfig()

virtual void Sherlock::SherlockEngine::loadConfig ( )
protectedvirtual

Load game configuration esttings

Reimplemented in Sherlock::Tattoo::TattooEngine.

◆ run()

Common::Error Sherlock::SherlockEngine::run ( )
overridevirtual

Main method for running the game

Implements Engine.

◆ canLoadGameStateCurrently()

bool Sherlock::SherlockEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Returns true if a savegame can be loaded

Reimplemented from Engine.

Reimplemented in Sherlock::Tattoo::TattooEngine.

◆ canSaveGameStateCurrently()

bool Sherlock::SherlockEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Returns true if the game can be saved

Reimplemented from Engine.

Reimplemented in Sherlock::Tattoo::TattooEngine.

◆ loadGameState()

Common::Error Sherlock::SherlockEngine::loadGameState ( int  slot)
overridevirtual

Called by the GMM to load a savegame

Reimplemented from Engine.

◆ saveGameState()

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

Called by the GMM to save the game

Reimplemented from Engine.

◆ syncSoundSettings()

void Sherlock::SherlockEngine::syncSoundSettings ( )
overridevirtual

Called by the engine when sound settings are updated

Reimplemented from Engine.

◆ saveConfig()

virtual void Sherlock::SherlockEngine::saveConfig ( )
virtual

Saves game configuration information

Reimplemented in Sherlock::Tattoo::TattooEngine.

◆ isDemo()

virtual bool Sherlock::SherlockEngine::isDemo ( ) const
virtual

Returns whether the version is a demo

◆ getGameID()

GameType Sherlock::SherlockEngine::getGameID ( ) const

Returns the Id of the game

◆ getPlatform()

Common::Platform Sherlock::SherlockEngine::getPlatform ( ) const

Returns the platform the game's datafiles are for

◆ getLanguage()

Common::Language Sherlock::SherlockEngine::getLanguage ( ) const

Return the game's language

◆ getRandomNumber()

int Sherlock::SherlockEngine::getRandomNumber ( int  limit)
inline

Return a random number

◆ readFlags()

bool Sherlock::SherlockEngine::readFlags ( int  flagNum)

Read the state of a global flag

Remarks
If a negative value is specified, it will return the inverse value of the positive flag number

◆ setFlags()

void Sherlock::SherlockEngine::setFlags ( int  flagNum)

Sets a global flag to either true or false depending on whether the specified flag is positive or negative

◆ setFlagsDirect()

void Sherlock::SherlockEngine::setFlagsDirect ( int  flagNum)

Set a global flag to 0 or 1 depending on whether the passed flag is negative or positive.

Remarks
We don't use the global setFlags method because we don't want to check scene flags

◆ synchronize()

void Sherlock::SherlockEngine::synchronize ( Serializer s)

Synchronize the data for a savegame


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