]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/common/vfs.c
Merge commit '7d7436ec3dd43cbdb04ad41f0a2c92a905f26807' into garux-merge
[xonotic/netradiant.git] / tools / quake3 / common / vfs.c
index a76d3172af5733dde66351ed77ef4cbb9a386c8d..d26e224906917a4020fbd4d2dd7c4a168e869ed8 100644 (file)
@@ -495,7 +495,7 @@ int vfsLoadFile( const char *filename, void **bufferptr, int index ){
 }
 
 
-qboolean vfsPackFile( const char *filename, const char *packname ){
+qboolean vfsPackFile( const char *filename, const char *packname, const int compLevel ){
 #ifndef BAD_MINIZ
        int i;
        char tmp[NAME_MAX], fixed[NAME_MAX];
@@ -518,7 +518,7 @@ qboolean vfsPackFile( const char *filename, const char *packname ){
                                mz_zip_writer_init_from_reader( &zip, packname );
 
                                mz_bool success = MZ_TRUE;
-                               success &= mz_zip_writer_add_file( &zip, filename, tmp, 0, 0, 10 );
+                               success &= mz_zip_writer_add_file( &zip, filename, tmp, 0, 0, compLevel );
                                if ( !success || !mz_zip_writer_finalize_archive( &zip ) ){
                                        Error( "Failed creating zip archive \"%s\"!\n", packname );
                                }
@@ -532,7 +532,7 @@ qboolean vfsPackFile( const char *filename, const char *packname ){
                                        Error( "Failed creating zip archive \"%s\"!\n", packname );
                                }
                                mz_bool success = MZ_TRUE;
-                               success &= mz_zip_writer_add_file( &zip, filename, tmp, 0, 0, 10 );
+                               success &= mz_zip_writer_add_file( &zip, filename, tmp, 0, 0, compLevel );
                                if ( !success || !mz_zip_writer_finalize_archive( &zip ) ){
                                        Error( "Failed creating zip archive \"%s\"!\n", packname );
                                }
@@ -571,7 +571,7 @@ qboolean vfsPackFile( const char *filename, const char *packname ){
                }
                else{
                        mz_bool success = MZ_TRUE;
-                       success &= mz_zip_add_mem_to_archive_file_in_place_with_time( packname, filename, bufferptr, i, 0, 0, 10, DOS_time, DOS_date );
+                       success &= mz_zip_add_mem_to_archive_file_in_place_with_time( packname, filename, bufferptr, i, 0, 0, compLevel, DOS_time, DOS_date );
                                if ( !success ){
                                        Error( "Failed creating zip archive \"%s\"!\n", packname );
                                }