aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-02-20 23:06:49 +0100
committeruruk2014-02-20 23:06:49 +0100
commita3d4908e53d812cfcc2fd93fbb067345afa577c6 (patch)
tree6a0a4558c5991926924183a38024ddc4bbdf139d
parent614006c1e575df5ca03059669e435aedd64e8db1 (diff)
downloadscummvm-rg350-a3d4908e53d812cfcc2fd93fbb067345afa577c6.tar.gz
scummvm-rg350-a3d4908e53d812cfcc2fd93fbb067345afa577c6.tar.bz2
scummvm-rg350-a3d4908e53d812cfcc2fd93fbb067345afa577c6.zip
AVALANCHE: Put a necessary delay into ShootEmUp's main loop.
-rw-r--r--engines/avalanche/shootemup.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/avalanche/shootemup.cpp b/engines/avalanche/shootemup.cpp
index 5f48c2f6dd..02d65772ae 100644
--- a/engines/avalanche/shootemup.cpp
+++ b/engines/avalanche/shootemup.cpp
@@ -116,6 +116,8 @@ void ShootEmUp::run() {
setup();
do {
+ uint32 beginLoop = _vm->_system->getMillis();
+
blankIt();
hitPeople();
plotThem();
@@ -133,6 +135,11 @@ void ShootEmUp::run() {
_cp = !_cp;
_vm->_graphics->refreshScreen();
+
+ uint32 delay = _vm->_system->getMillis() - beginLoop;
+ if (delay <= 55)
+ _vm->_system->delayMillis(55 - delay); // Replaces slowdown(); 55 comes from 18.2 Hz (B Flight).
+
} while (_time != 0);
_vm->fadeOut();