aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2003-11-30 00:43:01 +0000
committerMax Horn2003-11-30 00:43:01 +0000
commit5120eddb540a2812f1a8be7184fef3a78387781d (patch)
treeff9b8eda1260a77a8682baacd8ed09310b42ce93 /common
parent93f58abde7e9fe9b28a336db609c884afd0fec6a (diff)
downloadscummvm-rg350-5120eddb540a2812f1a8be7184fef3a78387781d.tar.gz
scummvm-rg350-5120eddb540a2812f1a8be7184fef3a78387781d.tar.bz2
scummvm-rg350-5120eddb540a2812f1a8be7184fef3a78387781d.zip
zlib compression works *very* well, factor 3-6 in my test cases. Personally I'd make zlib support the default...
svn-id: r11435
Diffstat (limited to 'common')
-rw-r--r--common/savefile.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/savefile.cpp b/common/savefile.cpp
index 1e2725f98f..01185b6527 100644
--- a/common/savefile.cpp
+++ b/common/savefile.cpp
@@ -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 @@ void SaveFileManager::join_paths(const char *filename, const char *directory,
}
SaveFile *SaveFileManager::makeSaveFile(const char *filename, bool saveOrLoad) {
+#ifdef USE_ZLIB
+ return new GzipSaveFile(filename, saveOrLoad);
+#else
return new StdioSaveFile(filename, saveOrLoad);
+#endif
}