Implement/match LegoROI/LegoLOD::GetTexture (#814)

* Implement/match LegoROI/LegoLOD::GetTexture

* Remove explicit truth tests

* LegoTextureContainer::AddToList fix

* Revert "Remove explicit truth tests"

This reverts commit d169349bd6.
This commit is contained in:
Christian Semmler
2024-04-17 09:18:34 -04:00
committed by GitHub
parent a64bb4d460
commit 06fadd922e
7 changed files with 67 additions and 5 deletions

View File

@@ -362,6 +362,20 @@ LegoResult LegoLOD::FUN_100aad70(LegoTextureInfo* p_textureInfo)
return SUCCESS;
}
// FUNCTION: LEGO1 0x100aadc0
LegoResult LegoLOD::GetTexture(LegoTextureInfo*& p_textureInfo)
{
for (LegoU32 i = m_unk0x1c; i < m_numMeshes; i++) {
if (m_melems[i].m_unk0x04) {
if (LegoTextureInfo::GetGroupTexture(m_melems[i].m_tglMesh, p_textureInfo) == TRUE) {
return SUCCESS;
}
}
}
return FAILURE;
}
// FUNCTION: LEGO1 0x100aae20
LegoBool LegoLOD::FUN_100aae20(const LegoChar* p_name)
{