Even more conversion, lots of superfluous macro removal

This commit is contained in:
iikorni
2026-08-29 23:14:23 -05:00
parent 70e5c02355
commit de75b014b3
102 changed files with 7060 additions and 8179 deletions
+9 -9
View File
@@ -49,9 +49,9 @@ static vec3_t shadevector;
static float entalpha; //johnfitz
static qboolean overbright; //johnfitz
static bool overbright; //johnfitz
static qboolean shading = true; //johnfitz -- if false, disable vertex shading for various reasons (fullbright, r_lightmap, showtris, etc)
static bool shading = true; //johnfitz -- if false, disable vertex shading for various reasons (fullbright, r_lightmap, showtris, etc)
//johnfitz -- struct for passing lerp information to drawing functions
typedef struct {
@@ -192,7 +192,7 @@ void GLAlias_CreateShaders (void)
if (!gl_glsl_alias_able)
return;
r_alias_program = GL_CreateProgram (vertSource, fragSource, Q_COUNTOF(bindings), bindings);
r_alias_program = GL_CreateProgram (vertSource, fragSource, std::size(bindings), bindings);
if (r_alias_program != 0)
{
@@ -302,7 +302,7 @@ void GL_DrawAliasFrame (aliashdr_t *paliashdr, lerpdata_t lerpdata)
int count;
float u,v;
float blend, iblend;
qboolean lerping;
bool lerping;
if (lerpdata.pose1 != lerpdata.pose2)
{
@@ -455,9 +455,9 @@ void R_SetupAliasFrame (aliashdr_t *paliashdr, int frame, lerpdata_t *lerpdata)
if (r_lerpmodels.value && !(e->model->flags & MOD_NOLERP && r_lerpmodels.value != 2))
{
if (e->lerpflags & LERP_FINISH && numposes == 1)
lerpdata->blend = CLAMP (0.0f, (float)(cl.time - e->lerpstart) / (e->lerpfinish - e->lerpstart), 1.0f);
lerpdata->blend = std::clamp((float)(cl.time - e->lerpstart) / (e->lerpfinish - e->lerpstart), 0.0f, 1.0f);
else
lerpdata->blend = CLAMP (0.0f, (float)(cl.time - e->lerpstart) / e->lerptime, 1.0f);
lerpdata->blend = std::clamp((float)(cl.time - e->lerpstart) / e->lerptime, 0.0f, 1.0f);
if (lerpdata->blend == 1.0f)
e->previouspose = e->currentpose;
lerpdata->pose1 = e->previouspose;
@@ -505,9 +505,9 @@ void R_SetupEntityTransform (entity_t *e, lerpdata_t *lerpdata)
if (r_lerpmove.value && e != &cl.viewent && e->lerpflags & LERP_MOVESTEP)
{
if (e->lerpflags & LERP_FINISH)
blend = CLAMP (0.0f, (float)(cl.time - e->movelerpstart) / (e->lerpfinish - e->movelerpstart), 1.0f);
blend = std::clamp((float)(cl.time - e->movelerpstart) / (e->lerpfinish - e->movelerpstart), 0.0f, 1.0f);
else
blend = CLAMP (0.0f, (float)(cl.time - e->movelerpstart) / 0.1f, 1.0f);
blend = std::clamp((float)(cl.time - e->movelerpstart) / 0.1f, 0.0f, 1.0f);
//translation
VectorSubtract (e->currentorigin, e->previousorigin, d);
@@ -636,7 +636,7 @@ void R_DrawAliasModel (entity_t *e)
int anim, skinnum;
gltexture_t *tx, *fb;
lerpdata_t lerpdata;
qboolean alphatest = !!(e->model->flags & MF_HOLEY);
bool alphatest = !!(e->model->flags & MF_HOLEY);
float fovscale = 1.0f;
//