ditch fmin/fmax and use plain q_min/q_max

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@922 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2014-06-22 05:50:39 +00:00
parent 66d6fc077a
commit 65cd7e75e0
3 changed files with 5 additions and 8 deletions

View file

@ -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 */

View file

@ -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),

View file

@ -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