aboutsummaryrefslogtreecommitdiff
path: root/scumm/sound.cpp
diff options
context:
space:
mode:
authorMax Horn2004-01-15 20:39:24 +0000
committerMax Horn2004-01-15 20:39:24 +0000
commitb38f773e0f01604aba7a8c2750a5c3c2b2fd4a2b (patch)
tree8c697a9fbfde55a45adc6c2ae0b185101151bcd4 /scumm/sound.cpp
parentc14e7a02594c1842942108ea8425980638ea9320 (diff)
downloadscummvm-rg350-b38f773e0f01604aba7a8c2750a5c3c2b2fd4a2b.tar.gz
scummvm-rg350-b38f773e0f01604aba7a8c2750a5c3c2b2fd4a2b.tar.bz2
scummvm-rg350-b38f773e0f01604aba7a8c2750a5c3c2b2fd4a2b.zip
fixed COMI speech behaviour
svn-id: r12415
Diffstat (limited to 'scumm/sound.cpp')
-rw-r--r--scumm/sound.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index 36d290fbd6..5f6c6c711f 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -405,21 +405,19 @@ void Sound::playSound(int soundID) {
}
void Sound::processSfxQueues() {
- Actor *a;
- int act;
- bool b, finished;
if (_talk_sound_mode != 0) {
if (_talk_sound_mode & 1)
startTalkSound(_talk_sound_a1, _talk_sound_b1, 1);
- if (_talk_sound_mode & 2) {
+ if (_talk_sound_mode & 2)
startTalkSound(_talk_sound_a2, _talk_sound_b2, 2, &_talkChannelHandle);
- }
_talk_sound_mode = 0;
}
- if ((_sfxMode & 2) && _vm->VAR(_vm->VAR_TALK_ACTOR)) {
- act = _vm->VAR(_vm->VAR_TALK_ACTOR);
+ const int act = _vm->VAR(_vm->VAR_TALK_ACTOR);
+ if ((_sfxMode & 2) && act != 0) {
+ Actor *a;
+ bool b, finished;
if (_vm->_imuseDigital) {
finished = !isSoundRunning(kTalkSoundID);
@@ -427,9 +425,9 @@ void Sound::processSfxQueues() {
finished = !_talkChannelHandle.isActive();
}
- if (act != 0 && (uint) act < 0x80 && !_vm->_string[0].no_talk_anim) {
+ if ((uint) act < 0x80 && !_vm->_string[0].no_talk_anim && (finished || !_endOfMouthSync)) {
a = _vm->derefActor(act, "processSfxQueues");
- if (a->isInCurrentRoom() && (finished || !_endOfMouthSync)) {
+ if (a->isInCurrentRoom()) {
b = finished || isMouthSyncOff(_curSoundPos);
if (_mouthSyncMode != b) {
_mouthSyncMode = b;
@@ -464,6 +462,11 @@ void Sound::startTalkSound(uint32 offset, uint32 b, int mode, PlayingSoundHandle
byte *sound;
int id = -1;
+ if (_vm->_gameId == GID_CMI) {
+ _sfxMode |= mode;
+ return;
+ }
+
if ((_vm->_gameId == GID_DIG) && (_vm->_features & GF_DEMO)) {
char filename[30];
char roomname[10];