mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-02 22:47:42 +00:00
Merge pull request #441 from LJW-Dev/fix-iwi-header-writing
Fix BO2 IWI files saving cube textures incorrectly.
This commit is contained in:
commit
da1c3956e5
@ -113,17 +113,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
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -108,17 +108,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
|
||||||
{
|
{
|
||||||
|
@ -108,17 +108,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
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user