aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTobias Gunkel2012-01-17 22:52:59 +0100
committerTobias Gunkel2012-02-11 08:28:54 +0100
commit0bae642453caeef9c6af9c49f043f46eebd0f787 (patch)
tree2bbc11ba715b670a2095ad8e9714efe6cad4313d /engines
parent4519e56e5c018459c408e20e7469d35b6ac7ed44 (diff)
downloadscummvm-rg350-0bae642453caeef9c6af9c49f043f46eebd0f787.tar.gz
scummvm-rg350-0bae642453caeef9c6af9c49f043f46eebd0f787.tar.bz2
scummvm-rg350-0bae642453caeef9c6af9c49f043f46eebd0f787.zip
SCUMM: 2nd try to fix dungeon door timing
Shorten the timer delay does not work as escaping with a second kid is not possible too. Instead decrease engine speed during script execution.
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/script_v2.cpp11
-rw-r--r--engines/scumm/scumm.cpp8
2 files changed, 8 insertions, 11 deletions
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index c35ddea64d..6f6138d411 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -1433,17 +1433,6 @@ void ScummEngine_v2::o2_delay() {
delay |= fetchScriptByte() << 16;
delay = 0xFFFFFF - delay;
- // WORKAROUND: walking speed in the original v0/v1 interpreter
- // is sometimes slower (e.g. during scrolling) than in ScummVM.
- // Hence, the delay for the door-closing action in the dungeon
- // is to long, so a single kid is able to escape -> shorten delay.
- int script = vm.slot[_currentScript].number;
- if ((_game.version == 0 && script == 132) ||
- (_game.version == 1 && script == 137)) {
- if (delay == 180)
- delay = 120;
- }
-
vm.slot[_currentScript].delay = delay;
vm.slot[_currentScript].status = ssPaused;
o5_breakHere();
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index f2db5ad6ba..61d38dc593 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1964,6 +1964,14 @@ Common::Error ScummEngine::go() {
if (delta < 1) // Ensure we don't get into an endless loop
delta = 1; // by not decreasing sleepers.
+ // WORKAROUND: walking speed in the original v0/v1 interpreter
+ // is sometimes slower (e.g. during scrolling) than in ScummVM.
+ // This is important for the door-closing action in the dungeon,
+ // otherwise (delta < 6) a single kid is able to escape.
+ if ((_game.version == 0 && isScriptRunning(132)) ||
+ (_game.version == 1 && isScriptRunning(137)))
+ delta = 6;
+
// Wait...
waitForTimer(delta * 1000 / 60 - diff);