diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/gui/gui_animate.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/engines/sci/gui/gui_animate.cpp b/engines/sci/gui/gui_animate.cpp index cf2472dfcf..4d13fd5a2c 100644 --- a/engines/sci/gui/gui_animate.cpp +++ b/engines/sci/gui/gui_animate.cpp @@ -64,21 +64,18 @@ bool SciGuiAnimate::invoke(List *list, int argc, reg_t *argv) { reg_t curObject; uint16 signal; + // LSL1VGA does use global variable 84, and it does point to the fastCast object. But + // it should not abort. Hooray for another game-specific workaround... + reg_t fastCastObj = (_s->_gameName != "lsl1sci") ? _s->_segMan->findObjectByName("fastCast") : NULL_REG; + while (curNode) { curObject = curNode->value; // Check if the game has a fastCast object set // if we don't abort kAnimate processing, at least in kq5 there will be animation cels drawn into speech boxes. reg_t global84 = _s->script_000->_localsBlock->_locals[84]; - if (!global84.isNull()) { - if (!strcmp(_s->_segMan->getObjectName(global84), "fastCast")) { - // Now at this point, we could safely assume that the we should abort... right? Wrong! - // LSL1VGA does use global variable 84, and it does point to the fastCast object. But - // it should not abort. Hooray for another game-specific workaround... - if (_s->_gameName != "lsl1sci") - return false; - } - } + if (!fastCastObj.isNull() && global84 == fastCastObj) + return false; signal = GET_SEL32V(segMan, curObject, signal); if (!(signal & kSignalFrozen)) { |