aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2017-07-23 12:32:11 +0200
committerThierry Crozat2018-01-23 00:00:12 +0000
commit0627ca35cb3126bcb52595017fc947c6aafdb2ea (patch)
treec35e03ba9e721a1ff93df682441583b840eef8d7 /engines
parent30c5c852435e6f507599934d03bd7fed11367948 (diff)
downloadscummvm-rg350-0627ca35cb3126bcb52595017fc947c6aafdb2ea.tar.gz
scummvm-rg350-0627ca35cb3126bcb52595017fc947c6aafdb2ea.tar.bz2
scummvm-rg350-0627ca35cb3126bcb52595017fc947c6aafdb2ea.zip
SUPERNOVA: Implements delay for animations
Diffstat (limited to 'engines')
-rw-r--r--engines/supernova/state.cpp10
-rw-r--r--engines/supernova/state.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp
index b90e816e89..2b79bb1aed 100644
--- a/engines/supernova/state.cpp
+++ b/engines/supernova/state.cpp
@@ -550,8 +550,14 @@ void GameManager::errorTemp() {
// STUB
}
-void GameManager::wait2(int delay) {
- // STUB
+void GameManager::wait2(int ticks) {
+ // 1 tick = 1/18.2s
+ uint end = g_system->getMillis() + (55 * ticks);
+ while (g_system->getMillis() < end) {
+ _vm->updateEvents();
+ g_system->updateScreen();
+ g_system->delayMillis(_vm->_delay);
+ }
}
void GameManager::screenShake() {
diff --git a/engines/supernova/state.h b/engines/supernova/state.h
index 6678a26a92..70015e4929 100644
--- a/engines/supernova/state.h
+++ b/engines/supernova/state.h
@@ -141,7 +141,7 @@ public:
void mouseInput2();
void mouseInput3();
void mouseWait(int delay);
- void wait2(int delay);
+ void wait2(int ticks);
void turnOff();
void turnOn();
void screenShake();