aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2002-09-26 09:59:47 +0000
committerJames Brown2002-09-26 09:59:47 +0000
commit522ee88b62206fabb18ce5e4f9221da89b766663 (patch)
tree999e4e0d1198d1d4214bf22941b13bfba9b47a69
parentb5efef6be5ad42ed0357cbf1d1eec9022c336f2f (diff)
downloadscummvm-rg350-522ee88b62206fabb18ce5e4f9221da89b766663.tar.gz
scummvm-rg350-522ee88b62206fabb18ce5e4f9221da89b766663.tar.bz2
scummvm-rg350-522ee88b62206fabb18ce5e4f9221da89b766663.zip
Patch 614223: _sfxMode fix
svn-id: r5019
-rw-r--r--scumm/scummvm.cpp2
-rw-r--r--scumm/sound.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 7a6d3e9c10..6a8e9df268 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -1030,7 +1030,7 @@ void Scumm::processKbd()
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
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index e77b076f17..82a956f170 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -393,7 +393,7 @@ void Sound::processSfxQueues() {
_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 @@ void Sound::processSfxQueues() {
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 @@ int Sound::startTalkSound(uint32 offset, uint32 b, int mode) {
num--;
}
_mouthSyncTimes[i] = 0xFFFF;
- _sfxMode = mode;
+ _sfxMode |= mode;
_curSoundPos = 0;
_mouthSyncMode = true;
@@ -498,9 +498,9 @@ int Sound::startTalkSound(uint32 offset, uint32 b, int mode) {
}
void Sound::stopTalkSound() {
- if (_sfxMode == 2) {
+ if (_sfxMode & 2) {
stopSfxSound();
- _sfxMode = 0;
+ _sfxMode &= ~2;
}
}