aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/processroom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lab/processroom.cpp')
-rw-r--r--engines/lab/processroom.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp
index 44c8d65d7c..58b7e253f1 100644
--- a/engines/lab/processroom.cpp
+++ b/engines/lab/processroom.cpp
@@ -238,6 +238,8 @@ void LabEngine::doActions(const ActionList &actionList) {
ActionList::const_iterator action;
for (action = actionList.begin(); action != actionList.end(); ++action) {
updateEvents();
+ if (_quitLab || shouldQuit())
+ return;
switch (action->_actionType) {
case kActionPlaySound:
@@ -252,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);
@@ -272,7 +267,7 @@ void LabEngine::doActions(const ActionList &actionList) {
// Puts a file into memory
_graphics->loadPict(action->_messages[0]);
break;
-
+
case kActionLoadBitmap:
error("Unused opcode kActionLoadBitmap has been called");
@@ -381,6 +376,8 @@ void LabEngine::doActions(const ActionList &actionList) {
while (_system->getMillis() < targetMillis) {
updateEvents();
+ if (_quitLab || shouldQuit())
+ return;
_anim->diffNextFrame();
}
}
@@ -409,6 +406,8 @@ void LabEngine::doActions(const ActionList &actionList) {
case kActionWaitSound: // used in scene 44 (heart of the labyrinth / ending)
while (_music->isSoundEffectActive()) {
updateEvents();
+ if (_quitLab || shouldQuit())
+ return;
_anim->diffNextFrame();
waitTOF();
}