[Scummvm-cvs-logs] SF.net SVN: scummvm: [26679] scummvm/trunk/engines/scumm
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Apr 29 20:26:28 CEST 2007
Revision: 26679
http://scummvm.svn.sourceforge.net/scummvm/?rev=26679&view=rev
Author: fingolfin
Date: 2007-04-29 11:26:27 -0700 (Sun, 29 Apr 2007)
Log Message:
-----------
Patch #1709681: SCUMM: Fallback to Adlib when Roland Upgrade is missing
Modified Paths:
--------------
scummvm/trunk/engines/scumm/scumm.cpp
scummvm/trunk/engines/scumm/vars.cpp
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2007-04-29 18:22:07 UTC (rev 26678)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2007-04-29 18:26:27 UTC (rev 26679)
@@ -1553,6 +1553,39 @@
_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))
Modified: scummvm/trunk/engines/scumm/vars.cpp
===================================================================
--- scummvm/trunk/engines/scumm/vars.cpp 2007-04-29 18:22:07 UTC (rev 26678)
+++ scummvm/trunk/engines/scumm/vars.cpp 2007-04-29 18:26:27 UTC (rev 26679)
@@ -707,26 +707,11 @@
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)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list