Implement/match LegoAnimPresenter::FUN_1006afc0 (#843)

* Implement/match LegoAnimPresenter::FUN_1006afc0

* empty
This commit is contained in:
Christian Semmler 2024-04-24 08:24:59 -04:00 committed by GitHub
parent 41be78ed1c
commit 67c9736953
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 35 additions and 5 deletions

View file

@ -73,7 +73,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
virtual void VTable0xa0(Matrix4*); // vtable+0xa0
MxResult FUN_1006afc0(MxMatrix*&, undefined4);
MxResult FUN_1006afc0(MxMatrix*& p_matrix, float p_und);
MxResult FUN_1006b140(LegoROI* p_roi);
void FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value);
@ -97,6 +97,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
LegoBool FUN_1006aba0();
MxBool FUN_1006abb0(LegoTreeNode* p_node, LegoROI* p_roi);
void FUN_1006ac90();
void FUN_1006b900(LegoAnim* p_anim, MxS32 p_und, MxMatrix* p_matrix);
void FUN_1006b9a0(LegoAnim* p_anim, MxLong p_time, Matrix4* p_matrix);
void FUN_1006c8a0(MxBool p_bool);

View file

@ -577,11 +577,32 @@ void LegoAnimPresenter::PutFrame()
}
}
// STUB: LEGO1 0x1006afc0
// FUNCTION: LEGO1 0x1006afc0
// FUNCTION: BETA10 0x1005059a
MxResult LegoAnimPresenter::FUN_1006afc0(MxMatrix*&, undefined4)
MxResult LegoAnimPresenter::FUN_1006afc0(MxMatrix*& p_matrix, float p_und)
{
// TODO
MxU32 length = m_roiMapSize + 1;
p_matrix = new MxMatrix[length];
MxS32 i;
for (i = 1; i < length; i++) {
if (m_roiMap[i] != NULL) {
p_matrix[i] = m_roiMap[i]->GetLocal2World();
}
}
FUN_1006b900(m_anim, p_und, m_unk0x78);
for (i = 1; i < length; i++) {
MxMatrix mat;
if (m_roiMap[i] != NULL) {
mat = p_matrix[i];
p_matrix[i] = m_roiMap[i]->GetLocal2World();
m_roiMap[i]->FUN_100a58f0(mat);
}
}
return SUCCESS;
}
@ -720,6 +741,13 @@ const char* LegoAnimPresenter::GetActionObjectName()
return m_action->GetObjectName();
}
// STUB: LEGO1 0x1006b900
// FUNCTION: BETA10 0x100510d8
void LegoAnimPresenter::FUN_1006b900(LegoAnim* p_anim, MxS32 p_und, MxMatrix* p_matrix)
{
// TODO
}
// FUNCTION: LEGO1 0x1006b9a0
void LegoAnimPresenter::FUN_1006b9a0(LegoAnim* p_anim, MxLong p_time, Matrix4* p_matrix)
{

View file

@ -7,6 +7,7 @@
// SIZE 0x48
class MxMatrix : public Matrix4 {
public:
// FUNCTION: LEGO1 0x1006b120
inline MxMatrix() : Matrix4(m_elements) {}
// FUNCTION: LEGO1 0x10032770
@ -26,7 +27,7 @@ class MxMatrix : public Matrix4 {
virtual void operator=(const MxMatrix& p_matrix) { Equals(p_matrix); } // vtable+0x48
private:
float m_elements[4][4];
float m_elements[4][4]; // 0x08
};
#endif // MXMATRIX_H