[Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.81,1.82

Max Horn fingolfin at users.sourceforge.net
Sat May 31 05:21:06 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv28630

Modified Files:
	saveload.cpp 
Log Message:
FIXME comment added

Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- saveload.cpp	29 May 2003 11:48:44 -0000	1.81
+++ saveload.cpp	31 May 2003 12:16:49 -0000	1.82
@@ -566,13 +566,17 @@
 	s->saveLoadArrayOf(_verbs, _numVerbs, sizeof(_verbs[0]), verbEntries);
 	s->saveLoadArrayOf(vm.nest, 16, sizeof(vm.nest[0]), nestedScriptEntries);
 	s->saveLoadArrayOf(_sentence, 6, sizeof(_sentence[0]), sentenceTabEntries);
-	/* XXX: next time save game format changes, Fingolfin wants to revise StringTab - contact him */
 	s->saveLoadArrayOf(_string, 6, sizeof(_string[0]), stringTabEntries);
 	s->saveLoadArrayOf(_colorCycle, 16, sizeof(_colorCycle[0]), colorCycleEntries);
 
 	if (savegameVersion >= VER_V13)
 		s->saveLoadArrayOf(_scaleSlots, 20, sizeof(_scaleSlots[0]), scaleSlotsEntries);
 
+	// Save all resource. Fingolfin doesn't like this part of the save/load code a bit.
+	// It is very fragile: e.g. if we change the num limit for one resource type, this
+	// code will break down. Worse, there is no way such a problem could easily be detected.
+	// We should at least store for each save resource it's type and ID. Then at least
+	// we can perform some integrety checks when loading.
 	for (i = rtFirst; i <= rtLast; i++)
 		if (res.mode[i] == 0)
 			for (j = 1; j < res.num[i]; j++)





More information about the Scummvm-git-logs mailing list