From 4e774450869855e4fd990716db63370a66c2d108 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Thu, 17 May 2018 20:46:42 +0200 Subject: MOHAWK: MYST: Opcode 102 in Channelwood can only set the volume to non 0 values Fixes Trac#10532. --- engines/mohawk/myst_stacks/channelwood.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') 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); } } -- cgit v1.2.3