[Scummvm-cvs-logs] scummvm master -> 3f31b5ba64115b0823da2c2137fe3ee4a5251b0e

m-kiewitz m_kiewitz at users.sourceforge.net
Sat Jul 4 22:21:04 CEST 2015


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:
3f31b5ba64 TINSEL: DW1: Miles Audio AdLib MIDPAK.AD support


Commit: 3f31b5ba64115b0823da2c2137fe3ee4a5251b0e
    https://github.com/scummvm/scummvm/commit/3f31b5ba64115b0823da2c2137fe3ee4a5251b0e
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-07-04T22:20:34+02:00

Commit Message:
TINSEL: DW1: Miles Audio AdLib MIDPAK.AD support

- added support for MIDPAK.AD timbre files on top
FAT.OPL. FAT.OPL gets copied by installer into MIDPAK.AD for this version
- changed order of timbre file checking
- adjusted and improved comments about discworld 1 versions

Changed paths:
    engines/tinsel/music.cpp



diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp
index 7c6706d..2dab32a 100644
--- a/engines/tinsel/music.cpp
+++ b/engines/tinsel/music.cpp
@@ -384,20 +384,39 @@ MidiMusicPlayer::MidiMusicPlayer(TinselEngine *vm) {
 		// Discworld 1 uses Miles Audio 3
 		// use our own Miles Audio drivers
 		// 
-		// DW1 has either drivers/sample.ad and drivers/sample.opl, but no sample.mt
-		//             or fat.opl (although this version has it outside of the main game directory inside /drivers)
+		// It seems that there are multiple versions of Discworld 1
+		//
+		// Version 1:
+		// Has SAMPLE.AD for AdLib and SAMPLE.OPL for OPL-3
+		// Timbre files are inside a subdirectory of the CD called "/drivers". Main game files are in
+		// another subdirectory, which means the user has to copy those files over.
+		// Installer script copies all drivers directly to harddrive without name changes
+		//
+		// Version 2:
+		// Has FAT.OPL only (gets copied by the installer into MIDPAK.AD or MIDPAK.OPL)
+		// Timbre file is inside subdirectory "drivers" right in the main game directory.
+		// Installer copies FAT.OPL to MIDPAK.AD all the time, even when user selected AWE32
+		//
+		// Neither have timbre data for MT32
+
 		::MidiDriver::DeviceHandle dev = ::MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM);
 		::MusicType musicType = ::MidiDriver::getMusicType(dev);
 		Common::File fileClass;
 
 		switch (musicType) {
 		case MT_ADLIB:
-			if ((fileClass.exists("SAMPLE.AD")) || (fileClass.exists("SAMPLE.OPL"))) {
-				// Variant 1: drivers/sample.ad or drivers/sample.opl exists
-				_driver = Audio::MidiDriver_Miles_AdLib_create("SAMPLE.AD", "SAMPLE.OPL");
-			} else {
-				// Try variant 2: fat.opl should at least exist
+			if (fileClass.exists("FAT.OPL")) {
+				// Version 2: fat.opl, may be in drivers-subdirectory
 				_driver = Audio::MidiDriver_Miles_AdLib_create("", "FAT.OPL");
+			} else {
+				if (fileClass.exists("MIDPAK.AD")) {
+					// Version 2: drivers got installed and fat.opl got copied over by the user
+					_driver = Audio::MidiDriver_Miles_AdLib_create("MIDPAK.AD", "");
+				} else {
+					// Version 1: sample.ad / sample.opl, have to be copied over by the user for this version
+					// That's why we check those last, because then the user gets a proper error message for them
+					_driver = Audio::MidiDriver_Miles_AdLib_create("SAMPLE.AD", "SAMPLE.OPL");
+				}
 			}
 			break;
 		case MT_MT32:






More information about the Scummvm-git-logs mailing list