diff --git a/LEGO1/lego/legoomni/include/legoanimpresenter.h b/LEGO1/lego/legoomni/include/legoanimpresenter.h index aed665ae..0c2f3dcf 100644 --- a/LEGO1/lego/legoomni/include/legoanimpresenter.h +++ b/LEGO1/lego/legoomni/include/legoanimpresenter.h @@ -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); diff --git a/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp b/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp index 6a1583f2..87cf6ae6 100644 --- a/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legoanimpresenter.cpp @@ -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) { diff --git a/LEGO1/mxgeometry/mxmatrix.h b/LEGO1/mxgeometry/mxmatrix.h index abbc92f5..f6d0cece 100644 --- a/LEGO1/mxgeometry/mxmatrix.h +++ b/LEGO1/mxgeometry/mxmatrix.h @@ -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