reduce scope of those

makes it look slightly neater
This commit is contained in:
Alug committed 2025-01-30 10:29:05 +01:00
1 parent bc1f21961c
commit 1e972cbb65
2 files changed
+11 -10

No files matched your search

+10 -8
View File
@@ -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]; // consoleplayer's ping is everyone's ping in a splitnetgame :P
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
+1 -2
View File
@@ -314,7 +314,7 @@ static void Y_AnimatedVoteScreenCheck(void)
currentAnimFrame = 0;
INT32 i = 1;
while(!stopSearching)
while (!stopSearching)
{
boolean normalLumpExists = W_LumpExists(va("%sC%d", tmpPrefix, i));
boolean wideLumpExists = W_LumpExists(va("%sW%d", tmpPrefix, i));
@@ -414,7 +414,6 @@ static void Y_PlayerStandingsDrawer(y_data_t *standings, INT32 x, INT32 hilicol)
else
faceprefix = (cv_highresportrait.value ? localfacewantprefix[skinnum] : localfacerankprefix[skinnum]);
if (cv_highresportrait.value)
V_DrawSmallMappedPatch(x + 16, y - 4, 0, faceprefix, colormap);
else