[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6he.cpp,2.76,2.77 sound.cpp,1.349,1.350

Travis Howell kirben at users.sourceforge.net
Wed Jul 14 22:46:03 CEST 2004


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

Modified Files:
	script_v6he.cpp sound.cpp 
Log Message:

Fix music volume regression in HE games.


Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.76
retrieving revision 2.77
diff -u -d -r2.76 -r2.77
--- script_v6he.cpp	14 Jul 2004 09:37:15 -0000	2.76
+++ script_v6he.cpp	15 Jul 2004 05:44:57 -0000	2.77
@@ -27,6 +27,7 @@
 
 #include "scumm/actor.h"
 #include "scumm/charset.h"
+#include "scumm/imuse.h"
 #include "scumm/intern.h"
 #include "scumm/object.h"
 #include "scumm/resource.h"
@@ -1108,16 +1109,19 @@
 
 void ScummEngine_v6he::o6_soundOps() {
 	byte subOp = fetchScriptByte();
-	int volume = pop();
+	int arg = pop();
 	switch (subOp) {
 	case 0xde:
-		_mixer->setMusicVolume(volume);
+		if (_heversion == 60)
+			_imuse->set_music_volume(arg);
+		else
+			_mixer->setChannelVolume(_sound->_musicChannelHandle, arg);
 		break;
 	case 0xe0:
 		// Fatty Bear's Birthday surprise uses this when playing the
 		// piano, but only when using one of the digitized instruments.
 		// See also o6_startSound().
-		_sound->setOverrideFreq(volume);
+		_sound->setOverrideFreq(arg);
 		break;
 	}
 }

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.349
retrieving revision 1.350
diff -u -d -r1.349 -r1.350
--- sound.cpp	14 Jul 2004 07:29:09 -0000	1.349
+++ sound.cpp	15 Jul 2004 05:44:57 -0000	1.350
@@ -801,7 +801,7 @@
 			// Stop current music
 			if (_currentMusic)
 				_vm->_mixer->stopID(_currentMusic);
-			else if (_vm->_imuse)
+			else
 				_vm->_imuse->stopSound(_vm->_imuse->getSoundStatus(-1));
 		}
 	}





More information about the Scummvm-git-logs mailing list