Mohawk::MohawkEngine_Riven Class Reference

#include <riven.h>

Inheritance diagram for Mohawk::MohawkEngine_Riven:
Collaboration diagram for Mohawk::MohawkEngine_Riven:

Public Member Functions

 MohawkEngine_Riven (OSystem *syst, const MohawkGameDescription *gamedesc)
 ~MohawkEngine_Riven () override
GUI::DebuggergetDebugger () override
 Return the engine's debugger instance, if any. More...
bool canLoadGameStateCurrently () override
 Indicates whether a game state can be loaded. More...
bool canSaveGameStateCurrently () override
 Indicates whether a game state can be saved. More...
Common::Error loadGameState (int slot) override
 Load a game state. More...
Common::Error saveGameState (int slot, const Common::String &desc) override
 Save a game state. More...
bool hasFeature (EngineFeature f) const override
 Determine whether the engine supports the specified feature. More...
void doFrame ()
void processInput ()
RivenStackconstructStackById (uint16 id)
void changeToCard (uint16 dest)
void changeToStack (uint16 stackId)
RivenCardgetCard () const
RivenStackgetStack () const
void addZipVisitedCard (uint16 cardId, uint16 cardNameId)
bool isZipVisitedCard (const Common::String &hotspotName) const
uint32getStackVar (uint32 index)
Common::Array< uint16getResourceIDList (uint32 type) const
Common::SeekableReadStreamgetExtrasResource (uint32 tag, uint16 id)
void delay (uint32 ms)
void runOptionsDialog ()
void runLoadDialog ()
void runSaveDialog ()
void tryAutoSaving ()
void loadGameStateAndDisplayError (int slot)
Common::Error saveGameState (int slot, const Common::String &desc, bool autosave)
void saveGameStateAndDisplayError (int slot, const Common::String &desc)
bool hasGameEnded () const
 Has the game ended, or has the user requested to quit? More...
void setGameEnded ()
 End the game gracefully. More...
void goToMainMenu ()
void resumeFromMainMenu ()
bool isInMainMenu () const
bool isGameStarted () const
void startNewGame ()
- Public Member Functions inherited from Mohawk::MohawkEngine
 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
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
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...
 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 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 initKeymap ()
virtual void deinitKeymap ()
virtual void flipMute ()
 Flip mute all sound option. More...
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...

Public Attributes

bool _showHotspots
Common::Array< ZipMode_zipModeData
RivenVariableMap _vars
bool _activatedPLST
bool _activatedSLST
- Public Attributes inherited from Mohawk::MohawkEngine
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)
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...

Private Member Functions

const char ** listExpectedDatafiles () const
void loadLanguageDatafile (char prefix, uint16 stackId)
bool checkDatafiles ()
void initVars ()
void pauseEngineIntern (bool) override
 Actual implementation of pauseEngine by subclasses. More...
uint32 sanitizeTransitionMode (uint32 mode)

Private Attributes

InstallerArchive _installerArchive
int _menuSavedCard
int _menuSavedStack
Common::ScopedPtr< Graphics::Surface, Graphics::SurfaceDeleter_menuThumbnail
bool _gameEnded
uint32 _lastSaveTime

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 bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
- Protected Attributes inherited from Mohawk::MohawkEngine
Common::Array< Archive * > _mhk
- Protected Attributes inherited from Engine
const Common::String _targetName

Detailed Description

Definition at line 82 of file riven.h.

Constructor & Destructor Documentation

◆ MohawkEngine_Riven()

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

Definition at line 57 of file riven.cpp.

◆ ~MohawkEngine_Riven()

Mohawk::MohawkEngine_Riven::~MohawkEngine_Riven ( )

Definition at line 97 of file riven.cpp.

Member Function Documentation

◆ addZipVisitedCard()

