Rename LegoPathActor::VTable0x70 to UpdateState (#1219)

This commit is contained in:
Christian Semmler
2024-12-13 11:20:03 -07:00
committed by GitHub
parent 263d7d1e4f
commit ce3f71ea0f
44 changed files with 132 additions and 132 deletions

View File

@@ -48,14 +48,14 @@ MxS32 LegoRaceActor::VTable0x68(Vector3& p_v1, Vector3& p_v2, Vector3& p_v3)
MxU32 LegoRaceActor::VTable0x90(float p_time, Matrix4& p_transform)
{
// Note: Code duplication with LegoExtraActor::VTable0x90
switch (m_state) {
switch (m_actorFlags) {
case 0:
case 1:
return 1;
case 2:
m_unk0x08 = p_time + 2000.0f;
m_state = 3;
m_actorFlags = 3;
m_actorTime += (p_time - m_lastTime) * m_worldSpeed;
m_lastTime = p_time;
return 0;
@@ -81,7 +81,7 @@ MxU32 LegoRaceActor::VTable0x90(float p_time, Matrix4& p_transform)
return 0;
}
else {
m_state = 0;
m_actorFlags = 0;
m_unk0x08 = 0;
positionRef -= g_unk0x10102b08;
@@ -98,7 +98,7 @@ MxU32 LegoRaceActor::VTable0x90(float p_time, Matrix4& p_transform)
MxResult LegoRaceActor::HitActor(LegoPathActor* p_actor, MxBool p_bool)
{
if (!p_actor->GetUserNavFlag()) {
if (p_actor->GetState()) {
if (p_actor->GetActorFlags()) {
return FAILURE;
}
@@ -112,7 +112,7 @@ MxResult LegoRaceActor::HitActor(LegoPathActor* p_actor, MxBool p_bool)
roi->FUN_100a58f0(matr);
p_actor->SetState(2);
p_actor->SetActorFlags(2);
}
}

View File

@@ -377,14 +377,14 @@ MxU32 LegoRaceCar::HandleSkeletonKicks(float p_param1)
// FUNCTION: LEGO1 0x100131f0
// FUNCTION: BETA10 0x100cb88a
void LegoRaceCar::VTable0x70(float p_time)
void LegoRaceCar::UpdateState(float p_time)
{
if (m_userNavFlag && (m_userState == LEGORACECAR_KICK1 || m_userState == LEGORACECAR_KICK2)) {
FUN_10012ff0(p_time);
return;
}
LegoCarRaceActor::VTable0x70(p_time);
LegoCarRaceActor::UpdateState(p_time);
if (m_userNavFlag && m_userState == LEGORACECAR_UNKNOWN_1) {
if (HandleSkeletonKicks(p_time)) {
@@ -438,7 +438,7 @@ MxResult LegoRaceCar::HitActor(LegoPathActor* p_actor, MxBool p_bool)
{
// Note: Code duplication with LegoRaceActor::HitActor
if (!p_actor->GetUserNavFlag()) {
if (p_actor->GetState()) {
if (p_actor->GetActorFlags()) {
return FAILURE;
}
@@ -451,7 +451,7 @@ MxResult LegoRaceCar::HitActor(LegoPathActor* p_actor, MxBool p_bool)
Vector3(matr[3]) += g_unk0x10102af0;
roi->FUN_100a58f0(matr);
p_actor->SetState(2);
p_actor->SetActorFlags(2);
}
if (m_userNavFlag) {
@@ -587,9 +587,9 @@ void LegoJetski::FUN_100136f0(float p_worldSpeed)
// FUNCTION: LEGO1 0x10013740
// FUNCTION: BETA10 0x100cc0ae
void LegoJetski::VTable0x70(float p_time)
void LegoJetski::UpdateState(float p_time)
{
LegoJetskiRaceActor::VTable0x70(p_time);
LegoJetskiRaceActor::UpdateState(p_time);
if (LegoCarRaceActor::m_unk0x0c == 1) {
FUN_1005d4b0();

View File

@@ -113,7 +113,7 @@ MxS32 LegoCarRaceActor::VTable0x1c(LegoPathBoundary* p_boundary, LegoEdge* p_edg
Mx3DPointFloat destEdgeUnknownVector;
Mx3DPointFloat crossProduct;
if (m_state == 1) {
if (m_actorFlags == 1) {
m_boundary = NULL;
// Not sure where the upper bound of 11 comes from, the underlying array has a size of 16
@@ -126,7 +126,7 @@ MxS32 LegoCarRaceActor::VTable0x1c(LegoPathBoundary* p_boundary, LegoEdge* p_edg
assert(m_boundary);
m_state = 0;
m_actorFlags = 0;
m_unk0x7c = 0;
if (m_userNavFlag) {
@@ -140,7 +140,7 @@ MxS32 LegoCarRaceActor::VTable0x1c(LegoPathBoundary* p_boundary, LegoEdge* p_edg
else {
for (MxS32 i = 0; i < 11; i += 2) {
if (LegoPathController::GetControlEdgeA(i) == p_edge) {
m_state = 1;
m_actorFlags = 1;
if (m_worldSpeed < g_unk0x100f7aec) {
m_worldSpeed = g_unk0x100f7aec;
@@ -152,7 +152,7 @@ MxS32 LegoCarRaceActor::VTable0x1c(LegoPathBoundary* p_boundary, LegoEdge* p_edg
}
}
if (m_state == 1) {
if (m_actorFlags == 1) {
if (m_userNavFlag) {
m_unk0xe4 = 0.5f;
}
@@ -214,7 +214,7 @@ void LegoCarRaceActor::SwitchBoundary(LegoPathBoundary*& p_boundary, LegoUnknown
// FUNCTION: LEGO1 0x10080b70
// FUNCTION: BETA10 0x100cdbae
void LegoCarRaceActor::VTable0x70(float p_time)
void LegoCarRaceActor::UpdateState(float p_time)
{
// m_unk0x0c is not an MxBool, there are places where it is set to 2 or higher
if (m_unk0x0c == 0) {
@@ -228,7 +228,7 @@ void LegoCarRaceActor::VTable0x70(float p_time)
}
if (m_unk0x0c == 1) {
LegoAnimActor::VTable0x70(p_time);
LegoAnimActor::UpdateState(p_time);
}
}