[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.497,1.498 sound_he.cpp,2.8,2.9

kirben kirben at users.sourceforge.net
Fri Jan 13 20:30:49 CET 2006


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

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

A few fixes for sound opcodes in HE games.


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.497
retrieving revision 1.498
diff -u -d -r1.497 -r1.498
--- sound.cpp	7 Jan 2006 23:53:37 -0000	1.497
+++ sound.cpp	14 Jan 2006 04:29:30 -0000	1.498
@@ -767,6 +767,9 @@
 	if (_vm->_imuse)
 		return _vm->_imuse->get_sound_active(sound);
 
+	if (_vm->_mixer->isSoundIDActive(sound))
+		return 1;
+
 	return false;
 }
 

Index: sound_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound_he.cpp,v
retrieving revision 2.8
retrieving revision 2.9
diff -u -d -r2.8 -r2.9
--- sound_he.cpp	6 Jan 2006 01:25:31 -0000	2.8
+++ sound_he.cpp	14 Jan 2006 04:29:30 -0000	2.9
@@ -87,7 +87,11 @@
 }
 
 int Sound::getSoundVar(int sound, int var) {
-	checkRange(26, 0, var, "Illegal sound variable %d");
+	if (_vm->_heversion >= 90 && var == 26) {
+		return isSoundCodeUsed(sound);
+	}
+
+	checkRange(25, 0, var, "Illegal sound variable %d");
 
 	int chan = -1;
 	for (int i = 0; i < ARRAYSIZE(_heChannel); i ++) {
@@ -104,7 +108,7 @@
 }
 
 void Sound::setSoundVar(int sound, int var, int val) {
-	checkRange(26, 0, var, "Illegal sound variable %d");
+	checkRange(25, 0, var, "Illegal sound variable %d");
 
 	int chan = -1;
 	for (int i = 0; i < ARRAYSIZE(_heChannel); i ++) {





More information about the Scummvm-git-logs mailing list