- globally search and replaced TRUE and FALSE in SW.

There were a handful of warnings afterward which were also addressed.
The SWBOOL type has not been handled yet.
This commit is contained in:
Christoph Oelckers 2020-09-09 19:52:52 +02:00
parent b2272bd377
commit 1a647e8104
46 changed files with 1276 additions and 1286 deletions

View file

@ -269,14 +269,4 @@ void bfirst_search_try(T *const list, uint8_t *const bitmap, T *const eltnumptr,
/* End dependence on compat.o object. */
////////// EDuke32-specific features //////////
#ifndef TRUE
# define TRUE 1
#endif
#ifndef FALSE
# define FALSE 0
#endif
#endif // compat_h_

View file

@ -334,7 +334,7 @@ DoActorSectorDamage(short SpriteNum)
SECTORp sectp = &sector[sp->sectnum];
if (u->Health <= 0)
return FALSE;
return false;
if (sectu && sectu->damage)
{
@ -349,7 +349,7 @@ DoActorSectorDamage(short SpriteNum)
{
UpdateSinglePlayKills(SpriteNum);
DoActorDie(SpriteNum, WPN_NM_LAVA);
return TRUE;
return true;
}
}
}
@ -364,7 +364,7 @@ DoActorSectorDamage(short SpriteNum)
{
UpdateSinglePlayKills(SpriteNum);
DoActorDie(SpriteNum, WPN_NM_LAVA);
return TRUE;
return true;
}
}
}
@ -382,14 +382,14 @@ DoActorSectorDamage(short SpriteNum)
}
else
{
ASSERT(TRUE == FALSE);
ASSERT(true == false);
//DoActorDie(SpriteNum, WPN_NM_SECTOR_SQUISH);
}
return TRUE;
return true;
}
return FALSE;
return false;
}
@ -641,7 +641,7 @@ DoActorSlide(short SpriteNum)
if (!move_actor(SpriteNum, nx, ny, 0L))
{
RESET(u->Flags, SPR_SLIDING);
return FALSE;
return false;
}
u->slide_vel -= u->slide_dec * ACTORMOVETICS;
@ -651,7 +651,7 @@ DoActorSlide(short SpriteNum)
RESET(u->Flags, SPR_SLIDING);
}
return TRUE;
return true;
}
// !AIC - Actor jumping and falling

View file

