aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2012-01-08 20:11:22 +0100
committerTorbjörn Andersson2012-01-08 20:11:22 +0100
commit209012a88ea89aef380f856a3d795685925ed269 (patch)
tree339e43bce52f85872e7df754b506edf775720e05 /engines
parentfb26f7dcfa2987706f669882135c7648d365e696 (diff)
downloadscummvm-rg350-209012a88ea89aef380f856a3d795685925ed269.tar.gz
scummvm-rg350-209012a88ea89aef380f856a3d795685925ed269.tar.bz2
scummvm-rg350-209012a88ea89aef380f856a3d795685925ed269.zip
SCUMM: Work around script bug in The Dig
The sound of trickling water in the spider lair is started, but never explicitly stopped, so it keeps going. (Possibly not forever. When I tried it in DOSBox, it finally stopped when I got back to the Nexus.) The same sound effect is used the underwater cavern, and in that case the exit script does fade out the sound so this workaround emulates that behaviour.
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/script.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index cfc4b3c419..c9e3edd728 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 };
+ _sound->soundKludge(scriptCmds, ARRAYSIZE(scriptCmds));
+ }
+#endif
}
void ScummEngine::runEntryScript() {