2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-07-02 09:11:49 +00:00

maint(iw4): compress rawfiles just like on IW5

This commit is contained in:
2024-04-21 13:17:51 +02:00
parent 83f57e1961
commit 6ed399be86
5 changed files with 54 additions and 10 deletions

View File

@ -58,7 +58,7 @@ bool AssetLoaderRawFile::LoadGsc(
if (ret != Z_STREAM_END)
{
std::cout << "Deflate failed for loading gsc file \"" << assetName << "\"\n";
std::cerr << "Deflate failed for loading gsc file \"" << assetName << "\"\n";
deflateEnd(&zs);
return false;
}
@ -73,6 +73,8 @@ bool AssetLoaderRawFile::LoadGsc(
rawFile->len = static_cast<int>(compressedSize + sizeof(uint32_t) + sizeof(uint32_t));
rawFile->buffer = static_cast<const char*>(compressedBuffer);
deflateEnd(&zs);
manager->AddAsset(ASSET_TYPE_RAWFILE, assetName, rawFile);
return true;