aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb/hdb.h
diff options
context:
space:
mode:
authorNipun Garg2019-06-21 09:35:23 +0530
committerEugene Sandulenko2019-09-03 17:16:54 +0200
commitb913a3632d80dfed276c325de8cae622f35873ff (patch)
tree44846c2f7b984ba5b2e7c3442c5a4e2d1cca0fa4 /engines/hdb/hdb.h
parentaec87e7058c788e7d37d1e639056d616b1ff56e2 (diff)
downloadscummvm-rg350-b913a3632d80dfed276c325de8cae622f35873ff.tar.gz
scummvm-rg350-b913a3632d80dfed276c325de8cae622f35873ff.tar.bz2
scummvm-rg350-b913a3632d80dfed276c325de8cae622f35873ff.zip
HDB: Add time-keeping functions
Diffstat (limited to 'engines/hdb/hdb.h')
-rw-r--r--engines/hdb/hdb.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h
index ede41bae9e..b748101894 100644
--- a/engines/hdb/hdb.h
+++ b/engines/hdb/hdb.h
@@ -134,10 +134,31 @@ public:
_actionMode = status;
}
+ void resetTimer() {
+ _timePlayed = _timeSeconds = 0;
+ }
+
+ uint16 getTime() {
+ return _timePlayed / 1000;
+ }
+
+ uint16 getTimeSlice() {
+ return _timeSlice;
+ }
+
+ uint16 getTimeSliceDelta() {
+ return _timeSlice - _prevTimeSlice;
+ }
+
bool _gameShutdown;
Graphics::PixelFormat _format;
private:
+
+ uint32 _timePlayed;
+ uint32 _timeSlice, _prevTimeSlice;
+ uint32 _timeSeconds;
+
Console *_console;
// Game Variables