mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-18 10:47:57 -05:00
ObjWriting: Add dumper for GfxImage iwi files of version 27
This commit is contained in:
20
src/ObjWriting/Game/T6/AssetDumpers/AssetDumperGfxImage.cpp
Normal file
20
src/ObjWriting/Game/T6/AssetDumpers/AssetDumperGfxImage.cpp
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user