From fa015b438967a01b17a46665851f28e34d21ac95 Mon Sep 17 00:00:00 2001 From: somewhatlurker <52014015+somewhatlurker@users.noreply.github.com> Date: Wed, 11 Sep 2019 11:01:14 +1000 Subject: [PATCH] make USE_AUTO_FRAMESPEED_ADDRESS and AUTO_FRAMESPEED_TARGET_FRAMERATE_ADDRESS constants --- .../plugins/TLAC/Components/FrameRateManager.cpp | 12 ++++++------ source-code/source/plugins/TLAC/Constants.h | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/source-code/source/plugins/TLAC/Components/FrameRateManager.cpp b/source-code/source/plugins/TLAC/Components/FrameRateManager.cpp index b760948..4359584 100644 --- a/source-code/source/plugins/TLAC/Components/FrameRateManager.cpp +++ b/source-code/source/plugins/TLAC/Components/FrameRateManager.cpp @@ -99,10 +99,10 @@ namespace TLAC::Components // this alterante way makes physics slowmo, but overall may be better if that's fixed //// target framerate - //*(float*)0x140eda6cc = 60.0f; + //*(float*)AUTO_FRAMESPEED_TARGET_FRAMERATE_ADDRESS = 60.0f; //// enable dynamic framerate - //*(bool*)0x140eda79c = true; + //*(bool*)USE_AUTO_FRAMESPEED_ADDRESS = true; //*pvFrameRate = 60.0f; @@ -139,10 +139,10 @@ namespace TLAC::Components if (*(SubGameState*)CURRENT_GAME_SUB_STATE_ADDRESS == SUB_GAME_MAIN || *(SubGameState*)CURRENT_GAME_SUB_STATE_ADDRESS == SUB_DEMO) { // enable dynamic framerate - *(bool*)0x140eda79c = true; + *(bool*)USE_AUTO_FRAMESPEED_ADDRESS = true; // target framerate - *(float*)0x140eda6cc = *pvFrameRate; + *(float*)AUTO_FRAMESPEED_TARGET_FRAMERATE_ADDRESS = *pvFrameRate; // trying to fix meltdown's water //if ((uint64_t*)0x1411943f8 != nullptr) @@ -152,10 +152,10 @@ namespace TLAC::Components else { // enable dynamic framerate - *(bool*)0x140eda79c = true; + *(bool*)USE_AUTO_FRAMESPEED_ADDRESS = true; // target framerate - *(float*)0x140eda6cc = 60.0f; + *(float*)AUTO_FRAMESPEED_TARGET_FRAMERATE_ADDRESS = 60.0f; } } diff --git a/source-code/source/plugins/TLAC/Constants.h b/source-code/source/plugins/TLAC/Constants.h index fc8c7ff..4fdaf06 100644 --- a/source-code/source/plugins/TLAC/Constants.h +++ b/source-code/source/plugins/TLAC/Constants.h @@ -21,6 +21,8 @@ constexpr uint64_t AET_FRAME_DURATION_ADDRESS = 0x00000001409A0A58; constexpr uint64_t PV_FRAME_RATE_ADDRESS = 0x0000000140EDA7CC; constexpr uint64_t FRAME_SPEED_ADDRESS = 0x0000000140EDA798; constexpr uint64_t FRAME_RATE_ADDRESS = 0x0000000140EDA6D0; +constexpr uint64_t USE_AUTO_FRAMESPEED_ADDRESS = 0x0000000140EDA79C; +constexpr uint64_t AUTO_FRAMESPEED_TARGET_FRAMERATE_ADDRESS = 0x0000000140EDA6CC; constexpr uint64_t DW_GUI_DISPLAY_INSTANCE_PTR_ADDRESS = 0x0000000141190108; constexpr uint64_t INPUT_STATE_PTR_ADDRESS = 0x0000000140EDA330;