aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2015-07-04 22:20:34 +0200
committerMartin Kiewitz2015-07-04 22:20:34 +0200
commit3f31b5ba64115b0823da2c2137fe3ee4a5251b0e (patch)
tree22b93ec6f319cb89581917deb0cf4e7c0d1ff21d /engines
parent9745c97df81f202ac0b14a7557c20329ee3c2dd0 (diff)
downloadscummvm-rg350-3f31b5ba64115b0823da2c2137fe3ee4a5251b0e.tar.gz
scummvm-rg350-3f31b5ba64115b0823da2c2137fe3ee4a5251b0e.tar.bz2
scummvm-rg350-3f31b5ba64115b0823da2c2137fe3ee4a5251b0e.zip
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
Diffstat (limited to 'engines')
-rw-r--r--engines/tinsel/music.cpp33
1 files changed, 26 insertions, 7 deletions
diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp
index 7c6706dfa8..2dab32a395 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: