2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-06-02 22:47:42 +00:00

Changed structure of IWI header writing so 2D images are last.

This commit is contained in:
LJW-Dev 2025-05-30 17:22:09 +08:00
parent a8cf9b79fa
commit dc43671930

View File

@ -116,17 +116,17 @@ void IwiWriter::DumpImage(std::ostream& stream, const Texture* texture)
header.fileSizeForPicmip[currentMipLevel] = static_cast<uint32_t>(currentFileSize); header.fileSizeForPicmip[currentMipLevel] = static_cast<uint32_t>(currentFileSize);
} }
if (const auto* texture2D = dynamic_cast<const Texture2D*>(texture)) if (const auto* texture3D = dynamic_cast<const Texture3D*>(texture))
{ {
FillHeader2D(header, *texture2D); FillHeader3D(header, *texture3D);
} }
else if (const auto* textureCube = dynamic_cast<const TextureCube*>(texture)) else if (const auto* textureCube = dynamic_cast<const TextureCube*>(texture))
{ {
FillHeaderCube(header, *textureCube); FillHeaderCube(header, *textureCube);
} }
else if (const auto* texture3D = dynamic_cast<const Texture3D*>(texture)) else if (const auto* texture2D = dynamic_cast<const Texture2D*>(texture))
{ {
FillHeader3D(header, *texture3D); FillHeader2D(header, *texture2D);
} }
else else
{ {