Implement/match LegoAnimMMPresenter::FUN_1004b450 (#827)

This commit is contained in:
Christian Semmler
2024-04-20 11:18:19 -04:00
committed by GitHub
parent c617139d5b
commit 91d043a9ae
11 changed files with 149 additions and 23 deletions

View File

@@ -11,6 +11,17 @@ struct LegoTranInfo;
// SIZE 0x74
class LegoAnimMMPresenter : public MxCompositePresenter {
public:
enum {
e_unk0,
e_unk1,
e_unk2,
e_unk3,
e_unk4,
e_unk5,
e_unk6,
e_unk7
};
LegoAnimMMPresenter();
MxLong Notify(MxParam& p_param) override; // vtable+0x04
@@ -45,11 +56,19 @@ public:
private:
MxBool FUN_1004b450();
MxBool FUN_1004b530(MxLong p_time);
MxBool FUN_1004b570(MxLong p_time);
MxBool FUN_1004b580(MxLong p_time);
MxBool FUN_1004b5b0(MxLong p_time);
MxBool FUN_1004b600(MxLong p_time);
MxBool FUN_1004b610(MxLong p_time);
MxBool FUN_1004b6b0(MxLong p_time);
MxBool FUN_1004b6d0(MxLong p_time);
LegoAnimPresenter* m_unk0x4c; // 0x4c
undefined4 m_unk0x50; // 0x50
MxLong m_unk0x50; // 0x50
undefined4 m_unk0x54; // 0x54
undefined m_unk0x58; // 0x58
MxU8 m_unk0x58; // 0x58
MxBool m_unk0x59; // 0x59
MxU32 m_animmanId; // 0x5c
LegoTranInfo* m_tranInfo; // 0x60

View File

@@ -30,7 +30,7 @@ LegoAnimMMPresenter::LegoAnimMMPresenter()
m_unk0x68 = 0;
m_unk0x6c = 0;
m_unk0x70 = 0;
m_unk0x58 = 0;
m_unk0x58 = e_unk0;
}
// FUNCTION: LEGO1 0x1004aaf0
@@ -174,15 +174,15 @@ void LegoAnimMMPresenter::StreamingTickle()
void LegoAnimMMPresenter::RepeatingTickle()
{
if (m_unk0x4c == NULL) {
ProgressTickleState(e_unk5);
ProgressTickleState(e_freezing);
}
else if (m_list.size() <= 1) {
if (m_list.front() == m_unk0x4c) {
m_unk0x4c->SetTickleState(e_done);
ProgressTickleState(e_unk5);
ProgressTickleState(e_freezing);
}
else {
ProgressTickleState(e_unk5);
ProgressTickleState(e_freezing);
}
}
}
@@ -244,12 +244,119 @@ void LegoAnimMMPresenter::ParseExtra()
}
}
// STUB: LEGO1 0x1004b450
// FUNCTION: LEGO1 0x1004b450
// FUNCTION: BETA10 0x1004c71d
MxBool LegoAnimMMPresenter::FUN_1004b450()
{
MxBool result = FALSE;
MxLong time = Timer()->GetTime() - m_unk0x50;
switch (m_unk0x58) {
case e_unk0:
if (!FUN_1004b530(time)) {
break;
}
m_unk0x58 = e_unk1;
case e_unk1:
if (!FUN_1004b570(time)) {
break;
}
m_unk0x58 = e_unk2;
case e_unk2:
if (!FUN_1004b580(time)) {
break;
}
m_unk0x58 = e_unk3;
case e_unk3:
if (!FUN_1004b5b0(time)) {
break;
}
m_unk0x58 = e_unk4;
case e_unk4:
if (!FUN_1004b600(time)) {
break;
}
m_unk0x58 = e_unk5;
case e_unk5:
if (!FUN_1004b610(time)) {
break;
}
m_unk0x58 = e_unk6;
case e_unk6:
if (!FUN_1004b6b0(time)) {
break;
}
m_unk0x58 = e_unk7;
case e_unk7:
FUN_1004b6d0(time);
result = TRUE;
}
return result;
}
// STUB: LEGO1 0x1004b530
// FUNCTION: BETA10 0x1004c8c4
MxBool LegoAnimMMPresenter::FUN_1004b530(MxLong p_time)
{
// TODO
return TRUE;
return FALSE;
}
// STUB: LEGO1 0x1004b570
// FUNCTION: BETA10 0x1004c9cc
MxBool LegoAnimMMPresenter::FUN_1004b570(MxLong p_time)
{
// TODO
return FALSE;
}
// STUB: LEGO1 0x1004b580
// FUNCTION: BETA10 0x1004ca3f
MxBool LegoAnimMMPresenter::FUN_1004b580(MxLong p_time)
{
// TODO
return FALSE;
}
// STUB: LEGO1 0x1004b5b0
// FUNCTION: BETA10 0x1004cb09
MxBool LegoAnimMMPresenter::FUN_1004b5b0(MxLong p_time)
{
// TODO
return FALSE;
}
// STUB: LEGO1 0x1004b600
// FUNCTION: BETA10 0x1004cbfb
MxBool LegoAnimMMPresenter::FUN_1004b600(MxLong p_time)
{
// TODO
return FALSE;
}
// STUB: LEGO1 0x1004b610
// FUNCTION: BETA10 0x1004cc6e
MxBool LegoAnimMMPresenter::FUN_1004b610(MxLong p_time)
{
// TODO
return FALSE;
}
// STUB: LEGO1 0x1004b6b0
// FUNCTION: BETA10 0x1004cdc5
MxBool LegoAnimMMPresenter::FUN_1004b6b0(MxLong p_time)
{
// TODO
return FALSE;
}
// STUB: LEGO1 0x1004b6d0
// FUNCTION: BETA10 0x1004ce18
MxBool LegoAnimMMPresenter::FUN_1004b6d0(MxLong p_time)
{
// TODO
return FALSE;
}
// FUNCTION: LEGO1 0x1004b8b0

View File

@@ -152,7 +152,7 @@ MxResult MxCompositeMediaPresenter::Tickle()
break;
case e_streaming:
case e_repeating:
case e_unk5:
case e_freezing:
case e_done: {
for (MxCompositePresenterList::iterator it = m_list.begin(); it != m_list.end(); it++) {
(*it)->Tickle();