Implement/match LegoROI::FUN_100a9210 (#638)

* Implement/match LegoROI::FUN_100a9210

* Fix order
This commit is contained in:
Christian Semmler 2024-03-08 15:01:18 -05:00 committed by GitHub
parent 309997fddc
commit d978cbe7f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 30 additions and 3 deletions

View file

@ -311,6 +311,13 @@ LegoResult LegoLOD::Read(Tgl::Renderer* p_renderer, LegoTextureContainer* p_text
return FAILURE;
}
// STUB: LEGO1 0x100aad00
LegoResult LegoLOD::FUN_100aad00(LegoTextureInfo* p_textureInfo)
{
// TODO
return SUCCESS;
}
// FUNCTION: LEGO1 0x100aae20
LegoBool LegoLOD::FUN_100aae20(const LegoChar* p_name)
{

View file

@ -28,6 +28,7 @@ class LegoLOD : public ViewLOD {
float VTable0x10() override { return 0.0; } // vtable+0x10
LegoResult Read(Tgl::Renderer*, LegoTextureContainer* p_textureContainer, LegoStorage* p_storage);
LegoResult FUN_100aad00(LegoTextureInfo* p_textureInfo);
static LegoBool FUN_100aae20(const LegoChar* p_name);

View file

@ -425,11 +425,30 @@ LegoResult LegoROI::FUN_100a9170(LegoFloat, LegoFloat, LegoFloat, LegoFloat)
return SUCCESS;
}
// STUB: LEGO1 0x100a9210
// FUNCTION: LEGO1 0x100a9210
LegoResult LegoROI::FUN_100a9210(LegoTextureInfo* p_textureInfo)
{
// TODO
return SUCCESS;
LegoResult result = SUCCESS;
CompoundObject::iterator it;
int lodCount = GetLODCount();
for (LegoU32 i = 0; i < lodCount; i++) {
LegoLOD* lod = (LegoLOD*) GetLOD(i);
if (lod->FUN_100aad00(p_textureInfo) != SUCCESS) {
result = FAILURE;
}
}
if (comp != NULL) {
for (it = comp->begin(); it != comp->end(); it++) {
if (((LegoROI*) *it)->FUN_100a9210(p_textureInfo) != SUCCESS) {
result = FAILURE;
}
}
}
return result;
}
// FUNCTION: LEGO1 0x100a9a50