diff options
Diffstat (limited to 'engines/scumm/sound.cpp')
-rw-r--r-- | engines/scumm/sound.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index f1be5e0b17..bc3ca00571 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -1181,7 +1181,7 @@ int ScummEngine::readSoundResource(int idx) { break; } - if ((_musicType == MDT_PCSPK) && pri != 11) + if ((_musicType == MDT_PCSPK || _musicType == MDT_CMS) && pri != 11) pri = -1; debugC(DEBUG_RESOURCE, " tag: %s, total_size=%d, pri=%d", tag2str(tag), size, pri); @@ -2121,6 +2121,19 @@ int ScummEngine::readSoundResourceSmallHeader(int idx) { _fileHandle->read(_res->createResource(rtSound, idx, wa_size + 6), wa_size + 6); } return 1; + } else if (_musicType == MDT_CMS && ad_offs != 0) { + if (_game.features & GF_OLD_BUNDLE) { + _fileHandle->seek(wa_offs + wa_size + 6, SEEK_SET); + byte musType = _fileHandle->readByte(); + + if (musType == 0x80) { + _fileHandle->seek(ad_offs, SEEK_SET); + _fileHandle->read(_res->createResource(rtSound, idx, ad_size), ad_size); + } else { + _fileHandle->seek(wa_offs, SEEK_SET); + _fileHandle->read(_res->createResource(rtSound, idx, wa_size), wa_size); + } + } } else if (ad_offs != 0) { // AD resources have a header, instrument definitions and one MIDI track. // We build an 'ADL ' resource from that: |