[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.425,1.426

kirben kirben at users.sourceforge.net
Wed Mar 9 05:42:03 CET 2005


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

Modified Files:
	sound.cpp 
Log Message:

Add HE sound todos


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.425
retrieving revision 1.426
diff -u -d -r1.425 -r1.426
--- sound.cpp	8 Mar 2005 03:52:02 -0000	1.425
+++ sound.cpp	9 Mar 2005 13:41:33 -0000	1.426
@@ -814,16 +814,22 @@
 		return pollCD();
 
 	if (_vm->_features & GF_HUMONGOUS) {
-		if (sound == -2 || sound >= 10001) {
-			// Maybe checks sound channel?
-			return !isSfxFinished();
-		} else if (sound == -1 || sound == 10000) {
+		if (sound == -2) {
+			return -1;
+		} else if (sound == -1) {
 			// getSoundStatus(), with a -1, will return the
 			// ID number of the first active music it finds.
-			if (_vm->_heversion >= 70 || _currentMusic)
+			if (_currentMusic)
 				sound = _currentMusic;
 			else if (_vm->_imuse)
 				return (_vm->_imuse->getSoundStatus(sound));
+		} else if (sound >= 10000) {
+			// TODO report sound ID on channel
+			// channel = sound - 10000
+			if (sound == 10000)
+				return _currentMusic;
+			else
+				return 0;
 		}
 	}
 
@@ -899,14 +905,18 @@
 	int i;
 
 	if (_vm->_features & GF_HUMONGOUS) {
-		if (sound == -2 || sound >= 10001) {
-			// TODO: Stop sound channel (sound - 100000)
-		} else if (sound == -1 || sound == 10000) {
+		if (sound == -2) {
+		} else if (sound == -1) {
 			// Stop current music
-			if (_vm->_heversion >= 70  || _currentMusic)
+			if (_currentMusic)
 				_vm->_mixer->stopID(_currentMusic);
 			else if (_vm->_imuse)
 				_vm->_imuse->stopSound(_vm->_imuse->getSoundStatus(-1));
+		} else if ( sound >= 10000) {
+			// TODO: Stop sound channel
+			// channel = sound - 10000
+			if (sound == 10000)
+				_vm->_mixer->stopID(_currentMusic);
 		}
 	}
 





More information about the Scummvm-git-logs mailing list