Clear unknowns in Carrace

This commit is contained in:
Florian Kaiser 2026-01-02 13:17:42 +01:00 committed by Fabian Neundorf
parent 056bdfb0b8
commit ac2d03b723
2 changed files with 9 additions and 9 deletions

View File

@ -78,10 +78,10 @@ class CarRace : public LegoRace {
static MxS32 g_unk0x100d5d50[];
static MxS32 g_unk0x100d5d60[];
MxS32 m_unk0x144; // 0x144
MxS32 m_unk0x148; // 0x148
MxS32 m_unk0x14c; // 0x14c
RaceSkel* m_skeleton; // 0x150
MxS32 m_introAnimation; // 0x144
MxS32 m_unk0x148; // 0x148
MxS32 m_unk0x14c; // 0x14c
RaceSkel* m_skeleton; // 0x150
};
#endif // CARRACE_H

View File

@ -25,7 +25,7 @@
DECOMP_SIZE_ASSERT(CarRace, 0x154)
// GLOBAL: LEGO1 0x100d5d10
MxS32 CarRace::g_unk0x100d5d10[] = {
MxS32 CarRace::g_introAnimations[] = {
CarraceScript::c_srt001sl_RunAnim,
CarraceScript::c_srt002sl_RunAnim,
CarraceScript::c_srt003sl_RunAnim,
@ -97,7 +97,7 @@ MxResult CarRace::Create(MxDSAction& p_dsAction)
m_raceState = raceState;
m_act1State->m_state = Act1State::e_transitionToRacecar;
m_unk0x144 = -1;
m_introAnimation = -1;
m_unk0x148 = -1;
m_unk0x14c = -1;
@ -127,10 +127,10 @@ void CarRace::ReadyWorld()
AnimationManager()->Resume();
Disable(FALSE, LegoOmni::c_disableInput | LegoOmni::c_disable3d | LegoOmni::c_clearScreen);
m_unk0x144 = g_unk0x100d5d10[rand() & 7];
m_introAnimation = g_introAnimations[rand() & 7];
AnimationManager()
->FUN_10060dc0(m_unk0x144, NULL, TRUE, LegoAnimationManager::e_unk0, NULL, FALSE, TRUE, FALSE, TRUE);
->FUN_10060dc0(m_introAnimation, NULL, TRUE, LegoAnimationManager::e_unk0, NULL, FALSE, TRUE, FALSE, TRUE);
m_opponent1Locator = (MxStillPresenter*) Find("MxPresenter", "CarLocator2");
m_opponent1Locator->SetPosition(m_progressBarRect.GetLeft(), m_progressBarRect.GetTop());
@ -150,7 +150,7 @@ MxLong CarRace::HandleEndAction(MxEndActionNotificationParam& p_param)
MxDSAction* action = p_param.GetAction();
MxU32 objectId = action->GetObjectId();
if (m_unk0x144 == objectId) {
if (m_introAnimation == objectId) {
InvokeAction(Extra::e_start, *g_carraceScript, CarraceScript::c_irtx08ra_PlayWav, NULL);
result = 1;
}