[Scummvm-cvs-logs] SF.net SVN: scummvm:[54511] scummvm/trunk/engines/sci/engine/savegame.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Nov 27 19:23:39 CET 2010


Revision: 54511
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54511&view=rev
Author:   thebluegr
Date:     2010-11-27 18:23:39 +0000 (Sat, 27 Nov 2010)

Log Message:
-----------
SCI: Reverted changes to savegame.cpp made in r54510, as that still occurs

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/savegame.cpp

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2010-11-27 18:08:47 UTC (rev 54510)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2010-11-27 18:23:39 UTC (rev 54511)
@@ -194,23 +194,17 @@
 
 		for (ObjMap::iterator it = scr->_objects.begin(); it != scr->_objects.end(); ++it) {
 			reg_t addr = it->_value.getPos();
-			scr->scriptObjInit(addr, false);
-		}
+			Object *obj = scr->scriptObjInit(addr, false);
 
-		// In SCI0-SCI1, we need to make two passes, as the objects in the
-		// script might be in the wrong order (e.g. in the demo of Iceman).
-		// Refer to bug #3034713
-		if (getSciVersion() < SCI_VERSION_1_1) {
-			for (ObjMap::iterator it = scr->_objects.begin(); it != scr->_objects.end(); ++it) {
-				reg_t addr = it->_value.getPos();
-				Object *obj = scr->scriptObjInit(addr, false);
+			if (getSciVersion() < SCI_VERSION_1_1) {
 				if (!obj->initBaseObject(this, addr, false)) {
-					error("Failed to locate base object for object at %04X:%04X; skipping", PRINT_REG(addr));
-					//scr->scriptObjRemove(addr);
+					// TODO/FIXME: This should not be happening at all. It might indicate a possible issue
+					// with the garbage collector. It happens for example in LSL5 (German, perhaps English too).
+					warning("Failed to locate base object for object at %04X:%04X; skipping", PRINT_REG(addr));
+					scr->_objects.erase(addr.toUint16());
 				}
 			}
 		}
-
 	}
 }
 


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