diff --git a/source/games/sw/src/_polymost.cpp b/source/games/sw/src/_polymost.cpp index ae6e80d5f..3c8a04dca 100644 --- a/source/games/sw/src/_polymost.cpp +++ b/source/games/sw/src/_polymost.cpp @@ -240,7 +240,7 @@ void JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, fixed_t tpq16ang, fixed if (mirror[cnt].ismagic) { - SPRITEp sp=NULL; + SPRITEp sp=nullptr; int camhoriz; short w; int dx, dy, dz, tdx, tdy, tdz, midx, midy; diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp index 5cbff79b5..16ec9d151 100644 --- a/source/games/sw/src/actor.cpp +++ b/source/games/sw/src/actor.cpp @@ -134,7 +134,7 @@ DoActorDie(short SpriteNum, short weapon) ChangeState(SpriteNum, u->StateEnd); u->RotNum = 0; sp->xvel <<= 1; - u->ActorActionFunc = NULL; + u->ActorActionFunc = nullptr; sprite[SpriteNum].ang = NORM_ANGLE(sprite[SpriteNum].ang + 1024); break; @@ -165,7 +165,7 @@ DoActorDie(short SpriteNum, short weapon) ChangeState(SpriteNum, u->StateEnd); u->RotNum = 0; - u->ActorActionFunc = NULL; + u->ActorActionFunc = nullptr; sp->xvel = 200 + RANDOM_RANGE(200); u->jump_speed = -200 - RANDOM_RANGE(250); DoActorBeginJump(SpriteNum); @@ -185,7 +185,7 @@ DoActorDie(short SpriteNum, short weapon) u->RotNum = 0; - u->ActorActionFunc = NULL; + u->ActorActionFunc = nullptr; //u->ActorActionFunc = NullAnimator; if (!sw_ninjahack) sprite[SpriteNum].ang = sprite[weapon].ang; @@ -220,7 +220,7 @@ DoActorDie(short SpriteNum, short weapon) u->jump_speed = -10 - RANDOM_RANGE(25); DoActorBeginJump(SpriteNum); } - u->ActorActionFunc = NULL; + u->ActorActionFunc = nullptr; // Get angle to player sp->ang = NORM_ANGLE(getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y) + 1024); break; @@ -243,7 +243,7 @@ DoActorDie(short SpriteNum, short weapon) u->jump_speed = -100 - RANDOM_RANGE(250); } DoActorBeginJump(SpriteNum); - u->ActorActionFunc = NULL; + u->ActorActionFunc = nullptr; // Get angle to player sp->ang = NORM_ANGLE(getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y) + 1024); break; @@ -268,7 +268,7 @@ DoActorDie(short SpriteNum, short weapon) SET(sp->cstat, CSTAT_SPRITE_YFLIP); ChangeState(SpriteNum, u->StateEnd); u->RotNum = 0; - u->ActorActionFunc = NULL; + u->ActorActionFunc = nullptr; sp->xvel = 300 + RANDOM_RANGE(400); u->jump_speed = -300 - RANDOM_RANGE(350); DoActorBeginJump(SpriteNum); @@ -429,8 +429,8 @@ DoActorDebris(short SpriteNum) getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz); u->lo_sectp = §or[sp->sectnum]; u->hi_sectp = §or[sp->sectnum]; - u->lo_sp = NULL; - u->hi_sp = NULL; + u->lo_sp = nullptr; + u->hi_sp = nullptr; break; } @@ -683,7 +683,7 @@ DoActorBeginJump(short SpriteNum) else NewStateGroup(SpriteNum, u->ActorActionSet->Jump); } - u->StateFallOverride = NULL; + u->StateFallOverride = nullptr; //DO NOT CALL DoActorJump! DoActorStopFall can cause an infinite loop and //stack overflow if it is called. @@ -1024,7 +1024,7 @@ saveable_module saveable_actor = SIZ(saveable_actor_code), // data - NULL,0 + nullptr,0 }; END_SW_NS diff --git a/source/games/sw/src/ai.cpp b/source/games/sw/src/ai.cpp index 525969698..db5fa4612 100644 --- a/source/games/sw/src/ai.cpp +++ b/source/games/sw/src/ai.cpp @@ -571,7 +571,7 @@ int DoActorOperate(short SpriteNum) { neartag(sp->x, sp->y, z[i], sp->sectnum, sp->ang, &nearsector, &nearwall, &nearsprite, - &nearhitdist, 1024L, NTAG_SEARCH_LO_HI, NULL); + &nearhitdist, 1024L, NTAG_SEARCH_LO_HI, nullptr); //DSPRINTF(ds,"nearsector = %d, nearwall = %d, nearsprite = %d hitdist == %ld\n",nearsector,nearwall,nearsprite,nearhitdist); //MONO_PRINT(ds); @@ -638,7 +638,7 @@ DoActorActionDecide(short SpriteNum) SPRITEp sp = User[SpriteNum]->SpriteP; int dist; ANIMATORp action; - USERp pu=NULL; + USERp pu=nullptr; bool ICanSee=false; // REMINDER: This function is not even called if SpriteControl doesn't let @@ -871,7 +871,7 @@ DoActorDecide(short SpriteNum) return 0; } - ASSERT(actor_action != NULL); + ASSERT(actor_action != nullptr); if (actor_action != InitActorDecide) { @@ -1809,7 +1809,7 @@ FindNewAngle(short SpriteNum, signed char dir, int DistToMove) }; - int16_t* adp = NULL; + int16_t* adp = nullptr; short new_ang, oang; short save_ang = -1; diff --git a/source/games/sw/src/ambient.h b/source/games/sw/src/ambient.h index bab2d5f92..d85fdbc32 100644 --- a/source/games/sw/src/ambient.h +++ b/source/games/sw/src/ambient.h @@ -135,16 +135,16 @@ AMB_ENTRY(30, DIGI_BREAKINGWOOD, AMB_INTERMIT, AMB_120) AMB_ENTRY(31, DIGI_BREAKSTONES, AMB_NONE, AMB_NOTICS) // MOTOR BOAT -AMB_ENTRY(32, DIGI_NULL, AMB_NONE, AMB_NOTICS) -AMB_ENTRY(33, DIGI_NULL, AMB_NONE, AMB_NOTICS) -AMB_ENTRY(34, DIGI_NULL, AMB_NONE, AMB_NOTICS) +AMB_ENTRY(32, DIGI_nullptr, AMB_NONE, AMB_NOTICS) +AMB_ENTRY(33, DIGI_nullptr, AMB_NONE, AMB_NOTICS) +AMB_ENTRY(34, DIGI_nullptr, AMB_NONE, AMB_NOTICS) // WWII JAP ARMY TANK -AMB_ENTRY(35, DIGI_NULL, AMB_NONE, AMB_NOTICS) -AMB_ENTRY(36, DIGI_NULL, AMB_NONE, AMB_NOTICS) -AMB_ENTRY(37, DIGI_NULL, AMB_NONE, AMB_NOTICS) -AMB_ENTRY(38, DIGI_NULL, AMB_NONE, AMB_NOTICS) -AMB_ENTRY(39, DIGI_NULL, AMB_NONE, AMB_NOTICS) +AMB_ENTRY(35, DIGI_nullptr, AMB_NONE, AMB_NOTICS) +AMB_ENTRY(36, DIGI_nullptr, AMB_NONE, AMB_NOTICS) +AMB_ENTRY(37, DIGI_nullptr, AMB_NONE, AMB_NOTICS) +AMB_ENTRY(38, DIGI_nullptr, AMB_NONE, AMB_NOTICS) +AMB_ENTRY(39, DIGI_nullptr, AMB_NONE, AMB_NOTICS) // WWII JAP BOMBER PLANE AMB_ENTRY(40, DIGI_BOMBRFLYING, AMB_NONE, AMB_NOTICS) diff --git a/source/games/sw/src/break.cpp b/source/games/sw/src/break.cpp index 2c9b35d70..852abb034 100644 --- a/source/games/sw/src/break.cpp +++ b/source/games/sw/src/break.cpp @@ -500,7 +500,7 @@ BREAK_INFOp SetupSpriteForBreak(SPRITEp sp) // ignore as a breakable if true if (sp->lotag == TAG_SPRITE_HIT_MATCH) - return NULL; + return nullptr; break_info = FindSpriteBreakInfo(picnum); if (break_info) @@ -606,7 +606,7 @@ int AutoBreakWall(WALLp wallp, int hit_x, int hit_y, int hit_z, short ang, short // pass Break Info Globally GlobBreakInfo = break_info; SpawnShrap(BreakSprite, -1); - GlobBreakInfo = NULL; + GlobBreakInfo = nullptr; KillSprite(BreakSprite); } @@ -879,7 +879,7 @@ int UserBreakSprite(short BreakSprite) { // even if you didn't find a matching ST1 go ahead and kill it and match everything // its better than forcing everyone to have a ST1 - DoMatchEverything(NULL, match, -1); + DoMatchEverything(nullptr, match, -1); // Kill sound if one is attached DeleteNoSoundOwner(BreakSprite); //change_sprite_stat(BreakSprite, STAT_SUICIDE); @@ -896,7 +896,7 @@ int UserBreakSprite(short BreakSprite) // make it BROKEN if (SP_TAG7(sp) <= 1) { - DoMatchEverything(NULL, match_extra, -1); + DoMatchEverything(nullptr, match_extra, -1); //DoSpawnSpotsForKill(match_extra); DoLightingMatch(match_extra, OFF); @@ -976,7 +976,7 @@ int AutoBreakSprite(short BreakSprite, short type) // pass Break Info Globally GlobBreakInfo = break_info; SpawnShrap(BreakSprite, -1); - GlobBreakInfo = NULL; + GlobBreakInfo = nullptr; if (bp->picnum == 3683) RESET(bp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); } @@ -990,7 +990,7 @@ int AutoBreakSprite(short BreakSprite, short type) // pass Break Info Globally GlobBreakInfo = break_info; SpawnShrap(BreakSprite, -1); - GlobBreakInfo = NULL; + GlobBreakInfo = nullptr; // kill it or change the pic if (TEST(break_info->flags, BF_KILL) || break_info->breaknum == -1) diff --git a/source/games/sw/src/bunny.cpp b/source/games/sw/src/bunny.cpp index e0b8f3c7c..6615be877 100644 --- a/source/games/sw/src/bunny.cpp +++ b/source/games/sw/src/bunny.cpp @@ -670,26 +670,26 @@ ACTOR_ACTION_SET BunnyActionSet = sg_BunnyRun, sg_BunnyJump, sg_BunnyFall, - NULL, // sg_BunnyCrawl, - NULL, // sg_BunnySwim, - NULL, // sg_BunnyFly, - NULL, // sg_BunnyRise, - NULL, // sg_BunnySit, - NULL, // sg_BunnyLook, - NULL, // climb + nullptr, // sg_BunnyCrawl, + nullptr, // sg_BunnySwim, + nullptr, // sg_BunnyFly, + nullptr, // sg_BunnyRise, + nullptr, // sg_BunnySit, + nullptr, // sg_BunnyLook, + nullptr, // climb sg_BunnyPain, sg_BunnyDie, - NULL, + nullptr, sg_BunnyDead, sg_BunnyDeathJump, sg_BunnyDeathFall, - {NULL}, + {nullptr}, {1024}, - {NULL}, + {nullptr}, {1024}, {sg_BunnyHeart, sg_BunnyRun}, - NULL, - NULL + nullptr, + nullptr }; ACTOR_ACTION_SET BunnyWhiteActionSet = @@ -698,16 +698,16 @@ ACTOR_ACTION_SET BunnyWhiteActionSet = sg_BunnyRun, sg_BunnyJump, sg_BunnyFall, - NULL, // sg_BunnyCrawl, - NULL, // sg_BunnySwim, - NULL, // sg_BunnyFly, - NULL, // sg_BunnyRise, - NULL, // sg_BunnySit, - NULL, // sg_BunnyLook, - NULL, // climb + nullptr, // sg_BunnyCrawl, + nullptr, // sg_BunnySwim, + nullptr, // sg_BunnyFly, + nullptr, // sg_BunnyRise, + nullptr, // sg_BunnySit, + nullptr, // sg_BunnyLook, + nullptr, // climb sg_BunnyPain, // pain sg_BunnyDie, - NULL, + nullptr, sg_BunnyDead, sg_BunnyDeathJump, sg_BunnyDeathFall, @@ -718,8 +718,8 @@ ACTOR_ACTION_SET BunnyWhiteActionSet = {sg_BunnySwipe}, {1024}, {sg_BunnyHeart, sg_BunnySwipe}, - NULL, - NULL + nullptr, + nullptr }; int @@ -1006,7 +1006,7 @@ DoBunnyQuickJump(short SpriteNum) Bunny_Count--; // Bunny died - u->lo_sp = NULL; + u->lo_sp = nullptr; return true; } } @@ -1030,7 +1030,7 @@ DoBunnyQuickJump(short SpriteNum) { if (TEST(tsp->extra, SPRX_PLAYER_OR_ENEMY)) { - PLAYERp pp = NULL; + PLAYERp pp = nullptr; if (RANDOM_RANGE(1000) < 995 && tu->spal != PALETTE_PLAYER0) return false; diff --git a/source/games/sw/src/coolg.cpp b/source/games/sw/src/coolg.cpp index d4ee8cd8b..8b710817a 100644 --- a/source/games/sw/src/coolg.cpp +++ b/source/games/sw/src/coolg.cpp @@ -470,29 +470,29 @@ ACTOR_ACTION_SET CoolgActionSet = { sg_CoolgStand, sg_CoolgRun, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, //climb + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, //climb sg_CoolgPain, //pain sg_CoolgDie, - NULL, + nullptr, sg_CoolgDead, - NULL, - NULL, + nullptr, + nullptr, // {sg_CoolgClub}, {sg_CoolgAttack}, {1024}, {sg_CoolgAttack}, {1024}, - {NULL,NULL}, - NULL, - NULL + {nullptr,nullptr}, + nullptr, + nullptr }; int DoCoolgMatchPlayerZ(short SpriteNum); diff --git a/source/games/sw/src/coolie.cpp b/source/games/sw/src/coolie.cpp index 8eac328ce..59b7c4099 100644 --- a/source/games/sw/src/coolie.cpp +++ b/source/games/sw/src/coolie.cpp @@ -71,7 +71,7 @@ DECISION CoolieSurprised[] = DECISION CoolieEvasive[] = { {10, InitActorEvade }, - {1024, NULL } + {1024, nullptr } }; DECISION CoolieLostTarget[] = @@ -380,28 +380,28 @@ ACTOR_ACTION_SET CoolieActionSet = { sg_CoolieStand, sg_CoolieRun, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, //climb + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, //climb sg_CooliePain, //pain sg_CoolieDie, - NULL, + nullptr, sg_CoolieDead, - NULL, - NULL, + nullptr, + nullptr, {sg_CoolieCharge}, {1024}, {sg_CoolieCharge}, {1024}, - {NULL}, - NULL, - NULL + {nullptr}, + nullptr, + nullptr }; void EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp person) diff --git a/source/games/sw/src/damage.h b/source/games/sw/src/damage.h index d2904f8cc..233544f72 100644 --- a/source/games/sw/src/damage.h +++ b/source/games/sw/src/damage.h @@ -60,49 +60,49 @@ DAMAGE_ENTRY(WPN_SWORD, InitWeaponSword, 50, 80, 0, -1, -1 // extra weapons connected to other // spell -DAMAGE_ENTRY(DMG_NAPALM, NULL, 90, 150, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_MIRV_METEOR, NULL, 35, 65, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_SERP_METEOR, NULL, 7, 15, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_NAPALM, nullptr, 90, 150, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_MIRV_METEOR, nullptr, 35, 65, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_SERP_METEOR, nullptr, 7, 15, 0, -1, -1, -1) // radius damage -DAMAGE_ENTRY(DMG_ELECTRO_SHARD, NULL, 2, 6, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_SECTOR_EXP, NULL, 50, 100, 3200, -1, -1, -1) -DAMAGE_ENTRY(DMG_BOLT_EXP, NULL, 80, 160, 3200, -1, -1, -1) -DAMAGE_ENTRY(DMG_TANK_SHELL_EXP, NULL, 80, 200, 4500, -1, -1, -1) -DAMAGE_ENTRY(DMG_FIREBALL_EXP, NULL, -1, -1, 1000, -1, -1, -1) -DAMAGE_ENTRY(DMG_NAPALM_EXP, NULL, 60, 90, 3200, -1, -1, -1) -DAMAGE_ENTRY(DMG_SKULL_EXP, NULL, 40, 75, 4500, -1, -1, -1) -DAMAGE_ENTRY(DMG_BASIC_EXP, NULL, 10, 25, 1000, -1, -1, -1) -DAMAGE_ENTRY(DMG_GRENADE_EXP, NULL, 70, 140, 6500, -1, -1, -1) -DAMAGE_ENTRY(DMG_MINE_EXP, NULL, 85, 115, 6500, -1, -1, -1) -DAMAGE_ENTRY(DMG_MINE_SHRAP, NULL, 15, 30, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_MICRO_EXP, NULL, 50, 100, 4500, -1, -1, -1) -DAMAGE_ENTRY_WPN(DMG_NUCLEAR_EXP, NULL, 0, 800, 30000, -1, -1, -1, 1, 5) -DAMAGE_ENTRY(DMG_RADIATION_CLOUD, NULL, 2, 6, 5000, -1, -1, -1) -DAMAGE_ENTRY(DMG_FLASHBOMB, NULL, 100, 150, 16384, -1, -1, -1) +DAMAGE_ENTRY(DMG_ELECTRO_SHARD, nullptr, 2, 6, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_SECTOR_EXP, nullptr, 50, 100, 3200, -1, -1, -1) +DAMAGE_ENTRY(DMG_BOLT_EXP, nullptr, 80, 160, 3200, -1, -1, -1) +DAMAGE_ENTRY(DMG_TANK_SHELL_EXP, nullptr, 80, 200, 4500, -1, -1, -1) +DAMAGE_ENTRY(DMG_FIREBALL_EXP, nullptr, -1, -1, 1000, -1, -1, -1) +DAMAGE_ENTRY(DMG_NAPALM_EXP, nullptr, 60, 90, 3200, -1, -1, -1) +DAMAGE_ENTRY(DMG_SKULL_EXP, nullptr, 40, 75, 4500, -1, -1, -1) +DAMAGE_ENTRY(DMG_BASIC_EXP, nullptr, 10, 25, 1000, -1, -1, -1) +DAMAGE_ENTRY(DMG_GRENADE_EXP, nullptr, 70, 140, 6500, -1, -1, -1) +DAMAGE_ENTRY(DMG_MINE_EXP, nullptr, 85, 115, 6500, -1, -1, -1) +DAMAGE_ENTRY(DMG_MINE_SHRAP, nullptr, 15, 30, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_MICRO_EXP, nullptr, 50, 100, 4500, -1, -1, -1) +DAMAGE_ENTRY_WPN(DMG_NUCLEAR_EXP, nullptr, 0, 800, 30000, -1, -1, -1, 1, 5) +DAMAGE_ENTRY(DMG_RADIATION_CLOUD, nullptr, 2, 6, 5000, -1, -1, -1) +DAMAGE_ENTRY(DMG_FLASHBOMB, nullptr, 100, 150, 16384, -1, -1, -1) -DAMAGE_ENTRY(DMG_FIREBALL_FLAMES, NULL, 2, 6, 300, -1, -1, -1) +DAMAGE_ENTRY(DMG_FIREBALL_FLAMES, nullptr, 2, 6, 300, -1, -1, -1) // actor -DAMAGE_ENTRY(DMG_RIPPER_SLASH, NULL, 10, 30, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_SKEL_SLASH, NULL, 10, 20, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_COOLG_BASH, NULL, 10, 20, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_COOLG_FIRE, NULL, 15, 30, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_GORO_CHOP, NULL, 20, 40, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_GORO_FIREBALL, NULL, 5, 20, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_SERP_SLASH, NULL, 75, 75, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_LAVA_BOULDER, NULL, 100, 100, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_LAVA_SHARD, NULL, 25, 25, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_HORNET_STING, NULL, 5, 10, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_EEL_ELECTRO, NULL, 10, 40, 3400, -1, -1, -1) +DAMAGE_ENTRY(DMG_RIPPER_SLASH, nullptr, 10, 30, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_SKEL_SLASH, nullptr, 10, 20, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_COOLG_BASH, nullptr, 10, 20, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_COOLG_FIRE, nullptr, 15, 30, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_GORO_CHOP, nullptr, 20, 40, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_GORO_FIREBALL, nullptr, 5, 20, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_SERP_SLASH, nullptr, 75, 75, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_LAVA_BOULDER, nullptr, 100, 100, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_LAVA_SHARD, nullptr, 25, 25, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_HORNET_STING, nullptr, 5, 10, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_EEL_ELECTRO, nullptr, 10, 40, 3400, -1, -1, -1) // misc -DAMAGE_ENTRY(DMG_SPEAR_TRAP, NULL, 15, 20, 0, -1, -1, -1) -DAMAGE_ENTRY(DMG_VOMIT, NULL, 5, 15, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_SPEAR_TRAP, nullptr, 15, 20, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_VOMIT, nullptr, 5, 15, 0, -1, -1, -1) // inanimate objects -DAMAGE_ENTRY(DMG_BLADE, NULL, 10, 20, 0, -1, -1, -1) -DAMAGE_ENTRY(MAX_WEAPONS, NULL, 10, 20, 0, -1, -1, -1) +DAMAGE_ENTRY(DMG_BLADE, nullptr, 10, 20, 0, -1, -1, -1) +DAMAGE_ENTRY(MAX_WEAPONS, nullptr, 10, 20, 0, -1, -1, -1) #undef DAMAGE_ENTRY #undef DAMAGE_ENTRY_WPN diff --git a/source/games/sw/src/digi.h b/source/games/sw/src/digi.h index c7b322fdc..c74035e6b 100644 --- a/source/games/sw/src/digi.h +++ b/source/games/sw/src/digi.h @@ -25,7 +25,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms //------------------------------------------------------------------------- #ifdef DIGI_TABLE -#define DIGI_ENTRY(name, id, id_num, pri, pitch_lo, pitch_hi, voc_num, voc_dist, voc_flags) { name, NULL, 0, pitch_lo, pitch_hi, pri, voc_num, voc_dist, voc_flags, 0,0}, +#define DIGI_ENTRY(name, id, id_num, pri, pitch_lo, pitch_hi, voc_num, voc_dist, voc_flags) { name, nullptr, 0, pitch_lo, pitch_hi, pri, voc_num, voc_dist, voc_flags, 0,0}, #endif #ifdef DIGI_ENUM @@ -65,8 +65,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms // WEAPONS //////////////////////////////////////////////////////////////////// -// NULL Entry used to detect a sound's presence in sprite attrib structs. -DIGI_ENTRY("NULL.VOC", DIGI_NULL, 0, 0, 0, 0, 0, DIST_NORMAL, VF_NORMAL) +// nullptr Entry used to detect a sound's presence in sprite attrib structs. +DIGI_ENTRY("nullptr.VOC", DIGI_nullptr, 0, 0, 0, 0, 0, DIST_NORMAL, VF_NORMAL) // SWORD DIGI_ENTRY("SWRDSTR1.VOC", DIGI_SWORDSWOOSH, 1, PRI_HI_PLAYERWEAP, -200, 200, 0, DIST_NORMAL, VF_NORMAL) @@ -75,7 +75,7 @@ DIGI_ENTRY("SWRDSTR1.VOC", DIGI_SWORDSWOOSH, 1, PRI_HI_PLAYERWEAP, DIGI_ENTRY("THROW.VOC", DIGI_STAR, 2, PRI_HI_PLAYERWEAP, -100, 100, 0, DIST_NORMAL, VF_NORMAL) DIGI_ENTRY("STRCLNK.VOC", DIGI_STARCLINK, 3, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL) //DIGI_ENTRY("STRWIZ.VOC", DIGI_STARWIZ, 4, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP ) -DIGI_ENTRY("NULL.VOC", DIGI_NULL_STARWIZ, 4, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP) +DIGI_ENTRY("nullptr.VOC", DIGI_nullptr_STARWIZ, 4, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP) // UZI DIGI_ENTRY("UZIFIRE1.VOC", DIGI_UZIFIRE, 5, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) @@ -115,7 +115,7 @@ DIGI_ENTRY("HBLOOP1.VOC", DIGI_HEARTBEAT, 27, PRI_LOW_PLAYERWEAP, //#ifndef SW_SHAREWARE DIGI_ENTRY("HSQUEEZ1.VOC", DIGI_HEARTFIRE, 28, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) //#else -//DIGI_ENTRY("NULL.VOC", DIGI_HEARTFIRE, 28, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL ) +//DIGI_ENTRY("nullptr.VOC", DIGI_HEARTFIRE, 28, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL ) //#endif DIGI_ENTRY("HRTWIZ.VOC", DIGI_HEARTWIZ, 29, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP) @@ -127,7 +127,7 @@ DIGI_ENTRY("EXPMED.VOC", DIGI_MISSLEXP, 31, PRI_HI_PLAYERWEAP, - //#ifndef SW_SHAREWARE DIGI_ENTRY("RFWIZ.VOC", DIGI_RFWIZ, 32, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) //#else -//DIGI_ENTRY("NULL.VOC", DIGI_NULL_RFWIZ, 32, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL ) +//DIGI_ENTRY("nullptr.VOC", DIGI_nullptr_RFWIZ, 32, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL ) //#endif // NAPALM SPELL @@ -157,14 +157,14 @@ DIGI_ENTRY("MAGIC7.VOC", DIGI_MAGIC7, 46, PRI_AMBIENT, //#ifndef SW_SHAREWARE DIGI_ENTRY("SWSPELL.VOC", DIGI_SWCLOAKUNCLOAK, 47, PRI_LOW_PLAYERWEAP,-100, 100, 0, DIST_NORMAL, VF_NORMAL) //#else -//DIGI_ENTRY("NULL.VOC", DIGI_NULL_SWCLOAK, 47, PRI_LOW_PLAYERWEAP,-100, 100, 0, DIST_NORMAL, VF_NORMAL ) +//DIGI_ENTRY("nullptr.VOC", DIGI_nullptr_SWCLOAK, 47, PRI_LOW_PLAYERWEAP,-100, 100, 0, DIST_NORMAL, VF_NORMAL ) //#endif // PLAYER DEAD HEAD DIGI_ENTRY("DHVOMIT.VOC", DIGI_DHVOMIT, 48, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL) DIGI_ENTRY("DHCLUNK.VOC", DIGI_DHCLUNK, 49, PRI_PLAYERAMBIENT, -200, 200, 0, DIST_NORMAL, VF_NORMAL) //DIGI_ENTRY("DHSQSH.VOC", DIGI_DHSQUISH, 50, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL ) -DIGI_ENTRY("NULL.VOC", DIGI_NULL_DHSQUISH, 50, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL) +DIGI_ENTRY("nullptr.VOC", DIGI_nullptr_DHSQUISH, 50, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL) // WEAPON RELATED DIGI_ENTRY("LAVAHIT.VOC", DIGI_PROJECTILELAVAHIT,51, PRI_PLAYERAMBIENT,-100, 100, 0, DIST_NORMAL, VF_NORMAL) @@ -382,7 +382,7 @@ DIGI_ENTRY("EXPLRG.VOC", DIGI_LARGEEXP, 183, PRI_ENVIRONMENT, // HUGE EXP //DIGI_ENTRY("BIGEXP.VOC", DIGI_HUGEEXP, 184, PRI_ENVIRONMENT, -200, 200, 0, DIST_WIDE, VF_NORMAL ) -DIGI_ENTRY("NULL.VOC", DIGI_NULL_HUGEEXP, 184, PRI_ENVIRONMENT, -200, 200, 0, DIST_WIDE, VF_NORMAL) +DIGI_ENTRY("nullptr.VOC", DIGI_nullptr_HUGEEXP, 184, PRI_ENVIRONMENT, -200, 200, 0, DIST_WIDE, VF_NORMAL) // CRACKLING FIRE FOR CONTINUOUS BURN DIGI_ENTRY("FIRE1.VOC", DIGI_FIRE1, 185, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP) @@ -569,7 +569,7 @@ DIGI_ENTRY("", DIGI_LASTPLAYERVOICE, 268, 0, // was RAILB10.VOC DIGI_ENTRY("HSHOT1.VOC", DIGI_RAILFIRE, 269, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) //#else -//DIGI_ENTRY("NULL.VOC", DIGI_NULL_RAILFIRE, 269, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL ) +//DIGI_ENTRY("nullptr.VOC", DIGI_nullptr_RAILFIRE, 269, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL ) //#endif DIGI_ENTRY("RAIL2.VOC", DIGI_RAILREADY, 270, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP) DIGI_ENTRY("RAILUP09.VOC", DIGI_RAILPWRUP, 271, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) @@ -587,7 +587,7 @@ DIGI_ENTRY("PULL.VOC", DIGI_PULL, 279, PRI_LOW_PLAYERWEAP, DIGI_ENTRY("STSCAN2.VOC", DIGI_MINEARM, 280, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) DIGI_ENTRY("HBDOWN1.VOC", DIGI_HEARTDOWN, 281, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) //DIGI_ENTRY("TOOLUSE1.VOC", DIGI_TOOLBOX, 282, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL ) -DIGI_ENTRY("NULL.VOC", DIGI_NULL_TOOLBOX, 282, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) +DIGI_ENTRY("nullptr.VOC", DIGI_nullptr_TOOLBOX, 282, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) DIGI_ENTRY("GASPOP.VOC", DIGI_GASPOP, 283, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) DIGI_ENTRY("40MMBNCE.VOC", DIGI_40MMBNCE, 284, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) DIGI_ENTRY("BURGALRM.VOC", DIGI_BURGLARALARM, 285, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP) diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 11a0f3393..9e2a74bc0 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -866,7 +866,7 @@ tspriteptr_t get_tsprite(spritetype* tsprite, int& spritesortcnt, int SpriteNum) return &tsprite[tSpriteNum]; } - return NULL; + return nullptr; } void @@ -1337,7 +1337,7 @@ void PreDrawStackedWater(void) // spawn a user User[New].Alloc(); nu = User[New].Data(); - ASSERT(nu != NULL); + ASSERT(nu != nullptr); nu->xchange = -989898; diff --git a/source/games/sw/src/eel.cpp b/source/games/sw/src/eel.cpp index 7f29ec025..8791a2dc3 100644 --- a/source/games/sw/src/eel.cpp +++ b/source/games/sw/src/eel.cpp @@ -330,28 +330,28 @@ ACTOR_ACTION_SET EelActionSet = { sg_EelStand, sg_EelRun, - NULL, - NULL, - NULL, + nullptr, + nullptr, + nullptr, sg_EelRun, - NULL, - NULL, + nullptr, + nullptr, sg_EelStand, - NULL, - NULL, //climb + nullptr, + nullptr, //climb sg_EelStand, //pain sg_EelDie, - NULL, + nullptr, sg_EelDead, - NULL, - NULL, + nullptr, + nullptr, {sg_EelAttack}, {1024}, {sg_EelAttack}, {1024}, - {NULL,NULL}, - NULL, - NULL + {nullptr,nullptr}, + nullptr, + nullptr }; int DoEelMatchPlayerZ(short SpriteNum); @@ -603,7 +603,7 @@ int DoEelMove(short SpriteNum) { USERp u = User[SpriteNum].Data(); - ASSERT(u->Rot != NULL); + ASSERT(u->Rot != nullptr); if (SpriteOverlap(SpriteNum, int16_t(u->tgt_sp - sprite))) NewStateGroup(SpriteNum, u->ActorActionSet->CloseAttack[0]); diff --git a/source/games/sw/src/game.cpp b/source/games/sw/src/game.cpp index 2bd3598f8..2818182b0 100644 --- a/source/games/sw/src/game.cpp +++ b/source/games/sw/src/game.cpp @@ -471,18 +471,18 @@ void TerminateLevel(void) pp->cookieTime = 0; memset(pp->cookieQuote, 0, sizeof(pp->cookieQuote)); - pp->DoPlayerAction = NULL; + pp->DoPlayerAction = nullptr; - pp->SpriteP = NULL; + pp->SpriteP = nullptr; pp->PlayerSprite = -1; - pp->UnderSpriteP = NULL; + pp->UnderSpriteP = nullptr; pp->PlayerUnderSprite = -1; memset(pp->HasKey, 0, sizeof(pp->HasKey)); //pp->WpnFlags = 0; - pp->CurWpn = NULL; + pp->CurWpn = nullptr; memset(pp->Wpn, 0, sizeof(pp->Wpn)); memset(pp->InventoryTics, 0, sizeof(pp->InventoryTics)); diff --git a/source/games/sw/src/girlninj.cpp b/source/games/sw/src/girlninj.cpp index 59ab2d1e2..5056841ba 100644 --- a/source/games/sw/src/girlninj.cpp +++ b/source/games/sw/src/girlninj.cpp @@ -76,7 +76,7 @@ DECISION GirlNinjaEvasive[] = {400, InitActorDuck}, // 100 // {300, InitActorEvade}, // {800, InitActorRunAway}, - {1024, NULL} + {1024, nullptr} }; DECISION GirlNinjaLostTarget[] = @@ -228,29 +228,29 @@ STATE s_GirlNinjaRise[5][3] = { {GIRLNINJA_KNEEL_R0 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[0][1]}, {GIRLNINJA_STAND_R0 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[0][2]}, - {0, 0, NULL, (STATEp)sg_GirlNinjaRun}, // JBF: sg_GirlNinjaRun really is supposed to be the + {0, 0, nullptr, (STATEp)sg_GirlNinjaRun}, // JBF: sg_GirlNinjaRun really is supposed to be the // pointer to the state group. See StateControl() where // it says "if (!u->State->Pic)". }, { {GIRLNINJA_KNEEL_R1 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[1][1]}, {GIRLNINJA_STAND_R1 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[1][2]}, - {0, 0, NULL, (STATEp)sg_GirlNinjaRun}, + {0, 0, nullptr, (STATEp)sg_GirlNinjaRun}, }, { {GIRLNINJA_KNEEL_R2 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[2][1]}, {GIRLNINJA_STAND_R2 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[2][2]}, - {0, 0, NULL, (STATEp)sg_GirlNinjaRun}, + {0, 0, nullptr, (STATEp)sg_GirlNinjaRun}, }, { {GIRLNINJA_KNEEL_R3 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[3][1]}, {GIRLNINJA_STAND_R3 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[3][2]}, - {0, 0, NULL, (STATEp)sg_GirlNinjaRun}, + {0, 0, nullptr, (STATEp)sg_GirlNinjaRun}, }, { {GIRLNINJA_KNEEL_R4 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[4][1]}, {GIRLNINJA_STAND_R4 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[4][2]}, - {0, 0, NULL, (STATEp)sg_GirlNinjaRun}, + {0, 0, nullptr, (STATEp)sg_GirlNinjaRun}, }, }; @@ -691,16 +691,16 @@ ACTOR_ACTION_SET GirlNinjaActionSet = sg_GirlNinjaRun, sg_GirlNinjaJump, sg_GirlNinjaFall, - NULL, - NULL, - NULL, + nullptr, + nullptr, + nullptr, sg_GirlNinjaRise, sg_GirlNinjaSit, - NULL, - NULL, + nullptr, + nullptr, sg_GirlNinjaPain, sg_GirlNinjaDie, - NULL, + nullptr, sg_GirlNinjaDead, sg_GirlNinjaDeathJump, sg_GirlNinjaDeathFall, @@ -708,9 +708,9 @@ ACTOR_ACTION_SET GirlNinjaActionSet = {800, 1024}, {sg_GirlNinjaCrossbow, sg_GirlNinjaSticky}, {800, 1024}, - {NULL}, + {nullptr}, sg_GirlNinjaDuck, - NULL + nullptr }; int diff --git a/source/games/sw/src/goro.cpp b/source/games/sw/src/goro.cpp index 106ec7c9f..66017bef2 100644 --- a/source/games/sw/src/goro.cpp +++ b/source/games/sw/src/goro.cpp @@ -457,28 +457,28 @@ ACTOR_ACTION_SET GoroActionSet = { sg_GoroStand, sg_GoroRun, - NULL, //sg_GoroJump, - NULL, //sg_GoroFall, - NULL, //sg_GoroCrawl, - NULL, //sg_GoroSwim, - NULL, //sg_GoroFly, - NULL, //sg_GoroRise, - NULL, //sg_GoroSit, - NULL, //sg_GoroLook, - NULL, //climb + nullptr, //sg_GoroJump, + nullptr, //sg_GoroFall, + nullptr, //sg_GoroCrawl, + nullptr, //sg_GoroSwim, + nullptr, //sg_GoroFly, + nullptr, //sg_GoroRise, + nullptr, //sg_GoroSit, + nullptr, //sg_GoroLook, + nullptr, //climb sg_GoroPain, sg_GoroDie, - NULL, //sg_GoroHariKari, + nullptr, //sg_GoroHariKari, sg_GoroDead, - NULL, //sg_GoroDeathJump, - NULL, //sg_GoroDeathFall, + nullptr, //sg_GoroDeathJump, + nullptr, //sg_GoroDeathFall, {sg_GoroChop}, {1024}, {sg_GoroSpell}, {1024}, - {NULL,NULL}, - NULL, - NULL + {nullptr,nullptr}, + nullptr, + nullptr }; int diff --git a/source/games/sw/src/hornet.cpp b/source/games/sw/src/hornet.cpp index 6a7230b30..fbda5807f 100644 --- a/source/games/sw/src/hornet.cpp +++ b/source/games/sw/src/hornet.cpp @@ -71,7 +71,7 @@ DECISION HornetSurprised[] = DECISION HornetEvasive[] = { {20, InitHornetCircle }, - {1024, NULL }, + {1024, nullptr }, }; DECISION HornetLostTarget[] = @@ -260,28 +260,28 @@ ACTOR_ACTION_SET HornetActionSet = { sg_HornetStand, sg_HornetRun, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, //climb - NULL, //pain + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, //climb + nullptr, //pain sg_HornetDie, - NULL, + nullptr, sg_HornetDead, - NULL, - NULL, - {NULL}, + nullptr, + nullptr, + {nullptr}, {0}, - {NULL}, + {nullptr}, {0}, - {NULL}, - NULL, - NULL + {nullptr}, + nullptr, + nullptr }; int DoHornetMatchPlayerZ(short SpriteNum); diff --git a/source/games/sw/src/inv.cpp b/source/games/sw/src/inv.cpp index 6ce78f6c0..f3a8ae3d7 100644 --- a/source/games/sw/src/inv.cpp +++ b/source/games/sw/src/inv.cpp @@ -72,14 +72,14 @@ extern PANEL_STATE ps_PanelEnvironSuit[]; INVENTORY_DATA InventoryData[MAX_INVENTORY+1] = { - {"PORTABLE MEDKIT", UseInventoryMedkit, NULL, 0, 1, (FRACUNIT), 0}, - {"REPAIR KIT", NULL, NULL, 100, 1, (FRACUNIT), INVF_AUTO_USE}, + {"PORTABLE MEDKIT", UseInventoryMedkit, nullptr, 0, 1, (FRACUNIT), 0}, + {"REPAIR KIT", nullptr, nullptr, 100, 1, (FRACUNIT), INVF_AUTO_USE}, {"SMOKE BOMB", UseInventoryCloak, StopInventoryCloak, 4, 1, (FRACUNIT), INVF_TIMED}, {"NIGHT VISION", UseInventoryNightVision, StopInventoryNightVision, 3, 1, (FRACUNIT), INVF_TIMED}, - {"GAS BOMB", UseInventoryChemBomb, NULL, 0, 1, (FRACUNIT), INVF_COUNT}, - {"FLASH BOMB", UseInventoryFlashBomb, NULL, 0, 2, (FRACUNIT), INVF_COUNT}, - {"CALTROPS", UseInventoryCaltrops, NULL, 0, 3, (FRACUNIT), INVF_COUNT}, - {NULL, NULL, NULL, 0, 0, 0, 0} + {"GAS BOMB", UseInventoryChemBomb, nullptr, 0, 1, (FRACUNIT), INVF_COUNT}, + {"FLASH BOMB", UseInventoryFlashBomb, nullptr, 0, 2, (FRACUNIT), INVF_COUNT}, + {"CALTROPS", UseInventoryCaltrops, nullptr, 0, 3, (FRACUNIT), INVF_COUNT}, + {nullptr, nullptr, nullptr, 0, 0, 0, 0} }; void PanelInvTestSuicide(PANEL_SPRITEp psp) diff --git a/source/games/sw/src/jsector.cpp b/source/games/sw/src/jsector.cpp index 0f81b8245..db3f69d6d 100644 --- a/source/games/sw/src/jsector.cpp +++ b/source/games/sw/src/jsector.cpp @@ -189,7 +189,7 @@ JS_SpriteSetup(void) if (tag == MIRROR_CAM && sprite[SpriteNum].picnum != ST1) { // Just change it to static, sprite has all the info I need -// u = SpawnUser(SpriteNum, sp->picnum, NULL); +// u = SpawnUser(SpriteNum, sp->picnum, nullptr); // RESET(sp->cstat, CSTAT_SPRITE_BLOCK); // SET(sp->cstat, CSTAT_SPRITE_BLOCK_HITSCAN); change_sprite_stat(SpriteNum, STAT_SPAWN_SPOT); @@ -219,9 +219,9 @@ JS_SpriteSetup(void) } else if (tag == TAG_DRIPGEN) { - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); - ASSERT(u != NULL); + ASSERT(u != nullptr); u->RotNum = 0; u->WaitTics = sp->lotag * 120; @@ -594,7 +594,7 @@ void JS_DrawCameras(PLAYERp pp, int tx, int ty, int tz, double smoothratio) } - SPRITEp sp = NULL; + SPRITEp sp = nullptr; int camhoriz; short w; int dx, dy, dz, tdx, tdy, tdz, midx, midy; diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index 55d648e29..4eb5cd906 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -649,7 +649,7 @@ DoPhosphorus(int16_t Weapon) if (TEST(hsp->extra, SPRX_BURNABLE)) { if (!hu) - hu = SpawnUser(hit_sprite, hsp->picnum, NULL); + hu = SpawnUser(hit_sprite, hsp->picnum, nullptr); SpawnFireballExp(Weapon); if (hu) SpawnFireballFlames(Weapon, hit_sprite); @@ -2229,7 +2229,7 @@ DoCarryFlag(int16_t Weapon) { if (fp->lotag) // Trigger everything if there is a // lotag - DoMatchEverything(NULL, fp->lotag, ON); + DoMatchEverything(nullptr, fp->lotag, ON); } if (!TEST_BOOL1(fp)) { @@ -2241,7 +2241,7 @@ DoCarryFlag(int16_t Weapon) if (fu->filler >= SP_TAG5(fp)) { fu->filler = 0; - DoMatchEverything(NULL, SP_TAG6(fp), ON); + DoMatchEverything(nullptr, SP_TAG6(fp), ON); } } } @@ -2369,7 +2369,7 @@ DoCarryFlagNoDet(int16_t Weapon) //MONO_PRINT(ds); if (fp->lotag) // Trigger everything if there is a // lotag - DoMatchEverything(NULL, fp->lotag, ON); + DoMatchEverything(nullptr, fp->lotag, ON); fu->WaitTics = 0; // Tell it to respawn } if (!TEST_BOOL1(fp)) @@ -2382,7 +2382,7 @@ DoCarryFlagNoDet(int16_t Weapon) if (fu->filler >= SP_TAG5(fp)) { fu->filler = 0; - DoMatchEverything(NULL, SP_TAG6(fp), ON); + DoMatchEverything(nullptr, SP_TAG6(fp), ON); } } } @@ -2454,7 +2454,7 @@ InitShell(int16_t SpriteNum, int16_t ShellNum) int nx, ny, nz; short w; short id=0,velocity=0; - STATEp p=NULL; + STATEp p=nullptr; extern STATE s_UziShellShrap[]; extern STATE s_ShotgunShellShrap[]; @@ -2584,7 +2584,7 @@ static saveable_data saveable_jweapon_data[] = saveable_module saveable_jweapon = { // code - NULL,0, + nullptr,0, // data saveable_jweapon_data, diff --git a/source/games/sw/src/lava.cpp b/source/games/sw/src/lava.cpp index 93980b4a0..7b68fa2df 100644 --- a/source/games/sw/src/lava.cpp +++ b/source/games/sw/src/lava.cpp @@ -67,7 +67,7 @@ DECISION LavaSurprised[] = DECISION LavaEvasive[] = { {10, InitActorEvade }, - {1024, NULL } + {1024, nullptr } }; DECISION LavaLostTarget[] = @@ -427,28 +427,28 @@ ACTOR_ACTION_SET LavaActionSet = { sg_LavaStand, sg_LavaRun, - NULL, //sg_LavaJump, - NULL, //sg_LavaFall, - NULL, //sg_LavaCrawl, - NULL, //sg_LavaSwim, - NULL, //sg_LavaFly, - NULL, //sg_LavaRise, - NULL, //sg_LavaSit, - NULL, //sg_LavaLook, - NULL, //climb - NULL, //pain + nullptr, //sg_LavaJump, + nullptr, //sg_LavaFall, + nullptr, //sg_LavaCrawl, + nullptr, //sg_LavaSwim, + nullptr, //sg_LavaFly, + nullptr, //sg_LavaRise, + nullptr, //sg_LavaSit, + nullptr, //sg_LavaLook, + nullptr, //climb + nullptr, //pain sg_LavaDie, - NULL, //sg_LavaHariKari, + nullptr, //sg_LavaHariKari, sg_LavaDead, - NULL, //sg_LavaDeathJump, - NULL, //sg_LavaDeathFall, + nullptr, //sg_LavaDeathJump, + nullptr, //sg_LavaDeathFall, {sg_LavaFlame}, {1024}, {sg_LavaFlame, sg_LavaThrow, sg_LavaThrow, sg_LavaThrow}, {256, 512, 768, 1024}, - {NULL}, - NULL, - NULL + {nullptr}, + nullptr, + nullptr }; int diff --git a/source/games/sw/src/miscactr.cpp b/source/games/sw/src/miscactr.cpp index dc2d6174c..f03d4b4a5 100644 --- a/source/games/sw/src/miscactr.cpp +++ b/source/games/sw/src/miscactr.cpp @@ -129,7 +129,7 @@ SetupToiletGirl(short SpriteNum) } - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); ChangeState(SpriteNum,s_ToiletGirlStand); u->Attrib = &ToiletGirlAttrib; @@ -368,7 +368,7 @@ SetupWashGirl(short SpriteNum) u->Health = 60; } - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); ChangeState(SpriteNum,s_WashGirlStand); u->Attrib = &WashGirlAttrib; @@ -577,7 +577,7 @@ SetupTrashCan(short SpriteNum) u->Health = 60; } - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); ChangeState(SpriteNum,s_TrashCanStand); u->Attrib = &TrashCanAttrib; @@ -685,7 +685,7 @@ SetupPachinkoLight(short SpriteNum) u->Health = 1; } - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); ChangeState(SpriteNum,s_PachinkoLightStand); u->Attrib = &PachinkoLightAttrib; @@ -786,7 +786,7 @@ SetupPachinko1(short SpriteNum) u->Health = 1; } - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); ChangeState(SpriteNum,s_Pachinko1Stand); u->Attrib = &Pachinko1Attrib; @@ -956,7 +956,7 @@ SetupPachinko2(short SpriteNum) u->Health = 1; } - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); ChangeState(SpriteNum,s_Pachinko2Stand); u->Attrib = &Pachinko2Attrib; @@ -1040,7 +1040,7 @@ SetupPachinko3(short SpriteNum) u->Health = 1; } - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); ChangeState(SpriteNum,s_Pachinko3Stand); u->Attrib = &Pachinko3Attrib; @@ -1125,7 +1125,7 @@ SetupPachinko4(short SpriteNum) u->Health = 1; } - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); ChangeState(SpriteNum,s_Pachinko4Stand); u->Attrib = &Pachinko4Attrib; @@ -1239,7 +1239,7 @@ SetupCarGirl(short SpriteNum) } - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); ChangeState(SpriteNum,s_CarGirlStand); u->Attrib = &CarGirlAttrib; @@ -1459,7 +1459,7 @@ SetupMechanicGirl(short SpriteNum) } - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); ChangeState(SpriteNum,s_MechanicGirlStand); u->Attrib = &MechanicGirlAttrib; @@ -1678,7 +1678,7 @@ SetupSailorGirl(short SpriteNum) } - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); ChangeState(SpriteNum,s_SailorGirlStand); u->Attrib = &SailorGirlAttrib; @@ -1891,7 +1891,7 @@ SetupPruneGirl(short SpriteNum) } - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); ChangeState(SpriteNum,s_PruneGirlStand); u->Attrib = &PruneGirlAttrib; diff --git a/source/games/sw/src/morph.cpp b/source/games/sw/src/morph.cpp index 6e44949dc..4301ef114 100644 --- a/source/games/sw/src/morph.cpp +++ b/source/games/sw/src/morph.cpp @@ -587,6 +587,6 @@ saveable_module saveable_morph = SIZ(saveable_morph_code), // data - NULL,0 + nullptr,0 }; END_SW_NS diff --git a/source/games/sw/src/ninja.cpp b/source/games/sw/src/ninja.cpp index e637fe6ee..fed70769a 100644 --- a/source/games/sw/src/ninja.cpp +++ b/source/games/sw/src/ninja.cpp @@ -88,7 +88,7 @@ DECISION NinjaEvasive[] = {400, InitActorDuck}, // 100 // {300, InitActorEvade}, // {800, InitActorRunAway}, - {1024, NULL} + {1024, nullptr} }; DECISION NinjaLostTarget[] = @@ -340,27 +340,27 @@ STATE s_NinjaRise[5][3] = { {NINJA_KNEEL_R0 + 0, NINJA_RISE_RATE, NullNinja, &s_NinjaRise[0][1]}, {NINJA_STAND_R0 + 0, NINJA_STAND_RATE, NullNinja, &s_NinjaRise[0][2]}, - {0, 0, NULL, (STATEp)sg_NinjaRun}, + {0, 0, nullptr, (STATEp)sg_NinjaRun}, }, { {NINJA_KNEEL_R1 + 0, NINJA_RISE_RATE, NullNinja, &s_NinjaRise[1][1]}, {NINJA_STAND_R1 + 0, NINJA_STAND_RATE, NullNinja, &s_NinjaRise[1][2]}, - {0, 0, NULL, (STATEp)sg_NinjaRun}, + {0, 0, nullptr, (STATEp)sg_NinjaRun}, }, { {NINJA_KNEEL_R2 + 0, NINJA_RISE_RATE, NullNinja, &s_NinjaRise[2][1]}, {NINJA_STAND_R2 + 0, NINJA_STAND_RATE, NullNinja, &s_NinjaRise[2][2]}, - {0, 0, NULL, (STATEp)sg_NinjaRun}, + {0, 0, nullptr, (STATEp)sg_NinjaRun}, }, { {NINJA_KNEEL_R3 + 0, NINJA_RISE_RATE, NullNinja, &s_NinjaRise[3][1]}, {NINJA_STAND_R3 + 0, NINJA_STAND_RATE, NullNinja, &s_NinjaRise[3][2]}, - {0, 0, NULL, (STATEp)sg_NinjaRun}, + {0, 0, nullptr, (STATEp)sg_NinjaRun}, }, { {NINJA_KNEEL_R4 + 0, NINJA_RISE_RATE, NullNinja, &s_NinjaRise[4][1]}, {NINJA_STAND_R4 + 0, NINJA_STAND_RATE, NullNinja, &s_NinjaRise[4][2]}, - {0, 0, NULL, (STATEp)sg_NinjaRun}, + {0, 0, nullptr, (STATEp)sg_NinjaRun}, }, }; @@ -1615,7 +1615,7 @@ ACTOR_ACTION_SET NinjaSniperActionSet = sg_NinjaFly, sg_NinjaUzi, sg_NinjaDuck, - NULL, + nullptr, sg_NinjaClimb, sg_NinjaPain, sg_NinjaDie, @@ -1627,7 +1627,7 @@ ACTOR_ACTION_SET NinjaSniperActionSet = {1024}, {sg_NinjaUzi}, {1024}, - {NULL}, + {nullptr}, sg_NinjaDuck, sg_NinjaDive }; @@ -1643,7 +1643,7 @@ ACTOR_ACTION_SET NinjaActionSet = sg_NinjaFly, sg_NinjaRise, sg_NinjaSit, - NULL, + nullptr, sg_NinjaClimb, sg_NinjaPain, sg_NinjaDie, @@ -1655,7 +1655,7 @@ ACTOR_ACTION_SET NinjaActionSet = {1000, 1024}, {sg_NinjaUzi, sg_NinjaStar}, {800, 1024}, - {NULL}, + {nullptr}, sg_NinjaDuck, sg_NinjaDive }; @@ -1671,7 +1671,7 @@ ACTOR_ACTION_SET NinjaRedActionSet = sg_NinjaFly, sg_NinjaRise, sg_NinjaSit, - NULL, + nullptr, sg_NinjaClimb, sg_NinjaPain, sg_NinjaDie, @@ -1683,7 +1683,7 @@ ACTOR_ACTION_SET NinjaRedActionSet = {812, 1024}, {sg_NinjaUzi, sg_NinjaRocket}, {812, 1024}, - {NULL}, + {nullptr}, sg_NinjaDuck, sg_NinjaDive }; @@ -1699,7 +1699,7 @@ ACTOR_ACTION_SET NinjaSeekerActionSet = sg_NinjaFly, sg_NinjaRise, sg_NinjaSit, - NULL, + nullptr, sg_NinjaClimb, sg_NinjaPain, sg_NinjaDie, @@ -1711,7 +1711,7 @@ ACTOR_ACTION_SET NinjaSeekerActionSet = {812, 1024}, {sg_NinjaUzi, sg_NinjaRocket}, {812, 1024}, - {NULL}, + {nullptr}, sg_NinjaDuck, sg_NinjaDive }; @@ -1727,7 +1727,7 @@ ACTOR_ACTION_SET NinjaGrenadeActionSet = sg_NinjaFly, sg_NinjaRise, sg_NinjaSit, - NULL, + nullptr, sg_NinjaClimb, sg_NinjaPain, sg_NinjaDie, @@ -1739,7 +1739,7 @@ ACTOR_ACTION_SET NinjaGrenadeActionSet = {812, 1024}, {sg_NinjaUzi, sg_NinjaGrenade}, {812, 1024}, - {NULL}, + {nullptr}, sg_NinjaDuck, sg_NinjaDive }; @@ -1755,7 +1755,7 @@ ACTOR_ACTION_SET NinjaGreenActionSet = sg_NinjaFly, sg_NinjaRise, sg_NinjaSit, - NULL, + nullptr, sg_NinjaClimb, sg_NinjaPain, sg_NinjaDie, @@ -1767,7 +1767,7 @@ ACTOR_ACTION_SET NinjaGreenActionSet = {912, 1024}, {sg_NinjaFlashBomb, sg_NinjaUzi, sg_NinjaMirv, sg_NinjaNapalm}, {150, 500, 712, 1024}, - {NULL}, + {nullptr}, sg_NinjaDuck, sg_NinjaDive }; @@ -1793,7 +1793,7 @@ ACTOR_ACTION_SET PlayerNinjaActionSet = sg_NinjaFly, sg_NinjaRise, sg_NinjaSit, - NULL, + nullptr, sg_PlayerNinjaClimb, sg_NinjaPain, sg_NinjaDie, @@ -1805,7 +1805,7 @@ ACTOR_ACTION_SET PlayerNinjaActionSet = {1000, 1024}, {sg_NinjaStar, sg_NinjaUzi}, {800, 1024}, - {NULL}, + {nullptr}, sg_NinjaDuck, sg_PlayerNinjaSwim }; @@ -1960,7 +1960,7 @@ DoNinjaHariKari(short SpriteNum) RESET(u->Flags, SPR_FALLING | SPR_JUMPING); u->floor_dist = Z(40); u->RotNum = 0; - u->ActorActionFunc = NULL; + u->ActorActionFunc = nullptr; SET(sp->extra, SPRX_BREAKABLE); SET(sp->cstat, CSTAT_SPRITE_BREAKABLE); @@ -1993,7 +1993,7 @@ DoNinjaGrabThroat(short SpriteNum) RESET(u->Flags, SPR_FALLING | SPR_JUMPING); u->floor_dist = Z(40); u->RotNum = 0; - u->ActorActionFunc = NULL; + u->ActorActionFunc = nullptr; SET(sp->extra, SPRX_BREAKABLE); SET(sp->cstat, CSTAT_SPRITE_BREAKABLE); @@ -2219,10 +2219,10 @@ PlayerLevelReset(PLAYERp pp) RESET(pp->Flags, PF_WEAPON_DOWN|PF_WEAPON_RETRACT); RESET(pp->Flags, PF_DEAD); - pp->sop_control = NULL; - pp->sop_riding = NULL; - pp->sop_remote = NULL; - pp->sop = NULL; + pp->sop_control = nullptr; + pp->sop_riding = nullptr; + pp->sop_remote = nullptr; + pp->sop = nullptr; DoPlayerResetMovement(pp); DamageData[u->WeaponNum].Init(pp); } @@ -2285,10 +2285,10 @@ PlayerDeathReset(PLAYERp pp) RESET(pp->Flags, PF_WEAPON_DOWN|PF_WEAPON_RETRACT); RESET(pp->Flags, PF_DEAD); - pp->sop_control = NULL; - pp->sop_riding = NULL; - pp->sop_remote = NULL; - pp->sop = NULL; + pp->sop_control = nullptr; + pp->sop_riding = nullptr; + pp->sop_remote = nullptr; + pp->sop = nullptr; DoPlayerResetMovement(pp); //if (pp->CurWpn) // RESET(pp->CurWpn->flags, PANF_DEATH_HIDE); @@ -2310,7 +2310,7 @@ PlayerPanelSetup(void) u = User[pp->PlayerSprite].Data(); - ASSERT(u != NULL); + ASSERT(u != nullptr); //u->WeaponNum = WPN_STAR; //pp->WpnFirstType = WPN_SWORD; @@ -2370,10 +2370,10 @@ PlayerGameReset(PLAYERp pp) RESET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT); - pp->sop_control = NULL; - pp->sop_riding = NULL; - pp->sop_remote = NULL; - pp->sop = NULL; + pp->sop_control = nullptr; + pp->sop_riding = nullptr; + pp->sop_remote = nullptr; + pp->sop = nullptr; DoPlayerResetMovement(pp); DamageData[u->WeaponNum].Init(pp); } @@ -2401,7 +2401,7 @@ InitPlayerSprite(PLAYERp pp) COVER_SetReverb(0); // Turn off any echoing that may have been going before pp->Reverb = 0; - sp_num = pp->PlayerSprite = SpawnSprite(STAT_PLAYER0 + pnum, NINJA_RUN_R0, NULL, pp->cursectnum, pp->posx, + sp_num = pp->PlayerSprite = SpawnSprite(STAT_PLAYER0 + pnum, NINJA_RUN_R0, nullptr, pp->cursectnum, pp->posx, pp->posy, pp->posz, pp->angle.ang.asbuild(), 0); pp->SpriteP = sp = &sprite[sp_num]; @@ -2438,7 +2438,7 @@ InitPlayerSprite(PLAYERp pp) NewStateGroup(sp_num, u->ActorActionSet->Run); pp->PlayerUnderSprite = -1; - pp->UnderSpriteP = NULL; + pp->UnderSpriteP = nullptr; DoPlayerZrange(pp); @@ -2475,7 +2475,7 @@ SpawnPlayerUnderSprite(PLAYERp pp) int pnum = int(pp - Player), sp_num; sp_num = pp->PlayerUnderSprite = SpawnSprite(STAT_PLAYER_UNDER0 + pnum, - NINJA_RUN_R0, NULL, pp->cursectnum, pp->posx, pp->posy, pp->posz, pp->angle.ang.asbuild(), 0); + NINJA_RUN_R0, nullptr, pp->cursectnum, pp->posx, pp->posy, pp->posz, pp->angle.ang.asbuild(), 0); sp = &sprite[sp_num]; u = User[sp_num].Data(); diff --git a/source/games/sw/src/panel.cpp b/source/games/sw/src/panel.cpp index 7aed69455..1acf32d4d 100644 --- a/source/games/sw/src/panel.cpp +++ b/source/games/sw/src/panel.cpp @@ -117,13 +117,13 @@ void pNullAnimator(PANEL_SPRITEp) PANEL_SPRITEp pFindMatchingSprite(PLAYERp pp, int x, int y, short pri) { - PANEL_SPRITEp psp=NULL, next; + PANEL_SPRITEp psp=nullptr, next; TRAVERSE(&pp->PanelSpriteList, psp, next) { // early out if (psp->priority > pri) - return NULL; + return nullptr; if (psp->x == x && psp->y == y && psp->priority == pri) { @@ -131,18 +131,18 @@ PANEL_SPRITEp pFindMatchingSprite(PLAYERp pp, int x, int y, short pri) } } - return NULL; + return nullptr; } PANEL_SPRITEp pFindMatchingSpriteID(PLAYERp pp, short id, int x, int y, short pri) { - PANEL_SPRITEp psp=NULL, next; + PANEL_SPRITEp psp=nullptr, next; TRAVERSE(&pp->PanelSpriteList, psp, next) { // early out if (psp->priority > pri) - return NULL; + return nullptr; if (psp->ID == id && psp->x == x && psp->y == y && psp->priority == pri) { @@ -150,12 +150,12 @@ PANEL_SPRITEp pFindMatchingSpriteID(PLAYERp pp, short id, int x, int y, short pr } } - return NULL; + return nullptr; } bool pKillScreenSpiteIDs(PLAYERp pp, short id) { - PANEL_SPRITEp psp=NULL, next; + PANEL_SPRITEp psp=nullptr, next; bool found = false; // Kill ALL sprites with the correct id @@ -177,7 +177,7 @@ bool pKillScreenSpiteIDs(PLAYERp pp, short id) void pSetSuicide(PANEL_SPRITEp psp) { //SET(psp->flags, PANF_SUICIDE); - //psp->State = NULL; + //psp->State = nullptr; psp->PanelSpriteFunc = pSuicide; } @@ -663,7 +663,7 @@ WeaponOK(PLAYERp pp) u = User[pp->PlayerSprite].Data(); - if (u == NULL) + if (u == nullptr) return(false); // sword @@ -791,7 +791,7 @@ SpawnSwordBlur(PANEL_SPRITEp psp) if (psp->PlayerP->SwordAng > 200) return; - nsp = pSpawnSprite(psp->PlayerP, NULL, PRI_BACK, psp->x, psp->y); + nsp = pSpawnSprite(psp->PlayerP, nullptr, PRI_BACK, psp->x, psp->y); SET(nsp->flags, PANF_WEAPON_SPRITE); nsp->ang = psp->ang; @@ -924,9 +924,9 @@ void RetractCurWpn(PLAYERp pp) { // special case for uzi reload pieces cur->picnum = cur->picndx; - cur->State = NULL; + cur->State = nullptr; cur->PanelSpriteFunc = SpecialUziRetractFunc; - cur->sibling = NULL; + cur->sibling = nullptr; } } } @@ -1244,7 +1244,7 @@ pSwordRetract(PANEL_SPRITEp psp) if (psp->y >= SWORD_YOFF + tileHeight(picnum)) { RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); - psp->PlayerP->Wpn[WPN_SWORD] = NULL; + psp->PlayerP->Wpn[WPN_SWORD] = nullptr; pKillSprite(psp); } } @@ -1355,7 +1355,7 @@ pStarRestTest(PANEL_SPRITEp psp) void InitWeaponStar(PLAYERp pp) { - PANEL_SPRITEp psp = NULL; + PANEL_SPRITEp psp = nullptr; if (Prediction) return; @@ -1539,7 +1539,7 @@ pStarRetract(PANEL_SPRITEp psp) RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); // kill only in its own routine - psp->PlayerP->Wpn[WPN_STAR] = NULL; + psp->PlayerP->Wpn[WPN_STAR] = nullptr; pKillSprite(psp); } } @@ -1924,7 +1924,7 @@ pUziDoneReload(PANEL_SPRITEp psp) New = InitWeaponUziSecondaryReload(psp); pp->Wpn[WPN_UZI] = New; pp->CurWpn = New; - pp->CurWpn->sibling = NULL; + pp->CurWpn->sibling = nullptr; pKillSprite(psp); return; @@ -1938,8 +1938,8 @@ pUziDoneReload(PANEL_SPRITEp psp) pp->WpnUziType -= 3; // reset uzi variable - pp->Wpn[WPN_UZI] = NULL; - pp->CurWpn = NULL; + pp->Wpn[WPN_UZI] = nullptr; + pp->CurWpn = nullptr; // kill uzi eject sequence for good pKillSprite(psp); @@ -1990,7 +1990,7 @@ pUziClip(PANEL_SPRITEp oclip) void InitWeaponUzi(PLAYERp pp) { - PANEL_SPRITEp psp = NULL; + PANEL_SPRITEp psp = nullptr; if (Prediction) return; @@ -2076,7 +2076,7 @@ InitWeaponUzi2(PANEL_SPRITEp uzi_orig) // There is already a second uzi, or it's retracting - if (pp->WpnUziType == 1 || pp->CurWpn->sibling || TEST(pp->Flags, PF_WEAPON_RETRACT)) return NULL; + if (pp->WpnUziType == 1 || pp->CurWpn->sibling || TEST(pp->Flags, PF_WEAPON_RETRACT)) return nullptr; // NOTE: PRIMARY is ONLY set when there is a powerup SET(uzi_orig->flags, PANF_PRIMARY); @@ -2245,7 +2245,7 @@ pUziRest(PANEL_SPRITEp psp) // If you have two uzi's, but one didn't come up, spawn it - if (TEST(psp->PlayerP->Flags, PF_TWO_UZI) && psp->sibling == NULL) + if (TEST(psp->PlayerP->Flags, PF_TWO_UZI) && psp->sibling == nullptr) { InitWeaponUzi2(psp); } @@ -2254,7 +2254,7 @@ pUziRest(PANEL_SPRITEp psp) { if (pWeaponHideKeys(psp, ps_UziHide)) { - if (psp->sibling != NULL) // !JIM! Without this line, will ASSERT if reloading here + if (psp->sibling != nullptr) // !JIM! Without this line, will ASSERT if reloading here pSetState(psp->sibling, ps_Uzi2Hide); return; } @@ -2387,7 +2387,7 @@ pUziRetract(PANEL_SPRITEp psp) if (TEST(psp->flags, PANF_RELOAD)) { RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); - psp->PlayerP->Wpn[WPN_UZI] = NULL; + psp->PlayerP->Wpn[WPN_UZI] = nullptr; } else { @@ -2396,7 +2396,7 @@ pUziRetract(PANEL_SPRITEp psp) { // only reset when primary goes off the screen RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); - psp->PlayerP->Wpn[WPN_UZI] = NULL; + psp->PlayerP->Wpn[WPN_UZI] = nullptr; } else if (TEST(psp->flags, PANF_SECONDARY)) { @@ -2404,13 +2404,13 @@ pUziRetract(PANEL_SPRITEp psp) // is taken off of the screen. Lets the primary know that // he is alone. if (psp->sibling && psp->sibling->sibling == psp) - psp->sibling->sibling = NULL; + psp->sibling->sibling = nullptr; } else { // only one uzi here is retracting RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); - psp->PlayerP->Wpn[WPN_UZI] = NULL; + psp->PlayerP->Wpn[WPN_UZI] = nullptr; } } @@ -2668,7 +2668,7 @@ PANEL_STATE ps_RetractShotgun[] = void InitWeaponShotgun(PLAYERp pp) { - PANEL_SPRITEp psp = NULL; + PANEL_SPRITEp psp = nullptr; if (Prediction) return; @@ -2869,16 +2869,16 @@ pShotgunOverlays(PANEL_SPRITEp psp) PANEL_STATE ps_ShotgunFlash[] = { - {SHOTGUN_AUTO, 30, NULL, &ps_ShotgunFlash[1], 0,0,0}, - {0, 30, NULL, &ps_ShotgunFlash[2], 0,0,0}, - {SHOTGUN_AUTO, 30, NULL, &ps_ShotgunFlash[3], 0,0,0}, - {0, 30, NULL, &ps_ShotgunFlash[4], 0,0,0}, - {SHOTGUN_AUTO, 30, NULL, &ps_ShotgunFlash[5], 0,0,0}, - {0, 30, NULL, &ps_ShotgunFlash[6], 0,0,0}, - {SHOTGUN_AUTO, 30, NULL, &ps_ShotgunFlash[7], 0,0,0}, - {0, 30, NULL, &ps_ShotgunFlash[8], 0,0,0}, - {SHOTGUN_AUTO, 30, NULL, &ps_ShotgunFlash[9], 0,0,0}, - {0, 0, NULL, NULL, 0,0,0} + {SHOTGUN_AUTO, 30, nullptr, &ps_ShotgunFlash[1], 0,0,0}, + {0, 30, nullptr, &ps_ShotgunFlash[2], 0,0,0}, + {SHOTGUN_AUTO, 30, nullptr, &ps_ShotgunFlash[3], 0,0,0}, + {0, 30, nullptr, &ps_ShotgunFlash[4], 0,0,0}, + {SHOTGUN_AUTO, 30, nullptr, &ps_ShotgunFlash[5], 0,0,0}, + {0, 30, nullptr, &ps_ShotgunFlash[6], 0,0,0}, + {SHOTGUN_AUTO, 30, nullptr, &ps_ShotgunFlash[7], 0,0,0}, + {0, 30, nullptr, &ps_ShotgunFlash[8], 0,0,0}, + {SHOTGUN_AUTO, 30, nullptr, &ps_ShotgunFlash[9], 0,0,0}, + {0, 0, nullptr, nullptr, 0,0,0} }; @@ -3028,7 +3028,7 @@ pShotgunRetract(PANEL_SPRITEp psp) if (psp->y >= SHOTGUN_YOFF + tileHeight(picnum) + 50) { RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); - psp->PlayerP->Wpn[psp->WeaponType] = NULL; + psp->PlayerP->Wpn[psp->WeaponType] = nullptr; pKillSprite(psp); } } @@ -3154,7 +3154,7 @@ PANEL_STATE ps_RetractRail[] = void InitWeaponRail(PLAYERp pp) { - PANEL_SPRITEp psp = NULL; + PANEL_SPRITEp psp = nullptr; if (SW_SHAREWARE) return; @@ -3403,7 +3403,7 @@ pRailRetract(PANEL_SPRITEp psp) if (psp->y >= RAIL_YOFF + tileHeight(picnum) + 50) { RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); - psp->PlayerP->Wpn[psp->WeaponType] = NULL; + psp->PlayerP->Wpn[psp->WeaponType] = nullptr; DeleteNoSoundOwner(psp->PlayerP->PlayerSprite); pKillSprite(psp); } @@ -3596,7 +3596,7 @@ pHotHeadOverlays(PANEL_SPRITEp psp, short mode) void InitWeaponHothead(PLAYERp pp) { - PANEL_SPRITEp psp = NULL; + PANEL_SPRITEp psp = nullptr; if (SW_SHAREWARE) return; @@ -3819,7 +3819,7 @@ pHotheadRetract(PANEL_SPRITEp psp) if (psp->y >= HOTHEAD_YOFF + tileHeight(picnum)) { RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); - psp->PlayerP->Wpn[WPN_HOTHEAD] = NULL; + psp->PlayerP->Wpn[WPN_HOTHEAD] = nullptr; pKillSprite(psp); } } @@ -4240,30 +4240,30 @@ pMicroOverlays(PANEL_SPRITEp psp) PANEL_STATE ps_MicroHeatFlash[] = { - {MICRO_HEAT, 30, NULL, &ps_MicroHeatFlash[1], 0,0,0}, - {0, 30, NULL, &ps_MicroHeatFlash[2], 0,0,0}, - {MICRO_HEAT, 30, NULL, &ps_MicroHeatFlash[3], 0,0,0}, - {0, 30, NULL, &ps_MicroHeatFlash[4], 0,0,0}, - {MICRO_HEAT, 30, NULL, &ps_MicroHeatFlash[5], 0,0,0}, - {0, 30, NULL, &ps_MicroHeatFlash[6], 0,0,0}, - {MICRO_HEAT, 30, NULL, &ps_MicroHeatFlash[7], 0,0,0}, - {0, 30, NULL, &ps_MicroHeatFlash[8], 0,0,0}, - {MICRO_HEAT, 30, NULL, &ps_MicroHeatFlash[9], 0,0,0}, - {0, 0, NULL, NULL, 0,0,0} + {MICRO_HEAT, 30, nullptr, &ps_MicroHeatFlash[1], 0,0,0}, + {0, 30, nullptr, &ps_MicroHeatFlash[2], 0,0,0}, + {MICRO_HEAT, 30, nullptr, &ps_MicroHeatFlash[3], 0,0,0}, + {0, 30, nullptr, &ps_MicroHeatFlash[4], 0,0,0}, + {MICRO_HEAT, 30, nullptr, &ps_MicroHeatFlash[5], 0,0,0}, + {0, 30, nullptr, &ps_MicroHeatFlash[6], 0,0,0}, + {MICRO_HEAT, 30, nullptr, &ps_MicroHeatFlash[7], 0,0,0}, + {0, 30, nullptr, &ps_MicroHeatFlash[8], 0,0,0}, + {MICRO_HEAT, 30, nullptr, &ps_MicroHeatFlash[9], 0,0,0}, + {0, 0, nullptr, nullptr, 0,0,0} }; PANEL_STATE ps_MicroNukeFlash[] = { - {MICRO_SHOT_20, 30, NULL, &ps_MicroNukeFlash[1], 0,0,0}, - {0, 30, NULL, &ps_MicroNukeFlash[2], 0,0,0}, - {MICRO_SHOT_20, 30, NULL, &ps_MicroNukeFlash[3], 0,0,0}, - {0, 30, NULL, &ps_MicroNukeFlash[4], 0,0,0}, - {MICRO_SHOT_20, 30, NULL, &ps_MicroNukeFlash[5], 0,0,0}, - {0, 30, NULL, &ps_MicroNukeFlash[6], 0,0,0}, - {MICRO_SHOT_20, 30, NULL, &ps_MicroNukeFlash[7], 0,0,0}, - {0, 30, NULL, &ps_MicroNukeFlash[8], 0,0,0}, - {MICRO_SHOT_20, 30, NULL, &ps_MicroNukeFlash[9], 0,0,0}, - {0, 0, NULL, NULL, 0,0,0} + {MICRO_SHOT_20, 30, nullptr, &ps_MicroNukeFlash[1], 0,0,0}, + {0, 30, nullptr, &ps_MicroNukeFlash[2], 0,0,0}, + {MICRO_SHOT_20, 30, nullptr, &ps_MicroNukeFlash[3], 0,0,0}, + {0, 30, nullptr, &ps_MicroNukeFlash[4], 0,0,0}, + {MICRO_SHOT_20, 30, nullptr, &ps_MicroNukeFlash[5], 0,0,0}, + {0, 30, nullptr, &ps_MicroNukeFlash[6], 0,0,0}, + {MICRO_SHOT_20, 30, nullptr, &ps_MicroNukeFlash[7], 0,0,0}, + {0, 30, nullptr, &ps_MicroNukeFlash[8], 0,0,0}, + {MICRO_SHOT_20, 30, nullptr, &ps_MicroNukeFlash[9], 0,0,0}, + {0, 0, nullptr, nullptr, 0,0,0} }; void @@ -4377,7 +4377,7 @@ pMicroRetract(PANEL_SPRITEp psp) if (psp->y >= MICRO_YOFF + tileHeight(picnum)) { RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); - psp->PlayerP->Wpn[WPN_MICRO] = NULL; + psp->PlayerP->Wpn[WPN_MICRO] = nullptr; pKillSprite(psp); } } @@ -4687,7 +4687,7 @@ pHeartRetract(PANEL_SPRITEp psp) if (psp->y >= HEART_YOFF + tileHeight(picnum)) { RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); - psp->PlayerP->Wpn[WPN_HEART] = NULL; + psp->PlayerP->Wpn[WPN_HEART] = nullptr; pKillSprite(psp); } } @@ -5178,7 +5178,7 @@ pGrenadeRetract(PANEL_SPRITEp psp) if (psp->y >= GRENADE_YOFF + tileHeight(picnum)) { RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); - psp->PlayerP->Wpn[WPN_GRENADE] = NULL; + psp->PlayerP->Wpn[WPN_GRENADE] = nullptr; pKillSprite(psp); } } @@ -5425,7 +5425,7 @@ pMineRetract(PANEL_SPRITEp psp) if (psp->y >= MINE_YOFF + tileHeight(picnum)) { RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); - psp->PlayerP->Wpn[WPN_MINE] = NULL; + psp->PlayerP->Wpn[WPN_MINE] = nullptr; pKillSprite(psp); } } @@ -5639,7 +5639,7 @@ pChopsWait(PANEL_SPRITEp psp) void ChopsSetRetract(PLAYERp pp) { - if (pp == NULL || pp->Chops == NULL) + if (pp == nullptr || pp->Chops == nullptr) return; pSetState(pp->Chops, pp->Chops->RetractState); @@ -5657,7 +5657,7 @@ pChopsRetract(PANEL_SPRITEp psp) { if (RANDOM_RANGE(1000) > 800) PlayerSound(DIGI_GETTINGSTIFF,v3df_follow|v3df_dontpan,psp->PlayerP); - psp->PlayerP->Chops = NULL; + psp->PlayerP->Chops = nullptr; pKillSprite(psp); } } @@ -5734,7 +5734,7 @@ SpawnFistBlur(PANEL_SPRITEp psp) if (psp->PlayerP->FistAng > 200) return; - nsp = pSpawnSprite(psp->PlayerP, NULL, PRI_BACK, psp->x, psp->y); + nsp = pSpawnSprite(psp->PlayerP, nullptr, PRI_BACK, psp->x, psp->y); SET(nsp->flags, PANF_WEAPON_SPRITE); nsp->ang = psp->ang; @@ -6281,7 +6281,7 @@ pFistRetract(PANEL_SPRITEp psp) if (psp->y >= FIST_YOFF + tileHeight(picnum)) { RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); - psp->PlayerP->Wpn[WPN_FIST] = NULL; + psp->PlayerP->Wpn[WPN_FIST] = nullptr; pKillSprite(psp); } } @@ -6468,7 +6468,7 @@ pSpawnSprite(PLAYERp pp, PANEL_STATEp state, uint8_t priority, double x, double psp->ox = psp->x = x; psp->oy = psp->y = y; pSetState(psp, state); - if (state == NULL) + if (state == nullptr) psp->picndx = -1; else psp->picndx = state->picndx; @@ -6480,7 +6480,7 @@ pSpawnSprite(PLAYERp pp, PANEL_STATEp state, uint8_t priority, double x, double for (i = 0; i < SIZ(psp->over); i++) { - psp->over[i].State = NULL; + psp->over[i].State = nullptr; psp->over[i].pic = -1; psp->over[i].xoff = -1; psp->over[i].yoff = -1; @@ -6508,7 +6508,7 @@ pKillSprite(PANEL_SPRITEp psp) void pClearSpriteList(PLAYERp pp) { - PANEL_SPRITEp psp=NULL, next_psp=NULL; + PANEL_SPRITEp psp=nullptr, next_psp=nullptr; TRAVERSE(&pp->PanelSpriteList, psp, next_psp) { @@ -6582,7 +6582,7 @@ void pDisplaySprites(PLAYERp pp, double smoothratio) { USERp u = User[pp->PlayerSprite].Data(); - PANEL_SPRITEp psp=NULL, next=NULL; + PANEL_SPRITEp psp=nullptr, next=nullptr; short shade, picnum, overlay_shade = 0; double x, y; unsigned i; @@ -6870,7 +6870,7 @@ pDisplaySprites(PLAYERp pp, double smoothratio) void pSpriteControl(PLAYERp pp) { - PANEL_SPRITEp psp=NULL, next=NULL; + PANEL_SPRITEp psp=nullptr, next=nullptr; TRAVERSE(&pp->PanelSpriteList, psp, next) { diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 276bc2152..b68375439 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -1397,7 +1397,7 @@ DoPlayerWarpTeleporter(PLAYERp pp) #endif - if ((sp_warp = Warp(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum)) == NULL) + if ((sp_warp = Warp(&pp->posx, &pp->posy, &pp->posz, &pp->cursectnum)) == nullptr) return; switch (SP_TAG3(sp_warp)) @@ -1790,7 +1790,7 @@ UpdatePlayerUnderSprite(PLAYERp pp) { KillSprite(pp->PlayerUnderSprite); pp->PlayerUnderSprite = -1; - pp->UnderSpriteP = NULL; + pp->UnderSpriteP = nullptr; } return; } @@ -1941,8 +1941,8 @@ DoPlayerZrange(PLAYERp pp) // 16384+sector (sector first touched) or // 49152+spritenum (sprite first touched) - pp->lo_sectp = pp->hi_sectp = NULL; - pp->lo_sp = pp->hi_sp = NULL; + pp->lo_sectp = pp->hi_sectp = nullptr; + pp->lo_sp = pp->hi_sp = nullptr; if (TEST(ceilhit, 0xc000) == 49152) { @@ -1962,7 +1962,7 @@ DoPlayerZrange(PLAYERp pp) { pp->lo_sectp = §or[pp->lo_sp->sectnum]; pp->loz = pp->lo_sp->z; - pp->lo_sp = NULL; + pp->lo_sp = nullptr; } } else @@ -3574,7 +3574,7 @@ DoPlayerClimb(PLAYERp pp) neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, pp->angle.ang.asbuild(), &sec, &wal, &spr, - &dist, 800L, NTAG_SEARCH_LO_HI, NULL); + &dist, 800L, NTAG_SEARCH_LO_HI, nullptr); if (wal >= 0) { @@ -3891,7 +3891,7 @@ FindNearSprite(SPRITEp sp, short stat) { int fs; int dist, near_dist = 15000; - SPRITEp fp, near_fp = NULL; + SPRITEp fp, near_fp = nullptr; StatIterator it(stat); @@ -3934,7 +3934,7 @@ PlayerOnLadder(PLAYERp pp) neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, pp->angle.ang.asbuild(), &neartagsector, &neartagwall, &neartagsprite, - &neartaghitdist, 1024L+768L, NTAG_SEARCH_LO_HI, NULL); + &neartaghitdist, 1024L+768L, NTAG_SEARCH_LO_HI, nullptr); dir = DOT_PRODUCT_2D(pp->xvect, pp->yvect, pp->angle.ang.bcos(), pp->angle.ang.bsin()); @@ -3948,7 +3948,7 @@ PlayerOnLadder(PLAYERp pp) { neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, NORM_ANGLE(pp->angle.ang.asbuild() + angles[i]), &sec, &wal, &spr, - &dist, 600L, NTAG_SEARCH_LO_HI, NULL); + &dist, 600L, NTAG_SEARCH_LO_HI, nullptr); if (wal < 0 || dist < 100 || wall[wal].lotag != TAG_WALL_CLIMB) return false; @@ -4272,7 +4272,7 @@ DoPlayerWarpToUnderwater(PLAYERp pp) USERp u = User[pp->PlayerSprite].Data(); int i; SECT_USERp sectu = SectUser[pp->cursectnum].Data(); - SPRITEp under_sp = NULL, over_sp = NULL; + SPRITEp under_sp = nullptr, over_sp = nullptr; bool Found = false; short over, under; @@ -4351,7 +4351,7 @@ DoPlayerWarpToSurface(PLAYERp pp) SECT_USERp sectu = SectUser[pp->cursectnum].Data(); short over, under; - SPRITEp under_sp = NULL, over_sp = NULL; + SPRITEp under_sp = nullptr, over_sp = nullptr; bool Found = false; if (Prediction) @@ -5240,7 +5240,7 @@ DoPlayerBeginOperate(PLAYERp pp) { UseInventoryRepairKit(pp); sop->max_damage = User[sop->sp_child - sprite]->MaxHealth; - VehicleSetSmoke(sop, NULL); + VehicleSetSmoke(sop, nullptr); RESET(sop->flags, SOBJ_BROKEN); } else @@ -5328,7 +5328,7 @@ DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop) { UseInventoryRepairKit(pp); sop->max_damage = User[sop->sp_child - sprite]->MaxHealth; - VehicleSetSmoke(sop, NULL); + VehicleSetSmoke(sop, nullptr); RESET(sop->flags, SOBJ_BROKEN); } else @@ -5478,12 +5478,12 @@ DoPlayerStopOperate(PLAYERp pp) if (pp->sop_control) { - pp->sop_control->controller = NULL; + pp->sop_control->controller = nullptr; } - pp->sop_control = NULL; - pp->sop_riding = NULL; - pp->sop_remote = NULL; - pp->sop = NULL; + pp->sop_control = nullptr; + pp->sop_riding = nullptr; + pp->sop_remote = nullptr; + pp->sop = nullptr; DoPlayerBeginRun(pp); } @@ -5767,7 +5767,7 @@ char *KilledPlayerMessage(PLAYERp pp, PLAYERp killer) sprintf(ds,"%s puts the Smack Dab on %s with his %s.",p2,p1,DeathString(pp->HitBy)); return ds; } - return NULL; + return nullptr; }; void @@ -5923,10 +5923,10 @@ DoPlayerBeginDie(PLAYERp pp) pp->ceiling_dist = PLAYER_WADE_CEILING_DIST; ASSERT(pp->DeathType < SIZ(PlayerDeathFunc)); pp->DoPlayerAction = PlayerDeathFunc[pp->DeathType]; - pp->sop_control = NULL; - pp->sop_remote = NULL; - pp->sop_riding = NULL; - pp->sop = NULL; + pp->sop_control = nullptr; + pp->sop_remote = nullptr; + pp->sop_riding = nullptr; + pp->sop = nullptr; RESET(pp->Flags, PF_TWO_UZI); NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Run); @@ -6171,10 +6171,10 @@ void DoPlayerDeathCheckKeys(PLAYERp pp) DoPlayerZrange(pp); - pp->sop_control = NULL; - pp->sop_remote = NULL; - pp->sop_riding = NULL; - pp->sop = NULL; + pp->sop_control = nullptr; + pp->sop_remote = nullptr; + pp->sop_riding = nullptr; + pp->sop = nullptr; RESET(pp->Flags, PF_WEAPON_DOWN|PF_WEAPON_RETRACT); RESET(pp->Flags, PF_DEAD); @@ -6285,10 +6285,10 @@ SPRITEp DoPlayerDeathCheckKick(PLAYERp pp) NewStateGroup(pp->PlayerSprite, sg_PlayerHeadFly); SET(pp->Flags, PF_JUMPING); SpawnShrap(pp->PlayerSprite, -1); - return NULL; + return nullptr; } - return NULL; + return nullptr; } @@ -6772,7 +6772,7 @@ PlayerStateControl(int16_t SpriteNum) // Convienience var u = User[SpriteNum].Data(); - if (u == NULL) + if (u == nullptr) return; u->Tics += synctics; @@ -6863,7 +6863,7 @@ MoveSkipSavePos(void) sp = &sprite[i]; u = User[i].Data(); - if (sp == NULL || u == NULL) + if (sp == nullptr || u == nullptr) continue; sp->backuppos(); @@ -6887,7 +6887,7 @@ MoveSkipSavePos(void) sp = &sprite[i]; u = User[i].Data(); - if (sp == NULL || u == NULL) + if (sp == nullptr || u == nullptr) continue; sp->backuppos(); u->oz = sp->oz; @@ -7438,7 +7438,7 @@ InitMultiPlayerInfo(void) continue; } - start0 = SpawnSprite(MultiStatList[stat], ST1, NULL, pp->cursectnum, pp->posx, pp->posy, pp->posz, pp->angle.ang.asbuild(), 0); + start0 = SpawnSprite(MultiStatList[stat], ST1, nullptr, pp->cursectnum, pp->posx, pp->posy, pp->posz, pp->angle.ang.asbuild(), 0); ASSERT(start0 >= 0); User[start0].Clear(); sprite[start0].picnum = ST1; diff --git a/source/games/sw/src/quake.cpp b/source/games/sw/src/quake.cpp index caa3b0138..f27670438 100644 --- a/source/games/sw/src/quake.cpp +++ b/source/games/sw/src/quake.cpp @@ -180,7 +180,7 @@ void QuakeViewChange(PLAYERp pp, int *z_diff, int *x_diff, int *y_diff, short *a { int i; SPRITEp sp; - SPRITEp save_sp = NULL; + SPRITEp save_sp = nullptr; int dist,save_dist = 999999; int dist_diff, scale_value; int ang_amt; @@ -368,7 +368,7 @@ saveable_module saveable_quake = SIZ(saveable_quake_code), // data - NULL,0 + nullptr,0 }; END_SW_NS diff --git a/source/games/sw/src/ripper.cpp b/source/games/sw/src/ripper.cpp index 2ec0e154e..e2f7f79a3 100644 --- a/source/games/sw/src/ripper.cpp +++ b/source/games/sw/src/ripper.cpp @@ -77,7 +77,7 @@ DECISION RipperSurprised[] = DECISION RipperEvasive[] = { {6, InitRipperHang}, - {1024, NULL} + {1024, nullptr} }; DECISION RipperLostTarget[] = @@ -765,16 +765,16 @@ ACTOR_ACTION_SET RipperActionSet = sg_RipperRun, sg_RipperJump, sg_RipperFall, - NULL, // sg_RipperCrawl, - NULL, // sg_RipperSwim, - NULL, // sg_RipperFly, - NULL, // sg_RipperRise, - NULL, // sg_RipperSit, - NULL, // sg_RipperLook, - NULL, // climb + nullptr, // sg_RipperCrawl, + nullptr, // sg_RipperSwim, + nullptr, // sg_RipperFly, + nullptr, // sg_RipperRise, + nullptr, // sg_RipperSit, + nullptr, // sg_RipperLook, + nullptr, // climb sg_RipperPain, sg_RipperDie, - NULL, // sg_RipperHariKari, + nullptr, // sg_RipperHariKari, sg_RipperDead, sg_RipperDeathJump, sg_RipperDeathFall, @@ -783,8 +783,8 @@ ACTOR_ACTION_SET RipperActionSet = {sg_RipperJumpAttack, sg_RipperSpew}, {400, 1024}, {sg_RipperHeart, sg_RipperHang}, - NULL, - NULL + nullptr, + nullptr }; ACTOR_ACTION_SET RipperBrownActionSet = @@ -793,16 +793,16 @@ ACTOR_ACTION_SET RipperBrownActionSet = sg_RipperRun, sg_RipperJump, sg_RipperFall, - NULL, // sg_RipperCrawl, - NULL, // sg_RipperSwim, - NULL, // sg_RipperFly, - NULL, // sg_RipperRise, - NULL, // sg_RipperSit, - NULL, // sg_RipperLook, - NULL, // climb + nullptr, // sg_RipperCrawl, + nullptr, // sg_RipperSwim, + nullptr, // sg_RipperFly, + nullptr, // sg_RipperRise, + nullptr, // sg_RipperSit, + nullptr, // sg_RipperLook, + nullptr, // climb sg_RipperPain, // pain sg_RipperDie, - NULL, // sg_RipperHariKari, + nullptr, // sg_RipperHariKari, sg_RipperDead, sg_RipperDeathJump, sg_RipperDeathFall, @@ -811,8 +811,8 @@ ACTOR_ACTION_SET RipperBrownActionSet = {sg_RipperJumpAttack, sg_RipperSwipe}, {800, 1024}, {sg_RipperHeart, sg_RipperHang}, - NULL, - NULL + nullptr, + nullptr }; int diff --git a/source/games/sw/src/ripper2.cpp b/source/games/sw/src/ripper2.cpp index ebd2d7867..4dc91fe88 100644 --- a/source/games/sw/src/ripper2.cpp +++ b/source/games/sw/src/ripper2.cpp @@ -835,16 +835,16 @@ ACTOR_ACTION_SET Ripper2ActionSet = sg_Ripper2Run, sg_Ripper2Jump, sg_Ripper2Fall, - NULL, // sg_Ripper2Crawl, - NULL, // sg_Ripper2Swim, - NULL, // sg_Ripper2Fly, - NULL, // sg_Ripper2Rise, - NULL, // sg_Ripper2Sit, - NULL, // sg_Ripper2Look, - NULL, // climb + nullptr, // sg_Ripper2Crawl, + nullptr, // sg_Ripper2Swim, + nullptr, // sg_Ripper2Fly, + nullptr, // sg_Ripper2Rise, + nullptr, // sg_Ripper2Sit, + nullptr, // sg_Ripper2Look, + nullptr, // climb sg_Ripper2Pain, sg_Ripper2Die, - NULL, // sg_Ripper2HariKari, + nullptr, // sg_Ripper2HariKari, sg_Ripper2Dead, sg_Ripper2DeathJump, sg_Ripper2DeathFall, @@ -853,8 +853,8 @@ ACTOR_ACTION_SET Ripper2ActionSet = {sg_Ripper2JumpAttack, sg_Ripper2Kong}, {500, 1024}, {sg_Ripper2Heart, sg_Ripper2Hang}, - NULL, - NULL + nullptr, + nullptr }; ACTOR_ACTION_SET Ripper2BrownActionSet = @@ -863,16 +863,16 @@ ACTOR_ACTION_SET Ripper2BrownActionSet = sg_Ripper2Run, sg_Ripper2Jump, sg_Ripper2Fall, - NULL, // sg_Ripper2Crawl, - NULL, // sg_Ripper2Swim, - NULL, // sg_Ripper2Fly, - NULL, // sg_Ripper2Rise, - NULL, // sg_Ripper2Sit, - NULL, // sg_Ripper2Look, - NULL, // climb + nullptr, // sg_Ripper2Crawl, + nullptr, // sg_Ripper2Swim, + nullptr, // sg_Ripper2Fly, + nullptr, // sg_Ripper2Rise, + nullptr, // sg_Ripper2Sit, + nullptr, // sg_Ripper2Look, + nullptr, // climb sg_Ripper2Pain, // pain sg_Ripper2Die, - NULL, // sg_Ripper2HariKari, + nullptr, // sg_Ripper2HariKari, sg_Ripper2Dead, sg_Ripper2DeathJump, sg_Ripper2DeathFall, @@ -881,8 +881,8 @@ ACTOR_ACTION_SET Ripper2BrownActionSet = {sg_Ripper2JumpAttack, sg_Ripper2Kong}, {400, 1024}, {sg_Ripper2Heart, sg_Ripper2Hang}, - NULL, - NULL + nullptr, + nullptr }; int diff --git a/source/games/sw/src/rooms.cpp b/source/games/sw/src/rooms.cpp index d41b205b6..35c3ae366 100644 --- a/source/games/sw/src/rooms.cpp +++ b/source/games/sw/src/rooms.cpp @@ -544,7 +544,7 @@ void FAFgetzrange(int32_t x, int32_t y, int32_t z, int16_t sectnum, if (uppersect < 0) return; // _ErrMsg(ERR_STD_ARG, "Did not find a sector at %d, %d, %d", x, y, newz); getzrange_old(x, y, newz, uppersect, hiz, ceilhit, &foo1, &foo2, clipdist, clipmask); - SectorZadjust(*ceilhit, hiz, -1, NULL); + SectorZadjust(*ceilhit, hiz, -1, nullptr); } else if (FAF_ConnectFloor(sectnum) && !TEST(sector[sectnum].floorstat, FLOOR_STAT_FAF_BLOCK_HITSCAN)) //if (FAF_ConnectFloor(sectnum)) @@ -566,7 +566,7 @@ void FAFgetzrange(int32_t x, int32_t y, int32_t z, int16_t sectnum, if (lowersect < 0) return; // _ErrMsg(ERR_STD_ARG, "Did not find a sector at %d, %d, %d", x, y, newz); getzrange_old(x, y, newz, lowersect, &foo1, &foo2, loz, florhit, clipdist, clipmask); - SectorZadjust(-1, NULL, *florhit, loz); + SectorZadjust(-1, nullptr, *florhit, loz); WaterAdjust(*florhit, loz); } } @@ -612,7 +612,7 @@ void FAFgetzrangepoint(int32_t x, int32_t y, int32_t z, int16_t sectnum, if (uppersect < 0) return; // _ErrMsg(ERR_STD_ARG, "Did not find a sector at %d, %d, %d, sectnum %d", x, y, newz, sectnum); getzrangepoint(x, y, newz, uppersect, hiz, ceilhit, &foo1, &foo2); - SectorZadjust(*ceilhit, hiz, -1, NULL); + SectorZadjust(*ceilhit, hiz, -1, nullptr); } else if (FAF_ConnectFloor(sectnum) && !TEST(sector[sectnum].floorstat, FLOOR_STAT_FAF_BLOCK_HITSCAN)) //if (FAF_ConnectFloor(sectnum)) @@ -628,7 +628,7 @@ void FAFgetzrangepoint(int32_t x, int32_t y, int32_t z, int16_t sectnum, if (lowersect < 0) return; // _ErrMsg(ERR_STD_ARG, "Did not find a sector at %d, %d, %d, sectnum %d", x, y, newz, sectnum); getzrangepoint(x, y, newz, lowersect, &foo1, &foo2, loz, florhit); - SectorZadjust(-1, NULL, *florhit, loz); + SectorZadjust(-1, nullptr, *florhit, loz); WaterAdjust(*florhit, loz); } } @@ -791,7 +791,7 @@ FindCeilingView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum int xoff = 0; int yoff = 0; int i; - SPRITEp sp = NULL; + SPRITEp sp = nullptr; int pix_diff; int newz; @@ -888,7 +888,7 @@ FindFloorView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum) int xoff = 0; int yoff = 0; int i; - SPRITEp sp = NULL; + SPRITEp sp = nullptr; int newz; int pix_diff; diff --git a/source/games/sw/src/rotator.cpp b/source/games/sw/src/rotator.cpp index 91522732e..3802628e4 100644 --- a/source/games/sw/src/rotator.cpp +++ b/source/games/sw/src/rotator.cpp @@ -314,7 +314,7 @@ int DoRotatorMove(short SpriteNum) SPRITEp sp = u->SpriteP; ROTATORp r; short ndx,w,startwall,endwall; - SPRITEp pivot = NULL; + SPRITEp pivot = nullptr; int i; vec2_t nxy; int dist,closest; @@ -358,7 +358,7 @@ int DoRotatorMove(short SpriteNum) SetRotatorInactive(SpriteNum); if (SP_TAG6(sp)) - DoMatchEverything(NULL, SP_TAG6(sp), -1); + DoMatchEverything(nullptr, SP_TAG6(sp), -1); // wait a bit and close it if (u->WaitTics) @@ -385,7 +385,7 @@ int DoRotatorMove(short SpriteNum) } if (SP_TAG6(sp) && TEST_BOOL5(sp)) - DoMatchEverything(NULL, SP_TAG6(sp), -1); + DoMatchEverything(nullptr, SP_TAG6(sp), -1); } if (TEST_BOOL2(sp)) @@ -468,7 +468,7 @@ saveable_module saveable_rotator = SIZ(saveable_rotator_code), // data - NULL,0 + nullptr,0 }; END_SW_NS diff --git a/source/games/sw/src/saveable.cpp b/source/games/sw/src/saveable.cpp index 85917d0e5..be891730e 100644 --- a/source/games/sw/src/saveable.cpp +++ b/source/games/sw/src/saveable.cpp @@ -145,7 +145,7 @@ int Saveable_RestoreCodeSym(savedcodesym *sym, void **ptr) { if (sym->module == 0) { - *ptr = NULL; + *ptr = nullptr; return 0; } @@ -169,7 +169,7 @@ int Saveable_RestoreDataSym(saveddatasym *sym, void **ptr) { if (sym->module == 0) { - *ptr = NULL; + *ptr = nullptr; return 0; } diff --git a/source/games/sw/src/scrip2.cpp b/source/games/sw/src/scrip2.cpp index fc619ac5d..5f316c9fa 100644 --- a/source/games/sw/src/scrip2.cpp +++ b/source/games/sw/src/scrip2.cpp @@ -242,7 +242,7 @@ void LoadKVXFromScript(const char* filename) } while (script_p < scriptend_p); - script_p = NULL; + script_p = nullptr; } /* diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 0ad5cf85c..5ac53e495 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -382,12 +382,12 @@ SectorSetup(void) { memset(&SectorObject[ndx], -1, sizeof(SectorObject[0])); // 0 pointers - //memset(&SectorObject[ndx].sectp, NULL, sizeof(SectorObject[0].sectp)); - SectorObject[ndx].PreMoveAnimator = NULL; - SectorObject[ndx].PostMoveAnimator = NULL; - SectorObject[ndx].Animator = NULL; - SectorObject[ndx].controller = NULL; - SectorObject[ndx].sp_child = NULL; + //memset(&SectorObject[ndx].sectp, nullptr, sizeof(SectorObject[0].sectp)); + SectorObject[ndx].PreMoveAnimator = nullptr; + SectorObject[ndx].PostMoveAnimator = nullptr; + SectorObject[ndx].Animator = nullptr; + SectorObject[ndx].controller = nullptr; + SectorObject[ndx].sp_child = nullptr; SectorObject[ndx].xmid = INT32_MAX; } @@ -1083,7 +1083,7 @@ DoExplodeSector(short match) continue; if (!User[cf].Data()) - /*u = */SpawnUser(cf, 0, NULL); + /*u = */SpawnUser(cf, 0, nullptr); sectp = §or[esp->sectnum]; @@ -1429,7 +1429,7 @@ WeaponExplodeSectorInRange(short weapon) // don't use them KillMatchingCrackSprites(match); DoExplodeSector(match); - DoMatchEverything(NULL, match, -1); + DoMatchEverything(nullptr, match, -1); #else // pass in explosion type MissileHitMatch(weapon, WPN_ROCKET, i); @@ -1592,7 +1592,7 @@ void DoMatchEverything(PLAYERp pp, short match, short state) bak = GlobPlayerP; GlobPlayerP = pp; - // CAREFUL! pp == NULL is a valid case for this routine + // CAREFUL! pp == nullptr is a valid case for this routine DoStopSoundSpotMatch(match); DoSoundSpotMatch(match, 1, SOUND_EVERYTHING_TYPE); GlobPlayerP = bak; @@ -1669,7 +1669,7 @@ OperateSprite(short SpriteNum, short player_is_operating) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum].Data(); - PLAYERp pp = NULL; + PLAYERp pp = nullptr; short state; short key_num=0; extern STATE s_Pachinko1Operate[]; @@ -1925,7 +1925,7 @@ OperateSprite(short SpriteNum, short player_is_operating) change_sprite_stat(SpriteNum, STAT_NO_STATE); - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); u->ActorActionFunc = DoGrating; @@ -1951,7 +1951,7 @@ OperateSprite(short SpriteNum, short player_is_operating) { state = AnimateSwitch(sp, -1); - DoMatchEverything(NULL, sp->hitag, state); + DoMatchEverything(nullptr, sp->hitag, state); sp->hitag = 0; sp->lotag = 0; @@ -2185,13 +2185,13 @@ OperateTripTrigger(PLAYERp pp) case TAG_TRIGGER_EXPLODING_SECTOR: { - DoMatchEverything(NULL, sector[pp->cursectnum].hitag, -1); + DoMatchEverything(nullptr, sector[pp->cursectnum].hitag, -1); break; } case TAG_SPAWN_ACTOR_TRIGGER: { - DoMatchEverything(NULL, sector[pp->cursectnum].hitag, -1); + DoMatchEverything(nullptr, sector[pp->cursectnum].hitag, -1); sector[pp->cursectnum].hitag = 0; sector[pp->cursectnum].lotag = 0; @@ -2200,7 +2200,7 @@ OperateTripTrigger(PLAYERp pp) case TAG_SO_EVENT_TRIGGER: { - DoMatchEverything(NULL, sector[pp->cursectnum].hitag, -1); + DoMatchEverything(nullptr, sector[pp->cursectnum].hitag, -1); sector[pp->cursectnum].hitag = 0; sector[pp->cursectnum].lotag = 0; @@ -2316,7 +2316,7 @@ bool NearThings(PLAYERp pp) neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, pp->angle.ang.asbuild(), &neartagsect, &neartagwall, &neartagsprite, - &neartaghitdist, 1024L, NTAG_SEARCH_LO_HI, NULL); + &neartaghitdist, 1024L, NTAG_SEARCH_LO_HI, nullptr); // hit a sprite? Check to see if it has sound info in it! @@ -2414,7 +2414,7 @@ NearTagList(NEAR_TAG_INFOp ntip, PLAYERp pp, int z, int dist, int type, int coun neartag(pp->posx, pp->posy, z, pp->cursectnum, pp->angle.ang.asbuild(), &neartagsector, &neartagwall, &neartagsprite, - &neartaghitdist, dist, type, NULL); + &neartaghitdist, dist, type, nullptr); if (neartagsector >= 0) { @@ -2518,7 +2518,7 @@ BuildNearTagList(NEAR_TAG_INFOp ntip, int size, PLAYERp pp, int z, int dist, int int DoPlayerGrabStar(PLAYERp pp) { - SPRITEp sp = NULL; + SPRITEp sp = nullptr; int i; extern short StarQueue[MAX_STAR_QUEUE]; @@ -2878,7 +2878,7 @@ DoAnim(int numtics) { ANIM_CALLBACKp acp = Anim[i].callback; - // do a callback when done if not NULL + // do a callback when done if not nullptr if (Anim[i].callback) (*Anim[i].callback)(&Anim[i], Anim[i].callbackdata); @@ -2991,8 +2991,8 @@ AnimSet(int animtype, int animindex, fixed_t thegoal, int thevel) Anim[j].goal = thegoal; Anim[j].vel = Z(thevel); Anim[j].vel_adj = 0; - Anim[j].callback = NULL; - Anim[j].callbackdata = NULL; + Anim[j].callback = nullptr; + Anim[j].callbackdata = nullptr; if (j == AnimCnt) AnimCnt++; @@ -3271,7 +3271,7 @@ DoSector(void) if (pp->sop_riding == sop) { riding = true; - pp->sop_riding = NULL; + pp->sop_riding = nullptr; break; } else @@ -3422,7 +3422,7 @@ saveable_module saveable_sector = SIZ(saveable_sector_code), // data - NULL, + nullptr, 0 }; diff --git a/source/games/sw/src/serp.cpp b/source/games/sw/src/serp.cpp index e905cc8ea..e6920c2e1 100644 --- a/source/games/sw/src/serp.cpp +++ b/source/games/sw/src/serp.cpp @@ -70,7 +70,7 @@ DECISION SerpSurprised[] = DECISION SerpEvasive[] = { {10, InitActorEvade }, - {1024, NULL } + {1024, nullptr } }; DECISION SerpLostTarget[] = @@ -671,28 +671,28 @@ ACTOR_ACTION_SET SerpActionSet = { sg_SerpStand, sg_SerpRun, - NULL, //sg_SerpJump, - NULL, //sg_SerpFall, - NULL, //sg_SerpCrawl, - NULL, //sg_SerpSwim, - NULL, //sg_SerpFly, - NULL, //sg_SerpRise, - NULL, //sg_SerpSit, - NULL, //sg_SerpLook, - NULL, //climb - NULL, //pain + nullptr, //sg_SerpJump, + nullptr, //sg_SerpFall, + nullptr, //sg_SerpCrawl, + nullptr, //sg_SerpSwim, + nullptr, //sg_SerpFly, + nullptr, //sg_SerpRise, + nullptr, //sg_SerpSit, + nullptr, //sg_SerpLook, + nullptr, //climb + nullptr, //pain sg_SerpDie, - NULL, //sg_SerpHariKari, + nullptr, //sg_SerpHariKari, sg_SerpDead, - NULL, //sg_SerpDeathJump, - NULL, //sg_SerpDeathFall, + nullptr, //sg_SerpDeathJump, + nullptr, //sg_SerpDeathFall, {sg_SerpSlash}, {1024}, {sg_SerpSlash, sg_SerpSpell, sg_SerpRapidSpell, sg_SerpRapidSpell}, {256, 724, 900, 1024}, - {NULL}, - NULL, - NULL + {nullptr}, + nullptr, + nullptr }; int @@ -812,7 +812,7 @@ int DoDeathSpecial(short SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; - DoMatchEverything(NULL, sp->lotag, ON); + DoMatchEverything(nullptr, sp->lotag, ON); if (!SW_SHAREWARE) { diff --git a/source/games/sw/src/skel.cpp b/source/games/sw/src/skel.cpp index 114f1a774..85ac5d723 100644 --- a/source/games/sw/src/skel.cpp +++ b/source/games/sw/src/skel.cpp @@ -66,7 +66,7 @@ DECISION SkelEvasive[] = { {22, InitActorDuck }, {30, InitActorEvade }, - {1024, NULL }, + {1024, nullptr }, }; DECISION SkelLostTarget[] = @@ -476,28 +476,28 @@ ACTOR_ACTION_SET SkelActionSet = { sg_SkelStand, sg_SkelRun, - NULL, //sg_SkelJump, - NULL, //sg_SkelFall, - NULL, //sg_SkelCrawl, - NULL, //sg_SkelSwim, - NULL, //sg_SkelFly, - NULL, //sg_SkelRise, - NULL, //sg_SkelSit, - NULL, //sg_SkelLook, - NULL, //climb + nullptr, //sg_SkelJump, + nullptr, //sg_SkelFall, + nullptr, //sg_SkelCrawl, + nullptr, //sg_SkelSwim, + nullptr, //sg_SkelFly, + nullptr, //sg_SkelRise, + nullptr, //sg_SkelSit, + nullptr, //sg_SkelLook, + nullptr, //climb sg_SkelPain, //pain sg_SkelDie, - NULL, //sg_SkelHariKari, - NULL, //sg_SkelDead, - NULL, //sg_SkelDeathJump, - NULL, //sg_SkelDeathFall, + nullptr, //sg_SkelHariKari, + nullptr, //sg_SkelDead, + nullptr, //sg_SkelDeathJump, + nullptr, //sg_SkelDeathFall, {sg_SkelSlash}, {1024}, {sg_SkelSpell}, {1024}, - {NULL}, + {nullptr}, sg_SkelTeleport, - NULL + nullptr }; int diff --git a/source/games/sw/src/skull.cpp b/source/games/sw/src/skull.cpp index 3b8ac043b..80492f5fd 100644 --- a/source/games/sw/src/skull.cpp +++ b/source/games/sw/src/skull.cpp @@ -236,7 +236,7 @@ SetupSkull(short SpriteNum) u->ID = SKULL_R0; - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); sp->clipdist = (128+64) >> 2; SET(u->Flags, SPR_XFLIP_TOGGLE); SET(sp->cstat, CSTAT_SPRITE_YCENTER); @@ -654,7 +654,7 @@ SetupBetty(short SpriteNum) u->ID = BETTY_R0; - EnemyDefaults(SpriteNum, NULL, NULL); + EnemyDefaults(SpriteNum, nullptr, nullptr); sp->clipdist = (128+64) >> 2; SET(u->Flags, SPR_XFLIP_TOGGLE); SET(sp->cstat, CSTAT_SPRITE_YCENTER); diff --git a/source/games/sw/src/slidor.cpp b/source/games/sw/src/slidor.cpp index a37589ab2..e1af5e972 100644 --- a/source/games/sw/src/slidor.cpp +++ b/source/games/sw/src/slidor.cpp @@ -583,7 +583,7 @@ int DoSlidorMove(short SpriteNum) SetSlidorInactive(SpriteNum); if (SP_TAG6(sp) && !TEST_BOOL8(sp)) - DoMatchEverything(NULL, SP_TAG6(sp), -1); + DoMatchEverything(nullptr, SP_TAG6(sp), -1); // wait a bit and close it if (u->WaitTics) @@ -612,7 +612,7 @@ int DoSlidorMove(short SpriteNum) } if (SP_TAG6(sp) && TEST_BOOL8(sp)) - DoMatchEverything(NULL, SP_TAG6(sp), -1); + DoMatchEverything(nullptr, SP_TAG6(sp), -1); } if (TEST_BOOL2(sp)) @@ -716,6 +716,6 @@ saveable_module saveable_slidor = SIZ(saveable_slidor_code), // data - NULL,0 + nullptr,0 }; END_SW_NS diff --git a/source/games/sw/src/sounds.cpp b/source/games/sw/src/sounds.cpp index 580b5faf9..b2ca4f8f1 100644 --- a/source/games/sw/src/sounds.cpp +++ b/source/games/sw/src/sounds.cpp @@ -455,9 +455,9 @@ public: void StopChannel(FSoundChan* chan) override { - if (chan && chan->SysChannel != NULL && !(chan->ChanFlags & CHANF_EVICTED) && chan->SourceType == SOURCE_Actor) + if (chan && chan->SysChannel != nullptr && !(chan->ChanFlags & CHANF_EVICTED) && chan->SourceType == SOURCE_Actor) { - chan->Source = NULL; + chan->Source = nullptr; chan->SourceType = SOURCE_Unattached; } SoundEngine::StopChannel(chan); diff --git a/source/games/sw/src/spike.cpp b/source/games/sw/src/spike.cpp index e49a46f86..64ab84c34 100644 --- a/source/games/sw/src/spike.cpp +++ b/source/games/sw/src/spike.cpp @@ -354,7 +354,7 @@ int DoSpike(short SpriteNum) SetSpikeInactive(SpriteNum); if (SP_TAG6(sp)) - DoMatchEverything(NULL, SP_TAG6(sp), -1); + DoMatchEverything(nullptr, SP_TAG6(sp), -1); } else // in the OFF position @@ -377,7 +377,7 @@ int DoSpike(short SpriteNum) } if (SP_TAG6(sp) && TEST_BOOL5(sp)) - DoMatchEverything(NULL, SP_TAG6(sp), -1); + DoMatchEverything(nullptr, SP_TAG6(sp), -1); } // operate only once @@ -466,7 +466,7 @@ int DoSpikeAuto(short SpriteNum) u->Tics = u->WaitTics; if (SP_TAG6(sp)) - DoMatchEverything(NULL, SP_TAG6(sp), -1); + DoMatchEverything(nullptr, SP_TAG6(sp), -1); } else // in the DOWN position @@ -479,7 +479,7 @@ int DoSpikeAuto(short SpriteNum) u->Tics = u->WaitTics; if (SP_TAG6(sp) && TEST_BOOL5(sp)) - DoMatchEverything(NULL, SP_TAG6(sp), -1); + DoMatchEverything(nullptr, SP_TAG6(sp), -1); } } @@ -512,6 +512,6 @@ saveable_module saveable_spike = SIZ(saveable_spike_code), // data - NULL,0 + nullptr,0 }; END_SW_NS diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index eb7810072..9203187e3 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -767,7 +767,7 @@ KillSprite(int16_t SpriteNum) StatIterator it(STAT_ENEMY); while ((i = it.NextIndex()) >= 0) { - if ((unsigned)i < MAXSPRITES && User[i].Data() != NULL && User[i]->tgt_sp == sp) + if ((unsigned)i < MAXSPRITES && User[i].Data() != nullptr && User[i]->tgt_sp == sp) { DoActorPickClosePlayer(i); } @@ -875,9 +875,9 @@ SpawnUser(short SpriteNum, short id, STATEp state) User[SpriteNum].Alloc(); u = User[SpriteNum].Data(); - PRODUCTION_ASSERT(u != NULL); + PRODUCTION_ASSERT(u != nullptr); - // be careful State can be NULL + // be careful State can be nullptr u->State = u->StateStart = state; change_sprite_stat(SpriteNum, sp->statnum); @@ -919,8 +919,8 @@ SpawnUser(short SpriteNum, short id, STATEp state) #else u->loz = sector[sp->sectnum].floorz; u->hiz = sector[sp->sectnum].ceilingz; - u->lo_sp = NULL; - u->hi_sp = NULL; + u->lo_sp = nullptr; + u->hi_sp = nullptr; u->lo_sectp = §or[sp->sectnum]; u->hi_sectp = §or[sp->sectnum]; #endif @@ -939,7 +939,7 @@ GetSectUser(short sectnum) SectUser[sectnum].Alloc(); sectu = SectUser[sectnum].Data(); - ASSERT(sectu != NULL); + ASSERT(sectu != nullptr); return sectu; } @@ -973,7 +973,7 @@ SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, int y, int u = SpawnUser(SpriteNum, id, state); - // be careful State can be NULL + // be careful State can be nullptr if (u->State) { sp->picnum = u->State->Pic; @@ -1789,7 +1789,7 @@ SpriteSetupPost(void) if (labs(ds->z - fz) > Z(4)) continue; - u = SpawnUser(i, 0, NULL); + u = SpawnUser(i, 0, nullptr); change_sprite_stat(i, STAT_NO_STATE); u->ceiling_dist = Z(4); u->floor_dist = -Z(2); @@ -2265,9 +2265,9 @@ SpriteSetup(void) { ANIMATOR DoGenerateSewerDebris; - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); - ASSERT(u != NULL); + ASSERT(u != nullptr); u->RotNum = 0; u->WaitTics = sp->lotag * 120; @@ -2283,7 +2283,7 @@ SpriteSetup(void) SECTORp sectp = §or[sp->sectnum]; SECT_USERp sectu; short speed,vel,time,type,start_on,floor_vator; - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); // vator already set - ceiling AND floor vator if (TEST(sectp->extra, SECTFX_VATOR)) @@ -2393,7 +2393,7 @@ SpriteSetup(void) SECTORp sectp = §or[sp->sectnum]; short time,type; short wallcount,startwall,endwall,w; - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, true, true); @@ -2454,7 +2454,7 @@ SpriteSetup(void) SECTORp sectp = §or[sp->sectnum]; short time,type; - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, true, true); @@ -2505,7 +2505,7 @@ SpriteSetup(void) { short speed,vel,time,type,start_on,floor_vator; int floorz,ceilingz,trash; - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, false, true); SET(sector[sp->sectnum].extra, SECTFX_DYNAMIC_AREA); @@ -2618,7 +2618,7 @@ SpriteSetup(void) } } - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); u->WallShade.Resize(wallcount); wall_shade = u->WallShade.Data(); @@ -2674,7 +2674,7 @@ SpriteSetup(void) // !LIGHT // make an wall_shade array and put it in User - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); u->WallShade.Resize(wallcount); wall_shade = u->WallShade.Data(); @@ -2723,7 +2723,7 @@ SpriteSetup(void) case LAVA_ERUPT: { - u = SpawnUser(SpriteNum, ST1, NULL); + u = SpawnUser(SpriteNum, ST1, nullptr); change_sprite_stat(SpriteNum, STAT_NO_STATE); u->ActorActionFunc = DoLavaErupt; @@ -2883,7 +2883,7 @@ SpriteSetup(void) case SPAWN_SPOT: if (!User[SpriteNum].Data()) - u = SpawnUser(SpriteNum, ST1, NULL); + u = SpawnUser(SpriteNum, ST1, nullptr); if (SP_TAG14(sp) == ((64<<8)|64)) //SP_TAG14(sp) = 0; @@ -3002,7 +3002,7 @@ SpriteSetup(void) case BOLT_TRAP: case SPEAR_TRAP: { - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); sp->owner = -1; change_sprite_stat(SpriteNum, STAT_TRAP); break; @@ -3140,9 +3140,9 @@ KeyMain: break; } - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); - ASSERT(u != NULL); + ASSERT(u != nullptr); sprite[SpriteNum].picnum = u->ID = sprite[SpriteNum].picnum; u->spal = sprite[SpriteNum].pal; // Set the palette from build @@ -3178,9 +3178,9 @@ KeyMain: num = 3; KeyStatueMain: - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); - ASSERT(u != NULL); + ASSERT(u != nullptr); sprite[SpriteNum].picnum = u->ID = sprite[SpriteNum].picnum; u->spal = sp->pal; @@ -3212,7 +3212,7 @@ KeyStatueMain: case FIRE_FLY0: /* - * u = SpawnUser(SpriteNum, FIRE_FLY0, NULL); + * u = SpawnUser(SpriteNum, FIRE_FLY0, nullptr); * * u->State = u->StateStart = &s_FireFly[0]; u->RotNum = 0; * @@ -3727,7 +3727,7 @@ NUKE_REPLACEMENT: case 3143: case 3157: { - u = SpawnUser(SpriteNum, sp->picnum, NULL); + u = SpawnUser(SpriteNum, sp->picnum, nullptr); change_sprite_stat(SpriteNum, STAT_STATIC_FIRE); @@ -3748,7 +3748,7 @@ NUKE_REPLACEMENT: case BLADE3: case 5011: { - u = SpawnUser(SpriteNum, sp->picnum, NULL); + u = SpawnUser(SpriteNum, sp->picnum, nullptr); change_sprite_stat(SpriteNum, STAT_DEFAULT); @@ -3769,7 +3769,7 @@ NUKE_REPLACEMENT: //if (TEST(sp->extra, SPRX_BREAKABLE)) // break; - u = SpawnUser(SpriteNum, sp->picnum, NULL); + u = SpawnUser(SpriteNum, sp->picnum, nullptr); sp->clipdist = SPRITEp_SIZE_X(sp); SET(sp->cstat, CSTAT_SPRITE_BREAKABLE); @@ -4610,7 +4610,7 @@ int SpawnItemsMatch(short match) sp = &sprite[SpriteNum]; - ASSERT(u != NULL); + ASSERT(u != nullptr); sprite[SpriteNum].picnum = u->ID = s_Key[num]->Pic; @@ -4880,8 +4880,8 @@ DoActorZrange(short SpriteNum) FAFgetzrange(sp->x, sp->y, sp->z - DIV2(SPRITEp_SIZE_Z(sp)), sp->sectnum, &u->hiz, &ceilhit, &u->loz, &florhit, (((int) sp->clipdist) << 2) - GETZRANGE_CLIP_ADJ, CLIPMASK_ACTOR); SET(sp->cstat, save_cstat); - u->lo_sectp = u->hi_sectp = NULL; - u->lo_sp = u->hi_sp = NULL; + u->lo_sectp = u->hi_sectp = nullptr; + u->lo_sp = u->hi_sp = nullptr; switch (TEST(ceilhit, HIT_MASK)) { @@ -4921,8 +4921,8 @@ DoActorGlobZ(short SpriteNum) u->loz = globloz; u->hiz = globhiz; - u->lo_sectp = u->hi_sectp = NULL; - u->lo_sp = u->hi_sp = NULL; + u->lo_sectp = u->hi_sectp = nullptr; + u->lo_sp = u->hi_sp = nullptr; switch (TEST(globhihit, HIT_MASK)) { @@ -6720,11 +6720,11 @@ SpriteControl(void) u = User[i].Data(); sp = User[i]->SpriteP; STATE_CONTROL(i, sp, u, StateTics) - // ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()] != NULL : true); + // ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()] != nullptr : true); #else ASSERT(User[i]); StateControl(i); - // ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()] != NULL : true); + // ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()] != nullptr : true); #endif } @@ -6741,11 +6741,11 @@ SpriteControl(void) u = User[i].Data(); sp = User[i]->SpriteP; STATE_CONTROL(i, sp, u, StateTics) - ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != NULL : true); + ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != nullptr : true); #else ASSERT(User[i]); StateControl(i); - ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()] != NULL : true); + ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()] != nullptr : true); #endif } } @@ -6793,7 +6793,7 @@ SpriteControl(void) #else StateControl(i); #endif - ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != NULL : true); + ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != nullptr : true); } else { @@ -6816,11 +6816,11 @@ SpriteControl(void) u = User[i].Data(); sp = User[i]->SpriteP; STATE_CONTROL(i, sp, u, StateTics) - ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != NULL : true); + ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != nullptr : true); #else ASSERT(User[i]); StateControl(i); - ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != NULL : true); + ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != nullptr : true); #endif } } @@ -6854,7 +6854,7 @@ SpriteControl(void) u = User[i].Data(); sp = User[i]->SpriteP; STATE_CONTROL(i, sp, u, StateTics) - ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != NULL : true); + ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != nullptr : true); } } @@ -7461,7 +7461,7 @@ move_ground_missile(short spritenum, int xchange, int ychange, int ceildist, int getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz); u->hi_sectp = u->lo_sectp = §or[sp->sectnum]; - u->hi_sp = u->lo_sp = NULL; + u->hi_sp = u->lo_sp = nullptr; return retval; } else @@ -7488,7 +7488,7 @@ move_ground_missile(short spritenum, int xchange, int ychange, int ceildist, int getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz); u->hi_sectp = u->lo_sectp = §or[sp->sectnum]; - u->hi_sp = u->lo_sp = NULL; + u->hi_sp = u->lo_sp = nullptr; sp->z = u->loz - Z(8); if (labs(u->hiz - u->loz) < Z(12)) diff --git a/source/games/sw/src/sumo.cpp b/source/games/sw/src/sumo.cpp index f6c8d9c27..19fed1605 100644 --- a/source/games/sw/src/sumo.cpp +++ b/source/games/sw/src/sumo.cpp @@ -574,56 +574,56 @@ ACTOR_ACTION_SET SumoActionSet = { sg_SumoStand, sg_SumoRun, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, //climb + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, //climb sg_SumoPain, //pain sg_SumoDie, - NULL, + nullptr, sg_SumoDead, - NULL, - NULL, + nullptr, + nullptr, {sg_SumoStomp,sg_SumoFart}, {800,1024}, {sg_SumoClap,sg_SumoStomp,sg_SumoFart}, {400,750,1024}, - {NULL}, - NULL, - NULL + {nullptr}, + nullptr, + nullptr }; ACTOR_ACTION_SET MiniSumoActionSet = { sg_SumoStand, sg_SumoRun, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, //climb + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, //climb sg_SumoPain, //pain sg_SumoDie, - NULL, + nullptr, sg_SumoDead, - NULL, - NULL, + nullptr, + nullptr, {sg_SumoClap}, {1024}, {sg_SumoClap}, {1024}, - {NULL}, - NULL, - NULL + {nullptr}, + nullptr, + nullptr }; @@ -793,7 +793,7 @@ int DoSumoDeathMelt(short SpriteNum) InitChemBomb(SpriteNum); u->ID = 0; - DoMatchEverything(NULL, sp->lotag, ON); + DoMatchEverything(nullptr, sp->lotag, ON); if (!SW_SHAREWARE) { // Resume the regular music - in a hack-free fashion. diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index 16e15c477..0321a6441 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -135,8 +135,8 @@ ActorFindTrack(short SpriteNum, int8_t player_dir, int track_type, short *track_ short i; short end_point[2] = {0,0}; - TRACKp t, near_track = NULL; - TRACK_POINTp tp, near_tp = NULL; + TRACKp t, near_track = nullptr; + TRACK_POINTp tp, near_tp = nullptr; #define TOWARD_PLAYER 1 #define AWAY_FROM_PLAYER -1 @@ -439,7 +439,7 @@ void QuickScanSetup(short stat, short lotag, short type) // save space for 3 points Track[ndx].SetTrackSize(4); - ASSERT(Track[ndx].TrackPoint != NULL); + ASSERT(Track[ndx].TrackPoint != nullptr); tp = Track[ndx].TrackPoint; t = &Track[ndx]; @@ -499,7 +499,7 @@ void QuickExitSetup(short stat, short type) // save space for 3 points Track[ndx].SetTrackSize(4); - ASSERT(Track[ndx].TrackPoint != NULL); + ASSERT(Track[ndx].TrackPoint != nullptr); tp = Track[ndx].TrackPoint; t = &Track[ndx]; @@ -554,7 +554,7 @@ void QuickLadderSetup(short stat, short lotag, short type) // save space for 3 points Track[ndx].SetTrackSize(4); - ASSERT(Track[ndx].TrackPoint != NULL); + ASSERT(Track[ndx].TrackPoint != nullptr); tp = Track[ndx].TrackPoint; t = &Track[ndx]; @@ -611,13 +611,13 @@ TrackSetup(void) continue; } - ASSERT(Track[ndx].TrackPoint == NULL); + ASSERT(Track[ndx].TrackPoint == nullptr); // make the track array rather large. I'll resize it to correct size // later. Track[ndx].TrackPoint = (TRACK_POINTp)CallocMem(sizeof(TRACK_POINT) * 500, 1); - ASSERT(Track[ndx].TrackPoint != NULL); + ASSERT(Track[ndx].TrackPoint != nullptr); tp = Track[ndx].TrackPoint; t = &Track[ndx]; @@ -688,7 +688,7 @@ TrackSetup(void) FreeMem(Track[ndx].TrackPoint); Track[ndx].TrackPoint = New; - ASSERT(Track[ndx].TrackPoint != NULL); + ASSERT(Track[ndx].TrackPoint != nullptr); } QuickJumpSetup(STAT_QUICK_JUMP, TRACK_ACTOR_QUICK_JUMP, TT_JUMP_UP); @@ -717,7 +717,7 @@ FindBoundSprite(int tag) } } - return NULL; + return nullptr; } @@ -752,14 +752,14 @@ SectorObjectSetupBounds(SECTOR_OBJECTp sop) //DSPRINTF(ds,"tagnum %d, so num %d",500 + ((sop - SectorObject) * 5), sop - SectorObject); MONO_PRINT(ds); - ASSERT(BoundSprite != NULL); + ASSERT(BoundSprite != nullptr); xlow = BoundSprite->x; ylow = BoundSprite->y; KillSprite(short(BoundSprite - sprite)); BoundSprite = FindBoundSprite(501 + (int(sop - SectorObject) * 5)); - ASSERT(BoundSprite != NULL); + ASSERT(BoundSprite != nullptr); xhigh = BoundSprite->x; yhigh = BoundSprite->y; @@ -903,8 +903,8 @@ SectorObjectSetupBounds(SECTOR_OBJECTp sop) continue; } - if (User[sp_num].Data() == NULL) - u = SpawnUser(sp_num, 0, NULL); + if (User[sp_num].Data() == nullptr) + u = SpawnUser(sp_num, 0, nullptr); else u = User[sp_num].Data(); @@ -1107,9 +1107,9 @@ SetupSectorObject(short sectnum, short tag) sop->morph_xoff = 0; sop->morph_yoff = 0; - sop->PreMoveAnimator = NULL; - sop->PostMoveAnimator = NULL; - sop->Animator = NULL; + sop->PreMoveAnimator = nullptr; + sop->PostMoveAnimator = nullptr; + sop->Animator = nullptr; } switch (tag % 5) @@ -1125,7 +1125,7 @@ SetupSectorObject(short sectnum, short tag) sop->track = HIGH_TAG(sectnum); // spawn a sprite to make it easier to integrate with sprite routines - New = SpawnSprite(STAT_SO_SP_CHILD, 0, NULL, sectnum, + New = SpawnSprite(STAT_SO_SP_CHILD, 0, nullptr, sectnum, sop->xmid, sop->ymid, sop->zmid, 0, 0); sop->sp_child = &sprite[New]; u = User[New].Data(); @@ -1196,8 +1196,8 @@ SetupSectorObject(short sectnum, short tag) { USERp u; change_sprite_stat(SpriteNum, STAT_NO_STATE); - u = SpawnUser(SpriteNum, 0, NULL); - u->ActorActionFunc = NULL; + u = SpawnUser(SpriteNum, 0, nullptr); + u->ActorActionFunc = nullptr; } break; @@ -1463,7 +1463,7 @@ PlayerOnObject(short sectnum_match) } } - return NULL; + return nullptr; } @@ -1478,7 +1478,7 @@ PlaceSectorObjectsOnTracks(void) { int low_dist = 999999, dist; SECTOR_OBJECTp sop = &SectorObject[i]; - TRACK_POINTp tpoint = NULL; + TRACK_POINTp tpoint = nullptr; if (SO_EMPTY(sop)) continue; @@ -1550,7 +1550,7 @@ PlaceActorsOnTracks(void) short i, j, tag; SPRITEp sp; USERp u; - TRACK_POINTp tpoint = NULL; + TRACK_POINTp tpoint = nullptr; // place each actor on the track StatIterator it(STAT_ENEMY); @@ -2082,7 +2082,7 @@ DetectSectorObject(SECTORp sectph) } } - return NULL; + return nullptr; } SECTOR_OBJECTp @@ -2124,7 +2124,7 @@ DetectSectorObjectByWall(WALLp wph) } } - return NULL; + return nullptr; } @@ -2265,7 +2265,7 @@ void CallbackSOsink(ANIMp ap, void *data) su = GetSectUser(dest_sector); - ASSERT(su != NULL); + ASSERT(su != nullptr); ASSERT(GetSectUser(src_sector)); tgt_depth = FixedToInt((GetSectUser(src_sector))->depth_fixed); @@ -2416,11 +2416,11 @@ void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny) switch (tpoint->tag_low) { case TRACK_MATCH_EVERYTHING: - DoMatchEverything(NULL, tpoint->tag_high, -1); + DoMatchEverything(nullptr, tpoint->tag_high, -1); break; case TRACK_MATCH_EVERYTHING_ONCE: - DoMatchEverything(NULL, tpoint->tag_high, -1); + DoMatchEverything(nullptr, tpoint->tag_high, -1); tpoint->tag_low = 0; tpoint->tag_high = 0; break; @@ -2972,7 +2972,7 @@ DoAutoTurretObject(SECTOR_OBJECTp sop) if (u->Counter == 0) { - shootp = NULL; + shootp = nullptr; for (i = 0; sop->sp_num[i] != -1; i++) { if (sprite[sop->sp_num[i]].statnum == STAT_SO_SHOOT_POINT) @@ -3351,7 +3351,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum) { neartag(sp->x, sp->y, z[i], sp->sectnum, sp->ang, &nearsector, &nearwall, &nearsprite, - &nearhitdist, 1024L, NTAG_SEARCH_LO_HI, NULL); + &nearhitdist, 1024L, NTAG_SEARCH_LO_HI, nullptr); // //DSPRINTF(ds,"nearsector = %d, nearwall = %d, nearsprite = %d hitdist == %ld\n",nearsector,nearwall,nearsprite,nearhitdist); // MONO_PRINT(ds); @@ -3589,7 +3589,7 @@ ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum) neartag(sp->x, sp->y, SPRITEp_TOS(sp) - DIV2(SPRITEp_SIZE_Z(sp)), sp->sectnum, sp->ang, &hit_sect, &hit_wall, &hit_sprite, - &dist, 600L, NTAG_SEARCH_LO_HI, NULL); + &dist, 600L, NTAG_SEARCH_LO_HI, nullptr); if (hit_wall < 0) { @@ -3839,7 +3839,7 @@ saveable_module saveable_track = SIZ(saveable_track_code), // data - NULL,0 + nullptr,0 }; END_SW_NS diff --git a/source/games/sw/src/vator.cpp b/source/games/sw/src/vator.cpp index 6f239279d..7854d1e41 100644 --- a/source/games/sw/src/vator.cpp +++ b/source/games/sw/src/vator.cpp @@ -668,7 +668,7 @@ int DoVatorAuto(short SpriteNum) u->Tics = u->WaitTics; if (SP_TAG6(sp) && TEST_BOOL5(sp)) - DoMatchEverything(NULL, SP_TAG6(sp), -1); + DoMatchEverything(nullptr, SP_TAG6(sp), -1); } } @@ -701,6 +701,6 @@ saveable_module saveable_vator = SIZ(saveable_vator_code), // data - NULL,0 + nullptr,0 }; END_SW_NS diff --git a/source/games/sw/src/wallmove.cpp b/source/games/sw/src/wallmove.cpp index 0b0cd8bb6..d43303843 100644 --- a/source/games/sw/src/wallmove.cpp +++ b/source/games/sw/src/wallmove.cpp @@ -230,6 +230,6 @@ saveable_module saveable_wallmove = SIZ(saveable_wallmove_code), // data - NULL,0 + nullptr,0 }; END_SW_NS diff --git a/source/games/sw/src/warp.cpp b/source/games/sw/src/warp.cpp index 232e9dac9..0b4784e87 100644 --- a/source/games/sw/src/warp.cpp +++ b/source/games/sw/src/warp.cpp @@ -46,8 +46,8 @@ WarpPlaneSectorInfo(short sectnum, SPRITEp *sp_ceiling, SPRITEp *sp_floor) int i; SPRITEp sp; - *sp_floor = NULL; - *sp_ceiling = NULL; + *sp_floor = nullptr; + *sp_ceiling = nullptr; if (Prediction) return false; @@ -86,10 +86,10 @@ WarpPlane(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum) SPRITEp sp_floor, sp_ceiling; if (Prediction) - return NULL; + return nullptr; if (!WarpPlaneSectorInfo(*sectnum, &sp_ceiling, &sp_floor)) - return NULL; + return nullptr; if (sp_ceiling) { @@ -107,7 +107,7 @@ WarpPlane(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum) } } - return NULL; + return nullptr; } SPRITEp @@ -203,7 +203,7 @@ WarpToArea(SPRITEp sp_from, int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum } } - return NULL; + return nullptr; } //////////////////////////////////////////////////////////////////////////////// @@ -218,7 +218,7 @@ WarpSectorInfo(short sectnum, SPRITEp *sp_warp) int i; SPRITEp sp; - *sp_warp = NULL; + *sp_warp = nullptr; if (!TEST(sector[sectnum].extra, SECTFX_WARP_SECTOR)) return false; @@ -250,16 +250,16 @@ Warp(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum) SPRITEp sp_warp; if (Prediction) - return NULL; + return nullptr; if (!WarpSectorInfo(*sectnum, &sp_warp)) - return NULL; + return nullptr; if (sp_warp) { return WarpToArea(sp_warp, x, y, z, sectnum); } - return NULL; + return nullptr; } END_SW_NS diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index c3962b20b..34fe6e6ec 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -327,9 +327,9 @@ STATEp sg_RailPuff[] = #define LASER_PUFF_RATE 8 STATE s_LaserPuff[] = { - {LASER_PUFF + 0, LASER_PUFF_RATE, NULL, &s_LaserPuff[1]}, - //{LASER_PUFF + 1, LASER_PUFF_RATE, NULL, &s_LaserPuff[2]}, - //{LASER_PUFF + 2, LASER_PUFF_RATE, NULL, &s_LaserPuff[3]}, + {LASER_PUFF + 0, LASER_PUFF_RATE, nullptr, &s_LaserPuff[1]}, + //{LASER_PUFF + 1, LASER_PUFF_RATE, nullptr, &s_LaserPuff[2]}, + //{LASER_PUFF + 2, LASER_PUFF_RATE, nullptr, &s_LaserPuff[3]}, {LASER_PUFF + 0, 100, DoSuicide, &s_LaserPuff[0]} }; @@ -2658,7 +2658,7 @@ bool MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite) { if (TEST(wu->Flags2, SPR2_SO_MISSILE)) { - DoMatchEverything(NULL, hsp->hitag, -1); + DoMatchEverything(nullptr, hsp->hitag, -1); return true; } else @@ -2676,7 +2676,7 @@ bool MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite) case WPN_MICRO: case WPN_NAPALM: case WPN_ROCKET: - DoMatchEverything(NULL, hsp->hitag, -1); + DoMatchEverything(nullptr, hsp->hitag, -1); return true; } } @@ -2689,7 +2689,7 @@ bool MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite) case WPN_HOTHEAD: case WPN_NAPALM: case WPN_ROCKET: - DoMatchEverything(NULL, hsp->hitag, -1); + DoMatchEverything(nullptr, hsp->hitag, -1); return true; } } @@ -2704,7 +2704,7 @@ bool MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite) case WPN_ROCKET: case WPN_UZI: case WPN_SHOTGUN: - DoMatchEverything(NULL, hsp->hitag, -1); + DoMatchEverything(nullptr, hsp->hitag, -1); return true; } } @@ -2722,7 +2722,7 @@ bool MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite) case WPN_ROCKET: case WPN_UZI: case WPN_SHOTGUN: - DoMatchEverything(NULL, hsp->hitag, -1); + DoMatchEverything(nullptr, hsp->hitag, -1); return true; } } @@ -2894,7 +2894,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP GlassShrap[] = @@ -2902,7 +2902,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP WoodShrap[] = @@ -2910,7 +2910,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP StoneShrap[] = @@ -2918,7 +2918,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP PaperShrap[] = @@ -2926,7 +2926,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP MetalShrap[] = @@ -2934,7 +2934,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP MetalMix[] = @@ -2945,7 +2945,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP WoodMix[] = @@ -2956,7 +2956,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP PaperMix[] = @@ -2967,7 +2967,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP Marbels[] = @@ -2976,14 +2976,14 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,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}, - {NULL}, + {nullptr}, }; #endif @@ -2994,7 +2994,7 @@ SpawnShrap(short ParentNum, short Secondary) static SHRAP EMPShrap[] = { {s_EMPShrap, EMP, 1, Z_MID, 500, 1100, 300, 600, false, 128}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP StdShrap[] = @@ -3005,7 +3005,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP HeartAttackShrap[] = // fewer gibs because of the plasma fountain sprites @@ -3013,7 +3013,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP SkelGore[] = @@ -3025,7 +3025,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP UpperGore[] = @@ -3035,14 +3035,14 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; #endif @@ -3050,7 +3050,7 @@ SpawnShrap(short ParentNum, short Secondary) { {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP FlamingGore[] = @@ -3058,7 +3058,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; #if 0 @@ -3066,25 +3066,25 @@ SpawnShrap(short ParentNum, short Secondary) { {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}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAPp FireballExpShrap[] = @@ -3099,7 +3099,7 @@ SpawnShrap(short ParentNum, short Secondary) static SHRAP ElectroShrap[] = { {s_ElectroShrap, ELECTRO_SHARD, 12, Z_TOP, 200, 600, 100, 500, true, 2048}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; // state, id, num, zlevel, min_jspeed, max_jspeed, min_vel, max_vel, @@ -3107,13 +3107,13 @@ SpawnShrap(short ParentNum, short Secondary) static SHRAP LavaShrap1[] = { {s_GoreFlame, GORE_Drip, 1, Z_TOP, 400, 1400, 100, 400, true, 2048}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP *LavaShrapTable[] = @@ -3125,14 +3125,14 @@ SpawnShrap(short ParentNum, short Secondary) static SHRAP LavaBoulderShrap[] = { {s_LavaShard, LAVA_SHARD, 16, Z_MID, 400, 900, 200, 600, true, 2048}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; #endif @@ -3152,7 +3152,7 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; static SHRAP PlayerGoreFly[] = @@ -3163,14 +3163,14 @@ SpawnShrap(short ParentNum, short Secondary) {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}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; // state, id, num, zlevel, min_jspeed, max_jspeed, min_vel, max_vel, @@ -3178,7 +3178,7 @@ SpawnShrap(short ParentNum, short Secondary) static SHRAP PlayerHeadHurl1[] = { {s_Vomit1, Vomit1, 1, Z_BOT, 250, 400, 100, 200, true, 256}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; #define WALL_FLOOR_SHRAP 4097 @@ -3186,8 +3186,8 @@ SpawnShrap(short ParentNum, short Secondary) #if 0 static SHRAP SectorExpShrap[] = { - {NULL, WALL_FLOOR_SHRAP, 1, Z_BOT, 550, 800, 200, 400, true, 512}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr, WALL_FLOOR_SHRAP, 1, Z_BOT, 550, 800, 200, 400, true, 512}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; #endif @@ -3230,7 +3230,7 @@ SpawnShrap(short ParentNum, short Secondary) { shrap_type = GlobBreakInfo->shrap_type; shrap_amt = GlobBreakInfo->shrap_amt; - GlobBreakInfo = NULL; + GlobBreakInfo = nullptr; goto AutoShrap; } else if (TEST(parent->extra, SPRX_BREAKABLE)) @@ -4129,52 +4129,52 @@ SpawnBlood(short SpriteNum, short Weapon, short hit_ang, int hit_x, int hit_y, i { {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}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,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}, - {NULL,0,0,0,0,0,0,0,0,0}, + {nullptr,0,0,0,0,0,0,0,0,0}, }; #endif @@ -4509,7 +4509,7 @@ WeaponMoveHit(short SpriteNum) { if (MissileHitMatch(SpriteNum, -1, short(u->lo_sp - sprite))) return true; - //DoMatchEverything(NULL, u->lo_sp->hitag, -1); + //DoMatchEverything(nullptr, u->lo_sp->hitag, -1); //return(true); } @@ -4534,7 +4534,7 @@ WeaponMoveHit(short SpriteNum) { if (MissileHitMatch(SpriteNum, -1, short(u->hi_sp - sprite))) return true; - //DoMatchEverything(NULL, u->hi_sp->hitag, -1); + //DoMatchEverything(nullptr, u->hi_sp->hitag, -1); //return(true); } } @@ -4636,7 +4636,7 @@ WeaponMoveHit(short SpriteNum) { if (MissileHitMatch(SpriteNum, -1, hit_sprite)) return true; - //DoMatchEverything(NULL, hsp->hitag, -1); + //DoMatchEverything(nullptr, hsp->hitag, -1); //return(true); } @@ -4723,7 +4723,7 @@ DoUziSmoke(short SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; - //if (sp->picnum != NULL) + //if (sp->picnum != nullptr) // DoDamageTest(SpriteNum); sp->z -= 200; // !JIM! Make them float up @@ -4735,7 +4735,7 @@ DoShotgunSmoke(short SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; - //if (sp->picnum != NULL) + //if (sp->picnum != nullptr) // DoDamageTest(SpriteNum); sp->z -= 200; // !JIM! Make them float up @@ -5388,7 +5388,7 @@ ActorHealth(short SpriteNum, short amt) u->WaitTics = SEC(1) + SEC(RANDOM_RANGE(2)); u->Health = 60; PlaySound(DIGI_NINJACHOKE, sp, v3df_follow); - InitPlasmaFountain(NULL, sp); + InitPlasmaFountain(nullptr, sp); 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); @@ -7772,7 +7772,7 @@ int DoExpDamageTest(short Weapon) int max_stat; short break_count; - SPRITEp found_sp = NULL; + SPRITEp found_sp = nullptr; int found_dist = 999999; int DoWallMoveMatch(short match); @@ -8967,7 +8967,7 @@ DoGrenade(int16_t Weapon) if (hsp->lotag == TAG_SPRITE_HIT_MATCH) { if (TEST(SP_TAG8(hsp), BIT(3))) - DoMatchEverything(NULL, hsp->hitag, -1); + DoMatchEverything(nullptr, hsp->hitag, -1); } if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) @@ -10885,7 +10885,7 @@ SpawnBreakStaticFlames(int16_t SpriteNum) USERp nu; short New; - New = SpawnSprite(STAT_STATIC_FIRE, FIREBALL_FLAMES, NULL, sp->sectnum, + New = SpawnSprite(STAT_STATIC_FIRE, FIREBALL_FLAMES, nullptr, sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 0); np = &sprite[New]; nu = User[New].Data(); @@ -11168,7 +11168,7 @@ SpawnNuclearExp(int16_t Weapon) SPRITEp exp; USERp eu; short explosion,ang=0; - PLAYERp pp = NULL; + PLAYERp pp = nullptr; short rnd_rng; ASSERT(u); @@ -11354,7 +11354,7 @@ AddSpriteToSectorObject(short SpriteNum, SECTOR_OBJECTp sop) // make sure it has a user if (!u) { - u = SpawnUser(SpriteNum, 0, NULL); + u = SpawnUser(SpriteNum, 0, nullptr); } // find a free place on this list @@ -11971,7 +11971,7 @@ DoFireball(int16_t Weapon) if (TEST(hsp->extra, SPRX_BURNABLE)) { if (!hu) - hu = SpawnUser(short(sp - sprite), hsp->picnum, NULL); + hu = SpawnUser(short(sp - sprite), hsp->picnum, nullptr); SpawnFireballFlames(Weapon, short(hsp - sprite)); hit_burn = true; } @@ -12027,7 +12027,7 @@ DoFindGround(int16_t SpriteNum) { // found a sprite floor u->lo_sp = hsp; - u->lo_sectp = NULL; + u->lo_sectp = nullptr; return true; } else @@ -12045,7 +12045,7 @@ DoFindGround(int16_t SpriteNum) case HIT_SECTOR: { u->lo_sectp = §or[NORM_SECTOR(florhit)]; - u->lo_sp = NULL; + u->lo_sp = nullptr; return true; } @@ -12086,7 +12086,7 @@ DoFindGroundPoint(int16_t SpriteNum) { // found a sprite floor u->lo_sp = hsp; - u->lo_sectp = NULL; + u->lo_sectp = nullptr; return true; } else @@ -12104,7 +12104,7 @@ DoFindGroundPoint(int16_t SpriteNum) case HIT_SECTOR: { u->lo_sectp = §or[NORM_SECTOR(florhit)]; - u->lo_sp = NULL; + u->lo_sp = nullptr; return true; } @@ -13283,7 +13283,7 @@ InitSerpRing(short SpriteNum) nu->Rot = sg_SkullRing; // defaults do change the statnum - EnemyDefaults(New, NULL, NULL); + EnemyDefaults(New, nullptr, nullptr); change_sprite_stat(New, STAT_SKIP4); RESET(np->extra, SPRX_PLAYER_OR_ENEMY); @@ -13361,7 +13361,7 @@ InitSerpRing2(short SpriteNum) nu->Rot = sg_SkullRing; // defaults do change the statnum - EnemyDefaults(New, NULL, NULL); + EnemyDefaults(New, nullptr, nullptr); RESET(np->extra, SPRX_PLAYER_OR_ENEMY); change_sprite_stat(New, STAT_MISSILE_SKIP4); @@ -13658,7 +13658,7 @@ int InitSwordAttack(PLAYERp pp) { USERp u = User[pp->PlayerSprite].Data(),tu; - SPRITEp sp = NULL; + SPRITEp sp = nullptr; int i; unsigned stat; int dist; @@ -13837,7 +13837,7 @@ int InitFistAttack(PLAYERp pp) { USERp u = User[pp->PlayerSprite].Data(),tu; - SPRITEp sp = NULL; + SPRITEp sp = nullptr; int i; unsigned stat; int dist; @@ -14171,7 +14171,7 @@ InitSumoSkull(short SpriteNum) nu->Health = 100; // defaults do change the statnum - EnemyDefaults(New, NULL, NULL); + EnemyDefaults(New, nullptr, nullptr); //change_sprite_stat(New, STAT_SKIP4); SET(np->extra, SPRX_PLAYER_OR_ENEMY); @@ -15844,8 +15844,8 @@ InitMicro(PLAYERp pp) } else { - hp = NULL; - hu = NULL; + hp = nullptr; + hu = nullptr; ang = pp->angle.ang.asbuild(); } @@ -17962,7 +17962,7 @@ int InitEMP(PLAYERp pp) { USERp u = User[pp->PlayerSprite].Data(); - SPRITEp wp, hsp=NULL; + SPRITEp wp, hsp=nullptr; USERp wu; short daang, j; hitdata_t hitinfo; @@ -18220,8 +18220,8 @@ InitTurretMicro(short SpriteNum, PLAYERp pp) } else { - hp = NULL; - hu = NULL; + hp = nullptr; + hu = nullptr; ang = sp->ang; } @@ -19628,7 +19628,7 @@ InitFireball(PLAYERp pp) int InitEnemyFireball(short SpriteNum) { - SPRITEp sp = User[SpriteNum]->SpriteP, fp = NULL; + SPRITEp sp = User[SpriteNum]->SpriteP, fp = nullptr; USERp u = User[SpriteNum].Data(); SPRITEp wp; int nz, dist; @@ -19725,7 +19725,7 @@ WarpToUnderwater(short *sectnum, int *x, int *y, int *z) { int i; SECT_USERp sectu = SectUser[*sectnum].Data(); - SPRITEp under_sp = NULL, over_sp = NULL; + SPRITEp under_sp = nullptr, over_sp = nullptr; bool Found = false; short over, under; int sx, sy; @@ -19802,7 +19802,7 @@ WarpToSurface(short *sectnum, int *x, int *y, int *z) short over, under; int sx, sy; - SPRITEp under_sp = NULL, over_sp = NULL; + SPRITEp under_sp = nullptr, over_sp = nullptr; bool Found = false; // 0 not valid for water match tags @@ -19874,7 +19874,7 @@ SpriteWarpToUnderwater(SPRITEp sp) USERp u = User[sp - sprite].Data(); int i; SECT_USERp sectu = SectUser[sp->sectnum].Data(); - SPRITEp under_sp = NULL, over_sp = NULL; + SPRITEp under_sp = nullptr, over_sp = nullptr; bool Found = false; short over, under; int sx, sy; @@ -19955,7 +19955,7 @@ SpriteWarpToSurface(SPRITEp sp) short over, under; int sx, sy; - SPRITEp under_sp = NULL, over_sp = NULL; + SPRITEp under_sp = nullptr, over_sp = nullptr; bool Found = false; // 0 not valid for water match tags diff --git a/source/games/sw/src/zilla.cpp b/source/games/sw/src/zilla.cpp index c513c4701..2d7f448f9 100644 --- a/source/games/sw/src/zilla.cpp +++ b/source/games/sw/src/zilla.cpp @@ -616,28 +616,28 @@ ACTOR_ACTION_SET ZillaActionSet = { sg_ZillaStand, sg_ZillaRun, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, //climb + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, //climb sg_ZillaPain, //pain sg_ZillaDie, - NULL, + nullptr, sg_ZillaDead, - NULL, - NULL, + nullptr, + nullptr, {sg_ZillaUzi,sg_ZillaRail}, {950,1024}, {sg_ZillaUzi,sg_ZillaRocket,sg_ZillaRail}, {400,950,1024}, - {NULL}, - NULL, - NULL + {nullptr}, + nullptr, + nullptr }; int @@ -701,8 +701,8 @@ int NullZilla(short SpriteNum) getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz); u->lo_sectp = §or[sp->sectnum]; u->hi_sectp = §or[sp->sectnum]; - u->lo_sp = NULL; - u->hi_sp = NULL; + u->lo_sp = nullptr; + u->hi_sp = nullptr; sp->z = u->loz; DoActorSectorDamage(SpriteNum); @@ -771,7 +771,7 @@ int DoZillaDeathMelt(short SpriteNum) u->ID = ZILLA_RUN_R0; RESET(u->Flags, SPR_JUMPING|SPR_FALLING|SPR_MOVED); - //DoMatchEverything(NULL, sp->lotag, ON); + //DoMatchEverything(nullptr, sp->lotag, ON); if (!SW_SHAREWARE) { // Resume the regular music - in a hack-free fashion. @@ -782,8 +782,8 @@ int DoZillaDeathMelt(short SpriteNum) getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz); u->lo_sectp = §or[sp->sectnum]; u->hi_sectp = §or[sp->sectnum]; - u->lo_sp = NULL; - u->hi_sp = NULL; + u->lo_sp = nullptr; + u->hi_sp = nullptr; sp->z = u->loz; BossSpriteNum[2] = -2; diff --git a/source/games/sw/src/zombie.cpp b/source/games/sw/src/zombie.cpp index 3fc5cc99f..f201d5929 100644 --- a/source/games/sw/src/zombie.cpp +++ b/source/games/sw/src/zombie.cpp @@ -70,7 +70,7 @@ DECISION ZombieSurprised[] = DECISION ZombieEvasive[] = { {400, InitActorDuck}, - {1024, NULL} + {1024, nullptr} }; DECISION ZombieLostTarget[] = @@ -718,21 +718,21 @@ ACTOR_ACTION_SET ZombieActionSet = { sg_ZombieStand, sg_ZombieRun, - NULL, + nullptr, sg_ZombieFall, - NULL, - NULL, - NULL, + nullptr, + nullptr, + nullptr, sg_ZombieRun, sg_ZombieRun, - NULL, - NULL, + nullptr, + nullptr, sg_ZombiePain, sg_ZombieRun, - NULL, - NULL, - NULL, - NULL, + nullptr, + nullptr, + nullptr, + nullptr, #if 0 {sg_ZombieUzi}, {1024}, @@ -743,9 +743,9 @@ ACTOR_ACTION_SET ZombieActionSet = {1024}, {sg_ZombieRail}, {1024}, - {NULL}, - NULL, - NULL + {nullptr}, + nullptr, + nullptr }; int