From b6749ecc0fde290e671e17b45a02e0bd1dcdecfb Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 15 Dec 2000 05:57:44 +0000 Subject: [PATCH] write out meshed models using gzip compression (files will NOT have the .gz extension, but the unix file command (and peering at the file when you know what to look for) verifies that they are gzip files. This should save a little space (files compress by 40-80%) --- source/gl_mesh.c | 2 +- source/quakeio.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/gl_mesh.c b/source/gl_mesh.c index d6c9476..1b9ae54 100644 --- a/source/gl_mesh.c +++ b/source/gl_mesh.c @@ -353,7 +353,7 @@ GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr) // save out the cached version // snprintf (fullpath, sizeof (fullpath), "%s/%s", com_gamedir, cache); - f = Qopen (fullpath, "wb"); + f = Qopen (fullpath, "wbz9"); if (!f) { COM_CreatePath (fullpath); f = Qopen (fullpath, "wb"); diff --git a/source/quakeio.c b/source/quakeio.c index 295bcb3..987a603 100644 --- a/source/quakeio.c +++ b/source/quakeio.c @@ -125,6 +125,11 @@ Qopen (const char *path, const char *mode) zip = 1; continue; } +#ifndef HAVE_ZLIB + if (strchr ("0123456789fh", *mode)) { + continue; + } +#endif *p++ = *mode; } *p = 0;