void Mohawk::MohawkEngine_Riven::addZipVisitedCard ( uint16  cardId,
uint16  cardNameId 

Definition at line 791 of file riven.cpp.

◆ canLoadGameStateCurrently()

bool Mohawk::MohawkEngine_Riven::canLoadGameStateCurrently ( )

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 815 of file riven.cpp.

◆ canSaveGameStateCurrently()

bool Mohawk::MohawkEngine_Riven::canSaveGameStateCurrently ( )

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 827 of file riven.cpp.

◆ changeToCard()

void Mohawk::MohawkEngine_Riven::changeToCard ( uint16  dest)

Definition at line 617 of file riven.cpp.

◆ changeToStack()

void Mohawk::MohawkEngine_Riven::changeToStack ( uint16  stackId)

Definition at line 407 of file riven.cpp.

◆ checkDatafiles()

bool Mohawk::MohawkEngine_Riven::checkDatafiles ( )

Definition at line 507 of file riven.cpp.

◆ constructStackById()

RivenStack * Mohawk::MohawkEngine_Riven::constructStackById ( uint16  id)

Definition at line 569 of file riven.cpp.

◆ delay()

void Mohawk::MohawkEngine_Riven::delay ( uint32  ms)

Definition at line 665 of file riven.cpp.

◆ doFrame()

void Mohawk::MohawkEngine_Riven::doFrame ( )

Definition at line 214 of file riven.cpp.

◆ getCard()

RivenCard* Mohawk::MohawkEngine_Riven::getCard ( ) const

Definition at line 144 of file riven.h.

◆ getDebugger()

GUI::Debugger * Mohawk::MohawkEngine_Riven::getDebugger ( )

Return the engine's debugger instance, if any.

Used by error() to invoke the debugger when a severe error is reported.

Reimplemented from Engine.

Definition at line 114 of file riven.cpp.

◆ getExtrasResource()

Common::SeekableReadStream * Mohawk::MohawkEngine_Riven::getExtrasResource ( uint32  tag,
uint16  id 

Definition at line 650 of file riven.cpp.

◆ getResourceIDList()

Common::Array< uint16 > Mohawk::MohawkEngine_Riven::getResourceIDList ( uint32  type) const

Definition at line 654 of file riven.cpp.

◆ getStack()

RivenStack* Mohawk::MohawkEngine_Riven::getStack ( ) const

Definition at line 145 of file riven.h.

◆ getStackVar()

uint32 & Mohawk::MohawkEngine_Riven::getStackVar ( uint32  index)

Definition at line 273 of file riven_vars.cpp.

◆ goToMainMenu()

void Mohawk::MohawkEngine_Riven::goToMainMenu ( )

Definition at line 341 of file riven.cpp.

◆ hasFeature()

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

Determine whether the engine supports the specified feature.

Reimplemented from Mohawk::MohawkEngine.

Definition at line 128 of file detection.cpp.

◆ hasGameEnded()

bool Mohawk::MohawkEngine_Riven::hasGameEnded ( ) const

Has the game ended, or has the user requested to quit?

Definition at line 831 of file riven.cpp.

◆ initVars()

void Mohawk::MohawkEngine_Riven::initVars ( )

Definition at line 282 of file riven_vars.cpp.

◆ isGameStarted()

bool Mohawk::MohawkEngine_Riven::isGameStarted ( ) const

Definition at line 374 of file riven.cpp.

◆ isInMainMenu()

bool Mohawk::MohawkEngine_Riven::isInMainMenu ( ) const

Definition at line 369 of file riven.cpp.

◆ isZipVisitedCard()

bool Mohawk::MohawkEngine_Riven::isZipVisitedCard ( const Common::String hotspotName) const

Definition at line 802 of file riven.cpp.

◆ listExpectedDatafiles()

const char ** Mohawk::MohawkEngine_Riven::listExpectedDatafiles ( ) const

Definition at line 461 of file riven.cpp.

◆ loadGameState()

Common::Error Mohawk::MohawkEngine_Riven::loadGameState ( int  slot)

Load a game state.

slotthe slot from which a savestate should be loaded
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 719 of file riven.cpp.

◆ loadGameStateAndDisplayError()

void Mohawk::MohawkEngine_Riven::loadGameStateAndDisplayError ( int  slot)

Definition at line 731 of file riven.cpp.

◆ loadLanguageDatafile()

void Mohawk::MohawkEngine_Riven::loadLanguageDatafile ( char  prefix,
uint16  stackId 

Definition at line 537 of file riven.cpp.

◆ pauseEngineIntern()

void Mohawk::MohawkEngine_Riven::pauseEngineIntern ( bool  pause)

Actual implementation of pauseEngine by subclasses.

See there for details.

Reimplemented from Engine.

Definition at line 378 of file riven.cpp.

◆ processInput()

void Mohawk::MohawkEngine_Riven::processInput ( )

Definition at line 249 of file riven.cpp.

◆ resumeFromMainMenu()

void Mohawk::MohawkEngine_Riven::resumeFromMainMenu ( )

Definition at line 357 of file riven.cpp.

◆ run()

Common::Error Mohawk::MohawkEngine_Riven::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Reimplemented from Mohawk::MohawkEngine.

Definition at line 118 of file riven.cpp.

◆ runLoadDialog()

void Mohawk::MohawkEngine_Riven::runLoadDialog ( )

Definition at line 689 of file riven.cpp.

◆ runOptionsDialog()

void Mohawk::MohawkEngine_Riven::runOptionsDialog ( )

Definition at line 839 of file riven.cpp.

◆ runSaveDialog()

void Mohawk::MohawkEngine_Riven::runSaveDialog ( )

Definition at line 701 of file riven.cpp.

◆ sanitizeTransitionMode()

uint32 Mohawk::MohawkEngine_Riven::sanitizeTransitionMode ( uint32  mode)

Definition at line 394 of file riven.cpp.

◆ saveGameState() [1/2]

Common::Error Mohawk::MohawkEngine_Riven::saveGameState ( int  slot,
const Common::String desc 

Save a game state.

slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 742 of file riven.cpp.

◆ saveGameState() [2/2]

Common::Error Mohawk::MohawkEngine_Riven::saveGameState ( int  slot,
const Common::String desc,
bool  autosave 

Definition at line 746 of file riven.cpp.

◆ saveGameStateAndDisplayError()

void Mohawk::MohawkEngine_Riven::saveGameStateAndDisplayError ( int  slot,
const Common::String desc 

Definition at line 763 of file riven.cpp.

◆ setGameEnded()

void Mohawk::MohawkEngine_Riven::setGameEnded ( )

End the game gracefully.

Definition at line 835 of file riven.cpp.

◆ startNewGame()

void Mohawk::MohawkEngine_Riven::startNewGame ( )

Definition at line 673 of file riven.cpp.

◆ tryAutoSaving()

void Mohawk::MohawkEngine_Riven::tryAutoSaving ( )

Definition at line 774 of file riven.cpp.

Member Data Documentation

◆ _activatedPLST

bool Mohawk::MohawkEngine_Riven::_activatedPLST

Definition at line 159 of file riven.h.

◆ _activatedSLST

bool Mohawk::MohawkEngine_Riven::_activatedSLST

Definition at line 160 of file riven.h.

◆ _card

RivenCard* Mohawk::MohawkEngine_Riven::_card

Definition at line 124 of file riven.h.

◆ _console

RivenConsole* Mohawk::MohawkEngine_Riven::_console

Definition at line 118 of file riven.h.

◆ _extrasFile

MohawkArchive* Mohawk::MohawkEngine_Riven::_extrasFile

Definition at line 113 of file riven.h.

◆ _gameEnded

bool Mohawk::MohawkEngine_Riven::_gameEnded

Definition at line 131 of file riven.h.

◆ _gfx

RivenGraphics* Mohawk::MohawkEngine_Riven::_gfx

Definition at line 92 of file riven.h.

◆ _installerArchive

InstallerArchive Mohawk::MohawkEngine_Riven::_installerArchive

Definition at line 121 of file riven.h.

◆ _inventory

RivenInventory* Mohawk::MohawkEngine_Riven::_inventory

Definition at line 95 of file riven.h.

◆ _lastSaveTime

uint32 Mohawk::MohawkEngine_Riven::_lastSaveTime

Definition at line 132 of file riven.h.

◆ _menuSavedCard

int Mohawk::MohawkEngine_Riven::_menuSavedCard

Definition at line 127 of file riven.h.

◆ _menuSavedStack

int Mohawk::MohawkEngine_Riven::_menuSavedStack

Definition at line 128 of file riven.h.

◆ _menuThumbnail

Common::ScopedPtr<Graphics::Surface, Graphics::SurfaceDeleter> Mohawk::MohawkEngine_Riven::_menuThumbnail

Definition at line 129 of file riven.h.

◆ _optionsDialog

RivenOptionsDialog* Mohawk::MohawkEngine_Riven::_optionsDialog

Definition at line 120 of file riven.h.

◆ _rnd

Common::RandomSource* Mohawk::MohawkEngine_Riven::_rnd

Definition at line 93 of file riven.h.

◆ _saveLoad

RivenSaveLoad* Mohawk::MohawkEngine_Riven::_saveLoad

Definition at line 119 of file riven.h.

◆ _scriptMan

RivenScriptManager* Mohawk::MohawkEngine_Riven::_scriptMan

Definition at line 94 of file riven.h.

◆ _showHotspots

bool Mohawk::MohawkEngine_Riven::_showHotspots

Definition at line 98 of file riven.h.

◆ _sound

RivenSoundManager* Mohawk::MohawkEngine_Riven::_sound

Definition at line 91 of file riven.h.

◆ _stack

RivenStack* Mohawk::MohawkEngine_Riven::_stack

Definition at line 125 of file riven.h.

◆ _vars

RivenVariableMap Mohawk::MohawkEngine_Riven::_vars

Definition at line 153 of file riven.h.

◆ _video

RivenVideoManager* Mohawk::MohawkEngine_Riven::_video

Definition at line 90 of file riven.h.

◆ _zipModeData

Common::Array<ZipMode> Mohawk::MohawkEngine_Riven::_zipModeData

Definition at line 148 of file riven.h.

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