@ -118,7 +118,7 @@ SWBOOL ActorMoveHitReact(short SpriteNum)
{
USERp u = User[SpriteNum];
// Should only return TRUE if there is a reaction to what was hit that
// Should only return true if there is a reaction to what was hit that
// would cause the calling function to abort
switch (TEST(u->ret, HIT_MASK))
@ -140,7 +140,7 @@ SWBOOL ActorMoveHitReact(short SpriteNum)
if (action)
{
(*action)(SpriteNum);
return TRUE;
return true;
}
}
break;
@ -157,7 +157,7 @@ SWBOOL ActorMoveHitReact(short SpriteNum)
}
}
return FALSE;
return false;
}
@ -177,10 +177,10 @@ SWBOOL ActorFlaming(short SpriteNum)
MONO_PRINT(ds);
if (SPRITEp_SIZE_Z(fp) > size)
return TRUE;
return true;
}
return FALSE;
return false;
}
void
@ -217,7 +217,7 @@ ChooseAction(DECISION decision[])
// !JIM! Here is an opportunity for some AI, instead of randomness!
random_value = RANDOM_P2(1024<<5)>>5;
for (i = 0; TRUE; i++)
for (i = 0; true; i++)
{
ASSERT(i < 10);
@ -240,7 +240,7 @@ ChooseActionNumber(short decision[])
random_value = RANDOM_P2(1024<<5)>>5;
for (i = 0; TRUE; i++)
for (i = 0; true; i++)
{
if (random_value <= decision[i])
{
@ -318,12 +318,12 @@ CanSeePlayer(short SpriteNum)
int look_height = SPRITEp_TOS(sp);
//if (FAF_Sector(sp->sectnum))
// return(TRUE);
// return(true);
if (u->tgt_sp && FAFcansee(sp->x, sp->y, look_height, sp->sectnum, u->tgt_sp->x, u->tgt_sp->y, SPRITEp_UPPER(u->tgt_sp), u->tgt_sp->sectnum))
return TRUE;
return true;
else
return FALSE;
return false;
}
int
@ -333,12 +333,12 @@ CanHitPlayer(short SpriteNum)
SPRITEp sp = User[SpriteNum]->SpriteP, hp;
hitdata_t hitinfo;
int xvect,yvect,zvect;
short ang,ret=FALSE;
short ang,ret=false;
// if actor can still see the player
int zhs, zhh;
//if (FAF_Sector(sp->sectnum))
// return(TRUE);
// return(true);
zhs = sp->z - DIV2(SPRITEp_SIZE_Z(sp));
@ -358,13 +358,13 @@ CanHitPlayer(short SpriteNum)
else if (hp->y - sp->y != 0)
zvect = yvect * ((zhh - zhs)/(hp->y - sp->y));
else
return FALSE;
return false;
// so actors won't shoot straight up at you
// need to be a bit of a distance away
// before they have a valid shot
// if (labs(zvect / FindDistance2D(hp->x - sp->x, hp->y - sp->y)) > 200)
// return(FALSE);
// return(false);
FAFhitscan(sp->x, sp->y, zhs, sp->sectnum,
xvect,
@ -373,15 +373,15 @@ CanHitPlayer(short SpriteNum)
&hitinfo, CLIPMASK_MISSILE);
if (hitinfo.sect < 0)
return FALSE;
return false;
if (hitinfo.sprite == u->tgt_sp - sprite)
return TRUE;
return true;
////DSPRINTF(ds,"CanHit %s",ret ? "TRUE" : "FALSE");
////DSPRINTF(ds,"CanHit %s",ret ? "true" : "false");
//MONO_PRINT(ds);
return FALSE;
return false;
}
/*
@ -399,7 +399,7 @@ DoActorPickClosePlayer(short SpriteNum)
PLAYERp pp;
// if actor can still see the player
int look_height = SPRITEp_TOS(sp);
SWBOOL found = FALSE;
SWBOOL found = false;
int i,nexti;
if (u->ID == ZOMBIE_RUN_R0 && gNet.MultiGameType == MULTI_GAME_COOPERATIVE)
@ -454,7 +454,7 @@ DoActorPickClosePlayer(short SpriteNum)
// see if you can find someone close that you can SEE
near_dist = MAX_ACTIVE_RANGE;
found = FALSE;
found = false;
TRAVERSE_CONNECT(pnum)
{
pp = &Player[pnum];
@ -480,7 +480,7 @@ DoActorPickClosePlayer(short SpriteNum)
{
near_dist = dist;
u->tgt_sp = pp->SpriteP;
found = TRUE;
found = true;
}
}
@ -553,13 +553,13 @@ int DoActorOperate(short SpriteNum)
unsigned int i;
if (u->ID == HORNET_RUN_R0 || u->ID == EEL_RUN_R0 || u->ID == BUNNY_RUN_R0)
return FALSE;
return false;
if (u->Rot == u->ActorActionSet->Sit || u->Rot == u->ActorActionSet->Stand)
return FALSE;
return false;
if ((u->WaitTics -= ACTORMOVETICS) > 0)
return FALSE;
return false;
//DSPRINTF(ds,"sp->x = %ld, sp->y = %ld, sp->sector = %d, tp->x = %ld, tp->y = %ld, tp->ang = %d\n",sp->x,sp->y,sp->sectnum,tpoint->x,tpoint->y,tpoint->ang);
//MONO_PRINT(ds);
@ -579,7 +579,7 @@ int DoActorOperate(short SpriteNum)
#if 0 // Actors don't hit switches on a whim
if (nearsprite >= 0 && nearhitdist < 1024)
{
if (OperateSprite(nearsprite, FALSE))
if (OperateSprite(nearsprite, false))
{
u->WaitTics = 2 * 120;
@ -592,7 +592,7 @@ int DoActorOperate(short SpriteNum)
if (nearsector >= 0 && nearhitdist < 1024)
{
if (OperateSector(nearsector, FALSE))
if (OperateSector(nearsector, false))
{
u->WaitTics = 2 * 120;
@ -602,14 +602,14 @@ int DoActorOperate(short SpriteNum)
if (nearwall >= 0 && nearhitdist < 1024)
{
if (OperateWall(nearwall, FALSE))
if (OperateWall(nearwall, false))
{
u->WaitTics = 2 * 120;
NewStateGroup(SpriteNum, u->ActorActionSet->Stand);
}
}
return TRUE;
return true;
}
@ -639,7 +639,7 @@ DoActorActionDecide(short SpriteNum)
int dist;
ANIMATORp action;
USERp pu=NULL;
SWBOOL ICanSee=FALSE;
SWBOOL ICanSee=false;
// REMINDER: This function is not even called if SpriteControl doesn't let
// it get called
@ -794,7 +794,7 @@ DoActorActionDecide(short SpriteNum)
if (!u->DidAlert && ICanSee)
{
DoActorNoise(InitActorAlertNoise, SpriteNum);
u->DidAlert = TRUE;
u->DidAlert = true;
}
return action;

View file

@ -590,11 +590,11 @@ int AutoBreakWall(WALLp wallp, int hit_x, int hit_y, int hit_z, short ang, short
if (!break_info)
{
return FALSE;
return false;
}
// Check to see if it should break with current weapon type
if (!CheckBreakToughness(break_info, type)) return FALSE;
if (!CheckBreakToughness(break_info, type)) return false;
if (hit_x != INT32_MAX)
{
@ -657,7 +657,7 @@ int AutoBreakWall(WALLp wallp, int hit_x, int hit_y, int hit_z, short ang, short
}
return TRUE;
return true;
}
SWBOOL UserBreakWall(WALLp wp, short)
@ -668,7 +668,7 @@ SWBOOL UserBreakWall(WALLp wp, short)
int block_flags = CSTAT_WALL_BLOCK|CSTAT_WALL_BLOCK_HITSCAN;
int type_flags = CSTAT_WALL_TRANSLUCENT|CSTAT_WALL_MASKED|CSTAT_WALL_1WAY;
int flags = block_flags|type_flags;
short ret = FALSE;
short ret = false;
SpriteNum = FindBreakSpriteMatch(match);
@ -684,13 +684,13 @@ SWBOOL UserBreakWall(WALLp wp, short)
wp->hitag = wp->lotag = 0;
if (wp->nextwall >= 0)
wall[wp->nextwall].hitag = wall[wp->nextwall].lotag = 0;
return TRUE;
return true;
}
sp = &sprite[SpriteNum];
if (wp->picnum == SP_TAG5(sp))
return TRUE;
return true;
// make it BROKEN
if (SP_TAG7(sp) <= 1)
@ -705,7 +705,7 @@ SWBOOL UserBreakWall(WALLp wp, short)
wp->hitag = wp->lotag = 0;
if (wp->nextwall >= 0)
wall[wp->nextwall].hitag = wall[wp->nextwall].lotag = 0;
ret = FALSE;
ret = false;
}
else if (SP_TAG8(sp) == 1)
{
@ -718,7 +718,7 @@ SWBOOL UserBreakWall(WALLp wp, short)
if (wp->nextwall >= 0)
wall[wp->nextwall].hitag = wall[wp->nextwall].lotag = 0;
ret = TRUE;
ret = true;
}
else if (SP_TAG8(sp) == 2)
{
@ -735,7 +735,7 @@ SWBOOL UserBreakWall(WALLp wp, short)
if (wp->nextwall >= 0)
wall[wp->nextwall].hitag = wall[wp->nextwall].lotag = 0;
ret = FALSE;
ret = false;
}
return ret;
@ -748,7 +748,7 @@ SWBOOL UserBreakWall(WALLp wp, short)
DoSpawnSpotsForDamage(match);
}
return FALSE;
return false;
}
int WallBreakPosition(short hit_wall, short *sectnum, int *x, int *y, int *z, short *ang)
@ -810,10 +810,10 @@ int WallBreakPosition(short hit_wall, short *sectnum, int *x, int *y, int *z, sh
if (*sectnum < 0)
{
*x = INT32_MAX; // don't spawn shrap, just change wall
return FALSE;
return false;
}
return TRUE;
return true;
}
// If the tough parameter is not set, then it can't break tough walls and sprites
@ -824,7 +824,7 @@ SWBOOL HitBreakWall(WALLp wp, int hit_x, int hit_y, int hit_z, short ang, short
if (match > 0)
{
UserBreakWall(wp, ang);
return TRUE;
return true;
}
//if (hit_x == INT32_MAX)
@ -834,7 +834,7 @@ SWBOOL HitBreakWall(WALLp wp, int hit_x, int hit_y, int hit_z, short ang, short
}
AutoBreakWall(wp, hit_x, hit_y, hit_z, ang, type);
return TRUE;
return true;
}
//
@ -891,14 +891,14 @@ int UserBreakSprite(short BreakSprite)
DeleteNoSoundOwner(BreakSprite);
//change_sprite_stat(BreakSprite, STAT_SUICIDE);
KillBreakSprite(BreakSprite);
return TRUE;
return true;
}
sp = &sprite[SpriteNum];
match_extra = SP_TAG6(bp);
if (bp->picnum == SP_TAG5(sp))
return TRUE;
return true;
// make it BROKEN
if (SP_TAG7(sp) <= 1)
@ -921,7 +921,7 @@ int UserBreakSprite(short BreakSprite)
KillBreakSprite(BreakSprite);
//KillSprite(BreakSprite);
//change_sprite_stat(BreakSprite, STAT_SUICIDE);
return TRUE;
return true;
}
else if (SP_TAG8(sp) == 2)
// leave it
@ -946,7 +946,7 @@ int UserBreakSprite(short BreakSprite)
DoSpawnSpotsForDamage(match_extra);
}
return FALSE;
return false;
}
int AutoBreakSprite(short BreakSprite, short type)
@ -965,7 +965,7 @@ int AutoBreakSprite(short BreakSprite, short type)
{
//DSPRINTF(ds,"Break Info not found - sprite %d", bp - sprite);
MONO_PRINT(ds);
return FALSE;
return false;
}
// Check to see if it should break with current weapon type
@ -988,7 +988,7 @@ int AutoBreakSprite(short BreakSprite, short type)
RESET(bp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
}
return FALSE;
return false;
}
RESET(bp->extra, SPRX_BREAKABLE);
@ -1012,7 +1012,7 @@ int AutoBreakSprite(short BreakSprite, short type)
KillBreakSprite(BreakSprite);
//change_sprite_stat(BreakSprite, STAT_SUICIDE);
//KillSprite(BreakSprite);
return TRUE;
return true;
}
else
{
@ -1021,7 +1021,7 @@ int AutoBreakSprite(short BreakSprite, short type)
RESET(bp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
}
return FALSE;
return false;
}
SWBOOL NullActor(USERp u)
@ -1030,17 +1030,17 @@ SWBOOL NullActor(USERp u)
// check to see if attached to SO
if (TEST(u->Flags, SPR_SO_ATTACHED))
return TRUE;
return true;
// does not have a STATE or FUNC to control it
if (!u->State)
return TRUE;
return true;
// does not have a STATE or FUNC to control it
if (!u->ActorActionFunc)
return TRUE;
return true;
return FALSE;
return false;
}
int HitBreakSprite(short BreakSprite, short type)
@ -1051,12 +1051,12 @@ int HitBreakSprite(short BreakSprite, short type)
//SPRITEp sp;
// ignore as a breakable if true
//if (sp->lotag == TAG_SPRITE_HIT_MATCH)
// return(FALSE);
// return(false);
if (TEST_BOOL1(bp))
{
if (TEST_BOOL2(bp))
return FALSE;
return false;
return UserBreakSprite(BreakSprite);
}
@ -1069,7 +1069,7 @@ int HitBreakSprite(short BreakSprite, short type)
SpawnShrap(BreakSprite, -1);
RESET(bp->extra, SPRX_BREAKABLE);
return FALSE;
return false;
}
return AutoBreakSprite(BreakSprite,type);

View file

@ -832,7 +832,7 @@ PickBunnyJumpSpeed(short SpriteNum, int pix_height)
u->jump_speed = -600;
u->jump_grav = 8;
while (TRUE)
while (true)
{
if (GetBunnyJumpHeight(u->jump_speed, u->jump_grav) > pix_height + 20)
break;
@ -931,7 +931,7 @@ DoPickCloseBunny(short SpriteNum)
// if actor can still see the player
int look_height = SPRITEp_TOS(sp);
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_ENEMY], i, nexti)
{
@ -965,7 +965,7 @@ DoBunnyQuickJump(short SpriteNum)
SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum];
if (u->spal != PALETTE_PLAYER8) return FALSE;
if (u->spal != PALETTE_PLAYER8) return false;
if (!u->lo_sp && u->spal == PALETTE_PLAYER8 && MoveSkip4)
DoPickCloseBunny(SpriteNum);
@ -977,12 +977,12 @@ DoBunnyQuickJump(short SpriteNum)
SPRITEp tsp = u->lo_sp;
USERp tu = User[hit_sprite];
if (!tu || tu->ID != BUNNY_RUN_R0) return FALSE;
if (!tu || tu->ID != BUNNY_RUN_R0) return false;
// Not mature enough yet
if (sp->xrepeat != 64 || sp->yrepeat != 64) return FALSE;
if (tsp->xrepeat != 64 || tsp->yrepeat != 64) return FALSE;
if (sp->xrepeat != 64 || sp->yrepeat != 64) return false;
if (tsp->xrepeat != 64 || tsp->yrepeat != 64) return false;
// Kill a rival
// Only males fight
@ -995,7 +995,7 @@ DoBunnyQuickJump(short SpriteNum)
tu->Health = 0;
// Blood fountains
InitBloodSpray(hit_sprite,TRUE,-1);
InitBloodSpray(hit_sprite,true,-1);
if (SpawnShrap(hit_sprite, SpriteNum))
{
@ -1007,7 +1007,7 @@ DoBunnyQuickJump(short SpriteNum)
Bunny_Count--; // Bunny died
u->lo_sp = NULL;
return TRUE;
return true;
}
}
}
@ -1020,11 +1020,11 @@ DoBunnyQuickJump(short SpriteNum)
USERp tu = User[hit_sprite];
if (!tu || tu->ID != BUNNY_RUN_R0) return FALSE;
if (!tu || tu->ID != BUNNY_RUN_R0) return false;
// Not mature enough to mate yet
if (sp->xrepeat != 64 || sp->yrepeat != 64) return FALSE;
if (tsp->xrepeat != 64 || tsp->yrepeat != 64) return FALSE;
if (sp->xrepeat != 64 || sp->yrepeat != 64) return false;
if (tsp->xrepeat != 64 || tsp->yrepeat != 64) return false;
if (tu->ShellNum <= 0 && tu->WaitTics <= 0 && u->WaitTics <= 0)
{
@ -1032,7 +1032,7 @@ DoBunnyQuickJump(short SpriteNum)
{
PLAYERp pp = NULL;
if (RANDOM_RANGE(1000) < 995 && tu->spal != PALETTE_PLAYER0) return FALSE;
if (RANDOM_RANGE(1000) < 995 && tu->spal != PALETTE_PLAYER0) return false;
DoActorPickClosePlayer(SpriteNum);
@ -1041,7 +1041,7 @@ DoBunnyQuickJump(short SpriteNum)
if (tu->spal != PALETTE_PLAYER0)
{
if (tu->Flag1 > 0) return FALSE;
if (tu->Flag1 > 0) return false;
tu->FlagOwner = 1; // FAG!
tu->Flag1 = SEC(10);
if (pp)
@ -1091,12 +1091,12 @@ DoBunnyQuickJump(short SpriteNum)
SET(tsp->cstat, CSTAT_SPRITE_INVISIBLE); // Turn em' invisible
}
u->WaitTics = tu->WaitTics = SEC(10); // Mate for this long
return TRUE;
return true;
}
}
}
return FALSE;
return false;
}
@ -1215,7 +1215,7 @@ void BunnyHatch(short Weapon)
Bunny_Count--; // Bunny died
// Blood fountains
InitBloodSpray(Weapon,TRUE,-1);
InitBloodSpray(Weapon,true,-1);
if (SpawnShrap(Weapon, New))
{
@ -1394,8 +1394,8 @@ DoBunnyMove(short SpriteNum)
int
BunnySpew(short SpriteNum)
{
//InitBloodSpray(SpriteNum,TRUE,-1);
InitBloodSpray(SpriteNum,TRUE,-1);
//InitBloodSpray(SpriteNum,true,-1);
InitBloodSpray(SpriteNum,true,-1);
return 0;
}

View file

@ -45,8 +45,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
BEGIN_SW_NS
SWBOOL CheatInputMode = FALSE;
SWBOOL EveryCheat = FALSE;
SWBOOL CheatInputMode = false;
SWBOOL EveryCheat = false;
SWBOOL mapcheat = false;
extern SWBOOL FAF_DebugView;
@ -219,7 +219,7 @@ static void ItemCheat(int player)
{
auto p = &Player[player];
PutStringInfo(p, GStrings("GIVING EVERYTHING!"));
memset(p->HasKey, TRUE, sizeof(p->HasKey));
memset(p->HasKey, true, sizeof(p->HasKey));
p->WpnShotgunAuto = 50;
p->WpnRocketHeat = 5;
@ -299,7 +299,7 @@ static void cmd_Give(int player, uint8_t** stream, bool skip)
break;
case GIVE_KEYS:
memset(Player[player].HasKey, TRUE, sizeof(Player[player].HasKey));
memset(Player[player].HasKey, true, sizeof(Player[player].HasKey));
PutStringInfo(&Player[player], GStrings("TXTS_GIVEKEY"));
break;

View file

@ -225,77 +225,77 @@ InitPalette(void)
for (i = 0; i < 256; i++)
tempbuf[i] = i;
// palette for underwater
lookups.makeTable(PALETTE_DIVE, tempbuf, 0, 0, FOG_AMT, TRUE);
lookups.makeTable(PALETTE_DIVE, tempbuf, 0, 0, FOG_AMT, true);
for (i = 0; i < 256; i++)
tempbuf[i] = i;
lookups.makeTable(PALETTE_FOG, tempbuf, FOG_AMT, FOG_AMT, FOG_AMT, TRUE);
lookups.makeTable(PALETTE_FOG, tempbuf, FOG_AMT, FOG_AMT, FOG_AMT, true);
for (i = 0; i < 256; i++)
tempbuf[i] = i;
lookups.makeTable(PALETTE_DIVE_LAVA, tempbuf, LAVA_AMT, 0, 0, TRUE);
lookups.makeTable(PALETTE_DIVE_LAVA, tempbuf, LAVA_AMT, 0, 0, true);
//
// 1 Range changes
//
MapColors(PALETTE_BROWN_RIPPER, BrownRipper, TRUE, tempbuf);
lookups.makeTable(PALETTE_BROWN_RIPPER, tempbuf, 0, 0, 0, TRUE);
MapColors(PALETTE_BROWN_RIPPER, BrownRipper, true, tempbuf);
lookups.makeTable(PALETTE_BROWN_RIPPER, tempbuf, 0, 0, 0, true);
MapColors(PALETTE_SKEL_GORE, SkelGore, TRUE, tempbuf);
lookups.makeTable(PALETTE_SKEL_GORE, tempbuf, 0, 0, 0, TRUE);
MapColors(PALETTE_SKEL_GORE, SkelGore, true, tempbuf);
lookups.makeTable(PALETTE_SKEL_GORE, tempbuf, 0, 0, 0, true);
MapColors(PALETTE_ELECTRO_GORE, ElectroGore, TRUE, tempbuf);
lookups.makeTable(PALETTE_ELECTRO_GORE, tempbuf, 0, 0, 0, TRUE);
MapColors(PALETTE_ELECTRO_GORE, ElectroGore, true, tempbuf);
lookups.makeTable(PALETTE_ELECTRO_GORE, tempbuf, 0, 0, 0, true);
MapColors(PALETTE_MENU_HIGHLIGHT, MenuHighlight, TRUE, tempbuf);
lookups.makeTable(PALETTE_MENU_HIGHLIGHT, tempbuf, 0, 0, 0, TRUE);
MapColors(PALETTE_MENU_HIGHLIGHT, MenuHighlight, true, tempbuf);
lookups.makeTable(PALETTE_MENU_HIGHLIGHT, tempbuf, 0, 0, 0, true);
//
// Multiple range changes
//
MapColors(PALETTE_BASIC_NINJA, NinjaBasic[0], TRUE, tempbuf);
MapColors(PALETTE_BASIC_NINJA, NinjaBasic[0], true, tempbuf);
for (i = 1; i < SIZ(NinjaBasic); i++)
MapColors(PALETTE_BASIC_NINJA, NinjaBasic[i], FALSE, tempbuf);
lookups.makeTable(PALETTE_BASIC_NINJA, tempbuf, 0, 0, 0, TRUE);
MapColors(PALETTE_BASIC_NINJA, NinjaBasic[i], false, tempbuf);
lookups.makeTable(PALETTE_BASIC_NINJA, tempbuf, 0, 0, 0, true);
MapColors(PALETTE_RED_NINJA, NinjaRed[0], TRUE, tempbuf);
MapColors(PALETTE_RED_NINJA, NinjaRed[0], true, tempbuf);
for (i = 1; i < SIZ(NinjaRed); i++)
MapColors(PALETTE_RED_NINJA, NinjaRed[i], FALSE, tempbuf);
lookups.makeTable(PALETTE_RED_NINJA, tempbuf, 0, 0, 0, TRUE);
MapColors(PALETTE_RED_NINJA, NinjaRed[i], false, tempbuf);
lookups.makeTable(PALETTE_RED_NINJA, tempbuf, 0, 0, 0, true);
MapColors(PALETTE_GREEN_NINJA, NinjaGreen[0], TRUE, tempbuf);
MapColors(PALETTE_GREEN_NINJA, NinjaGreen[0], true, tempbuf);
for (i = 1; i < SIZ(NinjaGreen); i++)
MapColors(PALETTE_GREEN_NINJA, NinjaGreen[i], FALSE, tempbuf);
lookups.makeTable(PALETTE_GREEN_NINJA, tempbuf, 0, 0, 0, TRUE);
MapColors(PALETTE_GREEN_NINJA, NinjaGreen[i], false, tempbuf);
lookups.makeTable(PALETTE_GREEN_NINJA, tempbuf, 0, 0, 0, true);
MapColors(PALETTE_GREEN_LIGHTING, AllToGreen[0], TRUE, tempbuf);
MapColors(PALETTE_GREEN_LIGHTING, AllToGreen[0], true, tempbuf);
for (i = 1; i < SIZ(AllToGreen); i++)
MapColors(PALETTE_GREEN_LIGHTING, AllToGreen[i], FALSE, tempbuf);
lookups.makeTable(PALETTE_GREEN_LIGHTING, tempbuf, 0, 0, 0, TRUE);
MapColors(PALETTE_GREEN_LIGHTING, AllToGreen[i], false, tempbuf);
lookups.makeTable(PALETTE_GREEN_LIGHTING, tempbuf, 0, 0, 0, true);
MapColors(PALETTE_RED_LIGHTING, AllToRed[0], TRUE, tempbuf);
MapColors(PALETTE_RED_LIGHTING, AllToRed[0], true, tempbuf);
for (i = 1; i < SIZ(AllToRed); i++)
MapColors(PALETTE_RED_LIGHTING, AllToRed[i], FALSE, tempbuf);
lookups.makeTable(PALETTE_RED_LIGHTING, tempbuf, 0, 0, 0, TRUE);
MapColors(PALETTE_RED_LIGHTING, AllToRed[i], false, tempbuf);
lookups.makeTable(PALETTE_RED_LIGHTING, tempbuf, 0, 0, 0, true);
MapColors(PALETTE_BLUE_LIGHTING, AllToBlue[0], TRUE, tempbuf);
MapColors(PALETTE_BLUE_LIGHTING, AllToBlue[0], true, tempbuf);
for (i = 1; i < SIZ(AllToBlue); i++)
MapColors(PALETTE_BLUE_LIGHTING, AllToBlue[i], FALSE, tempbuf);
lookups.makeTable(PALETTE_BLUE_LIGHTING, tempbuf, 0, 0, 0, TRUE);
MapColors(PALETTE_BLUE_LIGHTING, AllToBlue[i], false, tempbuf);
lookups.makeTable(PALETTE_BLUE_LIGHTING, tempbuf, 0, 0, 0, true);
MapColors(PALETTE_ILLUMINATE, Illuminate[0], TRUE, tempbuf);
MapColors(PALETTE_ILLUMINATE, Illuminate[0], true, tempbuf);
for (i = 1; i < SIZ(Illuminate); i++)
MapColors(PALETTE_ILLUMINATE, Illuminate[i], FALSE, tempbuf);
lookups.makeTable(PALETTE_ILLUMINATE, tempbuf, 0, 0, 0, TRUE);
MapColors(PALETTE_ILLUMINATE, Illuminate[i], false, tempbuf);
lookups.makeTable(PALETTE_ILLUMINATE, tempbuf, 0, 0, 0, true);
// PLAYER COLORS - ALSO USED FOR OTHER THINGS
for (play = 0; play < PLAYER_COLOR_MAPS; play++)
{
MapColors(PALETTE_PLAYER0 + play, PlayerColorMap[play][0], TRUE, tempbuf);
MapColors(PALETTE_PLAYER0 + play, PlayerColorMap[play][0], FALSE, tempbuf);
lookups.makeTable(PALETTE_PLAYER0 + play, tempbuf, 0, 0, 0, TRUE);
MapColors(PALETTE_PLAYER0 + play, PlayerColorMap[play][0], true, tempbuf);
MapColors(PALETTE_PLAYER0 + play, PlayerColorMap[play][0], false, tempbuf);
lookups.makeTable(PALETTE_PLAYER0 + play, tempbuf, 0, 0, 0, true);
}
//
@ -307,7 +307,7 @@ InitPalette(void)
// invert the brown palette
for (i = 0; i < 32; i++)
tempbuf[LT_BROWN + i] = (LT_BROWN + 32) - i;
lookups.makeTable(PALETTE_SLUDGE, tempbuf, 0, 0, 0, TRUE);
lookups.makeTable(PALETTE_SLUDGE, tempbuf, 0, 0, 0, true);
}

View file

@ -640,8 +640,8 @@ int DoCoolgMatchPlayerZ(short SpriteNum)
// If blocking bits get unset, just die
if (!TEST(sp->cstat,CSTAT_SPRITE_BLOCK) || !TEST(sp->cstat,CSTAT_SPRITE_BLOCK_HITSCAN))
{
InitBloodSpray(SpriteNum, TRUE, 105);
InitBloodSpray(SpriteNum, TRUE, 105);
InitBloodSpray(SpriteNum, true, 105);
InitBloodSpray(SpriteNum, true, 105);
UpdateSinglePlayKills(SpriteNum);
SetSuicide(SpriteNum);
}

View file

@ -197,7 +197,7 @@ void CopySectorMatch(short match)
// update sprites postions so they aren't in the
// wrong place for one frame
GlobSpeedSO = 0;
RefreshPoints(sop, 0, 0, TRUE);
RefreshPoints(sop, 0, 0, true);
}
}
}

View file

@ -202,7 +202,7 @@ void GameInterface::StartGame(FNewGameStartup& gs)
map = FindMapByLevelNum(1);
if (!map) return;
CameraTestMode = FALSE;
CameraTestMode = false;
StopFX();
//InitNewGame();

View file

@ -58,7 +58,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
BEGIN_SW_NS
static int OverlapDraw = FALSE;
static int OverlapDraw = false;
extern SWBOOL QuitFlag, SpriteInfo;
extern SWBOOL Voxel;
extern char buffer[];
@ -253,7 +253,7 @@ DoShadowFindGroundPoint(tspriteptr_t sp)
break;
default:
ASSERT(TRUE == FALSE);
ASSERT(true == false);
break;
}
@ -708,13 +708,13 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
// if sector pal is something other than default
SECT_USERp sectu = SectUser[tsp->sectnum];
uint8_t pal = sector[tsp->sectnum].floorpal;
SWBOOL nosectpal=FALSE;
SWBOOL nosectpal=false;
// sprite does not take on the new pal if sector flag is set
if (sectu && TEST(sectu->flags, SECTFU_DONT_COPY_PALETTE))
{
pal = PALETTE_DEFAULT;
nosectpal = TRUE;
nosectpal = true;
}
//if(tu->spal == PALETTE_DEFAULT)
@ -1271,8 +1271,8 @@ void CameraView(PLAYERp pp, int *tx, int *ty, int *tz, short *tsectnum, fixed_t
int i,nexti;
short ang;
SPRITEp sp;
SWBOOL found_camera = FALSE;
SWBOOL player_in_camera = FALSE;
SWBOOL found_camera = false;
SWBOOL player_in_camera = false;
SWBOOL FAFcansee_test;
SWBOOL ang_test;
@ -1308,7 +1308,7 @@ void CameraView(PLAYERp pp, int *tx, int *ty, int *tz, short *tsectnum, fixed_t
case 1:
pp->last_camera_sp = sp;
CircleCamera(tx, ty, tz, tsectnum, tq16ang, 100);
found_camera = TRUE;
found_camera = true;
break;
default:
@ -1346,7 +1346,7 @@ void CameraView(PLAYERp pp, int *tx, int *ty, int *tz, short *tsectnum, fixed_t
*tz = sp->z;
*tsectnum = sp->sectnum;
found_camera = TRUE;
found_camera = true;
break;
}
}
@ -1601,7 +1601,7 @@ void FAF_DrawRooms(int x, int y, int z, fixed_t q16ang, fixed_t q16horiz, short
}
}
short ScreenSavePic = FALSE;
short ScreenSavePic = false;
SWBOOL PicInView(short, SWBOOL);
void DoPlayerDiveMeter(PLAYERp pp);
@ -1626,7 +1626,7 @@ drawscreen(PLAYERp pp, double smoothratio)
int const viewingRange = viewingrange;
DrawScreen = TRUE;
DrawScreen = true;
PreDraw();
PreUpdatePanel(smoothratio);
@ -1743,9 +1743,9 @@ drawscreen(PLAYERp pp, double smoothratio)
videoSetCorrectedAspect();
renderSetAspect(xs_CRoundToInt(double(viewingrange)* tan(r_fov* (PI / 360.))), yxaspect);
OverlapDraw = TRUE;
OverlapDraw = true;
DrawOverlapRoom(tx, ty, tz, tq16ang, tq16horiz, tsectnum);
OverlapDraw = FALSE;
OverlapDraw = false;
if (automapMode != am_full)// && !ScreenSavePic)
{
@ -1759,7 +1759,7 @@ drawscreen(PLAYERp pp, double smoothratio)
if (!FAF_DebugView)
FAF_DrawRooms(tx, ty, tz, tq16ang, tq16horiz, tsectnum);
analyzesprites(tx, ty, tz, FALSE);
analyzesprites(tx, ty, tz, false);
post_analyzesprites();
renderDrawMasks();
@ -1812,7 +1812,7 @@ drawscreen(PLAYERp pp, double smoothratio)
// if doing a screen save don't need to process the rest
if (ScreenSavePic)
{
DrawScreen = FALSE;
DrawScreen = false;
return;
}
@ -1848,19 +1848,19 @@ drawscreen(PLAYERp pp, double smoothratio)
{
if (ReloadPrompt)
{
ReloadPrompt = FALSE;
ReloadPrompt = false;
}
}
PostDraw();
DrawScreen = FALSE;
DrawScreen = false;
}
bool GameInterface::GenerateSavePic()
{
ScreenSavePic = TRUE;
ScreenSavePic = true;
drawscreen(Player + myconnectindex, 65536);
ScreenSavePic = FALSE;
ScreenSavePic = false;
return true;
}
@ -1897,7 +1897,7 @@ bool GameInterface::DrawAutomapPlayer(int cposx, int cposy, int czoom, int cang)
{
if (sprite[Player[p].PlayerSprite].xvel > 16)
pspr_ndx[myconnectindex] = ((PlayClock >> 4) & 3);
sprisplayer = TRUE;
sprisplayer = true;
goto SHOWSPRITE;
}

View file

@ -105,7 +105,7 @@ SWBOOL SavegameLoaded = false;
SWBOOL FinishedLevel = false;
short screenpeek = 0;
SWBOOL PreCaching = TRUE;
SWBOOL PreCaching = true;
int GodMode = false;
short Skill = 2;
short TotalKillable;
@ -116,12 +116,12 @@ const GAME_SET gs_defaults =
0, // GameType
0, // Monsters
false, // HurtTeammate
TRUE, // SpawnMarkers Markers
true, // SpawnMarkers Markers
false, // TeamPlay
0, // Kill Limit
0, // Time Limit
0, // Color
TRUE, // nuke
true, // nuke
};
GAME_SET gs;
@ -175,7 +175,7 @@ void GameInterface::app_init()
for (int i = 0; i < MAX_SW_PLAYERS; i++)
INITLIST(&Player[i].PanelSpriteList);
DebugOperate = TRUE;
DebugOperate = true;
enginecompatibility_mode = ENGINECOMPATIBILITY_19961112;
if (SW_SHAREWARE)

View file

@ -246,11 +246,11 @@ inline int32_t FIXED(int32_t msw, int32_t lsw)
#define SET_SPRITE_TAG14(sp,val) (*((short*)&sprite[sp].xrepeat)) = B_LITTLE16((short)val)
// OVER and UNDER water macros
#define SpriteInDiveArea(sp) (TEST(sector[(sp)->sectnum].extra, SECTFX_DIVE_AREA) ? TRUE : FALSE)
#define SpriteInUnderwaterArea(sp) (TEST(sector[(sp)->sectnum].extra, SECTFX_UNDERWATER|SECTFX_UNDERWATER2) ? TRUE : FALSE)
#define SpriteInDiveArea(sp) (TEST(sector[(sp)->sectnum].extra, SECTFX_DIVE_AREA) ? true : false)
#define SpriteInUnderwaterArea(sp) (TEST(sector[(sp)->sectnum].extra, SECTFX_UNDERWATER|SECTFX_UNDERWATER2) ? true : false)
#define SectorIsDiveArea(sect) (TEST(sector[sect].extra, SECTFX_DIVE_AREA) ? TRUE : FALSE)
#define SectorIsUnderwaterArea(sect) (TEST(sector[sect].extra, SECTFX_UNDERWATER|SECTFX_UNDERWATER2) ? TRUE : FALSE)
#define SectorIsDiveArea(sect) (TEST(sector[sect].extra, SECTFX_DIVE_AREA) ? true : false)
#define SectorIsUnderwaterArea(sect) (TEST(sector[sect].extra, SECTFX_UNDERWATER|SECTFX_UNDERWATER2) ? true : false)
#define TRAVERSE_SPRITE_SECT(l, o, n) for ((o) = (l); (n) = (o) == -1 ? -1 : nextspritesect[o], (o) != -1; (o) = (n))
#define TRAVERSE_SPRITE_STAT(l, o, n) for ((o) = (l); (n) = (o) == -1 ? -1 : nextspritestat[o], (o) != -1; (o) = (n))

View file

@ -591,7 +591,7 @@ int DoCheckSwarm(short SpriteNum)
}
}
return TRUE;
return true;
}

View file

@ -134,7 +134,7 @@ static void processWeapon(PLAYERp const pp)
else
{
next_weapon = -1;
for (i = start_weapon; TRUE; i++)
for (i = start_weapon; true; i++)
{
if (i >= MAX_WEAPONS_KEYS)
{
@ -171,7 +171,7 @@ static void processWeapon(PLAYERp const pp)
else
{
prev_weapon = -1;
for (i = start_weapon; TRUE; i--)
for (i = start_weapon; true; i--)
{
if (i <= -1)
i = WPN_HEART;

View file

@ -118,7 +118,7 @@ void so_addinterpolation(SECTOR_OBJECTp sop)
so_interp *interp = &so_interpdata[sop - SectorObject];
interp->numinterpolations = 0;
interp->hasvator = FALSE;
interp->hasvator = false;
for (sectp = sop->sectp; *sectp; sectp++)
{
@ -349,7 +349,7 @@ SWBOOL so_writeinterpolations(MFILE_WRITE fil)
int32_t i;
SECTOR_OBJECTp sop;
so_interp *interp;
SWBOOL saveisshot = FALSE;
SWBOOL saveisshot = false;
for (sop = SectorObject, interp = so_interpdata;
sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++, interp++)
@ -374,7 +374,7 @@ SWBOOL so_readinterpolations(MFILE_READ fil)
int32_t i;
SECTOR_OBJECTp sop;
so_interp *interp;
SWBOOL saveisshot = FALSE;
SWBOOL saveisshot = false;
for (sop = SectorObject, interp = so_interpdata;
sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++, interp++)

View file

@ -293,7 +293,7 @@ void UseInventoryCloak(PLAYERp pp)
return;
}
pp->InventoryActive[pp->InventoryNum] = TRUE;
pp->InventoryActive[pp->InventoryNum] = true;
AutoPickInventory(pp);
@ -313,7 +313,7 @@ void StopInventoryCloak(PLAYERp pp, short InventoryNum)
{
SPRITEp sp = pp->SpriteP;
pp->InventoryActive[InventoryNum] = FALSE;
pp->InventoryActive[InventoryNum] = false;
if (pp->InventoryPercent[InventoryNum] <= 0)
{
@ -350,7 +350,7 @@ DoPlayerNightVisionPalette(PLAYERp pp)
// if (pp->NightVision && pp->StartColor == 148)
// return;
SetFadeAmt(pp,-1005,148); // Night vision green tint
pp->NightVision = TRUE;
pp->NightVision = true;
}
else
{
@ -360,7 +360,7 @@ DoPlayerNightVisionPalette(PLAYERp pp)
pp->FadeAmt = 0;
videoFadePalette(0,0,0,0);
}
pp->NightVision = FALSE;
pp->NightVision = false;
}
}
@ -373,7 +373,7 @@ UseInventoryNightVision(PLAYERp pp)
return;
}
pp->InventoryActive[pp->InventoryNum] = TRUE;
pp->InventoryActive[pp->InventoryNum] = true;
// on/off
PlayerUpdateInventory(pp, pp->InventoryNum);
@ -385,7 +385,7 @@ UseInventoryNightVision(PLAYERp pp)
void
StopInventoryNightVision(PLAYERp pp, short InventoryNum)
{
pp->InventoryActive[InventoryNum] = FALSE;
pp->InventoryActive[InventoryNum] = false;
if (pp->InventoryPercent[InventoryNum] <= 0)
{
@ -531,7 +531,7 @@ void InventoryTimer(PLAYERp pp)
// ALL USED UP
pp->InventoryPercent[inv] = 0;
InventoryStop(pp, inv);
pp->InventoryActive[inv] = FALSE;
pp->InventoryActive[inv] = false;
}
else
{
@ -566,7 +566,7 @@ void InventoryTimer(PLAYERp pp)
// reset 1 sec tic clock
pp->InventoryTics[inv] = SEC(1);
// set to InActive EVERY TIME THROUGH THE LOOP!
pp->InventoryActive[inv] = FALSE;
pp->InventoryActive[inv] = false;
}
PlayerUpdateInventory(pp, pp->InventoryNum);

View file

@ -57,10 +57,10 @@ SWBOOL mirrorinview;
uint32_t oscilationclock;
// Voxel stuff
//SWBOOL bVoxelsOn = TRUE; // Turn voxels on by default
SWBOOL bSpinBobVoxels = FALSE; // Do twizzly stuff to voxels, but
//SWBOOL bVoxelsOn = true; // Turn voxels on by default
SWBOOL bSpinBobVoxels = false; // Do twizzly stuff to voxels, but
// not by default
SWBOOL bAutoSize = TRUE; // Autosizing on/off
SWBOOL bAutoSize = true; // Autosizing on/off
//extern int chainnumpages;
extern AMB_INFO ambarray[];
@ -288,13 +288,13 @@ void JS_InitMirrors(void)
short startwall, endwall;
int i, j, s;
short SpriteNum = 0, NextSprite;
SWBOOL Found_Cam = FALSE;
SWBOOL Found_Cam = false;
// Set all the mirror struct values to -1
memset(mirror, 0xFF, sizeof(mirror));
mirrorinview = FALSE; // Initially set global mirror flag
mirrorinview = false; // Initially set global mirror flag
// to no mirrors seen
// Scan wall tags for mirrors
@ -308,7 +308,7 @@ void JS_InitMirrors(void)
mirror[i].campic = -1;
mirror[i].camsprite = -1;
mirror[i].camera = -1;
mirror[i].ismagic = FALSE;
mirror[i].ismagic = false;
}
for (i = 0; i < numwalls; i++)
@ -333,13 +333,13 @@ void JS_InitMirrors(void)
mirror[mirrorcnt].mirrorwall = i;
mirror[mirrorcnt].mirrorsector = s;
mirror[mirrorcnt].numspawnspots = 0;
mirror[mirrorcnt].ismagic = FALSE;
mirror[mirrorcnt].ismagic = false;
do if (wall[i].lotag == TAG_WALL_MAGIC_MIRROR)
{
short ii, nextii;
SPRITEp sp;
Found_Cam = FALSE;
Found_Cam = false;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_ST1], ii, nextii)
{
sp = &sprite[ii];
@ -350,7 +350,7 @@ void JS_InitMirrors(void)
// Set up camera varialbes
SP_TAG5(sp) = sp->ang; // Set current angle to
// sprite angle
Found_Cam = TRUE;
Found_Cam = true;
}
}
@ -367,7 +367,7 @@ void JS_InitMirrors(void)
// Set up camera varialbes
SP_TAG5(sp) = sp->ang; // Set current angle to
// sprite angle
Found_Cam = TRUE;
Found_Cam = true;
}
}
@ -378,9 +378,9 @@ void JS_InitMirrors(void)
break;
}
mirror[mirrorcnt].ismagic = TRUE;
mirror[mirrorcnt].ismagic = true;
Found_Cam = FALSE;
Found_Cam = false;
if (TEST_BOOL1(&sprite[mirror[mirrorcnt].camera]))
{
TRAVERSE_SPRITE_STAT(headspritestat[0], SpriteNum, NextSprite)
@ -395,7 +395,7 @@ void JS_InitMirrors(void)
// JBF: commenting out this line results in the screen in $BULLET being visible
tileDelete(mirror[mirrorcnt].campic);
Found_Cam = TRUE;
Found_Cam = true;
}
}
@ -467,7 +467,7 @@ void drawroomstotile(int daposx, int daposy, int daposz,
screen->RenderTextureView(canvas, [=](IntRect& rect)
{
renderDrawRoomsQ16(daposx, daposy, daposz, daq16ang, daq16horiz, dacursectnum);
analyzesprites(daposx, daposy, daposz, FALSE);
analyzesprites(daposx, daposy, daposz, false);
renderDrawMasks();
});
@ -482,7 +482,7 @@ JS_ProcessEchoSpot()
int j,dist;
PLAYERp pp = Player+screenpeek;
int16_t reverb;
SWBOOL reverb_set = FALSE;
SWBOOL reverb_set = false;
// Process echo sprites
TRAVERSE_SPRITE_STAT(headspritestat[STAT_ECHO], i, nexti)
@ -503,7 +503,7 @@ JS_ProcessEchoSpot()
if (reverb < 100) reverb = 100;
COVER_SetReverb(reverb);
reverb_set = TRUE;
reverb_set = true;
}
}
if (!TEST(pp->Flags, PF_DIVING) && !reverb_set && pp->Reverb <= 0)
@ -531,7 +531,7 @@ void JS_DrawCameras(PLAYERp pp, int tx, int ty, int tz)
int tposx, tposy; // Camera
int* longptr;
SWBOOL bIsWallMirror = FALSE;
SWBOOL bIsWallMirror = false;
int camclock = I_GetBuildTime();
camloopcnt += camclock - lastcamclock;
@ -624,7 +624,7 @@ void JS_DrawCameras(PLAYERp pp, int tx, int ty, int tz)
// Is it a TV cam or a teleporter that shows destination?
// TRUE = It's a TV cam
// true = It's a TV cam
mirror[cnt].mstate = m_normal;
if (TEST_BOOL1(sp))
mirror[cnt].mstate = m_viewon;
@ -634,7 +634,7 @@ void JS_DrawCameras(PLAYERp pp, int tx, int ty, int tz)
// you are outside of it!
if (mirror[cnt].mstate == m_viewon)
{
SWBOOL DoCam = FALSE;
SWBOOL DoCam = false;
if (mirror[cnt].campic == -1)
{
@ -696,7 +696,7 @@ void JS_DrawCameras(PLAYERp pp, int tx, int ty, int tz)
// If player is dead still then update at MoveSkip4
// rate.
if (pp->posx == pp->oposx && pp->posy == pp->oposy && pp->posz == pp->oposz)
DoCam = TRUE;
DoCam = true;
// Set up the tile for drawing
@ -733,7 +733,7 @@ void JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, fixed_t tpq16ang, fixed
// int tx, ty, tz, tpang; // Interpolate so mirror doesn't
// drift!
SWBOOL bIsWallMirror = FALSE;
SWBOOL bIsWallMirror = false;
// WARNING! Assuming (MIRRORLABEL&31) = 0 and MAXMIRRORS = 64 <-- JBF: wrong
longptr = (int *)&gotpic[MIRRORLABEL >> 3];
@ -743,10 +743,10 @@ void JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, fixed_t tpq16ang, fixed
//if (TEST_GOTPIC(cnt + MIRRORLABEL) || TEST_GOTPIC(cnt + CAMSPRITE))
if (TEST_GOTPIC(cnt + MIRRORLABEL) || ((unsigned)mirror[cnt].campic < MAXTILES && TEST_GOTPIC(mirror[cnt].campic)))
{
bIsWallMirror = FALSE;
bIsWallMirror = false;
if (TEST_GOTPIC(cnt + MIRRORLABEL))
{
bIsWallMirror = TRUE;
bIsWallMirror = true;
RESET_GOTPIC(cnt + MIRRORLABEL);
}
//else if (TEST_GOTPIC(cnt + CAMSPRITE))
@ -756,7 +756,7 @@ void JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, fixed_t tpq16ang, fixed
RESET_GOTPIC(mirror[cnt].campic);
}
mirrorinview = TRUE;
mirrorinview = true;
// tx = pp->oposx + mulscale16(pp->posx - pp->oposx, smoothratio);
// ty = pp->oposy + mulscale16(pp->posy - pp->oposy, smoothratio);
@ -828,7 +828,7 @@ void JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, fixed_t tpq16ang, fixed
// Is it a TV cam or a teleporter that shows destination?
// TRUE = It's a TV cam
// true = It's a TV cam
mirror[cnt].mstate = m_normal;
if (TEST_BOOL1(sp))
mirror[cnt].mstate = m_viewon;
@ -845,7 +845,7 @@ void JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, fixed_t tpq16ang, fixed
if (mirror[cnt].campic != -1)
tileDelete(mirror[cnt].campic);
renderDrawRoomsQ16(dx, dy, dz, tpq16ang, tpq16horiz, sp->sectnum + MAXSECTORS);
analyzesprites(dx, dy, dz, FALSE);
analyzesprites(dx, dy, dz, false);
renderDrawMasks();
}
}
@ -863,7 +863,7 @@ void JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, fixed_t tpq16ang, fixed
renderDrawRoomsQ16(tposx, tposy, tz, (tang), tpq16horiz, mirror[cnt].mirrorsector + MAXSECTORS);
analyzesprites(tposx, tposy, tz, TRUE);
analyzesprites(tposx, tposy, tz, true);
renderDrawMasks();
renderCompleteMirror(); // Reverse screen x-wise in this
@ -880,7 +880,7 @@ void JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, fixed_t tpq16ang, fixed
wall[mirror[cnt].mirrorwall].overpicnum = MIRRORLABEL + cnt;
}
else
mirrorinview = FALSE;
mirrorinview = false;
}
}

View file

@ -401,7 +401,7 @@ DoBloodSpray(int16_t Weapon)
sp->z = fz;
SpawnFloorSplash(Weapon);
KillSprite((short) Weapon);
return TRUE;
return true;
}
}
else
@ -419,7 +419,7 @@ DoBloodSpray(int16_t Weapon)
{
case HIT_PLAX_WALL:
KillSprite(Weapon);
return TRUE;
return true;
case HIT_SPRITE:
{
short wall_ang;
@ -440,7 +440,7 @@ DoBloodSpray(int16_t Weapon)
SpawnMidSplash(Weapon);
QueueWallBlood(Weapon, hsp->ang);
KillSprite((short) Weapon);
return TRUE;
return true;
}
@ -540,7 +540,7 @@ DoBloodSpray(int16_t Weapon)
u->xchange = u->ychange = 0;
SpawnFloorSplash(Weapon);
KillSprite((short) Weapon);
return TRUE;
return true;
}
}
else
@ -594,7 +594,7 @@ DoBloodSpray(int16_t Weapon)
SET(nu->Flags, SPR_UNDERWATER);
}
return FALSE;
return false;
}
@ -631,7 +631,7 @@ DoPhosphorus(int16_t Weapon)
{
case HIT_PLAX_WALL:
KillSprite(Weapon);
return TRUE;
return true;
case HIT_SPRITE:
{
short wall_ang;
@ -663,7 +663,7 @@ DoPhosphorus(int16_t Weapon)
}
u->xchange = u->ychange = 0;
KillSprite((short) Weapon);
return TRUE;
return true;
}
@ -726,7 +726,7 @@ DoPhosphorus(int16_t Weapon)
u->xchange = u->ychange = 0;
SpawnFireballExp(Weapon);
KillSprite((short) Weapon);
return TRUE;
return true;
}
}
else
@ -763,7 +763,7 @@ DoPhosphorus(int16_t Weapon)
u->xchange = u->ychange = 0;
SpawnFireballExp(Weapon);
KillSprite((short) Weapon);
return TRUE;
return true;
}
}
else
@ -821,7 +821,7 @@ DoPhosphorus(int16_t Weapon)
SET(nu->Flags, SPR_UNDERWATER);
}
return FALSE;
return false;
}
int
@ -857,7 +857,7 @@ DoChemBomb(int16_t Weapon)
{
case HIT_PLAX_WALL:
KillSprite(Weapon);
return TRUE;
return true;
case HIT_SPRITE:
{
short wall_ang;
@ -889,7 +889,7 @@ DoChemBomb(int16_t Weapon)
u->WaitTics -= (MISSILEMOVETICS * 2);
if (u->WaitTics <= 0)
KillSprite((short) Weapon);
return TRUE;
return true;
}
@ -965,7 +965,7 @@ DoChemBomb(int16_t Weapon)
u->WaitTics -= (MISSILEMOVETICS * 2);
if (u->WaitTics <= 0)
KillSprite((short) Weapon);
return TRUE;
return true;
}
}
else
@ -1014,7 +1014,7 @@ DoChemBomb(int16_t Weapon)
u->WaitTics -= (MISSILEMOVETICS * 2);
if (u->WaitTics <= 0)
KillSprite((short) Weapon);
return TRUE;
return true;
}
}
else
@ -1069,7 +1069,7 @@ DoChemBomb(int16_t Weapon)
SET(nu->Flags, SPR_UNDERWATER);
}
return FALSE;
return false;
}
int
@ -1115,7 +1115,7 @@ DoCaltrops(int16_t Weapon)
{
case HIT_PLAX_WALL:
KillSprite(Weapon);
return TRUE;
return true;
case HIT_SPRITE:
{
short wall_ang;
@ -1201,7 +1201,7 @@ DoCaltrops(int16_t Weapon)
SET(sp->extra, SPRX_BREAKABLE);
SET(sp->cstat,CSTAT_SPRITE_BREAKABLE);
ChangeState(Weapon, s_CaltropsStick);
return TRUE;
return true;
}
}
else
@ -1239,7 +1239,7 @@ DoCaltrops(int16_t Weapon)
SET(sp->extra, SPRX_BREAKABLE);
SET(sp->cstat,CSTAT_SPRITE_BREAKABLE);
ChangeState(Weapon, s_CaltropsStick);
return TRUE;
return true;
}
}
else
@ -1255,7 +1255,7 @@ DoCaltrops(int16_t Weapon)
}
return FALSE;
return false;
}
/////////////////////////////
@ -1272,7 +1272,7 @@ SpawnRadiationCloud(short SpriteNum)
if (!MoveSkip4)
return FALSE;
return false;
// This basically works like a MoveSkip8, if one existed
// u->Counter2 = !u->Counter2;
@ -1281,14 +1281,14 @@ SpawnRadiationCloud(short SpriteNum)
if ((u->Counter2++) > 16)
u->Counter2 = 0;
if (u->Counter2)
return FALSE;
return false;
}
else
{
if ((u->Counter2++) > 2)
u->Counter2 = 0;
if (u->Counter2)
return FALSE;
return false;
}
if (TEST(u->Flags, SPR_UNDERWATER))
@ -1338,7 +1338,7 @@ SpawnRadiationCloud(short SpriteNum)
nu->Radius = 4000;
}
return FALSE;
return false;
}
int
@ -1357,7 +1357,7 @@ DoRadiationCloud(short SpriteNum)
DoFlamesDamageTest(SpriteNum);
}
return FALSE;
return false;
}
//////////////////////////////////////////////
@ -1733,7 +1733,7 @@ SpawnFlashBombOnActor(int16_t enemy)
{
if (!eu)
{
ASSERT(TRUE == FALSE);
ASSERT(true == false);
}
if (eu->flame >= 0)
@ -2200,7 +2200,7 @@ DoCarryFlag(int16_t Weapon)
if (!TEST(u->Flags, SPR_ACTIVE))
{
if ((u->WaitTics -= (MISSILEMOVETICS * 2)) > 0)
return FALSE;
return false;
// activate it
u->WaitTics = SEC(30); // You have 30 seconds to get it to
@ -2324,11 +2324,11 @@ DoCarryFlag(int16_t Weapon)
case FLAG_DETONATE_STATE + 1:
SpawnGrenadeExp(Weapon);
SetSuicide(Weapon);
return FALSE;
return false;
break;
}
return FALSE;
return false;
}
int
@ -2362,7 +2362,7 @@ DoCarryFlagNoDet(int16_t Weapon)
if (u->FlagOwner >= 0)
fu->WaitTics = 0; // Tell it to respawn
SetSuicide(Weapon);
return FALSE;
return false;
}
// if in score box, score.
@ -2395,7 +2395,7 @@ DoCarryFlagNoDet(int16_t Weapon)
SetSuicide(Weapon); // Kill the flag, you scored!
}
return FALSE;
return false;
}
@ -2418,7 +2418,7 @@ SetCarryFlag(int16_t Weapon)
else
ChangeState(Weapon, s_CarryFlag);
return FALSE;
return false;
}
int
@ -2447,7 +2447,7 @@ DoFlag(int16_t Weapon)
}
}
return FALSE;
return false;
}

View file

@ -158,11 +158,11 @@ short MultiClipTurn(PLAYERp pp, short new_ang, int z, int floor_dist)
//ang = NORM_ANGLE(ang + 1024);
//pp->xvect += 20 * sintable[NORM_ANGLE(ang + 512)];
//pp->yvect += 20 * sintable[ang];
return FALSE;
return false;
}
}
return TRUE;
return true;
}
int testquadinsect(int *point_num, vec2_t const * q, short sectnum)
@ -177,7 +177,7 @@ int testquadinsect(int *point_num, vec2_t const * q, short sectnum)
{
*point_num = i;
return FALSE;
return false;
}
}
@ -187,11 +187,11 @@ int testquadinsect(int *point_num, vec2_t const * q, short sectnum)
if (!cansee(q[i].x, q[i].y,0x3fffffff, sectnum,
q[next_i].x, q[next_i].y,0x3fffffff, sectnum))
{
return FALSE;
return false;
}
}
return TRUE;
return true;
}
@ -213,11 +213,11 @@ int RectClipMove(PLAYERp pp, int *qx, int *qy)
{
pp->posx += (pp->xvect>>14);
pp->posy += (pp->yvect>>14);
return TRUE;
return true;
}
if (point_num < 0)
return FALSE;
return false;
if ((point_num == 0) || (point_num == 3)) //Left side bad - strafe right
{
@ -232,7 +232,7 @@ int RectClipMove(PLAYERp pp, int *qx, int *qy)
pp->posy += (pp->xvect>>15);
}
return FALSE;
return false;
}
if ((point_num == 1) || (point_num == 2)) //Right side bad - strafe left
@ -248,10 +248,10 @@ int RectClipMove(PLAYERp pp, int *qx, int *qy)
pp->posy -= (pp->xvect>>15);
}
return FALSE;
return false;
}
return FALSE;
return false;
}
int testpointinquad(int x, int y, int *qx, int *qy)
@ -301,12 +301,12 @@ short RectClipTurn(PLAYERp pp, short new_ang, int *qx, int *qy, int *ox, int *oy
qx[i] = xy[i].x;
qy[i] = xy[i].y;
}
return TRUE;
return true;
}
if (point_num < 0)
return FALSE;
return false;
return FALSE;
return false;
}
END_SW_NS

View file

@ -244,7 +244,7 @@ SWBOOL MNU_ShareWareMessage()
MNU_DrawString(160, 160, extra_text, 1, 16, 0);
//SET(item->flags, mf_disabled);
}
return TRUE;
return true;
}

View file

@ -153,7 +153,7 @@ int DoToiletGirl(short SpriteNum)
{
USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP;
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum);
@ -211,7 +211,7 @@ int NullToiletGirl(short SpriteNum)
{
USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP;
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
@ -392,7 +392,7 @@ int DoWashGirl(short SpriteNum)
{
USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP;
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum);
@ -456,7 +456,7 @@ int NullWashGirl(short SpriteNum)
{
USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP;
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
@ -1263,7 +1263,7 @@ int DoCarGirl(short SpriteNum)
{
USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP;
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum);
@ -1312,7 +1312,7 @@ int NullCarGirl(short SpriteNum)
{
USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP;
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
@ -1482,7 +1482,7 @@ int DoMechanicGirl(short SpriteNum)
{
USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP;
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum);
@ -1531,7 +1531,7 @@ int NullMechanicGirl(short SpriteNum)
{
USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP;
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
@ -1702,7 +1702,7 @@ int DoSailorGirl(short SpriteNum)
{
USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP;
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum);
@ -1755,7 +1755,7 @@ int NullSailorGirl(short SpriteNum)
{
USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP;
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
static short alreadythrew = 0;
DoActorPickClosePlayer(SpriteNum);
@ -1914,7 +1914,7 @@ int DoPruneGirl(short SpriteNum)
{
USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP;
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum);
@ -1979,7 +1979,7 @@ int NullPruneGirl(short SpriteNum)
{
USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP;
SWBOOL ICanSee = FALSE;
SWBOOL ICanSee = false;
DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);

View file

@ -54,7 +54,7 @@ gNET gNet;
//Local multiplayer variables
// should move this to a local scope of faketimerhandler - do it when able to test
SWBOOL CommEnabled = FALSE;
SWBOOL CommEnabled = false;
uint8_t CommPlayers = 0;
double smoothratio;

View file

@ -1967,7 +1967,7 @@ DoNinjaHariKari(short SpriteNum)
cnt = RANDOM_RANGE(4)+1;
for (i=0; i<=cnt; i++)
InitBloodSpray(SpriteNum,TRUE,-2);
InitBloodSpray(SpriteNum,true,-2);
return 0;
}
@ -2206,7 +2206,7 @@ PlayerLevelReset(PLAYERp pp)
//PlayerUpdateArmor(pp, 0);
pp->Kills = 0;
pp->Killer = -1;
pp->NightVision = FALSE;
pp->NightVision = false;
pp->StartColor = 0;
pp->FadeAmt = 0;
pp->DeathType = 0;
@ -2245,10 +2245,10 @@ PlayerDeathReset(PLAYERp pp)
pp->WpnShotgunType = 0; // Shotgun has normal or fully automatic fire
pp->WpnShotgunAuto = 0; // 50-0 automatic shotgun rounds
pp->WpnShotgunLastShell = 0; // Number of last shell fired
pp->Bloody = FALSE;
pp->TestNukeInit = FALSE;
pp->InitingNuke = FALSE;
pp->NukeInitialized = FALSE;
pp->Bloody = false;
pp->TestNukeInit = false;
pp->InitingNuke = false;
pp->NukeInitialized = false;
pp->WpnReloadState = 2;
memset(pp->WpnAmmo,0,sizeof(pp->WpnAmmo));
@ -2273,7 +2273,7 @@ PlayerDeathReset(PLAYERp pp)
pp->Armor = 0;
PlayerUpdateArmor(pp, 0);
pp->Killer = -1;
pp->NightVision = FALSE;
pp->NightVision = false;
pp->StartColor = 0;
pp->FadeAmt = 0;
pp->DeathType = 0;
@ -2333,10 +2333,10 @@ PlayerGameReset(PLAYERp pp)
pp->WpnShotgunType = 0; // Shotgun has normal or fully automatic fire
pp->WpnShotgunAuto = 0; // 50-0 automatic shotgun rounds
pp->WpnShotgunLastShell = 0; // Number of last shell fired
pp->Bloody = FALSE;
pp->TestNukeInit = FALSE;
pp->InitingNuke = FALSE;
pp->NukeInitialized = FALSE;
pp->Bloody = false;
pp->TestNukeInit = false;
pp->InitingNuke = false;
pp->NukeInitialized = false;
pp->SecretsFound = 0;
pp->WpnReloadState = 2;
@ -2359,7 +2359,7 @@ PlayerGameReset(PLAYERp pp)
{
videoFadePalette(0,0,0,0);
}
pp->NightVision = FALSE;
pp->NightVision = false;
pp->StartColor = 0;
pp->FadeAmt = 0;
pp->DeathType = 0;
@ -2458,7 +2458,7 @@ InitPlayerSprite(PLAYERp pp)
videoFadePalette(0,0,0,0);
}
pp->NightVision = FALSE;
pp->NightVision = false;
pp->StartColor = 0;
pp->FadeAmt = 0;
pp->DeathType = 0;

View file

@ -156,7 +156,7 @@ PANEL_SPRITEp pFindMatchingSpriteID(PLAYERp pp, short id, int x, int y, short pr
SWBOOL pKillScreenSpiteIDs(PLAYERp pp, short id)
{
PANEL_SPRITEp psp=NULL, next;
SWBOOL found = FALSE;
SWBOOL found = false;
// Kill ALL sprites with the correct id
TRAVERSE(&pp->PanelSpriteList, psp, next)
@ -164,7 +164,7 @@ SWBOOL pKillScreenSpiteIDs(PLAYERp pp, short id)
if (psp->ID == id)
{
pKillSprite(psp);
found = TRUE;
found = true;
}
}
@ -238,13 +238,13 @@ void PlayerUpdateHealth(PLAYERp pp, short value)
if (value < 0)
{
SWBOOL IsChem = FALSE;
SWBOOL NoArmor = FALSE;
SWBOOL IsChem = false;
SWBOOL NoArmor = false;
if (value <= -2000)
{
value += 2000;
NoArmor = TRUE;
NoArmor = true;
}
else if (value <= -1000)
{
@ -252,7 +252,7 @@ void PlayerUpdateHealth(PLAYERp pp, short value)
MONO_PRINT(ds);
value += 1000;
IsChem = TRUE;
IsChem = true;
}
// TAKE SOME DAMAGE
@ -440,7 +440,7 @@ int WeaponOperate(PLAYERp pp)
InventoryKeys(pp);
// UziType >= 3 means they are reloading
if (pp->WpnUziType >= 3) return TRUE;
if (pp->WpnUziType >= 3) return true;
//if (CheatInputMode)
// return (0);
@ -544,9 +544,9 @@ int WeaponOperate(PLAYERp pp)
if (pp->WpnRocketType == 2 && pp->WpnRocketNuke == 0)
pp->WpnRocketType = 0;
if (pp->WpnRocketType == 2)
pp->TestNukeInit = TRUE; // Init the nuke
pp->TestNukeInit = true; // Init the nuke
else
pp->TestNukeInit = FALSE;
pp->TestNukeInit = false;
}
InitWeaponMicro(pp);
break;
@ -639,7 +639,7 @@ int WeaponOperate(PLAYERp pp)
// This really should be handled better, but since there's no usable tracking state for the sounds, the easiest way to handle them is to play on otherwise unused channels.
if (pp->WpnRocketType != 2 || pp->CurWpn != pp->Wpn[WPN_MICRO])
{
pp->InitingNuke = FALSE;
pp->InitingNuke = false;
soundEngine->StopSound(SOURCE_Player, pp, CHAN_WEAPON);
}
if (pp->CurWpn != pp->Wpn[WPN_RAIL])
@ -659,16 +659,16 @@ WeaponOK(PLAYERp pp)
unsigned wpn_ndx=0;
if ((unsigned)pp->PlayerSprite >= MAXSPRITES)
return(FALSE);
return(false);
u = User[pp->PlayerSprite];
if (u == NULL)
return(FALSE);
return(false);
// sword
if (DamageData[u->WeaponNum].max_ammo == -1)
return TRUE;
return true;
WeaponNum = u->WeaponNum;
FindWeaponNum = u->WeaponNum;
@ -684,19 +684,19 @@ WeaponOK(PLAYERp pp)
if (WeaponNum == WPN_MICRO && pp->WpnRocketNuke)
{
//pp->WpnRocketType = 2; // Set it to Nuke
if (!pp->NukeInitialized) pp->TestNukeInit = TRUE;
if (!pp->NukeInitialized) pp->TestNukeInit = true;
u->WeaponNum = WPN_MICRO;
(*DamageData[u->WeaponNum].Init)(pp);
return TRUE;
return true;
}
pp->KeyPressBits &= ~SB_FIRE;
FindWeaponNum = WPN_SHOTGUN; // Start at the top
while (TRUE)
while (true)
{
// ran out of weapons - choose SWORD
if (wpn_ndx > sizeof(wpn_order))
@ -723,10 +723,10 @@ WeaponOK(PLAYERp pp)
(*DamageData[u->WeaponNum].Init)(pp);
return FALSE;
return false;
}
return TRUE;
return true;
}
//////////////////////////////////////////////////////////////////////////////////////////
@ -2384,7 +2384,7 @@ void
pUziAction(PANEL_SPRITEp psp)
{
char shooting;
static SWBOOL alternate = FALSE;
static SWBOOL alternate = false;
shooting = (psp->PlayerP->input.actions & SB_FIRE) && (psp->PlayerP->KeyPressBits & SB_FIRE);
@ -2978,13 +2978,13 @@ pShotgunOverlays(PANEL_SPRITEp psp)
case 0:
psp->over[SHOTGUN_AUTO_NUM].pic = -1;
SET(psp->over[SHOTGUN_AUTO_NUM].flags, psf_ShadeNone);
return FALSE;
return false;
case 1:
psp->over[SHOTGUN_AUTO_NUM].pic = SHOTGUN_AUTO;
SET(psp->over[SHOTGUN_AUTO_NUM].flags, psf_ShadeNone);
return FALSE;
return false;
}
return FALSE;
return false;
}
PANEL_STATE ps_ShotgunFlash[] =
@ -3031,10 +3031,10 @@ pShotgunReloadTest(PANEL_SPRITEp psp)
// clip has run out
RESET(psp->flags, PANF_REST_POS);
pSetState(psp, ps_ShotgunReload);
return TRUE;
return true;
}
return FALSE;
return false;
}
#endif
@ -3051,7 +3051,7 @@ pShotgunRest(PANEL_SPRITEp psp)
if (psp->PlayerP->WpnShotgunType == 1 && ammo > 0 && ((ammo % 4) != 0) && lastammo != ammo && TEST(psp->flags, PANF_REST_POS))
{
force = TRUE;
force = true;
}
pShotgunOverlays(psp);
@ -3093,7 +3093,7 @@ pShotgunRestTest(PANEL_SPRITEp psp)
SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (psp->PlayerP->WpnShotgunType == 1 && !pShotgunReloadTest(psp))
force = TRUE;
force = true;
if (pShotgunReloadTest(psp))
return;
@ -4191,8 +4191,8 @@ InitWeaponMicro(PLAYERp pp)
{
if (pp->TestNukeInit && pp->WpnRocketType == 2 && !pp->InitingNuke && pp->WpnRocketNuke && !pp->NukeInitialized)
{
pp->TestNukeInit = FALSE;
pp->InitingNuke = TRUE;
pp->TestNukeInit = false;
pp->InitingNuke = true;
psp = pp->Wpn[WPN_MICRO];
pSetState(psp, !cl_swaltnukeinit ? ps_InitNuke : ps_InitNukeAlt);
}
@ -4214,7 +4214,7 @@ InitWeaponMicro(PLAYERp pp)
pSetState(psp, psp->PresentState);
if (pp->WpnRocketType == 2 && !pp->InitingNuke && !pp->NukeInitialized)
pp->TestNukeInit = pp->InitingNuke = TRUE;
pp->TestNukeInit = pp->InitingNuke = true;
PlaySound(DIGI_ROCKET_UP, pp, v3df_follow);
@ -4304,7 +4304,7 @@ pMicroPresent(PANEL_SPRITEp psp)
psp->yorig = psp->y;
if (pp->WpnRocketType == 2 && !pp->NukeInitialized)
{
pp->TestNukeInit = FALSE;
pp->TestNukeInit = false;
pSetState(psp, !cl_swaltnukeinit ? ps_InitNuke : ps_InitNukeAlt);
}
else
@ -4376,7 +4376,7 @@ pMicroOverlays(PANEL_SPRITEp psp)
psp->over[MICRO_SHOT_NUM].pic = MICRO_SHOT_1;
SET(psp->over[MICRO_SHOT_NUM].flags, psf_ShadeNone);
psp->over[MICRO_HEAT_NUM].pic = -1;
return FALSE;
return false;
case 1:
if (psp->PlayerP->WpnRocketHeat)
{
@ -4396,7 +4396,7 @@ pMicroOverlays(PANEL_SPRITEp psp)
psp->over[MICRO_HEAT_NUM].pic = -1;
}
return FALSE;
return false;
case 2:
psp->over[MICRO_SIGHT_NUM].pic = -1;
psp->over[MICRO_HEAT_NUM].pic = -1;
@ -4404,9 +4404,9 @@ pMicroOverlays(PANEL_SPRITEp psp)
psp->over[MICRO_SHOT_NUM].pic = MICRO_SHOT_20;
SET(psp->over[MICRO_SHOT_NUM].flags, psf_ShadeNone);
SET(psp->over[MICRO_HEAT_NUM].flags, psf_ShadeNone);
return TRUE;
return true;
}
return FALSE;
return false;
}
PANEL_STATE ps_MicroHeatFlash[] =
@ -4455,8 +4455,8 @@ pMicroRest(PANEL_SPRITEp psp)
{
int choose_voc=0;
pp->InitingNuke = FALSE;
pp->NukeInitialized = TRUE;
pp->InitingNuke = false;
pp->NukeInitialized = true;
if (pp == Player+myconnectindex)
{
@ -4532,7 +4532,7 @@ pMicroFire(PANEL_SPRITEp psp)
case 2:
PlaySound(DIGI_WARNING,psp->PlayerP,v3df_dontpan|v3df_follow);
InitNuke(psp->PlayerP);
psp->PlayerP->NukeInitialized = FALSE;
psp->PlayerP->NukeInitialized = false;
break;
}
}
@ -4616,7 +4616,7 @@ pMicroReady(PANEL_SPRITEp psp)
PLAYERp pp = psp->PlayerP;
PlaySound(DIGI_NUKEREADY, pp, v3df_follow|v3df_dontpan, CHAN_WEAPON);
pp->NukeInitialized = TRUE;
pp->NukeInitialized = true;
pMicroAction(psp);
}
@ -6607,7 +6607,7 @@ pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
// initing the other weapon will take care of this
if (TEST(psp->flags, PANF_DEATH_HIDE))
{
return FALSE;
return false;
}
if (TEST(psp->flags, PANF_WEAPON_HIDE))
@ -6616,10 +6616,10 @@ pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
{
RESET(psp->flags, PANF_WEAPON_HIDE);
pSetState(psp, state);
return TRUE;
return true;
}
return FALSE;
return false;
}
if (psp->PlayerP->input.actions & SB_HOLSTER)
@ -6628,7 +6628,7 @@ pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
{
psp->PlayerP->KeyPressBits &= ~SB_HOLSTER;
pSetState(psp, state);
return TRUE;
return true;
}
}
else
@ -6642,11 +6642,11 @@ pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
{
SET(psp->flags, PANF_UNHIDE_SHOOT);
pSetState(psp, state);
return TRUE;
return true;
}
}
return FALSE;
return false;
}
SWBOOL
@ -6656,14 +6656,14 @@ pWeaponHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
{
SET(psp->flags, PANF_DEATH_HIDE);
pSetState(psp, state);
return TRUE;
return true;
}
if (TEST(psp->PlayerP->Flags, PF_WEAPON_DOWN))
{
SET(psp->flags, PANF_WEAPON_HIDE);
pSetState(psp, state);
return TRUE;
return true;
}
if (psp->PlayerP->input.actions & SB_HOLSTER)
@ -6673,7 +6673,7 @@ pWeaponHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
psp->PlayerP->KeyPressBits &= ~SB_HOLSTER;
PutStringInfo(psp->PlayerP,"Weapon Holstered");
pSetState(psp, state);
return TRUE;
return true;
}
}
else
@ -6681,7 +6681,7 @@ pWeaponHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
psp->PlayerP->KeyPressBits |= SB_HOLSTER;
}
return FALSE;
return false;
}
@ -6875,7 +6875,7 @@ pWeaponBob(PANEL_SPRITEp psp, short condition)
//
//////////////////////////////////////////////////////////////////////////////////////////
SWBOOL DrawBeforeView = FALSE;
SWBOOL DrawBeforeView = false;
void
pDisplaySprites(PLAYERp pp, double smoothratio)
{
@ -7273,7 +7273,7 @@ void
PreUpdatePanel(double smoothratio)
{
short pnum;
DrawBeforeView = TRUE;
DrawBeforeView = true;
//if (DrawBeforeView)
TRAVERSE_CONNECT(pnum)
@ -7282,7 +7282,7 @@ PreUpdatePanel(double smoothratio)
pDisplaySprites(Player + pnum, smoothratio);
}
DrawBeforeView = FALSE;
DrawBeforeView = false;
}
#define EnvironSuit_RATE 10

View file

@ -80,7 +80,7 @@ extern SWBOOL NoMeters;
USER puser[MAX_SW_PLAYERS_REG];
//int16_t gNet.MultiGameType = MULTI_GAME_NONE;
SWBOOL NightVision = FALSE;
SWBOOL NightVision = false;
extern SWBOOL FinishAnim;
@ -2275,7 +2275,7 @@ void PlayerCheckValidMove(PLAYERp pp)
// if stuck here for more than 10 seconds
if (count++ > 40 * 10)
{
ASSERT(TRUE == FALSE);
ASSERT(true == false);
}
}
}
@ -2687,7 +2687,7 @@ void DoTankTreads(PLAYERp pp)
SECTORp *sectp;
int j;
int dot;
SWBOOL reverse = FALSE;
SWBOOL reverse = false;
if (Prediction)
return;
@ -2695,7 +2695,7 @@ void DoTankTreads(PLAYERp pp)
vel = FindDistance2D(pp->xvect>>8, pp->yvect>>8);
dot = DOT_PRODUCT_2D(pp->xvect, pp->yvect, sintable[NORM_ANGLE(FixedToInt(pp->q16ang)+512)], sintable[FixedToInt(pp->q16ang)]);
if (dot < 0)
reverse = TRUE;
reverse = true;
for (sectp = pp->sop->sectp, j = 0; *sectp; sectp++, j++)
{
@ -3618,7 +3618,7 @@ DoPlayerClimb(PLAYERp pp)
int dot;
short sec,wal,spr;
int dist;
SWBOOL LadderUpdate = FALSE;
SWBOOL LadderUpdate = false;
if (Prediction)
return;
@ -3792,13 +3792,13 @@ DoPlayerClimb(PLAYERp pp)
if (FAF_ConnectArea(pp->cursectnum))
{
updatesectorz(pp->posx, pp->posy, pp->posz, &pp->cursectnum);
LadderUpdate = TRUE;
LadderUpdate = true;
}
if (WarpPlane(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum))
{
PlayerWarpUpdatePos(pp);
LadderUpdate = TRUE;
LadderUpdate = true;
}
if (LadderUpdate)
@ -3848,7 +3848,7 @@ DoPlayerWadeSuperJump(PLAYERp pp)
static short angs[3] = {0, 0, 0};
int zh = sector[pp->cursectnum].floorz - Z(pp->WadeDepth) - Z(2);
if (Prediction) return FALSE; // !JIM! 8/5/97 Teleporter FAFhitscan SuperJump bug.
if (Prediction) return false; // !JIM! 8/5/97 Teleporter FAFhitscan SuperJump bug.
for (i = 0; i < SIZ(angs); i++)
{
@ -3865,12 +3865,12 @@ DoPlayerWadeSuperJump(PLAYERp pp)
if (hitinfo.sect >= 0 && labs(sector[hitinfo.sect].floorz - pp->posz) < Z(50))
{
if (Distance(pp->posx, pp->posy, hitinfo.pos.x, hitinfo.pos.y) < ((((int)pp->SpriteP->clipdist)<<2) + 256))
return TRUE;
return true;
}
}
}
return FALSE;
return false;
}
SWBOOL PlayerFlyKey(void)
@ -3878,7 +3878,7 @@ SWBOOL PlayerFlyKey(void)
SWBOOL key = false;
if (!GodMode)
return FALSE;
return false;
#if 0
// Cheat or not, this simply won't do.
@ -3919,15 +3919,15 @@ SWBOOL PlayerFallTest(PLAYERp pp, int player_height)
TEST(pp->lo_sectp->floorstat, FLOOR_STAT_SLOPE) &&
pp->lo_sectp == &sector[pp->lastcursectnum])
{
return FALSE;
return false;
}
else
{
return TRUE;
return true;
}
}
return FALSE;
return false;
}
void
@ -4093,20 +4093,20 @@ SWBOOL PlayerCeilingHit(PLAYERp pp, int zlimit)
{
if (pp->posz < zlimit)
{
return TRUE;
return true;
}
return FALSE;
return false;
}
SWBOOL PlayerFloorHit(PLAYERp pp, int zlimit)
{
if (pp->posz > zlimit)
{
return TRUE;
return true;
}
return FALSE;
return false;
}
void
@ -4221,10 +4221,10 @@ PlayerOnLadder(PLAYERp pp)
dir = DOT_PRODUCT_2D(pp->xvect, pp->yvect, sintable[NORM_ANGLE(FixedToInt(pp->q16ang)+512)], sintable[FixedToInt(pp->q16ang)]);
if (dir < 0)
return FALSE;
return false;
if (neartagwall < 0 || wall[neartagwall].lotag != TAG_WALL_CLIMB)
return FALSE;
return false;
for (i = 0; i < SIZ(angles); i++)
{
@ -4233,7 +4233,7 @@ PlayerOnLadder(PLAYERp pp)
&dist, 600L, NTAG_SEARCH_LO_HI, NULL);
if (wal < 0 || dist < 100 || wall[wal].lotag != TAG_WALL_CLIMB)
return FALSE;
return false;
FAFhitscan(pp->posx, pp->posy, pp->posz, pp->cursectnum,
sintable[NORM_ANGLE(FixedToInt(pp->q16ang) + angles[i] + 512)],
@ -4250,14 +4250,14 @@ PlayerOnLadder(PLAYERp pp)
if (TEST(sprite[hitinfo.sprite].cstat, CSTAT_SPRITE_BLOCK) &&
!TEST(sprite[hitinfo.sprite].cstat, CSTAT_SPRITE_ALIGNMENT_WALL))
{
return FALSE;
return false;
}
}
else
{
// if you hit a wall and it is not a climb wall - forget it
if (hitinfo.wall >= 0 && wall[hitinfo.wall].lotag != TAG_WALL_CLIMB)
return FALSE;
return false;
}
}
@ -4265,7 +4265,7 @@ PlayerOnLadder(PLAYERp pp)
lsp = FindNearSprite(pp->SpriteP, STAT_CLIMB_MARKER);
if (!lsp)
return FALSE;
return false;
// determine where the player is supposed to be in relation to the ladder
// move out in front of the ladder
@ -4294,15 +4294,15 @@ PlayerOnLadder(PLAYERp pp)
playerSetAngle(pp, pp->LadderAngle);
return TRUE;
return true;
}
SWBOOL DoPlayerTestCrawl(PLAYERp pp)
{
if (labs(pp->loz - pp->hiz) < PLAYER_STANDING_ROOM)
return TRUE;
return true;
return FALSE;
return false;
}
int
@ -4319,22 +4319,22 @@ PlayerInDiveArea(PLAYERp pp)
//sectp = pp->lo_sectp;
}
else
return FALSE;
return false;
if (TEST(sectp->extra, SECTFX_DIVE_AREA))
{
CheckFootPrints(pp);
return TRUE;
return true;
}
return FALSE;
return false;
}
int
PlayerCanDive(PLAYERp pp)
{
if (Prediction)
return FALSE;
return false;
// Crawl - check for diving
if ((pp->input.actions & SB_CROUCH) || pp->jump_speed > 0)
@ -4350,18 +4350,18 @@ PlayerCanDive(PLAYERp pp)
DoPlayerBeginDive(pp);
}
return TRUE;
return true;
}
}
return FALSE;
return false;
}
int
PlayerCanDiveNoWarp(PLAYERp pp)
{
if (Prediction)
return FALSE;
return false;
// check for diving
if (pp->jump_speed > 1400)
@ -4383,12 +4383,12 @@ PlayerCanDiveNoWarp(PLAYERp pp)
PlaySound(DIGI_SPLASH1, pp, v3df_dontpan);
DoPlayerBeginDiveNoWarp(pp);
return TRUE;
return true;
}
}
}
return FALSE;
return false;
}
@ -4556,7 +4556,7 @@ DoPlayerWarpToUnderwater(PLAYERp pp)
short i, nexti;
SECT_USERp sectu = SectUser[pp->cursectnum];
SPRITEp under_sp = NULL, over_sp = NULL;
char Found = FALSE;
bool Found = false;
short over, under;
if (Prediction)
@ -4572,13 +4572,13 @@ DoPlayerWarpToUnderwater(PLAYERp pp)
SectUser[over_sp->sectnum] &&
SectUser[over_sp->sectnum]->number == sectu->number)
{
Found = TRUE;
Found = true;
break;
}
}
PRODUCTION_ASSERT(Found == TRUE);
Found = FALSE;
PRODUCTION_ASSERT(Found == true);
Found = false;
// search for UNDERWATER "under" sprite for reference point
TRAVERSE_SPRITE_STAT(headspritestat[STAT_UNDERWATER], i, nexti)
@ -4589,12 +4589,12 @@ DoPlayerWarpToUnderwater(PLAYERp pp)
SectUser[under_sp->sectnum] &&
SectUser[under_sp->sectnum]->number == sectu->number)
{
Found = TRUE;
Found = true;
break;
}
}
PRODUCTION_ASSERT(Found == TRUE);
PRODUCTION_ASSERT(Found == true);
// get the offset from the sprite
u->sx = over_sp->x - pp->posx;
@ -4633,7 +4633,7 @@ DoPlayerWarpToSurface(PLAYERp pp)
short over, under;
SPRITEp under_sp = NULL, over_sp = NULL;
char Found = FALSE;
bool Found = false;
if (Prediction)
return;
@ -4647,13 +4647,13 @@ DoPlayerWarpToSurface(PLAYERp pp)
SectUser[under_sp->sectnum] &&
SectUser[under_sp->sectnum]->number == sectu->number)
{
Found = TRUE;
Found = true;
break;
}
}
PRODUCTION_ASSERT(Found == TRUE);
Found = FALSE;
PRODUCTION_ASSERT(Found == true);
Found = false;
// search for DIVE_AREA "over" sprite for reference point
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DIVE_AREA], i, nexti)
@ -4664,12 +4664,12 @@ DoPlayerWarpToSurface(PLAYERp pp)
SectUser[over_sp->sectnum] &&
SectUser[over_sp->sectnum]->number == sectu->number)
{
Found = TRUE;
Found = true;
break;
}
}
PRODUCTION_ASSERT(Found == TRUE);
PRODUCTION_ASSERT(Found == true);
// get the offset from the under sprite
u->sx = under_sp->x - pp->posx;
@ -4735,7 +4735,7 @@ DoPlayerBeginDive(PLAYERp pp)
if (Prediction)
return;
if (pp->Bloody) pp->Bloody = FALSE; // Water washes away the blood
if (pp->Bloody) pp->Bloody = false; // Water washes away the blood
SET(pp->Flags, PF_DIVING);
DoPlayerDivePalette(pp);
@ -4786,7 +4786,7 @@ void DoPlayerBeginDiveNoWarp(PLAYERp pp)
if (pp->cursectnum < 0 || !SectorIsUnderwaterArea(pp->cursectnum))
return;
if (pp->Bloody) pp->Bloody = FALSE; // Water washes away the blood
if (pp->Bloody) pp->Bloody = false; // Water washes away the blood
if (pp == Player + screenpeek)
{
@ -5115,10 +5115,10 @@ DoPlayerTestPlaxDeath(PLAYERp pp)
{
PlayerUpdateHealth(pp, -u->Health);
PlayerCheckDeath(pp, -1);
return TRUE;
return true;
}
return FALSE;
return false;
}
void
@ -5540,7 +5540,7 @@ DoPlayerBeginOperate(PLAYERp pp)
RESET(pp->Flags, PF_CRAWLING|PF_JUMPING|PF_FALLING|PF_LOCK_CRAWL);
DoPlayerOperateMatch(pp, TRUE);
DoPlayerOperateMatch(pp, true);
// look for gun before trying to using it
for (i = 0; sop->sp_num[i] != -1; i++)
@ -5627,7 +5627,7 @@ DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop)
RESET(pp->Flags, PF_CRAWLING|PF_JUMPING|PF_FALLING|PF_LOCK_CRAWL);
DoPlayerOperateMatch(pp, TRUE);
DoPlayerOperateMatch(pp, true);
// look for gun before trying to using it
for (i = 0; sop->sp_num[i] != -1; i++)
@ -5743,7 +5743,7 @@ DoPlayerStopOperate(PLAYERp pp)
RESET(pp->Flags, PF_WEAPON_DOWN);
DoPlayerResetMovement(pp);
DoTankTreads(pp);
DoPlayerOperateMatch(pp, FALSE);
DoPlayerOperateMatch(pp, false);
StopSOsound(pp->sop->mid_sector);
if (pp->sop_remote)
@ -6052,21 +6052,21 @@ void
DoPlayerDeathMessage(PLAYERp pp, PLAYERp killer)
{
int pnum;
SWBOOL SEND_OK = FALSE;
SWBOOL SEND_OK = false;
killer->KilledPlayer[pp-Player]++;
if (pp == killer && pp == Player + myconnectindex)
{
sprintf(ds,"%s %s",pp->PlayerName,SuicideNote[STD_RANDOM_RANGE(MAX_SUICIDE)]);
SEND_OK = TRUE;
SEND_OK = true;
}
else
// I am being killed
if (killer == Player + myconnectindex)
{
sprintf(ds,"%s",KilledPlayerMessage(pp,killer));
SEND_OK = TRUE;
SEND_OK = true;
}
if (SEND_OK)
@ -6255,7 +6255,7 @@ DoPlayerBeginDie(PLAYERp pp)
pp->SpriteP->xrepeat = 48;
pp->SpriteP->yrepeat = 48;
// Blood fountains
InitBloodSpray(pp->PlayerSprite,TRUE,105);
InitBloodSpray(pp->PlayerSprite,true,105);
break;
case PLAYER_DEATH_EXPLODE:
@ -6270,9 +6270,9 @@ DoPlayerBeginDie(PLAYERp pp)
pp->SpriteP->xrepeat = 48;
pp->SpriteP->yrepeat = 48;
// Blood fountains
InitBloodSpray(pp->PlayerSprite,TRUE,-1);
InitBloodSpray(pp->PlayerSprite,TRUE,-1);
InitBloodSpray(pp->PlayerSprite,TRUE,-1);
InitBloodSpray(pp->PlayerSprite,true,-1);
InitBloodSpray(pp->PlayerSprite,true,-1);
InitBloodSpray(pp->PlayerSprite,true,-1);
break;
case PLAYER_DEATH_SQUISH:
@ -6288,7 +6288,7 @@ DoPlayerBeginDie(PLAYERp pp)
pp->SpriteP->xrepeat = 48;
pp->SpriteP->yrepeat = 48;
// Blood fountains
InitBloodSpray(pp->PlayerSprite,TRUE,105);
InitBloodSpray(pp->PlayerSprite,true,105);
break;
}
@ -6427,9 +6427,9 @@ void DoPlayerDeathCheckKeys(PLAYERp pp)
else
{
// If he's not on the floor, then gib like a mo-fo!
InitBloodSpray(pp->PlayerSprite,TRUE,-1);
InitBloodSpray(pp->PlayerSprite,TRUE,-1);
InitBloodSpray(pp->PlayerSprite,TRUE,-1);
InitBloodSpray(pp->PlayerSprite,true,-1);
InitBloodSpray(pp->PlayerSprite,true,-1);
InitBloodSpray(pp->PlayerSprite,true,-1);
}
PlayerSpawnPosition(pp);
@ -6472,7 +6472,7 @@ void DoPlayerDeathCheckKeys(PLAYERp pp)
videoFadePalette(0,0,0,0);
}
pp->NightVision = FALSE;
pp->NightVision = false;
pp->FadeAmt = 0;
DoPlayerDivePalette(pp);
DoPlayerNightVisionPalette(pp);
@ -7299,7 +7299,7 @@ void MultiPlayLimits(void)
{
short pnum;
PLAYERp pp;
SWBOOL Done = FALSE;
SWBOOL Done = false;
if (gNet.MultiGameType != MULTI_GAME_COMMBAT)
return;
@ -7311,7 +7311,7 @@ void MultiPlayLimits(void)
pp = Player + pnum;
if (pp->Kills >= gNet.KillLimit)
{
Done = TRUE;
Done = true;
}
}
}
@ -7321,7 +7321,7 @@ void MultiPlayLimits(void)
gNet.TimeLimitClock -= synctics;
if (gNet.TimeLimitClock <= 0)
Done = TRUE;
Done = true;
}
if (Done)
@ -7359,7 +7359,7 @@ void PauseMultiPlay(void)
if (paused)
{
SavePrediction = PredictionOn;
PredictionOn = FALSE;
PredictionOn = false;
}
else
{
@ -7577,7 +7577,7 @@ int SearchSpawnPosition(PLAYERp pp)
sp = &sprite[spawn_sprite];
blocked = FALSE;
blocked = false;
// check to see if anyone else is blocking this spot
TRAVERSE_CONNECT(pnum)
@ -7588,7 +7588,7 @@ int SearchSpawnPosition(PLAYERp pp)
{
if (FindDistance3D(sp->x - opp->posx, sp->y - opp->posy, sp->z - opp->posz) < 1000)
{
blocked = TRUE;
blocked = true;
break;
}
}
@ -7647,7 +7647,7 @@ PlayerSpawnPosition(PLAYERp pp)
break;
}
SpawnPositionUsed[pos_num] = TRUE;
SpawnPositionUsed[pos_num] = true;
if (spawn_sprite < 0)
{

View file

@ -36,8 +36,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
BEGIN_SW_NS
SWBOOL PredictionOn = TRUE;
SWBOOL Prediction = FALSE;
SWBOOL PredictionOn = true;
SWBOOL Prediction = false;
PLAYER PredictPlayer;
USER PredictUser;
PLAYERp ppp = &PredictPlayer;
@ -102,11 +102,11 @@ DoPrediction(PLAYERp ppp)
ppp->oq16horiz = ppp->q16horiz;
// go through the player MOVEMENT code only
Prediction = TRUE;
Prediction = true;
DoPlayerSectorUpdatePreMove(ppp);
(*ppp->DoPlayerAction)(ppp);
DoPlayerSectorUpdatePostMove(ppp);
Prediction = FALSE;
Prediction = false;
// restore things
User[ppp->PlayerSprite] = u;

View file

@ -280,7 +280,7 @@ SWBOOL
SetQuake(PLAYERp pp, short tics, short amt)
{
SpawnQuake(pp->cursectnum, pp->posx, pp->posy, pp->posz, tics, amt, 30000);
return FALSE;
return false;
}
int

View file

@ -889,7 +889,7 @@ PickJumpSpeed(short SpriteNum, int pix_height)
u->jump_speed = -600;
u->jump_grav = 8;
while (TRUE)
while (true)
{
if (GetJumpHeight(u->jump_speed, u->jump_grav) > pix_height + 20)
break;
@ -917,7 +917,7 @@ PickJumpMaxSpeed(short SpriteNum, short max_speed)
zh = SPRITEp_TOS(sp);
while (TRUE)
while (true)
{
if (zh - Z(GetJumpHeight(u->jump_speed, u->jump_grav)) - Z(16) > u->hiz)
break;
@ -945,7 +945,7 @@ InitRipperHang(short SpriteNum)
hitdata_t hitinfo = { { 0, 0, 0 }, -2, 0, -2 };
SWBOOL Found = FALSE;
SWBOOL Found = false;
short dang, tang;
for (dang = 0; dang < 2048; dang += 128)
@ -969,7 +969,7 @@ InitRipperHang(short SpriteNum)
continue;
}
Found = TRUE;
Found = true;
sp->ang = tang;
break;
}
@ -1165,11 +1165,11 @@ DoRipperQuickJump(short SpriteNum)
NewStateGroup(SpriteNum, sg_RipperJumpAttack);
// move past the first state
u->Tics = 30;
return TRUE;
return true;
}
}
return FALSE;
return false;
}

View file

@ -945,7 +945,7 @@ InitRipper2Hang(short SpriteNum)
hitdata_t hitinfo = { { 0, 0, 0 }, -2, 0, -2 };
SWBOOL Found = FALSE;
SWBOOL Found = false;
short dang, tang;
for (dang = 0; dang < 2048; dang += 128)
@ -968,7 +968,7 @@ InitRipper2Hang(short SpriteNum)
continue;
}
Found = TRUE;
Found = true;
sp->ang = tang;
break;
}
@ -1179,11 +1179,11 @@ DoRipper2QuickJump(short SpriteNum)
NewStateGroup(SpriteNum, sg_Ripper2JumpAttack);
// move past the first state
u->Tics = 30;
return TRUE;
return true;
}
}
return FALSE;
return false;
}

View file

@ -99,11 +99,11 @@ FAF_Sector(short sectnum)
if (sp->statnum == STAT_FAF &&
(sp->hitag >= VIEW_LEVEL1 && sp->hitag <= VIEW_LEVEL6))
{
return TRUE;
return true;
}
}
return FALSE;
return false;
}
void SetWallWarpHitscan(short sectnum)
@ -155,7 +155,7 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, int16_t sectnum,
int loz, hiz;
short newsectnum = sectnum;
int startclipmask = 0;
SWBOOL plax_found = FALSE;
SWBOOL plax_found = false;
if (clipmask == CLIPMASK_MISSILE)
startclipmask = CLIPMASK_WARP_HITSCAN;
@ -202,7 +202,7 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, int16_t sectnum,
{
//DSPRINTF(ds,"hitinfo->pos.x %d, hitinfo->pos.y %d, hitinfo->pos.z %d",hitinfo->pos.x, hitinfo->pos.y, hitinfo->pos.z);
MONO_PRINT(ds);
ASSERT(TRUE == FALSE);
ASSERT(true == false);
}
}
}
@ -243,7 +243,7 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, int16_t sectnum,
if (FAF_ConnectFloor(hitinfo->sect) && !TEST(sector[hitinfo->sect].floorstat, FLOOR_STAT_FAF_BLOCK_HITSCAN))
{
updatesectorz(hitinfo->pos.x, hitinfo->pos.y, hitinfo->pos.z + Z(12), &newsectnum);
plax_found = TRUE;
plax_found = true;
}
}
else if (labs(hitinfo->pos.z - hiz) < Z(4))
@ -251,7 +251,7 @@ FAFhitscan(int32_t x, int32_t y, int32_t z, int16_t sectnum,
if (FAF_ConnectCeiling(hitinfo->sect) && !TEST(sector[hitinfo->sect].floorstat, CEILING_STAT_FAF_BLOCK_HITSCAN))
{
updatesectorz(hitinfo->pos.x, hitinfo->pos.y, hitinfo->pos.z - Z(12), &newsectnum);
plax_found = TRUE;
plax_found = true;
}
}
}
@ -274,7 +274,7 @@ FAFcansee(int32_t xs, int32_t ys, int32_t zs, int16_t sects,
short ang;
hitdata_t hitinfo;
int dist;
SWBOOL plax_found = FALSE;
SWBOOL plax_found = false;
vec3_t s = { xs, ys, zs };
// ASSERT(sects >= 0 && secte >= 0);
@ -311,7 +311,7 @@ FAFcansee(int32_t xs, int32_t ys, int32_t zs, int16_t sects,
&hitinfo, CLIPMASK_MISSILE);
if (hitinfo.sect < 0)
return FALSE;
return false;
// make sure it hit JUST a sector before doing a check
if (hitinfo.wall < 0 && hitinfo.sprite < 0)
@ -322,7 +322,7 @@ FAFcansee(int32_t xs, int32_t ys, int32_t zs, int16_t sects,
if (FAF_ConnectFloor(hitinfo.sect))
{
updatesectorz(hitinfo.pos.x, hitinfo.pos.y, hitinfo.pos.z + Z(12), &newsectnum);
plax_found = TRUE;
plax_found = true;
}
}
else if (labs(hitinfo.pos.z - hiz) < Z(4))
@ -330,7 +330,7 @@ FAFcansee(int32_t xs, int32_t ys, int32_t zs, int16_t sects,
if (FAF_ConnectCeiling(hitinfo.sect))
{
updatesectorz(hitinfo.pos.x, hitinfo.pos.y, hitinfo.pos.z - Z(12), &newsectnum);
plax_found = TRUE;
plax_found = true;
}
}
}
@ -342,7 +342,7 @@ FAFcansee(int32_t xs, int32_t ys, int32_t zs, int16_t sects,
if (plax_found)
return cansee(hitinfo.pos.x,hitinfo.pos.y,hitinfo.pos.z,newsectnum,xe,ye,ze,secte);
return FALSE;
return false;
}
@ -373,7 +373,7 @@ SWBOOL SectorZadjust(int ceilhit, int32_t* hiz, short florhit, int32_t* loz)
extern int PlaxCeilGlobZadjust, PlaxFloorGlobZadjust;
int z_amt = 0;
SWBOOL SkipFAFcheck = FALSE;
SWBOOL SkipFAFcheck = false;
if ((int)florhit != -1)
{
@ -399,7 +399,7 @@ SWBOOL SectorZadjust(int ceilhit, int32_t* hiz, short florhit, int32_t* loz)
{
// explicit z adjust overrides Connect Floor
*loz += z_amt;
SkipFAFcheck = TRUE;
SkipFAFcheck = true;
}
}
@ -449,7 +449,7 @@ SWBOOL SectorZadjust(int ceilhit, int32_t* hiz, short florhit, int32_t* loz)
{
// explicit z adjust overrides Connect Floor
*loz += z_amt;
SkipFAFcheck = TRUE;
SkipFAFcheck = true;
}
}
@ -641,10 +641,10 @@ PicInView(short tile_num, SWBOOL reset)
if (reset)
RESET(gotpic[tile_num >> 3], 1 << (tile_num & 7));
return TRUE;
return true;
}
return FALSE;
return false;
}
void
@ -696,7 +696,7 @@ GetUpperLowerSector(short match, int x, int y, short *upper, short *lower)
// will not hurt if GlobStackSect is invalid - inside checks for this
if (inside(x, y, GlobStackSect[i]) == 1)
{
SWBOOL found = FALSE;
SWBOOL found = false;
TRAVERSE_SPRITE_SECT(headspritesect[GlobStackSect[i]], SpriteNum, Next)
{
@ -706,7 +706,7 @@ GetUpperLowerSector(short match, int x, int y, short *upper, short *lower)
(sp->hitag >= VIEW_LEVEL1 && sp->hitag <= VIEW_LEVEL6)
&& sp->lotag == match)
{
found = TRUE;
found = true;
}
}
@ -726,7 +726,7 @@ GetUpperLowerSector(short match, int x, int y, short *upper, short *lower)
{
if (inside(x, y, (short) i) == 1)
{
SWBOOL found = FALSE;
SWBOOL found = false;
TRAVERSE_SPRITE_SECT(headspritesect[i], SpriteNum, Next)
{
@ -736,7 +736,7 @@ GetUpperLowerSector(short match, int x, int y, short *upper, short *lower)
(sp->hitag >= VIEW_LEVEL1 && sp->hitag <= VIEW_LEVEL6)
&& sp->lotag == match)
{
found = TRUE;
found = true;
}
}
@ -844,7 +844,7 @@ FindCeilingView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum
}
if (*sectnum < 0)
return FALSE;
return false;
ASSERT(sp);
ASSERT(sp->hitag == VIEW_THRU_FLOOR);
@ -879,7 +879,7 @@ FindCeilingView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum
}
}
return TRUE;
return true;
}
SWBOOL
@ -932,7 +932,7 @@ FindFloorView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum)
}
if (*sectnum < 0)
return FALSE;
return false;
ASSERT(sp);
ASSERT(sp->hitag == VIEW_THRU_CEILING);
@ -969,7 +969,7 @@ FindFloorView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum)
}
}
return TRUE;
return true;
}
short
@ -996,7 +996,7 @@ ViewSectorInScene(short cursectnum, short level)
// found a potential match
match = sp->lotag;
if (!PicInView(FAF_MIRROR_PIC, TRUE))
if (!PicInView(FAF_MIRROR_PIC, true))
return -1;
return match;
@ -1034,7 +1034,7 @@ DrawOverlapRoom(int tx, int ty, int tz, fixed_t tq16ang, fixed_t tq16horiz, shor
sector[save.sectnum[i]].floorheinum = save.slope[i];
}
analyzesprites(tx, ty, tz, FALSE);
analyzesprites(tx, ty, tz, false);
post_analyzesprites();
renderDrawMasks();
@ -1060,7 +1060,7 @@ DrawOverlapRoom(int tx, int ty, int tz, fixed_t tq16ang, fixed_t tq16horiz, shor
sector[save.sectnum[i]].ceilingheinum = save.slope[i];
}
analyzesprites(tx, ty, tz, FALSE);
analyzesprites(tx, ty, tz, false);
post_analyzesprites();
renderDrawMasks();

View file

@ -78,7 +78,7 @@ RotatorSwitch(short match, short setting)
{
SPRITEp sp;
short i,nexti;
SWBOOL found = FALSE;
SWBOOL found = false;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti)
{
@ -86,7 +86,7 @@ RotatorSwitch(short match, short setting)
if (sp->lotag == TAG_SPRITE_SWITCH_VATOR && sp->hitag == match)
{
found = TRUE;
found = true;
AnimateSwitch(sp, setting);
}
}
@ -142,7 +142,7 @@ short DoRotatorOperate(PLAYERp pp, short sectnum)
if (TestRotatorMatchActive(match))
return -1;
else
return DoRotatorMatch(pp, match, TRUE);
return DoRotatorMatch(pp, match, true);
}
return -1;
@ -251,11 +251,11 @@ TestRotatorMatchActive(short match)
continue;
if (TEST(fu->Flags, SPR_ACTIVE) || fu->Tics)
return TRUE;
return true;
}
}
return FALSE;
return false;
}
@ -315,7 +315,7 @@ int DoRotatorMove(short SpriteNum)
int i, nexti;
vec2_t nxy;
int dist,closest;
SWBOOL kill = FALSE;
SWBOOL kill = false;
r = u->rotator;
@ -386,7 +386,7 @@ int DoRotatorMove(short SpriteNum)
}
if (TEST_BOOL2(sp))
kill = TRUE;
kill = true;
}
closest = 99999;

View file

@ -716,7 +716,7 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
INITLIST(&pp->PanelSpriteList);
while (TRUE)
while (true)
{
MREAD(&ndx, sizeof(ndx),1,fil);
@ -942,7 +942,7 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
{
INITLIST(otlist[i]);
while (TRUE)
while (true)
{
MREAD(&ndx, sizeof(ndx),1,fil);
@ -1069,13 +1069,13 @@ bool GameInterface::LoadGame(FSaveGameNode* sv)
}
// this is not a new game
ShadowWarrior::NewGame = FALSE;
ShadowWarrior::NewGame = false;
DoPlayerDivePalette(Player+myconnectindex);
DoPlayerNightVisionPalette(Player+myconnectindex);
SavegameLoaded = TRUE;
SavegameLoaded = true;
return true;
}

View file

@ -60,7 +60,7 @@ static char token[MAXTOKEN];
static int grabbed;
static int scriptline;
static SWBOOL endofscript;
static SWBOOL tokenready; // only TRUE if UnGetToken was just called
static SWBOOL tokenready; // only true if UnGetToken was just called
/*
==============
@ -86,8 +86,8 @@ TArray<uint8_t> LoadScriptFile(const char *filename)
{
scriptbuffer.Push(0);
scriptline = 1;
endofscript = FALSE;
tokenready = FALSE;
endofscript = false;
tokenready = false;
}
return scriptbuffer;
}
@ -107,7 +107,7 @@ void GetToken(SWBOOL crossline)
if (tokenready) // is a token already waiting?
{
tokenready = FALSE;
tokenready = false;
return;
}
@ -115,7 +115,7 @@ void GetToken(SWBOOL crossline)
{
if (!crossline)
Printf("Error: Line %i is incomplete\n",scriptline);
endofscript = TRUE;
endofscript = true;
return;
}
@ -129,7 +129,7 @@ skipspace:
{
if (!crossline)
Printf("Error: Line %i is incomplete\n",scriptline);
endofscript = TRUE;
endofscript = true;
return;
}
if (*script_p++ == '\n')
@ -144,7 +144,7 @@ skipspace:
{
if (!crossline)
Printf("Error: Line %i is incomplete\n", scriptline);
endofscript = TRUE;
endofscript = true;
return;
}
@ -155,7 +155,7 @@ return;
while (*script_p++ != '\n')
if (script_p >= scriptend_p)
{
endofscript = TRUE;
endofscript = true;
return;
}
goto skipspace;
@ -218,17 +218,17 @@ void LoadKVXFromScript(const char* filename)
do
{
GetToken(TRUE); // Crossing a line boundary on the end of line to first token
GetToken(true); // Crossing a line boundary on the end of line to first token
// of a new line is permitted (and expected)
if (endofscript)
break;
lTile = atol(token);
GetToken(FALSE);
GetToken(false);
lNumber = atol(token);
GetToken(FALSE);
GetToken(false);
// Load the voxel file into memory
if (!qloadkvx(lNumber,token))
@ -273,14 +273,14 @@ void LoadPLockFromScript(const char *filename)
do
{
GetToken(TRUE); // Crossing a line boundary on the end of line to first token
GetToken(true); // Crossing a line boundary on the end of line to first token
// of a new line is permitted (and expected)
if (endofscript)
break;
lTile = atoi(token);
GetToken(FALSE);
GetToken(false);
lNumber = atoi(token);
// Store the sprite and voxel numbers for later use

View file

@ -463,7 +463,7 @@ SectorSetup(void)
break;
case TAG_DOOR_SLIDING:
SetSectorWallBits(i, WALLFX_DONT_STICK, TRUE, TRUE);
SetSectorWallBits(i, WALLFX_DONT_STICK, true, true);
break;
case TAG_SINE_WAVE_FLOOR:
@ -517,7 +517,7 @@ SectorSetup(void)
swf->ceiling_origz = sector[swf->sector].ceilingz - (range >> 2);
// look for the rest by distance
for (swf_ndx = 1, sector_cnt = 1; TRUE; swf_ndx++)
for (swf_ndx = 1, sector_cnt = 1; true; swf_ndx++)
{
// near_sect = FindNextSectorByTag(base_sect,
// TAG_SINE_WAVE_FLOOR + swf_ndx);
@ -867,21 +867,21 @@ OperateSector(short sectnum, short player_is_operating)
if (SectUser[sectnum] && SectUser[sectnum]->stag == SECT_LOCK_DOOR)
return FALSE;
return false;
TRAVERSE_SPRITE_SECT(headspritesect[sectnum], i, nexti)
{
fsp = &sprite[i];
if (SectUser[fsp->sectnum] && SectUser[fsp->sectnum]->stag == SECT_LOCK_DOOR)
return FALSE;
return false;
if (fsp->statnum == STAT_VATOR && SP_TAG1(fsp) == SECT_VATOR && TEST_BOOL7(fsp))
return FALSE;
return false;
if (fsp->statnum == STAT_ROTATOR && SP_TAG1(fsp) == SECT_ROTATOR && TEST_BOOL7(fsp))
return FALSE;
return false;
if (fsp->statnum == STAT_SLIDOR && SP_TAG1(fsp) == SECT_SLIDOR && TEST_BOOL7(fsp))
return FALSE;
return false;
}
}
@ -894,18 +894,18 @@ OperateSector(short sectnum, short player_is_operating)
case TAG_VATOR:
DoVatorOperate(pp, sectnum);
return TRUE;
return true;
case TAG_ROTATOR:
DoRotatorOperate(pp, sectnum);
return TRUE;
return true;
case TAG_SLIDOR:
DoSlidorOperate(pp, sectnum);
return TRUE;
return true;
}
return FALSE;
return false;
}
int
@ -919,7 +919,7 @@ OperateWall(short wallnum, short player_is_operating)
}
*/
return FALSE;
return false;
}
short
@ -950,7 +950,7 @@ AnimateSwitch(SPRITEp sp, short tgt_value)
switch (sp->picnum)
{
// set to TRUE/ON
// set to true/ON
case SWITCH_SKULL:
case SWITCH_LEVER:
case SWITCH_LIGHT:
@ -1317,10 +1317,10 @@ SWBOOL TestKillSectorObject(SECTOR_OBJECTp sop)
CollapseSectorObject(sop, sop->xmid, sop->ymid);
DoSpawnSpotsForKill(sop->match_event);
KillSectorObjectSprites(sop);
return TRUE;
return true;
}
return FALSE;
return false;
}
short
@ -1337,7 +1337,7 @@ DoSectorObjectKillMatch(short match)
return TestKillSectorObject(sop);
}
return FALSE;
return false;
}
@ -1355,11 +1355,11 @@ SearchExplodeSectorMatch(short match)
{
KillMatchingCrackSprites(match);
DoExplodeSector(match);
return TRUE;
return true;
}
}
return FALSE;
return false;
}
void
@ -1437,13 +1437,13 @@ ShootableSwitch(short SpriteNum)
{
case SWITCH_SHOOTABLE_1:
//RESET(sp->cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
OperateSprite(SpriteNum, FALSE);
OperateSprite(SpriteNum, false);
sp->picnum = SWITCH_SHOOTABLE_1 + 1;
break;
case SWITCH_FUSE:
case SWITCH_FUSE + 1:
RESET(sp->cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
OperateSprite(SpriteNum, FALSE);
OperateSprite(SpriteNum, false);
sp->picnum = SWITCH_FUSE + 2;
break;
}
@ -1469,7 +1469,7 @@ void DoDeleteSpriteMatch(short match)
unsigned stat;
short found;
while (TRUE)
while (true)
{
found = -1;
@ -1595,10 +1595,10 @@ void DoMatchEverything(PLAYERp pp, short match, short state)
DoSpikeMatch(match);
if (!TestRotatorMatchActive(match))
DoRotatorMatch(pp, match, FALSE);
DoRotatorMatch(pp, match, false);
if (!TestSlidorMatchActive(match))
DoSlidorMatch(pp, match, FALSE);
DoSlidorMatch(pp, match, false);
DoSectorObjectKillMatch(match);
DoSectorObjectSetScale(match);
@ -1639,12 +1639,12 @@ SWBOOL ComboSwitchTest(short combo_type, short match)
// if any one is not set correctly then switch is not set
if (state != SP_TAG3(sp))
{
return FALSE;
return false;
}
}
}
return TRUE;
return true;
}
// NOTE: switches are always wall sprites
@ -1662,17 +1662,17 @@ OperateSprite(short SpriteNum, short player_is_operating)
extern STATE s_Pachinko4Operate[];
if (Prediction)
return FALSE;
return false;
if (sp->picnum == ST1)
return FALSE;
return false;
if (player_is_operating)
{
pp = GlobPlayerP;
if (!FAFcansee(pp->posx, pp->posy, pp->posz, pp->cursectnum, sp->x, sp->y, sp->z - DIV2(SPRITEp_SIZE_Z(sp)), sp->sectnum))
return FALSE;
return false;
}
switch (sp->lotag)
@ -1683,7 +1683,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
case MECHANICGIRL_R0:
case SAILORGIRL_R0:
case PRUNEGIRL_R0:
//if(RANDOM_RANGE(1000) < 500) return(TRUE);
//if(RANDOM_RANGE(1000) < 500) return(true);
//if(u->FlagOwner == 0)
{
short choose_snd;
@ -1691,7 +1691,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
u->FlagOwner = 1;
u->WaitTics = SEC(4);
if (pp != Player+myconnectindex) return TRUE;
if (pp != Player+myconnectindex) return true;
choose_snd = STD_RANDOM_RANGE(1000);
if (sp->lotag == CARGIRL_R0)
@ -1761,51 +1761,51 @@ OperateSprite(short SpriteNum, short player_is_operating)
PlayerSound(DIGI_REALTITS, v3df_dontpan|v3df_follow,pp);
}
}
return TRUE;
return true;
case PACHINKO1:
// Don't mess with it if it's already going
if (u->WaitTics > 0) return TRUE;
if (u->WaitTics > 0) return true;
PlaySound(DIGI_PFLIP, sp, v3df_none);
u->WaitTics = SEC(3) + SEC(RANDOM_RANGE(10));
ChangeState(SpriteNum,s_Pachinko1Operate);
return TRUE;
return true;
case PACHINKO2:
// Don't mess with it if it's already going
if (u->WaitTics > 0) return TRUE;
if (u->WaitTics > 0) return true;
PlaySound(DIGI_PFLIP, sp, v3df_none);
u->WaitTics = SEC(3) + SEC(RANDOM_RANGE(10));
ChangeState(SpriteNum,s_Pachinko2Operate);
return TRUE;
return true;
case PACHINKO3:
// Don't mess with it if it's already going
if (u->WaitTics > 0) return TRUE;
if (u->WaitTics > 0) return true;
PlaySound(DIGI_PFLIP, sp, v3df_none);
u->WaitTics = SEC(3) + SEC(RANDOM_RANGE(10));
ChangeState(SpriteNum,s_Pachinko3Operate);
return TRUE;
return true;
case PACHINKO4:
// Don't mess with it if it's already going
if (u->WaitTics > 0) return TRUE;
if (u->WaitTics > 0) return true;
PlaySound(DIGI_PFLIP, sp, v3df_none);
u->WaitTics = SEC(3) + SEC(RANDOM_RANGE(10));
ChangeState(SpriteNum,s_Pachinko4Operate);
return TRUE;
return true;
case SWITCH_LOCKED:
key_num = sp->hitag;
@ -1820,7 +1820,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
UnlockKeyLock(key_num, SpriteNum);
}
return TRUE;
return true;
case TAG_COMBO_SWITCH_EVERYTHING:
@ -1833,7 +1833,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
DoMatchEverything(pp, sp->hitag, ON);
}
return TRUE;
return true;
case TAG_COMBO_SWITCH_EVERYTHING_ONCE:
@ -1848,25 +1848,25 @@ OperateSprite(short SpriteNum, short player_is_operating)
sp->lotag = 0;
sp->hitag = 0;
return TRUE;
return true;
case TAG_SWITCH_EVERYTHING:
state = AnimateSwitch(sp, -1);
DoMatchEverything(pp, sp->hitag, state);
return TRUE;
return true;
case TAG_SWITCH_EVERYTHING_ONCE:
state = AnimateSwitch(sp, -1);
DoMatchEverything(pp, sp->hitag, state);
sp->lotag = 0;
sp->hitag = 0;
return TRUE;
return true;
case TAG_LIGHT_SWITCH:
state = AnimateSwitch(sp, -1);
DoLightingMatch(sp->hitag, state);
return TRUE;
return true;
case TAG_SPRITE_SWITCH_VATOR:
{
@ -1879,12 +1879,12 @@ OperateSprite(short SpriteNum, short player_is_operating)
DoSpikeMatch(sp->hitag);
if (!TestRotatorMatchActive(sp->hitag))
DoRotatorMatch(pp, sp->hitag, FALSE);
DoRotatorMatch(pp, sp->hitag, false);
if (!TestSlidorMatchActive(sp->hitag))
DoSlidorMatch(pp, sp->hitag, FALSE);
DoSlidorMatch(pp, sp->hitag, false);
return TRUE;
return true;
}
case TAG_LEVEL_EXIT_SWITCH:
@ -1900,7 +1900,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
map = FindMapByLevelNum(currentLevel->levelNumber + 1);
ChangeLevel(map, -1);
return TRUE;
return true;
}
case TAG_SPRITE_GRATING:
@ -1916,20 +1916,20 @@ OperateSprite(short SpriteNum, short player_is_operating)
sp->lotag = 0;
sp->hitag /= 2;
return TRUE;
return true;
}
case TAG_SO_SCALE_SWITCH:
AnimateSwitch(sp, -1);
DoSectorObjectSetScale(sp->hitag);
return TRUE;
return true;
case TAG_SO_SCALE_ONCE_SWITCH:
AnimateSwitch(sp, -1);
DoSectorObjectSetScale(sp->hitag);
sp->lotag = 0;
sp->hitag = 0;
return TRUE;
return true;
case TAG_SO_EVENT_SWITCH:
{
@ -1962,13 +1962,13 @@ OperateSprite(short SpriteNum, short player_is_operating)
PlaySound(DIGI_BIGSWITCH, sp, v3df_none);
return TRUE;
return true;
break;
}
}
return FALSE;
return false;
}
int DoTrapReset(short match)
@ -2134,9 +2134,9 @@ OperateTripTrigger(PLAYERp pp)
if (!TestSpikeMatchActive(sectp->hitag))
DoSpikeMatch(sectp->hitag);
if (!TestRotatorMatchActive(sectp->hitag))
DoRotatorMatch(pp, sectp->hitag, FALSE);
DoRotatorMatch(pp, sectp->hitag, false);
if (!TestSlidorMatchActive(sectp->hitag))
DoSlidorMatch(pp, sectp->hitag, FALSE);
DoSlidorMatch(pp, sectp->hitag, false);
break;
case TAG_LIGHT_TRIGGER:
@ -2314,7 +2314,7 @@ SWBOOL NearThings(PLAYERp pp)
{
if (pp == Player+myconnectindex)
PlayerSound(sector[pp->cursectnum].lotag, v3df_follow|v3df_dontpan,pp);
return FALSE;
return false;
}
neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, FixedToInt(pp->q16ang),
@ -2334,7 +2334,7 @@ SWBOOL NearThings(PLAYERp pp)
if (pp == Player+myconnectindex)
PlayerSound(sp->lotag, v3df_follow|v3df_dontpan,pp);
}
return FALSE; // Return false so he doesn't grunt
return false; // Return false so he doesn't grunt
}
if (neartagwall >= 0)
@ -2344,9 +2344,9 @@ SWBOOL NearThings(PLAYERp pp)
{
if (pp == Player+myconnectindex)
PlayerSound(wall[neartagwall].lotag, v3df_follow|v3df_dontpan,pp);
return FALSE; // We are playing a sound so don't return true
return false; // We are playing a sound so don't return true
}
return TRUE;
return true;
}
// This only gets called if nothing else worked, check for nearness to a wall
{
@ -2360,17 +2360,17 @@ SWBOOL NearThings(PLAYERp pp)
&hitinfo, CLIPMASK_MISSILE);
if (hitinfo.sect < 0)
return FALSE;
return false;
if (Distance(hitinfo.pos.x, hitinfo.pos.y, pp->posx, pp->posy) > 1500)
return FALSE;
return false;
// hit a sprite?
if (hitinfo.sprite >= 0)
return FALSE;
return false;
if (neartagsect >= 0)
return TRUE;
return true;
if (hitinfo.wall >= 0)
{
@ -2387,10 +2387,10 @@ SWBOOL NearThings(PLAYERp pp)
PlayerSound(DIGI_SEARCHWALL, v3df_follow|v3df_dontpan,pp);
}
return TRUE;
return true;
}
return FALSE;
return false;
}
}
@ -2547,13 +2547,13 @@ int DoPlayerGrabStar(PLAYERp pp)
KillSprite(StarQueue[i]);
StarQueue[i] = -1;
if (TEST(pp->WpnFlags, BIT(WPN_STAR)))
return TRUE;
return true;
SET(pp->WpnFlags, BIT(WPN_STAR));
InitWeaponStar(pp);
return TRUE;
return true;
}
return FALSE;
return false;
}
@ -2592,17 +2592,17 @@ PlayerOperateEnv(PLAYERp pp)
BuildNearTagList(nti, sizeof(nti), pp, pp->posz, 2048L, NTAG_SEARCH_LO_HI, 8);
found = FALSE;
found = false;
// try and find a sprite
for (nt_ndx = 0; nti[nt_ndx].dist >= 0; nt_ndx++)
{
if (nti[nt_ndx].spritenum >= 0 && nti[nt_ndx].dist < 1024 + 768)
{
if (OperateSprite(nti[nt_ndx].spritenum, TRUE))
if (OperateSprite(nti[nt_ndx].spritenum, true))
{
pp->KeyPressBits &= ~SB_OPEN;
found = TRUE;
found = true;
}
}
}
@ -2628,7 +2628,7 @@ PlayerOperateEnv(PLAYERp pp)
{
if (nti[nt_ndx].spritenum >= 0 && nti[nt_ndx].dist < 1024 + 768)
{
if (OperateSprite(nti[nt_ndx].spritenum, TRUE))
if (OperateSprite(nti[nt_ndx].spritenum, true))
{
pp->KeyPressBits &= ~SB_OPEN;
break;
@ -2648,7 +2648,7 @@ PlayerOperateEnv(PLAYERp pp)
if (neartagsector >= 0 && neartaghitdist < 1024)
{
if (OperateSector(neartagsector, TRUE))
if (OperateSector(neartagsector, true))
{
// Release the key
pp->KeyPressBits &= ~SB_OPEN;
@ -2657,7 +2657,7 @@ PlayerOperateEnv(PLAYERp pp)
if (neartagwall >= 0 && neartaghitdist < 1024)
{
if (OperateWall(neartagwall, TRUE))
if (OperateWall(neartagwall, true))
{
pp->KeyPressBits &= ~SB_OPEN;
}
@ -2681,7 +2681,7 @@ PlayerOperateEnv(PLAYERp pp)
pp->KeyPressBits &= ~SB_OPEN;
break;
case TAG_DOOR_ROTATE:
if (OperateSector(pp->cursectnum, TRUE))
if (OperateSector(pp->cursectnum, true))
pp->KeyPressBits &= ~SB_OPEN;
break;
}
@ -3269,7 +3269,7 @@ DoSector(void)
continue;
riding = FALSE;
riding = false;
min_dist = 999999;
TRAVERSE_CONNECT(pnum)
@ -3278,7 +3278,7 @@ DoSector(void)
if (pp->sop_riding == sop)
{
riding = TRUE;
riding = true;
pp->sop_riding = NULL;
break;
}

View file

@ -552,7 +552,7 @@ int DoSkelTeleport(short SpriteNum)
x = sp->x;
y = sp->y;
while (TRUE)
while (true)
{
sp->x = x;
sp->y = y;

View file

@ -73,7 +73,7 @@ SlidorSwitch(short match, short setting)
{
SPRITEp sp;
short i,nexti;
SWBOOL found = FALSE;
SWBOOL found = false;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti)
{
@ -81,7 +81,7 @@ SlidorSwitch(short match, short setting)
if (sp->lotag == TAG_SPRITE_SWITCH_VATOR && sp->hitag == match)
{
found = TRUE;
found = true;
AnimateSwitch(sp, setting);
}
}
@ -138,7 +138,7 @@ short DoSlidorOperate(PLAYERp pp, short sectnum)
if (TestSlidorMatchActive(match))
return -1;
else
return DoSlidorMatch(pp, match, TRUE);
return DoSlidorMatch(pp, match, true);
}
return -1;
@ -247,11 +247,11 @@ TestSlidorMatchActive(short match)
continue;
if (TEST(fu->Flags, SPR_ACTIVE) || fu->Tics)
return TRUE;
return true;
}
}
return FALSE;
return false;
}
void DoSlidorInterp(short SpriteNum, INTERP_FUNCp interp_func)
@ -538,7 +538,7 @@ int DoSlidorMove(short SpriteNum)
SPRITEp sp = u->SpriteP;
ROTATORp r;
int old_pos;
SWBOOL kill = FALSE;
SWBOOL kill = false;
r = u->rotator;
@ -613,7 +613,7 @@ int DoSlidorMove(short SpriteNum)
}
if (TEST_BOOL2(sp))
kill = TRUE;
kill = true;
}
else
{
@ -623,7 +623,7 @@ int DoSlidorMove(short SpriteNum)
int i,nexti;
SPRITEp bsp;
USERp bu;
SWBOOL found = FALSE;
SWBOOL found = false;
TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti)
{
@ -635,7 +635,7 @@ int DoSlidorMove(short SpriteNum)
// found something blocking so reverse to ON position
ReverseSlidor(SpriteNum);
SET_BOOL8(sp); // tell vator that something blocking door
found = TRUE;
found = true;
break;
}
}
@ -655,7 +655,7 @@ int DoSlidorMove(short SpriteNum)
ReverseSlidor(SpriteNum);
u->vel_rate = -u->vel_rate;
found = TRUE;
found = true;
}
}
}

