diff options
author | Max Horn | 2007-04-29 18:26:27 +0000 |
---|---|---|
committer | Max Horn | 2007-04-29 18:26:27 +0000 |
commit | 68175c713bc742fc5cbb12c9183211d4a6d8c657 (patch) | |
tree | 1bda885f647bda4a444ff00917a0584cd200c513 | |
parent | 3821ef456a8d39752d4809fc3b60c4f00ca482a4 (diff) | |
download | scummvm-rg350-68175c713bc742fc5cbb12c9183211d4a6d8c657.tar.gz scummvm-rg350-68175c713bc742fc5cbb12c9183211d4a6d8c657.tar.bz2 scummvm-rg350-68175c713bc742fc5cbb12c9183211d4a6d8c657.zip |
Patch #1709681: SCUMM: Fallback to Adlib when Roland Upgrade is missing
svn-id: r26679
-rw-r--r-- | engines/scumm/scumm.cpp | 33 | ||||
-rw-r--r-- | engines/scumm/vars.cpp | 17 |
2 files changed, 34 insertions, 16 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 9ff08d7e5b..898ceb5431 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1553,6 +1553,39 @@ void ScummEngine::setupMusic(int midi) { _musicType = MDT_MIDI; break; } + + if ((_game.id == GID_MONKEY_EGA || (_game.id == GID_LOOM && _game.version == 3)) + && (_game.platform == Common::kPlatformPC) && _musicType == MDT_MIDI) { + Common::String fileName; + bool missingFile = false; + if (_game.id == GID_LOOM) { + Common::File f; + // The Roland Update does have an 85.LFL, but we don't + // test for it since the demo doesn't have it. + for (char c = '2'; c <= '4'; c++) { + fileName = "8"; + fileName += c; + fileName += ".LFL"; + if (!Common::File::exists(fileName)) { + missingFile = true; + break; + } + } + } else if (_game.id == GID_MONKEY_EGA) { + fileName = "DISK09.LEC"; + if (!Common::File::exists(fileName)) { + missingFile = true; + } + } + + if (missingFile) { + GUI::MessageDialog dialog( + "Native MIDI support requires the Roland Upgrade from LucasArts,\n" + "but " + fileName + " is missing. Using Adlib instead.", "Ok"); + dialog.runModal(); + _musicType = MDT_ADLIB; + } + } // DOTT + SAM use General MIDI, so they shouldn't use GS settings if ((_game.id == GID_TENTACLE) || (_game.id == GID_SAMNMAX)) diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp index 7010cfffdf..7c73b42b1f 100644 --- a/engines/scumm/vars.cpp +++ b/engines/scumm/vars.cpp @@ -707,26 +707,11 @@ void ScummEngine::resetScummVars() { default: if ((_game.id == GID_MONKEY_EGA || _game.id == GID_MONKEY_VGA || (_game.id == GID_LOOM && _game.version == 3)) && (_game.platform == Common::kPlatformPC)) { - if (_game.id == GID_LOOM) { - char buf[50]; - Common::File f; - for (int i = 82; i < 85; i++) { - sprintf(buf, "%d.LFL", i); - if (!Common::File::exists(buf)) { - // TODO: Instead of a hard error, try to fall back to adlib? - error("Native MIDI support requires Roland patch from LucasArts, but %s is missing", buf); - } - } - } else if (_game.id == GID_MONKEY_EGA) { - if (!Common::File::exists("DISK09.LEC")) { - // TODO: Instead of a hard error, try to fall back to adlib? - error("Native MIDI support requires Roland patch from LucasArts, but DISK09.LEC is missing"); - } - } VAR(VAR_SOUNDCARD) = 4; } else { VAR(VAR_SOUNDCARD) = 3; } + break; } if (_game.platform == Common::kPlatformFMTowns) |