Merge branch 'widescreen-a' into 'master'

Widescreen support for Y_IntermissionButton

See merge request KartKrew/Kart!2256
This commit is contained in:
James R. 2024-04-11 03:06:43 +00:00
commit da82b4c9c7
4 changed files with 10 additions and 7 deletions

View file

@ -1361,7 +1361,7 @@ void F_GameEvaluationDrawer(void)
V_DrawCenteredString(BASEVIDWIDTH/2, 182, V_SNAPTOBOTTOM|(ultimatemode ? V_REDMAP : V_YELLOWMAP), endingtext);
}
Y_DrawIntermissionButton(EVALLEN_HALFWAY + TICRATE - finalecount, (finalecount + TICRATE) - timetonext);
Y_DrawIntermissionButton(EVALLEN_HALFWAY + TICRATE - finalecount, (finalecount + TICRATE) - timetonext, true);
}
void F_GameEvaluationTicker(void)

View file

@ -935,11 +935,11 @@ void podiumData_s::Draw(void)
if (state == PODIUM_ST_DONE)
{
Y_DrawIntermissionButton(delay, 0);
Y_DrawIntermissionButton(delay, 0, true);
}
else if (state == PODIUM_ST_EXIT)
{
Y_DrawIntermissionButton(-1, (2*TICRATE) - delay);
Y_DrawIntermissionButton(-1, (2*TICRATE) - delay, true);
}
}
}

View file

@ -1429,7 +1429,7 @@ void Y_RoundQueueDrawer(y_data_t *standings, INT32 offset, boolean doanimations,
//
// It's a button that slides at the given time
//
void Y_DrawIntermissionButton(INT32 startslide, INT32 through)
void Y_DrawIntermissionButton(INT32 startslide, INT32 through, boolean widescreen)
{
INT32 percentslide = 0;
const INT32 slidetime = (TICRATE/4);
@ -1476,7 +1476,10 @@ void Y_DrawIntermissionButton(INT32 startslide, INT32 through)
K_drawButton(
2*FRACUNIT - offset,
(BASEVIDHEIGHT - 16)*FRACUNIT,
0,
(widescreen
? (V_SNAPTOLEFT|V_SNAPTOBOTTOM)
: 0
),
kp_button_a[1],
pressed
);
@ -1714,7 +1717,7 @@ finalcounter:
if (Y_CanSkipIntermission())
{
const tic_t end = roundqueue.size != 0 ? 3*TICRATE : TICRATE;
Y_DrawIntermissionButton(INTERBUTTONSLIDEIN - intertic, end - timer);
Y_DrawIntermissionButton(INTERBUTTONSLIDEIN - intertic, end - timer, false);
}
else
{

View file

@ -56,7 +56,7 @@ void Y_Ticker(void);
// Specific sub-drawers
void Y_PlayerStandingsDrawer(y_data_t *standings, INT32 xoffset);
void Y_RoundQueueDrawer(y_data_t *standings, INT32 offset, boolean doanimations, boolean widescreen);
void Y_DrawIntermissionButton(INT32 startslide, INT32 through);
void Y_DrawIntermissionButton(INT32 startslide, INT32 through, boolean widescreen);
void Y_StartIntermission(void);
void Y_EndIntermission(void);