Skip to content

Commit

Permalink
SCUMM: Always play ROL music if MAC music is missing in Mac MI2 / FoA
Browse files Browse the repository at this point in the history
Before, ScummVM would only play ROL music if a MIDI-capable driver had
been selected. I have AdLib as default, which made it pick ADL music
instead and the Mac music player doesn't support that. So this is not a
new feature, it's just an old feature that's now applied consistently.

This fixes some missing music that might otherwise be missing in MI2,
most noticeably near the very end of the game. The ROL music is an
acceptable substitute, because the Mac instruments are close enough to
a subset of MT-32. I haven't seen any resources with both MAC and ROL
versions, so MAC should still be used when available.

Note that this doesn't seem to have been a ScummVM bug. The music was
missing when I tried the game in a Mac emulator too!
  • Loading branch information
Torbjörn Andersson committed Jul 20, 2021
1 parent 04409da commit 31d18f3
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions engines/scumm/scumm.cpp
Expand Up @@ -2086,6 +2086,38 @@ void ScummEngine::setupMusic(int midi, const Common::String &macInstrumentFile)
}
}

if (_game.platform == Common::kPlatformMacintosh && (_game.id == GID_MONKEY2 || _game.id == GID_INDY4)) {
// While the Mac versions do have ADL resources, the Mac player
// doesn't handle them. So if a song is missing a MAC resource,
// prefer the ROL version over ADL.
//
// This is the case in Monkey Island 2, where some key music is
// missing near the end of the game: The Indiana Jones fanfare
// when Guybrush uses the rope to get the chest, and the music
// after the first LeChuck encounter in the underground tunnels
// below that scene. As well as some others that I haven't
// identified.
//
// Note that this does not seem to be a ScummVM bug. That music
// was missing when I ran the game in a Mac emulator too!
//
// ScummVM would play the ROL music instead, but only if it
// didn't think it was using an AdLib music driver. Even if
// (as in my case) it was only by default. Now we always set
// MDT_MIDI to ensure consistent behavior. The Mac instrument
// set isn't quite the same as the MT-32, but it looks like it
// was based on a subset of it.
//
// From what I've seen, when a resource has a Mac version that
// is all that it has. So there shouldn't be any case where it
// prefers a ROL resource over MAC.
//
// Adding AdLib capabilities to the player may still be a good
// idea, because there are plenty of sound resources that exist
// only as ADL and SPK.
_sound->_musicType = MDT_MIDI;
}

// DOTT + SAM use General MIDI, so they shouldn't use GS settings
if ((_game.id == GID_TENTACLE) || (_game.id == GID_SAMNMAX))
_enable_gs = false;
Expand Down

0 comments on commit 31d18f3

Please sign in to comment.