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 waitUntilMovieEnds (const VideoEntryPtr &video)
Common::String selectLocalizedMovieFilename (const Common::String &movieName)
void playSoundBlocking (uint16 id)
GUI::DebuggergetDebugger () override
 Return the engine's debugger instance, if any. More...
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) override
 Save a game state. More...
void tryAutoSaving ()
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
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 _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)
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...

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
uint32 _lastSaveTime
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...
- 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 128 of file myst.h.

Constructor & Destructor Documentation

◆ MohawkEngine_Myst()

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

Definition at line 61 of file myst.cpp.

◆ ~MohawkEngine_Myst()

Mohawk::MohawkEngine_Myst::~MohawkEngine_Myst ( )

Definition at line 93 of file myst.cpp.

Member Function Documentation

◆ applySoundBlock()

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

Definition at line 1075 of file myst.cpp.

◆ cachePreload()

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

Definition at line 132 of file myst.cpp.

◆ canLoadGameStateCurrently()

bool Mohawk::MohawkEngine_Myst::canLoadGameStateCurrently ( )

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 920 of file myst.cpp.

◆ canSaveGameStateCurrently()

bool Mohawk::MohawkEngine_Myst::canSaveGameStateCurrently ( )

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 941 of file myst.cpp.

◆ changeToCard()

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

Definition at line 771 of file myst.cpp.

◆ changeToStack()

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

Definition at line 678 of file myst.cpp.

◆ doFrame()

void Mohawk::MohawkEngine_Myst::doFrame ( )

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

Definition at line 459 of file myst.cpp.

◆ dropPage()

void Mohawk::MohawkEngine_Myst::dropPage ( )

Definition at line 992 of file myst.cpp.

◆ findVideo()

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

Definition at line 263 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.

◆ getDebugger()

GUI::Debugger* Mohawk::MohawkEngine_Myst::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 180 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 106 of file myst.cpp.

◆ getResourceIDList()

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

Definition at line 122 of file myst.cpp.

◆ goToMainMenu()

void Mohawk::MohawkEngine_Myst::goToMainMenu ( )

Definition at line 1108 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 117 of file detection.cpp.

◆ hasGameSaveSupport()

bool Mohawk::MohawkEngine_Myst::hasGameSaveSupport ( ) const

Definition at line 912 of file myst.cpp.

◆ isGameStarted()

bool Mohawk::MohawkEngine_Myst::isGameStarted ( ) const

Definition at line 1132 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 916 of file myst.cpp.

◆ loadArchive()

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

Definition at line 438 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 874 of file myst.cpp.

◆ loadResource()

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

Definition at line 834 of file myst.cpp.

◆ loadStackArchives()

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

Definition at line 408 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 665 of file myst.cpp.

◆ playFlybyMovie()

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

Definition at line 282 of file myst.cpp.

◆ playMovie()

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

Definition at line 242 of file myst.cpp.

◆ playMovieBlocking()

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

Definition at line 269 of file myst.cpp.

◆ playMovieFullscreen()

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

Definition at line 254 of file myst.cpp.

◆ playSoundBlocking()

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

Definition at line 352 of file myst.cpp.

◆ readSoundBlock()

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

Definition at line 1031 of file myst.cpp.

◆ redrawResource()

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

Definition at line 830 of file myst.cpp.

◆ refreshCursor()

void Mohawk::MohawkEngine_Myst::refreshCursor ( )

Definition at line 818 of file myst.cpp.

◆ resumeFromMainMenu()

void Mohawk::MohawkEngine_Myst::resumeFromMainMenu ( )

Definition at line 1136 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 362 of file myst.cpp.

◆ runLoadDialog()

void Mohawk::MohawkEngine_Myst::runLoadDialog ( )

Definition at line 962 of file myst.cpp.

◆ runOptionsDialog()

void Mohawk::MohawkEngine_Myst::runOptionsDialog ( )

Definition at line 573 of file myst.cpp.

◆ runSaveDialog()

void Mohawk::MohawkEngine_Myst::runSaveDialog ( )

Definition at line 974 of file myst.cpp.

◆ saveGameState()

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

◆ selectLocalizedMovieFilename()

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

Definition at line 228 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 813 of file myst.cpp.

◆ tryAutoSaving()

void Mohawk::MohawkEngine_Myst::tryAutoSaving ( )

Definition at line 892 of file myst.cpp.

◆ wait()

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

Definition at line 648 of file myst.cpp.

◆ waitUntilMovieEnds()

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

Definition at line 327 of file myst.cpp.

◆ wrapMovieFilename()

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

Definition at line 191 of file myst.cpp.

Member Data Documentation

◆ _cache

ResourceCache Mohawk::MohawkEngine_Myst::_cache

Definition at line 205 of file myst.h.

◆ _card

MystCardPtr Mohawk::MohawkEngine_Myst::_card

Definition at line 209 of file myst.h.

◆ _console

MystConsole* Mohawk::MohawkEngine_Myst::_console

Definition at line 203 of file myst.h.

◆ _currentCursor

uint16 Mohawk::MohawkEngine_Myst::_currentCursor

Definition at line 232 of file myst.h.

◆ _escapePressed

bool Mohawk::MohawkEngine_Myst::_escapePressed

Definition at line 229 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.

◆ _lastSaveTime

uint32 Mohawk::MohawkEngine_Myst::_lastSaveTime

Definition at line 211 of file myst.h.

◆ _mainCursor

uint16 Mohawk::MohawkEngine_Myst::_mainCursor

Definition at line 233 of file myst.h.

◆ _mouseClicked

bool Mohawk::MohawkEngine_Myst::_mouseClicked

Definition at line 227 of file myst.h.

◆ _mouseMoved

bool Mohawk::MohawkEngine_Myst::_mouseMoved

Definition at line 228 of file myst.h.

◆ _optionsDialog

MystOptionsDialog* Mohawk::MohawkEngine_Myst::_optionsDialog

Definition at line 204 of file myst.h.

◆ _prevCard

MystCardPtr Mohawk::MohawkEngine_Myst::_prevCard

Definition at line 210 of file myst.h.

◆ _prevStack

MystScriptParserPtr Mohawk::MohawkEngine_Myst::_prevStack

Definition at line 207 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 230 of file myst.h.

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