Implement LegoAnimPresenter::FUN_1006a3c0 (#791)

This commit is contained in:
Christian Semmler 2024-04-13 08:57:18 -04:00 committed by GitHub
parent e8b61d5a1d
commit f5e81777bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 61 additions and 8 deletions

View file

@ -85,8 +85,9 @@ class LegoAnimPresenter : public MxVideoPresenter {
void FUN_100695c0(); void FUN_100695c0();
LegoChar* FUN_100697c0(const LegoChar* p_und1, const LegoChar* p_und2); LegoChar* FUN_100697c0(const LegoChar* p_und1, const LegoChar* p_und2);
LegoBool FUN_100698b0(const CompoundObject& p_rois, const LegoChar* p_und2); LegoBool FUN_100698b0(const CompoundObject& p_rois, const LegoChar* p_und2);
LegoROI* FUN_100699e0(const LegoChar*);
void FUN_10069b10(); void FUN_10069b10();
void FUN_1006a3c0(LegoAnimPresenterMap& p_map, LegoTreeNode* p_root, 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); LegoBool FUN_1006abb0(LegoTreeNode*, undefined4);

View file

@ -104,11 +104,10 @@ MxResult LegoAnimActor::FUN_1001c360(float p_und, Matrix4& p_transform)
} }
} }
else { else {
MxU32 i;
LegoTreeNode* root = m_animMaps[m_curAnim]->m_AnimTreePtr->GetRoot(); LegoTreeNode* root = m_animMaps[m_curAnim]->m_AnimTreePtr->GetRoot();
m_roi->SetVisibility(TRUE); m_roi->SetVisibility(TRUE);
for (i = 0; i < numROIs; i++) { for (MxU32 i = 0; i < numROIs; i++) {
LegoROI* roi = roiMap[i]; LegoROI* roi = roiMap[i];
if (roi != NULL && m_roi != roi) { if (roi != NULL && m_roi != roi) {
@ -116,8 +115,8 @@ MxResult LegoAnimActor::FUN_1001c360(float p_und, Matrix4& p_transform)
} }
} }
for (i = 0; i < root->GetNumChildren(); i++) { for (MxS32 j = 0; j < root->GetNumChildren(); j++) {
LegoROI::FUN_100a8e80(root->GetChild(i), p_transform, p_und, roiMap); LegoROI::FUN_100a8e80(root->GetChild(j), p_transform, p_und, roiMap);
} }
if (m_cameraFlag) { if (m_cameraFlag) {

View file

@ -306,16 +306,69 @@ LegoBool LegoAnimPresenter::FUN_100698b0(const CompoundObject& p_rois, const Leg
return result; return result;
} }
// STUB: LEGO1 0x100699e0
LegoROI* LegoAnimPresenter::FUN_100699e0(const LegoChar*)
{
// TODO
return NULL;
}
// STUB: LEGO1 0x10069b10 // STUB: LEGO1 0x10069b10
void LegoAnimPresenter::FUN_10069b10() void LegoAnimPresenter::FUN_10069b10()
{ {
// TODO // TODO
} }
// STUB: LEGO1 0x1006a3c0 // FUNCTION: LEGO1 0x1006a3c0
void LegoAnimPresenter::FUN_1006a3c0(LegoAnimPresenterMap& p_map, LegoTreeNode* p_root, LegoROI* p_roi) void LegoAnimPresenter::FUN_1006a3c0(LegoAnimPresenterMap& p_map, LegoTreeNode* p_node, LegoROI* p_roi)
{ {
// TODO LegoROI* roi = p_roi;
LegoChar* und = NULL;
LegoChar* und2 = NULL;
LegoAnimNodeData* data = (LegoAnimNodeData*) p_node->GetData();
const LegoChar* name = data->GetName();
if (name != NULL && *name != '-') {
if (*name == '*') {
name = und2 = FUN_10069150(name);
}
und = FUN_100697c0(name, p_roi != NULL ? p_roi->GetName() : NULL);
if (p_roi == NULL) {
roi = FUN_100699e0(und);
if (roi != NULL) {
FUN_1006a4f0(p_map, data, und, roi);
}
else {
data->SetUnknown0x20(0);
}
}
else {
LegoROI* roi2 = p_roi->FUN_100a8ce0(name, p_roi);
if (roi2 != NULL) {
FUN_1006a4f0(p_map, data, und, roi2);
}
else {
if (FUN_100699e0(name) != NULL) {
FUN_1006a3c0(p_map, p_node, NULL);
delete[] und;
delete[] und2;
return;
}
}
}
}
delete[] und;
delete[] und2;
MxS32 count = p_node->GetNumChildren();
for (MxS32 i = 0; i < count; i++) {
FUN_1006a3c0(p_map, p_node->GetChild(i), roi);
}
} }
// FUNCTION: LEGO1 0x1006a4f0 // FUNCTION: LEGO1 0x1006a4f0