Ticket #8651: adlib-fallback4.diff

File adlib-fallback4.diff, 2.5 KB (added by eriktorbjorn, 17 years ago)

Patch against current SVN

  • engines/scumm/scumm.cpp

     
    15531553                _musicType = MDT_MIDI;
    15541554                break;
    15551555        }
     1556
     1557        if ((_game.id == GID_MONKEY_EGA || (_game.id == GID_LOOM && _game.version == 3))
     1558           &&  (_game.platform == Common::kPlatformPC) && _musicType == MDT_MIDI) {
     1559                Common::String fileName;
     1560                bool missingFile = false;
     1561                if (_game.id == GID_LOOM) {
     1562                        Common::File f;
     1563                        // The Roland Update does have an 85.LFL, but we don't
     1564                        // test for it since the demo doesn't have it.
     1565                        for (char c = '2'; c <= '4'; c++) {
     1566                                fileName = "8";
     1567                                fileName += c;
     1568                                fileName += ".LFL";
     1569                                if (!Common::File::exists(fileName)) {
     1570                                        missingFile = true;
     1571                                        break;
     1572                                }
     1573                        }
     1574                } else if (_game.id == GID_MONKEY_EGA) {
     1575                        fileName = "DISK09.LEC";
     1576                        if (!Common::File::exists(fileName)) {
     1577                                missingFile = true;
     1578                        }
     1579                }
     1580
     1581                if (missingFile) {
     1582                        GUI::MessageDialog dialog(
     1583                                "Native MIDI support requires the Roland Upgrade from LucasArts,\n"
     1584                                "but " + fileName + " is missing. Using Adlib instead.", "Ok");
     1585                        dialog.runModal();
     1586                        _musicType = MDT_ADLIB;
     1587                }
     1588        }
    15561589       
    15571590        // DOTT + SAM use General MIDI, so they shouldn't use GS settings
    15581591        if ((_game.id == GID_TENTACLE) || (_game.id == GID_SAMNMAX))
  • engines/scumm/vars.cpp

     
    707707                default:
    708708                        if ((_game.id == GID_MONKEY_EGA || _game.id == GID_MONKEY_VGA || (_game.id == GID_LOOM && _game.version == 3))
    709709                           &&  (_game.platform == Common::kPlatformPC)) {
    710                                 if (_game.id == GID_LOOM) {
    711                                         char buf[50];
    712                                         Common::File f;
    713                                         for (int i = 82; i < 85; i++) {
    714                                                 sprintf(buf, "%d.LFL", i);
    715                                                 if (!Common::File::exists(buf)) {
    716                                                         // TODO: Instead of a hard error, try to fall back to adlib?
    717                                                         error("Native MIDI support requires Roland patch from LucasArts, but %s is missing", buf);
    718                                                 }
    719                                         }
    720                                 } else if (_game.id == GID_MONKEY_EGA) {
    721                                         if (!Common::File::exists("DISK09.LEC")) {
    722                                                 // TODO: Instead of a hard error, try to fall back to adlib?
    723                                                 error("Native MIDI support requires Roland patch from LucasArts, but DISK09.LEC is missing");
    724                                         }
    725                                 }
    726710                                VAR(VAR_SOUNDCARD) = 4;
    727711                        } else {
    728712                                VAR(VAR_SOUNDCARD) = 3;
    729713                        }
     714                        break;
    730715                }
    731716
    732717                if (_game.platform == Common::kPlatformFMTowns)