ScummVM
Mohawk::MohawkEngine_CSTime Class Reference

#include <cstime.h>

+ Inheritance diagram for Mohawk::MohawkEngine_CSTime:
+ Collaboration diagram for Mohawk::MohawkEngine_CSTime:

Public Member Functions

 MohawkEngine_CSTime (OSystem *syst, const MohawkGameDescription *gamedesc)
 
 ~MohawkEngine_CSTime () override
 
CSTimeViewgetView ()
 
CSTimeCasegetCase ()
 
CSTimeInterfacegetInterface ()
 
void loadResourceFile (Common::String name)
 
void addEvent (const CSTimeEvent &event)
 
void addEventList (const Common::Array< CSTimeEvent > &list)
 
void insertEventAtFront (const CSTimeEvent &event)
 
uint16 getCurrentEventType ()
 
void eventIdle ()
 
void resetTimeout ()
 
void mouseClicked ()
 
bool NISIsRunning ()
 
- 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 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

Common::RandomSource_rnd
 
VideoManager_video
 
Sound_sound
 
CSTimeGraphics_gfx
 
bool _needsUpdate
 
uint16 _haveInvItem [19]
 
uint16 _caseVariable [20]
 
- Public Attributes inherited from Mohawk::MohawkEngine
const MohawkGameDescription_gameDescription
 
CursorManager_cursor
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Member Functions

Common::Error run () override
 Init the engine and start its main loop. More...
 
- Protected Member Functions inherited from Mohawk::MohawkEngine
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

void initCase ()
 
void nextScene ()
 
void update ()
 
void reset ()
 
void triggerEvent (CSTimeEvent &event)
 
void pauseEngineIntern (bool) override
 Actual implementation of pauseEngine by subclasses. More...
 

Private Attributes

CSTimeCase_case
 
CSTimeInterface_interface
 
CSTimeView_view
 
CSTimeState _state
 
uint16 _nextSceneId
 
bool _processingEvent
 
bool _processingNIS55
 
bool _NISRunning
 
uint32 _lastTimeout
 
Common::List< CSTimeEvent_events
 

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

Detailed Description

Definition at line 130 of file cstime.h.

Constructor & Destructor Documentation

◆ MohawkEngine_CSTime()

Mohawk::MohawkEngine_CSTime::MohawkEngine_CSTime ( OSystem syst,
const MohawkGameDescription gamedesc 
)

Definition at line 41 of file cstime.cpp.

◆ ~MohawkEngine_CSTime()

Mohawk::MohawkEngine_CSTime::~MohawkEngine_CSTime ( )
override

Definition at line 66 of file cstime.cpp.

Member Function Documentation

◆ addEvent()

void Mohawk::MohawkEngine_CSTime::addEvent ( const CSTimeEvent event)

Definition at line 249 of file cstime.cpp.

◆ addEventList()

void Mohawk::MohawkEngine_CSTime::addEventList ( const Common::Array< CSTimeEvent > &  list)

Definition at line 253 of file cstime.cpp.

◆ eventIdle()

void Mohawk::MohawkEngine_CSTime::eventIdle ( )

Definition at line 272 of file cstime.cpp.

◆ getCase()

CSTimeCase* Mohawk::MohawkEngine_CSTime::getCase ( )
inline

Definition at line 146 of file cstime.h.

◆ getCurrentEventType()

uint16 Mohawk::MohawkEngine_CSTime::getCurrentEventType ( )

Definition at line 265 of file cstime.cpp.

◆ getInterface()

CSTimeInterface* Mohawk::MohawkEngine_CSTime::getInterface ( )
inline

Definition at line 147 of file cstime.h.

◆ getView()

CSTimeView* Mohawk::MohawkEngine_CSTime::getView ( )
inline

Definition at line 145 of file cstime.h.

◆ initCase()

void Mohawk::MohawkEngine_CSTime::initCase ( )
private

Definition at line 199 of file cstime.cpp.

◆ insertEventAtFront()

void Mohawk::MohawkEngine_CSTime::insertEventAtFront ( const CSTimeEvent event)

Definition at line 258 of file cstime.cpp.

◆ loadResourceFile()

