diff options
author | Martin Kiewitz | 2009-10-21 20:57:42 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-21 20:57:42 +0000 |
commit | fd9a062452e5299fad95c25ca187284d0614e7b9 (patch) | |
tree | a99f7d80904320d1da0ff8bdc1b8ec10f069f0e4 | |
parent | 8f8af8a19b13e6ed8d0e15709d3cd5a5e972bbe3 (diff) | |
download | scummvm-rg350-fd9a062452e5299fad95c25ca187284d0614e7b9.tar.gz scummvm-rg350-fd9a062452e5299fad95c25ca187284d0614e7b9.tar.bz2 scummvm-rg350-fd9a062452e5299fad95c25ca187284d0614e7b9.zip |
SCI/newgui: kAnimate - fastCast change (again)
svn-id: r45314
-rw-r--r-- | engines/sci/gui/gui_animate.cpp | 27 | ||||
-rw-r--r-- | engines/sci/gui/gui_animate.h | 2 |
2 files changed, 20 insertions, 9 deletions
diff --git a/engines/sci/gui/gui_animate.cpp b/engines/sci/gui/gui_animate.cpp index 4d13fd5a2c..ec011bb765 100644 --- a/engines/sci/gui/gui_animate.cpp +++ b/engines/sci/gui/gui_animate.cpp @@ -49,6 +49,14 @@ SciGuiAnimate::~SciGuiAnimate() { void SciGuiAnimate::init() { _listData = NULL; _listSize = 0; + + _ignoreFastCast = false; + if (getSciVersion() <= SCI_VERSION_01) + _ignoreFastCast = true; + if (!_s->_segMan->findObjectByName("fastCast").isNull()) + _ignoreFastCast = true; + if (_ignoreFastCast) + warning("Ignoring fast cast"); } void SciGuiAnimate::disposeLastCast() { @@ -64,18 +72,19 @@ 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 (!fastCastObj.isNull() && global84 == fastCastObj) - return false; + if (!_ignoreFastCast) { + // 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")) + return false; + } + } signal = GET_SEL32V(segMan, curObject, signal); if (!(signal & kSignalFrozen)) { diff --git a/engines/sci/gui/gui_animate.h b/engines/sci/gui/gui_animate.h index 92230b7ebc..29214543dd 100644 --- a/engines/sci/gui/gui_animate.h +++ b/engines/sci/gui/gui_animate.h @@ -88,6 +88,8 @@ private: GuiAnimateEntry *_listData; GuiAnimateList _list; //List *_lastCast; + + bool _ignoreFastCast; }; } // End of namespace Sci |