From 2af11c8d2f68685feaf2cdfedc8f2f60f1d4d337 Mon Sep 17 00:00:00 2001 From: RadiantDerg <9061202+RadiantDerg@users.noreply.github.com> Date: Fri, 17 Jan 2025 18:17:50 -0600 Subject: [PATCH] Fix position text scaling with aspect ratio --- UnleashedRecomp/patches/debug_patches.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/UnleashedRecomp/patches/debug_patches.cpp b/UnleashedRecomp/patches/debug_patches.cpp index 6ef48d6..5c5e4a4 100644 --- a/UnleashedRecomp/patches/debug_patches.cpp +++ b/UnleashedRecomp/patches/debug_patches.cpp @@ -3,6 +3,7 @@ #include #include #include +#include // boost::~::SWA::CDebugDraw::CMember::SDrawLine @@ -44,10 +45,10 @@ PPC_FUNC(sub_82522040) if (Reddog::DebugDraw::GetIsDrawPosition()) { const Reddog::SDrawText positionText{ - {Scale(750), Scale(120)}, + {Scale(g_aspectRatioOffsetX + 750), Scale(g_aspectRatioOffsetY + 120)}, fmt::format("( {:.2f}, {:.2f}, {:.2f} )", a1->m_PlayerPosition.X.get(), a1->m_PlayerPosition.Y.get(), a1->m_PlayerPosition.Z.get()), 0, - Scale(1.0f), + 1.5f, 0xFFFFFFFF, Reddog::eDrawTextFlags_NoShadow }; @@ -61,7 +62,7 @@ PPC_FUNC(sub_82522040) } // GetIsDebugRenderForGameObject() -PPC_FUNC(sub_82512BF8) -{ - ctx.r3.u8 = 1; // Always return true -} +//PPC_FUNC(sub_82512BF8) +//{ +// ctx.r3.u8 = 1; // Always return true +//}