mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-02-03 08:43:56 +03:00
Use HUD aspect ratio for 'HELP!!' arrows and edge proximity arrows
This commit is contained in:
parent
048326d78c
commit
b5d82c031d
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user