View file

@ -77,7 +77,7 @@ SpikeSwitch(short match, short setting)
{
SPRITEp sp;
short i,nexti;
SWBOOL found = FALSE;
SWBOOL found = false;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti)
{
@ -85,7 +85,7 @@ SpikeSwitch(short match, short setting)
if (sp->lotag == TAG_SPRITE_SWITCH_VATOR && sp->hitag == match)
{
found = TRUE;
found = true;
AnimateSwitch(sp, setting);
}
}
@ -231,11 +231,11 @@ TestSpikeMatchActive(short match)
continue;
if (TEST(fu->Flags, SPR_ACTIVE) || fu->Tics)
return TRUE;
return true;
}
}
return FALSE;
return false;
}
int DoSpikeMove(short SpriteNum, int *lptr)
@ -397,7 +397,7 @@ int DoSpike(short SpriteNum)
int i,nexti;
SPRITEp bsp;
USERp bu;
SWBOOL found = FALSE;
SWBOOL found = false;
TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti)
{
@ -407,7 +407,7 @@ int DoSpike(short SpriteNum)
if (bu && TEST(bsp->cstat, CSTAT_SPRITE_BLOCK) && TEST(bsp->extra, SPRX_PLAYER_OR_ENEMY))
{
ReverseSpike(SpriteNum);
found = TRUE;
found = true;
break;
}
}
@ -425,7 +425,7 @@ int DoSpike(short SpriteNum)
pp->hi_sectp == &sector[sp->sectnum])
{
ReverseSpike(SpriteNum);
found = TRUE;
found = true;
}
}
}

