mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 04:11:18 +00:00
Draw PINGD before delay number
This commit is contained in:
parent
54b5955a74
commit
2edc840037
3 changed files with 10 additions and 4 deletions
|
@ -2552,6 +2552,7 @@ void HU_drawPing(INT32 x, INT32 y, UINT32 lag, INT32 flags)
|
|||
|
||||
gfxnum = Ping_gfx_num(lag);
|
||||
|
||||
if (measureid == 1)
|
||||
V_DrawScaledPatch(x+11 - pingmeasure[measureid]->width, y+9, flags, pingmeasure[measureid]);
|
||||
V_DrawScaledPatch(x+2, y, flags, pinggfx[gfxnum]);
|
||||
|
||||
|
@ -2566,7 +2567,10 @@ void HU_drawPing(INT32 x, INT32 y, UINT32 lag, INT32 flags)
|
|||
lag = (INT32)(lag * (1000.00f / TICRATE));
|
||||
}
|
||||
|
||||
V_DrawPingNum(x+11 - pingmeasure[measureid]->width, y+9, flags, lag, colormap);
|
||||
x = V_DrawPingNum(x + (measureid == 1 ? 11 - pingmeasure[measureid]->width : 10), y+9, flags, lag, colormap);
|
||||
|
||||
if (measureid == 0)
|
||||
V_DrawScaledPatch(x+1 - pingmeasure[measureid]->width, y+9, flags, pingmeasure[measureid]);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -2028,7 +2028,7 @@ void V_DrawPaddedTallNum(INT32 x, INT32 y, INT32 flags, INT32 num, INT32 digits)
|
|||
// Draws a number using the PING font thingy.
|
||||
// TODO: Merge number drawing functions into one with "font name" selection.
|
||||
|
||||
void V_DrawPingNum(INT32 x, INT32 y, INT32 flags, INT32 num, const UINT8 *colormap)
|
||||
INT32 V_DrawPingNum(INT32 x, INT32 y, INT32 flags, INT32 num, const UINT8 *colormap)
|
||||
{
|
||||
INT32 w = SHORT(pingnum[0]->width); // this SHOULD always be 5 but I guess custom graphics exist.
|
||||
|
||||
|
@ -2045,6 +2045,8 @@ void V_DrawPingNum(INT32 x, INT32 y, INT32 flags, INT32 num, const UINT8 *colorm
|
|||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, flags, pingnum[num%10], colormap);
|
||||
num /= 10;
|
||||
} while (num);
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
// Write a string using the credit font
|
||||
|
|
|
@ -205,7 +205,7 @@ void V_DrawPaddedTallNum(INT32 x, INT32 y, INT32 flags, INT32 num, INT32 digits)
|
|||
|
||||
// Draw ping numbers. Used by the scoreboard and that one ping option. :P
|
||||
// This is a separate function because IMO lua should have access to it as well.
|
||||
void V_DrawPingNum(INT32 x, INT32 y, INT32 flags, INT32 num, const UINT8 *colormap);
|
||||
INT32 V_DrawPingNum(INT32 x, INT32 y, INT32 flags, INT32 num, const UINT8 *colormap);
|
||||
|
||||
// Find string width from lt_font chars
|
||||
INT32 V_LevelNameWidth(const char *string);
|
||||
|
|
Loading…
Reference in a new issue