From 13bf9d2b79de6f48f6c67a5c84298b5c962a6692 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Wed, 27 Jan 2016 03:02:42 +0100 Subject: [PATCH] Fix rawfile stuff (TODO: Implement correct compression!) --- .../Modules/AssetInterfaces/IRawFile.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Components/Modules/AssetInterfaces/IRawFile.cpp b/src/Components/Modules/AssetInterfaces/IRawFile.cpp index a8e7d0b1..38c54c1d 100644 --- a/src/Components/Modules/AssetInterfaces/IRawFile.cpp +++ b/src/Components/Modules/AssetInterfaces/IRawFile.cpp @@ -10,14 +10,17 @@ namespace Assets { Game::RawFile* asset = builder->GetAllocator()->AllocateArray(); - 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->compressedData = builder->GetAllocator()->DuplicateString(data); - asset->sizeCompressed = data.size() + 1; - asset->sizeUnCompressed = 0; + asset->name = builder->GetAllocator()->DuplicateString(name); + asset->compressedData = builder->GetAllocator()->DuplicateString(rawFile.GetBuffer()); + asset->sizeCompressed = 0;//data.size(); + asset->sizeUnCompressed = rawFile.GetBuffer().size(); - header->rawfile = asset; + header->rawfile = asset; + } } }