View file

@ -1043,10 +1043,10 @@ IconSpawn(SPRITEp sp)
if (TEST(sp->extra, SPRX_MULTI_ITEM))
{
if (numplayers <= 1 || gNet.MultiGameType == MULTI_GAME_COOPERATIVE)
return FALSE;
return false;
}
return TRUE;
return true;
}
SWBOOL
@ -1059,7 +1059,7 @@ ActorTestSpawn(SPRITEp sp)
memcpy(&sprite[New], sp, sizeof(SPRITE));
change_sprite_stat(New, STAT_SPAWN_TRIGGER);
RESET(sprite[New].cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
return FALSE;
return false;
}
// Skill ranges from -1 (No Monsters) to 3
@ -1084,7 +1084,7 @@ ActorTestSpawn(SPRITEp sp)
}
Printf("WARNING: skill-masked %s at %d,%d,%d not being killed because it "
"activates something\n", c, TrackerCast(sp->x), TrackerCast(sp->y), TrackerCast(sp->z));
return TRUE;
return true;
}
//always spawn girls in addons
if ((sp->picnum == TOILETGIRL_R0 ||
@ -1092,18 +1092,18 @@ ActorTestSpawn(SPRITEp sp)
sp->picnum == MECHANICGIRL_R0 ||
sp->picnum == CARGIRL_R0 ||
sp->picnum == PRUNEGIRL_R0 ||
sp->picnum == SAILORGIRL_R0) && (g_gameType & GAMEFLAG_ADDON)) return TRUE;
sp->picnum == SAILORGIRL_R0) && (g_gameType & GAMEFLAG_ADDON)) return true;
// spawn Bouncing Betty (mine) in TD map 09 Warehouse
#if 0 // needs to be done smarter.
if (sp->picnum == 817 && swGetAddon() == 2 && currentLevel->levelNumber == 9)
return TRUE;
return true;
#endif
return FALSE;
return false;
}
return TRUE;
return true;
}
@ -1128,7 +1128,7 @@ void PreCachePachinko(void);
SWBOOL
ActorSpawn(SPRITEp sp)
{
int ret = TRUE;
int ret = true;
short SpriteNum = sp - sprite;
switch (sp->picnum)
@ -1140,7 +1140,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1158,7 +1158,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1175,7 +1175,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1192,7 +1192,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1208,7 +1208,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1224,7 +1224,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1241,7 +1241,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1258,7 +1258,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1275,7 +1275,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1292,7 +1292,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1309,7 +1309,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1326,7 +1326,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1343,7 +1343,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1370,7 +1370,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1386,7 +1386,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1402,7 +1402,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1418,7 +1418,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1432,7 +1432,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1448,7 +1448,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1464,7 +1464,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1480,7 +1480,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1496,7 +1496,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1555,7 +1555,7 @@ ActorSpawn(SPRITEp sp)
if (!ActorTestSpawn(sp))
{
KillSprite(SpriteNum);
return FALSE;
return false;
}
PicAnimOff(sp->picnum);
@ -1565,7 +1565,7 @@ ActorSpawn(SPRITEp sp)
}
default:
ret = FALSE;
ret = false;
break;
}
@ -2272,7 +2272,7 @@ SpriteSetup(void)
SET(sectu->flags, SECTFU_VATOR_BOTH);
}
SET(sectp->extra, SECTFX_VATOR);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, TRUE, TRUE);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, true, true);
SET(sector[sp->sectnum].extra, SECTFX_DYNAMIC_AREA);
// don't step on toes of other sector settings
@ -2284,9 +2284,9 @@ SpriteSetup(void)
vel = SP_TAG5(sp);
time = SP_TAG9(sp);
start_on = !!TEST_BOOL1(sp);
floor_vator = TRUE;
floor_vator = true;
if (TEST(sp->cstat, CSTAT_SPRITE_YFLIP))
floor_vator = FALSE;
floor_vator = false;
u->jump_speed = u->vel_tgt = speed;
u->vel_rate = vel;
@ -2375,7 +2375,7 @@ SpriteSetup(void)
short wallcount,startwall,endwall,w;
u = SpawnUser(SpriteNum, 0, NULL);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, TRUE, TRUE);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, true, true);
// need something for this
sectp->lotag = TAG_ROTATOR;
@ -2438,7 +2438,7 @@ SpriteSetup(void)
u = SpawnUser(SpriteNum, 0, NULL);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, TRUE, TRUE);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, true, true);
// need something for this
sectp->lotag = TAG_SLIDOR;
@ -2489,7 +2489,7 @@ SpriteSetup(void)
int floorz,ceilingz,trash;
u = SpawnUser(SpriteNum, 0, NULL);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, FALSE, TRUE);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, false, true);
SET(sector[sp->sectnum].extra, SECTFX_DYNAMIC_AREA);
type = SP_TAG3(sp);
@ -2497,9 +2497,9 @@ SpriteSetup(void)
vel = SP_TAG5(sp);
time = SP_TAG9(sp);
start_on = !!TEST_BOOL1(sp);
floor_vator = TRUE;
floor_vator = true;
if (TEST(sp->cstat, CSTAT_SPRITE_YFLIP))
floor_vator = FALSE;
floor_vator = false;
u->jump_speed = u->vel_tgt = speed;
u->vel_rate = vel;
@ -2731,7 +2731,7 @@ SpriteSetup(void)
{
SECTORp sectp = &sector[sp->sectnum];
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, FALSE, TRUE);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, false, true);
if (TEST(sectp->floorstat, FLOOR_STAT_SLOPE))
{
@ -2761,7 +2761,7 @@ SpriteSetup(void)
case SECT_COPY_DEST:
{
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, FALSE, TRUE);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, false, true);
change_sprite_stat(SpriteNum, STAT_COPY_DEST);
break;
}
@ -3812,7 +3812,7 @@ NUKE_REPLACEMENT:
SWBOOL ItemSpotClear(SPRITEp sip, short statnum, short id)
{
SWBOOL found = FALSE;
SWBOOL found = false;
short i,nexti;
if (TEST_BOOL2(sip))
@ -3821,7 +3821,7 @@ SWBOOL ItemSpotClear(SPRITEp sip, short statnum, short id)
{
if (sprite[i].statnum == statnum && User[i]->ID == id)
{
found = TRUE;
found = true;
break;
}
}
@ -4659,10 +4659,10 @@ SpriteOverlap(int16_t spritenum_a, int16_t spritenum_b)
int spa_tos, spa_bos, spb_tos, spb_bos, overlap_z;
if (!ua || !ub) return FALSE;
if (!ua || !ub) return false;
if ((unsigned)Distance(spa->x, spa->y, spb->x, spb->y) > ua->Radius + ub->Radius)
{
return FALSE;
return false;
}
spa_tos = SPRITEp_TOS(spa);
@ -4677,16 +4677,16 @@ SpriteOverlap(int16_t spritenum_a, int16_t spritenum_b)
// if the top of sprite a is below the bottom of b
if (spa_tos - overlap_z > spb_bos)
{
return FALSE;
return false;
}
// if the top of sprite b is is below the bottom of a
if (spb_tos - overlap_z > spa_bos)
{
return FALSE;
return false;
}
return TRUE;
return true;
}
@ -4707,16 +4707,16 @@ SpriteOverlapZ(int16_t spritenum_a, int16_t spritenum_b, int z_overlap)
// if the top of sprite a is below the bottom of b
if (spa_tos + z_overlap > spb_bos)
{
return FALSE;
return false;
}
// if the top of sprite b is is below the bottom of a
if (spb_tos + z_overlap > spa_bos)
{
return FALSE;
return false;
}
return TRUE;
return true;
}
@ -4870,7 +4870,7 @@ DoActorZrange(short SpriteNum)
u->hi_sectp = &sector[NORM_SECTOR(ceilhit)];
break;
default:
ASSERT(TRUE==FALSE);
ASSERT(true==false);
break;
}
@ -4883,7 +4883,7 @@ DoActorZrange(short SpriteNum)
u->lo_sectp = &sector[NORM_SECTOR(florhit)];
break;
default:
ASSERT(TRUE==FALSE);
ASSERT(true==false);
break;
}
}
@ -4942,7 +4942,7 @@ ActorDrop(short SpriteNum, int x, int y, int z, short new_sector, short min_heig
if (florhit < 0 || ceilhit < 0)
{
//SetSuicide(SpriteNum);
return TRUE;
return true;
}
@ -4959,7 +4959,7 @@ ActorDrop(short SpriteNum, int x, int y, int z, short new_sector, short min_heig
if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR) &&
(labs(loz - z) <= min_height))
{
return FALSE;
return false;
}
break;
@ -4969,17 +4969,17 @@ ActorDrop(short SpriteNum, int x, int y, int z, short new_sector, short min_heig
{
if (labs(loz - z) <= min_height)
{
return FALSE;
return false;
}
break;
}
default:
ASSERT(TRUE == FALSE);
ASSERT(true == false);
break;
}
return TRUE;
return true;
}
// Primarily used in ai.c for now - need to get rid of
@ -5002,9 +5002,9 @@ DropAhead(short SpriteNum, short min_height)
// look straight down for a drop
if (ActorDrop(SpriteNum, dax, day, sp->z, newsector, min_height))
return TRUE;
return true;
return FALSE;
return false;
}
/*
@ -5075,7 +5075,7 @@ move_actor(short SpriteNum, int xchange, int ychange, int zchange)
u->hi_sectp = hi_sectp;
u->ret = -1;
changespritesect(SpriteNum, sectnum);
return FALSE;
return false;
}
if (ActorDrop(SpriteNum, sp->x, sp->y, sp->z, sp->sectnum, u->lo_step))
@ -5094,7 +5094,7 @@ move_actor(short SpriteNum, int xchange, int ychange, int zchange)
u->hi_sectp = hi_sectp;
u->ret = -1;
changespritesect(SpriteNum, sectnum);
return FALSE;
return false;
}
}
@ -5107,11 +5107,11 @@ move_actor(short SpriteNum, int xchange, int ychange, int zchange)
u->TargetDist -= dist;
u->Dist += dist;
u->DistCheck += dist;
return TRUE;
return true;
}
else
{
return FALSE;
return false;
}
}
@ -5476,31 +5476,31 @@ SWBOOL CanGetWeapon(PLAYERp pp, short SpriteNum, int WPN)
switch (gNet.MultiGameType)
{
case MULTI_GAME_NONE:
return TRUE;
return true;
case MULTI_GAME_COOPERATIVE:
if (TEST(u->Flags2, SPR2_NEVER_RESPAWN))
return TRUE;
return true;
if (TEST(pp->WpnGotOnceFlags, BIT(WPN)))
return FALSE;
return false;
return TRUE;
return true;
case MULTI_GAME_COMMBAT:
case MULTI_GAME_AI_BOTS:
if (TEST(u->Flags2, SPR2_NEVER_RESPAWN))
return TRUE;
return true;
// No Respawn - can't get a weapon again if you already got it
if (gNet.NoRespawn && TEST(pp->WpnGotOnceFlags, BIT(WPN)))
return FALSE;
return false;
return TRUE;
return true;
}
return TRUE;
return true;
}
struct InventoryDecl_t InventoryDecls[InvDecl_TOTAL] =
@ -5632,7 +5632,7 @@ KeyMain:
PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_KEYMSG + key_num));
pp->HasKey[key_num] = TRUE;
pp->HasKey[key_num] = true;
SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup
if (pp == Player+myconnectindex)
PlaySound(DIGI_KEY, sp, v3df_dontpan);
@ -5684,14 +5684,14 @@ KeyMain:
case ICON_SM_MEDKIT:
if (pu->Health < 100)
{
SWBOOL putbackmax=FALSE;
SWBOOL putbackmax=false;
PutStringInfo(Player+pnum, quoteMgr.GetQuote(QUOTE_INVENTORY + InvDecl_SmMedkit));
if (pp->MaxHealth == 200)
{
pp->MaxHealth = 100;
putbackmax = TRUE;
putbackmax = true;
}
PlayerUpdateHealth(pp, InventoryDecls[InvDecl_SmMedkit].amount);
@ -6701,11 +6701,11 @@ SpriteControl(void)
u = User[i];
sp = User[i]->SpriteP;
STATE_CONTROL(i, sp, u, StateTics)
// ASSERT(nexti >= 0 ? User[nexti] != NULL : TRUE);
// ASSERT(nexti >= 0 ? User[nexti] != NULL : true);
#else
ASSERT(User[i]);
StateControl(i);
// ASSERT(nexti >= 0 ? User[nexti] != NULL : TRUE);
// ASSERT(nexti >= 0 ? User[nexti] != NULL : true);
#endif
}
@ -6721,11 +6721,11 @@ SpriteControl(void)
u = User[i];
sp = User[i]->SpriteP;
STATE_CONTROL(i, sp, u, StateTics)
ASSERT(nexti >= 0 ? User[nexti] != NULL : TRUE);
ASSERT(nexti >= 0 ? User[nexti] != NULL : true);
#else
ASSERT(User[i]);
StateControl(i);
ASSERT(nexti >= 0 ? User[nexti] != NULL : TRUE);
ASSERT(nexti >= 0 ? User[nexti] != NULL : true);
#endif
}
}
@ -6742,7 +6742,7 @@ SpriteControl(void)
sp = u->SpriteP;
CloseToPlayer = FALSE;
CloseToPlayer = false;
ProcessActiveVars(i);
@ -6757,7 +6757,7 @@ SpriteControl(void)
if (dist < u->active_range)
{
CloseToPlayer = TRUE;
CloseToPlayer = true;
}
}
@ -6770,12 +6770,12 @@ SpriteControl(void)
u = User[i];
sp = User[i]->SpriteP;
STATE_CONTROL(i, sp, u, StateTics)
ASSERT(nexti >= 0 ? User[nexti] != NULL : TRUE);
ASSERT(nexti >= 0 ? User[nexti] != NULL : true);
#else
StateControl(i);
ASSERT(nexti >= 0 ? User[nexti] != NULL : TRUE);
ASSERT(nexti >= 0 ? User[nexti] != NULL : true);
#endif
ASSERT(nexti >= 0 ? User[nexti] != NULL : TRUE);
ASSERT(nexti >= 0 ? User[nexti] != NULL : true);
}
else
{
@ -6797,11 +6797,11 @@ SpriteControl(void)
u = User[i];
sp = User[i]->SpriteP;
STATE_CONTROL(i, sp, u, StateTics)
ASSERT(nexti >= 0 ? User[nexti] != NULL : TRUE);
ASSERT(nexti >= 0 ? User[nexti] != NULL : true);
#else
ASSERT(User[i]);
StateControl(i);
ASSERT(nexti >= 0 ? User[nexti] != NULL : TRUE);
ASSERT(nexti >= 0 ? User[nexti] != NULL : true);
#endif
}
}
@ -6811,7 +6811,7 @@ SpriteControl(void)
{
if (User[i] && User[i]->ActorActionFunc)
(*User[i]->ActorActionFunc)(i);
ASSERT(nexti >= 0 ? sprite[nexti].statnum != MAXSTATUS : TRUE);
ASSERT(nexti >= 0 ? sprite[nexti].statnum != MAXSTATUS : true);
}
if (MoveSkip8 == 0)
@ -6833,11 +6833,11 @@ SpriteControl(void)
u = User[i];
sp = User[i]->SpriteP;
STATE_CONTROL(i, sp, u, StateTics)
ASSERT(nexti >= 0 ? User[nexti] != NULL : TRUE);
ASSERT(nexti >= 0 ? User[nexti] != NULL : true);
#else
ASSERT(User[i]);
StateControl(i);
ASSERT(nexti >= 0 ? User[nexti] != NULL : TRUE);
ASSERT(nexti >= 0 ? User[nexti] != NULL : true);
#endif
}
@ -6991,7 +6991,7 @@ move_sprite(short spritenum, int xchange, int ychange, int zchange, int ceildist
if (dasectnum < 0)
{
retval = HIT_WALL;
//ASSERT(TRUE == FALSE);
//ASSERT(true == false);
return retval;
}

View file

@ -41,9 +41,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
BEGIN_SW_NS
extern uint8_t playTrack;
SWBOOL serpwasseen = FALSE;
SWBOOL sumowasseen = FALSE;
SWBOOL zillawasseen = FALSE;
SWBOOL serpwasseen = false;
SWBOOL sumowasseen = false;
SWBOOL zillawasseen = false;
short BossSpriteNum[3] = {-1,-1,-1};
@ -819,7 +819,7 @@ BossHealthMeter(void)
extern SWBOOL NoMeters;
short health;
SWBOOL bosswasseen;
static SWBOOL triedplay = FALSE;
static SWBOOL triedplay = false;
if (NoMeters) return;
@ -873,7 +873,7 @@ BossHealthMeter(void)
{
if (i == 0 && !serpwasseen)
{
serpwasseen = TRUE;
serpwasseen = true;
if (!SW_SHAREWARE)
{
PlaySong(nullptr, ThemeSongs[2], ThemeTrack[2], true);
@ -881,7 +881,7 @@ BossHealthMeter(void)
}
else if (i == 1 && !sumowasseen)
{
sumowasseen = TRUE;
sumowasseen = true;
if (!SW_SHAREWARE)
{
PlaySong(nullptr, ThemeSongs[3], ThemeTrack[3], true);
@ -889,7 +889,7 @@ BossHealthMeter(void)
}
else if (i == 2 && !zillawasseen)
{
zillawasseen = TRUE;
zillawasseen = true;
if (!SW_SHAREWARE)
{
PlaySong(nullptr, ThemeSongs[4], ThemeTrack[4], true);

View file

@ -79,10 +79,10 @@ TrackTowardPlayer(SPRITEp sp, TRACKp t, TRACK_POINTp start_point)
if (end_dist < start_dist)
{
return TRUE;
return true;
}
return FALSE;
return false;
}
@ -109,10 +109,10 @@ TrackStartCloserThanEnd(short SpriteNum, TRACKp t, TRACK_POINTp start_point)
if (start_dist < end_dist)
{
return TRUE;
return true;
}
return FALSE;
return false;
}
@ -726,7 +726,7 @@ SectorObjectSetupBounds(SECTOR_OBJECTp sop)
short sp_num, next_sp_num, startwall, endwall;
int i, k, j;
SPRITEp BoundSprite;
SWBOOL FoundOutsideLoop = FALSE;
SWBOOL FoundOutsideLoop = false;
SWBOOL SectorInBounds;
SECTORp *sectp;
USERp u = User[sop->sp_child - sprite];
@ -806,14 +806,14 @@ SectorObjectSetupBounds(SECTOR_OBJECTp sop)
startwall = sector[k].wallptr;
endwall = startwall + sector[k].wallnum - 1;
SectorInBounds = TRUE;
SectorInBounds = true;
for (j = startwall; j <= endwall; j++)
{
// all walls have to be in bounds to be in sector object
if (!(wall[j].x > xlow && wall[j].x < xhigh && wall[j].y > ylow && wall[j].y < yhigh))
{
SectorInBounds = FALSE;
SectorInBounds = false;
break;
}
}
@ -850,7 +850,7 @@ SectorObjectSetupBounds(SECTOR_OBJECTp sop)
// Make sure every sector object has an outer loop tagged - important
//
FoundOutsideLoop = FALSE;
FoundOutsideLoop = false;
for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++)
{
@ -865,7 +865,7 @@ SectorObjectSetupBounds(SECTOR_OBJECTp sop)
sop->morph_wall_point = k;
if (wall[k].extra && TEST(wall[k].extra, WALLFX_LOOP_OUTER))
FoundOutsideLoop = TRUE;
FoundOutsideLoop = true;
// each wall has this set - for collision detection
SET(wall[k].extra, WALLFX_SECTOR_OBJECT|WALLFX_DONT_STICK);
@ -1505,7 +1505,7 @@ PlaceSectorObjectsOnTracks(void)
if (sop->track >= SO_OPERATE_TRACK_START)
continue;
found = FALSE;
found = false;
// find the closest point on the track and put SOBJ on it
for (j = 0; j < Track[sop->track].NumPoints; j++)
{
@ -1517,7 +1517,7 @@ PlaceSectorObjectsOnTracks(void)
{
low_dist = dist;
sop->point = j;
found = TRUE;
found = true;
////DSPRINTF(ds,"point = %d, dist = %d, x1=%d, y1=%d",j,low_dist,(tpoint +j)->x,(tpoint+j)->y);
//MONO_PRINT(ds);
}
@ -1695,17 +1695,17 @@ MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny)
WALLp wp;
USERp u;
short i, rot_ang;
SWBOOL PlayerMove = TRUE;
SWBOOL PlayerMove = true;
if (sop->xmid >= MAXSO)
PlayerMove = FALSE;
PlayerMove = false;
// move along little midpoint
sop->xmid += BOUND_4PIX(nx);
sop->ymid += BOUND_4PIX(ny);
if (sop->xmid >= MAXSO)
PlayerMove = FALSE;
PlayerMove = false;
// move child sprite along also
sop->sp_child->x = sop->xmid;
@ -1783,13 +1783,13 @@ PlayerPart:
{
#if 0
short nr, nextnr;
SWBOOL skip = TRUE;
SWBOOL skip = true;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_NO_RIDE], nr, nextnr)
{
if (sprite[nr].lotag == sop - SectorObject)
skip = TRUE;
skip = true;
else
skip = FALSE;
skip = false;
}
if (skip)
@ -2238,7 +2238,7 @@ void CallbackSOsink(ANIMp ap, void *data)
short dest_sector = -1;
short src_sector = -1;
short i, nexti, ndx;
char found = FALSE;
char found = false;
int tgt_depth;
sop = (SECTOR_OBJECTp)data;
@ -2294,7 +2294,7 @@ void CallbackSOsink(ANIMp ap, void *data)
ndx = AnimSet((int *)&su->depth_fract, IntToFixed(tgt_depth), (ap->vel<<8)>>8);
AnimSetVelAdj(ndx, ap->vel_adj);
found = TRUE;
found = true;
break;
}
}
@ -2311,7 +2311,7 @@ void CallbackSOsink(ANIMp ap, void *data)
// in a more precise way
ndx = AnimSet((int *)&su->depth_fract, IntToFixed(tgt_depth), (ap->vel<<8)>>8);
AnimSetVelAdj(ndx, ap->vel_adj);
found = TRUE;
found = true;
break;
}
}
@ -2360,7 +2360,7 @@ MoveSectorObjects(SECTOR_OBJECTp sop, short locktics)
if (TEST(sop->flags, SOBJ_UPDATE_ONCE))
{
RESET(sop->flags, SOBJ_UPDATE_ONCE);
RefreshPoints(sop, 0, 0, FALSE);
RefreshPoints(sop, 0, 0, false);
}
return;
}
@ -2412,7 +2412,7 @@ MoveSectorObjects(SECTOR_OBJECTp sop, short locktics)
if (TEST(sop->flags, SOBJ_DYNAMIC))
{
// trick tricks
RefreshPoints(sop, nx, ny, TRUE);
RefreshPoints(sop, nx, ny, true);
}
else
{
@ -2423,7 +2423,7 @@ MoveSectorObjects(SECTOR_OBJECTp sop, short locktics)
GlobSpeedSO)
{
RESET(sop->flags, SOBJ_UPDATE_ONCE);
RefreshPoints(sop, nx, ny, FALSE);
RefreshPoints(sop, nx, ny, false);
}
}
}
@ -2811,7 +2811,7 @@ OperateSectorObjectForTics(SECTOR_OBJECTp sop, short newang, int newx, int newy,
sop->spin_ang = 0;
sop->ang = newang;
RefreshPoints(sop, newx - sop->xmid, newy - sop->ymid, FALSE);
RefreshPoints(sop, newx - sop->xmid, newy - sop->ymid, false);
}
void
@ -2824,7 +2824,7 @@ void
PlaceSectorObject(SECTOR_OBJECTp sop, int newx, int newy)
{
so_setinterpolationtics(sop, synctics);
RefreshPoints(sop, newx - sop->xmid, newy - sop->ymid, FALSE);
RefreshPoints(sop, newx - sop->xmid, newy - sop->ymid, false);
}
void VehicleSetSmoke(SECTOR_OBJECTp sop, ANIMATORp animator)
@ -2886,7 +2886,7 @@ KillSectorObject(SECTOR_OBJECTp sop)
sop->spin_ang = 0;
sop->ang = sop->ang_tgt;
RefreshPoints(sop, newx - sop->xmid, newy - sop->ymid, FALSE);
RefreshPoints(sop, newx - sop->xmid, newy - sop->ymid, false);
}
@ -2952,7 +2952,7 @@ DoTornadoObject(SECTOR_OBJECTp sop)
}
TornadoSpin(sop);
RefreshPoints(sop, pos.x - sop->xmid, pos.y - sop->ymid, TRUE);
RefreshPoints(sop, pos.x - sop->xmid, pos.y - sop->ymid, true);
}
void
@ -3158,7 +3158,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
if (u->track_dir == -1)
{
DoActorHitTrackEndPoint(u);
return FALSE;
return false;
}
}
@ -3172,7 +3172,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
if (u->track_dir == 1)
{
DoActorHitTrackEndPoint(u);
return FALSE;
return false;
}
}
@ -3286,10 +3286,10 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
ASSERT(hitinfo.sect >= 0);
if (hitinfo.sprite >= 0)
return FALSE;
return false;
if (hitinfo.wall < 0)
return FALSE;
return false;
zdiff = labs(sp->z - sector[wall[hitinfo.wall].nextsector].floorz) >> 8;
@ -3299,7 +3299,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
DoActorBeginJump(SpriteNum);
u->ActorActionFunc = DoActorMoveJump;
return FALSE;
return false;
}
break;
@ -3325,7 +3325,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
DoActorBeginJump(SpriteNum);
u->ActorActionFunc = DoActorMoveJump;
return FALSE;
return false;
}
break;
@ -3335,7 +3335,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
if (u->ActorActionSet->Jump)
{
ActorLeaveTrack(SpriteNum);
return FALSE;
return false;
}
break;
@ -3357,7 +3357,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
InitActorDuck(SpriteNum);
u->ActorActionFunc = DoActorDuck;
return FALSE;
return false;
}
break;
@ -3371,7 +3371,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
int i;
if (u->Rot == u->ActorActionSet->Sit || u->Rot == u->ActorActionSet->Stand)
return FALSE;
return false;
sp->ang = tpoint->ang;
@ -3392,7 +3392,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
if (nearsprite >= 0 && nearhitdist < 1024)
{
if (OperateSprite(nearsprite, FALSE))
if (OperateSprite(nearsprite, false))
{
if (!tpoint->tag_high)
u->WaitTics = 2 * 120;
@ -3406,7 +3406,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
if (nearsector >= 0 && nearhitdist < 1024)
{
if (OperateSector(nearsector, FALSE))
if (OperateSector(nearsector, false))
{
if (!tpoint->tag_high)
u->WaitTics = 2 * 120;
@ -3419,7 +3419,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
if (nearwall >= 0 && nearhitdist < 1024)
{
if (OperateWall(nearwall, FALSE))
if (OperateWall(nearwall, false))
{
if (!tpoint->tag_high)
u->WaitTics = 2 * 120;
@ -3603,7 +3603,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
if (!lsp)
{
ActorLeaveTrack(SpriteNum);
return FALSE;
return false;
}
// determine where the player is supposed to be in relation to the ladder
@ -3628,7 +3628,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
if (hit_wall < 0)
{
ActorLeaveTrack(SpriteNum);
return FALSE;
return false;
}
#if DEBUG
@ -3672,7 +3672,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
break;
}
return TRUE;
return true;
}
/*
@ -3701,7 +3701,7 @@ ActorFollowTrack(short SpriteNum, short locktics)
// if not on a track then better not go here
if (u->track == -1)
return TRUE;
return true;
// if lying in wait for player
if (TEST(u->Flags, SPR_WAIT_FOR_PLAYER | SPR_WAIT_FOR_TRIGGER))
@ -3716,13 +3716,13 @@ ActorFollowTrack(short SpriteNum, short locktics)
{
u->tgt_sp = pp->SpriteP;
RESET(u->Flags, SPR_WAIT_FOR_PLAYER);
return TRUE;
return true;
}
}
}
u->Tics = 0;
return TRUE;
return true;
}
// if pausing the return
@ -3736,7 +3736,7 @@ ActorFollowTrack(short SpriteNum, short locktics)
u->WaitTics = 0;
}
return TRUE;
return true;
}
tpoint = Track[u->track].TrackPoint + u->point;
@ -3749,7 +3749,7 @@ ActorFollowTrack(short SpriteNum, short locktics)
if ((dist = Distance(sp->x, sp->y, tpoint->x, tpoint->y)) < 200) // 64
{
if (!ActorTrackDecide(tpoint, SpriteNum))
return TRUE;
return true;
// get the next point
NextActorTrackPoint(SpriteNum);
@ -3825,7 +3825,7 @@ ActorFollowTrack(short SpriteNum, short locktics)
u->jump_speed = -650;
DoActorBeginJump(SpriteNum);
return TRUE;
return true;
}
}
else
@ -3851,7 +3851,7 @@ ActorFollowTrack(short SpriteNum, short locktics)
}
return TRUE;
return true;
}

View file

@ -82,7 +82,7 @@ VatorSwitch(short match, short setting)
{
SPRITEp sp;
short i,nexti;
SWBOOL found = FALSE;
SWBOOL found = false;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti)
{
@ -90,7 +90,7 @@ VatorSwitch(short match, short setting)
if (sp->lotag == TAG_SPRITE_SWITCH_VATOR && sp->hitag == match)
{
found = TRUE;
found = true;
AnimateSwitch(sp, setting);
}
}
@ -198,7 +198,7 @@ short DoVatorOperate(PLAYERp pp, short sectnum)
#endif
{
PutStringInfo(pp, quoteMgr.GetQuote(QUOTE_DOORMSG + key_num - 1));
return FALSE;
return false;
}
}
@ -308,11 +308,11 @@ TestVatorMatchActive(short match)
continue;
if (TEST(fu->Flags, SPR_ACTIVE) || fu->Tics)
return TRUE;
return true;
}
}
return FALSE;
return false;
}
void InterpSectorSprites(short sectnum, SWBOOL state)
@ -344,7 +344,7 @@ void MoveSpritesWithSector(short sectnum, int z_amt, SWBOOL type)
{
SPRITEp sp;
short i,nexti;
SWBOOL both = FALSE;
SWBOOL both = false;
if (SectUser[sectnum])
both = !!TEST(SectUser[sectnum]->flags, SECTFU_VATOR_BOTH);
@ -538,7 +538,7 @@ int DoVator(short SpriteNum)
int i,nexti;
SPRITEp bsp;
USERp bu;
SWBOOL found = FALSE;
SWBOOL found = false;
TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti)
{
@ -549,7 +549,7 @@ int DoVator(short SpriteNum)
{
if (labs(sectp->ceilingz - sectp->floorz) < SPRITEp_SIZE_Z(bsp))
{
InitBloodSpray(i, TRUE, -1);
InitBloodSpray(i, true, -1);
UpdateSinglePlayKills(i);
KillSprite(i);
continue;
@ -561,7 +561,7 @@ int DoVator(short SpriteNum)
// found something blocking so reverse to ON position
ReverseVator(SpriteNum);
SET_BOOL8(sp); // tell vator that something blocking door
found = TRUE;
found = true;
break;
}
}
@ -581,7 +581,7 @@ int DoVator(short SpriteNum)
ReverseVator(SpriteNum);
u->vel_rate = -u->vel_rate;
found = TRUE;
found = true;
}
}
}
@ -599,7 +599,7 @@ int DoVator(short SpriteNum)
{
if (labs(sectp->ceilingz - sectp->floorz) < SPRITEp_SIZE_Z(bsp))
{
InitBloodSpray(i, TRUE, -1);
InitBloodSpray(i, true, -1);
UpdateSinglePlayKills(i);
KillSprite(i);
continue;

View file

@ -86,9 +86,9 @@ int DoWallMove(SPRITEp sp)
short shade1,shade2,ang,picnum1,picnum2;
WALLp wallp;
short prev_wall;
SWBOOL found = FALSE;
SWBOOL found = false;
short dang;
SWBOOL SOsprite = FALSE;
SWBOOL SOsprite = false;
dist = SP_TAG13(sp);
ang = SP_TAG4(sp);
@ -108,7 +108,7 @@ int DoWallMove(SPRITEp sp)
{
if (wallp->x == sp->x && wallp->y == sp->y)
{
found = TRUE;
found = true;
if (TEST(wallp->extra, WALLFX_SECTOR_OBJECT))
{
@ -117,7 +117,7 @@ int DoWallMove(SPRITEp sp)
ASSERT(sop);
SOwallmove(sop, sp, wallp, dist, &nx, &ny);
SOsprite = TRUE;
SOsprite = true;
}
else
{
@ -165,7 +165,7 @@ int DoWallMove(SPRITEp sp)
SWBOOL CanSeeWallMove(SPRITEp wp, short match)
{
short i,nexti;
SWBOOL found = FALSE;
SWBOOL found = false;
SPRITEp sp;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_WALL_MOVE_CANSEE], i, nexti)
@ -174,26 +174,26 @@ SWBOOL CanSeeWallMove(SPRITEp wp, short match)
if (SP_TAG2(sp) == match)
{
found = TRUE;
found = true;
if (cansee(wp->x,wp->y,wp->z,wp->sectnum,sp->x,sp->y,sp->z,sp->sectnum))
{
return TRUE;
return true;
}
}
}
if (found)
return FALSE;
return false;
else
return TRUE;
return true;
}
int DoWallMoveMatch(short match)
{
SPRITEp sp;
short i,nexti;
SWBOOL found = FALSE;
SWBOOL found = false;
// just all with the same matching tags
TRAVERSE_SPRITE_STAT(headspritestat[STAT_WALL_MOVE], i, nexti)
@ -202,7 +202,7 @@ int DoWallMoveMatch(short match)
if (SP_TAG2(sp) == match)
{
found = TRUE;
found = true;
DoWallMove(sp);
}
}

View file

@ -50,10 +50,10 @@ WarpPlaneSectorInfo(short sectnum, SPRITEp *sp_ceiling, SPRITEp *sp_floor)
*sp_ceiling = NULL;
if (Prediction)
return FALSE;
return false;
if (sectnum < 0 || !TEST(sector[sectnum].extra, SECTFX_WARP_SECTOR))
return FALSE;
return false;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_WARP], i, nexti)
{
@ -76,7 +76,7 @@ WarpPlaneSectorInfo(short sectnum, SPRITEp *sp_ceiling, SPRITEp *sp_floor)
}
}
return TRUE;
return true;
}
SPRITEp
@ -219,7 +219,7 @@ WarpSectorInfo(short sectnum, SPRITEp *sp_warp)
*sp_warp = NULL;
if (!TEST(sector[sectnum].extra, SECTFX_WARP_SECTOR))
return FALSE;
return false;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_WARP], i, nexti)
{
@ -238,7 +238,7 @@ WarpSectorInfo(short sectnum, SPRITEp *sp_warp)
}
}
return TRUE;
return true;
}
SPRITEp

File diff suppressed because it is too large Load diff

View file

@ -886,9 +886,9 @@ DoZombieMove(short SpriteNum)
if (u->Counter3++ >= ZOMBIE_TIME_LIMIT)
{
InitBloodSpray(SpriteNum,TRUE,105);
InitBloodSpray(SpriteNum,TRUE,105);
InitBloodSpray(SpriteNum,TRUE,105);
InitBloodSpray(SpriteNum,true,105);
InitBloodSpray(SpriteNum,true,105);
InitBloodSpray(SpriteNum,true,105);
SetSuicide(SpriteNum);
return 0;
}
@ -936,9 +936,9 @@ NullZombie(short SpriteNum)
if (u->Counter3++ >= ZOMBIE_TIME_LIMIT)
{
InitBloodSpray(SpriteNum,TRUE,105);
InitBloodSpray(SpriteNum,TRUE,105);
InitBloodSpray(SpriteNum,TRUE,105);
InitBloodSpray(SpriteNum,true,105);
InitBloodSpray(SpriteNum,true,105);
InitBloodSpray(SpriteNum,true,105);
SetSuicide(SpriteNum);
return 0;
}