summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSonic Dreamcaster <alejandro.asenjo88@gmail.com>2024-12-06 00:46:58 -0300
committerSonic Dreamcaster <alejandro.asenjo88@gmail.com>2024-12-06 00:46:58 -0300
commita23d9246b2095d60235c36b4bb0c4608a086325d (patch)
treeeaaa969ee37a203ea00d24f5982a11fcb0572e5e /src
parent04047776105e6249fffcd84c237a5c047f6ca5cd (diff)
arrow widescreen alignment
Diffstat (limited to 'src')
-rw-r--r--src/engine/fox_hud.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c
index 0b005b1a..d785ed03 100644
--- a/src/engine/fox_hud.c
+++ b/src/engine/fox_hud.c
@@ -2800,11 +2800,20 @@ void HUD_EdgeArrows_Draw(s32 idx, bool arg1) {
Matrix_RotateZ(gGfxMatrix, M_DTOR * D_800D1F88[idx], MTXF_APPLY);
}
+ // Simplified perspective alignment based on X position
+ f32 xPos = D_800D1EF8[idx];
+
+ if (xPos < 0.0f) {
+ xPos = xPos * OTRGetAspectRatio() + 1;
+ } else if (xPos > 0.0f) {
+ xPos = xPos * OTRGetAspectRatio() - 1;
+ }
+
if (arg1) {
- Matrix_Translate(gGfxMatrix, D_800D1EF8[idx] + D_800D1FE8[idx], D_800D1F28[idx] + D_800D2018[idx],
+ Matrix_Translate(gGfxMatrix, xPos + D_800D1FE8[idx], D_800D1F28[idx] + D_800D2018[idx],
D_800D1F58[idx], MTXF_APPLY);
} else {
- Matrix_Translate(gGfxMatrix, D_800D1EF8[idx], D_800D1F28[idx], D_800D1F58[idx], MTXF_APPLY);
+ Matrix_Translate(gGfxMatrix, xPos, D_800D1F28[idx], D_800D1F58[idx], MTXF_APPLY);
}
Matrix_RotateZ(gGfxMatrix, M_DTOR * D_800D1FB8[idx], MTXF_APPLY);