Fix rawfile stuff (TODO: Implement correct compression!)
This commit is contained in:
parent
f9c087e012
commit
13bf9d2b79
@ -10,14 +10,17 @@ namespace Assets
|
|||||||
{
|
{
|
||||||
Game::RawFile* asset = builder->GetAllocator()->AllocateArray<Game::RawFile>();
|
Game::RawFile* asset = builder->GetAllocator()->AllocateArray<Game::RawFile>();
|
||||||
|
|
||||||
std::string data = Utils::Compression::ZLib::Compress(rawFile.GetBuffer());
|
if (asset)
|
||||||
|
{
|
||||||
|
//std::string data = Utils::Compression::ZLib::Compress(rawFile.GetBuffer());
|
||||||
|
|
||||||
asset->name = builder->GetAllocator()->DuplicateString(name);
|
asset->name = builder->GetAllocator()->DuplicateString(name);
|
||||||
asset->compressedData = builder->GetAllocator()->DuplicateString(data);
|
asset->compressedData = builder->GetAllocator()->DuplicateString(rawFile.GetBuffer());
|
||||||
asset->sizeCompressed = data.size() + 1;
|
asset->sizeCompressed = 0;//data.size();
|
||||||
asset->sizeUnCompressed = 0;
|
asset->sizeUnCompressed = rawFile.GetBuffer().size();
|
||||||
|
|
||||||
header->rawfile = asset;
|
header->rawfile = asset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user