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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Jun 18 17:40:18 CEST 2010


Revision: 50022
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50022&view=rev
Author:   thebluegr
Date:     2010-06-18 15:40:18 +0000 (Fri, 18 Jun 2010)

Log Message:
-----------
Fixed a problem in kAnimate which occurred when a list was modified by a call (e.g. in KQ1 demo, PQ2)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/seg_manager.cpp
    scummvm/trunk/engines/sci/graphics/animate.cpp

Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp	2010-06-18 15:18:14 UTC (rev 50021)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2010-06-18 15:40:18 UTC (rev 50022)
@@ -531,12 +531,6 @@
 	SegmentType type = getSegmentType(addr.segment);
 
 	if (type != SEG_TYPE_NODES) {
-		if (g_sci->getGameId() == "kq1sci") {
-			// WORKAROUND: The demo of KQ1 is trying to use an invalid memory reference as a list node
-			warning("Attempt to use non-node %04x:%04x (type %d) as list node", PRINT_REG(addr), type);
-			return NULL;
-		}
-
 		error("Attempt to use non-node %04x:%04x (type %d) as list node", PRINT_REG(addr), type);
 		return NULL;
 	}
@@ -544,7 +538,7 @@
 	NodeTable *nt = (NodeTable *)_heap[addr.segment];
 
 	if (!nt->isValidEntry(addr.offset)) {
-		error("Attempt to use invalid reference %04x:%04x as list node", PRINT_REG(addr));
+		error("Attempt to use invalid or discarded reference %04x:%04x as list node", PRINT_REG(addr));
 		return NULL;
 	}
 

Modified: scummvm/trunk/engines/sci/graphics/animate.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/animate.cpp	2010-06-18 15:18:14 UTC (rev 50021)
+++ scummvm/trunk/engines/sci/graphics/animate.cpp	2010-06-18 15:40:18 UTC (rev 50022)
@@ -606,6 +606,9 @@
 	if (cycle) {
 		if (!invoke(list, argc, argv))
 			return;
+
+		// Look up the list again, as it may have been modified
+		list = _s->_segMan->lookupList(listReference);
 	}
 
 	Port *oldPort = _ports->setPort((Port *)_ports->_picWind);


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