aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/inter_v1.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_v1.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_v1.cpp')
-rw-r--r--engines/gob/inter_v1.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp
index 3652637e32..dc533a210a 100644
--- a/engines/gob/inter_v1.cpp
+++ b/engines/gob/inter_v1.cpp
@@ -1189,26 +1189,15 @@ void Inter_v1::o1_palLoad(OpFuncParams &params) {
}
void Inter_v1::o1_keyFunc(OpFuncParams &params) {
- static uint32 lastCalled = 0;
- int16 cmd;
- int16 key;
- uint32 now;
-
if (!_vm->_vidPlayer->isPlayingLive()) {
_vm->_draw->forceBlit();
_vm->_video->retrace();
}
- cmd = _vm->_game->_script->readInt16();
animPalette();
_vm->_draw->blitInvalidated();
- now = _vm->_util->getTimeKey();
- if (!_noBusyWait)
- if ((now - lastCalled) <= 20)
- _vm->_util->longDelay(1);
- lastCalled = now;
- _noBusyWait = false;
+ handleBusyWait();
// WORKAROUND for bug #1726130: Ween busy-waits in the intro for a counter
// to become 5000. We deliberately slow down busy-waiting, so we shorten
@@ -1217,6 +1206,9 @@ void Inter_v1::o1_keyFunc(OpFuncParams &params) {
(_vm->_game->_script->pos() == 729) && _vm->isCurrentTot("intro5.tot"))
WRITE_VAR(59, 4000);
+ int16 cmd = _vm->_game->_script->readInt16();
+ int16 key;
+
switch (cmd) {
case -1:
break;