From e899f32f0e19dd48463cecae06ed1db64d58d9ae Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:03:30 +0100 Subject: [PATCH] Remove CSD offset hook We'll just move the casts manually once we get around to sorting the rest of the UI out, this'll just interfere with that. --- UnleashedRecomp/game.cpp | 14 -------------- UnleashedRecompLib/config/SWA.toml | 6 ------ 2 files changed, 20 deletions(-) diff --git a/UnleashedRecomp/game.cpp b/UnleashedRecomp/game.cpp index 7ee8d3c..5a3d790 100644 --- a/UnleashedRecomp/game.cpp +++ b/UnleashedRecomp/game.cpp @@ -56,20 +56,6 @@ void CSDAspectRatioMidAsmHook(PPCRegister& f1, PPCRegister& f2) } } -void CSDOffsetMidAsmHook(PPCRegister& f1, PPCRegister& f2) -{ - auto newAspectRatio = (float)Window::s_width / (float)Window::s_height; - - if (newAspectRatio > m_baseAspectRatio) - { - *(be*)g_memory.Translate(0x8339C5D0) = ((newAspectRatio * 720.0f) - 1280.0f) / 2.0f / 1280.0f; - } - else - { - *(be*)g_memory.Translate(0x8339C5D4) = ((1280.0f / newAspectRatio) - 720.0f) / 2.0f / 720.0f; - } -} - #pragma endregion #pragma region Score Hooks diff --git a/UnleashedRecompLib/config/SWA.toml b/UnleashedRecompLib/config/SWA.toml index d3c718e..298870f 100644 --- a/UnleashedRecompLib/config/SWA.toml +++ b/UnleashedRecompLib/config/SWA.toml @@ -121,12 +121,6 @@ name = "CSDAspectRatioMidAsmHook" address = 0x830C0A28 registers = ["f1", "f2"] -[[midasm_hook]] -name = "CSDOffsetMidAsmHook" -address = 0x830C0A78 -registers = ["f1", "f2"] -return = true - [[midasm_hook]] name = "ResetScoreOnRestartMidAsmHook" address = 0x82304374