aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/inter.cpp
diff options
context:
space:
mode:
authorSven Hesse2012-06-15 13:32:43 +0200
committerSven Hesse2012-06-15 13:35:46 +0200
commit7632246264102d88922fc963284af6250ea12f57 (patch)
tree8316a8fd8b7522b83a350e908195331730bc9081 /engines/gob/inter.cpp
parentc668431522d834b24c00baf964d2b6b3f3a2bbb8 (diff)
downloadscummvm-rg350-7632246264102d88922fc963284af6250ea12f57.tar.gz
scummvm-rg350-7632246264102d88922fc963284af6250ea12f57.tar.bz2
scummvm-rg350-7632246264102d88922fc963284af6250ea12f57.zip
GOB: Implement Util::getKeyState() for Little Red
This makes the bees level playable, removing the "lock-up". Collision detection between Little Red and the bees and butterflies doesn't work yet though, so they're just flying through her. Nevertheless, the game seems to be completable now.
Diffstat (limited to 'engines/gob/inter.cpp')
-rw-r--r--engines/gob/inter.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp
index 9df3c06c74..843c0bff48 100644
--- a/engines/gob/inter.cpp
+++ b/engines/gob/inter.cpp
@@ -52,6 +52,7 @@ Inter::Inter(GobEngine *vm) : _vm(vm), _varStack(600) {
_soundEndTimeKey = 0;
_soundStopVal = 0;
+ _lastBusyWait = 0;
_noBusyWait = false;
_variables = 0;
@@ -452,4 +453,15 @@ uint32 Inter::readValue(uint16 index, uint16 type) {
return 0;
}
+void Inter::handleBusyWait() {
+ uint32 now = _vm->_util->getTimeKey();
+
+ if (!_noBusyWait)
+ if ((now - _lastBusyWait) <= 20)
+ _vm->_util->longDelay(1);
+
+ _lastBusyWait = now;
+ _noBusyWait = false;
+}
+
} // End of namespace Gob