aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/anim.cpp8
-rw-r--r--engines/lab/processroom.cpp9
2 files changed, 8 insertions, 9 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp
index 1190f0323b..2dc580735e 100644
--- a/engines/lab/anim.cpp
+++ b/engines/lab/anim.cpp
@@ -208,6 +208,8 @@ void Anim::diffNextFrame(bool onlyDiffData) {
_vm->updateEvents();
_vm->waitTOF();
}
+
+ _waitForEffect = false;
}
_size -= 8;
@@ -217,7 +219,9 @@ void Anim::diffNextFrame(bool onlyDiffData) {
_diffFile->skip(2);
// Sound effects embedded in animations are started here. These are
- // usually animation-specific, like door opening sounds, and are not looped
+ // usually animation-specific, like door opening sounds, and are not looped.
+ // The engine should wait for all such sounds to end.
+ _waitForEffect = true;
_vm->_music->playSoundEffect(_sampleSpeed, _size, false, _diffFile);
break;
@@ -233,6 +237,8 @@ void Anim::diffNextFrame(bool onlyDiffData) {
if (drawOnScreen)
didTOF = true;
}
+
+ _waitForEffect = false;
}
_isPlaying = false;
diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp
index 5093e8ef85..68e6e63c1d 100644
--- a/engines/lab/processroom.cpp
+++ b/engines/lab/processroom.cpp
@@ -254,16 +254,9 @@ void LabEngine::doActions(const ActionList &actionList) {
_music->loadSoundEffect(action->_messages[0], true, false);
break;
- case kActionShowDiff: {
- bool curWait = _anim->_waitForEffect;
- // Pause the engine until the sound is finished
- _anim->_waitForEffect = true;
+ case kActionShowDiff:
_graphics->readPict(action->_messages[0], true);
-
- // Restore the previous value of _waitForEffect
- _anim->_waitForEffect = curWait;
break;
- }
case kActionShowDiffLooping: // used in scene 44 (heart of the labyrinth, minotaur)
_graphics->readPict(action->_messages[0], false);