[Scummvm-git-logs] scummvm master -> 2e54d6ca9f68ffa06cdfbc23c5ac8189a0437ea5

NMIError noreply at scummvm.org
Thu Jun 22 19:51:54 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2e54d6ca9f AGOS: Add fallback for Simon 1 AdLib instruments


Commit: 2e54d6ca9f68ffa06cdfbc23c5ac8189a0437ea5
    https://github.com/scummvm/scummvm/commit/2e54d6ca9f68ffa06cdfbc23c5ac8189a0437ea5
Author: Coen Rampen (crampen at gmail.com)
Date: 2023-06-22T21:51:45+02:00

Commit Message:
AGOS: Add fallback for Simon 1 AdLib instruments

GOG has not included the AdLib instruments file with their release of Simon the
Sorcerer 1 DOS version. The game would not start in ScummVM when this file was
missing and AdLib was selected. Added a fallback to the generic AdLib driver
with built-in instruments.

Changed paths:
    engines/agos/midi.cpp


diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp
index dfd335e97bb..788a6509bdd 100644
--- a/engines/agos/midi.cpp
+++ b/engines/agos/midi.cpp
@@ -304,7 +304,22 @@ int MidiPlayer::open() {
 		case MT_ADLIB:
 			if (_vm->getPlatform() == Common::kPlatformDOS) {
 				// The DOS version AdLib driver uses an instrument bank file.
-				_driverMsMusic = createMidiDriverSimon1AdLib("MT_FM.IBK", oplType);
+				if (Common::File::exists("MT_FM.IBK")) {
+					_driverMsMusic = createMidiDriverSimon1AdLib("MT_FM.IBK", oplType);
+				} else {
+					// Fallback in case AdLib instrument definitions are missing.
+					GUI::MessageDialog dialog(
+						Common::U32String::format(
+							_("Could not find AdLib instrument definition file\n"
+							  "%s. Without this file,\n"
+							  "the music will not sound the same as the original game."),
+							"MT_FM.IBK"),
+						_("OK"));
+					dialog.runModal();
+
+					_driverMsMusic = new MidiDriver_ADLIB_Multisource(oplType);
+					_driverMsMusic->setInstrumentRemapping(MidiDriver::_mt32ToGm);
+				}
 				if (!(_vm->getFeatures() & GF_TALKIE)) {
 					// The DOS floppy version has AdLib MIDI SFX.
 					_driverMsSfx = _driverMsMusic;




More information about the Scummvm-git-logs mailing list