void Mohawk::MohawkEngine_CSTime::loadResourceFile ( Common::String  name)

Definition at line 242 of file cstime.cpp.

◆ mouseClicked()

void Mohawk::MohawkEngine_CSTime::mouseClicked ( )

Definition at line 377 of file cstime.cpp.

◆ nextScene()

void Mohawk::MohawkEngine_CSTime::nextScene ( )
private

Definition at line 218 of file cstime.cpp.

◆ NISIsRunning()

bool Mohawk::MohawkEngine_CSTime::NISIsRunning ( )

Definition at line 381 of file cstime.cpp.

◆ pauseEngineIntern()

void Mohawk::MohawkEngine_CSTime::pauseEngineIntern ( bool  pause)
overrideprivatevirtual

Actual implementation of pauseEngine by subclasses.

See there for details.

Reimplemented from Engine.

Definition at line 188 of file cstime.cpp.

◆ reset()

void Mohawk::MohawkEngine_CSTime::reset ( )
private

Definition at line 388 of file cstime.cpp.

◆ resetTimeout()

void Mohawk::MohawkEngine_CSTime::resetTimeout ( )

Definition at line 373 of file cstime.cpp.

◆ run()

Common::Error Mohawk::MohawkEngine_CSTime::run ( )
overrideprotectedvirtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 75 of file cstime.cpp.

◆ triggerEvent()

void Mohawk::MohawkEngine_CSTime::triggerEvent ( CSTimeEvent event)
private

Definition at line 395 of file cstime.cpp.

◆ update()

void Mohawk::MohawkEngine_CSTime::update ( )
private

Definition at line 123 of file cstime.cpp.

Member Data Documentation

◆ _case

CSTimeCase* Mohawk::MohawkEngine_CSTime::_case
private

Definition at line 164 of file cstime.h.

◆ _caseVariable

uint16 Mohawk::MohawkEngine_CSTime::_caseVariable[20]

Definition at line 161 of file cstime.h.

◆ _events

Common::List<CSTimeEvent> Mohawk::MohawkEngine_CSTime::_events
private

Definition at line 182 of file cstime.h.

◆ _gfx

CSTimeGraphics* Mohawk::MohawkEngine_CSTime::_gfx

Definition at line 142 of file cstime.h.

◆ _haveInvItem

uint16 Mohawk::MohawkEngine_CSTime::_haveInvItem[19]

Definition at line 160 of file cstime.h.

◆ _interface

CSTimeInterface* Mohawk::MohawkEngine_CSTime::_interface
private

Definition at line 165 of file cstime.h.

◆ _lastTimeout

uint32 Mohawk::MohawkEngine_CSTime::_lastTimeout
private

Definition at line 179 of file cstime.h.

◆ _needsUpdate

bool Mohawk::MohawkEngine_CSTime::_needsUpdate

Definition at line 143 of file cstime.h.

◆ _nextSceneId

uint16 Mohawk::MohawkEngine_CSTime::_nextSceneId
private

Definition at line 174 of file cstime.h.

◆ _NISRunning

bool Mohawk::MohawkEngine_CSTime::_NISRunning
private

Definition at line 178 of file cstime.h.

◆ _processingEvent

bool Mohawk::MohawkEngine_CSTime::_processingEvent
private

Definition at line 176 of file cstime.h.

◆ _processingNIS55

bool Mohawk::MohawkEngine_CSTime::_processingNIS55
private

Definition at line 177 of file cstime.h.

◆ _rnd

Common::RandomSource* Mohawk::MohawkEngine_CSTime::_rnd

Definition at line 138 of file cstime.h.

◆ _sound

Sound* Mohawk::MohawkEngine_CSTime::_sound

Definition at line 141 of file cstime.h.

◆ _state

CSTimeState Mohawk::MohawkEngine_CSTime::_state
private

Definition at line 168 of file cstime.h.

◆ _video

VideoManager* Mohawk::MohawkEngine_CSTime::_video

Definition at line 140 of file cstime.h.

◆ _view

CSTimeView* Mohawk::MohawkEngine_CSTime::_view
private

Definition at line 166 of file cstime.h.


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