From 6604cba85115c261a919df1956ee459fc599b4be Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Tue, 20 Jun 2023 19:09:36 -0400 Subject: [PATCH] MxTimer - finish tweaking to match assembly --- LEGO1/mxtimer.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/LEGO1/mxtimer.cpp b/LEGO1/mxtimer.cpp index cc91912c..782ccd70 100644 --- a/LEGO1/mxtimer.cpp +++ b/LEGO1/mxtimer.cpp @@ -10,16 +10,17 @@ 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() { - MxTimer::s_LastTimeTimerStarted = timeGetTime(); + s_LastTimeTimerStarted = this->GetRealTime(); this->m_isRunning = MX_TRUE; }