Replace magic numbers with macros from zutil.h. Compress animtrees when linking.

This commit is contained in:
JezuzLizard
2023-12-12 20:59:26 -08:00
parent 4b05c6aa9b
commit 76a98e65fd
3 changed files with 83 additions and 8 deletions

View File

@ -2,6 +2,7 @@
#include <filesystem>
#include <zlib.h>
#include <zutil.h>
using namespace T6;
@ -39,7 +40,7 @@ void AssetDumperRawFile::DumpAnimtree(AssetDumpingContext& context, XAssetInfo<R
zs.avail_in = 0;
zs.next_in = Z_NULL;
int ret = inflateInit2(&zs, -13);
int ret = inflateInit2(&zs, -DEF_WBITS);
if (ret != Z_OK)
{
@ -47,7 +48,7 @@ void AssetDumperRawFile::DumpAnimtree(AssetDumpingContext& context, XAssetInfo<R
}
zs.next_in = reinterpret_cast<const Bytef*>(&rawFile->buffer[4]);
zs.avail_in = inLen - 4;
zs.avail_in = inLen - sizeof(uint32_t);
Bytef buffer[0x1000];