MxTimer matching (#29)

* MxTimer::Start - swap instruction order

Technically, isRunning is set after getting the real time according to the pseudo code,
which i guess is fine, you dont know it started until it really started

* MxTimer - finish tweaking to match assembly
This commit is contained in:
Joshua Peisach
2023-06-21 03:37:46 -04:00
committed by GitHub
parent 4b71fb8815
commit 2644be3ca6

View File

@@ -12,15 +12,16 @@ long MxTimer::s_LastTimeTimerStarted = 0;
MxTimer::MxTimer() MxTimer::MxTimer()
{ {
this->m_isRunning = MX_FALSE; this->m_isRunning = MX_FALSE;
MxTimer::s_LastTimeCalculated = timeGetTime(); m_startTime = timeGetTime();
this->m_startTime = MxTimer::s_LastTimeCalculated; // yeah this is somehow what the asm is
s_LastTimeCalculated = m_startTime;
} }
// OFFSET: LEGO1 0x100ae160 // OFFSET: LEGO1 0x100ae160
void MxTimer::Start() void MxTimer::Start()
{ {
s_LastTimeTimerStarted = this->GetRealTime();
this->m_isRunning = MX_TRUE; this->m_isRunning = MX_TRUE;
MxTimer::s_LastTimeTimerStarted = timeGetTime();
} }
// OFFSET: LEGO1 0x100ae180 // OFFSET: LEGO1 0x100ae180