[Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,1.36,1.37 sound.cpp,1.14,1.15

James Brown ender at users.sourceforge.net
Thu Sep 26 03:00:02 CEST 2002


Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv5543/scumm

Modified Files:
	scummvm.cpp sound.cpp 
Log Message:
Patch 614223: _sfxMode fix


Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- scummvm.cpp	24 Sep 2002 23:45:25 -0000	1.36
+++ scummvm.cpp	26 Sep 2002 09:59:46 -0000	1.37
@@ -1030,7 +1030,7 @@
 			runScript(_vars[VAR_UNK_SCRIPT_2], 0, 0, 0);
 	} else if (_lastKeyHit == _vars[VAR_TALKSTOP_KEY]) {
 		_talkDelay = 0;
-		if (_sound->_sfxMode == 2)
+		if (_sound->_sfxMode & 2)
 			stopTalk();
 		return;
 	} else if (_lastKeyHit == '[') { // [, eg volume down

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- sound.cpp	22 Sep 2002 01:17:53 -0000	1.14
+++ sound.cpp	26 Sep 2002 09:59:47 -0000	1.15
@@ -393,7 +393,7 @@
 		_talk_sound_mode = 0;
 	}
 
-	if (_scumm->_vars[_scumm->VAR_TALK_ACTOR]) { //_sfxMode == 2) {
+	if (_scumm->_vars[_scumm->VAR_TALK_ACTOR]) { //_sfxMode & 2) {
 		act = _scumm->_vars[_scumm->VAR_TALK_ACTOR];
 		if (_talkChannel < 0)
 			finished = false;
@@ -422,14 +422,14 @@
 		
 		if (finished  && _scumm->_talkDelay == 0) {
 			_scumm->stopTalk();
-			_sfxMode = 0;
+			_sfxMode &= ~2;
 			_talkChannel = -1;
 		}
 	}
 		
-	if (_sfxMode == 1) {
+	if (_sfxMode & 1) {
 		if (isSfxFinished()) {
-			_sfxMode = 0;
+			_sfxMode &= ~1;
 		}
 	}
 }
@@ -490,7 +490,7 @@
 		num--;
 	}
 	_mouthSyncTimes[i] = 0xFFFF;
-	_sfxMode = mode;
+	_sfxMode |= mode;
 	_curSoundPos = 0;
 	_mouthSyncMode = true;
 
@@ -498,9 +498,9 @@
 }
 
 void Sound::stopTalkSound() {
-	if (_sfxMode == 2) {
+	if (_sfxMode & 2) {
 		stopSfxSound();
-		_sfxMode = 0;
+		_sfxMode &= ~2;
 	}
 }
 





More information about the Scummvm-git-logs mailing list