[Scummvm-cvs-logs] SF.net SVN: scummvm:[45314] scummvm/trunk/engines/sci/gui

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Wed Oct 21 22:57:45 CEST 2009


Revision: 45314
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45314&view=rev
Author:   m_kiewitz
Date:     2009-10-21 20:57:42 +0000 (Wed, 21 Oct 2009)

Log Message:
-----------
SCI/newgui: kAnimate - fastCast change (again)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gui/gui_animate.cpp
    scummvm/trunk/engines/sci/gui/gui_animate.h

Modified: scummvm/trunk/engines/sci/gui/gui_animate.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_animate.cpp	2009-10-21 20:25:05 UTC (rev 45313)
+++ scummvm/trunk/engines/sci/gui/gui_animate.cpp	2009-10-21 20:57:42 UTC (rev 45314)
@@ -49,6 +49,14 @@
 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,19 +72,20 @@
 	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)) {
 			// Call .doit method of that object

Modified: scummvm/trunk/engines/sci/gui/gui_animate.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_animate.h	2009-10-21 20:25:05 UTC (rev 45313)
+++ scummvm/trunk/engines/sci/gui/gui_animate.h	2009-10-21 20:57:42 UTC (rev 45314)
@@ -88,6 +88,8 @@
 	GuiAnimateEntry *_listData;
 	GuiAnimateList _list;
 	//List *_lastCast;
+
+	bool _ignoreFastCast;
 };
 
 } // End of namespace Sci


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