diff options
author | Martin Kiewitz | 2010-06-16 21:07:26 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-06-16 21:07:26 +0000 |
commit | 02c3397ddf12e636da0b851f6350b45af1859dcd (patch) | |
tree | dffc54da37ba29016fcd9c67ca1f5177fa3b1091 | |
parent | af65de6e1aaa197e17f10cd976ea2f5d15f0d7c8 (diff) | |
download | scummvm-rg350-02c3397ddf12e636da0b851f6350b45af1859dcd.tar.gz scummvm-rg350-02c3397ddf12e636da0b851f6350b45af1859dcd.tar.bz2 scummvm-rg350-02c3397ddf12e636da0b851f6350b45af1859dcd.zip |
SCI: fix debug command "show_instruments", got broken by r49905 on purpose
svn-id: r49906
-rw-r--r-- | engines/sci/console.cpp | 3 | ||||
-rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 11 |
2 files changed, 4 insertions, 10 deletions
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp index ebe7edecbe..3737ccd59e 100644 --- a/engines/sci/console.cpp +++ b/engines/sci/console.cpp @@ -859,8 +859,7 @@ bool Console::cmdShowInstruments(int argc, const char **argv) { SciVersion doSoundVersion = _engine->_features->detectDoSoundType(); MidiPlayer *player = MidiPlayer_Midi_create(doSoundVersion); - MidiParser_SCI *parser; // = new MidiParser_SCI(doSoundVersion); - // FIXME: add SciMusic object + MidiParser_SCI *parser = new MidiParser_SCI(doSoundVersion, 0); parser->setMidiDriver(player); Common::List<ResourceId> *resources = _engine->getResMan()->listResources(kResourceTypeSound); diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index 8bc9b97926..b76c5d0624 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -453,14 +453,6 @@ byte *MidiParser_SCI::midiMixChannels() { // remember which channel got used for channel remapping byte midiChannel = command & 0xF; _channelUsed[midiChannel] = true; -// int16 realChannel = _channelRemap[midiChannel]; -// if (realChannel == -1) { -// // We don't own this channel yet, so ask SciMusic to get it (or a remapped one) -// realChannel = _music->tryToOwnChannel(_pSnd, midiChannel); -// _channelRemap[midiChannel] = realChannel; -// } -// // Map new channel -// command = realChannel | (command & 0xF0); if (command != global_prev) *outData++ = command; // out command @@ -592,6 +584,9 @@ byte *MidiParser_SCI::midiFilterChannels(int channelMask) { // This will get called right before actual playing and will try to own the used channels void MidiParser_SCI::tryToOwnChannels() { + // We don't have SciMusic in case debug command show_instruments is used + if (!_music) + return; for (int curChannel = 0; curChannel < 15; curChannel++) { if (_channelUsed[curChannel]) { if (_channelRemap[curChannel] == -1) { |