mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-16 09:42:33 +00:00
Some UI stuff.
* Place FREE PLAY in a less contentous location. * Fix comeback timer being incorrectly offset from the center of the screen. * Prevent vote drawer from nuking itself (visual-wise) at the start of the level fade following it.
This commit is contained in:
parent
65a956259b
commit
7f509c7c27
2 changed files with 17 additions and 18 deletions
25
src/k_kart.c
25
src/k_kart.c
|
@ -5730,19 +5730,16 @@ static void K_drawBattleFullscreen(void)
|
|||
}
|
||||
else if (stplyr->kartstuff[k_bumper] <= 0 && stplyr->kartstuff[k_comebacktimer] && comeback)
|
||||
{
|
||||
INT32 t = stplyr->kartstuff[k_comebacktimer]/TICRATE;
|
||||
INT32 txoff = 0;
|
||||
UINT16 t = stplyr->kartstuff[k_comebacktimer]/(10*TICRATE);
|
||||
INT32 txoff, adjust = (splitscreen > 1) ? 4 : 6; // normal string is 8, kart string is 12, half of that for ease
|
||||
INT32 ty = (BASEVIDHEIGHT/2)+66;
|
||||
|
||||
if (t == 0)
|
||||
txoff = 8;
|
||||
else
|
||||
txoff = adjust;
|
||||
|
||||
while (t)
|
||||
{
|
||||
while (t)
|
||||
{
|
||||
txoff += 8;
|
||||
t /= 10;
|
||||
}
|
||||
txoff += adjust;
|
||||
t /= 10;
|
||||
}
|
||||
|
||||
if (splitscreen)
|
||||
|
@ -5763,7 +5760,7 @@ static void K_drawBattleFullscreen(void)
|
|||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, splitflags, kp_battlewait, NULL);
|
||||
|
||||
if (splitscreen > 1)
|
||||
V_DrawString(x-(txoff/2), ty, 0, va("%d", stplyr->kartstuff[k_comebacktimer]/TICRATE));
|
||||
V_DrawString(x-txoff, ty, 0, va("%d", stplyr->kartstuff[k_comebacktimer]/TICRATE));
|
||||
else
|
||||
{
|
||||
V_DrawFixedPatch(x<<FRACBITS, ty<<FRACBITS, scale, 0, kp_timeoutsticker, NULL);
|
||||
|
@ -6054,11 +6051,13 @@ static void K_drawCheckpointDebugger(void)
|
|||
|
||||
void K_drawKartFreePlay(UINT32 flashtime)
|
||||
{
|
||||
// no splitscreen support because it's not FREE PLAY if you have more than one player in-game
|
||||
|
||||
if ((flashtime % TICRATE) < TICRATE/2)
|
||||
return;
|
||||
|
||||
V_DrawKartString(BASEVIDWIDTH/2 - (6*9), // horizontally centered, nice
|
||||
LAPS_Y+3, V_SNAPTOBOTTOM, "FREE PLAY");
|
||||
V_DrawKartString((BASEVIDWIDTH - (LAPS_X+1)) - (12*9), // mirror the laps thingy
|
||||
LAPS_Y+3, V_SNAPTOBOTTOM|V_SNAPTORIGHT, "FREE PLAY");
|
||||
}
|
||||
|
||||
void K_drawKartHUD(void)
|
||||
|
|
|
@ -499,13 +499,13 @@ dotimer:
|
|||
if (timer)
|
||||
{
|
||||
INT32 tickdown = (timer+1)/TICRATE;
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, 188, hilicol|V_SNAPTOBOTTOM,
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, 188, hilicol,
|
||||
va("start in %d second%s", tickdown, (tickdown == 1 ? "" : "s")));
|
||||
}
|
||||
|
||||
// Make it obvious that scrambling is happening next round.
|
||||
if (cv_scrambleonchange.value && cv_teamscramble.value && (intertic/TICRATE % 2 == 0))
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, hilicol|V_SNAPTOBOTTOM, M_GetText("Teams will be scrambled next round!"));
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2, hilicol, M_GetText("Teams will be scrambled next round!"));
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -936,11 +936,11 @@ void Y_VoteDrawer(void)
|
|||
if (votetic >= voteendtic && voteendtic != -1)
|
||||
return;
|
||||
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
|
||||
if (!voteclient.loaded)
|
||||
return;
|
||||
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
|
||||
if (widebgpatch && rendermode == render_soft && vid.width / vid.dupx > 320)
|
||||
V_DrawScaledPatch(((vid.width/2) / vid.dupx) - (SHORT(widebgpatch->width)/2),
|
||||
(vid.height / vid.dupy) - SHORT(widebgpatch->height),
|
||||
|
@ -1138,7 +1138,7 @@ void Y_VoteDrawer(void)
|
|||
hilicol = V_SKYMAP;
|
||||
else //if (gametype == GT_MATCH)
|
||||
hilicol = V_REDMAP;
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, 188, hilicol|V_SNAPTOBOTTOM,
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, 188, hilicol,
|
||||
va("Vote ends in %d second%s", tickdown, (tickdown == 1 ? "" : "s")));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue