[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.122,2.123 imuse.h,1.55,1.56 imuse_internal.h,2.36,2.37 scumm.cpp,1.281,1.282

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Fri Dec 3 05:19:01 CET 2004


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

Modified Files:
	imuse.cpp imuse.h imuse_internal.h scumm.cpp 
Log Message:
Fixed an Adlib regression with older games (e.g. EGA Loom, Indy 3 and
Monkey VGA) that was introduced by a recent "multi MIDI" change.

The "old Adlib" property was set too late in the iMUSE player, so the Adlib
driver would always think the game was new. I've removed this property from
the iMUSE player, since it's only function appeared to be to pass it on to
the Adlib player, and now set it in the Adlib player directly instead.

Also removed some remaining "multi MIDI" traces from the iMUSE player that
I believe were obsoleted by the aforementioned "multi MIDI" change.


Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 2.122
retrieving revision 2.123
diff -u -d -r2.122 -r2.123
--- imuse.cpp	28 Nov 2004 21:23:52 -0000	2.122
+++ imuse.cpp	3 Dec 2004 13:17:48 -0000	2.123
@@ -44,8 +44,6 @@
 ////////////////////////////////////////
 
 IMuseInternal::IMuseInternal() :
-_old_adlib_instruments(false),
-_enable_multi_midi(false),
 _native_mt32(false),
 _midi_adlib(0),
 _midi_native(0),
@@ -1077,10 +1075,6 @@
 			initMT32(_midi_native);
 		break;
 
-	case IMuse::PROP_OLD_ADLIB_INSTRUMENTS:
-		_old_adlib_instruments = (value > 0);
-		break;
-
 	case IMuse::PROP_LIMIT_PLAYERS:
 		if (value > 0 && value <= ARRAYSIZE(_players))
 			_player_limit = (int) value;
@@ -1135,8 +1129,6 @@
 
 void IMuseInternal::initMidiDriver(MidiDriver *midi) {
 	// Open MIDI driver
-	midi->property(MidiDriver::PROP_OLD_ADLIB, _old_adlib_instruments ? 1 : 0);
-
 	int result = midi->open();
 	if (result)
 		error("IMuse initialization - %s", MidiDriver::getErrorName(result));

Index: imuse.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- imuse.h	28 Nov 2004 21:23:53 -0000	1.55
+++ imuse.h	3 Dec 2004 13:17:57 -0000	1.56
@@ -52,7 +52,6 @@
 	enum {
 		PROP_TEMPO_BASE,
 		PROP_NATIVE_MT32,
-		PROP_OLD_ADLIB_INSTRUMENTS,
 		PROP_LIMIT_PLAYERS,
 		PROP_RECYCLE_PLAYERS,
 		PROP_DIRECT_PASSTHROUGH

Index: imuse_internal.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_internal.h,v
retrieving revision 2.36
retrieving revision 2.37
diff -u -d -r2.36 -r2.37
--- imuse_internal.h	28 Nov 2004 21:23:53 -0000	2.36
+++ imuse_internal.h	3 Dec 2004 13:17:57 -0000	2.37
@@ -346,8 +346,6 @@
 	friend class Player;
 
 protected:
-	bool _old_adlib_instruments;
-	bool _enable_multi_midi;
 	bool _native_mt32;
 	MidiDriver *_midi_adlib;
 	MidiDriver *_midi_native;

Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.281
retrieving revision 1.282
diff -u -d -r1.281 -r1.282
--- scumm.cpp	2 Dec 2004 00:33:40 -0000	1.281
+++ scumm.cpp	3 Dec 2004 13:17:57 -0000	1.282
@@ -1343,16 +1343,16 @@
 			nativeMidiDriver->property (MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
 		bool multi_midi = ConfMan.getBool("multi_midi") && _midiDriver != MD_NULL && (midi & MDT_ADLIB);
 		MidiDriver *adlibMidiDriver;
-		if (nativeMidiDriver == NULL || multi_midi)
+		if (nativeMidiDriver == NULL || multi_midi) {
 			adlibMidiDriver = MidiDriver_ADLIB_create(_mixer);
-		else
+			adlibMidiDriver->property(MidiDriver::PROP_OLD_ADLIB, (_features & GF_SMALL_HEADER) ? 1 : 0);
+		} else
 			adlibMidiDriver = NULL;
 
 		_musicEngine = _imuse = IMuse::create(_system, nativeMidiDriver, adlibMidiDriver);
 		if (_imuse) {
 			if (ConfMan.hasKey("tempo"))
 				_imuse->property(IMuse::PROP_TEMPO_BASE, ConfMan.getInt("tempo"));
-			_imuse->property(IMuse::PROP_OLD_ADLIB_INSTRUMENTS, (_features & GF_SMALL_HEADER) ? 1 : 0);
 			_imuse->property(IMuse::PROP_NATIVE_MT32, _native_mt32);
 			if (_features & GF_HUMONGOUS || midi == MDT_TOWNS) {
 				_imuse->property(IMuse::PROP_LIMIT_PLAYERS, 1);





More information about the Scummvm-git-logs mailing list