Implement/match LegoAnimMMPresenter::FUN_1004b580 (#829)

This commit is contained in:
Christian Semmler 2024-04-20 11:52:46 -04:00 committed by GitHub
parent f637dcaa29
commit 3cab989250
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 26 additions and 14 deletions

View file

@ -113,7 +113,7 @@ class LegoAnimationManager : public MxCore {
LegoTranInfoList* m_tranInfoList; // 0x20
LegoTranInfoList* m_tranInfoList2; // 0x24
MxPresenter* m_unk0x28[2]; // 0x28
MxPresenter* m_unk0x30[2]; // 0x30
MxLong m_unk0x30[2]; // 0x30
undefined m_unk0x38; // 0x38
MxBool m_unk0x39; // 0x39
undefined m_unk0x3a; // 0x3a

View file

@ -70,7 +70,7 @@ class LegoAnimMMPresenter : public MxCompositePresenter {
MxLong m_unk0x50; // 0x50
undefined4 m_unk0x54; // 0x54
MxU8 m_unk0x58; // 0x58
MxBool m_unk0x59; // 0x59
MxU8 m_unk0x59; // 0x59
MxU32 m_animmanId; // 0x5c
LegoTranInfo* m_tranInfo; // 0x60
LegoWorld* m_unk0x64; // 0x64

View file

@ -17,7 +17,7 @@ struct LegoTranInfo {
m_index = 0;
m_unk0x08 = NULL;
m_unk0x0c = NULL;
m_unk0x10 = FALSE;
m_unk0x10 = 0;
m_unk0x12 = -1;
m_unk0x14 = FALSE;
m_unk0x1c = NULL;
@ -34,13 +34,13 @@ struct LegoTranInfo {
MxU32 m_index; // 0x04
LegoROI* m_unk0x08; // 0x08
MxMatrix* m_unk0x0c; // 0x0c
MxBool m_unk0x10; // 0x10
MxU8 m_unk0x10; // 0x10
MxS16 m_unk0x12; // 0x12
MxBool m_unk0x14; // 0x14
MxBool m_unk0x15; // 0x15
MxU32 m_objectId; // 0x18
MxPresenter** m_unk0x1c; // 0x1c
MxPresenter** m_unk0x20; // 0x20
MxLong* m_unk0x20; // 0x20
LegoAnimMMPresenter* m_presenter; // 0x24
MxBool m_unk0x28; // 0x28
MxBool m_unk0x29; // 0x29

View file

@ -157,7 +157,7 @@ MxResult LegoAnimationManager::LoadScriptInfo(MxS32 p_scriptIndex)
for (i = 0; i < (MxS32) _countof(m_unk0x28); i++) {
m_unk0x28[i] = NULL;
m_unk0x30[i] = NULL;
m_unk0x30[i] = 0;
}
m_unk0x38 = 0;
@ -456,7 +456,7 @@ MxResult LegoAnimationManager::FUN_100609f0(MxU32 p_objectId, MxMatrix* p_matrix
LegoTranInfo* info = new LegoTranInfo();
info->m_unk0x00 = 0;
info->m_index = ++m_unk0x1c;
info->m_unk0x10 = FALSE;
info->m_unk0x10 = 0;
info->m_unk0x08 = NULL;
info->m_unk0x12 = -1;
info->m_unk0x14 = 0;

View file

@ -23,7 +23,7 @@ LegoAnimMMPresenter::LegoAnimMMPresenter()
{
m_presenter = NULL;
m_animmanId = 0;
m_unk0x59 = FALSE;
m_unk0x59 = 0;
m_tranInfo = NULL;
m_unk0x54 = 0;
m_unk0x64 = NULL;
@ -308,20 +308,32 @@ MxBool LegoAnimMMPresenter::FUN_1004b530(MxLong p_time)
return TRUE;
}
// STUB: LEGO1 0x1004b570
// FUNCTION: LEGO1 0x1004b570
// FUNCTION: BETA10 0x1004c9cc
MxBool LegoAnimMMPresenter::FUN_1004b570(MxLong p_time)
{
// TODO
return FALSE;
return TRUE;
}
// STUB: LEGO1 0x1004b580
// FUNCTION: LEGO1 0x1004b580
// FUNCTION: BETA10 0x1004ca3f
MxBool LegoAnimMMPresenter::FUN_1004b580(MxLong p_time)
{
// TODO
return FALSE;
switch (m_unk0x59) {
case 0:
if (m_tranInfo != NULL && m_tranInfo->m_unk0x15 != FALSE && m_tranInfo->m_unk0x20 != NULL &&
m_tranInfo->m_unk0x20[0] > p_time) {
return FALSE;
}
case 1:
case 2:
case 3:
case 4:
case 5:
break;
}
return TRUE;
}
// STUB: LEGO1 0x1004b5b0