ObjWriting: Add dumper for GfxImage iwi files of version 27

This commit is contained in:
Jan
2020-02-11 23:47:04 +01:00
parent 6b59fcb5fe
commit f3779bac03
6 changed files with 214 additions and 1 deletions

View File

@ -0,0 +1,20 @@
#include "AssetDumperGfxImage.h"
#include "Image/IwiWriter27.h"
using namespace T6;
bool AssetDumperGfxImage::ShouldDump(GfxImage* asset)
{
return asset->loadedSize > 0;
}
std::string AssetDumperGfxImage::GetFileNameForAsset(Zone* zone, GfxImage* asset)
{
return "images/" + std::string(asset->name) + ".iwi";
}
void AssetDumperGfxImage::DumpAsset(Zone* zone, GfxImage* asset, FileAPI::File* out)
{
IwiWriter27 writer;
writer.DumpImage(out, asset->texture.texture);
}