]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/common/vfs.c
Q3map2:
[xonotic/netradiant.git] / tools / quake3 / common / vfs.c
index 350bbc094be779fd5c37c984b8cb60f0f58b2a60..f14504706bd5fed1ac3b83e2dc83ec2aa9716f4a 100644 (file)
@@ -480,7 +480,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 ){
        int i;
        char tmp[NAME_MAX], fixed[NAME_MAX];
        GSList *lst;
@@ -502,7 +502,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 );
                                }
@@ -516,7 +516,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 );
                                }
@@ -555,7 +555,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 );
                                }