diff options
author | Max Horn | 2005-12-30 14:18:21 +0000 |
---|---|---|
committer | Max Horn | 2005-12-30 14:18:21 +0000 |
commit | 60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b (patch) | |
tree | 6f72d5cd2ed9d83c2087130e5ca1e236b70aaa1c /scumm/sound.cpp | |
parent | 2b156bd4c1d334931513a834a757723ec290db0b (diff) | |
download | scummvm-rg350-60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b.tar.gz scummvm-rg350-60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b.tar.bz2 scummvm-rg350-60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b.zip |
* Replaced MDT_PREFER_NATIVE/MDT_NATIVE by MDT_PREFER_MIDI/MDT_MIDI).
* Changed MidiDriver::createMidi so that if MD_ADLIB is passed, it
now *does* instantiate the adlib driver.
* Rewrote MidiDriver::detectMusicDriver (code should be clearer now,
and hopefully easier to adapt/maintain). Note that the behavior
changed slightly (this may require some tweaking).
* Added MidiDriver::findMusicDriver which works similar to the old
MidiDriver::parseMusicDriver but returns the full MidiDriverDescription
and ignores all characters in the passed driver name following a colon ":".
* Changed MidiDriver::parseMusicDriver to use MidiDriver::findMusicDriver.
* Changed game engines to match the changes made to MidiDriver.
* Modified SCUMM engine to not record the selected midi/music driver
(in _midiDriver), but rather the music *type* (in _musicType).
svn-id: r19859
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r-- | scumm/sound.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index dfc14957dd..8d97c6f362 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -1362,7 +1362,7 @@ int ScummEngine::readSoundResource(int type, int idx) { switch (basetag) { case MKID('MIDI'): case MKID('iMUS'): - if (_midiDriver != MD_PCSPK && _midiDriver != MD_PCJR) { + if (_musicType != MDT_PCSPK) { _fileHandle->seek(-8, SEEK_CUR); _fileHandle->read(res.createResource(type, idx, total_size + 8), total_size + 8); return 1; @@ -1386,7 +1386,7 @@ int ScummEngine::readSoundResource(int type, int idx) { break; case MKID('ADL '): pri = 1; - if (_midiDriver == MD_ADLIB) + if (_musicType == MDT_ADLIB) pri = 10; break; case MKID('AMI '): @@ -1405,12 +1405,12 @@ int ScummEngine::readSoundResource(int type, int idx) { break; case MKID('SPK '): pri = -1; -// if (_midiDriver == MD_PCSPK) +// if (_musicType == MDT_PCSPK) // pri = 11; break; } - if ((_midiDriver == MD_PCSPK || _midiDriver == MD_PCJR) && pri != 11) + if ((_musicType == MDT_PCSPK) && pri != 11) pri = -1; debugC(DEBUG_RESOURCE, " tag: %s, total_size=%d, pri=%d", tag2str(TO_BE_32(tag)), size, pri); @@ -2333,7 +2333,7 @@ int ScummEngine::readSoundResourceSmallHeader(int type, int idx) { } } - if ((_midiDriver == MD_ADLIB) && ad_offs != 0) { + if ((_musicType == MDT_ADLIB) && ad_offs != 0) { // AD resources have a header, instrument definitions and one MIDI track. // We build an 'ADL ' resource from that: // 8 bytes resource header @@ -2358,7 +2358,7 @@ int ScummEngine::readSoundResourceSmallHeader(int type, int idx) { free(ptr); return 1; } - } else if (((_midiDriver == MD_PCJR) || (_midiDriver == MD_PCSPK)) && wa_offs != 0) { + } else if ((_musicType == MDT_PCSPK) && wa_offs != 0) { if (_features & GF_OLD_BUNDLE) { _fileHandle->seek(wa_offs, SEEK_SET); _fileHandle->read(res.createResource(type, idx, wa_size), wa_size); |