[Scummvm-cvs-logs] CVS: scummvm/scumm imuse.cpp,2.20,2.20.2.1

Jamieson Christian jamieson630 at users.sourceforge.net
Wed May 21 11:30:11 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv17129/scumm

Modified Files:
      Tag: branch-0-4-0
	imuse.cpp 
Log Message:
Fixed World of Fish music regression and panning bug

Index: imuse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse.cpp,v
retrieving revision 2.20
retrieving revision 2.20.2.1
diff -u -d -r2.20 -r2.20.2.1
--- imuse.cpp	30 Apr 2003 13:23:29 -0000	2.20
+++ imuse.cpp	21 May 2003 18:29:46 -0000	2.20.2.1
@@ -421,6 +421,7 @@
 
 	int32 ImSetTrigger (int sound, int id, int a, int b, int c, int d);
 	int32 ImClearTrigger (int sound, int id);
+	int32 ImFireAllTriggers (int sound);
 
 	int enqueue_command(int a, int b, int c, int d, int e, int f, int g);
 	int enqueue_trigger(int sound, int marker);
@@ -1526,6 +1527,25 @@
 	return (count > 0) ? 0 : -1;
 }
 
+int32 IMuseInternal::ImFireAllTriggers (int sound) { 
+	if (!sound) return 0; 
+	int count = 0; 
+	int i; 
+	for (i = 0; i < 16; ++i) { 
+		if (_snm_triggers [i].sound == sound) 
+		{ 
+			_snm_triggers [i].sound = _snm_triggers [i].id = 0; 
+			doCommand (_snm_triggers [i].command [0], 
+			           _snm_triggers [i].command [1], 
+			           _snm_triggers [i].command [2], 
+			           _snm_triggers [i].command [3], 
+			           0, 0, 0, 0); 
+			++count; 
+		} 
+	} 
+	return (count > 0) ? 0 : -1; 
+} 
+
 int IMuseInternal::set_channel_volume(uint chan, uint vol)
 {
 	if (chan >= 8 || vol > 127)
@@ -1767,6 +1787,7 @@
 	uninit_seq();
 	cancel_volume_fade();
 	uninit_parts();
+	_se->ImFireAllTriggers (_id);
 	_active = false;
 	_ticks_per_beat = TICKS_PER_BEAT;
 }
@@ -3527,7 +3548,7 @@
 		mc->modulationWheel (part->_modwheel);
 
 	if (what & pcPan)
-		mc->panPosition (part->_pan_eff);
+		mc->panPosition (part->_pan_eff + 0x40);
 
 	if (what & pcEffectLevel)
 		mc->effectLevel (part->_effect_level);





More information about the Scummvm-git-logs mailing list