Mohawk::MohawkEngine Class Reference

#include <mohawk.h>

+ Inheritance diagram for Mohawk::MohawkEngine:
+ Collaboration diagram for Mohawk::MohawkEngine:

Public Member Functions

 MohawkEngine (OSystem *syst, const MohawkGameDescription *gamedesc)
 ~MohawkEngine () override
const char * getGameId () const
uint32 getFeatures () const
const char * getAppName () const
Common::Platform getPlatform () const
uint8 getGameType () const
Common::Language getLanguage () const
Common::String getDatafileLanguageName (const char *prefix) const
bool hasFeature (EngineFeature f) const override
 Determine whether the engine supports the specified feature. More...
virtual Common::SeekableReadStreamgetResource (uint32 tag, uint16 id)
bool hasResource (uint32 tag, uint16 id)
bool hasResource (uint32 tag, const Common::String &resName)
uint32 getResourceOffset (uint32 tag, uint16 id)
uint16 findResourceID (uint32 type, const Common::String &resName)
Common::String getResourceName (uint32 tag, uint16 id)
void pauseGame ()
- Public Member Functions inherited from Engine
 Engine (OSystem *syst)
virtual ~Engine ()
virtual void initializePath (const Common::FSNode &gamePath)
 Init SearchMan according to the game path. More...
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 Prepare an error string, which is printed by the error() function. More...
virtual GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
void setDebugger (GUI::Debugger *debugger)
 Sets the engine's debugger. More...
GUI::DebuggergetOrCreateDebugger ()
 Return the engine's debugger instance, or create one if none is present. More...
virtual void syncSoundSettings ()
 Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc. More...
virtual void flipMute ()
 Flip mute all sound option. More...
virtual Common::String getSaveStateName (int slot) const
 Generates the savegame filename. More...
virtual Common::Error loadGameState (int slot)
 Load a game state. More...
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 Load a game state. More...
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
virtual bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
virtual Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 Save a game state. More...
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 Save a game state. More...
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
bool saveGameDialog ()
 Shows the ScummVM save dialog, allowing users to save their game. More...
bool loadGameDialog ()
 Shows the ScummVM Restore dialog, allowing users to load a game. More...
void pauseEngine (bool pause)
 Pause or resume the engine. More...
bool isPaused () const
 Return whether the engine is currently paused or not. More...
void openMainMenuDialog ()
 Run the Global Main Menu Dialog. More...
uint32 getTotalPlayTime () const
 Get the total play time. More...
void setTotalPlayTime (uint32 time=0)
 Set the game time counter to the specified time. More...
Common::TimerManagergetTimerManager ()
Common::EventManagergetEventManager ()
Common::SaveFileManagergetSaveFileManager ()
void checkCD ()
 On some systems, check if the game appears to be run from CD. More...
void handleAutoSave ()
 Checks for whether it's time to do an autosave, and if so, does it. More...
void saveAutosaveIfEnabled ()
 Does an autosave immediately if autosaves are turned on. More...
virtual bool canSaveAutosaveCurrently ()
 Indicates whether an autosave can currently be saved. More...
virtual int getAutosaveSlot () const
 Returns the slot that should be used for autosaves. More...
bool shouldPerformAutoSave (int lastSaveTime)

Public Attributes

const MohawkGameDescription_gameDescription
- Public Attributes inherited from Engine

Protected Member Functions

Common::Error run () override
 Init the engine and start its main loop. More...
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...

Protected Attributes

Common::Array< Archive * > _mhk
- Protected Attributes inherited from Engine
const Common::String _targetName

Private Attributes


Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature { kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime }
 A feature in this context means an ability of the engine which can be either available or not. More...
- Static Public Member Functions inherited from Engine
static void quitGame ()
 Request the engine to quit. More...
static bool shouldQuit ()
 Return whether the ENGINE should quit respectively should return to the launcher. More...
static MetaEnginegetMetaEngine ()
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...

