aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Bouclet2016-01-12 19:34:28 +0100
committerBastien Bouclet2016-01-12 19:34:28 +0100
commit7be4a743054db6bbde68fafb577130c3f4aa5289 (patch)
treee5cfb52371e3c86a105bff8810114bd53d14fbf8
parent273304d9ad28c2b8d2396f26f787976ebda0ae6a (diff)
downloadscummvm-rg350-7be4a743054db6bbde68fafb577130c3f4aa5289.tar.gz
scummvm-rg350-7be4a743054db6bbde68fafb577130c3f4aa5289.tar.bz2
scummvm-rg350-7be4a743054db6bbde68fafb577130c3f4aa5289.zip
MOHAWK: Fix incorrect condition in Myst's sound block opcode
-rw-r--r--engines/mohawk/myst_scripts.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/engines/mohawk/myst_scripts.cpp b/engines/mohawk/myst_scripts.cpp
index 41e066064e..487d0f45fe 100644
--- a/engines/mohawk/myst_scripts.cpp
+++ b/engines/mohawk/myst_scripts.cpp
@@ -721,9 +721,7 @@ void MystScriptParser::o_changeBackgroundSound(uint16 op, uint16 var, uint16 arg
for (uint16 i = 0; i < condCount; i++) {
soundList[i] = argv[decodeIdx++];
debugC(kDebugScript, "\t\tCondition %d: Action %d", i, soundList[i]);
- // CHECKME: At this point, soundAction is always kMystSoundActionConditional (-4)
- // The soundListVolume is therefore always set to 65535
- if (soundAction == kMystSoundActionChangeVolume || soundAction > 0) {
+ if (soundList[i] == kMystSoundActionChangeVolume || soundList[i] > 0) {
soundListVolume[i] = argv[decodeIdx++];
} else
soundListVolume[i] = 65535;