From f052a97886d8cdbd1f313731afe099361d2c5029 Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 14 Aug 2021 13:57:18 +0200 Subject: [PATCH] Fix T5 loading and dumping images --- src/ObjLoading/Game/T5/ObjLoaderT5.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ObjLoading/Game/T5/ObjLoaderT5.cpp b/src/ObjLoading/Game/T5/ObjLoaderT5.cpp index 456b6a59..392cf517 100644 --- a/src/ObjLoading/Game/T5/ObjLoaderT5.cpp +++ b/src/ObjLoading/Game/T5/ObjLoaderT5.cpp @@ -104,11 +104,11 @@ void ObjLoader::LoadImageFromLoadDef(GfxImage* image, Zone* zone) if (loadedTexture != nullptr) { image->texture.texture = loadedTexture; - image->cardMemory.platform[0] = 0; + image->loadedSize = 0; const auto textureMipCount = loadedTexture->GetMipMapCount(); for (auto mipLevel = 0; mipLevel < textureMipCount; mipLevel++) - image->cardMemory.platform[0] += static_cast(loadedTexture->GetSizeOfMipLevel(mipLevel) * loadedTexture->GetFaceCount()); + image->loadedSize += static_cast(loadedTexture->GetSizeOfMipLevel(mipLevel) * loadedTexture->GetFaceCount()); } } @@ -130,11 +130,11 @@ void ObjLoader::LoadImageFromIwi(GfxImage* image, ISearchPath* searchPath, Zone* if (loadedTexture != nullptr) { image->texture.texture = loadedTexture; - image->cardMemory.platform[0] = 0; + image->loadedSize = 0; const auto textureMipCount = loadedTexture->GetMipMapCount(); for (auto mipLevel = 0; mipLevel < textureMipCount; mipLevel++) - image->cardMemory.platform[0] += static_cast(loadedTexture->GetSizeOfMipLevel(mipLevel) * loadedTexture->GetFaceCount()); + image->loadedSize += static_cast(loadedTexture->GetSizeOfMipLevel(mipLevel) * loadedTexture->GetFaceCount()); } else { @@ -152,7 +152,7 @@ void ObjLoader::LoadImageData(ISearchPath* searchPath, Zone* zone) { auto* image = imageEntry->Asset(); - if (image->cardMemory.platform[0] > 0) + if (image->loadedSize > 0) { continue; }