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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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