diff options
author | erorcun <erayorcunus@gmail.com> | 2019-11-20 22:06:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-20 22:06:22 +0100 |
commit | a7d0404c89047acbd426a0369a8cc343ed1429f0 (patch) | |
tree | 137c86403af35f742ebdff48706b520e4134dc5f /src/core | |
parent | Frontend, Peds & logic and overflow fixes (diff) | |
parent | CPed completed! (diff) | |
download | re3-a7d0404c89047acbd426a0369a8cc343ed1429f0.tar re3-a7d0404c89047acbd426a0369a8cc343ed1429f0.tar.gz re3-a7d0404c89047acbd426a0369a8cc343ed1429f0.tar.bz2 re3-a7d0404c89047acbd426a0369a8cc343ed1429f0.tar.lz re3-a7d0404c89047acbd426a0369a8cc343ed1429f0.tar.xz re3-a7d0404c89047acbd426a0369a8cc343ed1429f0.tar.zst re3-a7d0404c89047acbd426a0369a8cc343ed1429f0.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/User.cpp | 12 | ||||
-rw-r--r-- | src/core/User.h | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/core/User.cpp b/src/core/User.cpp index 600fa443..488d64be 100644 --- a/src/core/User.cpp +++ b/src/core/User.cpp @@ -140,7 +140,7 @@ bool COnscreenTimerEntry::ProcessForDisplay() { if(m_nTimerOffset != 0) { m_bTimerProcessed = true; - ProcessForDisplayTimer(); + ProcessForDisplayClock(); } if(m_nCounterOffset != 0) { @@ -150,21 +150,21 @@ bool COnscreenTimerEntry::ProcessForDisplay() { return true; } -int COnscreenTimerEntry::ProcessForDisplayTimer() { +void COnscreenTimerEntry::ProcessForDisplayClock() { uint32 time = *(uint32*)&CTheScripts::ScriptSpace[m_nTimerOffset]; - return sprintf(m_bTimerBuffer, "%02d:%02d", time / 1000 / 60, + sprintf(m_bTimerBuffer, "%02d:%02d", time / 1000 / 60, time / 1000 % 60); } -int COnscreenTimerEntry::ProcessForDisplayCounter() { +void COnscreenTimerEntry::ProcessForDisplayCounter() { uint32 counter = *(uint32*)&CTheScripts::ScriptSpace[m_nCounterOffset]; - return sprintf(m_bCounterBuffer, "%d", counter); + sprintf(m_bCounterBuffer, "%d", counter); } STARTPATCHES InjectHook(0x429160, &COnscreenTimerEntry::Process, PATCH_JUMP); InjectHook(0x429110, &COnscreenTimerEntry::ProcessForDisplay, PATCH_JUMP); - InjectHook(0x429080, &COnscreenTimerEntry::ProcessForDisplayTimer, PATCH_JUMP); + InjectHook(0x429080, &COnscreenTimerEntry::ProcessForDisplayClock, PATCH_JUMP); InjectHook(0x4290F0, &COnscreenTimerEntry::ProcessForDisplayCounter, PATCH_JUMP); InjectHook(0x429220, &COnscreenTimer::Init, PATCH_JUMP); diff --git a/src/core/User.h b/src/core/User.h index 90b2da55..03ba1bab 100644 --- a/src/core/User.h +++ b/src/core/User.h @@ -18,8 +18,8 @@ public: void Process(); bool ProcessForDisplay(); - int ProcessForDisplayTimer(); - int ProcessForDisplayCounter(); + void ProcessForDisplayClock(); + void ProcessForDisplayCounter(); }; static_assert(sizeof(COnscreenTimerEntry) == 0x74, "COnscreenTimerEntry: error"); |