[Scummvm-cvs-logs] SF.net SVN: scummvm: [29878] scummvm/trunk/engines/lure

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Dec 16 15:46:48 CET 2007


Revision: 29878
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29878&view=rev
Author:   eriktorbjorn
Date:     2007-12-16 06:46:48 -0800 (Sun, 16 Dec 2007)

Log Message:
-----------
The _nativeMT32 in MidiMusic was never initialised. Rather than storing it in
two different classes, use the value in SoundManager instead. As a consequence
the engine now remaps the instruments from MT-32 to General MIDI for me, since
isRoland() is true and hasNativeMT32() is false. Earlier, it didn't since the
uninitialised _nativeMT32 happened to be true for me.

Modified Paths:
--------------
    scummvm/trunk/engines/lure/sound.cpp
    scummvm/trunk/engines/lure/sound.h

Modified: scummvm/trunk/engines/lure/sound.cpp
===================================================================
--- scummvm/trunk/engines/lure/sound.cpp	2007-12-16 13:28:00 UTC (rev 29877)
+++ scummvm/trunk/engines/lure/sound.cpp	2007-12-16 14:46:48 UTC (rev 29878)
@@ -693,8 +693,10 @@
 		_channels[channel].volume = volume;
 		volume = volume * _volume / 255;
 		b = (b & 0xFF00FFFF) | (volume << 16);
-	} else if ((b & 0xF0) == 0xC0 && !_nativeMT32) {
-		b = (b & 0xFFFF00FF) | MidiDriver::_mt32ToGm[(b >> 8) & 0xFF] << 8;
+	} else if ((b & 0xF0) == 0xC0) {
+		if (Sound.isRoland() && !Sound.hasNativeMT32()) {
+			b = (b & 0xFFFF00FF) | MidiDriver::_mt32ToGm[(b >> 8) & 0xFF] << 8;
+		}
 	}
 	else if ((b & 0xFFF0) == 0x007BB0) {
 		// No implementation

Modified: scummvm/trunk/engines/lure/sound.h
===================================================================
--- scummvm/trunk/engines/lure/sound.h	2007-12-16 13:28:00 UTC (rev 29877)
+++ scummvm/trunk/engines/lure/sound.h	2007-12-16 14:46:48 UTC (rev 29878)
@@ -57,7 +57,6 @@
 	MidiParser *_parser;
 	ChannelEntry *_channels;
 	bool _isPlaying;
-	bool _nativeMT32;
 
 	void queueUpdatePos();
 	uint8 randomQueuePos();
@@ -73,7 +72,6 @@
 	void setVolume(int volume);
 	int getVolume()	{ return _volume; }
 
-	void hasNativeMT32(bool b)	{ _nativeMT32 = b; }
 	void playSong(uint16 songNum);
 	void stopSong() { stopMusic(); }
 	void playMusic();
@@ -151,6 +149,7 @@
 	void pause() { _paused = true; }
 	void resume() { _paused = false; }
 	bool getPaused() { return _paused; }
+	bool hasNativeMT32() { return _nativeMT32; }
 	bool isRoland() { return _isRoland; }
 
 	// The following methods implement the external sound player module


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