[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.554,1.555

Max Horn fingolfin at users.sourceforge.net
Fri Dec 30 06:19:12 CET 2005


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32219/simon

Modified Files:
	simon.cpp 
Log Message:
* 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).


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.554
retrieving revision 1.555
diff -u -d -r1.554 -r1.555
--- simon.cpp	29 Dec 2005 21:21:16 -0000	1.554
+++ simon.cpp	30 Dec 2005 14:18:20 -0000	1.555
@@ -560,14 +560,12 @@
 		driver = MidiDriver::createMidi(MD_NULL);	// Create fake MIDI driver for Simon1Amiga and Simon2CD32 for now
 		_native_mt32 = false;
 	} else {
-		int midiDriver = MidiDriver::detectMusicDriver(MDT_ADLIB | MDT_NATIVE);
+		int midiDriver = MidiDriver::detectMusicDriver(MDT_ADLIB | MDT_MIDI);
+		_native_mt32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32"));
 		driver = MidiDriver::createMidi(midiDriver);
-		_native_mt32 = (ConfMan.getBool("native_mt32") || (midiDriver == MD_MT32));
-	}
-	if (!driver)
-		driver = MidiDriver_ADLIB_create(_mixer);
-	else if (_native_mt32) {
-		driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
+		if (_native_mt32) {
+			driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
+		}
 	}
 
 	midi.mapMT32toGM (getGameType() == GType_SIMON1 && !_native_mt32);





More information about the Scummvm-git-logs mailing list