Implement/match LegoAnimPresenter::FUN_1006abb0 (#795)

This commit is contained in:
Christian Semmler 2024-04-13 10:35:55 -04:00 committed by GitHub
parent 93257a7c8c
commit d469cabd6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 49 additions and 5 deletions

View file

@ -90,7 +90,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
void FUN_1006a3c0(LegoAnimPresenterMap& p_map, LegoTreeNode* p_node, LegoROI* p_roi); void FUN_1006a3c0(LegoAnimPresenterMap& p_map, LegoTreeNode* p_node, LegoROI* p_roi);
void FUN_1006a4f0(LegoAnimPresenterMap& p_map, LegoAnimNodeData* p_data, const LegoChar* p_und, LegoROI* p_roi); void FUN_1006a4f0(LegoAnimPresenterMap& p_map, LegoAnimNodeData* p_data, const LegoChar* p_und, LegoROI* p_roi);
LegoBool FUN_1006aba0(); LegoBool FUN_1006aba0();
LegoBool FUN_1006abb0(LegoTreeNode*, undefined4); MxBool FUN_1006abb0(LegoTreeNode* p_node, LegoROI* p_roi);
void FUN_1006ac90(); void FUN_1006ac90();
void FUN_1006c8a0(MxBool p_bool); void FUN_1006c8a0(MxBool p_bool);

View file

@ -453,11 +453,55 @@ LegoBool LegoAnimPresenter::FUN_1006aba0()
return FUN_1006abb0(m_anim->GetRoot(), 0); return FUN_1006abb0(m_anim->GetRoot(), 0);
} }
// STUB: LEGO1 0x1006abb0 // FUNCTION: LEGO1 0x1006abb0
LegoBool LegoAnimPresenter::FUN_1006abb0(LegoTreeNode*, undefined4) MxBool LegoAnimPresenter::FUN_1006abb0(LegoTreeNode* p_node, LegoROI* p_roi)
{ {
// TODO MxBool result = FALSE;
return FALSE; LegoROI* roi = p_roi;
LegoChar* und = NULL;
const LegoChar* name = ((LegoAnimNodeData*) p_node->GetData())->GetName();
MxS32 i, count;
if (name != NULL && *name != '-') {
und = FUN_100697c0(name, p_roi != NULL ? p_roi->GetName() : NULL);
if (p_roi == NULL) {
roi = FUN_100699e0(und);
if (roi == NULL) {
goto done;
}
}
else {
LegoROI* roi2 = p_roi->FUN_100a8ce0(name, p_roi);
if (roi2 == NULL) {
if (FUN_100699e0(name) != NULL) {
if (FUN_1006abb0(p_node, NULL)) {
result = TRUE;
}
}
goto done;
}
}
}
count = p_node->GetNumChildren();
for (i = 0; i < count; i++) {
if (!FUN_1006abb0(p_node->GetChild(i), roi)) {
goto done;
}
}
result = TRUE;
done:
if (und != NULL) {
delete[] und;
}
return result;
} }
// STUB: LEGO1 0x1006ac90 // STUB: LEGO1 0x1006ac90