Mohawk::MohawkEngine_Myst Class Reference

#include <myst.h>

+ Inheritance diagram for Mohawk::MohawkEngine_Myst:
+ Collaboration diagram for Mohawk::MohawkEngine_Myst:

Public Member Functions

 MohawkEngine_Myst (OSystem *syst, const MohawkGameDescription *gamedesc)
 ~MohawkEngine_Myst () override
Common::SeekableReadStreamgetResource (uint32 tag, uint16 id) override
Common::Array< uint16getResourceIDList (uint32 type) const
void cachePreload (uint32 tag, uint16 id)
void changeToStack (MystStack stackId, uint16 card, uint16 linkSrcSound, uint16 linkDstSound)
void changeToCard (uint16 card, TransitionType transition)
MystCardgetCard ()
MystCardPtr getCardPtr ()
void setMainCursor (uint16 cursor)
uint16 getMainCursor ()
void refreshCursor ()
bool wait (uint32 duration, bool skippable=false)
void doFrame ()
 Update the game state according to events and update the screen. More...
MystSoundBlock readSoundBlock (Common::ReadStream *stream) const
void applySoundBlock (const MystSoundBlock &block)
MystArealoadResource (Common::SeekableReadStream *rlstStream, MystArea *parent)
void redrawResource (MystAreaImageSwitch *resource, bool update=true)
void setCacheState (bool state)
bool getCacheState ()
VideoEntryPtr playMovie (const Common::String &name, MystStack stack)
VideoEntryPtr playMovieFullscreen (const Common::String &name, MystStack stack)
VideoEntryPtr findVideo (const Common::String &name, MystStack stack)
void playMovieBlocking (const Common::String &name, MystStack stack, uint16 x, uint16 y)
void playFlybyMovie (MystStack stack)
void playSkippableMovie (const VideoEntryPtr &video, bool looping)
void waitUntilMovieEnds (const VideoEntryPtr &video)
Common::String selectLocalizedMovieFilename (const Common::String &movieName)
void playSoundBlocking (uint16 id)
bool isInteractive ()
 Is the game currently interactive. 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, bool isAutosave=false) override
 Save a game state. More...
Common::String getSaveStateName (int slot) const override
 Generates the savegame filename. More...
bool hasFeature (EngineFeature f) const override
 Determine whether the engine supports the specified feature. More...
void resumeFromMainMenu ()
void runLoadDialog ()
void runSaveDialog ()
void runOptionsDialog ()
- 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
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::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 Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 Save a game state. 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)

Static Public Member Functions

static Common::Array< Common::Keymap * > initKeymaps (const char *target)
- 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...

Public Attributes

bool _showResourceRects
MystScriptParserPtr _stack
- 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)

Private Member Functions

bool hasGameSaveSupport () const
void pauseEngineIntern (bool pause) override
 Actual implementation of pauseEngine by subclasses. More...
void goToMainMenu ()
bool isGameStarted () const
void dropPage ()
Common::String wrapMovieFilename (const Common::String &movieName, uint16 stack)
void loadStackArchives (MystStack stackId)
void loadArchive (const char *archiveName, const char *language, bool mandatory)

Private Attributes

ResourceCache _cache
MystScriptParserPtr _prevStack
MystCardPtr _card
MystCardPtr _prevCard
bool _mouseClicked
bool _mouseMoved
bool _escapePressed
bool _waitingOnBlockingOperation
uint16 _currentCursor
uint16 _mainCursor

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...
- Protected Attributes inherited from Mohawk::MohawkEngine
Common::Array< Archive * > _mhk
- Protected Attributes inherited from Engine
const Common::String _targetName

Detailed Description

Definition at line 128 of file myst.h.

Constructor & Destructor Documentation

◆ MohawkEngine_Myst()

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

Definition at line 76 of file myst.cpp.

◆ ~MohawkEngine_Myst()

Mohawk::MohawkEngine_Myst::~MohawkEngine_Myst ( )

Definition at line 106 of file myst.cpp.

Member Function Documentation

◆ applySoundBlock()

void Mohawk::MohawkEngine_Myst::applySoundBlock ( const MystSoundBlock block)

Definition at line 1136 of file myst.cpp.

◆ cachePreload()

