Skip to content

Commit

Permalink
SCUMM: MI2 kill tune 113 on start of next, Fixes bug #1410 / Booty Is…
Browse files Browse the repository at this point in the history
…land

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.
  • Loading branch information
Ben Castricum committed Jul 18, 2017
1 parent f69ad9b commit c0fa212
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions engines/scumm/imuse/imuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
// 115 - Map of Booty Island
// 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 == 118) && (getSoundStatus_internal(113, true) == 1))
IMuseInternal::stopSound_internal(113);

player->clear();
player->setOffsetNote(offset);
return player->startSound(sound, driver);
Expand Down

0 comments on commit c0fa212

Please sign in to comment.