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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Jun 25 19:25:00 CEST 2010


Revision: 50277
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50277&view=rev
Author:   thebluegr
Date:     2010-06-25 17:25:00 +0000 (Fri, 25 Jun 2010)

Log Message:
-----------
When loading a game, stop all running VMs recursively, and also stop kAnimate's current recursion. This fixes the invalid execution stack frame in SQ1, when loading from the death screen after dying from the acid drops in Kerona. This should also fix the invalid hunk pointers, thus the warning about invalid hunk pointers has been turned into an error, as it shouldn't occur anymore

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/seg_manager.cpp
    scummvm/trunk/engines/sci/engine/vm.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-25 17:13:47 UTC (rev 50276)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2010-06-25 17:25:00 UTC (rev 50277)
@@ -454,7 +454,7 @@
 	HunkTable *ht = (HunkTable *)getSegment(addr.segment, SEG_TYPE_HUNK);
 
 	if (!ht || !ht->isValidEntry(addr.offset)) {
-		warning("getHunkPointer() with invalid handle %04x:%04x", PRINT_REG(addr));
+		error("getHunkPointer() with invalid handle %04x:%04x", PRINT_REG(addr));
 		return NULL;
 	}
 

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2010-06-25 17:13:47 UTC (rev 50276)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2010-06-25 17:25:00 UTC (rev 50277)
@@ -1226,6 +1226,11 @@
 
 			xs_new = &(s->_executionStack.back());
 			s->_executionStackPosChanged = true;
+
+			// If a game is being loaded, stop processing
+			if (s->abortScriptProcessing != kAbortNone || g_engine->shouldQuit())
+				return; // Stop processing
+
 			break;
 		}
 

Modified: scummvm/trunk/engines/sci/graphics/animate.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/animate.cpp	2010-06-25 17:13:47 UTC (rev 50276)
+++ scummvm/trunk/engines/sci/graphics/animate.cpp	2010-06-25 17:25:00 UTC (rev 50277)
@@ -98,6 +98,11 @@
 		if (!(signal & kSignalFrozen)) {
 			// Call .doit method of that object
 			invokeSelector(_s, curObject, SELECTOR(doit), argc, argv, 0);
+
+			// If a game is being loaded, stop processing
+			if (_s->abortScriptProcessing != kAbortNone || g_engine->shouldQuit())
+				return true; // Stop processing
+
 			// Lookup node again, since the nodetable it was in may have been reallocated
 			curNode = _s->_segMan->lookupNode(curAddress);
 		}


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