void Mohawk::MohawkEngine_Myst::cachePreload ( uint32  tag,
uint16  id 

Definition at line 144 of file myst.cpp.

◆ canLoadGameStateCurrently()

bool Mohawk::MohawkEngine_Myst::canLoadGameStateCurrently ( )

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 981 of file myst.cpp.

◆ canSaveGameStateCurrently()

bool Mohawk::MohawkEngine_Myst::canSaveGameStateCurrently ( )

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 1002 of file myst.cpp.

◆ changeToCard()

void Mohawk::MohawkEngine_Myst::changeToCard ( uint16  card,
TransitionType  transition 

Definition at line 854 of file myst.cpp.

◆ changeToStack()

void Mohawk::MohawkEngine_Myst::changeToStack ( MystStack  stackId,
uint16  card,
uint16  linkSrcSound,
uint16  linkDstSound 

Definition at line 761 of file myst.cpp.

◆ doFrame()

void Mohawk::MohawkEngine_Myst::doFrame ( )

Update the game state according to events and update the screen.

Definition at line 553 of file myst.cpp.

◆ dropPage()

void Mohawk::MohawkEngine_Myst::dropPage ( )

Definition at line 1053 of file myst.cpp.

◆ findVideo()

VideoEntryPtr Mohawk::MohawkEngine_Myst::findVideo ( const Common::String name,
MystStack  stack 

Definition at line 275 of file myst.cpp.

◆ getCacheState()

bool Mohawk::MohawkEngine_Myst::getCacheState ( )

Definition at line 168 of file myst.h.

◆ getCard()

MystCard* Mohawk::MohawkEngine_Myst::getCard ( )

Definition at line 142 of file myst.h.

◆ getCardPtr()

MystCardPtr Mohawk::MohawkEngine_Myst::getCardPtr ( )

Definition at line 143 of file myst.h.

◆ getMainCursor()

uint16 Mohawk::MohawkEngine_Myst::getMainCursor ( )

Definition at line 145 of file myst.h.

◆ getResource()

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

Reimplemented from Mohawk::MohawkEngine.

Definition at line 118 of file myst.cpp.

◆ getResourceIDList()

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

Definition at line 134 of file myst.cpp.

◆ getSaveStateName()

Common::String Mohawk::MohawkEngine_Myst::getSaveStateName ( int  slot) const

Generates the savegame filename.

Reimplemented from Engine.

Definition at line 192 of file myst.h.

◆ goToMainMenu()

void Mohawk::MohawkEngine_Myst::goToMainMenu ( )

Definition at line 1169 of file myst.cpp.

◆ hasFeature()

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

Determine whether the engine supports the specified feature.

Reimplemented from Mohawk::MohawkEngine.

Definition at line 120 of file detection.cpp.

◆ hasGameSaveSupport()

bool Mohawk::MohawkEngine_Myst::hasGameSaveSupport ( ) const

Definition at line 973 of file myst.cpp.

◆ initKeymaps()

Common::KeymapArray Mohawk::MohawkEngine_Myst::initKeymaps ( const char *  target)

Definition at line 503 of file myst.cpp.

◆ isGameStarted()

bool Mohawk::MohawkEngine_Myst::isGameStarted ( ) const

Definition at line 1193 of file myst.cpp.

◆ isInteractive()

bool Mohawk::MohawkEngine_Myst::isInteractive ( )

Is the game currently interactive.

When the game is interactive, the user can interact with the game world and perform other operations such as loading saved games, ...

Definition at line 977 of file myst.cpp.

◆ loadArchive()

void Mohawk::MohawkEngine_Myst::loadArchive ( const char *  archiveName,
const char *  language,
bool  mandatory 

Definition at line 482 of file myst.cpp.

◆ loadGameState()

Common::Error Mohawk::MohawkEngine_Myst::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 957 of file myst.cpp.

◆ loadResource()

MystArea * Mohawk::MohawkEngine_Myst::loadResource ( Common::SeekableReadStream rlstStream,
MystArea parent 

Definition at line 917 of file myst.cpp.

◆ loadStackArchives()

void Mohawk::MohawkEngine_Myst::loadStackArchives ( MystStack  stackId)

Definition at line 452 of file myst.cpp.

◆ pauseEngineIntern()

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

Actual implementation of pauseEngine by subclasses.

See there for details.

Reimplemented from Engine.

Definition at line 748 of file myst.cpp.

◆ playFlybyMovie()

void Mohawk::MohawkEngine_Myst::playFlybyMovie ( MystStack  stack)

Definition at line 294 of file myst.cpp.

◆ playMovie()

VideoEntryPtr Mohawk::MohawkEngine_Myst::playMovie ( const Common::String name,
MystStack  stack 

Definition at line 254 of file myst.cpp.

◆ playMovieBlocking()

void Mohawk::MohawkEngine_Myst::playMovieBlocking ( const Common::String name,
MystStack  stack,
uint16  x,
uint16  y 

Definition at line 281 of file myst.cpp.

◆ playMovieFullscreen()

VideoEntryPtr Mohawk::MohawkEngine_Myst::playMovieFullscreen ( const Common::String name,
MystStack  stack 

Definition at line 266 of file myst.cpp.

◆ playSkippableMovie()

void Mohawk::MohawkEngine_Myst::playSkippableMovie ( const VideoEntryPtr video,
bool  looping 

Definition at line 342 of file myst.cpp.

◆ playSoundBlocking()

void Mohawk::MohawkEngine_Myst::playSoundBlocking ( uint16  id)

Definition at line 396 of file myst.cpp.

◆ readSoundBlock()

MystSoundBlock Mohawk::MohawkEngine_Myst::readSoundBlock ( Common::ReadStream stream) const

Definition at line 1092 of file myst.cpp.

◆ redrawResource()

void Mohawk::MohawkEngine_Myst::redrawResource ( MystAreaImageSwitch resource,
bool  update = true 

Definition at line 913 of file myst.cpp.

◆ refreshCursor()

void Mohawk::MohawkEngine_Myst::refreshCursor ( )

Definition at line 901 of file myst.cpp.

◆ resumeFromMainMenu()

void Mohawk::MohawkEngine_Myst::resumeFromMainMenu ( )

Definition at line 1197 of file myst.cpp.

◆ run()

Common::Error Mohawk::MohawkEngine_Myst::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Reimplemented from Mohawk::MohawkEngine.

Definition at line 406 of file myst.cpp.

◆ runLoadDialog()

void Mohawk::MohawkEngine_Myst::runLoadDialog ( )

Definition at line 1023 of file myst.cpp.

◆ runOptionsDialog()

void Mohawk::MohawkEngine_Myst::runOptionsDialog ( )

Definition at line 656 of file myst.cpp.

◆ runSaveDialog()

void Mohawk::MohawkEngine_Myst::runSaveDialog ( )

Definition at line 1035 of file myst.cpp.

◆ saveGameState()

Common::Error Mohawk::MohawkEngine_Myst::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 

Save a game state.

slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
isAutosaveExpected to be true if an autosave is being created
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 964 of file myst.cpp.

◆ selectLocalizedMovieFilename()

Common::String Mohawk::MohawkEngine_Myst::selectLocalizedMovieFilename ( const Common::String movieName)

Definition at line 240 of file myst.cpp.

◆ setCacheState()

void Mohawk::MohawkEngine_Myst::setCacheState ( bool  state)

Definition at line 167 of file myst.h.

◆ setMainCursor()

void Mohawk::MohawkEngine_Myst::setMainCursor ( uint16  cursor)

Definition at line 896 of file myst.cpp.

◆ wait()

bool Mohawk::MohawkEngine_Myst::wait ( uint32  duration,
bool  skippable = false 

Definition at line 731 of file myst.cpp.

◆ waitUntilMovieEnds()

void Mohawk::MohawkEngine_Myst::waitUntilMovieEnds ( const VideoEntryPtr video)

Definition at line 371 of file myst.cpp.

◆ wrapMovieFilename()

Common::String Mohawk::MohawkEngine_Myst::wrapMovieFilename ( const Common::String movieName,
uint16  stack 

Definition at line 203 of file myst.cpp.

Member Data Documentation

◆ _cache

ResourceCache Mohawk::MohawkEngine_Myst::_cache

Definition at line 207 of file myst.h.

◆ _card

MystCardPtr Mohawk::MohawkEngine_Myst::_card

Definition at line 211 of file myst.h.

◆ _currentCursor

uint16 Mohawk::MohawkEngine_Myst::_currentCursor

Definition at line 233 of file myst.h.

◆ _escapePressed

bool Mohawk::MohawkEngine_Myst::_escapePressed

Definition at line 230 of file myst.h.

◆ _gameState

MystGameState* Mohawk::MohawkEngine_Myst::_gameState

Definition at line 160 of file myst.h.

◆ _gfx

MystGraphics* Mohawk::MohawkEngine_Myst::_gfx

Definition at line 159 of file myst.h.

◆ _mainCursor

uint16 Mohawk::MohawkEngine_Myst::_mainCursor

Definition at line 234 of file myst.h.

◆ _mouseClicked

bool Mohawk::MohawkEngine_Myst::_mouseClicked

Definition at line 228 of file myst.h.

◆ _mouseMoved

bool Mohawk::MohawkEngine_Myst::_mouseMoved

Definition at line 229 of file myst.h.

◆ _optionsDialog

MystOptionsDialog* Mohawk::MohawkEngine_Myst::_optionsDialog

Definition at line 206 of file myst.h.

◆ _prevCard

MystCardPtr Mohawk::MohawkEngine_Myst::_prevCard

Definition at line 212 of file myst.h.

◆ _prevStack

MystScriptParserPtr Mohawk::MohawkEngine_Myst::_prevStack

Definition at line 209 of file myst.h.

◆ _rnd

Common::RandomSource* Mohawk::MohawkEngine_Myst::_rnd

Definition at line 162 of file myst.h.

◆ _showResourceRects

bool Mohawk::MohawkEngine_Myst::_showResourceRects

Definition at line 155 of file myst.h.

◆ _sound

MystSound* Mohawk::MohawkEngine_Myst::_sound

Definition at line 158 of file myst.h.

◆ _stack

MystScriptParserPtr Mohawk::MohawkEngine_Myst::_stack

Definition at line 161 of file myst.h.

◆ _video

VideoManager* Mohawk::MohawkEngine_Myst::_video

Definition at line 157 of file myst.h.

◆ _waitingOnBlockingOperation

bool Mohawk::MohawkEngine_Myst::_waitingOnBlockingOperation

Definition at line 231 of file myst.h.

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