Implement/match LegoExtraActor:: WaitForAnimation, Restart (#768)

* Implement/match LegoExtraActor:: WaitForAnimation, Restart

* whitespace

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Nathan M Gilbert
2024-04-04 06:26:03 -04:00
committed by GitHub
parent ce134e79ef
commit a8eebe454e
15 changed files with 88 additions and 20 deletions

View File

@@ -70,7 +70,8 @@ void LegoCarRaceActor::VTable0x98()
}
// STUB: LEGO1 0x10081d30
void LegoCarRaceActor::VTable0x9c()
MxResult LegoCarRaceActor::WaitForAnimation()
{
// TODO
return SUCCESS;
}

View File

@@ -69,7 +69,8 @@ void LegoJetski::VTable0x98()
}
// STUB: LEGO1 0x10014200
void LegoJetski::VTable0x9c()
MxResult LegoJetski::WaitForAnimation()
{
// TODO
return SUCCESS;
}

View File

@@ -36,7 +36,8 @@ void LegoJetskiRaceActor::VTable0x98()
}
// STUB: LEGO1 0x100822e0
void LegoJetskiRaceActor::VTable0x9c()
MxResult LegoJetskiRaceActor::WaitForAnimation()
{
// TODO
return SUCCESS;
}

View File

@@ -145,7 +145,7 @@ MxResult LegoExtraActor::FUN_1002aae0()
m_boundary = oldEdge;
}
LegoPathActor::VTable0x9c();
LegoPathActor::WaitForAnimation();
return SUCCESS;
}
@@ -229,7 +229,7 @@ MxResult LegoExtraActor::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
FUN_1002ad8a();
SoundManager()->GetCacheSoundManager()->FUN_1003dae0("crash5", m_roi->GetName(), FALSE);
m_scheduledTime = Timer()->GetTime() + m_disAnim->GetDuration();
m_unk0x10 = m_worldSpeed;
m_prevWorldSpeed = m_worldSpeed;
VTable0xc4();
SetWorldSpeed(0);
m_unk0x14 = 1;
@@ -273,10 +273,54 @@ MxResult LegoExtraActor::VTable0x94(LegoPathActor* p_actor, MxBool p_bool)
return SUCCESS;
}
// STUB: LEGO1 0x1002b290
void LegoExtraActor::VTable0x9c()
// FUNCTION: LEGO1 0x1002b290
MxResult LegoExtraActor::WaitForAnimation()
{
// TODO
LegoPathBoundary* oldBoundary = m_boundary;
MxResult result = LegoPathActor::WaitForAnimation();
if (m_boundary != oldBoundary) {
MxU32 b = FALSE;
LegoAnimPresenterSet* set = m_boundary->GetUnknown0x64();
for (LegoAnimPresenterSet::iterator it = set->begin(); it != set->end(); it++) {
undefined4 tmp;
if ((*it)->VTable0x9c(tmp)) {
b = TRUE;
break;
}
}
if (b) {
m_unk0x0e = 1;
m_prevWorldSpeed = GetWorldSpeed();
SetWorldSpeed(0);
}
}
return result;
}
// FUNCTION: LEGO1 0x1002b370
void LegoExtraActor::Restart()
{
if (m_unk0x0e != 0) {
MxU32 b = FALSE;
LegoAnimPresenterSet* set = m_boundary->GetUnknown0x64();
for (LegoAnimPresenterSet::iterator it = set->begin(); it != set->end(); it++) {
undefined4 tmp;
if ((*it)->VTable0x9c(tmp)) {
b = TRUE;
break;
}
}
if (!b) {
SetWorldSpeed(m_prevWorldSpeed);
m_unk0x0e = 0;
}
}
}
// STUB: LEGO1 0x1002b440

View File

@@ -75,9 +75,10 @@ void LegoPathActor::ParseAction(char*)
}
// STUB: LEGO1 0x1002f1b0
void LegoPathActor::VTable0x9c()
MxResult LegoPathActor::WaitForAnimation()
{
// TODO
return SUCCESS;
}
// STUB: LEGO1 0x1002f650

View File

@@ -89,7 +89,8 @@ void LegoRaceCar::VTable0x98()
}
// STUB: LEGO1 0x10014580
void LegoRaceCar::VTable0x9c()
MxResult LegoRaceCar::WaitForAnimation()
{
// TODO
return SUCCESS;
}