diff --git a/LEGO1/lego/legoomni/include/legoracers.h b/LEGO1/lego/legoomni/include/legoracers.h index 689254be..ab5310a7 100644 --- a/LEGO1/lego/legoomni/include/legoracers.h +++ b/LEGO1/lego/legoomni/include/legoracers.h @@ -102,7 +102,7 @@ class LegoRaceCar : public LegoCarRaceActor, public LegoRaceMap { static MxLong g_timeLastSoundPlayed; static MxS32 g_unk0x100f0b88; static MxBool g_unk0x100f0b8c; - static Mx3DPointFloat g_vector020; + static Mx3DPointFloat g_unk0x10102af0; }; #endif // LEGORACERS_H diff --git a/LEGO1/lego/legoomni/src/race/legoracers.cpp b/LEGO1/lego/legoomni/src/race/legoracers.cpp index 7d8e8eb9..355f3b79 100644 --- a/LEGO1/lego/legoomni/src/race/legoracers.cpp +++ b/LEGO1/lego/legoomni/src/race/legoracers.cpp @@ -127,7 +127,7 @@ MxBool LegoRaceCar::g_unk0x100f0b8c = TRUE; // Initialized at LEGO1 0x10012db0 // GLOBAL: LEGO1 0x10102af0 -Mx3DPointFloat LegoRaceCar::g_vector020 = Mx3DPointFloat(0.0f, 2.0f, 0.0f); +Mx3DPointFloat LegoRaceCar::g_unk0x10102af0 = Mx3DPointFloat(0.0f, 2.0f, 0.0f); // FUNCTION: LEGO1 0x10012950 LegoRaceCar::LegoRaceCar() @@ -391,7 +391,7 @@ MxResult LegoRaceCar::VTable0x94(LegoPathActor* p_actor, MxBool p_bool) MxMatrix matr; matr = roi->GetLocal2World(); - Vector3(matr[3]).Add(g_vector020); + Vector3(matr[3]).Add(g_unk0x10102af0); roi->FUN_100a58f0(matr); p_actor->SetState(2); @@ -400,8 +400,7 @@ MxResult LegoRaceCar::VTable0x94(LegoPathActor* p_actor, MxBool p_bool) if (m_userNavFlag) { MxBool actorIsStuds = strcmpi(p_actor->GetROI()->GetName(), "studs") == 0; MxBool actorIsRhoda = strcmpi(p_actor->GetROI()->GetName(), "rhoda") == 0; - MxTimer* timer = Timer(); - MxLong time = timer->GetTime(); + MxLong time = Timer()->GetTime(); const char* soundKey = NULL; MxLong timeElapsed = time - g_timeLastSoundPlayed; diff --git a/LEGO1/omni/include/mxtimer.h b/LEGO1/omni/include/mxtimer.h index 457e6e45..034b1565 100644 --- a/LEGO1/omni/include/mxtimer.h +++ b/LEGO1/omni/include/mxtimer.h @@ -14,13 +14,15 @@ class MxTimer : public MxCore { MxLong GetRealTime(); + // FUNCTION: BETA10 0x10017810 MxLong GetTime() { + // Note that the BETA10 implementation differs - it only consists of the second branch of this `if` call if (this->m_isRunning) { return g_lastTimeTimerStarted; } else { - return GetTimeSinceStart(); + return g_lastTimeCalculated - this->m_startTime; } } @@ -28,12 +30,6 @@ class MxTimer : public MxCore { // MxTimer::`scalar deleting destructor' private: - // This function appears to be public in BETA10; this function may also be - // an older version of GetTime() instead of a private subroutine. - // None of this matters for the release build since these functions are inlined. - // FUNCTION: BETA10 0x10017810 - MxLong GetTimeSinceStart() { return g_lastTimeCalculated - m_startTime; } - MxLong m_startTime; // 0x08 MxBool m_isRunning; // 0x0c