tiny cleanup SCR_DisplayTicRate
This commit is contained in:
1 parent
8d9c6ec65f
commit
9e070a6516
1 file changed
+10
-8
+10
-8
@@ -443,22 +443,20 @@ void SCR_CalculateFPS(void)
|
||||
|
||||
void SCR_DisplayTicRate(void)
|
||||
{
|
||||
const UINT8 *ticcntcolor = NULL;
|
||||
UINT32 cap = R_GetFramerateCap();
|
||||
UINT32 benchmark = (cap == 0) ? I_GetRefreshRate() : cap;
|
||||
INT32 x = 318;
|
||||
double fps = round(averageFPS);
|
||||
INT32 fpsflags = V_LocalTransFlag()|V_SNAPTOBOTTOM|V_SNAPTORIGHT;
|
||||
const char *fps_string;
|
||||
|
||||
INT32 ticcntcolor2 = 0;
|
||||
|
||||
|
||||
if (gamestate == GS_NULL)
|
||||
return;
|
||||
|
||||
// new kart counter
|
||||
if (cv_ticrate.value == 1 || cv_ticrate.value == 2)
|
||||
{
|
||||
const UINT8 *ticcntcolor = NULL;
|
||||
INT32 x = 318;
|
||||
|
||||
// draw "FPS"
|
||||
if (cv_ticrate.value == 1)
|
||||
V_DrawFixedPatch(306<<FRACBITS, 183<<FRACBITS, FRACUNIT, fpsflags, framecounter, R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_YELLOW, GTC_CACHE));
|
||||
@@ -493,6 +491,9 @@ void SCR_DisplayTicRate(void)
|
||||
}
|
||||
else if (cv_ticrate.value == 3 || cv_ticrate.value == 4) // kart v1.0/srb2 counter
|
||||
{
|
||||
const char *fps_string;
|
||||
INT32 ticcntcolor2 = 0;
|
||||
|
||||
if (fps > (benchmark - 5))
|
||||
ticcntcolor2 = V_GREENMAP;
|
||||
else if (fps < 20)
|
||||
@@ -502,7 +503,8 @@ void SCR_DisplayTicRate(void)
|
||||
fps_string = va("%d/%d\x82", (INT32)fps, cap);
|
||||
else
|
||||
fps_string = va("%d\x82", (INT32)fps);
|
||||
|
||||
|
||||
// draw "FPS"
|
||||
if (cv_ticrate.value == 3)
|
||||
V_DrawRightAlignedString(319, 181, V_YELLOWMAP|fpsflags, "FPS");
|
||||
|
||||
@@ -518,7 +520,7 @@ void SCR_DisplayLocalPing(void)
|
||||
UINT32 ping = playerpingtable[consoleplayer];
|
||||
INT32 pingflags = V_LocalTransFlag()|V_SNAPTOBOTTOM|V_SNAPTORIGHT;
|
||||
|
||||
if (cv_showping.value == 1 || (cv_showping.value == 2 && ping > servermaxping)) // only show 2 (warning) if our ping is at a bad level
|
||||
if (cv_showping.value == 1 || (cv_showping.value == 2 && ping > servermaxping)) // only show 2 (warning) if our ping is at a bad level
|
||||
{
|
||||
INT32 dispy = (cv_ticrate.value == 1) ? 165 : ((cv_ticrate.value == 2 || cv_ticrate.value == 4) ? 172 : ((cv_ticrate.value == 3) ? 163 : 181)); // absolute buttpain
|
||||
|
||||
|
||||
Reference in new issue
Block a user