Fade-in position number after GO

This commit is contained in:
Sally Coolatta 2022-11-17 23:02:44 -05:00
parent 5f20d5a3ac
commit 2d200c1361

View file

@ -1601,9 +1601,20 @@ static void K_DrawKartPositionNum(INT32 num)
const tic_t counter = (leveltime / 3); // Alternate colors every three frames const tic_t counter = (leveltime / 3); // Alternate colors every three frames
fixed_t scale = FRACUNIT; fixed_t scale = FRACUNIT;
fixed_t fx = 0, fy = 0; fixed_t fx = 0, fy = 0;
transnum_t trans = 0;
INT32 fflags = 0; INT32 fflags = 0;
UINT8 *color = NULL; UINT8 *color = NULL;
if (leveltime < (starttime + NUMTRANSMAPS))
{
trans = max(0, (starttime + NUMTRANSMAPS) - leveltime);
}
if (trans >= NUMTRANSMAPS)
{
return;
}
if (stplyr->positiondelay || stplyr->exiting) if (stplyr->positiondelay || stplyr->exiting)
{ {
UINT8 delay = (stplyr->exiting) ? POS_DELAY_TIME : stplyr->positiondelay; UINT8 delay = (stplyr->exiting) ? POS_DELAY_TIME : stplyr->positiondelay;
@ -1658,6 +1669,11 @@ static void K_DrawKartPositionNum(INT32 num)
fy >>= 1; fy >>= 1;
} }
if (trans > 0)
{
fflags |= (trans << V_ALPHASHIFT);
}
if (stplyr->exiting && num == 1) if (stplyr->exiting && num == 1)
{ {
// 1st place winner? You get rainbows!! // 1st place winner? You get rainbows!!