[Scummvm-cvs-logs] CVS: scummvm/common savefile.cpp,1.6,1.7

Max Horn fingolfin at users.sourceforge.net
Sat Nov 29 16:44:02 CET 2003


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv3970

Modified Files:
	savefile.cpp 
Log Message:
zlib compression works *very* well, factor 3-6 in my test cases. Personally I'd make zlib support the default...

Index: savefile.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/savefile.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- savefile.cpp	30 Nov 2003 00:35:12 -0000	1.6
+++ savefile.cpp	30 Nov 2003 00:43:01 -0000	1.7
@@ -25,6 +25,10 @@
 
 
 // FIXME HACK
+// Enable this to activate transparent zlib compression of all savegames
+// Note that doing that makes ScummVM produce savegames which can't trivially
+// be read by non-zlib enabled versions. However, one can always decompress
+// such a savegame by using gzip, so this shouldn't be a bad problem.
 //#define USE_ZLIB
 
 
@@ -184,5 +188,9 @@
 }
 
 SaveFile *SaveFileManager::makeSaveFile(const char *filename, bool saveOrLoad) {
+#ifdef USE_ZLIB
+	return new GzipSaveFile(filename, saveOrLoad);
+#else
 	return new StdioSaveFile(filename, saveOrLoad);
+#endif
 }





More information about the Scummvm-git-logs mailing list