aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/processroom.cpp
diff options
context:
space:
mode:
authorStrangerke2016-01-25 01:11:51 +0100
committerStrangerke2016-01-25 01:11:51 +0100
commit75d1385c8d1ba61b5740a0b43966d3c2f111440d (patch)
tree16b65f585c8970f1c2448a30002a97d0f9d5bee1 /engines/lab/processroom.cpp
parent2f03bc77764edca085753ff99ea363de34bde1df (diff)
downloadscummvm-rg350-75d1385c8d1ba61b5740a0b43966d3c2f111440d.tar.gz
scummvm-rg350-75d1385c8d1ba61b5740a0b43966d3c2f111440d.tar.bz2
scummvm-rg350-75d1385c8d1ba61b5740a0b43966d3c2f111440d.zip
LAB: Wait for the end of sound effects when they are played in Diff files. Fixes toilet noises.
Diffstat (limited to 'engines/lab/processroom.cpp')
-rw-r--r--engines/lab/processroom.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp
index f0d17bbc24..ecbfb4e2a7 100644
--- a/engines/lab/processroom.cpp
+++ b/engines/lab/processroom.cpp
@@ -252,9 +252,16 @@ void LabEngine::doActions(const ActionList &actionList) {
_music->loadSoundEffect(action->_messages[0], true, false);
break;
- case kActionShowDiff:
+ case kActionShowDiff: {
+ bool curWait = _anim->_waitForEffect;
+ // Pause the engine until the sound is finished
+ _anim->_waitForEffect = true;
_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);