mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 13:35:11 +03:00
widescreen team help arrows
This commit is contained in:
parent
cda21a4dea
commit
c878b6bcc9
@ -35,7 +35,7 @@ void KillBoss(void);
|
||||
#endif
|
||||
|
||||
void Display_DrawHelpAlert(void) {
|
||||
bool sp7C;
|
||||
bool centered; // Enemy pos is centered, so both help arrows should be displayed
|
||||
f32 sp78;
|
||||
f32 sp74;
|
||||
Vec3f sp68;
|
||||
@ -44,11 +44,13 @@ void Display_DrawHelpAlert(void) {
|
||||
if ((gPlayState == PLAY_PAUSE) || (gTeamHelpActor == NULL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((gTeamHelpActor->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) {
|
||||
gTeamHelpActor = NULL;
|
||||
gTeamHelpTimer = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (gTeamHelpTimer != 0) {
|
||||
gTeamHelpTimer--;
|
||||
if (gTeamHelpTimer == 0) {
|
||||
@ -67,9 +69,9 @@ void Display_DrawHelpAlert(void) {
|
||||
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp68, &sp5C);
|
||||
|
||||
sp7C = false;
|
||||
centered = false;
|
||||
if ((sp5C.z < 0.0f) && (sp5C.z > -12000.0f) && (fabsf(sp5C.x) < fabsf(sp5C.z * 0.4f))) {
|
||||
sp7C = true;
|
||||
centered = true;
|
||||
}
|
||||
|
||||
RCP_SetupDL(&gMasterDisp, SETUPDL_12);
|
||||
@ -86,19 +88,19 @@ void Display_DrawHelpAlert(void) {
|
||||
break;
|
||||
}
|
||||
|
||||
switch (sp7C) {
|
||||
switch (centered) {
|
||||
case false:
|
||||
if (gTeamHelpActor->sfxSource[0] > 0.0f) {
|
||||
sp78 = 20.0f;
|
||||
sp78 = 20.0f * OTRGetAspectRatio()-8;
|
||||
sp74 = M_PI / 2;
|
||||
} else {
|
||||
sp78 = -20.0f;
|
||||
sp78 = -20.0f * OTRGetAspectRatio()+8;
|
||||
sp74 = -M_PI / 2;
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
|
||||
// @port: Tag the transform.
|
||||
FrameInterpolation_RecordOpenChild("Display_DrawHelpAlert", sp7C);
|
||||
FrameInterpolation_RecordOpenChild("Display_DrawHelpAlert", centered);
|
||||
|
||||
Matrix_Translate(gGfxMatrix, sp78, 0.0f, -50.0f, MTXF_APPLY);
|
||||
Matrix_RotateZ(gGfxMatrix, sp74, MTXF_APPLY);
|
||||
@ -112,20 +114,22 @@ void Display_DrawHelpAlert(void) {
|
||||
break;
|
||||
|
||||
case true:
|
||||
// right arrow (both at the same time)
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
|
||||
// @port: Tag the transform.
|
||||
FrameInterpolation_RecordOpenChild("Display_DrawHelpAlert", sp7C);
|
||||
|
||||
Matrix_Translate(gGfxMatrix, 20.0f, 0.0f, -50.0f, MTXF_APPLY);
|
||||
FrameInterpolation_RecordOpenChild("Display_DrawHelpAlert", centered);
|
||||
Matrix_Translate(gGfxMatrix, 20.0f * OTRGetAspectRatio() - 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);
|
||||
gSPDisplayList(gMasterDisp++, D_1023700);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
sp78 = -20.0f;
|
||||
|
||||
// left arrow (both in simultaneous)
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, -20.0f, 0.0f, -50.0f, MTXF_APPLY);
|
||||
Matrix_Translate(gGfxMatrix, -20.0f * OTRGetAspectRatio() + 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);
|
||||
@ -137,22 +141,22 @@ void Display_DrawHelpAlert(void) {
|
||||
break;
|
||||
}
|
||||
|
||||
switch (sp7C) {
|
||||
switch (centered) {
|
||||
case false:
|
||||
RCP_SetupDL(&gMasterDisp, SETUPDL_76_POINT);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255);
|
||||
if (sp78 < 0.0f) {
|
||||
Graphics_DisplaySmallText(43 - 19, 106, 1.0f, 1.0f, "HELP!!");
|
||||
Graphics_DisplaySmallText(OTRGetRectDimensionFromLeftEdge(38.0f), 106, 1.0f, 1.0f, "HELP!!");
|
||||
} else {
|
||||
Graphics_DisplaySmallText(SCREEN_WIDTH - 43 - 19, 106, 1.0f, 1.0f, "HELP!!");
|
||||
Graphics_DisplaySmallText(OTRGetRectDimensionFromRightEdge(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(43 - 19, 106, 1.0f, 1.0f, "HELP!!");
|
||||
Graphics_DisplaySmallText(SCREEN_WIDTH - 43 - 19, 106, 1.0f, 1.0f, "HELP!!");
|
||||
Graphics_DisplaySmallText(OTRGetRectDimensionFromLeftEdge(38.0f) , 106, 1.0f, 1.0f, "HELP!!");
|
||||
Graphics_DisplaySmallText(OTRGetRectDimensionFromRightEdge(248), 106, 1.0f, 1.0f, "HELP!!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user