From 4939ceb5659e7cbeaf4e3d3183528809121b0ea7 Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Sat, 18 Jan 2025 22:51:25 +0300 Subject: [PATCH] Fix offset scaling in world map. --- UnleashedRecomp/patches/aspect_ratio_patches.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UnleashedRecomp/patches/aspect_ratio_patches.cpp b/UnleashedRecomp/patches/aspect_ratio_patches.cpp index c1c04a79..73e30c40 100644 --- a/UnleashedRecomp/patches/aspect_ratio_patches.cpp +++ b/UnleashedRecomp/patches/aspect_ratio_patches.cpp @@ -272,7 +272,7 @@ PPC_FUNC(sub_8258B558) ctx.f2.f64 = offsetY; if (Config::UIScaleMode == EUIScaleMode::Edge && g_aspectRatioNarrowScale >= 1.0f) - ctx.f1.f64 += g_aspectRatioOffsetX; + ctx.f1.f64 += g_aspectRatioOffsetX / g_aspectRatioScale; sub_830BB3D0(ctx, base); } @@ -294,7 +294,7 @@ PPC_FUNC(sub_8258B558) { float value = 708.0f + g_aspectRatioNarrowScale * 140.0f; if (Config::UIScaleMode == EUIScaleMode::Edge && g_aspectRatioNarrowScale >= 1.0f) - value += g_aspectRatioOffsetX; + value += g_aspectRatioOffsetX / g_aspectRatioScale; PPC_STORE_U32(textBox + 0x38, reinterpret_cast(value)); } @@ -787,7 +787,7 @@ static void Draw(PPCContext& ctx, uint8_t* base, PPCFunc* original, uint32_t str if ((modifier.flags & WORLD_MAP) != 0) { if ((modifier.flags & ALIGN_LEFT) != 0) - offsetX += (1.0f - g_aspectRatioNarrowScale) * -20.0f; + offsetX += (1.0f - g_aspectRatioNarrowScale) * g_aspectRatioScale * -20.0f; } }