aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/time.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/bladerunner/time.cpp')
-rw-r--r--engines/bladerunner/time.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/bladerunner/time.cpp b/engines/bladerunner/time.cpp
index 5d82a0cd55..ff7b6a78b5 100644
--- a/engines/bladerunner/time.cpp
+++ b/engines/bladerunner/time.cpp
@@ -70,4 +70,13 @@ bool Time::isLocked() {
return _pauseCount > 0;
}
+// To be called before loading a new game, since
+// the offset should be reset to zero and _pauseStart should be current() (ie currentSystem() - _start)
+// TODO Explore if it would make sense to only use the Engine methods for time accounting (pauseEngine, get/setTotalPlatTime)
+// or do we need separated/independent time accounting and pausing?
+void Time::resetPauseStart() {
+ _offset = 0;
+ _pauseStart = current();
+}
+
} // End of namespace BladeRunner