aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/timer.cpp')
-rw-r--r--engines/kyra/timer.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp
index d14b22ef11..a2d5a0c7d9 100644
--- a/engines/kyra/timer.cpp
+++ b/engines/kyra/timer.cpp
@@ -164,6 +164,18 @@ int32 TimerManager::getDelay(uint8 id) const {
return -1;
}
+void TimerManager::setNextRun(uint8 id, uint32 nextRun) {
+ debugC(9, kDebugLevelTimer, "TimerManager::setNextRun(%d, %u)", id, nextRun);
+
+ Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
+ if (timer != _timers.end()) {
+ timer->nextRun = nextRun;
+ return;
+ }
+
+ warning("TimerManager::getNextRun: No timer %d", id);
+}
+
uint32 TimerManager::getNextRun(uint8 id) const {
debugC(9, kDebugLevelTimer, "TimerManager::getNextRun(%d)", id);