Detailed Description

Definition at line 79 of file mohawk.h.

Constructor & Destructor Documentation

◆ MohawkEngine()

Mohawk::MohawkEngine::MohawkEngine ( OSystem syst,
const MohawkGameDescription gamedesc 

Definition at line 37 of file mohawk.cpp.

◆ ~MohawkEngine()

Mohawk::MohawkEngine::~MohawkEngine ( )

Definition at line 45 of file mohawk.cpp.

Member Function Documentation

◆ findResourceID()

uint16 Mohawk::MohawkEngine::findResourceID ( uint32  type,
const Common::String resName 

Definition at line 96 of file mohawk.cpp.

◆ getAppName()

const char * Mohawk::MohawkEngine::getAppName ( ) const

Definition at line 79 of file detection.cpp.

◆ getDatafileLanguageName()

Common::String Mohawk::MohawkEngine::getDatafileLanguageName ( const char *  prefix) const

Definition at line 100 of file detection.cpp.

◆ getFeatures()

uint32 Mohawk::MohawkEngine::getFeatures ( ) const

Definition at line 71 of file detection.cpp.

◆ getGameId()

const char * Mohawk::MohawkEngine::getGameId ( ) const

Definition at line 67 of file detection.cpp.

◆ getGameType()

uint8 Mohawk::MohawkEngine::getGameType ( ) const

Definition at line 83 of file detection.cpp.

◆ getLanguage()

Common::Language Mohawk::MohawkEngine::getLanguage ( ) const

Definition at line 91 of file detection.cpp.

◆ getPlatform()

Common::Platform Mohawk::MohawkEngine::getPlatform ( ) const

Definition at line 75 of file detection.cpp.

◆ getResource()

Common::SeekableReadStream * Mohawk::MohawkEngine::getResource ( uint32  tag,
uint16  id 

Reimplemented in Mohawk::MohawkEngine_Myst.

Definition at line 64 of file mohawk.cpp.

◆ getResourceName()

Common::String Mohawk::MohawkEngine::getResourceName ( uint32  tag,
uint16  id 

Definition at line 104 of file mohawk.cpp.

◆ getResourceOffset()

uint32 Mohawk::MohawkEngine::getResourceOffset ( uint32  tag,
uint16  id 

Definition at line 88 of file mohawk.cpp.

◆ hasFeature()

bool Mohawk::MohawkEngine::hasFeature ( EngineFeature  f) const

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Reimplemented in Mohawk::MohawkEngine_Myst, and Mohawk::MohawkEngine_Riven.

Definition at line 95 of file detection.cpp.

◆ hasResource() [1/2]

bool Mohawk::MohawkEngine::hasResource ( uint32  tag,
const Common::String resName 

Definition at line 80 of file mohawk.cpp.

◆ hasResource() [2/2]

bool Mohawk::MohawkEngine::hasResource ( uint32  tag,
uint16  id 

Definition at line 72 of file mohawk.cpp.

◆ pauseGame()

void Mohawk::MohawkEngine::pauseGame ( )

Definition at line 60 of file mohawk.cpp.

◆ run()

Common::Error Mohawk::MohawkEngine::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Implements Engine.

Reimplemented in Mohawk::MohawkEngine_Myst, and Mohawk::MohawkEngine_Riven.

Definition at line 54 of file mohawk.cpp.

Member Data Documentation

◆ _cursor

CursorManager* Mohawk::MohawkEngine::_cursor

Definition at line 99 of file mohawk.h.

◆ _gameDescription

const MohawkGameDescription* Mohawk::MohawkEngine::_gameDescription

Definition at line 88 of file mohawk.h.

◆ _mhk

Common::Array<Archive *> Mohawk::MohawkEngine::_mhk

Definition at line 115 of file mohawk.h.

◆ _pauseDialog

PauseDialog* Mohawk::MohawkEngine::_pauseDialog

Definition at line 111 of file mohawk.h.

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