From d58f594755449f6a0402fdf5dba61cfa5edcf58e Mon Sep 17 00:00:00 2001 From: Ben Castricum Date: Fri, 16 Jun 2017 08:16:30 +0200 Subject: SCUMM: MI2 kill tune 113 on start of next, Fixes bug #1410 / Booty Island Fix the "MI2: Two soundtracks playing at once" bug from the bug tracker. It's triggered when the player enters the kiosk for the second time and leaves before tune 113 is started. --- engines/scumm/imuse/imuse.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'engines/scumm') diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp index 78fd821f30..b7b72ba181 100644 --- a/engines/scumm/imuse/imuse.cpp +++ b/engines/scumm/imuse/imuse.cpp @@ -696,6 +696,23 @@ bool IMuseInternal::startSound_internal(int sound, int offset) { if (_game_id == GID_MONKEY2 && (sound == 100) && (getSoundStatus_internal(107, true) == 1)) IMuseInternal::stopSound_internal(107); + // Workaround for monkey2 bug #1410 / Booty Island + // + // Tunes involved + // 100 - Captain Dread's map + // 113 - Guard Kiosk / Mardi Grass + // 115 - Map of Booty Island / Ville de la Booty + // 118 - Ville de la Booty + // + // When you enter the Guard Kiosk tune 113 is added as trigger on song + // 115. Then if you leave, 113 is stopped and 115 is started again. + // If you leave quickly enough, the trigger occurs on the map and tune + // 113 will not stop. + // We kill 113 on entry of one of the other locations (Captain Dread + // or Ville de la Booty) because tune 115 is not always started. + if (_game_id == GID_MONKEY2 && (sound == 100 || sound == 115 || sound == 118) && (getSoundStatus_internal(113, true) == 1)) + IMuseInternal::stopSound_internal(113); + player->clear(); player->setOffsetNote(offset); return player->startSound(sound, driver); -- cgit v1.2.3