Implement/match LegoROI::FUN_100a8e80 (#801)

This commit is contained in:
Christian Semmler 2024-04-14 11:46:56 -04:00 committed by GitHub
parent 69b250e40c
commit dcc42c33d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 28 additions and 4 deletions

View file

@ -404,10 +404,34 @@ LegoResult LegoROI::FUN_100a8da0(LegoTreeNode* p_node, const Matrix4& p_matrix,
return SUCCESS; return SUCCESS;
} }
// STUB: LEGO1 0x100a8e80 // FUNCTION: LEGO1 0x100a8e80
void LegoROI::FUN_100a8e80(LegoTreeNode*, Matrix4&, LegoTime, LegoROI**) void LegoROI::FUN_100a8e80(LegoTreeNode* p_node, Matrix4& p_matrix, LegoTime p_time, LegoROI** p_rois)
{ {
// TODO MxMatrix mat;
LegoAnimNodeData* data = (LegoAnimNodeData*) p_node->GetData();
FUN_100a8cb0(data, p_time, mat);
LegoROI* roi = p_rois[data->GetUnknown0x20()];
if (roi != NULL) {
roi->m_local2world.Product(mat, p_matrix);
roi->VTable0x1c();
LegoBool und = data->FUN_100a0990(p_time);
roi->SetVisibility(und);
for (LegoU32 i = 0; i < p_node->GetNumChildren(); i++) {
FUN_100a8e80(p_node->GetChild(i), roi->m_local2world, p_time, p_rois);
}
}
else {
MxMatrix local2world;
local2world.Product(mat, p_matrix);
for (LegoU32 i = 0; i < p_node->GetNumChildren(); i++) {
FUN_100a8e80(p_node->GetChild(i), local2world, p_time, p_rois);
}
}
} }
// FUNCTION: LEGO1 0x100a90f0 // FUNCTION: LEGO1 0x100a90f0

View file

@ -32,7 +32,7 @@ class LegoROI : public ViewROI {
); );
LegoROI* FUN_100a8ce0(const LegoChar* p_name, LegoROI* p_roi); LegoROI* FUN_100a8ce0(const LegoChar* p_name, LegoROI* p_roi);
LegoResult FUN_100a8da0(LegoTreeNode* p_node, const Matrix4& p_matrix, LegoTime p_time, LegoROI* p_roi); LegoResult FUN_100a8da0(LegoTreeNode* p_node, const Matrix4& p_matrix, LegoTime p_time, LegoROI* p_roi);
static void FUN_100a8e80(LegoTreeNode*, Matrix4&, LegoTime, LegoROI**); static void FUN_100a8e80(LegoTreeNode* p_node, Matrix4& p_matrix, LegoTime p_time, LegoROI** p_rois);
LegoResult SetFrame(LegoAnim* p_anim, LegoTime p_time); LegoResult SetFrame(LegoAnim* p_anim, LegoTime p_time);
LegoResult FUN_100a9170(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha); LegoResult FUN_100a9170(LegoFloat p_red, LegoFloat p_green, LegoFloat p_blue, LegoFloat p_alpha);
LegoResult FUN_100a9210(LegoTextureInfo* p_textureInfo); LegoResult FUN_100a9210(LegoTextureInfo* p_textureInfo);