Even more conversion, lots of superfluous macro removal
This commit is contained in:
+4
-4
@@ -46,7 +46,7 @@ static qpic_t *sb_face_quad;
|
||||
static qpic_t *sb_face_invuln;
|
||||
static qpic_t *sb_face_invis_invuln;
|
||||
|
||||
static qboolean sb_showscores;
|
||||
static bool sb_showscores;
|
||||
|
||||
int sb_lines; // scan lines to draw
|
||||
|
||||
@@ -322,7 +322,7 @@ void Sbar_DrawScrollString (int x, int y, int width, const char *str)
|
||||
float scale;
|
||||
int len, ofs, left;
|
||||
|
||||
scale = CLAMP (1.0f, scr_sbarscale.value, (float)glwidth / 320.0f);
|
||||
scale = std::clamp(scr_sbarscale.value, 1.0f, (float)glwidth / 320.0f);
|
||||
left = x * scale;
|
||||
if (cl.gametype != GAME_DEATHMATCH)
|
||||
left += (((float)glwidth - 320.0 * scale) / 2);
|
||||
@@ -911,7 +911,7 @@ void Sbar_Draw (void)
|
||||
GL_SetCanvas (CANVAS_DEFAULT); //johnfitz
|
||||
|
||||
//johnfitz -- don't waste fillrate by clearing the area behind the sbar
|
||||
w = CLAMP (320.0f, scr_sbarscale.value * 320.0f, (float)glwidth);
|
||||
w = std::clamp(scr_sbarscale.value * 320.0f, 320.0f, (float)glwidth);
|
||||
if (sb_lines && glwidth > w)
|
||||
{
|
||||
if (scr_sbaralpha.value < 1)
|
||||
@@ -1210,7 +1210,7 @@ void Sbar_MiniDeathmatchOverlay (void)
|
||||
float scale; //johnfitz
|
||||
scoreboard_t *s;
|
||||
|
||||
scale = CLAMP (1.0f, scr_sbarscale.value, (float)glwidth / 320.0f); //johnfitz
|
||||
scale = std::clamp(scr_sbarscale.value, 1.0f, (float)glwidth / 320.0f); //johnfitz
|
||||
|
||||
//MAX_SCOREBOARDNAME = 32, so total width for this overlay plus sbar is 632, but we can cut off some i guess
|
||||
if (glwidth/scale < 512 || scr_viewsize.value >= 120) //johnfitz -- test should consider scr_sbarscale
|
||||
|
||||
Reference in New Issue
Block a user