mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-18 03:22:35 +00:00
Merge screen.c
This commit is contained in:
parent
7d5b0adc87
commit
23f6dc63d6
1 changed files with 9 additions and 34 deletions
43
src/screen.c
43
src/screen.c
|
|
@ -527,15 +527,11 @@ void SCR_DisplayTicRate(void)
|
|||
tic_t i;
|
||||
tic_t ontic = I_GetTime();
|
||||
tic_t totaltics = 0;
|
||||
<<<<<<< HEAD
|
||||
const UINT8 *ticcntcolor = NULL;
|
||||
=======
|
||||
INT32 ticcntcolor = 0;
|
||||
const INT32 h = vid.height-(8*vid.dupy);
|
||||
|
||||
if (gamestate == GS_NULL)
|
||||
return;
|
||||
>>>>>>> srb2/next
|
||||
|
||||
for (i = lasttic + 1; i < TICRATE+lasttic && i < ontic; ++i)
|
||||
fpsgraph[i % TICRATE] = false;
|
||||
|
|
@ -549,38 +545,25 @@ void SCR_DisplayTicRate(void)
|
|||
if (totaltics <= TICRATE/2) ticcntcolor = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_RASPBERRY, GTC_CACHE);
|
||||
else if (totaltics == TICRATE) ticcntcolor = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_MINT, GTC_CACHE);
|
||||
|
||||
<<<<<<< HEAD
|
||||
/*V_DrawString(vid.width-(24*vid.dupx), vid.height-(16*vid.dupy),
|
||||
V_YELLOWMAP|V_NOSCALESTART, "FPS");
|
||||
V_DrawString(vid.width-(40*vid.dupx), vid.height-( 8*vid.dupy),
|
||||
ticcntcolor|V_NOSCALESTART, va("%02d/%02u", totaltics, TICRATE));*/
|
||||
|
||||
// draw "FPS"
|
||||
V_DrawFixedPatch(306<<FRACBITS, 183<<FRACBITS, FRACUNIT, V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_HUDTRANS, framecounter, R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_YELLOW, GTC_CACHE));
|
||||
// draw total frame:
|
||||
V_DrawPingNum(318, 190, V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_HUDTRANS, TICRATE, ticcntcolor);
|
||||
// draw "/"
|
||||
V_DrawFixedPatch(306<<FRACBITS, 190<<FRACBITS, FRACUNIT, V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_HUDTRANS, frameslash, ticcntcolor);
|
||||
// draw our actual framerate
|
||||
V_DrawPingNum(306, 190, V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_HUDTRANS, totaltics, ticcntcolor);
|
||||
|
||||
=======
|
||||
if (cv_ticrate.value == 2) // compact counter
|
||||
V_DrawString(vid.width-(16*vid.dupx), h,
|
||||
ticcntcolor|V_NOSCALESTART|V_USERHUDTRANS, va("%02d", totaltics));
|
||||
else if (cv_ticrate.value == 1) // full counter
|
||||
{
|
||||
V_DrawString(vid.width-(72*vid.dupx), h,
|
||||
V_YELLOWMAP|V_NOSCALESTART|V_USERHUDTRANS, "FPS:");
|
||||
V_DrawString(vid.width-(40*vid.dupx), h,
|
||||
ticcntcolor|V_NOSCALESTART|V_USERHUDTRANS, va("%02d/%02u", totaltics, TICRATE));
|
||||
// draw "FPS"
|
||||
V_DrawFixedPatch(306<<FRACBITS, 183<<FRACBITS, FRACUNIT, V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_USERHUDTRANS, framecounter, R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_YELLOW, GTC_CACHE));
|
||||
// draw total frame:
|
||||
V_DrawPingNum(318, 190, V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_USERHUDTRANS, TICRATE, ticcntcolor);
|
||||
// draw "/"
|
||||
V_DrawFixedPatch(306<<FRACBITS, 190<<FRACBITS, FRACUNIT, V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_USERHUDTRANS, frameslash, ticcntcolor);
|
||||
// draw our actual framerate
|
||||
V_DrawPingNum(306, 190, V_SNAPTOBOTTOM|V_SNAPTORIGHT|V_USERHUDTRANS, totaltics, ticcntcolor);
|
||||
}
|
||||
>>>>>>> srb2/next
|
||||
|
||||
lasttic = ontic;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
// SCR_DisplayLocalPing
|
||||
// Used to draw the user's local ping next to the framerate for a quick check without having to hold TAB for instance. By default, it only shows up if your ping is too high and risks getting you kicked.
|
||||
|
||||
|
|
@ -591,14 +574,6 @@ void SCR_DisplayLocalPing(void)
|
|||
{
|
||||
INT32 dispy = cv_ticrate.value ? 160 : 181;
|
||||
HU_drawPing(307, dispy, ping, V_SNAPTORIGHT | V_SNAPTOBOTTOM | V_HUDTRANS);
|
||||
=======
|
||||
void SCR_DisplayLocalPing(void)
|
||||
{
|
||||
UINT32 ping = playerpingtable[consoleplayer]; // consoleplayer's ping is everyone's ping in a splitnetgame :P
|
||||
if (cv_showping.value == 1 || (cv_showping.value == 2 && servermaxping && ping > servermaxping)) // only show 2 (warning) if our ping is at a bad level
|
||||
{
|
||||
INT32 dispy = cv_ticrate.value ? 180 : 189;
|
||||
HU_drawPing(307, dispy, ping, true, V_SNAPTORIGHT | V_SNAPTOBOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue