diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/imuse/imuse.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp index 8b892f5fda..78fd821f30 100644 --- a/engines/scumm/imuse/imuse.cpp +++ b/engines/scumm/imuse/imuse.cpp @@ -675,6 +675,27 @@ bool IMuseInternal::startSound_internal(int sound, int offset) { if (_game_id == GID_SAMNMAX && sound == 82 && getSoundStatus_internal(81, false)) ImClearTrigger(81, 1); + // Workaround for monkey2 bug #1410 / Scabb Island + // + // Tunes involved: + // 100 - Captain Dread's map + // 101 - Woodtick + // 107 - Map of Scabb Island + // + // If you go from Woodtick to the map of Scabb Island tune 107 is added as + // trigger on 101 and 101 moves to an outro and stop (triggering start + // of 107). Then at Captain Dread tune 107 is stopped and 100 is started. + // + // If you go quickly enough, the trigger occurs not at the Scabb Island + // map but at Captain Dread causing tune 107 not to be stopped. + // So we prevent starting 107 if 100 is already running. + if (_game_id == GID_MONKEY2 && (sound == 107) && (getSoundStatus_internal(100, true) == 1)) + return false; + + // In some cases 107 is running and doesn't get killed at Dread's map + if (_game_id == GID_MONKEY2 && (sound == 100) && (getSoundStatus_internal(107, true) == 1)) + IMuseInternal::stopSound_internal(107); + player->clear(); player->setOffsetNote(offset); return player->startSound(sound, driver); |