summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiloku <mateus.sateles@protonmail.com>2025-02-02 15:27:16 -0300
committerLywx <kiritodev01@gmail.com>2025-02-02 13:44:58 -0600
commitb5d82c031df2c3d68c1b94a618ed79b25400f0b8 (patch)
tree1f69e68e760f8356ff5f41f20ec5919f4329e3fc
parent048326d78cbd2a74f39959c9d2cc91bc3cca5f32 (diff)
Use HUD aspect ratio for 'HELP!!' arrows and edge proximity arrows
-rw-r--r--src/engine/fox_display.c16
-rw-r--r--src/engine/fox_hud.c4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c
index 1e2f9908..77cff46d 100644
--- a/src/engine/fox_display.c
+++ b/src/engine/fox_display.c
@@ -92,10 +92,10 @@ void Display_DrawHelpAlert(void) {
switch (centered) {
case false:
if (gTeamHelpActor->sfxSource[0] > 0.0f) {
- sp78 = 20.0f * OTRGetAspectRatio() - 8;
+ sp78 = 20.0f * OTRGetHUDAspectRatio() - 8;
sp74 = M_PI / 2;
} else {
- sp78 = -20.0f * OTRGetAspectRatio() + 8;
+ sp78 = -20.0f * OTRGetHUDAspectRatio() + 8;
sp74 = -M_PI / 2;
}
Matrix_Push(&gGfxMatrix);
@@ -120,7 +120,7 @@ void Display_DrawHelpAlert(void) {
// @port: Tag the transform.
FrameInterpolation_RecordOpenChild("Display_DrawHelpAlert", centered);
- Matrix_Translate(gGfxMatrix, 20.0f * OTRGetAspectRatio() - 8, 0.0f, -50.0f, MTXF_APPLY);
+ Matrix_Translate(gGfxMatrix, 20.0f * OTRGetHUDAspectRatio() - 8, 0.0f, -50.0f, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, -M_PI / 2, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
@@ -130,7 +130,7 @@ void Display_DrawHelpAlert(void) {
// left arrow (both in simultaneous)
Matrix_Push(&gGfxMatrix);
- Matrix_Translate(gGfxMatrix, -20.0f * OTRGetAspectRatio() + 8, 0.0f, -50.0f, MTXF_APPLY);
+ Matrix_Translate(gGfxMatrix, -20.0f * OTRGetHUDAspectRatio() + 8, 0.0f, -50.0f, MTXF_APPLY);
Matrix_RotateZ(gGfxMatrix, M_PI / 2, MTXF_APPLY);
Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, MTXF_APPLY);
Matrix_SetGfxMtx(&gMasterDisp);
@@ -147,17 +147,17 @@ void Display_DrawHelpAlert(void) {
RCP_SetupDL(&gMasterDisp, SETUPDL_76_POINT);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
if (sp78 < 0.0f) {
- Graphics_DisplaySmallText(OTRGetRectDimensionFromLeftEdge(38.0f), 106, 1.0f, 1.0f, "HELP!!");
+ Graphics_DisplaySmallText(OTRGetRectDimensionFromLeftEdgeOverride(38.0f), 106, 1.0f, 1.0f, "HELP!!");
} else {
- Graphics_DisplaySmallText(OTRGetRectDimensionFromRightEdge(248), 106, 1.0f, 1.0f, "HELP!!");
+ Graphics_DisplaySmallText(OTRGetRectDimensionFromRightEdgeOverride(248), 106, 1.0f, 1.0f, "HELP!!");
}
break;
case true:
RCP_SetupDL(&gMasterDisp, SETUPDL_76_POINT);
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
- Graphics_DisplaySmallText(OTRGetRectDimensionFromLeftEdge(38.0f), 106, 1.0f, 1.0f, "HELP!!");
- Graphics_DisplaySmallText(OTRGetRectDimensionFromRightEdge(248), 106, 1.0f, 1.0f, "HELP!!");
+ Graphics_DisplaySmallText(OTRGetRectDimensionFromLeftEdgeOverride(38.0f), 106, 1.0f, 1.0f, "HELP!!");
+ Graphics_DisplaySmallText(OTRGetRectDimensionFromRightEdgeOverride(248), 106, 1.0f, 1.0f, "HELP!!");
break;
}
}
diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c
index e8cd1c30..051ec0b6 100644
--- a/src/engine/fox_hud.c
+++ b/src/engine/fox_hud.c
@@ -2819,9 +2819,9 @@ void HUD_EdgeArrows_Draw(s32 idx, bool arg1) {
f32 xPos = D_800D1EF8[idx];
if (xPos < 0.0f) {
- xPos = xPos * OTRGetAspectRatio() + 1;
+ xPos = xPos * OTRGetHUDAspectRatio() + 1;
} else if (xPos > 0.0f) {
- xPos = xPos * OTRGetAspectRatio() - 1;
+ xPos = xPos * OTRGetHUDAspectRatio() - 1;
}
if (arg1) {