Implement/match LegoAnimMMPresenter::FUN_1004b5b0 (#830)

This commit is contained in:
Christian Semmler 2024-04-20 12:03:42 -04:00 committed by GitHub
parent 3cab989250
commit a3bd98a04d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 6 deletions

View file

@ -2,6 +2,7 @@
#define LEGOANIMMMPRESENTER_H #define LEGOANIMMMPRESENTER_H
#include "mxcompositepresenter.h" #include "mxcompositepresenter.h"
#include "mxgeometry/mxmatrix.h"
class LegoAnimPresenter; class LegoAnimPresenter;
class LegoWorld; class LegoWorld;
@ -74,7 +75,7 @@ class LegoAnimMMPresenter : public MxCompositePresenter {
MxU32 m_animmanId; // 0x5c MxU32 m_animmanId; // 0x5c
LegoTranInfo* m_tranInfo; // 0x60 LegoTranInfo* m_tranInfo; // 0x60
LegoWorld* m_unk0x64; // 0x64 LegoWorld* m_unk0x64; // 0x64
Matrix4* m_unk0x68; // 0x68 MxMatrix* m_unk0x68; // 0x68
LegoROI** m_roiMap; // 0x6c LegoROI** m_roiMap; // 0x6c
MxU32 m_roiMapSize; // 0x70 MxU32 m_roiMapSize; // 0x70
}; };

View file

@ -4,6 +4,7 @@
#include "anim/legoanim.h" #include "anim/legoanim.h"
#include "legoroilist.h" #include "legoroilist.h"
#include "mxgeometry/mxgeometry3d.h" #include "mxgeometry/mxgeometry3d.h"
#include "mxgeometry/mxmatrix.h"
#include "mxvideopresenter.h" #include "mxvideopresenter.h"
class LegoWorld; class LegoWorld;
@ -71,7 +72,7 @@ class LegoAnimPresenter : public MxVideoPresenter {
virtual void VTable0xa0(Matrix4*); // vtable+0xa0 virtual void VTable0xa0(Matrix4*); // vtable+0xa0
MxResult FUN_1006afc0(Matrix4*&, undefined4); MxResult FUN_1006afc0(MxMatrix*&, undefined4);
MxResult FUN_1006b140(LegoROI* p_roi); MxResult FUN_1006b140(LegoROI* p_roi);
void FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value); void FUN_1006d680(LegoAnimActor* p_actor, MxFloat p_value);

View file

@ -325,6 +325,7 @@ MxBool LegoAnimMMPresenter::FUN_1004b580(MxLong p_time)
m_tranInfo->m_unk0x20[0] > p_time) { m_tranInfo->m_unk0x20[0] > p_time) {
return FALSE; return FALSE;
} }
break;
case 1: case 1:
case 2: case 2:
case 3: case 3:
@ -336,12 +337,31 @@ MxBool LegoAnimMMPresenter::FUN_1004b580(MxLong p_time)
return TRUE; return TRUE;
} }
// STUB: LEGO1 0x1004b5b0 // FUNCTION: LEGO1 0x1004b5b0
// FUNCTION: BETA10 0x1004cb09 // FUNCTION: BETA10 0x1004cb09
MxBool LegoAnimMMPresenter::FUN_1004b5b0(MxLong p_time) MxBool LegoAnimMMPresenter::FUN_1004b5b0(MxLong p_time)
{ {
// TODO switch (m_unk0x59) {
return FALSE; case 0:
if (m_roiMap != NULL && m_unk0x68 != NULL) {
for (MxU32 i = 0; i < m_roiMapSize; i++) {
LegoROI* roi = m_roiMap[i];
if (roi != NULL) {
roi->WrappedSetLocalTransform(m_unk0x68[i]);
}
}
}
break;
case 1:
case 2:
case 3:
case 4:
case 5:
break;
}
return TRUE;
} }
// STUB: LEGO1 0x1004b600 // STUB: LEGO1 0x1004b600

View file

@ -565,7 +565,7 @@ void LegoAnimPresenter::PutFrame()
// STUB: LEGO1 0x1006afc0 // STUB: LEGO1 0x1006afc0
// FUNCTION: BETA10 0x1005059a // FUNCTION: BETA10 0x1005059a
MxResult LegoAnimPresenter::FUN_1006afc0(Matrix4*&, undefined4) MxResult LegoAnimPresenter::FUN_1006afc0(MxMatrix*&, undefined4)
{ {
// TODO // TODO
return SUCCESS; return SUCCESS;