From 016b549d7a5467a0cbed18351ba515ef7a617b6d Mon Sep 17 00:00:00 2001 From: William JCM Date: Sun, 4 Oct 2020 20:11:32 +0200 Subject: [PATCH] Profile: simplify the credits formula. IntProperty is a 32-bit signed integer according to research. --- Profile/Profile.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Profile/Profile.cpp b/Profile/Profile.cpp index aeb996c..1420fda 100644 --- a/Profile/Profile.cpp +++ b/Profile/Profile.cpp @@ -129,10 +129,7 @@ auto Profile::getCredits() -> std::int32_t { auto iter = std::search(mmap.begin(), mmap.end(), &credits_locator[0], &credits_locator[22]); if(iter != mmap.end()) { - _credits = ((*(iter + 0x20)) << 0) + - ((*(iter + 0x21)) << 8) + - ((*(iter + 0x22)) << 16) + - ((*(iter + 0x23)) << 24); + _credits = *reinterpret_cast(iter + 0x20); } else{ _credits = -1;