From 87d760f6d7670888eee76ee0256aa675086e28d8 Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 19 Feb 2020 15:36:49 +0100 Subject: [PATCH] ObjWriting: Use configured image output format when trying to dump images --- .../Game/T6/AssetDumpers/AssetDumperGfxImage.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperGfxImage.cpp b/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperGfxImage.cpp index c16f2b88..39757864 100644 --- a/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperGfxImage.cpp +++ b/src/ObjWriting/Game/T6/AssetDumpers/AssetDumperGfxImage.cpp @@ -1,5 +1,6 @@ #include "AssetDumperGfxImage.h" #include "Image/IwiWriter27.h" +#include "ObjWriting.h" using namespace T6; @@ -15,6 +16,14 @@ std::string AssetDumperGfxImage::GetFileNameForAsset(Zone* zone, GfxImage* asset void AssetDumperGfxImage::DumpAsset(Zone* zone, GfxImage* asset, FileAPI::File* out) { - IwiWriter27 writer; - writer.DumpImage(out, asset->texture.texture); + switch(ObjWriting::Configuration.ImageOutputFormat) + { + case ObjWriting::Configuration_t::ImageOutputFormat_e::DDS: + // TODO this is not yet supported + break; + case ObjWriting::Configuration_t::ImageOutputFormat_e::IWI: + IwiWriter27 writer; + writer.DumpImage(out, asset->texture.texture); + break; + } } \ No newline at end of file