diff options
Diffstat (limited to 'engines/engine.h')
-rw-r--r-- | engines/engine.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/engines/engine.h b/engines/engine.h index ead1526d72..b4764319b8 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -74,6 +74,17 @@ private: */ int _pauseLevel; + /** + * The time when the pause was started. + */ + uint32 _pauseStartTime; + + /** + * The time when the engine was started. This value is used to calculate + * the current play time of the game running. + */ + int32 _engineStartTime; + public: @@ -234,6 +245,24 @@ public: */ void openMainMenuDialog(); + /** + * Get the total play time. + * + * @return How long the player has been playing in ms. + */ + uint32 getTotalPlayTime() const; + + /** + * Set the game time counter to the specified time. + * + * This can be used to set the play time counter after loading a savegame + * for example. Another use case is in case the engine wants to exclude + * time from the counter the user spent in original engine dialogs. + * + * @param time Play time to set up in ms. + */ + void setTotalPlayTime(uint32 time = 0); + inline Common::TimerManager *getTimerManager() { return _timer; } inline Common::EventManager *getEventManager() { return _eventMan; } inline Common::SaveFileManager *getSaveFileManager() { return _saveFileMan; } |