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:
toaster 2018-07-30 21:53:54 +01:00
parent f9c9f06464
commit bc9da8ee31
2 changed files with 17 additions and 18 deletions

View file

@ -5730,19 +5730,16 @@ static void K_drawBattleFullscreen(void)
} }
else if (stplyr->kartstuff[k_bumper] <= 0 && stplyr->kartstuff[k_comebacktimer] && comeback) else if (stplyr->kartstuff[k_bumper] <= 0 && stplyr->kartstuff[k_comebacktimer] && comeback)
{ {
INT32 t = stplyr->kartstuff[k_comebacktimer]/TICRATE; UINT16 t = stplyr->kartstuff[k_comebacktimer]/(10*TICRATE);
INT32 txoff = 0; 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; INT32 ty = (BASEVIDHEIGHT/2)+66;
if (t == 0) txoff = adjust;
txoff = 8;
else while (t)
{ {
while (t) txoff += adjust;
{ t /= 10;
txoff += 8;
t /= 10;
}
} }
if (splitscreen) if (splitscreen)
@ -5763,7 +5760,7 @@ static void K_drawBattleFullscreen(void)
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, splitflags, kp_battlewait, NULL); V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, splitflags, kp_battlewait, NULL);
if (splitscreen > 1) 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 else
{ {
V_DrawFixedPatch(x<<FRACBITS, ty<<FRACBITS, scale, 0, kp_timeoutsticker, NULL); 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) 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) if ((flashtime % TICRATE) < TICRATE/2)
return; return;
V_DrawKartString(BASEVIDWIDTH/2 - (6*9), // horizontally centered, nice V_DrawKartString((BASEVIDWIDTH - (LAPS_X+1)) - (12*9), // mirror the laps thingy
LAPS_Y+3, V_SNAPTOBOTTOM, "FREE PLAY"); LAPS_Y+3, V_SNAPTOBOTTOM|V_SNAPTORIGHT, "FREE PLAY");
} }
void K_drawKartHUD(void) void K_drawKartHUD(void)

View file

@ -499,13 +499,13 @@ dotimer:
if (timer) if (timer)
{ {
INT32 tickdown = (timer+1)/TICRATE; 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"))); va("start in %d second%s", tickdown, (tickdown == 1 ? "" : "s")));
} }
// Make it obvious that scrambling is happening next round. // Make it obvious that scrambling is happening next round.
if (cv_scrambleonchange.value && cv_teamscramble.value && (intertic/TICRATE % 2 == 0)) 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) if (votetic >= voteendtic && voteendtic != -1)
return; return;
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
if (!voteclient.loaded) if (!voteclient.loaded)
return; return;
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
if (widebgpatch && rendermode == render_soft && vid.width / vid.dupx > 320) if (widebgpatch && rendermode == render_soft && vid.width / vid.dupx > 320)
V_DrawScaledPatch(((vid.width/2) / vid.dupx) - (SHORT(widebgpatch->width)/2), V_DrawScaledPatch(((vid.width/2) / vid.dupx) - (SHORT(widebgpatch->width)/2),
(vid.height / vid.dupy) - SHORT(widebgpatch->height), (vid.height / vid.dupy) - SHORT(widebgpatch->height),
@ -1138,7 +1138,7 @@ void Y_VoteDrawer(void)
hilicol = V_SKYMAP; hilicol = V_SKYMAP;
else //if (gametype == GT_MATCH) else //if (gametype == GT_MATCH)
hilicol = V_REDMAP; 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"))); va("Vote ends in %d second%s", tickdown, (tickdown == 1 ? "" : "s")));
} }
} }