[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.379,1.380 sound.h,1.73,1.74

Travis Howell kirben at users.sourceforge.net
Wed Sep 1 21:24:10 CEST 2004


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

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

Add extra sound check for HE games


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.379
retrieving revision 1.380
diff -u -d -r1.379 -r1.380
--- sound.cpp	2 Sep 2004 03:54:29 -0000	1.379
+++ sound.cpp	2 Sep 2004 04:23:12 -0000	1.380
@@ -748,7 +748,9 @@
 		return pollCD();
 
 	if (_vm->_features & GF_HUMONGOUS) {
-		if (sound == -2 || sound == 10001) {
+		if (sound == 10002) {
+			return !_talkChannelHandle.isActive();
+		} else if (sound == -2 || sound == 10001) {
 			return !isSfxFinished();
 		} else if (sound == -1 || sound == 10000 || sound == _currentMusic) {
 			// getSoundStatus(), with a -1, will return the
@@ -825,13 +827,15 @@
 	return false;
 }
 
-void Sound::stopSound(int a) {
+void Sound::stopSound(int sound) {
 	int i;
 
 	if (_vm->_features & GF_HUMONGOUS) {
-		if (a == -2 || a == 10001) {
+		if (sound == 10002) {
+			_vm->stopTalk();
+		} else if (sound == -2 || sound == 10001) {
 			// Stop current sfx
-		} else if (a == -1 || a == 10000) {
+		} else if (sound == -1 || sound == 10000) {
 			// Stop current music
 			if (_vm->_heversion >= 70  || _currentMusic)
 				_vm->_mixer->stopID(_currentMusic);
@@ -840,20 +844,20 @@
 		}
 	}
 
-	if (a != 0 && a == _currentCDSound) {
+	if (sound != 0 && sound == _currentCDSound) {
 		_currentCDSound = 0;
 		stopCD();
 		stopCDTimer();
 	}
 
 	if (!(_vm->_features & GF_DIGI_IMUSE))
-		_vm->_mixer->stopID(a);
+		_vm->_mixer->stopID(sound);
 
 	if (_vm->_musicEngine)
-		_vm->_musicEngine->stopSound(a);
+		_vm->_musicEngine->stopSound(sound);
 
 	for (i = 0; i < ARRAYSIZE(_soundQue2Sound); i++) {
-		if (_soundQue2Sound[i] == a) {
+		if (_soundQue2Sound[i] == sound) {
 			_soundQue2Sound[i] = 0;
 			_soundQue2Offset[i] = 0;
 		}

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.h,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- sound.h	9 Aug 2004 01:07:48 -0000	1.73
+++ sound.h	2 Sep 2004 04:23:13 -0000	1.74
@@ -95,7 +95,7 @@
 	bool isMouthSyncOff(uint pos);
 	int isSoundRunning(int sound) const;
 	bool isSoundInUse(int sound) const;
-	void stopSound(int a);
+	void stopSound(int sound);
 	void stopAllSounds();
 	void soundKludge(int *list, int num);
 	void talkSound(uint32 a, uint32 b, int mode, int channel = 0);





More information about the Scummvm-git-logs mailing list