aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBastien Bouclet2018-05-17 20:46:42 +0200
committerBastien Bouclet2018-05-17 20:49:28 +0200
commit4e774450869855e4fd990716db63370a66c2d108 (patch)
treee6f7213069eda64647f433675efb06ea25336225 /engines
parent6798f9c77ebe9c436c16cd1525554eb49bc1ba1d (diff)
downloadscummvm-rg350-4e774450869855e4fd990716db63370a66c2d108.tar.gz
scummvm-rg350-4e774450869855e4fd990716db63370a66c2d108.tar.bz2
scummvm-rg350-4e774450869855e4fd990716db63370a66c2d108.zip
MOHAWK: MYST: Opcode 102 in Channelwood can only set the volume to non 0 values
Fixes Trac#10532.
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/myst_stacks/channelwood.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/mohawk/myst_stacks/channelwood.cpp b/engines/mohawk/myst_stacks/channelwood.cpp
index d0b3d2a2da..726b3d6526 100644
--- a/engines/mohawk/myst_stacks/channelwood.cpp
+++ b/engines/mohawk/myst_stacks/channelwood.cpp
@@ -335,6 +335,7 @@ void Channelwood::o_pipeExtend(uint16 var, const ArgumentsArray &args) {
void Channelwood::o_drawImageChangeCardAndVolume(uint16 var, const ArgumentsArray &args) {
uint16 imageId = args[0];
uint16 cardId = args[1];
+ uint16 volume = args.size() == 3 ? args[2] : 0;
debugC(kDebugScript, "\timageId: %d", imageId);
debugC(kDebugScript, "\tcardId: %d", cardId);
@@ -344,8 +345,7 @@ void Channelwood::o_drawImageChangeCardAndVolume(uint16 var, const ArgumentsArra
_vm->changeToCard(cardId, kTransitionPartToLeft);
- if (args.size() == 3) {
- uint16 volume = args[2];
+ if (volume) {
_vm->_sound->changeBackgroundVolume(volume);
}
}