[Scummvm-cvs-logs] SF.net SVN: scummvm:[49906] scummvm/trunk/engines/sci

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Wed Jun 16 23:07:26 CEST 2010


Revision: 49906
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49906&view=rev
Author:   m_kiewitz
Date:     2010-06-16 21:07:26 +0000 (Wed, 16 Jun 2010)

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

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/sound/midiparser_sci.cpp

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2010-06-16 21:02:58 UTC (rev 49905)
+++ scummvm/trunk/engines/sci/console.cpp	2010-06-16 21:07:26 UTC (rev 49906)
@@ -859,8 +859,7 @@
 
 	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);

Modified: scummvm/trunk/engines/sci/sound/midiparser_sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/midiparser_sci.cpp	2010-06-16 21:02:58 UTC (rev 49905)
+++ scummvm/trunk/engines/sci/sound/midiparser_sci.cpp	2010-06-16 21:07:26 UTC (rev 49906)
@@ -453,14 +453,6 @@
 			// 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 @@
 
 // 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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list