[Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.142,1.143

Travis Howell kirben at users.sourceforge.net
Thu Feb 19 17:43:02 CET 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19875/scumm

Modified Files:
	saveload.cpp 
Log Message:

Revert recent change that breaks temporary saves (No music or even crashes)


Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- saveload.cpp	17 Feb 2004 17:43:27 -0000	1.142
+++ saveload.cpp	20 Feb 2004 01:31:29 -0000	1.143
@@ -657,18 +657,6 @@
 
 	// Save all resource.
 	int type, idx;
-
-	if (s->isLoading()) {
-		// When loading, start by deleting old non-permanent resources (an
-		// exception is made for buffer/temp resources, they are going to be
-		// deleted later on anyway).
-		for (type = rtFirst; type <= rtLast; type++) {
-			if (res.mode[type] != 1 && type != rtTemp && type != rtBuffer)
-				for (idx = 1; idx < res.num[type]; idx++)
-					nukeResource(type, idx);
-		}
-	}
-
 	if (savegameVersion >= VER(26)) {
 		// New, more robust resource save/load system. This stores the type
 		// and index of each resource. Thus if we increase e.g. the maximum
@@ -701,9 +689,10 @@
 		// with index 0, and breaks whenever we change the limit on a given
 		// resource type.
 		for (type = rtFirst; type <= rtLast; type++)
-			if (res.mode[type] != 1 && type != rtTemp && type != rtBuffer)
+			if (res.mode[type] != 1)
 				for (idx = 1; idx < res.num[type]; idx++)
-					saveLoadResource(s, type, idx);
+					if (type != rtTemp && type != rtBuffer)
+						saveLoadResource(s, type, idx);
 	}
 
 	s->saveLoadArrayOf(_objectOwnerTable, _numGlobalObjects, sizeof(_objectOwnerTable[0]), sleByte);





More information about the Scummvm-git-logs mailing list