mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
SW: Replace MAXLONG with INT32_MAX
git-svn-id: https://svn.eduke32.com/eduke32@8281 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f52a58d9ac
commit
125ec7ad2c
7 changed files with 21 additions and 21 deletions
|
@ -597,7 +597,7 @@ int AutoBreakWall(WALLp wallp, int hit_x, int hit_y, int hit_z, short ang, short
|
|||
// Check to see if it should break with current weapon type
|
||||
if (!CheckBreakToughness(break_info, type)) return FALSE;
|
||||
|
||||
if (hit_x != MAXLONG)
|
||||
if (hit_x != INT32_MAX)
|
||||
{
|
||||
vec3_t hit_pos = { hit_x, hit_y, hit_z };
|
||||
// need correct location for spawning shrap
|
||||
|
@ -811,7 +811,7 @@ int WallBreakPosition(short hit_wall, short *sectnum, int *x, int *y, int *z, sh
|
|||
updatesectorz(*x,*y,*z,sectnum);
|
||||
if (*sectnum < 0)
|
||||
{
|
||||
*x = MAXLONG; // don't spawn shrap, just change wall
|
||||
*x = INT32_MAX; // don't spawn shrap, just change wall
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -830,7 +830,7 @@ SWBOOL HitBreakWall(WALLp wp, int hit_x, int hit_y, int hit_z, short ang, short
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
//if (hit_x == MAXLONG)
|
||||
//if (hit_x == INT32_MAX)
|
||||
{
|
||||
short sectnum;
|
||||
WallBreakPosition(wp - wall, §num, &hit_x, &hit_y, &hit_z, &ang);
|
||||
|
|
|
@ -2269,7 +2269,7 @@ extern SWBOOL NightVision;
|
|||
int _PlayerSound(const char *file, int line, int num, int *x, int *y, int *z, Voc3D_Flags flags, PLAYERp pp);
|
||||
#define PlayerSound(num, x, y, z, flags, pp) _PlayerSound(__FILE__, __LINE__, (num), (x), (y), (z), (flags), (pp))
|
||||
|
||||
#define MAXSO (MAXLONG)
|
||||
#define MAXSO (INT32_MAX)
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
|
@ -47,7 +47,7 @@ DoSectorObjectSetScale(short match)
|
|||
|
||||
for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++)
|
||||
{
|
||||
if (sop->xmid == MAXLONG)
|
||||
if (sop->xmid == INT32_MAX)
|
||||
continue;
|
||||
|
||||
if (sop->match_event == match)
|
||||
|
@ -122,7 +122,7 @@ DoSOevent(short match, short state)
|
|||
|
||||
for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++)
|
||||
{
|
||||
if (sop->xmid == MAXLONG)
|
||||
if (sop->xmid == INT32_MAX)
|
||||
continue;
|
||||
|
||||
if (sop->match_event == match)
|
||||
|
|
|
@ -496,7 +496,7 @@ SectorSetup(void)
|
|||
SectorObject[ndx].Animator = NULL;
|
||||
SectorObject[ndx].controller = NULL;
|
||||
SectorObject[ndx].sp_child = NULL;
|
||||
SectorObject[ndx].xmid = MAXLONG;
|
||||
SectorObject[ndx].xmid = INT32_MAX;
|
||||
}
|
||||
|
||||
memset(SineWaveFloor, -1, sizeof(SineWaveFloor));
|
||||
|
@ -1451,7 +1451,7 @@ DoSectorObjectKillMatch(short match)
|
|||
|
||||
for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++)
|
||||
{
|
||||
if (sop->xmid == MAXLONG)
|
||||
if (sop->xmid == INT32_MAX)
|
||||
continue;
|
||||
|
||||
if (sop->match_event == match)
|
||||
|
@ -3419,7 +3419,7 @@ DoSector(void)
|
|||
for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++)
|
||||
{
|
||||
|
||||
if (sop->xmid == MAXLONG /*|| sop->xmid == MAXSO*/)
|
||||
if (sop->xmid == INT32_MAX /*|| sop->xmid == MAXSO*/)
|
||||
continue;
|
||||
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ SOSync(void)
|
|||
|
||||
for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++)
|
||||
{
|
||||
// if (sop->xmid == MAXLONG)
|
||||
// if (sop->xmid == INT32_MAX)
|
||||
// continue;
|
||||
|
||||
updatecrc(crc, (sop->xmid) & 255);
|
||||
|
|
|
@ -1428,7 +1428,7 @@ PostSetupSectorObject(void)
|
|||
|
||||
for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++)
|
||||
{
|
||||
if (sop->xmid == MAXLONG)
|
||||
if (sop->xmid == INT32_MAX)
|
||||
continue;
|
||||
FindMainSector(sop);
|
||||
}
|
||||
|
@ -1442,7 +1442,7 @@ PlayerOnObject(short sectnum_match)
|
|||
SECTOR_OBJECTp sop;
|
||||
|
||||
// place each sector object on the track
|
||||
//for (i = 0; (SectorObject[i].xmid != MAXLONG) && (i < MAX_SECTOR_OBJECTS); i++)
|
||||
//for (i = 0; (SectorObject[i].xmid != INT32_MAX) && (i < MAX_SECTOR_OBJECTS); i++)
|
||||
for (i = 0; (i < MAX_SECTOR_OBJECTS); i++)
|
||||
{
|
||||
sop = &SectorObject[i];
|
||||
|
@ -1477,7 +1477,7 @@ PlaceSectorObjectsOnTracks(void)
|
|||
TRACK_POINTp tpoint = NULL;
|
||||
short spnum, next_spnum;
|
||||
|
||||
if (sop->xmid == MAXLONG)
|
||||
if (sop->xmid == INT32_MAX)
|
||||
continue;
|
||||
|
||||
|
||||
|
@ -1693,14 +1693,14 @@ MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny)
|
|||
short i, nexti, rot_ang;
|
||||
SWBOOL PlayerMove = TRUE;
|
||||
|
||||
if (sop->xmid >= (int)MAXSO)
|
||||
if (sop->xmid >= MAXSO)
|
||||
PlayerMove = FALSE;
|
||||
|
||||
// move along little midpoint
|
||||
sop->xmid += BOUND_4PIX(nx);
|
||||
sop->ymid += BOUND_4PIX(ny);
|
||||
|
||||
if (sop->xmid >= (int)MAXSO)
|
||||
if (sop->xmid >= MAXSO)
|
||||
PlayerMove = FALSE;
|
||||
|
||||
// move child sprite along also
|
||||
|
@ -1882,7 +1882,7 @@ PlayerPart:
|
|||
|
||||
// Does not necessarily move with the sector so must accout for
|
||||
// moving across sectors
|
||||
if (sop->xmid < (int)MAXSO) // special case for operating SO's
|
||||
if (sop->xmid < MAXSO) // special case for operating SO's
|
||||
setspritez(sop->sp_num[i], (vec3_t *)sp);
|
||||
}
|
||||
|
||||
|
@ -1902,7 +1902,7 @@ PlayerPart:
|
|||
// update here AFTER sectors/player has been manipulated
|
||||
// prevents you from falling into map HOLEs created by moving
|
||||
// Sectors and sprites around.
|
||||
//if (sop->xmid < (int)MAXSO)
|
||||
//if (sop->xmid < MAXSO)
|
||||
COVERupdatesector(pp->posx, pp->posy, &pp->cursectnum);
|
||||
|
||||
// in case you are in a whirlpool
|
||||
|
@ -2077,7 +2077,7 @@ DetectSectorObject(SECTORp sectph)
|
|||
// move all points to nx,ny
|
||||
for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++)
|
||||
{
|
||||
if (sop->xmid == MAXLONG /*|| sop->xmid == MAXSO*/)
|
||||
if (sop->xmid == INT32_MAX /*|| sop->xmid == MAXSO*/)
|
||||
continue;
|
||||
|
||||
for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++)
|
||||
|
@ -2105,7 +2105,7 @@ DetectSectorObjectByWall(WALLp wph)
|
|||
// move all points to nx,ny
|
||||
for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++)
|
||||
{
|
||||
if (sop->xmid == MAXLONG /*|| sop->xmid == MAXSO*/)
|
||||
if (sop->xmid == INT32_MAX /*|| sop->xmid == MAXSO*/)
|
||||
continue;
|
||||
|
||||
for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++)
|
||||
|
|
|
@ -7762,10 +7762,10 @@ void TraverseBreakableWalls(short start_sect, int x, int y, int z, short ang, in
|
|||
|
||||
if (WallBreakPosition(j, §num, &hit_x, &hit_y, &hit_z, &wall_ang))
|
||||
{
|
||||
if (hit_x != MAXLONG && sectnum >= 0 && FAFcansee(x, y, z, start_sect, hit_x, hit_y, hit_z, sectnum))
|
||||
if (hit_x != INT32_MAX && sectnum >= 0 && FAFcansee(x, y, z, start_sect, hit_x, hit_y, hit_z, sectnum))
|
||||
{
|
||||
//HitBreakWall(&wall[j], x, y, z, ang, 0);
|
||||
HitBreakWall(&wall[j], MAXLONG, MAXLONG, MAXLONG, ang, 0);
|
||||
HitBreakWall(&wall[j], INT32_MAX, INT32_MAX, INT32_MAX, ang, 0);
|
||||
|
||||
break_count++;
|
||||
if (break_count > 4)
|
||||
|
|
Loading…
Reference in a new issue