[Scummvm-cvs-logs] SF.net SVN: scummvm:[45313] scummvm/trunk/engines/sci/gui/gui_animate.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Oct 21 22:25:05 CEST 2009
Revision: 45313
http://scummvm.svn.sourceforge.net/scummvm/?rev=45313&view=rev
Author: thebluegr
Date: 2009-10-21 20:25:05 +0000 (Wed, 21 Oct 2009)
Log Message:
-----------
Make the check for global variable 84 inside SciGuiAnimate::invoke() simpler and faster
Modified Paths:
--------------
scummvm/trunk/engines/sci/gui/gui_animate.cpp
Modified: scummvm/trunk/engines/sci/gui/gui_animate.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_animate.cpp 2009-10-21 20:10:23 UTC (rev 45312)
+++ scummvm/trunk/engines/sci/gui/gui_animate.cpp 2009-10-21 20:25:05 UTC (rev 45313)
@@ -64,21 +64,18 @@
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)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list