aboutsummaryrefslogtreecommitdiff
path: root/scumm/sound.cpp
diff options
context:
space:
mode:
authorTravis Howell2004-07-24 13:36:26 +0000
committerTravis Howell2004-07-24 13:36:26 +0000
commit370cf65966a0a14e12dbc8db68b2f0b3f6f1c546 (patch)
tree32ef1d476086719f16c4894ca7e613bc2f93992e /scumm/sound.cpp
parent7550ebed81d784ef26a673ee05498682bdf50c1f (diff)
downloadscummvm-rg350-370cf65966a0a14e12dbc8db68b2f0b3f6f1c546.tar.gz
scummvm-rg350-370cf65966a0a14e12dbc8db68b2f0b3f6f1c546.tar.bz2
scummvm-rg350-370cf65966a0a14e12dbc8db68b2f0b3f6f1c546.zip
Corrtection from disasm., mouth sync uses speech timing.
Fix bug # svn-id: r14319
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r--scumm/sound.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index ad790fef57..bbc9bb08ac 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -64,7 +64,6 @@ Sound::Sound(ScummEngine *parent)
_talk_sound_b1(0),
_talk_sound_b2(0),
_talk_sound_mode(0),
- _talk_sound_frame(0),
_mouthSyncMode(false),
_endOfMouthSync(false),
_curSoundPos(0),
@@ -507,7 +506,7 @@ void Sound::processSfxQueues() {
const int act = _vm->getTalkingActor();
if ((_sfxMode & 2) && act != 0) {
Actor *a;
- bool b, finished;
+ bool finished;
if (_vm->_imuseDigital) {
finished = !isSoundRunning(kTalkSoundID);
@@ -515,18 +514,20 @@ void Sound::processSfxQueues() {
finished = !_talkChannelHandle.isActive();
}
- if ((uint) act < 0x80 && ((_vm->_version == 8) || (_vm->_version <= 7 && !_vm->_string[0].no_talk_anim)) && (finished || !_endOfMouthSync)) {
+ if ((uint) act < 0x80 && ((_vm->_version == 8) || (_vm->_version <= 7 && !_vm->_string[0].no_talk_anim))) {
a = _vm->derefActor(act, "processSfxQueues");
if (a->isInCurrentRoom()) {
- b = finished || isMouthSyncOff(_curSoundPos);
- if (_mouthSyncMode != b) {
- _mouthSyncMode = b;
- if (_talk_sound_frame != -1) {
- a->runActorTalkScript(_talk_sound_frame);
- _talk_sound_frame = -1;
- } else
- a->runActorTalkScript(b ? a->talkStopFrame : a->talkStartFrame);
+ if (isMouthSyncOff(_curSoundPos) && !_mouthSyncMode) {
+ if (!_endOfMouthSync)
+ a->runActorTalkScript(a->talkStopFrame);
+ _mouthSyncMode = 0;
+ } else if (isMouthSyncOff(_curSoundPos) == 0 && !_mouthSyncMode) {
+ a->runActorTalkScript(a->talkStartFrame);
+ _mouthSyncMode = 1;
}
+
+ if (_vm->_version <= 6 && finished)
+ a->runActorTalkScript(a->talkStopFrame);
}
}
@@ -883,7 +884,6 @@ void Sound::talkSound(uint32 a, uint32 b, int mode, int frame) {
_talk_sound_b2 = b;
}
- _talk_sound_frame = frame;
_talk_sound_mode |= mode;
}