summaryrefslogtreecommitdiff
path: root/src/am_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/am_map.c')
-rw-r--r--src/am_map.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/am_map.c b/src/am_map.c
index 46f6ebad..c78015d7 100644
--- a/src/am_map.c
+++ b/src/am_map.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: am_map.c 8 2005-07-23 16:44:57Z fraggle $
+// $Id: am_map.c 19 2005-07-23 19:17:11Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -23,6 +23,9 @@
//
//
// $Log$
+// Revision 1.3 2005/07/23 19:17:11 fraggle
+// Use ANSI-standard limit constants. Remove LINUX define.
+//
// Revision 1.2 2005/07/23 16:44:55 fraggle
// Update copyright to GNU GPL
//
@@ -34,7 +37,7 @@
//
//-----------------------------------------------------------------------------
-static const char rcsid[] = "$Id: am_map.c 8 2005-07-23 16:44:57Z fraggle $";
+static const char rcsid[] = "$Id: am_map.c 19 2005-07-23 19:17:11Z fraggle $";
#include <stdio.h>
@@ -327,9 +330,9 @@ AM_getIslope
dy = ml->a.y - ml->b.y;
dx = ml->b.x - ml->a.x;
- if (!dy) is->islp = (dx<0?-MAXINT:MAXINT);
+ if (!dy) is->islp = (dx<0?-INT_MAX:INT_MAX);
else is->islp = FixedDiv(dx, dy);
- if (!dx) is->slp = (dy<0?-MAXINT:MAXINT);
+ if (!dx) is->slp = (dy<0?-INT_MAX:INT_MAX);
else is->slp = FixedDiv(dy, dx);
}
@@ -405,8 +408,8 @@ void AM_findMinMaxBoundaries(void)
fixed_t a;
fixed_t b;
- min_x = min_y = MAXINT;
- max_x = max_y = -MAXINT;
+ min_x = min_y = INT_MAX;
+ max_x = max_y = -INT_MAX;
for (i=0;i<numvertexes;i++)
{
@@ -444,7 +447,7 @@ void AM_changeWindowLoc(void)
if (m_paninc.x || m_paninc.y)
{
followplayer = 0;
- f_oldloc.x = MAXINT;
+ f_oldloc.x = INT_MAX;
}
m_x += m_paninc.x;
@@ -476,7 +479,7 @@ void AM_initVariables(void)
automapactive = true;
fb = screens[0];
- f_oldloc.x = MAXINT;
+ f_oldloc.x = INT_MAX;
amclock = 0;
lightlev = 0;
@@ -691,7 +694,7 @@ AM_Responder
break;
case AM_FOLLOWKEY:
followplayer = !followplayer;
- f_oldloc.x = MAXINT;
+ f_oldloc.x = INT_MAX;
plr->message = followplayer ? AMSTR_FOLLOWON : AMSTR_FOLLOWOFF;
break;
case AM_GRIDKEY: