diff --git a/Quake/common.h b/Quake/common.h index 97c89554..b834c6f2 100644 --- a/Quake/common.h +++ b/Quake/common.h @@ -35,9 +35,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # pragma warning(disable:4267) /* 'var' : conversion from 'size_t' to 'type', possible loss of data (/Wp64 warning) */ -/* MSC doesn't have fmin() / fmax(), use the min/max macros: */ -#define fmax q_max -#define fmin q_min #endif /* _MSC_VER */ #endif /* _WIN32 */ diff --git a/Quake/gl_fog.c b/Quake/gl_fog.c index 503cca1d..7073559d 100644 --- a/Quake/gl_fog.c +++ b/Quake/gl_fog.c @@ -146,14 +146,14 @@ void Fog_FogCommand_f (void) 0.0); break; case 5: - Fog_Update(fmax(0.0, atof(Cmd_Argv(1))), + Fog_Update(q_max(0.0, atof(Cmd_Argv(1))), CLAMP(0.0, atof(Cmd_Argv(2)), 1.0), CLAMP(0.0, atof(Cmd_Argv(3)), 1.0), CLAMP(0.0, atof(Cmd_Argv(4)), 1.0), 0.0); break; case 6: //TEST - Fog_Update(fmax(0.0, atof(Cmd_Argv(1))), + Fog_Update(q_max(0.0, atof(Cmd_Argv(1))), CLAMP(0.0, atof(Cmd_Argv(2)), 1.0), CLAMP(0.0, atof(Cmd_Argv(3)), 1.0), CLAMP(0.0, atof(Cmd_Argv(4)), 1.0), diff --git a/Quake/gl_screen.c b/Quake/gl_screen.c index 4d0ed4d9..f7c7f580 100644 --- a/Quake/gl_screen.c +++ b/Quake/gl_screen.c @@ -311,12 +311,12 @@ static void SCR_CalcRefdef (void) else sb_lines = 48 * scale; - size = fmin(scr_viewsize.value, 100) / 100; + size = q_min(scr_viewsize.value, 100) / 100; //johnfitz //johnfitz -- rewrote this section - r_refdef.vrect.width = fmax(glwidth * size, 96); //no smaller than 96, for icons - r_refdef.vrect.height = fmin(glheight * size, glheight - sb_lines); //make room for sbar + r_refdef.vrect.width = q_max(glwidth * size, 96); //no smaller than 96, for icons + r_refdef.vrect.height = q_min(glheight * size, glheight - sb_lines); //make room for sbar r_refdef.vrect.x = (glwidth - r_refdef.vrect.width)/2; r_refdef.vrect.y = (glheight - sb_lines - r_refdef.vrect.height)/2; //johnfitz