From 041605f44c7ba056581b4e78cd66ae528128f11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Andersson?= Date: Wed, 16 Mar 2022 15:43:05 +0100 Subject: [PATCH] SCUMM: Play outdoors sound in CD version of MI1 during Smirk close-up You're both still outside, so it doesn't make sense for the background sound to suddenly stop. I guess the makers of the Special Edition agree, because there the sound doesn't stop either. --- engines/scumm/script_v5.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp index 70c7198bfbf..ba5545ccd01 100644 --- a/engines/scumm/script_v5.cpp +++ b/engines/scumm/script_v5.cpp @@ -2307,7 +2307,22 @@ void ScummEngine_v5::o5_stopMusic() { } void ScummEngine_v5::o5_stopSound() { - _sound->stopSound(getVarOrDirectByte(PARAM_1)); + int sound = getVarOrDirectByte(PARAM_1); + + // WORKAROUND: Don't stop the background audio when showing the close-up + // of captain Smirk. You are still outdoors, so it makes more sense if + // they keep playing like they do in the Special Edition. (Though there + // the background makes it more obvious.) + // + // The sound is stopped by the exit script, which always has number + // 10001 regardless of which room it is. We figure out which one by + // looking at which rooms we're moving between. + + if (_game.id == GID_MONKEY && (_game.features & GF_AUDIOTRACKS) && sound == 126 && vm.slot[_currentScript].number == 10001 && VAR(VAR_ROOM) == 43 && VAR(VAR_NEW_ROOM) == 76) { + return; + } + + _sound->stopSound(sound); } void ScummEngine_v5::o5_isSoundRunning() {