From bc9da8ee31f5a985656728e0db2cdfac044cb4e4 Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 30 Jul 2018 21:53:54 +0100 Subject: [PATCH] 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. --- src/k_kart.c | 25 ++++++++++++------------- src/y_inter.c | 10 +++++----- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index d546a06fd..6792895a5 100644 --- a/src/k_kart.c +++ b/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< 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<= 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"))); } }