SCI: fix debug command "show_instruments", got broken by r49905 on purpose

svn-id: r49906
This commit is contained in:
Martin Kiewitz 2010-06-16 21:07:26 +00:00
parent af65de6e1a
commit 02c3397ddf
2 changed files with 4 additions and 10 deletions

View file

@ -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);

View file

@ -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) {