aboutsummaryrefslogtreecommitdiff
path: root/engines/dm/dm.cpp
diff options
context:
space:
mode:
authorBendegúz Nagy2016-07-13 19:12:55 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit75fe72b27cd2a76a2ecee8f0476a9ef089e6d857 (patch)
tree71fc95622ee41e58a9936bc09fa346d38bb9a992 /engines/dm/dm.cpp
parentb092e74be9c275db8adb04a98c5146a6923e4f43 (diff)
downloadscummvm-rg350-75fe72b27cd2a76a2ecee8f0476a9ef089e6d857.tar.gz
scummvm-rg350-75fe72b27cd2a76a2ecee8f0476a9ef089e6d857.tar.bz2
scummvm-rg350-75fe72b27cd2a76a2ecee8f0476a9ef089e6d857.zip
DM: Add input timeout and fix movement after throwing a projectile
Diffstat (limited to 'engines/dm/dm.cpp')
-rw-r--r--engines/dm/dm.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index 194bfa2a8a..6a50e3eade 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -369,9 +369,6 @@ T0002002:
if (!(_g313_gameTime & 511))
_inventoryMan->f338_decreaseTorchesLightPower();
- if (_g310_disabledMovementTicks)
- _g310_disabledMovementTicks--;
-
if (_championMan->_g407_party._freezeLifeTicks)
_championMan->_g407_party._freezeLifeTicks -= 1;
@@ -384,10 +381,12 @@ T0002002:
if (_g310_disabledMovementTicks)
_g310_disabledMovementTicks--;
- // F0044_TEXT_MESSAGEAREA_ClearExpiredRows();
+ if (_g311_projectileDisableMovementTicks)
+ _g311_projectileDisableMovementTicks--;
+ // F0044_TEXT_MESSAGEAREA_ClearExpiredRows();
_g321_stopWaitingForPlayerInput = false;
-
+ uint16 vblankCounter = 0;
do {
_eventMan->processInput();
@@ -406,9 +405,12 @@ T0002002:
// if (!_vm->_g321_stopWaitingForPlayerInput) {
// F0363_COMMAND_HighlightBoxDisable();
// }
- } while (!_g321_stopWaitingForPlayerInput || !_g301_gameTimeTicking);
- _system->delayMillis(18);
+ _system->delayMillis(2);
+ if (++vblankCounter >= _g318_waitForInputMaxVerticalBlankCount * 5)
+ _g321_stopWaitingForPlayerInput = true;
+
+ } while (!_g321_stopWaitingForPlayerInput || !_g301_gameTimeTicking);
}
}