maint(iw4): compress rawfiles just like on IW5

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

View File

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