mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 00:31:16 +00:00
Address review comments, round 2
This commit is contained in:
parent
574de7b2a1
commit
383eeb2ba7
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user