From dc436719300517da72f9e03b7ce8a57f7defd25b Mon Sep 17 00:00:00 2001 From: LJW-Dev Date: Fri, 30 May 2025 17:22:09 +0800 Subject: [PATCH] Changed structure of IWI header writing so 2D images are last. --- src/ObjImage/Image/IwiWriter27.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ObjImage/Image/IwiWriter27.cpp b/src/ObjImage/Image/IwiWriter27.cpp index 8509fabf..bc31b97c 100644 --- a/src/ObjImage/Image/IwiWriter27.cpp +++ b/src/ObjImage/Image/IwiWriter27.cpp @@ -116,17 +116,17 @@ void IwiWriter::DumpImage(std::ostream& stream, const Texture* texture) header.fileSizeForPicmip[currentMipLevel] = static_cast(currentFileSize); } - if (const auto* texture2D = dynamic_cast(texture)) + if (const auto* texture3D = dynamic_cast(texture)) { - FillHeader2D(header, *texture2D); + FillHeader3D(header, *texture3D); } else if (const auto* textureCube = dynamic_cast(texture)) { FillHeaderCube(header, *textureCube); } - else if (const auto* texture3D = dynamic_cast(texture)) + else if (const auto* texture2D = dynamic_cast(texture)) { - FillHeader3D(header, *texture3D); + FillHeader2D(header, *texture2D); } else {