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.
This commit is contained in:
Torbjörn Andersson 2022-03-16 15:43:05 +01:00 committed by Torbjörn Andersson
parent be3e42a2bb
commit 041605f44c

View file

@ -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() {