aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/sound.cpp14
-rw-r--r--scumm/string.cpp12
2 files changed, 8 insertions, 18 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index f766ae7bd9..c7c2a2eb84 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -560,19 +560,10 @@ void Sound::processSfxQueues() {
_talk_sound_mode = 0;
}
- if (_scumm->VAR(_scumm->VAR_TALK_ACTOR)) { //_sfxMode & 2) {
+ if ((_sfxMode & 2) && _scumm->VAR(_scumm->VAR_TALK_ACTOR)) {
act = _scumm->VAR(_scumm->VAR_TALK_ACTOR);
- // FIXME: This was changed in the process of my COMI fixes.
- // Problem is, 'finished' used to indicate if speech had
- // been running but now is finished. But now, it'll be set
- // even if there never has been any speech running (i.e. in
- // all games which don't even use speech). This will have
- // to be fixed properly! For now I am just disabling
- // this for V2 games. A better fix would be to introduce a second
- // variable which is set whenever speech is initiated, and reset
- // when it stops (i.e. when _talkChannelHandle is 0).
- finished = !_talkChannelHandle && (_scumm->_version > 2);
+ finished = !_talkChannelHandle;
if (act != 0 && (uint) act < 0x80 && !_scumm->_string[0].no_talk_anim) {
a = _scumm->derefActor(act, "processSfxQueues");
@@ -593,7 +584,6 @@ void Sound::processSfxQueues() {
if (finished && _scumm->_talkDelay == 0) {
_scumm->stopTalk();
- _sfxMode &= ~2;
}
}
diff --git a/scumm/string.cpp b/scumm/string.cpp
index ebd6baef17..167d3e4ea2 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -149,13 +149,13 @@ void Scumm::CHARSET_1() {
if (_talkDelay)
return;
- if (_haveMsg == 1) {
- // FIXME: DIG and CMI never set sfxMode or any actor talk data...
- // This hack will force the backup cutoff system to be used instead,
- // unless the talkChannel is null (eg, this string has no sound attached)
- if ((_gameId == GID_CMI || _gameId == GID_DIG) && _sound->_talkChannelHandle)
- return;
+ if ((_gameId == GID_CMI || _gameId == GID_DIG) && _sound->_talkChannelHandle) {
+ // Keep the 'speech' flag in _sound->_sfxMode set as long as the
+ // _talkChannelHandle is valid.
+ _sound->_sfxMode |= 2;
+ }
+ if (_haveMsg == 1) {
if ((_sound->_sfxMode & 2) == 0)
stopTalk();
return;