From 1a647e810421e2f0b9c8f09b36a811446e75ec3c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 9 Sep 2020 19:52:52 +0200 Subject: [PATCH] - 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. --- source/build/include/compat.h | 10 - source/sw/src/actor.cpp | 16 +- source/sw/src/ai.cpp | 60 +- source/sw/src/break.cpp | 58 +- source/sw/src/bunny.cpp | 36 +- source/sw/src/cheats.cpp | 8 +- source/sw/src/colormap.cpp | 72 +-- source/sw/src/coolg.cpp | 4 +- source/sw/src/copysect.cpp | 2 +- source/sw/src/d_menu.cpp | 2 +- source/sw/src/draw.cpp | 38 +- source/sw/src/game.cpp | 8 +- source/sw/src/game.h | 8 +- source/sw/src/hornet.cpp | 2 +- source/sw/src/input.cpp | 4 +- source/sw/src/interpso.cpp | 6 +- source/sw/src/inv.cpp | 16 +- source/sw/src/jsector.cpp | 56 +- source/sw/src/jweapon.cpp | 64 +- source/sw/src/mclip.cpp | 26 +- source/sw/src/menus.cpp | 2 +- source/sw/src/miscactr.cpp | 24 +- source/sw/src/network.cpp | 2 +- source/sw/src/ninja.cpp | 26 +- source/sw/src/panel.cpp | 102 ++-- source/sw/src/player.cpp | 148 ++--- source/sw/src/predict.cpp | 8 +- source/sw/src/quake.cpp | 2 +- source/sw/src/ripper.cpp | 12 +- source/sw/src/ripper2.cpp | 8 +- source/sw/src/rooms.cpp | 54 +- source/sw/src/rotator.cpp | 14 +- source/sw/src/save.cpp | 8 +- source/sw/src/scrip2.cpp | 26 +- source/sw/src/sector.cpp | 156 ++--- source/sw/src/skel.cpp | 2 +- source/sw/src/slidor.cpp | 20 +- source/sw/src/spike.cpp | 14 +- source/sw/src/sprite.cpp | 184 +++--- source/sw/src/sumo.cpp | 14 +- source/sw/src/track.cpp | 98 +-- source/sw/src/vator.cpp | 22 +- source/sw/src/wallmove.cpp | 22 +- source/sw/src/warp.cpp | 10 +- source/sw/src/weapon.cpp | 1076 ++++++++++++++++----------------- source/sw/src/zombie.cpp | 12 +- 46 files changed, 1276 insertions(+), 1286 deletions(-) diff --git a/source/build/include/compat.h b/source/build/include/compat.h index 5507db3a1..6ef0ba94e 100644 --- a/source/build/include/compat.h +++ b/source/build/include/compat.h @@ -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_ diff --git a/source/sw/src/actor.cpp b/source/sw/src/actor.cpp index 6427a4494..2cc18abee 100644 --- a/source/sw/src/actor.cpp +++ b/source/sw/src/actor.cpp @@ -334,7 +334,7 @@ DoActorSectorDamage(short SpriteNum) SECTORp sectp = §or[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 diff --git a/source/sw/src/ai.cpp b/source/sw/src/ai.cpp index a147d61b3..66697ac73 100644 --- a/source/sw/src/ai.cpp +++ b/source/sw/src/ai.cpp @@ -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; diff --git a/source/sw/src/break.cpp b/source/sw/src/break.cpp index 2fe297922..229f035d5 100644 --- a/source/sw/src/break.cpp +++ b/source/sw/src/break.cpp @@ -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); diff --git a/source/sw/src/bunny.cpp b/source/sw/src/bunny.cpp index a74cc3740..63af41ae4 100644 --- a/source/sw/src/bunny.cpp +++ b/source/sw/src/bunny.cpp @@ -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; } diff --git a/source/sw/src/cheats.cpp b/source/sw/src/cheats.cpp index a43cb1914..4bc0a52c7 100644 --- a/source/sw/src/cheats.cpp +++ b/source/sw/src/cheats.cpp @@ -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; diff --git a/source/sw/src/colormap.cpp b/source/sw/src/colormap.cpp index ea4716ece..0b648808a 100644 --- a/source/sw/src/colormap.cpp +++ b/source/sw/src/colormap.cpp @@ -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); } diff --git a/source/sw/src/coolg.cpp b/source/sw/src/coolg.cpp index e5c1ba61c..5204ad10b 100644 --- a/source/sw/src/coolg.cpp +++ b/source/sw/src/coolg.cpp @@ -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); } diff --git a/source/sw/src/copysect.cpp b/source/sw/src/copysect.cpp index 90e21f39c..70e1e6e23 100644 --- a/source/sw/src/copysect.cpp +++ b/source/sw/src/copysect.cpp @@ -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); } } } diff --git a/source/sw/src/d_menu.cpp b/source/sw/src/d_menu.cpp index 639194bfa..8f1d31039 100644 --- a/source/sw/src/d_menu.cpp +++ b/source/sw/src/d_menu.cpp @@ -202,7 +202,7 @@ void GameInterface::StartGame(FNewGameStartup& gs) map = FindMapByLevelNum(1); if (!map) return; - CameraTestMode = FALSE; + CameraTestMode = false; StopFX(); //InitNewGame(); diff --git a/source/sw/src/draw.cpp b/source/sw/src/draw.cpp index 413aae590..05d818d9e 100644 --- a/source/sw/src/draw.cpp +++ b/source/sw/src/draw.cpp @@ -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; } diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 5d691b340..be3df2a05 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -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) diff --git a/source/sw/src/game.h b/source/sw/src/game.h index 8193aaca0..1d9d5b7e8 100644 --- a/source/sw/src/game.h +++ b/source/sw/src/game.h @@ -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)) diff --git a/source/sw/src/hornet.cpp b/source/sw/src/hornet.cpp index aa7c340db..11bec35f1 100644 --- a/source/sw/src/hornet.cpp +++ b/source/sw/src/hornet.cpp @@ -591,7 +591,7 @@ int DoCheckSwarm(short SpriteNum) } } - return TRUE; + return true; } diff --git a/source/sw/src/input.cpp b/source/sw/src/input.cpp index b4e69949e..e2b09d8f7 100644 --- a/source/sw/src/input.cpp +++ b/source/sw/src/input.cpp @@ -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; diff --git a/source/sw/src/interpso.cpp b/source/sw/src/interpso.cpp index d8dbf7d01..90078a3d9 100644 --- a/source/sw/src/interpso.cpp +++ b/source/sw/src/interpso.cpp @@ -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++) diff --git a/source/sw/src/inv.cpp b/source/sw/src/inv.cpp index b1272ac5b..f2ac14bad 100644 --- a/source/sw/src/inv.cpp +++ b/source/sw/src/inv.cpp @@ -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); diff --git a/source/sw/src/jsector.cpp b/source/sw/src/jsector.cpp index 9920acb08..bf4b792ea 100644 --- a/source/sw/src/jsector.cpp +++ b/source/sw/src/jsector.cpp @@ -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; } } diff --git a/source/sw/src/jweapon.cpp b/source/sw/src/jweapon.cpp index e85f0d4b4..0a44ef1c3 100644 --- a/source/sw/src/jweapon.cpp +++ b/source/sw/src/jweapon.cpp @@ -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; } diff --git a/source/sw/src/mclip.cpp b/source/sw/src/mclip.cpp index 109845fb8..ca6a1d616 100644 --- a/source/sw/src/mclip.cpp +++ b/source/sw/src/mclip.cpp @@ -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 diff --git a/source/sw/src/menus.cpp b/source/sw/src/menus.cpp index c223080e3..e46990daf 100644 --- a/source/sw/src/menus.cpp +++ b/source/sw/src/menus.cpp @@ -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; } diff --git a/source/sw/src/miscactr.cpp b/source/sw/src/miscactr.cpp index a9835ff39..e8320e36f 100644 --- a/source/sw/src/miscactr.cpp +++ b/source/sw/src/miscactr.cpp @@ -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); diff --git a/source/sw/src/network.cpp b/source/sw/src/network.cpp index 6e39d2570..f564a1841 100644 --- a/source/sw/src/network.cpp +++ b/source/sw/src/network.cpp @@ -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; diff --git a/source/sw/src/ninja.cpp b/source/sw/src/ninja.cpp index cfa0a53c4..0c80f6e12 100644 --- a/source/sw/src/ninja.cpp +++ b/source/sw/src/ninja.cpp @@ -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; diff --git a/source/sw/src/panel.cpp b/source/sw/src/panel.cpp index c96ac07ee..5eebe4e46 100644 --- a/source/sw/src/panel.cpp +++ b/source/sw/src/panel.cpp @@ -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 diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index 054390928..b5629d68e 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -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 == §or[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) { diff --git a/source/sw/src/predict.cpp b/source/sw/src/predict.cpp index ab76ee167..94864448b 100644 --- a/source/sw/src/predict.cpp +++ b/source/sw/src/predict.cpp @@ -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; diff --git a/source/sw/src/quake.cpp b/source/sw/src/quake.cpp index beff31b73..e820827a9 100644 --- a/source/sw/src/quake.cpp +++ b/source/sw/src/quake.cpp @@ -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 diff --git a/source/sw/src/ripper.cpp b/source/sw/src/ripper.cpp index a5fb09db0..e0233d064 100644 --- a/source/sw/src/ripper.cpp +++ b/source/sw/src/ripper.cpp @@ -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; } diff --git a/source/sw/src/ripper2.cpp b/source/sw/src/ripper2.cpp index 63c5f5127..5074aaa55 100644 --- a/source/sw/src/ripper2.cpp +++ b/source/sw/src/ripper2.cpp @@ -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; } diff --git a/source/sw/src/rooms.cpp b/source/sw/src/rooms.cpp index d6a2c9dcb..3b8baef72 100644 --- a/source/sw/src/rooms.cpp +++ b/source/sw/src/rooms.cpp @@ -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(); diff --git a/source/sw/src/rotator.cpp b/source/sw/src/rotator.cpp index ea637a486..03f91e1b4 100644 --- a/source/sw/src/rotator.cpp +++ b/source/sw/src/rotator.cpp @@ -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; diff --git a/source/sw/src/save.cpp b/source/sw/src/save.cpp index 453aa12b2..294ec4874 100644 --- a/source/sw/src/save.cpp +++ b/source/sw/src/save.cpp @@ -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; } diff --git a/source/sw/src/scrip2.cpp b/source/sw/src/scrip2.cpp index 5fc3dcd96..1776b4f78 100644 --- a/source/sw/src/scrip2.cpp +++ b/source/sw/src/scrip2.cpp @@ -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 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 diff --git a/source/sw/src/sector.cpp b/source/sw/src/sector.cpp index fa1d442df..9054537d5 100644 --- a/source/sw/src/sector.cpp +++ b/source/sw/src/sector.cpp @@ -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; } diff --git a/source/sw/src/skel.cpp b/source/sw/src/skel.cpp index 902af431f..b63774966 100644 --- a/source/sw/src/skel.cpp +++ b/source/sw/src/skel.cpp @@ -552,7 +552,7 @@ int DoSkelTeleport(short SpriteNum) x = sp->x; y = sp->y; - while (TRUE) + while (true) { sp->x = x; sp->y = y; diff --git a/source/sw/src/slidor.cpp b/source/sw/src/slidor.cpp index 8a281b4bb..5c87f47ea 100644 --- a/source/sw/src/slidor.cpp +++ b/source/sw/src/slidor.cpp @@ -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; } } } diff --git a/source/sw/src/spike.cpp b/source/sw/src/spike.cpp index 32136b7a1..c6acfb589 100644 --- a/source/sw/src/spike.cpp +++ b/source/sw/src/spike.cpp @@ -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 == §or[sp->sectnum]) { ReverseSpike(SpriteNum); - found = TRUE; + found = true; } } } diff --git a/source/sw/src/sprite.cpp b/source/sw/src/sprite.cpp index af8cb4435..ef226f614 100644 --- a/source/sw/src/sprite.cpp +++ b/source/sw/src/sprite.cpp @@ -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 = §or[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 = §or[NORM_SECTOR(ceilhit)]; break; default: - ASSERT(TRUE==FALSE); + ASSERT(true==false); break; } @@ -4883,7 +4883,7 @@ DoActorZrange(short SpriteNum) u->lo_sectp = §or[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; } diff --git a/source/sw/src/sumo.cpp b/source/sw/src/sumo.cpp index 50e581fb5..5f634a287 100644 --- a/source/sw/src/sumo.cpp +++ b/source/sw/src/sumo.cpp @@ -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); diff --git a/source/sw/src/track.cpp b/source/sw/src/track.cpp index c3eea0a47..8af6f66df 100644 --- a/source/sw/src/track.cpp +++ b/source/sw/src/track.cpp @@ -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; } diff --git a/source/sw/src/vator.cpp b/source/sw/src/vator.cpp index 50afe02f8..2bf0295fc 100644 --- a/source/sw/src/vator.cpp +++ b/source/sw/src/vator.cpp @@ -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; diff --git a/source/sw/src/wallmove.cpp b/source/sw/src/wallmove.cpp index 2599edbf0..ddff92fe0 100644 --- a/source/sw/src/wallmove.cpp +++ b/source/sw/src/wallmove.cpp @@ -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); } } diff --git a/source/sw/src/warp.cpp b/source/sw/src/warp.cpp index fa76a57eb..63f2e1950 100644 --- a/source/sw/src/warp.cpp +++ b/source/sw/src/warp.cpp @@ -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 diff --git a/source/sw/src/weapon.cpp b/source/sw/src/weapon.cpp index d53eaa718..a76337cc0 100644 --- a/source/sw/src/weapon.cpp +++ b/source/sw/src/weapon.cpp @@ -68,7 +68,7 @@ DAMAGE_DATA DamageData[] = short ADJUST=120; FOOT_TYPE FootMode=WATER_FOOT; -SWBOOL left_foot = FALSE; +SWBOOL left_foot = false; int FinishTimer = 0; // This is how many bullet shells have been spawned since the beginning of the game. @@ -89,7 +89,7 @@ short LoWangsQueueHead=0; short LoWangsQueue[MAX_LOWANGS_QUEUE]; int SpawnBreakStaticFlames(short); -SWBOOL GlobalSkipZrange = FALSE; +SWBOOL GlobalSkipZrange = false; int WeaponIsAmmo = BIT(WPN_STAR) | BIT(WPN_SWORD) | BIT(WPN_MINE) | BIT(WPN_FIST); @@ -2660,11 +2660,11 @@ SWBOOL MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite) if (TEST(wu->Flags2, SPR2_SO_MISSILE)) { DoMatchEverything(NULL, hsp->hitag, -1); - return TRUE; + return true; } else { - return FALSE; + return false; } } } @@ -2678,7 +2678,7 @@ SWBOOL MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite) case WPN_NAPALM: case WPN_ROCKET: DoMatchEverything(NULL, hsp->hitag, -1); - return TRUE; + return true; } } else if (SP_TAG7(hsp) == 1) @@ -2691,7 +2691,7 @@ SWBOOL MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite) case WPN_NAPALM: case WPN_ROCKET: DoMatchEverything(NULL, hsp->hitag, -1); - return TRUE; + return true; } } else if (SP_TAG7(hsp) == 2) @@ -2706,7 +2706,7 @@ SWBOOL MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite) case WPN_UZI: case WPN_SHOTGUN: DoMatchEverything(NULL, hsp->hitag, -1); - return TRUE; + return true; } } else if (SP_TAG7(hsp) == 3) @@ -2724,11 +2724,11 @@ SWBOOL MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite) case WPN_UZI: case WPN_SHOTGUN: DoMatchEverything(NULL, hsp->hitag, -1); - return TRUE; + return true; } } - return FALSE; + return false; #if 0 WPN_STAR @@ -2763,7 +2763,7 @@ int DoLavaErupt(short SpriteNum) short i,nexti,pnum; PLAYERp pp; SPRITEp tsp; - SWBOOL found = FALSE; + SWBOOL found = false; if (TEST_BOOL1(sp)) { @@ -2778,7 +2778,7 @@ int DoLavaErupt(short SpriteNum) if (tsp->statnum == STAT_TRIGGER && SP_TAG7(tsp) == 0 && SP_TAG5(tsp) == 1) { - found = TRUE; + found = true; break; } } @@ -2890,99 +2890,99 @@ SpawnShrap(short ParentNum, short Secondary) static SHRAP CoinShrap[] = { - {s_CoinShrap, COIN_SHRAP, 5, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_MetalShrapA, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_MetalShrapB, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_MetalShrapC, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, + {s_CoinShrap, COIN_SHRAP, 5, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_MetalShrapA, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_MetalShrapB, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_MetalShrapC, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP GlassShrap[] = { - {s_GlassShrapA, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_GlassShrapB, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_GlassShrapC, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, + {s_GlassShrapA, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_GlassShrapB, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_GlassShrapC, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP WoodShrap[] = { - {s_WoodShrapA, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_WoodShrapB, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_WoodShrapC, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, + {s_WoodShrapA, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_WoodShrapB, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_WoodShrapC, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP StoneShrap[] = { - {s_StoneShrapA, STONE_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_StoneShrapB, STONE_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_StoneShrapC, STONE_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, + {s_StoneShrapA, STONE_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_StoneShrapB, STONE_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_StoneShrapC, STONE_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP PaperShrap[] = { - {s_PaperShrapA, PAPER_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_PaperShrapB, PAPER_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_PaperShrapC, PAPER_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, + {s_PaperShrapA, PAPER_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_PaperShrapB, PAPER_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_PaperShrapC, PAPER_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP MetalShrap[] = { - {s_MetalShrapA, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_MetalShrapB, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_MetalShrapC, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, + {s_MetalShrapA, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_MetalShrapB, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_MetalShrapC, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP MetalMix[] = { - {s_GlassShrapA, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_GlassShrapB, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_GlassShrapC, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_MetalShrapA, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_MetalShrapB, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_MetalShrapC, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, + {s_GlassShrapA, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_GlassShrapB, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_GlassShrapC, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_MetalShrapA, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_MetalShrapB, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_MetalShrapC, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP WoodMix[] = { - {s_WoodShrapA, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_WoodShrapB, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_WoodShrapC, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_MetalShrapA, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_MetalShrapB, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_MetalShrapC, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, + {s_WoodShrapA, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_WoodShrapB, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_WoodShrapC, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_MetalShrapA, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_MetalShrapB, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_MetalShrapC, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP PaperMix[] = { - {s_WoodShrapA, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_WoodShrapB, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_WoodShrapC, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_PaperShrapA, PAPER_SHRAP_A, 2, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_PaperShrapB, PAPER_SHRAP_A, 2, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_PaperShrapC, PAPER_SHRAP_A, 2, Z_MID, 200, 600, 100, 500, TRUE, 2048}, + {s_WoodShrapA, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_WoodShrapB, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_WoodShrapC, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_PaperShrapA, PAPER_SHRAP_A, 2, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_PaperShrapB, PAPER_SHRAP_A, 2, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_PaperShrapC, PAPER_SHRAP_A, 2, Z_MID, 200, 600, 100, 500, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP Marbels[] = { - {s_Marbel, MARBEL, 5, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_GlassShrapA, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_GlassShrapB, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, - {s_GlassShrapC, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, TRUE, 2048}, + {s_Marbel, MARBEL, 5, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_GlassShrapA, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_GlassShrapB, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, + {s_GlassShrapC, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; #if 0 static SHRAP BloodShrap[] = { - {s_BloodShrap, BLOOD_SHRAP, 8, Z_MID, 200, 600, 100, 500, TRUE, 2048}, + {s_BloodShrap, BLOOD_SHRAP, 8, Z_MID, 200, 600, 100, 500, true, 2048}, {NULL}, }; #endif @@ -2993,97 +2993,97 @@ SpawnShrap(short ParentNum, short Secondary) static SHRAP EMPShrap[] = { - {s_EMPShrap, EMP, 1, Z_MID, 500, 1100, 300, 600, FALSE, 128}, + {s_EMPShrap, EMP, 1, Z_MID, 500, 1100, 300, 600, false, 128}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP StdShrap[] = { - {s_GoreHead, GORE_Head, 1, Z_TOP, 400, 700, 20, 40, TRUE, 2048}, - {s_GoreLung, GORE_Lung, 2, Z_TOP, 500, 800, 100, 300, TRUE, 2048}, - {s_GoreLiver, GORE_Liver, 1, Z_MID, 300, 500, 100, 150, TRUE, 2048}, - {s_GoreArm, GORE_Arm, 1, Z_MID, 300, 500, 250, 500, TRUE, 2048}, - {s_GoreSkullCap, GORE_SkullCap, 1, Z_TOP, 300, 500, 250, 500, TRUE, 2048}, - {s_FastGoreDrip, GORE_Drip, 8, Z_BOT, 600, 800, 50, 70, FALSE, 2048}, + {s_GoreHead, GORE_Head, 1, Z_TOP, 400, 700, 20, 40, true, 2048}, + {s_GoreLung, GORE_Lung, 2, Z_TOP, 500, 800, 100, 300, true, 2048}, + {s_GoreLiver, GORE_Liver, 1, Z_MID, 300, 500, 100, 150, true, 2048}, + {s_GoreArm, GORE_Arm, 1, Z_MID, 300, 500, 250, 500, true, 2048}, + {s_GoreSkullCap, GORE_SkullCap, 1, Z_TOP, 300, 500, 250, 500, true, 2048}, + {s_FastGoreDrip, GORE_Drip, 8, Z_BOT, 600, 800, 50, 70, false, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP HeartAttackShrap[] = // fewer gibs because of the plasma fountain sprites { - {s_GoreLung, GORE_Lung, 2, Z_TOP, 500, 1100, 300, 600, TRUE, 2048}, - {s_GoreLiver, GORE_Liver, 1, Z_MID, 500, 1100, 300, 500, TRUE, 2048}, - {s_GoreArm, GORE_Arm, 2, Z_MID, 500, 1100, 350, 600, TRUE, 2048}, + {s_GoreLung, GORE_Lung, 2, Z_TOP, 500, 1100, 300, 600, true, 2048}, + {s_GoreLiver, GORE_Liver, 1, Z_MID, 500, 1100, 300, 500, true, 2048}, + {s_GoreArm, GORE_Arm, 2, Z_MID, 500, 1100, 350, 600, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP SkelGore[] = { - {s_GoreHead, GORE_Head, 1, Z_TOP, 400, 700, 20, 40, TRUE, 2048}, - {s_GoreLung, GORE_Lung, 2, Z_TOP, 500, 800, 100, 300, TRUE, 2048}, - {s_GoreLiver, GORE_Liver, 1, Z_MID, 300, 500, 100, 150, TRUE, 2048}, - {s_GoreSkullCap, GORE_SkullCap, 1, Z_TOP, 300, 500, 100, 150, TRUE, 2048}, - {s_GoreArm, GORE_Arm, 1, Z_MID, 300, 500, 250, 500, TRUE, 2048}, - {s_GoreLeg, GORE_Leg, 2, Z_BOT, 200, 400, 250, 500, TRUE, 2048}, - {s_GoreChunkS, GORE_ChunkS, 4, Z_BOT, 200, 400, 250, 400, TRUE, 2048}, + {s_GoreHead, GORE_Head, 1, Z_TOP, 400, 700, 20, 40, true, 2048}, + {s_GoreLung, GORE_Lung, 2, Z_TOP, 500, 800, 100, 300, true, 2048}, + {s_GoreLiver, GORE_Liver, 1, Z_MID, 300, 500, 100, 150, true, 2048}, + {s_GoreSkullCap, GORE_SkullCap, 1, Z_TOP, 300, 500, 100, 150, true, 2048}, + {s_GoreArm, GORE_Arm, 1, Z_MID, 300, 500, 250, 500, true, 2048}, + {s_GoreLeg, GORE_Leg, 2, Z_BOT, 200, 400, 250, 500, true, 2048}, + {s_GoreChunkS, GORE_ChunkS, 4, Z_BOT, 200, 400, 250, 400, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP UpperGore[] = { - {s_GoreHead, GORE_Head, 1, Z_TOP, 400, 700, 20, 40, TRUE, 2048}, - {s_GoreLung, GORE_Lung, 2, Z_TOP, 500, 800, 100, 300, TRUE, 2048}, - {s_GoreLiver, GORE_Liver, 1, Z_MID, 300, 500, 100, 150, TRUE, 2048}, - {s_GoreSkullCap, GORE_SkullCap, 1, Z_TOP, 300, 500, 100, 150, TRUE, 2048}, - {s_GoreArm, GORE_Arm, 1, Z_MID, 300, 500, 250, 500, TRUE, 2048}, + {s_GoreHead, GORE_Head, 1, Z_TOP, 400, 700, 20, 40, true, 2048}, + {s_GoreLung, GORE_Lung, 2, Z_TOP, 500, 800, 100, 300, true, 2048}, + {s_GoreLiver, GORE_Liver, 1, Z_MID, 300, 500, 100, 150, true, 2048}, + {s_GoreSkullCap, GORE_SkullCap, 1, Z_TOP, 300, 500, 100, 150, true, 2048}, + {s_GoreArm, GORE_Arm, 1, Z_MID, 300, 500, 250, 500, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; #if 0 static SHRAP LowerGore[] = { - {s_GoreLeg, GORE_Leg, 4, Z_BOT, 300, 500, 100, 200, TRUE, 2048}, + {s_GoreLeg, GORE_Leg, 4, Z_BOT, 300, 500, 100, 200, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; #endif static SHRAP SmallGore[] = { - {s_GoreDrip, GORE_Drip, 3, Z_TOP, 600, 800, 50, 70, FALSE, 2048}, - {s_FastGoreDrip, GORE_Drip, 3, Z_BOT, 600, 800, 70, 100, FALSE, 2048}, + {s_GoreDrip, GORE_Drip, 3, Z_TOP, 600, 800, 50, 70, false, 2048}, + {s_FastGoreDrip, GORE_Drip, 3, Z_BOT, 600, 800, 70, 100, false, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP FlamingGore[] = { - {s_GoreFlame, GORE_Drip, 2, Z_TOP, 600, 800, 100, 200, FALSE, 2048}, - {s_GoreFlameChunkB, GORE_Drip, 4, Z_MID, 300, 500, 100, 200, FALSE, 2048}, - {s_GoreFlame, GORE_Drip, 2, Z_BOT, 100, 200, 100, 200, FALSE, 2048}, + {s_GoreFlame, GORE_Drip, 2, Z_TOP, 600, 800, 100, 200, false, 2048}, + {s_GoreFlameChunkB, GORE_Drip, 4, Z_MID, 300, 500, 100, 200, false, 2048}, + {s_GoreFlame, GORE_Drip, 2, Z_BOT, 100, 200, 100, 200, false, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; #if 0 static SHRAP BoltExpShrap[] = { - {s_GoreFlame, GORE_Drip, 4, Z_MID, 300, 700, 300, 600, TRUE, 2048}, - {s_GoreFlame, GORE_Drip, 4, Z_BOT, 300, 700, 300, 600, TRUE, 2048}, + {s_GoreFlame, GORE_Drip, 4, Z_MID, 300, 700, 300, 600, true, 2048}, + {s_GoreFlame, GORE_Drip, 4, Z_BOT, 300, 700, 300, 600, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP TracerExpShrap[] = { - {s_TracerShrap, GORE_Drip, 3, Z_MID, 300, 700, 300, 600, TRUE, 2048}, + {s_TracerShrap, GORE_Drip, 3, Z_MID, 300, 700, 300, 600, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP FireballExpShrap1[] = { - {s_GoreFlame, GORE_Drip, 1, Z_MID, 100, 300, 100, 200, TRUE, 2048}, + {s_GoreFlame, GORE_Drip, 1, Z_MID, 100, 300, 100, 200, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP FireballExpShrap2[] = { - {s_GoreFlame, GORE_Drip, 2, Z_MID, 100, 300, 100, 200, TRUE, 2048}, + {s_GoreFlame, GORE_Drip, 2, Z_MID, 100, 300, 100, 200, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; @@ -3098,7 +3098,7 @@ SpawnShrap(short ParentNum, short Secondary) // random_disperse, ang_range; static SHRAP ElectroShrap[] = { - {s_ElectroShrap, ELECTRO_SHARD, 12, Z_TOP, 200, 600, 100, 500, TRUE, 2048}, + {s_ElectroShrap, ELECTRO_SHARD, 12, Z_TOP, 200, 600, 100, 500, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; @@ -3106,13 +3106,13 @@ SpawnShrap(short ParentNum, short Secondary) // random_disperse, ang_range; static SHRAP LavaShrap1[] = { - {s_GoreFlame, GORE_Drip, 1, Z_TOP, 400, 1400, 100, 400, TRUE, 2048}, + {s_GoreFlame, GORE_Drip, 1, Z_TOP, 400, 1400, 100, 400, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP LavaShrap2[] = { - {s_GoreFlameChunkB, GORE_Drip, 1, Z_TOP, 400, 1400, 100, 400, TRUE, 2048}, + {s_GoreFlameChunkB, GORE_Drip, 1, Z_TOP, 400, 1400, 100, 400, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; @@ -3124,14 +3124,14 @@ SpawnShrap(short ParentNum, short Secondary) static SHRAP LavaBoulderShrap[] = { - {s_LavaShard, LAVA_SHARD, 16, Z_MID, 400, 900, 200, 600, TRUE, 2048}, + {s_LavaShard, LAVA_SHARD, 16, Z_MID, 400, 900, 200, 600, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; #if 0 static SHRAP SectorSquishGore[] = { - {s_FastGoreDrip, GORE_Drip, 24, Z_MID, -400, -200, 600, 800, FALSE, 2048}, + {s_FastGoreDrip, GORE_Drip, 24, Z_MID, -400, -200, 600, 800, false, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; #endif @@ -3146,30 +3146,30 @@ SpawnShrap(short ParentNum, short Secondary) // random_disperse, ang_range; static SHRAP PlayerGoreFall[] = { - {s_GoreSkullCap,GORE_SkullCap, 1, Z_TOP, 200, 300, 100, 200, TRUE, 2048}, - {s_GoreLiver, GORE_Liver, 1, Z_MID, 200, 300, 100, 200, TRUE, 2048}, - {s_GoreLung, GORE_Lung, 1, Z_MID, 200, 300, 100, 200, TRUE, 2048}, - {s_GoreDrip, GORE_Drip, 10, Z_MID, 200, 300, 100, 200, FALSE, 2048}, - {s_GoreArm, GORE_Arm, 1, Z_MID, 200, 300, 100, 200, TRUE, 2048}, - {s_FastGoreDrip, GORE_Drip, 10, Z_BOT, 200, 300, 100, 200, FALSE, 2048}, + {s_GoreSkullCap,GORE_SkullCap, 1, Z_TOP, 200, 300, 100, 200, true, 2048}, + {s_GoreLiver, GORE_Liver, 1, Z_MID, 200, 300, 100, 200, true, 2048}, + {s_GoreLung, GORE_Lung, 1, Z_MID, 200, 300, 100, 200, true, 2048}, + {s_GoreDrip, GORE_Drip, 10, Z_MID, 200, 300, 100, 200, false, 2048}, + {s_GoreArm, GORE_Arm, 1, Z_MID, 200, 300, 100, 200, true, 2048}, + {s_FastGoreDrip, GORE_Drip, 10, Z_BOT, 200, 300, 100, 200, false, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP PlayerGoreFly[] = { - {s_GoreSkullCap,GORE_SkullCap, 1, Z_TOP, 500, 1100, 300, 600, TRUE, 2048}, - {s_GoreTorso, GORE_Torso, 1, Z_MID, 500, 1100, 300, 500, TRUE, 2048}, - {s_GoreLiver, GORE_Liver, 1, Z_MID, 200, 300, 100, 200, TRUE, 2048}, - {s_GoreArm, GORE_Arm, 1, Z_MID, 500, 1100, 350, 600, TRUE, 2048}, - {s_FastGoreDrip, GORE_Drip, 16, Z_MID, 500, 1100, 350, 600, FALSE, 2048}, - {s_FastGoreDrip, GORE_Drip, 16, Z_BOT, 500, 1100, 350, 600, FALSE, 2048}, + {s_GoreSkullCap,GORE_SkullCap, 1, Z_TOP, 500, 1100, 300, 600, true, 2048}, + {s_GoreTorso, GORE_Torso, 1, Z_MID, 500, 1100, 300, 500, true, 2048}, + {s_GoreLiver, GORE_Liver, 1, Z_MID, 200, 300, 100, 200, true, 2048}, + {s_GoreArm, GORE_Arm, 1, Z_MID, 500, 1100, 350, 600, true, 2048}, + {s_FastGoreDrip, GORE_Drip, 16, Z_MID, 500, 1100, 350, 600, false, 2048}, + {s_FastGoreDrip, GORE_Drip, 16, Z_BOT, 500, 1100, 350, 600, false, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP PlayerDeadHead[] = { - {s_GoreDrip, GORE_Drip, 2, Z_TOP, 150, 400, 40, 80, TRUE, 2048}, - {s_GoreDrip, GORE_Drip, 2, Z_MID, 150, 400, 40, 80, TRUE, 2048}, + {s_GoreDrip, GORE_Drip, 2, Z_TOP, 150, 400, 40, 80, true, 2048}, + {s_GoreDrip, GORE_Drip, 2, Z_MID, 150, 400, 40, 80, true, 2048}, {NULL,0,0,0,0,0,0,0,0,0}, }; @@ -3177,7 +3177,7 @@ SpawnShrap(short ParentNum, short Secondary) // random_disperse, ang_range; static SHRAP PlayerHeadHurl1[] = { - {s_Vomit1, Vomit1, 1, Z_BOT, 250, 400, 100, 200, TRUE, 256}, + {s_Vomit1, Vomit1, 1, Z_BOT, 250, 400, 100, 200, true, 256}, {NULL,0,0,0,0,0,0,0,0,0}, }; @@ -3186,7 +3186,7 @@ SpawnShrap(short ParentNum, short Secondary) #if 0 static SHRAP SectorExpShrap[] = { - {NULL, WALL_FLOOR_SHRAP, 1, Z_BOT, 550, 800, 200, 400, TRUE, 512}, + {NULL, WALL_FLOOR_SHRAP, 1, Z_BOT, 550, 800, 200, 400, true, 512}, {NULL,0,0,0,0,0,0,0,0,0}, }; #endif @@ -3198,7 +3198,7 @@ SpawnShrap(short ParentNum, short Secondary) SHRAPp p = SmallGore; short shrap_shade = -15; short shrap_xsize = 48, shrap_ysize = 48; - short retval = TRUE; + short retval = true; short shrap_pal = PALETTE_DEFAULT; int shrap_floor_dist = Z(2); int shrap_ceiling_dist = Z(2); @@ -3206,7 +3206,7 @@ SpawnShrap(short ParentNum, short Secondary) short jump_grav = ACTOR_GRAVITY; short start_ang = 0; short shrap_owner = -1; - int shrap_bounce = FALSE; + int shrap_bounce = false; short WaitTics = 64; // for FastShrap short shrap_type; int shrap_rand_zamt = 0; @@ -3280,7 +3280,7 @@ AutoShrap: switch (shrap_type) { case SHRAP_NONE: - return FALSE; + return false; case SHRAP_GLASS: PlaySound(DIGI_BREAKGLASS,parent,v3df_dontpan|v3df_doppler); @@ -3294,7 +3294,7 @@ AutoShrap: } shrap_xsize = shrap_ysize = 16 + shrap_delta_size; - shrap_bounce = TRUE; + shrap_bounce = true; break; case SHRAP_GENERIC: @@ -3309,7 +3309,7 @@ AutoShrap: } shrap_xsize = shrap_ysize = 8 + shrap_delta_size; - shrap_bounce = TRUE; + shrap_bounce = true; break; case SHRAP_WOOD: @@ -3323,7 +3323,7 @@ AutoShrap: } shrap_xsize = shrap_ysize = 16 + shrap_delta_size; - shrap_bounce = TRUE; + shrap_bounce = true; break; case SHRAP_BLOOD: @@ -3334,7 +3334,7 @@ AutoShrap: PlaySound(DIGI_GIBS1,parent,v3df_dontpan|v3df_doppler); p = SmallGore; shrap_xsize = shrap_ysize = 34; - shrap_bounce = FALSE; + shrap_bounce = false; break; case SHRAP_TREE_BARK: @@ -3348,7 +3348,7 @@ AutoShrap: } shrap_xsize = shrap_ysize = 16 + shrap_delta_size; - shrap_bounce = TRUE; + shrap_bounce = true; break; case SHRAP_PAPER: @@ -3374,7 +3374,7 @@ AutoShrap: } shrap_xsize = shrap_ysize = 16 + shrap_delta_size; - shrap_bounce = TRUE; + shrap_bounce = true; break; @@ -3389,7 +3389,7 @@ AutoShrap: } shrap_xsize = shrap_ysize = 16 + shrap_delta_size; - shrap_bounce = TRUE; + shrap_bounce = true; break; case SHRAP_METALMIX: @@ -3403,7 +3403,7 @@ AutoShrap: } shrap_xsize = shrap_ysize = 16 + shrap_delta_size; - shrap_bounce = TRUE; + shrap_bounce = true; break; case SHRAP_MARBELS: @@ -3437,7 +3437,7 @@ AutoShrap: } shrap_xsize = shrap_ysize = 10 + shrap_delta_size; - shrap_bounce = TRUE; + shrap_bounce = true; } break; @@ -3452,7 +3452,7 @@ AutoShrap: } shrap_xsize = shrap_ysize = 16 + shrap_delta_size; - shrap_bounce = TRUE; + shrap_bounce = true; break; case SHRAP_PAPERMIX: @@ -3466,11 +3466,11 @@ AutoShrap: } shrap_xsize = shrap_ysize = 16 + shrap_delta_size; - shrap_bounce = FALSE; + shrap_bounce = false; break; case SHRAP_SO_SMOKE: - return FALSE; + return false; case SHRAP_EXPLOSION: { @@ -3491,7 +3491,7 @@ AutoShrap: size = ep->xrepeat; ep->xrepeat = ep->yrepeat = size + shrap_delta_size; - return FALSE; + return false; } case SHRAP_LARGE_EXPLOSION: @@ -3515,12 +3515,12 @@ AutoShrap: InitPhosphorus(spnum); - return FALSE; + return false; } default: { - return FALSE; + return false; } } break; @@ -3535,54 +3535,54 @@ AutoShrap: PlaySound(DIGI_BREAKDEBRIS,parent,v3df_dontpan|v3df_doppler); p = WoodShrap; shrap_xsize = shrap_ysize = 24; - shrap_bounce = TRUE; + shrap_bounce = true; ChangeState(parent - sprite, s_BreakBarrel); break; case BREAK_LIGHT: PlaySound(DIGI_BREAKGLASS,parent,v3df_dontpan|v3df_doppler); p = GlassShrap; shrap_xsize = shrap_ysize = 24; - shrap_bounce = TRUE; + shrap_bounce = true; ChangeState(parent - sprite, s_BreakLight); break; case BREAK_PEDISTAL: PlaySound(DIGI_BREAKSTONES,parent,v3df_dontpan|v3df_doppler); p = StoneShrap; shrap_xsize = shrap_ysize = 24; - shrap_bounce = TRUE; + shrap_bounce = true; ChangeState(parent - sprite, s_BreakPedistal); break; case BREAK_BOTTLE1: PlaySound(DIGI_BREAKGLASS,parent,v3df_dontpan|v3df_doppler); p = GlassShrap; shrap_xsize = shrap_ysize = 8; - shrap_bounce = TRUE; + shrap_bounce = true; ChangeState(parent - sprite, s_BreakBottle1); break; case BREAK_BOTTLE2: PlaySound(DIGI_BREAKGLASS,parent,v3df_dontpan|v3df_doppler); p = GlassShrap; shrap_xsize = shrap_ysize = 8; - shrap_bounce = TRUE; + shrap_bounce = true; ChangeState(parent - sprite, s_BreakBottle2); break; case BREAK_MUSHROOM: PlaySound(DIGI_BREAKDEBRIS,parent,v3df_dontpan|v3df_doppler); p = StoneShrap; shrap_xsize = shrap_ysize = 4; - shrap_bounce = TRUE; + shrap_bounce = true; SetSuicide(parent - sprite); // kill next iteration break; case BOLT_EXP: - return FALSE; + return false; // p = BoltExpShrap; // break; case TANK_SHELL_EXP: - return FALSE; + return false; // p = BoltExpShrap; // break; case TRACER_EXP: - return FALSE; + return false; // p = TracerExpShrap; // shrap_xsize = shrap_ysize = 20; // WaitTics = 10; @@ -3603,18 +3603,18 @@ AutoShrap: p = LavaBoulderShrap; shrap_owner = parent->owner; shrap_xsize = shrap_ysize = 24; - shrap_bounce = TRUE; + shrap_bounce = true; break; case SECTOR_EXP: //p = SectorExpShrap; //break; - return FALSE; + return false; case GRENADE_EXP: //p = SectorExpShrap; //break; - return FALSE; + return false; case FIREBALL_EXP: - return FALSE; + return false; // p = FireballExpShrap[RANDOM_P2(2<<8)>>8]; // shrap_pal = pu->spal; break; @@ -3627,10 +3627,10 @@ AutoShrap: case COOLIE_RUN_R0: if (Secondary == WPN_NM_SECTOR_SQUISH) break; -// return (FALSE); +// return (false); break; case NINJA_DEAD: - return FALSE; + return false; break; case NINJA_Head_R0: { @@ -3644,7 +3644,7 @@ AutoShrap: { p = PlayerDeadHead; shrap_xsize = shrap_ysize = 16+8; - shrap_bounce = TRUE; + shrap_bounce = true; } break; } @@ -3688,7 +3688,7 @@ AutoShrap: break; case SERP_RUN_R0: p = StdShrap; - //return (FALSE); + //return (false); break; case SUMO_RUN_R0: p = StdShrap; @@ -3706,7 +3706,7 @@ AutoShrap: p = FlamingGore; break; case SKULL_SERP: - return FALSE; + return false; case BETTY_R0: case TRASHCAN: case PACHINKO1: @@ -3725,7 +3725,7 @@ AutoShrap: case EMP: p = EMPShrap; shrap_xsize = shrap_ysize = 8; - shrap_bounce = FALSE; + shrap_bounce = false; break; } @@ -3787,35 +3787,35 @@ AutoShrap: switch (u->ID) { case GORE_Drip: - shrap_bounce = FALSE; + shrap_bounce = false; break; case GORE_Lung: shrap_xsize = 20; shrap_ysize = 20; - shrap_bounce = FALSE; + shrap_bounce = false; break; case GORE_Liver: shrap_xsize = 20; shrap_ysize = 20; - shrap_bounce = FALSE; + shrap_bounce = false; break; case GORE_SkullCap: shrap_xsize = 24; shrap_ysize = 24; - shrap_bounce = TRUE; + shrap_bounce = true; break; case GORE_Arm: shrap_xsize = 21; shrap_ysize = 21; - shrap_bounce = FALSE; + shrap_bounce = false; break; case GORE_Head: shrap_xsize = 26; shrap_ysize = 30; - shrap_bounce = TRUE; + shrap_bounce = true; break; case Vomit1: - shrap_bounce = FALSE; + shrap_bounce = false; sp->z -= Z(4); shrap_xsize = u->sx = 12 + (RANDOM_P2(32<<8)>>8); shrap_ysize = u->sy = 12 + (RANDOM_P2(32<<8)>>8); @@ -3830,7 +3830,7 @@ AutoShrap: break; case EMP: - shrap_bounce = FALSE; + shrap_bounce = false; sp->z -= Z(4); //sp->ang = NORM_ANGLE(sp->ang + 1024); shrap_xsize = u->sx = 5 + (RANDOM_P2(4<<8)>>8); @@ -4128,53 +4128,53 @@ SpawnBlood(short SpriteNum, short Weapon, short hit_ang, int hit_x, int hit_y, i static SHRAP UziBlood[] = { - {s_GoreDrip, GORE_Drip, 1, Z_MID, 100, 250, 10, 20, TRUE, 512}, // 70,200 vels - //{s_GoreSplash, PLASMA_Drip, 1, Z_BOT, 0, 0, 0, 0, FALSE, 512}, + {s_GoreDrip, GORE_Drip, 1, Z_MID, 100, 250, 10, 20, true, 512}, // 70,200 vels + //{s_GoreSplash, PLASMA_Drip, 1, Z_BOT, 0, 0, 0, 0, false, 512}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP SmallBlood[] = { - {s_GoreDrip, GORE_Drip, 1, Z_TOP, 100, 250, 10, 20, TRUE, 512}, + {s_GoreDrip, GORE_Drip, 1, Z_TOP, 100, 250, 10, 20, true, 512}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP PlasmaFountainBlood[] = { - {s_PlasmaDrip, PLASMA_Drip, 1, Z_TOP, 200, 500, 100, 300, TRUE, 16}, + {s_PlasmaDrip, PLASMA_Drip, 1, Z_TOP, 200, 500, 100, 300, true, 16}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP SomeBlood[] = { - {s_GoreDrip, GORE_Drip, 1, Z_TOP, 100, 250, 10, 20, TRUE, 512}, + {s_GoreDrip, GORE_Drip, 1, Z_TOP, 100, 250, 10, 20, true, 512}, {NULL,0,0,0,0,0,0,0,0,0}, }; #if 0 static SHRAP MoreBlood[] = { - {s_GoreDrip, GORE_Drip, 2, Z_TOP, 100, 250, 10, 20, TRUE, 512}, + {s_GoreDrip, GORE_Drip, 2, Z_TOP, 100, 250, 10, 20, true, 512}, {NULL,0,0,0,0,0,0,0,0,0}, }; #endif static SHRAP ExtraBlood[] = { - {s_GoreDrip, GORE_Drip, 4, Z_TOP, 100, 250, 10, 20, TRUE, 512}, + {s_GoreDrip, GORE_Drip, 4, Z_TOP, 100, 250, 10, 20, true, 512}, {NULL,0,0,0,0,0,0,0,0,0}, }; static SHRAP HariKariBlood[] = { - {s_FastGoreDrip, GORE_Drip, 32, Z_TOP, 200, 650, 70, 100, TRUE, 1024}, + {s_FastGoreDrip, GORE_Drip, 32, Z_TOP, 200, 650, 70, 100, true, 1024}, {NULL,0,0,0,0,0,0,0,0,0}, }; #if 0 static SHRAP SwordPowerup[] = { - {s_ElectroShrap, ELECTRO_SHARD, 16, Z_TOP, 75, 200, 70, 150, TRUE, 512}, + {s_ElectroShrap, ELECTRO_SHARD, 16, Z_TOP, 75, 200, 70, 150, true, 512}, {NULL,0,0,0,0,0,0,0,0,0}, }; #endif @@ -4184,7 +4184,7 @@ SpawnBlood(short SpriteNum, short Weapon, short hit_ang, int hit_x, int hit_y, i SHRAPp p = UziBlood; short shrap_shade = -15; short shrap_xsize = 20, shrap_ysize = 20; - short retval = TRUE; + short retval = true; short shrap_pal = PALETTE_DEFAULT; short start_ang = 0; @@ -4377,7 +4377,7 @@ VehicleMoveHit(short SpriteNum) short controller; if (!u->ret) - return FALSE; + return false; sop = u->sop_parent; @@ -4397,7 +4397,7 @@ VehicleMoveHit(short SpriteNum) // shouldn't ever really happen } - return TRUE; + return true; } case HIT_SPRITE: @@ -4408,7 +4408,7 @@ VehicleMoveHit(short SpriteNum) if (TEST(hsp->extra, SPRX_BREAKABLE)) { HitBreakSprite(hit_sprite, u->ID); - return TRUE; + return true; } if (TEST(hsp->extra, SPRX_PLAYER_OR_ENEMY)) @@ -4416,7 +4416,7 @@ VehicleMoveHit(short SpriteNum) if (hit_sprite != cp->owner) { DoDamage(hit_sprite, controller); - return TRUE; + return true; } } else @@ -4424,11 +4424,11 @@ VehicleMoveHit(short SpriteNum) if (hsp->statnum == STAT_MINE_STUCK) { DoDamage(hit_sprite, SpriteNum); - return TRUE; + return true; } } - return TRUE; + return true; } case HIT_WALL: @@ -4465,11 +4465,11 @@ VehicleMoveHit(short SpriteNum) } } - return TRUE; + return true; } } - return FALSE; + return false; } @@ -4481,13 +4481,13 @@ WeaponMoveHit(short SpriteNum) if (!u->ret) - return FALSE; + return false; switch (TEST(u->ret, HIT_MASK)) { case HIT_PLAX_WALL: SetSuicide(SpriteNum); - return TRUE; + return true; case HIT_SECTOR: { @@ -4510,19 +4510,19 @@ WeaponMoveHit(short SpriteNum) if (u->lo_sp->lotag == TAG_SPRITE_HIT_MATCH) { if (MissileHitMatch(SpriteNum, -1, u->lo_sp - sprite)) - return TRUE; + return true; //DoMatchEverything(NULL, u->lo_sp->hitag, -1); - //return(TRUE); + //return(true); } - return TRUE; + return true; } if (SectUser[hit_sect] && SectUser[hit_sect]->depth > 0) { SpawnSplash(SpriteNum); //SetSuicide(SpriteNum); - return TRUE; + return true; } } @@ -4535,9 +4535,9 @@ WeaponMoveHit(short SpriteNum) if (u->hi_sp->lotag == TAG_SPRITE_HIT_MATCH) { if (MissileHitMatch(SpriteNum, -1, u->hi_sp - sprite)) - return TRUE; + return true; //DoMatchEverything(NULL, u->hi_sp->hitag, -1); - //return(TRUE); + //return(true); } } } @@ -4549,7 +4549,7 @@ WeaponMoveHit(short SpriteNum) { //if (sop->max_damage != -9999) DoDamage(sop->sp_child - sprite, SpriteNum); - return TRUE; + return true; } } @@ -4558,11 +4558,11 @@ WeaponMoveHit(short SpriteNum) if (labs(sp->z - sectp->ceilingz) < SPRITEp_SIZE_Z(sp)) { SetSuicide(SpriteNum); - return TRUE; + return true; } } - return TRUE; + return true; } case HIT_SPRITE: @@ -4586,7 +4586,7 @@ WeaponMoveHit(short SpriteNum) if (TEST(hsp->extra, SPRX_BREAKABLE)) { HitBreakSprite(hit_sprite, u->ID); - return TRUE; + return true; } if (TEST(hsp->extra, SPRX_PLAYER_OR_ENEMY)) @@ -4622,7 +4622,7 @@ WeaponMoveHit(short SpriteNum) } } DoDamage(hit_sprite, SpriteNum); - return TRUE; + return true; } } else @@ -4630,16 +4630,16 @@ WeaponMoveHit(short SpriteNum) if (hsp->statnum == STAT_MINE_STUCK) { DoDamage(hit_sprite, SpriteNum); - return TRUE; + return true; } } if (hsp->lotag == TAG_SPRITE_HIT_MATCH) { if (MissileHitMatch(SpriteNum, -1, hit_sprite)) - return TRUE; + return true; //DoMatchEverything(NULL, hsp->hitag, -1); - //return(TRUE); + //return(true); } if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) @@ -4647,11 +4647,11 @@ WeaponMoveHit(short SpriteNum) if (hsp->lotag || hsp->hitag) { ShootableSwitch(hit_sprite); - return TRUE; + return true; } } - return TRUE; + return true; } case HIT_WALL: @@ -4668,7 +4668,7 @@ WeaponMoveHit(short SpriteNum) { if (sop->max_damage != -999) DoDamage(sop->sp_child - sprite, SpriteNum); - return TRUE; + return true; } } @@ -4676,7 +4676,7 @@ WeaponMoveHit(short SpriteNum) { HitBreakWall(&wall[hitinfo.wall], sp->x, sp->y, sp->z, sp->ang, u->ID); u->ret = 0; - return TRUE; + return true; } // clipmove does not correctly return the sprite for WALL sprites @@ -4690,7 +4690,7 @@ WeaponMoveHit(short SpriteNum) if (hitinfo.sect < 0) { - return FALSE; + return false; } if (hitinfo.sprite >= 0) @@ -4700,7 +4700,7 @@ WeaponMoveHit(short SpriteNum) if (hsp->lotag == TAG_SPRITE_HIT_MATCH) { if (MissileHitMatch(SpriteNum, -1, hitinfo.sprite)) - return TRUE; + return true; } if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) @@ -4708,16 +4708,16 @@ WeaponMoveHit(short SpriteNum) if (hsp->lotag || hsp->hitag) { ShootableSwitch(hitinfo.sprite); - return TRUE; + return true; } } } - return TRUE; + return true; } } - return FALSE; + return false; } int @@ -4762,7 +4762,7 @@ DoFireballFlames(short SpriteNum) { SPRITEp sp = &sprite[SpriteNum],ap; USERp u = User[SpriteNum]; - SWBOOL jumping = FALSE; + SWBOOL jumping = false; // if no owner then stay where you are if (u->Attach >= 0) @@ -4789,13 +4789,13 @@ DoFireballFlames(short SpriteNum) if (TEST(u->Flags, SPR_JUMPING)) { DoJump(SpriteNum); - jumping = TRUE; + jumping = true; //u->ret = move_missile(SpriteNum, dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, MISSILEMOVETICS); } else if (TEST(u->Flags, SPR_FALLING)) { DoFall(SpriteNum); - jumping = TRUE; + jumping = true; //u->ret = move_missile(SpriteNum, dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, MISSILEMOVETICS); } else @@ -4859,17 +4859,17 @@ DoBreakFlames(short SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; - SWBOOL jumping = FALSE; + SWBOOL jumping = false; if (TEST(u->Flags, SPR_JUMPING)) { DoJump(SpriteNum); - jumping = TRUE; + jumping = true; } else if (TEST(u->Flags, SPR_FALLING)) { DoFall(SpriteNum); - jumping = TRUE; + jumping = true; } else { @@ -5045,7 +5045,7 @@ ActorChooseDeath(short SpriteNum, short Weapon) ASSERT(u); if (u->Health > 0) - return FALSE; + return false; UpdateSinglePlayKills(SpriteNum); @@ -5061,7 +5061,7 @@ ActorChooseDeath(short SpriteNum, short Weapon) UpdateSinglePlayKills(SpriteNum); break; } - return FALSE; + return false; } #endif @@ -5128,7 +5128,7 @@ ActorChooseDeath(short SpriteNum, short Weapon) { PLAYERp pp = wu->PlayerP; if (pp && !TEST(pp->Flags, PF_DIVING)) // JBF: added null test - pp->Bloody = TRUE; + pp->Bloody = true; PlaySound(DIGI_TOILETGIRLSCREAM, sp, v3df_none); } if (SpawnShrap(SpriteNum, Weapon)) @@ -5138,8 +5138,8 @@ ActorChooseDeath(short SpriteNum, short Weapon) // These are player zombies case ZOMBIE_RUN_R0: - InitBloodSpray(SpriteNum,TRUE,105); - InitBloodSpray(SpriteNum,TRUE,105); + InitBloodSpray(SpriteNum,true,105); + InitBloodSpray(SpriteNum,true,105); if (SpawnShrap(SpriteNum, Weapon)) SetSuicide(SpriteNum); break; @@ -5189,7 +5189,7 @@ ActorChooseDeath(short SpriteNum, short Weapon) PlayerSound(DIGI_CANBEONLYONE, v3df_follow|v3df_dontpan,pp); } if (!TEST(pp->Flags, PF_DIVING)) - pp->Bloody = TRUE; + pp->Bloody = true; } if (u->WeaponNum == WPN_FIST) @@ -5207,7 +5207,7 @@ ActorChooseDeath(short SpriteNum, short Weapon) // Gib out the ones you can't cut in half // Blood fountains - InitBloodSpray(SpriteNum,TRUE,-1); + InitBloodSpray(SpriteNum,true,-1); if (SpawnShrap(SpriteNum, Weapon)) { @@ -5284,13 +5284,13 @@ ActorChooseDeath(short SpriteNum, short Weapon) ActorCoughItem(SpriteNum); // Blood fountains - InitBloodSpray(SpriteNum,TRUE,-1); + InitBloodSpray(SpriteNum,true,-1); // Bosses do not gib if (u->ID == SERP_RUN_R0 || u->ID == SUMO_RUN_R0 || u->ID == ZILLA_RUN_R0) { DoActorDie(SpriteNum, Weapon); - return TRUE; + return true; } if (SpawnShrap(SpriteNum, Weapon)) @@ -5311,7 +5311,7 @@ ActorChooseDeath(short SpriteNum, short Weapon) break; } - return TRUE; + return true; } @@ -5325,7 +5325,7 @@ ActorHealth(short SpriteNum, short amt) if (u->ID == TRASHCAN && amt > -75) { u->LastDamage = 100; - return TRUE; + return true; } SET(u->Flags, SPR_ATTACKED); @@ -5338,7 +5338,7 @@ ActorHealth(short SpriteNum, short amt) { FinishAnim = ANIM_SERP; ChangeLevel(nullptr, -1); - return TRUE; + return true; } } @@ -5384,8 +5384,8 @@ ActorHealth(short SpriteNum, short amt) extern STATEp sg_NinjaGrabThroat[]; extern STATEp sg_NinjaHariKari[]; - if (TEST(u->Flags2, SPR2_DYING)) return TRUE; - if (TEST(u->Flags, SPR_FALLING | SPR_JUMPING | SPR_CLIMBING)) return TRUE; + if (TEST(u->Flags2, SPR2_DYING)) return true; + if (TEST(u->Flags, SPR_FALLING | SPR_JUMPING | SPR_CLIMBING)) return true; if (!TEST(u->Flags2, SPR2_DYING)) { @@ -5393,13 +5393,13 @@ ActorHealth(short SpriteNum, short amt) rnd = RANDOM_P2(1024<<4)>>4; if (rnd < 950) - return TRUE; + return true; SET(u->Flags2, SPR2_DYING); // Only let it check this once! u->WaitTics = SEC(1) + SEC(RANDOM_RANGE(2)); u->Health = 60; PlaySound(DIGI_NINJACHOKE, sp, v3df_follow); InitPlasmaFountain(NULL, sp); - InitBloodSpray(SpriteNum,FALSE,105); + InitBloodSpray(SpriteNum,false,105); sp->ang = NORM_ANGLE(getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y) + 1024); RESET(sp->cstat, CSTAT_SPRITE_YFLIP); if (sw_ninjahack) @@ -5414,7 +5414,7 @@ ActorHealth(short SpriteNum, short amt) } } - return TRUE; + return true; } int @@ -5425,7 +5425,7 @@ SopDamage(SECTOR_OBJECTp sop, short amt) // does not have damage if (sop->max_damage == -9999) - return FALSE; + return false; sop->max_damage += amt; @@ -5433,16 +5433,16 @@ SopDamage(SECTOR_OBJECTp sop, short amt) if (amt < 0) u->LastDamage = -amt; - return TRUE; + return true; } int SopCheckKill(SECTOR_OBJECTp sop) { - SWBOOL killed = FALSE; + SWBOOL killed = false; if (TEST(sop->flags, SOBJ_BROKEN)) - return FALSE; + return false; // does not have damage if (sop->max_damage == -9999) @@ -5482,7 +5482,7 @@ ActorPain(short SpriteNum) } if (RANDOM_RANGE(1000) < 875 || u->WaitTics > 0) - return FALSE; + return false; if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING)) { @@ -5491,11 +5491,11 @@ ActorPain(short SpriteNum) ActorLeaveTrack(SpriteNum); u->WaitTics = 60; NewStateGroup(SpriteNum, u->ActorActionSet->Pain); - return TRUE; + return true; } } - return FALSE; + return false; } int @@ -5509,7 +5509,7 @@ ActorPainPlasma(short SpriteNum) { u->WaitTics = PLASMA_FOUNTAIN_TIME; NewStateGroup(SpriteNum, u->ActorActionSet->Pain); - return TRUE; + return true; } else { @@ -5518,7 +5518,7 @@ ActorPainPlasma(short SpriteNum) } } - return FALSE; + return false; } int @@ -5562,22 +5562,22 @@ ActorDamageSlide(short SpriteNum, short damage, short ang) int slide_vel,slide_dec; if (TEST(u->Flags, SPR_CLIMBING)) - return FALSE; + return false; damage = labs(damage); if (!damage) - return FALSE; + return false; if (damage <= 10) { DoActorBeginSlide(SpriteNum, ang, 64, 5); - return TRUE; + return true; } else if (damage <= 20) { DoActorBeginSlide(SpriteNum, ang, 128, 5); - return TRUE; + return true; } else { @@ -5591,7 +5591,7 @@ ActorDamageSlide(short SpriteNum, short damage, short ang) DoActorBeginSlide(SpriteNum, ang, slide_vel, slide_dec); - return TRUE; + return true; } } @@ -5603,29 +5603,29 @@ PlayerDamageSlide(PLAYERp pp, short damage, short ang) damage = labs(damage); if (!damage) - return FALSE; + return false; if (damage <= 5) { //nudge //pp->slide_xvect = MOVEx(4, ang)<<15; //pp->slide_yvect = MOVEy(4, ang)<<15; - //return(TRUE); - return FALSE; + //return(true); + return false; } else if (damage <= 10) { //nudge pp->slide_xvect = MOVEx(16, ang)<<15; pp->slide_yvect = MOVEy(16, ang)<<15; - return TRUE; + return true; } else if (damage <= 20) { //bigger nudge pp->slide_xvect = MOVEx(64, ang)<<15; pp->slide_yvect = MOVEy(64, ang)<<15; - return TRUE; + return true; } else { @@ -5634,7 +5634,7 @@ PlayerDamageSlide(PLAYERp pp, short damage, short ang) pp->slide_xvect = MOVEx(slide_vel, ang)<<15; pp->slide_yvect = MOVEy(slide_vel, ang)<<15; - return TRUE; + return true; } } @@ -5749,7 +5749,7 @@ PlayerCheckDeath(PLAYERp pp, short Weapon) { pp->Killer = -1; DoPlayerBeginDie(pp); - return TRUE; + return true; } SPRITEp wp = &sprite[Weapon]; @@ -5764,7 +5764,7 @@ PlayerCheckDeath(PLAYERp pp, short Weapon) if (Weapon > -1 && wu->ID == NINJA_RUN_R0 && wu->PlayerP) { pp->DeathType = PLAYER_DEATH_FLIP; - wu->PlayerP->Bloody = TRUE; + wu->PlayerP->Bloody = true; } // keep track of who killed you for death purposes @@ -5786,17 +5786,17 @@ PlayerCheckDeath(PLAYERp pp, short Weapon) // for death velocity u->slide_vel = u->LastDamage * 5; - return TRUE; + return true; } - return FALSE; + return false; } SWBOOL PlayerTakeDamage(PLAYERp pp, short Weapon) { if (Weapon < 0) - return TRUE; + return true; USERp u = User[pp->PlayerSprite]; SPRITEp wp = &sprite[Weapon]; @@ -5809,53 +5809,53 @@ PlayerTakeDamage(PLAYERp pp, short Weapon) { // if weapons owner the player if (wp->owner == pp->PlayerSprite) - return FALSE; + return false; } - return TRUE; + return true; } if (gNet.MultiGameType == MULTI_GAME_COOPERATIVE) { // everything hurts you if (gNet.HurtTeammate) - return TRUE; + return true; // if weapon IS the YOURSELF take damage if (wu->PlayerP == pp) - return TRUE; + return true; // if the weapons owner is YOURSELF take damage if (wp->owner >= 0 && User[wp->owner] && User[wp->owner]->PlayerP && User[wp->owner]->PlayerP == pp) - return TRUE; + return true; // if weapon IS the player no damage if (wu->PlayerP) - return FALSE; + return false; // if the weapons owner is a player if (wp->owner >= 0 && User[wp->owner] && User[wp->owner]->PlayerP) - return FALSE; + return false; } else if (gNet.MultiGameType == MULTI_GAME_COMMBAT && gNet.TeamPlay) { // everything hurts you if (gNet.HurtTeammate) - return TRUE; + return true; // if weapon IS the YOURSELF take damage if (wu->PlayerP == pp) - return TRUE; + return true; // if the weapons owner is YOURSELF take damage if (wp->owner >= 0 && User[wp->owner] && User[wp->owner]->PlayerP && User[wp->owner]->PlayerP == pp) - return TRUE; + return true; if (wu->PlayerP) { // if both on the same team then no damage if (wu->spal == u->spal) - return FALSE; + return false; } // if the weapons owner is a player @@ -5863,11 +5863,11 @@ PlayerTakeDamage(PLAYERp pp, short Weapon) { // if both on the same team then no damage if (User[wp->owner]->spal == u->spal) - return FALSE; + return false; } } - return TRUE; + return true; } @@ -6522,7 +6522,7 @@ DoDamage(short SpriteNum, short Weapon) break; default: if (RANDOM_RANGE(1000) > 900) - InitBloodSpray(SpriteNum,FALSE,105); + InitBloodSpray(SpriteNum,false,105); if (RANDOM_RANGE(1000) > 900) SpawnMidSplash(SpriteNum); break; @@ -6764,9 +6764,9 @@ DoDamage(short SpriteNum, short Weapon) } SpawnBunnyExp(Weapon); - //InitBloodSpray(Weapon,TRUE,-1); - //InitBloodSpray(Weapon,TRUE,-1); - //InitBloodSpray(Weapon,TRUE,-1); + //InitBloodSpray(Weapon,true,-1); + //InitBloodSpray(Weapon,true,-1); + //InitBloodSpray(Weapon,true,-1); SetSuicide(Weapon); break; @@ -7991,7 +7991,7 @@ DoStar(int16_t Weapon) if (sp->z > u->loz) { KillSprite(Weapon); - return TRUE; + return true; } } else @@ -8085,7 +8085,7 @@ DoStar(int16_t Weapon) { SpawnSplash(Weapon); KillSprite(Weapon); - return TRUE; + return true; // hit water - will be taken care of in WeaponMoveHit //break; } @@ -8177,12 +8177,12 @@ DoStar(int16_t Weapon) if (WeaponMoveHit(Weapon)) { KillSprite(Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } @@ -8215,11 +8215,11 @@ DoCrossBolt(int16_t Weapon) KillSprite(Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } @@ -8247,7 +8247,7 @@ int PickEnemyTarget(SPRITEp sp, short aware_range) { TARGET_SORTp ts; - DoPickTarget(sp, aware_range, FALSE); + DoPickTarget(sp, aware_range, false); for (ts = TargetSort; ts < &TargetSort[TargetSortCount]; ts++) { @@ -8294,7 +8294,7 @@ MissileSeek(int16_t Weapon, int16_t delay_tics, int16_t aware_range/*, int16_t d SET(hu->Flags, SPR_ATTACKED); } } - else if ((hit_sprite = DoPickTarget(sp, aware_range, FALSE)) != -1) + else if ((hit_sprite = DoPickTarget(sp, aware_range, false)) != -1) { USERp hu = User[hit_sprite]; @@ -8367,7 +8367,7 @@ ComboMissileSeek(int16_t Weapon, int16_t delay_tics, int16_t aware_range/*, int1 { short hit_sprite; - if ((hit_sprite = DoPickTarget(sp, aware_range, FALSE)) != -1) + if ((hit_sprite = DoPickTarget(sp, aware_range, false)) != -1) { USERp hu = User[hit_sprite]; @@ -8455,7 +8455,7 @@ VectorMissileSeek(int16_t Weapon, int16_t delay_tics, int16_t turn_speed, int16_ } else { - if ((hit_sprite = DoPickTarget(sp, aware_range1, FALSE)) != -1) + if ((hit_sprite = DoPickTarget(sp, aware_range1, false)) != -1) { USERp hu = User[hit_sprite]; @@ -8463,7 +8463,7 @@ VectorMissileSeek(int16_t Weapon, int16_t delay_tics, int16_t turn_speed, int16_ SET(hu->Flags, SPR_TARGETED); SET(hu->Flags, SPR_ATTACKED); } - else if ((hit_sprite = DoPickTarget(sp, aware_range2, FALSE)) != -1) + else if ((hit_sprite = DoPickTarget(sp, aware_range2, false)) != -1) { USERp hu = User[hit_sprite]; @@ -8527,7 +8527,7 @@ VectorWormSeek(int16_t Weapon, int16_t delay_tics, int16_t aware_range1, int16_t { short hit_sprite; - if ((hit_sprite = DoPickTarget(sp, aware_range1, FALSE)) != -1) + if ((hit_sprite = DoPickTarget(sp, aware_range1, false)) != -1) { USERp hu = User[hit_sprite]; @@ -8535,7 +8535,7 @@ VectorWormSeek(int16_t Weapon, int16_t delay_tics, int16_t aware_range1, int16_t SET(hu->Flags, SPR_TARGETED); SET(hu->Flags, SPR_ATTACKED); } - else if ((hit_sprite = DoPickTarget(sp, aware_range2, FALSE)) != -1) + else if ((hit_sprite = DoPickTarget(sp, aware_range2, false)) != -1) { USERp hu = User[hit_sprite]; @@ -8652,7 +8652,7 @@ DoPlasmaFountain(int16_t Weapon) { SpawnBlood(ap-sprite, Weapon, 0, 0, 0, 0); if (RANDOM_RANGE(1000) > 600) - InitBloodSpray(ap-sprite, FALSE, 105); + InitBloodSpray(ap-sprite, false, 105); } } @@ -8734,7 +8734,7 @@ DoPlasma(int16_t Weapon) if (TEST(u->Flags, SPR_SUICIDE)) { KillSprite(Weapon); - return TRUE; + return true; } else { @@ -8742,11 +8742,11 @@ DoPlasma(int16_t Weapon) ChangeState(Weapon, s_PlasmaDone); } - return TRUE; + return true; } } - return FALSE; + return false; } @@ -8773,11 +8773,11 @@ DoCoolgFire(int16_t Weapon) ChangeState(Weapon, s_CoolgFireDone); if (sp->owner >= 0 && User[sp->owner] && User[sp->owner]->ID != RIPPER_RUN_R0) // JBF: added range check SpawnDemonFist(Weapon); // Just a red magic circle flash - return TRUE; + return true; } } - return FALSE; + return false; } int @@ -8790,7 +8790,7 @@ DoEelFire(short Weapon) //DoDamageTest(Weapon); - return FALSE; + return false; } @@ -8878,13 +8878,13 @@ SWBOOL SlopeBounce(short SpriteNum, SWBOOL *hit_wall) } if (!slope) - return FALSE; + return false; // if greater than a 45 degree angle if (labs(slope) > 4096) - *hit_wall = TRUE; + *hit_wall = true; else - *hit_wall = FALSE; + *hit_wall = false; // get angle of the first wall of the sector k = sector[hit_sector].wallptr; @@ -8913,7 +8913,7 @@ SWBOOL SlopeBounce(short SpriteNum, SWBOOL *hit_wall) sp->ang = getangle(u->xchange, u->ychange); } - return TRUE; + return true; } extern STATE s_Phosphorus[]; @@ -8955,7 +8955,7 @@ DoGrenade(int16_t Weapon) { case HIT_PLAX_WALL: KillSprite(Weapon); - return TRUE; + return true; case HIT_SPRITE: { short wall_ang; @@ -8982,7 +8982,7 @@ DoGrenade(int16_t Weapon) } else { - if (u->Counter2 == TRUE) // It's a phosphorus grenade! + if (u->Counter2 == 1) // It's a phosphorus grenade! { for (i=0; i<5; i++) { @@ -8992,7 +8992,7 @@ DoGrenade(int16_t Weapon) } SpawnGrenadeExp(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } @@ -9054,7 +9054,7 @@ DoGrenade(int16_t Weapon) } else { - if (u->Counter2 == TRUE) // It's a phosphorus grenade! + if (u->Counter2 == 1) // It's a phosphorus grenade! { for (i=0; i<5; i++) { @@ -9064,7 +9064,7 @@ DoGrenade(int16_t Weapon) } SpawnGrenadeExp(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } } else @@ -9097,7 +9097,7 @@ DoGrenade(int16_t Weapon) } else { - if (u->Counter2 == TRUE) // It's a phosphorus grenade! + if (u->Counter2 == 1) // It's a phosphorus grenade! { for (i=0; i<5; i++) { @@ -9108,7 +9108,7 @@ DoGrenade(int16_t Weapon) //WeaponMoveHit(Weapon); SpawnGrenadeExp(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } } else @@ -9128,7 +9128,7 @@ DoGrenade(int16_t Weapon) { SpawnGrenadeExp(Weapon); KillSprite(Weapon); - return TRUE; + return true; } // if you haven't bounced or your going slow do some puffs @@ -9164,7 +9164,7 @@ DoGrenade(int16_t Weapon) SET(nu->Flags, SPR_UNDERWATER); } - return FALSE; + return false; } int @@ -9185,7 +9185,7 @@ DoVulcanBoulder(int16_t Weapon) { SpawnLittleExp(Weapon); KillSprite(Weapon); - return TRUE; + return true; } if (u->ret) @@ -9194,7 +9194,7 @@ DoVulcanBoulder(int16_t Weapon) { case HIT_PLAX_WALL: KillSprite(Weapon); - return TRUE; + return true; case HIT_SPRITE: { short wall_ang; @@ -9217,7 +9217,7 @@ DoVulcanBoulder(int16_t Weapon) // hit an actor SpawnLittleExp(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } @@ -9319,7 +9319,7 @@ DoVulcanBoulder(int16_t Weapon) } } - return FALSE; + return false; } SWBOOL @@ -9328,11 +9328,11 @@ OwnerIsPlayer(short Weapon) SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon],uo; - if (!u || !sp || (unsigned)sp->owner >= (unsigned)MAXSPRITES) return FALSE; + if (!u || !sp || (unsigned)sp->owner >= (unsigned)MAXSPRITES) return false; uo = User[sp->owner]; - if (uo && uo->PlayerP) return TRUE; + if (uo && uo->PlayerP) return true; - return FALSE; + return false; } int @@ -9346,7 +9346,7 @@ DoMineRangeTest(short Weapon, short range) unsigned stat; int dist, tx, ty; int tmin; - SWBOOL ownerisplayer = FALSE; + SWBOOL ownerisplayer = false; ownerisplayer = OwnerIsPlayer(Weapon); @@ -9384,11 +9384,11 @@ DoMineRangeTest(short Weapon, short range) if (!FAFcansee(sp->x,sp->y,SPRITEp_UPPER(sp),sp->sectnum,wp->x,wp->y,wp->z,wp->sectnum)) continue; - return TRUE; + return true; } } - return FALSE; + return false; } @@ -9422,7 +9422,7 @@ DoMineStuck(int16_t Weapon) if (!TEST(u->Flags, SPR_ACTIVE)) { if ((u->WaitTics -= (MISSILEMOVETICS*2)) > 0) - return FALSE; + return false; // activate it //u->WaitTics = 65536; @@ -9547,12 +9547,12 @@ DoMineStuck(int16_t Weapon) PlaySound(DIGI_MINEBEEP, sp, v3df_dontpan); SpawnMineExp(Weapon); KillSprite(Weapon); - return FALSE; + return false; } break; } - return FALSE; + return false; } int @@ -9622,7 +9622,7 @@ DoMine(int16_t Weapon) sp->z = hsp->z - DIV2(SPRITEp_SIZE_Z(hsp)); // If it's not alive, don't stick it - if (hu && hu->Health <= 0) return FALSE; // JBF: added null check + if (hu && hu->Health <= 0) return false; // JBF: added null check // check to see if sprite is player or enemy if (TEST(hsp->extra, SPRX_PLAYER_OR_ENEMY)) @@ -9671,7 +9671,7 @@ DoMine(int16_t Weapon) { SpawnMineExp(Weapon); KillSprite(Weapon); - return FALSE; + return false; } } @@ -9701,7 +9701,7 @@ DoMine(int16_t Weapon) { SpawnMineExp(Weapon); KillSprite(Weapon); - return FALSE; + return false; } break; @@ -9724,7 +9724,7 @@ DoMine(int16_t Weapon) { SpawnMineExp(Weapon); KillSprite(Weapon); - return FALSE; + return false; } break; @@ -9734,7 +9734,7 @@ DoMine(int16_t Weapon) u->ret = 0; } - return FALSE; + return false; } int @@ -9784,7 +9784,7 @@ DoBoltThinMan(int16_t Weapon) //DoDamageTest(Weapon); if (TEST(u->Flags, SPR_SUICIDE)) - return TRUE; + return true; if (u->ret) { @@ -9792,12 +9792,12 @@ DoBoltThinMan(int16_t Weapon) { SpawnBoltExp(Weapon); KillSprite(Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } int @@ -9818,14 +9818,14 @@ DoTracer(int16_t Weapon) if (WeaponMoveHit(Weapon)) { KillSprite(Weapon); - return TRUE; + return true; } } } RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE); - return FALSE; + return false; } int @@ -9857,14 +9857,14 @@ DoEMP(int16_t Weapon) if (WeaponMoveHit(Weapon)) { KillSprite(Weapon); - return TRUE; + return true; } } } RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE); - return FALSE; + return false; } int @@ -9915,10 +9915,10 @@ DoEMPBurst(int16_t Weapon) //SpawnMineExp(Weapon); // Spawn a big radius burst of sparks here and check for final damage amount KillSprite(Weapon); - return FALSE; + return false; } - return FALSE; + return false; } int @@ -9940,12 +9940,12 @@ DoTankShell(int16_t Weapon) SpawnTankShellExp(Weapon); //SetExpQuake(exp); KillSprite(Weapon); - return TRUE; + return true; } } } - return FALSE; + return false; } int @@ -9963,11 +9963,11 @@ DoTracerStart(int16_t Weapon) if (WeaponMoveHit(Weapon)) { KillSprite(Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } int @@ -9980,9 +9980,9 @@ DoLaser(int16_t Weapon) short New; short spawn_count = 0; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify - while (TRUE) + while (true) { u->ret = move_missile(Weapon, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS); @@ -9994,7 +9994,7 @@ DoLaser(int16_t Weapon) { SpawnBoltExp(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } } @@ -10024,7 +10024,7 @@ DoLaserStart(int16_t Weapon) { USERp u = User[Weapon]; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify u->ret = move_missile(Weapon, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS); @@ -10036,7 +10036,7 @@ DoLaserStart(int16_t Weapon) { SpawnBoltExp(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } } @@ -10053,9 +10053,9 @@ DoRail(int16_t Weapon) short New; short spawn_count = 0; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify - while (TRUE) + while (true) { u->ret = move_missile(Weapon, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS); @@ -10077,14 +10077,14 @@ DoRail(int16_t Weapon) RESET(sprite[hit_sprite].cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN|CSTAT_SPRITE_BLOCK_MISSILE); DoRail(Weapon); sprite[hit_sprite].cstat = cstat_save; - return TRUE; + return true; } else { SpawnTracerExp(Weapon); SpawnShrapX(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } } else @@ -10092,7 +10092,7 @@ DoRail(int16_t Weapon) SpawnTracerExp(Weapon); SpawnShrapX(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } } } @@ -10139,7 +10139,7 @@ DoRailStart(int16_t Weapon) { USERp u = User[Weapon]; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify u->ret = move_missile(Weapon, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS); @@ -10152,7 +10152,7 @@ DoRailStart(int16_t Weapon) SpawnTracerExp(Weapon); SpawnShrapX(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } } @@ -10191,7 +10191,7 @@ DoRocket(int16_t Weapon) //DoDamageTest(Weapon); if (TEST(u->Flags, SPR_SUICIDE)) - return TRUE; + return true; if (u->ret) { @@ -10207,7 +10207,7 @@ DoRocket(int16_t Weapon) SpawnBoltExp(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } } @@ -10245,7 +10245,7 @@ DoRocket(int16_t Weapon) SET(nu->Flags, SPR_UNDERWATER); } - return FALSE; + return false; } int @@ -10266,12 +10266,12 @@ DoMicroMini(int16_t Weapon) { SpawnMicroExp(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } } } - return FALSE; + return false; } int @@ -10320,7 +10320,7 @@ DoMicro(int16_t Weapon) USERp u = User[Weapon]; short New; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify u->ret = move_missile(Weapon, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS); @@ -10371,7 +10371,7 @@ DoMicro(int16_t Weapon) sp->xrepeat = sp->yrepeat = 10; RESET(sp->cstat, CSTAT_SPRITE_INVISIBLE); SpawnExtraMicroMini(Weapon); - return TRUE; + return true; } } @@ -10383,11 +10383,11 @@ DoMicro(int16_t Weapon) { SpawnMicroExp(Weapon); KillSprite(Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } int @@ -10449,7 +10449,7 @@ DoUziBullet(int16_t Weapon) KillSprite(Weapon); - return TRUE; + return true; } else if (u->Dist > 8000) { @@ -10458,7 +10458,7 @@ DoUziBullet(int16_t Weapon) } } - return FALSE; + return false; } @@ -10489,12 +10489,12 @@ DoBoltSeeker(int16_t Weapon) { SpawnBoltExp(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } int @@ -10534,7 +10534,7 @@ DoElectro(int16_t Weapon) //DoDamageTest(Weapon); if (TEST(u->Flags, SPR_SUICIDE)) - return TRUE; + return true; if (u->ret) { @@ -10559,11 +10559,11 @@ DoElectro(int16_t Weapon) //SpawnShrap(Weapon, -1); KillSprite(Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } int @@ -10580,7 +10580,7 @@ DoLavaBoulder(int16_t Weapon) //DoDamageTest(Weapon); if (TEST(u->Flags, SPR_SUICIDE)) - return TRUE; + return true; if (u->ret) { @@ -10588,11 +10588,11 @@ DoLavaBoulder(int16_t Weapon) { SpawnShrap(Weapon, -1); KillSprite(Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } int @@ -10611,7 +10611,7 @@ DoSpear(int16_t Weapon) //DoDamageTest(Weapon); if (TEST(u->Flags, SPR_SUICIDE)) - return TRUE; + return true; if (u->ret) { @@ -10619,11 +10619,11 @@ DoSpear(int16_t Weapon) { //SpawnShrap(Weapon, -1); KillSprite(Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } int SpawnCoolieExp(short SpriteNum) @@ -10733,7 +10733,7 @@ SpawnFireballFlames(int16_t SpriteNum, int16_t enemy) if (!eu) { - ASSERT(TRUE == FALSE); + ASSERT(true == false); } if (eu->flame >= 0) @@ -11073,9 +11073,9 @@ SpawnBunnyExp(int16_t Weapon) PlaySound(DIGI_BUNNYDIE3, sp, v3df_none); u->ID = BOLT_EXP; // Change id - InitBloodSpray(Weapon,TRUE,-1); - InitBloodSpray(Weapon,TRUE,-1); - InitBloodSpray(Weapon,TRUE,-1); + InitBloodSpray(Weapon,true,-1); + InitBloodSpray(Weapon,true,-1); + InitBloodSpray(Weapon,true,-1); DoExpDamageTest(Weapon); return 0; @@ -11396,12 +11396,12 @@ SpawnBigGunFlames(int16_t Weapon, int16_t Operator, SECTOR_OBJECTp sop) USERp eu; short explosion; unsigned sn; - SWBOOL smallflames = FALSE; + SWBOOL smallflames = false; if (Weapon < 0) { Weapon = abs(Weapon); - smallflames = TRUE; + smallflames = true; } sp = &sprite[Weapon]; @@ -11938,7 +11938,7 @@ DoFireball(int16_t Weapon) { SpawnSmokePuff(Weapon); KillSprite(Weapon); - return TRUE; + return true; } } @@ -11986,7 +11986,7 @@ DoFireball(int16_t Weapon) if (!hu) hu = SpawnUser(hsp - sprite, hsp->picnum, NULL); SpawnFireballFlames(Weapon, hsp - sprite); - hit_burn = TRUE; + hit_burn = true; } break; @@ -12003,11 +12003,11 @@ DoFireball(int16_t Weapon) KillSprite(Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } @@ -12041,7 +12041,7 @@ DoFindGround(int16_t SpriteNum) // found a sprite floor u->lo_sp = hsp; u->lo_sectp = NULL; - return TRUE; + return true; } else { @@ -12053,21 +12053,21 @@ DoFindGround(int16_t SpriteNum) hsp->cstat = bak_cstat; } - return FALSE; + return false; } case HIT_SECTOR: { u->lo_sectp = §or[NORM_SECTOR(florhit)]; u->lo_sp = NULL; - return TRUE; + return true; } default: - ASSERT(TRUE == FALSE); + ASSERT(true == false); break; } - return FALSE; + return false; } int @@ -12100,7 +12100,7 @@ DoFindGroundPoint(int16_t SpriteNum) // found a sprite floor u->lo_sp = hsp; u->lo_sectp = NULL; - return TRUE; + return true; } else { @@ -12112,21 +12112,21 @@ DoFindGroundPoint(int16_t SpriteNum) hsp->cstat = bak_cstat; } - return FALSE; + return false; } case HIT_SECTOR: { u->lo_sectp = §or[NORM_SECTOR(florhit)]; u->lo_sp = NULL; - return TRUE; + return true; } default: - ASSERT(TRUE == FALSE); + ASSERT(true == false); break; } - return FALSE; + return false; } int @@ -12148,7 +12148,7 @@ DoNapalm(int16_t Weapon) { SpawnSmokePuff(Weapon); KillSprite(Weapon); - return TRUE; + return true; } } @@ -12235,11 +12235,11 @@ DoNapalm(int16_t Weapon) { KillSprite((short) Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } #define WORM 1 @@ -12266,7 +12266,7 @@ DoBloodWorm(int16_t Weapon) u->ychange = -u->ychange; u->ret = 0; sp->ang = NORM_ANGLE(sp->ang + 1024); - return TRUE; + return true; } MissileHitDiveArea(Weapon); @@ -12280,9 +12280,9 @@ DoBloodWorm(int16_t Weapon) USERp tu; int i,nexti; - InitBloodSpray(Weapon, FALSE, 1); - InitBloodSpray(Weapon, FALSE, 1); - InitBloodSpray(Weapon, FALSE, 1); + InitBloodSpray(Weapon, false, 1); + InitBloodSpray(Weapon, false, 1); + InitBloodSpray(Weapon, false, 1); // Kill any old zombies you own TRAVERSE_SPRITE_STAT(headspritestat[STAT_ENEMY], i, nexti) @@ -12294,8 +12294,8 @@ DoBloodWorm(int16_t Weapon) if (tu->ID == ZOMBIE_RUN_R0 && tsp->owner == sp->owner) { - InitBloodSpray(i,TRUE,105); - InitBloodSpray(i,TRUE,105); + InitBloodSpray(i,true,105); + InitBloodSpray(i,true,105); SetSuicide(i); break; } @@ -12303,7 +12303,7 @@ DoBloodWorm(int16_t Weapon) SpawnZombie2(Weapon); KillSprite(Weapon); - return TRUE; + return true; } } @@ -12323,15 +12323,15 @@ DoBloodWorm(int16_t Weapon) updatesectorz(sp->x, sp->y, sp->z, §num); if (sectnum >= 0) { - GlobalSkipZrange = TRUE; - InitBloodSpray(Weapon, FALSE, 1); - GlobalSkipZrange = FALSE; + GlobalSkipZrange = true; + InitBloodSpray(Weapon, false, 1); + GlobalSkipZrange = false; } sp->x = bx; sp->y = by; - return FALSE; + return false; } #endif @@ -12362,7 +12362,7 @@ DoBloodWorm(int16_t Weapon) case HIT_PLAX_WALL: KillSprite(Weapon); - return TRUE; + return true; case HIT_SPRITE: case HIT_WALL: @@ -12394,8 +12394,8 @@ DoBloodWorm(int16_t Weapon) USERp tu; int i,nexti; - InitBloodSpray(Weapon, FALSE, 1); - InitBloodSpray(Weapon, FALSE, 1); + InitBloodSpray(Weapon, false, 1); + InitBloodSpray(Weapon, false, 1); // Kill any old zombies you own TRAVERSE_SPRITE_STAT(headspritestat[STAT_ENEMY], i, nexti) @@ -12407,8 +12407,8 @@ DoBloodWorm(int16_t Weapon) if (tu->ID == ZOMBIE_RUN_R0 && tsp->owner == sp->owner) { - InitBloodSpray(i,TRUE,105); - InitBloodSpray(i,TRUE,105); + InitBloodSpray(i,true,105); + InitBloodSpray(i,true,105); SetSuicide(i); break; } @@ -12416,7 +12416,7 @@ DoBloodWorm(int16_t Weapon) SpawnZombie2(Weapon); KillSprite(Weapon); - return TRUE; + return true; } ang = NORM_ANGLE(sp->ang + 512); @@ -12435,9 +12435,9 @@ DoBloodWorm(int16_t Weapon) updatesectorz(sp->x, sp->y, sp->z, §num); if (sectnum >= 0) { - //GlobalSkipZrange = TRUE; - InitBloodSpray(Weapon, FALSE, 1); - //GlobalSkipZrange = FALSE; + //GlobalSkipZrange = true; + InitBloodSpray(Weapon, false, 1); + //GlobalSkipZrange = false; } if (RANDOM_P2(2048) < 512) @@ -12453,23 +12453,23 @@ DoBloodWorm(int16_t Weapon) updatesectorz(sp->x, sp->y, sp->z, §num); if (sectnum >= 0) { - //GlobalSkipZrange = TRUE; - InitBloodSpray(Weapon, FALSE, 1); - //GlobalSkipZrange = FALSE; + //GlobalSkipZrange = true; + InitBloodSpray(Weapon, false, 1); + //GlobalSkipZrange = false; } } sp->x = bx; sp->y = by; - return FALSE; + return false; } #endif int DoMeteor(int16_t Weapon) { - return FALSE; + return false; } int @@ -12521,11 +12521,11 @@ DoSerpMeteor(int16_t Weapon) KillSprite((short) Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } @@ -12555,11 +12555,11 @@ DoMirvMissile(int16_t Weapon) KillSprite((short) Weapon); - return TRUE; + return true; } } - return FALSE; + return false; } @@ -12662,10 +12662,10 @@ DoMirv(int16_t Weapon) SpawnMeteorExp(Weapon); //SpawnBasicExp(Weapon); KillSprite((short) Weapon); - return TRUE; + return true; } - return FALSE; + return false; } SWBOOL @@ -12675,7 +12675,7 @@ MissileSetPos(short Weapon, ANIMATORp DoWeapon, int dist) USERp wu = User[Weapon]; int oldvel, oldzvel; int oldxc, oldyc, oldzc; - char retval = FALSE; + char retval = false; // backup values oldxc = wu->xchange; @@ -12696,7 +12696,7 @@ MissileSetPos(short Weapon, ANIMATORp DoWeapon, int dist) SET(wu->Flags, SPR_SET_POS_DONT_KILL); if ((*DoWeapon)(Weapon)) - retval = TRUE; + retval = true; RESET(wu->Flags, SPR_SET_POS_DONT_KILL); // reset values @@ -12721,7 +12721,7 @@ TestMissileSetPos(short Weapon, ANIMATORp DoWeapon, int dist, int zvel) USERp wu = User[Weapon]; int oldvel, oldzvel; int oldxc, oldyc, oldzc; - char retval = FALSE; + char retval = false; // backup values oldxc = wu->xchange; @@ -12742,7 +12742,7 @@ TestMissileSetPos(short Weapon, ANIMATORp DoWeapon, int dist, int zvel) SET(wu->Flags, SPR_SET_POS_DONT_KILL); if ((*DoWeapon)(Weapon)) - retval = TRUE; + retval = true; RESET(wu->Flags, SPR_SET_POS_DONT_KILL); // reset values @@ -12782,7 +12782,7 @@ DoRing(int16_t Weapon) { SpawnSmokePuff(Weapon); KillSprite(Weapon); - return TRUE; + return true; } } @@ -12795,13 +12795,13 @@ DoRing(int16_t Weapon) sp->z = SPRITEp_MID(so) + Z(30); // go out until its time to come back in - if (u->Counter2 == FALSE) + if (u->Counter2 == false) { u->Dist += 8 * RINGMOVETICS; if (u->Dist > RING_OUTER_DIST) { - u->Counter2 = TRUE; + u->Counter2 = true; } } else @@ -12955,12 +12955,12 @@ DoSerpRing(int16_t Weapon) sp->z = sprite[sp->owner].z - u->sz; // go out until its time to come back in - if (u->Counter2 == FALSE) + if (u->Counter2 == false) { u->Dist += 8 * RINGMOVETICS; if (u->Dist > u->TargetDist) - u->Counter2 = TRUE; + u->Counter2 = true; } // rotate the ring @@ -14641,7 +14641,7 @@ InitStar(PLAYERp pp) return 0; } - if (WeaponAutoAim(pp->SpriteP, w, 32, FALSE) != -1) + if (WeaponAutoAim(pp->SpriteP, w, 32, false) != -1) { zvel = wp->zvel; } @@ -14961,7 +14961,7 @@ InitShotgun(PLAYERp pp) sp = pp->SpriteP; daang = 64; - if (WeaponAutoAimHitscan(sp, &daz, &daang, FALSE) != -1) + if (WeaponAutoAimHitscan(sp, &daz, &daang, false) != -1) { } else @@ -15193,7 +15193,7 @@ InitLaser(PLAYERp pp) pp->SpriteP->clipdist = oclipdist; - if (WeaponAutoAim(pp->SpriteP, w, 32, FALSE) == -1) + if (WeaponAutoAim(pp->SpriteP, w, 32, false) == -1) { wp->ang = NORM_ANGLE(wp->ang - 5); } @@ -15218,7 +15218,7 @@ InitRail(PLAYERp pp) short oclipdist; int zvel; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify DoPlayerBeginRecoil(pp, RAIL_RECOIL_AMT); @@ -15285,7 +15285,7 @@ InitRail(PLAYERp pp) pp->SpriteP->clipdist = oclipdist; wp->zvel = zvel >> 1; - if (WeaponAutoAim(pp->SpriteP, w, 32, FALSE) == -1) + if (WeaponAutoAim(pp->SpriteP, w, 32, false) == -1) { wp->ang = NORM_ANGLE(wp->ang - 4); } @@ -15311,7 +15311,7 @@ InitZillaRail(short SpriteNum) short oclipdist; int zvel; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify PlaySound(DIGI_RAILFIRE, sp, v3df_dontpan|v3df_doppler); @@ -15371,7 +15371,7 @@ InitZillaRail(short SpriteNum) sp->clipdist = oclipdist; wp->zvel = zvel >> 1; - if (WeaponAutoAim(sp, w, 32, FALSE) == -1) + if (WeaponAutoAim(sp, w, 32, false) == -1) { wp->ang = NORM_ANGLE(wp->ang - 4); } @@ -15505,7 +15505,7 @@ InitRocket(PLAYERp pp) pp->SpriteP->clipdist = oclipdist; wp->zvel = zvel >> 1; - if (WeaponAutoAim(pp->SpriteP, w, 32, FALSE) == -1) + if (WeaponAutoAim(pp->SpriteP, w, 32, false) == -1) { wp->ang = NORM_ANGLE(wp->ang - 5); } @@ -15633,7 +15633,7 @@ InitBunnyRocket(PLAYERp pp) pp->SpriteP->clipdist = oclipdist; wp->zvel = zvel >> 1; - if (WeaponAutoAim(pp->SpriteP, w, 32, FALSE) == -1) + if (WeaponAutoAim(pp->SpriteP, w, 32, false) == -1) { wp->ang = NORM_ANGLE(wp->ang - 5); } @@ -15738,7 +15738,7 @@ InitNuke(PLAYERp pp) pp->SpriteP->clipdist = oclipdist; wp->zvel = zvel >> 1; - if (WeaponAutoAim(pp->SpriteP, w, 32, FALSE) == -1) + if (WeaponAutoAim(pp->SpriteP, w, 32, false) == -1) { wp->ang = NORM_ANGLE(wp->ang - 5); } @@ -15827,7 +15827,7 @@ InitEnemyNuke(short SpriteNum) wu->Counter = 0; wp->zvel = zvel >> 1; - if (WeaponAutoAim(sp, w, 32, FALSE) == -1) + if (WeaponAutoAim(sp, w, 32, false) == -1) { wp->ang = NORM_ANGLE(wp->ang - 5); } @@ -15861,7 +15861,7 @@ InitMicro(PLAYERp pp) #define MAX_MICRO 1 - DoPickTarget(pp->SpriteP, 256, FALSE); + DoPickTarget(pp->SpriteP, 256, false); if (TargetSortCount > MAX_MICRO) TargetSortCount = MAX_MICRO; @@ -16607,7 +16607,7 @@ InitEnemyRail(short SpriteNum) short pnum=0; // short oclipdist; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify // if co-op don't hurt teammate if (gNet.MultiGameType == MULTI_GAME_COOPERATIVE && u->ID == ZOMBIE_RUN_R0) @@ -17483,7 +17483,7 @@ InitTracerUzi(PLAYERp pp) pp->SpriteP->clipdist = oclipdist; - WeaponAutoAim(pp->SpriteP, w, 32, FALSE); + WeaponAutoAim(pp->SpriteP, w, 32, false); // a bit of randomness wp->ang = NORM_ANGLE(wp->ang + RANDOM_RANGE(30) - 15); @@ -17540,7 +17540,7 @@ InitTracerTurret(short SpriteNum, short Operator, int horiz) wp->zvel = ((100 - horiz) * (wp->xvel/8)); - WeaponAutoAim(sp, w, 32, FALSE); + WeaponAutoAim(sp, w, 32, false); // a bit of randomness wp->ang = NORM_ANGLE(wp->ang + RANDOM_RANGE(30) - 15); @@ -17689,10 +17689,10 @@ BulletHitSprite(SPRITEp sp, short hit_sprite, int hit_x, int hit_y, int hit_z, s DoHitscanDamage(New, hit_sprite); - return TRUE; + return true; } - return FALSE; + return false; } int SpawnWallHole(short hit_sect, short hit_wall, int hit_x, int hit_y, int hit_z) @@ -17770,7 +17770,7 @@ HitscanSpriteAdjust(short SpriteNum, short hit_wall) changespritesect(SpriteNum, sectnum); #endif - return TRUE; + return true; } int @@ -17788,7 +17788,7 @@ InitUzi(PLAYERp pp) //static char alternate=0; static int uziclock=0; int clockdiff=0; - SWBOOL FireSnd = FALSE; + SWBOOL FireSnd = false; #define UZIFIRE_WAIT 20 void InitUziShell(PLAYERp); @@ -17799,14 +17799,14 @@ InitUzi(PLAYERp pp) if (uziclock > PlayClock) { uziclock = PlayClock; - FireSnd = TRUE; + FireSnd = true; } clockdiff = PlayClock - uziclock; if (clockdiff > UZIFIRE_WAIT) { uziclock = PlayClock; - FireSnd = TRUE; + FireSnd = true; } if (FireSnd) @@ -17821,7 +17821,7 @@ InitUzi(PLAYERp pp) nz = pp->posz + pp->bob_z; daz = pp->posz + pp->bob_z; daang = 32; - if (WeaponAutoAimHitscan(pp->SpriteP, &daz, &daang, FALSE) != -1) + if (WeaponAutoAimHitscan(pp->SpriteP, &daz, &daang, false) != -1) { daang += RANDOM_RANGE(24) - 12; daang = NORM_ANGLE(daang); @@ -17997,7 +17997,7 @@ InitEMP(PLAYERp pp) int daz, nz; short cstat = 0; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify PlayerUpdateAmmo(pp, u->WeaponNum, -1); @@ -18011,7 +18011,7 @@ InitEMP(PLAYERp pp) daz = nz = pp->posz + pp->bob_z; daang = 64; - if (WeaponAutoAimHitscan(pp->SpriteP, &daz, &daang, FALSE) != -1) + if (WeaponAutoAimHitscan(pp->SpriteP, &daz, &daang, false) != -1) { } else @@ -18149,7 +18149,7 @@ InitEMP(PLAYERp pp) else { KillSprite(j); - return FALSE; + return false; } } @@ -18192,7 +18192,7 @@ InitTankShell(short SpriteNum, PLAYERp pp) wp->zvel = ((100 - FixedToInt(pp->q16horiz)) * (wp->xvel/8)); - WeaponAutoAim(sp, w, 64, FALSE); + WeaponAutoAim(sp, w, 64, false); // a bit of randomness wp->ang += RANDOM_RANGE(30) - 15; wp->ang = NORM_ANGLE(wp->ang); @@ -18222,7 +18222,7 @@ InitTurretMicro(short SpriteNum, PLAYERp pp) short i,ang; TARGET_SORTp ts = TargetSort; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify nx = sp->x; @@ -18230,7 +18230,7 @@ InitTurretMicro(short SpriteNum, PLAYERp pp) #define MAX_TURRET_MICRO 10 - DoPickTarget(pp->SpriteP, 256, FALSE); + DoPickTarget(pp->SpriteP, 256, false); if (TargetSortCount > MAX_TURRET_MICRO) TargetSortCount = MAX_TURRET_MICRO; @@ -18327,7 +18327,7 @@ InitTurretRocket(short SpriteNum, PLAYERp pp) USERp wu; short w; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify w = SpawnSprite(STAT_MISSILE, BOLT_THINMAN_R0, &s_Rocket[0][0], sp->sectnum, @@ -18352,7 +18352,7 @@ InitTurretRocket(short SpriteNum, PLAYERp pp) wp->zvel = ((100 - FixedToInt(pp->q16horiz)) * (wp->xvel/8)); - WeaponAutoAim(sp, w, 64, FALSE); + WeaponAutoAim(sp, w, 64, false); // a bit of randomness //wp->ang += RANDOM_RANGE(30) - 15; @@ -18375,7 +18375,7 @@ InitTurretFireball(short SpriteNum, PLAYERp pp) USERp wu; short w; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify w = SpawnSprite(STAT_MISSILE, FIREBALL, s_Fireball, sp->sectnum, sp->x, sp->y, sp->z, sp->ang, FIREBALL_VELOCITY); @@ -18399,7 +18399,7 @@ InitTurretFireball(short SpriteNum, PLAYERp pp) wp->zvel = ((100 - FixedToInt(pp->q16horiz)) * (wp->xvel/8)); - WeaponAutoAim(sp, w, 64, FALSE); + WeaponAutoAim(sp, w, 64, false); // a bit of randomness wp->ang += RANDOM_RANGE(30) - 15; wp->ang = NORM_ANGLE(wp->ang); @@ -18424,7 +18424,7 @@ InitTurretRail(short SpriteNum, PLAYERp pp) int nx, ny, nz; short w; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify if (pp->cursectnum < 0) return 0; @@ -18460,7 +18460,7 @@ InitTurretRail(short SpriteNum, PLAYERp pp) wp->clipdist = 64L>>2; - if (WeaponAutoAim(pp->SpriteP, w, 32, FALSE) == -1) + if (WeaponAutoAim(pp->SpriteP, w, 32, false) == -1) { wp->ang = NORM_ANGLE(wp->ang); } @@ -18482,7 +18482,7 @@ InitTurretLaser(short SpriteNum, PLAYERp pp) int nx, ny, nz; short w; - if (SW_SHAREWARE) return FALSE; // JBF: verify + if (SW_SHAREWARE) return false; // JBF: verify if (pp->cursectnum < 0) return 0; @@ -18517,7 +18517,7 @@ InitTurretLaser(short SpriteNum, PLAYERp pp) SET(wp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); wp->clipdist = 64L>>2; - if (WeaponAutoAim(sp, w, 32, FALSE) == -1) + if (WeaponAutoAim(sp, w, 32, false) == -1) { wp->ang = NORM_ANGLE(wp->ang); } @@ -18556,7 +18556,7 @@ InitSobjMachineGun(short SpriteNum, PLAYERp pp) InitTracerTurret(sp - sprite, pp->PlayerSprite, FixedToInt(pp->q16horiz)); daang = 64; - if (WeaponAutoAimHitscan(sp, &daz, &daang, FALSE) != -1) + if (WeaponAutoAimHitscan(sp, &daz, &daang, false) != -1) { daz += RANDOM_RANGE(Z(30)) - Z(15); //daz += 0; @@ -18648,7 +18648,7 @@ InitSobjGun(PLAYERp pp) { short i; SPRITEp sp; - SWBOOL first = FALSE; + SWBOOL first = false; for (i = 0; pp->sop->sp_num[i] != -1; i++) { @@ -18672,7 +18672,7 @@ InitSobjGun(PLAYERp pp) if (!first) { - first = TRUE; + first = true; if (SP_TAG6(sp)) DoSoundSpotMatch(SP_TAG6(sp), 1, SOUND_OBJECT_TYPE); } @@ -18949,7 +18949,7 @@ InitTurretMgun(SECTOR_OBJECTp sop) { // only auto aim for Z daang = 512; - if ((hitinfo.sprite = WeaponAutoAimHitscan(sp, &daz, &daang, FALSE)) != -1) + if ((hitinfo.sprite = WeaponAutoAimHitscan(sp, &daz, &daang, false)) != -1) { delta = labs(GetDeltaAngle(daang, sp->ang)); if (delta > 128) @@ -18979,7 +18979,7 @@ InitTurretMgun(SECTOR_OBJECTp sop) else { daang = 64; - if (WeaponAutoAimHitscan(sp, &daz, &daang, FALSE) != -1) + if (WeaponAutoAimHitscan(sp, &daz, &daang, false) != -1) { daz += RANDOM_RANGE(Z(30)) - Z(15); } @@ -19252,7 +19252,7 @@ InitGrenade(PLAYERp pp) short w; short oclipdist; int zvel; - SWBOOL auto_aim = FALSE; + SWBOOL auto_aim = false; DoPlayerBeginRecoil(pp, GRENADE_RECOIL_AMT); @@ -19330,9 +19330,9 @@ InitGrenade(PLAYERp pp) //dist = dist - (dist/2); zvel = wp->zvel; - if (WeaponAutoAim(pp->SpriteP, w, 32, FALSE) >= 0) + if (WeaponAutoAim(pp->SpriteP, w, 32, false) >= 0) { - auto_aim = TRUE; + auto_aim = true; } wp->zvel = zvel; @@ -19347,7 +19347,7 @@ InitGrenade(PLAYERp pp) wu->ychange += pp->yvect>>14; } - wu->Counter2 = TRUE; // Phosphorus Grenade + wu->Counter2 = true; // Phosphorus Grenade return 0; } @@ -19648,7 +19648,7 @@ InitFireball(PLAYERp pp) pp->SpriteP->clipdist = oclipdist; wp->zvel = zvel >> 1; - if (WeaponAutoAimZvel(pp->SpriteP, w, &zvel, 32, FALSE) == -1) + if (WeaponAutoAimZvel(pp->SpriteP, w, &zvel, 32, false) == -1) { wp->ang = NORM_ANGLE(wp->ang - 9); } @@ -19761,13 +19761,13 @@ WarpToUnderwater(short *sectnum, int *x, int *y, int *z) short i, nexti; SECT_USERp sectu = SectUser[*sectnum]; SPRITEp under_sp = NULL, over_sp = NULL; - char Found = FALSE; + char Found = false; short over, under; int sx, sy; // 0 not valid for water match tags if (sectu->number == 0) - return FALSE; + return false; // search for DIVE_AREA "over" sprite for reference point TRAVERSE_SPRITE_STAT(headspritestat[STAT_DIVE_AREA], i, nexti) @@ -19778,13 +19778,13 @@ WarpToUnderwater(short *sectnum, int *x, int *y, int *z) SectUser[over_sp->sectnum] && SectUser[over_sp->sectnum]->number == sectu->number) { - Found = TRUE; + Found = true; break; } } - ASSERT(Found == TRUE); - Found = FALSE; + ASSERT(Found == true); + Found = false; // search for UNDERWATER "under" sprite for reference point TRAVERSE_SPRITE_STAT(headspritestat[STAT_UNDERWATER], i, nexti) @@ -19795,12 +19795,12 @@ WarpToUnderwater(short *sectnum, int *x, int *y, int *z) SectUser[under_sp->sectnum] && SectUser[under_sp->sectnum]->number == sectu->number) { - Found = TRUE; + Found = true; break; } } - ASSERT(Found == TRUE); + ASSERT(Found == true); // get the offset from the sprite sx = over_sp->x - *x; @@ -19824,7 +19824,7 @@ WarpToUnderwater(short *sectnum, int *x, int *y, int *z) *z = sector[under_sp->sectnum].ceilingz + Z(1); - return TRUE; + return true; } SWBOOL @@ -19836,11 +19836,11 @@ WarpToSurface(short *sectnum, int *x, int *y, int *z) int sx, sy; SPRITEp under_sp = NULL, over_sp = NULL; - char Found = FALSE; + char Found = false; // 0 not valid for water match tags if (sectu->number == 0) - return FALSE; + return false; // search for UNDERWATER "under" sprite for reference point TRAVERSE_SPRITE_STAT(headspritestat[STAT_UNDERWATER], i, nexti) @@ -19851,13 +19851,13 @@ WarpToSurface(short *sectnum, int *x, int *y, int *z) SectUser[under_sp->sectnum] && SectUser[under_sp->sectnum]->number == sectu->number) { - Found = TRUE; + Found = true; break; } } - ASSERT(Found == TRUE); - Found = FALSE; + ASSERT(Found == true); + Found = false; // search for DIVE_AREA "over" sprite for reference point TRAVERSE_SPRITE_STAT(headspritestat[STAT_DIVE_AREA], i, nexti) @@ -19868,12 +19868,12 @@ WarpToSurface(short *sectnum, int *x, int *y, int *z) SectUser[over_sp->sectnum] && SectUser[over_sp->sectnum]->number == sectu->number) { - Found = TRUE; + Found = true; break; } } - ASSERT(Found == TRUE); + ASSERT(Found == true); // get the offset from the under sprite sx = under_sp->x - *x; @@ -19895,7 +19895,7 @@ WarpToSurface(short *sectnum, int *x, int *y, int *z) //MissileWaterAdjust(sp - sprite); - return TRUE; + return true; } @@ -19906,13 +19906,13 @@ SpriteWarpToUnderwater(SPRITEp sp) short i, nexti; SECT_USERp sectu = SectUser[sp->sectnum]; SPRITEp under_sp = NULL, over_sp = NULL; - char Found = FALSE; + char Found = false; short over, under; int sx, sy; // 0 not valid for water match tags if (sectu->number == 0) - return FALSE; + return false; // search for DIVE_AREA "over" sprite for reference point TRAVERSE_SPRITE_STAT(headspritestat[STAT_DIVE_AREA], i, nexti) @@ -19923,13 +19923,13 @@ SpriteWarpToUnderwater(SPRITEp sp) SectUser[over_sp->sectnum] && SectUser[over_sp->sectnum]->number == sectu->number) { - Found = TRUE; + Found = true; break; } } - ASSERT(Found == TRUE); - Found = FALSE; + ASSERT(Found == true); + Found = false; // search for UNDERWATER "under" sprite for reference point TRAVERSE_SPRITE_STAT(headspritestat[STAT_UNDERWATER], i, nexti) @@ -19940,12 +19940,12 @@ SpriteWarpToUnderwater(SPRITEp sp) SectUser[under_sp->sectnum] && SectUser[under_sp->sectnum]->number == sectu->number) { - Found = TRUE; + Found = true; break; } } - ASSERT(Found == TRUE); + ASSERT(Found == true); // get the offset from the sprite sx = over_sp->x - sp->x; @@ -19974,7 +19974,7 @@ SpriteWarpToUnderwater(SPRITEp sp) u->oy = sp->y; u->oz = sp->z; - return TRUE; + return true; } SWBOOL @@ -19987,11 +19987,11 @@ SpriteWarpToSurface(SPRITEp sp) int sx, sy; SPRITEp under_sp = NULL, over_sp = NULL; - char Found = FALSE; + char Found = false; // 0 not valid for water match tags if (sectu->number == 0) - return FALSE; + return false; // search for UNDERWATER "under" sprite for reference point TRAVERSE_SPRITE_STAT(headspritestat[STAT_UNDERWATER], i, nexti) @@ -20002,17 +20002,17 @@ SpriteWarpToSurface(SPRITEp sp) SectUser[under_sp->sectnum] && SectUser[under_sp->sectnum]->number == sectu->number) { - Found = TRUE; + Found = true; break; } } - ASSERT(Found == TRUE); + ASSERT(Found == true); if (under_sp->lotag == 0) - return FALSE; + return false; - Found = FALSE; + Found = false; // search for DIVE_AREA "over" sprite for reference point TRAVERSE_SPRITE_STAT(headspritestat[STAT_DIVE_AREA], i, nexti) @@ -20023,12 +20023,12 @@ SpriteWarpToSurface(SPRITEp sp) SectUser[over_sp->sectnum] && SectUser[over_sp->sectnum]->number == sectu->number) { - Found = TRUE; + Found = true; break; } } - ASSERT(Found == TRUE); + ASSERT(Found == true); // get the offset from the under sprite sx = under_sp->x - sp->x; @@ -20057,7 +20057,7 @@ SpriteWarpToSurface(SPRITEp sp) u->oy = sp->y; u->oz = sp->z; - return TRUE; + return true; } @@ -20189,7 +20189,7 @@ MissileHitDiveArea(short SpriteNum) } if (!u->ret) - return FALSE; + return false; switch (TEST(u->ret, HIT_MASK)) { @@ -20201,11 +20201,11 @@ MissileHitDiveArea(short SpriteNum) { // make sure you are close to the floor if (sp->z < DIV2(u->hiz + u->loz)) - return FALSE; + return false; // Check added by Jim because of sprite bridge over water if (sp->z < (sector[hit_sect].floorz-Z(20))) - return FALSE; + return false; SET(u->Flags, SPR_UNDERWATER); SpawnSplash(sp - sprite); @@ -20213,29 +20213,29 @@ MissileHitDiveArea(short SpriteNum) //SpawnUnderSplash(sp - sprite); u->ret = 0; PlaySound(DIGI_PROJECTILEWATERHIT, sp, v3df_none); - return TRUE; + return true; } else if (SpriteInUnderwaterArea(sp)) { // make sure you are close to the ceiling if (sp->z > DIV2(u->hiz + u->loz)) - return FALSE; + return false; RESET(u->Flags, SPR_UNDERWATER); if (!SpriteWarpToSurface(sp)) { - return FALSE; + return false; } SpawnSplash(sp - sprite); u->ret = 0; - return TRUE; + return true; } break; } } - return FALSE; + return false; } int @@ -20283,7 +20283,7 @@ DoVehicleSmoke(short SpriteNum) sp->y += u->ychange; - return FALSE; + return false; } int @@ -20293,7 +20293,7 @@ DoWaterSmoke(short SpriteNum) sp->z -= sp->zvel; - return FALSE; + return false; } int @@ -20304,7 +20304,7 @@ SpawnVehicleSmoke(short SpriteNum) short New; if (MoveSkip2 != 0) - return FALSE; + return false; New = SpawnSprite(STAT_MISSILE, PUFF, s_VehicleSmoke, sp->sectnum, sp->x, sp->y, sp->z - RANDOM_P2(Z(8)), sp->ang, 0); @@ -20330,7 +20330,7 @@ SpawnVehicleSmoke(short SpriteNum) nu->ychange = MOVEy(np->xvel, np->ang); np->zvel = Z(4) + RANDOM_P2(Z(4)); - return FALSE; + return false; } int @@ -20365,7 +20365,7 @@ SpawnSmokePuff(short SpriteNum) //np->zvel = Z(4) + RANDOM_P2(Z(4)); np->zvel = Z(1) + RANDOM_P2(Z(2)); - return FALSE; + return false; } @@ -20400,7 +20400,7 @@ DoBubble(short SpriteNum) if (!SpriteWarpToSurface(sp)) { KillSprite(SpriteNum); - return TRUE; + return true; } RESET(u->Flags, SPR_UNDERWATER); @@ -20410,7 +20410,7 @@ DoBubble(short SpriteNum) else { KillSprite(SpriteNum); - return TRUE; + return true; } } @@ -20419,7 +20419,7 @@ DoBubble(short SpriteNum) if ((u->WaitTics -= MISSILEMOVETICS) <= 0) { KillSprite(SpriteNum); - return TRUE; + return true; } } else @@ -20428,11 +20428,11 @@ DoBubble(short SpriteNum) if ((u->WaitTics -= MISSILEMOVETICS) <= 0) { KillSprite(SpriteNum); - return TRUE; + return true; } } - return FALSE; + return false; } // this needs to be called before killsprite @@ -20513,21 +20513,21 @@ SWBOOL TestDontStick(short SpriteNum, short hit_wall) wp = &wall[hit_wall]; if (TEST(wp->extra, WALLFX_DONT_STICK)) - return TRUE; + return true; // if blocking red wallo if (TEST(wp->cstat, CSTAT_WALL_BLOCK) && (uint16_t)wp->nextwall < MAXWALLS) - return TRUE; + return true; - return FALSE; + return false; } SWBOOL TestDontStickSector(short hit_sect) { if (TEST(sector[hit_sect].extra, SECTFX_DYNAMIC_AREA|SECTFX_SECTOR_OBJECT)) - return TRUE; + return true; - return FALSE; + return false; } int QueueStar(short SpriteNum) @@ -20718,7 +20718,7 @@ int QueueFootPrint(short hit_sprite) USERp u = User[hit_sprite]; USERp nu; short rnd_num=0; - SWBOOL Found=FALSE; + SWBOOL Found=false; SECTORp sectp = §or[hsp->sectnum]; @@ -20728,13 +20728,13 @@ int QueueFootPrint(short hit_sprite) if (u->PlayerP) { if (TEST(u->PlayerP->Flags, PF_DIVING)) - Found = TRUE; + Found = true; // Stupid masked floor stuff! Damn your weirdness! if (TEST(sector[u->PlayerP->cursectnum].ceilingstat, CEILING_STAT_PLAX)) - Found = TRUE; + Found = true; if (TEST(sector[u->PlayerP->cursectnum].floorstat, CEILING_STAT_PLAX)) - Found = TRUE; + Found = true; } if (TEST(u->Flags, SPR_UNDERWATER) || SpriteInUnderwaterArea(hsp) || Found || SpriteInDiveArea(hsp)) @@ -21161,7 +21161,7 @@ SpawnShell(short SpriteNum, short ShellNum) // -4 is Shotgun shell InitShell(SpriteNum, ShellNum); - return TRUE; + return true; } @@ -21195,7 +21195,7 @@ DoShrapVelocity(int16_t SpriteNum) { case HIT_PLAX_WALL: KillSprite(SpriteNum); - return TRUE; + return true; case HIT_SPRITE: { short wall_ang; @@ -21265,7 +21265,7 @@ DoShrapVelocity(int16_t SpriteNum) ChangeState(SpriteNum, s_GoreFloorSplash); else ShrapKillSprite(SpriteNum); - return TRUE; + return true; } } else @@ -21310,7 +21310,7 @@ DoShrapVelocity(int16_t SpriteNum) ChangeState(SpriteNum, s_GoreFloorSplash); else ShrapKillSprite(SpriteNum); - return TRUE; + return true; } } else @@ -21329,10 +21329,10 @@ DoShrapVelocity(int16_t SpriteNum) if (u->bounce > 10) { KillSprite(SpriteNum); - return TRUE; + return true; } - return FALSE; + return false; } @@ -21496,12 +21496,12 @@ SWBOOL CheckBreakToughness(BREAK_INFOp break_info, short ID) case SKULL_SERP: case FIREBALL1: case GORO_FIREBALL: - return TRUE; // All the above stuff will break tough things + return true; // All the above stuff will break tough things } - return FALSE; // False means it won't break with current weapon + return false; // False means it won't break with current weapon } - return TRUE; // It wasn't tough, go ahead and break it + return true; // It wasn't tough, go ahead and break it } int @@ -21581,7 +21581,7 @@ DoItemFly(int16_t SpriteNum) u->Counter = 0; sp->xvel = 0; u->zchange = u->xchange = u->ychange = 0; - return FALSE; + return false; } else // hit something above @@ -21594,7 +21594,7 @@ DoItemFly(int16_t SpriteNum) } } - return TRUE; + return true; } // This is the FAST queue, it doesn't call any animator functions or states diff --git a/source/sw/src/zombie.cpp b/source/sw/src/zombie.cpp index 2638ae487..15dcc017b 100644 --- a/source/sw/src/zombie.cpp +++ b/source/sw/src/zombie.cpp @@ -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; }