diff options
author | Torbjörn Andersson | 2012-01-14 00:56:03 -0800 |
---|---|---|
committer | Torbjörn Andersson | 2012-01-14 00:56:03 -0800 |
commit | 96571d9a7e05338ddb93f4b384e017100beebf65 (patch) | |
tree | ab5ed67f981d28edbe90776e3ccc976824c4594d | |
parent | 4594982ce323d323092927fd336a98dd5acdb11c (diff) | |
parent | 28d5922ccaf909dc52688d41da255dff44078a35 (diff) | |
download | scummvm-rg350-96571d9a7e05338ddb93f4b384e017100beebf65.tar.gz scummvm-rg350-96571d9a7e05338ddb93f4b384e017100beebf65.tar.bz2 scummvm-rg350-96571d9a7e05338ddb93f4b384e017100beebf65.zip |
Merge pull request #165 from eriktorbjorn/dig-workaround
SCUMM: Work around spider lair script bug in The Dig
When entering the spider lair, the entry script may optionally start
the sound of running water. However, this sound is never explicitly
stopped, so it may continue for quite a while. (When I tried it with
DOSBox, it didn't stop until I got back to the Nexus.) This workaround
adds a fade-out to the sound when the exit script is about to run.
This is consistent with how that same sound effect is faded out in the
underwater cavern (room 33).
-rw-r--r-- | engines/scumm/script.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp index cfc4b3c419..37ea3a9a9f 100644 --- a/engines/scumm/script.cpp +++ b/engines/scumm/script.cpp @@ -29,6 +29,7 @@ #include "scumm/resource.h" #include "scumm/util.h" #include "scumm/scumm_v2.h" +#include "scumm/sound.h" #include "scumm/verbs.h" namespace Scumm { @@ -935,6 +936,17 @@ void ScummEngine::runExitScript() { } if (VAR_EXIT_SCRIPT2 != 0xFF && VAR(VAR_EXIT_SCRIPT2)) runScript(VAR(VAR_EXIT_SCRIPT2), 0, 0, 0); + +#ifdef ENABLE_SCUMM_7_8 + // WORKAROUND: The spider lair (room 44) will optionally play the sound + // of trickling water (sound 215), but it never stops it. The same sound + // effect is also used in room 33, so let's do the same fade out that it + // does in that room's exit script. + if (_game.id == GID_DIG && _currentRoom == 44) { + int scriptCmds[] = { 14, 215, 0x600, 0, 30, 0, 0, 0 }; + _sound->soundKludge(scriptCmds, ARRAYSIZE(scriptCmds)); + } +#endif } void ScummEngine::runEntryScript() { |