diff --git a/src/component/CCharacterComponent.cpp b/src/component/CCharacterComponent.cpp index 9db12fe..32a960d 100644 --- a/src/component/CCharacterComponent.cpp +++ b/src/component/CCharacterComponent.cpp @@ -252,7 +252,19 @@ void CCharacterComponent::SetSkinColor(int32_t skinColorID, bool a3, bool a4, co } int32_t CCharacterComponent::VariationsLoaded(int32_t a2) { - // TODO + TCTEXTUREINFO info; + + for (int32_t v = 0; v < NUM_COMPONENT_VARIATIONS; v++) { + for (int32_t t = 0; t < 3; t++) { + auto texture = this->m_texture[TEXTURE_INDEX(v, t)]; + + if (texture && !TextureCacheGetInfo(texture, info, a2)) { + return 0; + } + } + } + + this->m_flags &= ~0x2; return 1; } diff --git a/src/component/Texture.cpp b/src/component/Texture.cpp index 947fd26..4a592d8 100644 --- a/src/component/Texture.cpp +++ b/src/component/Texture.cpp @@ -67,3 +67,9 @@ void* TextureCacheCreateTexture(const char* fileName) { void TextureCacheDestroyTexture(void* texture) { // TODO } + +int32_t TextureCacheGetInfo(void* texture, TCTEXTUREINFO& info, int32_t a3) { + // TODO + + return 0; +} diff --git a/src/component/Texture.hpp b/src/component/Texture.hpp index 8f1cfd8..d94df37 100644 --- a/src/component/Texture.hpp +++ b/src/component/Texture.hpp @@ -36,4 +36,6 @@ void* TextureCacheCreateTexture(const char* fileName); void TextureCacheDestroyTexture(void* texture); +int32_t TextureCacheGetInfo(void* texture, TCTEXTUREINFO& info, int32_t a3); + #endif