- SW: Replace all uses of NULL with nullptr.

This commit is contained in:
Mitchell Richters 2021-07-10 22:25:18 +10:00
parent e3f2d76378
commit 9d64779da0
48 changed files with 748 additions and 748 deletions

View file

@ -240,7 +240,7 @@ void JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, fixed_t tpq16ang, fixed
if (mirror[cnt].ismagic) if (mirror[cnt].ismagic)
{ {
SPRITEp sp=NULL; SPRITEp sp=nullptr;
int camhoriz; int camhoriz;
short w; short w;
int dx, dy, dz, tdx, tdy, tdz, midx, midy; int dx, dy, dz, tdx, tdy, tdz, midx, midy;

View file

@ -134,7 +134,7 @@ DoActorDie(short SpriteNum, short weapon)
ChangeState(SpriteNum, u->StateEnd); ChangeState(SpriteNum, u->StateEnd);
u->RotNum = 0; u->RotNum = 0;
sp->xvel <<= 1; sp->xvel <<= 1;
u->ActorActionFunc = NULL; u->ActorActionFunc = nullptr;
sprite[SpriteNum].ang = NORM_ANGLE(sprite[SpriteNum].ang + 1024); sprite[SpriteNum].ang = NORM_ANGLE(sprite[SpriteNum].ang + 1024);
break; break;
@ -165,7 +165,7 @@ DoActorDie(short SpriteNum, short weapon)
ChangeState(SpriteNum, u->StateEnd); ChangeState(SpriteNum, u->StateEnd);
u->RotNum = 0; u->RotNum = 0;
u->ActorActionFunc = NULL; u->ActorActionFunc = nullptr;
sp->xvel = 200 + RANDOM_RANGE(200); sp->xvel = 200 + RANDOM_RANGE(200);
u->jump_speed = -200 - RANDOM_RANGE(250); u->jump_speed = -200 - RANDOM_RANGE(250);
DoActorBeginJump(SpriteNum); DoActorBeginJump(SpriteNum);
@ -185,7 +185,7 @@ DoActorDie(short SpriteNum, short weapon)
u->RotNum = 0; u->RotNum = 0;
u->ActorActionFunc = NULL; u->ActorActionFunc = nullptr;
//u->ActorActionFunc = NullAnimator; //u->ActorActionFunc = NullAnimator;
if (!sw_ninjahack) if (!sw_ninjahack)
sprite[SpriteNum].ang = sprite[weapon].ang; sprite[SpriteNum].ang = sprite[weapon].ang;
@ -220,7 +220,7 @@ DoActorDie(short SpriteNum, short weapon)
u->jump_speed = -10 - RANDOM_RANGE(25); u->jump_speed = -10 - RANDOM_RANGE(25);
DoActorBeginJump(SpriteNum); DoActorBeginJump(SpriteNum);
} }
u->ActorActionFunc = NULL; u->ActorActionFunc = nullptr;
// Get angle to player // Get angle to player
sp->ang = NORM_ANGLE(getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y) + 1024); sp->ang = NORM_ANGLE(getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y) + 1024);
break; break;
@ -243,7 +243,7 @@ DoActorDie(short SpriteNum, short weapon)
u->jump_speed = -100 - RANDOM_RANGE(250); u->jump_speed = -100 - RANDOM_RANGE(250);
} }
DoActorBeginJump(SpriteNum); DoActorBeginJump(SpriteNum);
u->ActorActionFunc = NULL; u->ActorActionFunc = nullptr;
// Get angle to player // Get angle to player
sp->ang = NORM_ANGLE(getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y) + 1024); sp->ang = NORM_ANGLE(getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y) + 1024);
break; break;
@ -268,7 +268,7 @@ DoActorDie(short SpriteNum, short weapon)
SET(sp->cstat, CSTAT_SPRITE_YFLIP); SET(sp->cstat, CSTAT_SPRITE_YFLIP);
ChangeState(SpriteNum, u->StateEnd); ChangeState(SpriteNum, u->StateEnd);
u->RotNum = 0; u->RotNum = 0;
u->ActorActionFunc = NULL; u->ActorActionFunc = nullptr;
sp->xvel = 300 + RANDOM_RANGE(400); sp->xvel = 300 + RANDOM_RANGE(400);
u->jump_speed = -300 - RANDOM_RANGE(350); u->jump_speed = -300 - RANDOM_RANGE(350);
DoActorBeginJump(SpriteNum); DoActorBeginJump(SpriteNum);
@ -429,8 +429,8 @@ DoActorDebris(short SpriteNum)
getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz); getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
u->lo_sectp = &sector[sp->sectnum]; u->lo_sectp = &sector[sp->sectnum];
u->hi_sectp = &sector[sp->sectnum]; u->hi_sectp = &sector[sp->sectnum];
u->lo_sp = NULL; u->lo_sp = nullptr;
u->hi_sp = NULL; u->hi_sp = nullptr;
break; break;
} }
@ -683,7 +683,7 @@ DoActorBeginJump(short SpriteNum)
else else
NewStateGroup(SpriteNum, u->ActorActionSet->Jump); NewStateGroup(SpriteNum, u->ActorActionSet->Jump);
} }
u->StateFallOverride = NULL; u->StateFallOverride = nullptr;
//DO NOT CALL DoActorJump! DoActorStopFall can cause an infinite loop and //DO NOT CALL DoActorJump! DoActorStopFall can cause an infinite loop and
//stack overflow if it is called. //stack overflow if it is called.
@ -1024,7 +1024,7 @@ saveable_module saveable_actor =
SIZ(saveable_actor_code), SIZ(saveable_actor_code),
// data // data
NULL,0 nullptr,0
}; };
END_SW_NS END_SW_NS

View file

@ -571,7 +571,7 @@ int DoActorOperate(short SpriteNum)
{ {
neartag(sp->x, sp->y, z[i], sp->sectnum, sp->ang, neartag(sp->x, sp->y, z[i], sp->sectnum, sp->ang,
&nearsector, &nearwall, &nearsprite, &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); //DSPRINTF(ds,"nearsector = %d, nearwall = %d, nearsprite = %d hitdist == %ld\n",nearsector,nearwall,nearsprite,nearhitdist);
//MONO_PRINT(ds); //MONO_PRINT(ds);
@ -638,7 +638,7 @@ DoActorActionDecide(short SpriteNum)
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
int dist; int dist;
ANIMATORp action; ANIMATORp action;
USERp pu=NULL; USERp pu=nullptr;
bool ICanSee=false; bool ICanSee=false;
// REMINDER: This function is not even called if SpriteControl doesn't let // REMINDER: This function is not even called if SpriteControl doesn't let
@ -871,7 +871,7 @@ DoActorDecide(short SpriteNum)
return 0; return 0;
} }
ASSERT(actor_action != NULL); ASSERT(actor_action != nullptr);
if (actor_action != InitActorDecide) 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 new_ang, oang;
short save_ang = -1; short save_ang = -1;

View file

@ -135,16 +135,16 @@ AMB_ENTRY(30, DIGI_BREAKINGWOOD, AMB_INTERMIT, AMB_120)
AMB_ENTRY(31, DIGI_BREAKSTONES, AMB_NONE, AMB_NOTICS) AMB_ENTRY(31, DIGI_BREAKSTONES, AMB_NONE, AMB_NOTICS)
// MOTOR BOAT // MOTOR BOAT
AMB_ENTRY(32, DIGI_NULL, AMB_NONE, AMB_NOTICS) AMB_ENTRY(32, DIGI_nullptr, AMB_NONE, AMB_NOTICS)
AMB_ENTRY(33, DIGI_NULL, AMB_NONE, AMB_NOTICS) AMB_ENTRY(33, DIGI_nullptr, AMB_NONE, AMB_NOTICS)
AMB_ENTRY(34, DIGI_NULL, AMB_NONE, AMB_NOTICS) AMB_ENTRY(34, DIGI_nullptr, AMB_NONE, AMB_NOTICS)
// WWII JAP ARMY TANK // WWII JAP ARMY TANK
AMB_ENTRY(35, DIGI_NULL, AMB_NONE, AMB_NOTICS) AMB_ENTRY(35, DIGI_nullptr, AMB_NONE, AMB_NOTICS)
AMB_ENTRY(36, DIGI_NULL, AMB_NONE, AMB_NOTICS) AMB_ENTRY(36, DIGI_nullptr, AMB_NONE, AMB_NOTICS)
AMB_ENTRY(37, DIGI_NULL, AMB_NONE, AMB_NOTICS) AMB_ENTRY(37, DIGI_nullptr, AMB_NONE, AMB_NOTICS)
AMB_ENTRY(38, DIGI_NULL, AMB_NONE, AMB_NOTICS) AMB_ENTRY(38, DIGI_nullptr, AMB_NONE, AMB_NOTICS)
AMB_ENTRY(39, DIGI_NULL, AMB_NONE, AMB_NOTICS) AMB_ENTRY(39, DIGI_nullptr, AMB_NONE, AMB_NOTICS)
// WWII JAP BOMBER PLANE // WWII JAP BOMBER PLANE
AMB_ENTRY(40, DIGI_BOMBRFLYING, AMB_NONE, AMB_NOTICS) AMB_ENTRY(40, DIGI_BOMBRFLYING, AMB_NONE, AMB_NOTICS)

View file

@ -500,7 +500,7 @@ BREAK_INFOp SetupSpriteForBreak(SPRITEp sp)
// ignore as a breakable if true // ignore as a breakable if true
if (sp->lotag == TAG_SPRITE_HIT_MATCH) if (sp->lotag == TAG_SPRITE_HIT_MATCH)
return NULL; return nullptr;
break_info = FindSpriteBreakInfo(picnum); break_info = FindSpriteBreakInfo(picnum);
if (break_info) 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 // pass Break Info Globally
GlobBreakInfo = break_info; GlobBreakInfo = break_info;
SpawnShrap(BreakSprite, -1); SpawnShrap(BreakSprite, -1);
GlobBreakInfo = NULL; GlobBreakInfo = nullptr;
KillSprite(BreakSprite); 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 // 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 // its better than forcing everyone to have a ST1
DoMatchEverything(NULL, match, -1); DoMatchEverything(nullptr, match, -1);
// Kill sound if one is attached // Kill sound if one is attached
DeleteNoSoundOwner(BreakSprite); DeleteNoSoundOwner(BreakSprite);
//change_sprite_stat(BreakSprite, STAT_SUICIDE); //change_sprite_stat(BreakSprite, STAT_SUICIDE);
@ -896,7 +896,7 @@ int UserBreakSprite(short BreakSprite)
// make it BROKEN // make it BROKEN
if (SP_TAG7(sp) <= 1) if (SP_TAG7(sp) <= 1)
{ {
DoMatchEverything(NULL, match_extra, -1); DoMatchEverything(nullptr, match_extra, -1);
//DoSpawnSpotsForKill(match_extra); //DoSpawnSpotsForKill(match_extra);
DoLightingMatch(match_extra, OFF); DoLightingMatch(match_extra, OFF);
@ -976,7 +976,7 @@ int AutoBreakSprite(short BreakSprite, short type)
// pass Break Info Globally // pass Break Info Globally
GlobBreakInfo = break_info; GlobBreakInfo = break_info;
SpawnShrap(BreakSprite, -1); SpawnShrap(BreakSprite, -1);
GlobBreakInfo = NULL; GlobBreakInfo = nullptr;
if (bp->picnum == 3683) if (bp->picnum == 3683)
RESET(bp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); RESET(bp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
} }
@ -990,7 +990,7 @@ int AutoBreakSprite(short BreakSprite, short type)
// pass Break Info Globally // pass Break Info Globally
GlobBreakInfo = break_info; GlobBreakInfo = break_info;
SpawnShrap(BreakSprite, -1); SpawnShrap(BreakSprite, -1);
GlobBreakInfo = NULL; GlobBreakInfo = nullptr;
// kill it or change the pic // kill it or change the pic
if (TEST(break_info->flags, BF_KILL) || break_info->breaknum == -1) if (TEST(break_info->flags, BF_KILL) || break_info->breaknum == -1)

View file

@ -670,26 +670,26 @@ ACTOR_ACTION_SET BunnyActionSet =
sg_BunnyRun, sg_BunnyRun,
sg_BunnyJump, sg_BunnyJump,
sg_BunnyFall, sg_BunnyFall,
NULL, // sg_BunnyCrawl, nullptr, // sg_BunnyCrawl,
NULL, // sg_BunnySwim, nullptr, // sg_BunnySwim,
NULL, // sg_BunnyFly, nullptr, // sg_BunnyFly,
NULL, // sg_BunnyRise, nullptr, // sg_BunnyRise,
NULL, // sg_BunnySit, nullptr, // sg_BunnySit,
NULL, // sg_BunnyLook, nullptr, // sg_BunnyLook,
NULL, // climb nullptr, // climb
sg_BunnyPain, sg_BunnyPain,
sg_BunnyDie, sg_BunnyDie,
NULL, nullptr,
sg_BunnyDead, sg_BunnyDead,
sg_BunnyDeathJump, sg_BunnyDeathJump,
sg_BunnyDeathFall, sg_BunnyDeathFall,
{NULL}, {nullptr},
{1024}, {1024},
{NULL}, {nullptr},
{1024}, {1024},
{sg_BunnyHeart, sg_BunnyRun}, {sg_BunnyHeart, sg_BunnyRun},
NULL, nullptr,
NULL nullptr
}; };
ACTOR_ACTION_SET BunnyWhiteActionSet = ACTOR_ACTION_SET BunnyWhiteActionSet =
@ -698,16 +698,16 @@ ACTOR_ACTION_SET BunnyWhiteActionSet =
sg_BunnyRun, sg_BunnyRun,
sg_BunnyJump, sg_BunnyJump,
sg_BunnyFall, sg_BunnyFall,
NULL, // sg_BunnyCrawl, nullptr, // sg_BunnyCrawl,
NULL, // sg_BunnySwim, nullptr, // sg_BunnySwim,
NULL, // sg_BunnyFly, nullptr, // sg_BunnyFly,
NULL, // sg_BunnyRise, nullptr, // sg_BunnyRise,
NULL, // sg_BunnySit, nullptr, // sg_BunnySit,
NULL, // sg_BunnyLook, nullptr, // sg_BunnyLook,
NULL, // climb nullptr, // climb
sg_BunnyPain, // pain sg_BunnyPain, // pain
sg_BunnyDie, sg_BunnyDie,
NULL, nullptr,
sg_BunnyDead, sg_BunnyDead,
sg_BunnyDeathJump, sg_BunnyDeathJump,
sg_BunnyDeathFall, sg_BunnyDeathFall,
@ -718,8 +718,8 @@ ACTOR_ACTION_SET BunnyWhiteActionSet =
{sg_BunnySwipe}, {sg_BunnySwipe},
{1024}, {1024},
{sg_BunnyHeart, sg_BunnySwipe}, {sg_BunnyHeart, sg_BunnySwipe},
NULL, nullptr,
NULL nullptr
}; };
int int
@ -1006,7 +1006,7 @@ DoBunnyQuickJump(short SpriteNum)
Bunny_Count--; // Bunny died Bunny_Count--; // Bunny died
u->lo_sp = NULL; u->lo_sp = nullptr;
return true; return true;
} }
} }
@ -1030,7 +1030,7 @@ DoBunnyQuickJump(short SpriteNum)
{ {
if (TEST(tsp->extra, SPRX_PLAYER_OR_ENEMY)) 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; if (RANDOM_RANGE(1000) < 995 && tu->spal != PALETTE_PLAYER0) return false;

View file

@ -470,29 +470,29 @@ ACTOR_ACTION_SET CoolgActionSet =
{ {
sg_CoolgStand, sg_CoolgStand,
sg_CoolgRun, sg_CoolgRun,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, //climb nullptr, //climb
sg_CoolgPain, //pain sg_CoolgPain, //pain
sg_CoolgDie, sg_CoolgDie,
NULL, nullptr,
sg_CoolgDead, sg_CoolgDead,
NULL, nullptr,
NULL, nullptr,
// {sg_CoolgClub}, // {sg_CoolgClub},
{sg_CoolgAttack}, {sg_CoolgAttack},
{1024}, {1024},
{sg_CoolgAttack}, {sg_CoolgAttack},
{1024}, {1024},
{NULL,NULL}, {nullptr,nullptr},
NULL, nullptr,
NULL nullptr
}; };
int DoCoolgMatchPlayerZ(short SpriteNum); int DoCoolgMatchPlayerZ(short SpriteNum);

View file

@ -71,7 +71,7 @@ DECISION CoolieSurprised[] =
DECISION CoolieEvasive[] = DECISION CoolieEvasive[] =
{ {
{10, InitActorEvade }, {10, InitActorEvade },
{1024, NULL } {1024, nullptr }
}; };
DECISION CoolieLostTarget[] = DECISION CoolieLostTarget[] =
@ -380,28 +380,28 @@ ACTOR_ACTION_SET CoolieActionSet =
{ {
sg_CoolieStand, sg_CoolieStand,
sg_CoolieRun, sg_CoolieRun,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, //climb nullptr, //climb
sg_CooliePain, //pain sg_CooliePain, //pain
sg_CoolieDie, sg_CoolieDie,
NULL, nullptr,
sg_CoolieDead, sg_CoolieDead,
NULL, nullptr,
NULL, nullptr,
{sg_CoolieCharge}, {sg_CoolieCharge},
{1024}, {1024},
{sg_CoolieCharge}, {sg_CoolieCharge},
{1024}, {1024},
{NULL}, {nullptr},
NULL, nullptr,
NULL nullptr
}; };
void EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp person) void EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp person)

View file

@ -60,49 +60,49 @@ DAMAGE_ENTRY(WPN_SWORD, InitWeaponSword, 50, 80, 0, -1, -1
// extra weapons connected to other // extra weapons connected to other
// spell // spell
DAMAGE_ENTRY(DMG_NAPALM, NULL, 90, 150, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_NAPALM, nullptr, 90, 150, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_MIRV_METEOR, NULL, 35, 65, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_MIRV_METEOR, nullptr, 35, 65, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_SERP_METEOR, NULL, 7, 15, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_SERP_METEOR, nullptr, 7, 15, 0, -1, -1, -1)
// radius damage // radius damage
DAMAGE_ENTRY(DMG_ELECTRO_SHARD, NULL, 2, 6, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_ELECTRO_SHARD, nullptr, 2, 6, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_SECTOR_EXP, NULL, 50, 100, 3200, -1, -1, -1) DAMAGE_ENTRY(DMG_SECTOR_EXP, nullptr, 50, 100, 3200, -1, -1, -1)
DAMAGE_ENTRY(DMG_BOLT_EXP, NULL, 80, 160, 3200, -1, -1, -1) DAMAGE_ENTRY(DMG_BOLT_EXP, nullptr, 80, 160, 3200, -1, -1, -1)
DAMAGE_ENTRY(DMG_TANK_SHELL_EXP, NULL, 80, 200, 4500, -1, -1, -1) DAMAGE_ENTRY(DMG_TANK_SHELL_EXP, nullptr, 80, 200, 4500, -1, -1, -1)
DAMAGE_ENTRY(DMG_FIREBALL_EXP, NULL, -1, -1, 1000, -1, -1, -1) DAMAGE_ENTRY(DMG_FIREBALL_EXP, nullptr, -1, -1, 1000, -1, -1, -1)
DAMAGE_ENTRY(DMG_NAPALM_EXP, NULL, 60, 90, 3200, -1, -1, -1) DAMAGE_ENTRY(DMG_NAPALM_EXP, nullptr, 60, 90, 3200, -1, -1, -1)
DAMAGE_ENTRY(DMG_SKULL_EXP, NULL, 40, 75, 4500, -1, -1, -1) DAMAGE_ENTRY(DMG_SKULL_EXP, nullptr, 40, 75, 4500, -1, -1, -1)
DAMAGE_ENTRY(DMG_BASIC_EXP, NULL, 10, 25, 1000, -1, -1, -1) DAMAGE_ENTRY(DMG_BASIC_EXP, nullptr, 10, 25, 1000, -1, -1, -1)
DAMAGE_ENTRY(DMG_GRENADE_EXP, NULL, 70, 140, 6500, -1, -1, -1) DAMAGE_ENTRY(DMG_GRENADE_EXP, nullptr, 70, 140, 6500, -1, -1, -1)
DAMAGE_ENTRY(DMG_MINE_EXP, NULL, 85, 115, 6500, -1, -1, -1) DAMAGE_ENTRY(DMG_MINE_EXP, nullptr, 85, 115, 6500, -1, -1, -1)
DAMAGE_ENTRY(DMG_MINE_SHRAP, NULL, 15, 30, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_MINE_SHRAP, nullptr, 15, 30, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_MICRO_EXP, NULL, 50, 100, 4500, -1, -1, -1) DAMAGE_ENTRY(DMG_MICRO_EXP, nullptr, 50, 100, 4500, -1, -1, -1)
DAMAGE_ENTRY_WPN(DMG_NUCLEAR_EXP, NULL, 0, 800, 30000, -1, -1, -1, 1, 5) DAMAGE_ENTRY_WPN(DMG_NUCLEAR_EXP, nullptr, 0, 800, 30000, -1, -1, -1, 1, 5)
DAMAGE_ENTRY(DMG_RADIATION_CLOUD, NULL, 2, 6, 5000, -1, -1, -1) DAMAGE_ENTRY(DMG_RADIATION_CLOUD, nullptr, 2, 6, 5000, -1, -1, -1)
DAMAGE_ENTRY(DMG_FLASHBOMB, NULL, 100, 150, 16384, -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 // actor
DAMAGE_ENTRY(DMG_RIPPER_SLASH, NULL, 10, 30, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_RIPPER_SLASH, nullptr, 10, 30, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_SKEL_SLASH, NULL, 10, 20, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_SKEL_SLASH, nullptr, 10, 20, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_COOLG_BASH, NULL, 10, 20, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_COOLG_BASH, nullptr, 10, 20, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_COOLG_FIRE, NULL, 15, 30, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_COOLG_FIRE, nullptr, 15, 30, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_GORO_CHOP, NULL, 20, 40, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_GORO_CHOP, nullptr, 20, 40, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_GORO_FIREBALL, NULL, 5, 20, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_GORO_FIREBALL, nullptr, 5, 20, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_SERP_SLASH, NULL, 75, 75, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_SERP_SLASH, nullptr, 75, 75, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_LAVA_BOULDER, NULL, 100, 100, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_LAVA_BOULDER, nullptr, 100, 100, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_LAVA_SHARD, NULL, 25, 25, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_LAVA_SHARD, nullptr, 25, 25, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_HORNET_STING, NULL, 5, 10, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_HORNET_STING, nullptr, 5, 10, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_EEL_ELECTRO, NULL, 10, 40, 3400, -1, -1, -1) DAMAGE_ENTRY(DMG_EEL_ELECTRO, nullptr, 10, 40, 3400, -1, -1, -1)
// misc // misc
DAMAGE_ENTRY(DMG_SPEAR_TRAP, NULL, 15, 20, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_SPEAR_TRAP, nullptr, 15, 20, 0, -1, -1, -1)
DAMAGE_ENTRY(DMG_VOMIT, NULL, 5, 15, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_VOMIT, nullptr, 5, 15, 0, -1, -1, -1)
// inanimate objects // inanimate objects
DAMAGE_ENTRY(DMG_BLADE, NULL, 10, 20, 0, -1, -1, -1) DAMAGE_ENTRY(DMG_BLADE, nullptr, 10, 20, 0, -1, -1, -1)
DAMAGE_ENTRY(MAX_WEAPONS, NULL, 10, 20, 0, -1, -1, -1) DAMAGE_ENTRY(MAX_WEAPONS, nullptr, 10, 20, 0, -1, -1, -1)
#undef DAMAGE_ENTRY #undef DAMAGE_ENTRY
#undef DAMAGE_ENTRY_WPN #undef DAMAGE_ENTRY_WPN

View file

@ -25,7 +25,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#ifdef DIGI_TABLE #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 #endif
#ifdef DIGI_ENUM #ifdef DIGI_ENUM
@ -65,8 +65,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
// WEAPONS //////////////////////////////////////////////////////////////////// // WEAPONS ////////////////////////////////////////////////////////////////////
// NULL Entry used to detect a sound's presence in sprite attrib structs. // nullptr 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) DIGI_ENTRY("nullptr.VOC", DIGI_nullptr, 0, 0, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
// SWORD // SWORD
DIGI_ENTRY("SWRDSTR1.VOC", DIGI_SWORDSWOOSH, 1, PRI_HI_PLAYERWEAP, -200, 200, 0, DIST_NORMAL, VF_NORMAL) 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("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("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("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 // UZI
DIGI_ENTRY("UZIFIRE1.VOC", DIGI_UZIFIRE, 5, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) 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 //#ifndef SW_SHAREWARE
DIGI_ENTRY("HSQUEEZ1.VOC", DIGI_HEARTFIRE, 28, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) DIGI_ENTRY("HSQUEEZ1.VOC", DIGI_HEARTFIRE, 28, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
//#else //#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 //#endif
DIGI_ENTRY("HRTWIZ.VOC", DIGI_HEARTWIZ, 29, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP) 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 //#ifndef SW_SHAREWARE
DIGI_ENTRY("RFWIZ.VOC", DIGI_RFWIZ, 32, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) DIGI_ENTRY("RFWIZ.VOC", DIGI_RFWIZ, 32, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
//#else //#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 //#endif
// NAPALM SPELL // NAPALM SPELL
@ -157,14 +157,14 @@ DIGI_ENTRY("MAGIC7.VOC", DIGI_MAGIC7, 46, PRI_AMBIENT,
//#ifndef SW_SHAREWARE //#ifndef SW_SHAREWARE
DIGI_ENTRY("SWSPELL.VOC", DIGI_SWCLOAKUNCLOAK, 47, PRI_LOW_PLAYERWEAP,-100, 100, 0, DIST_NORMAL, VF_NORMAL) DIGI_ENTRY("SWSPELL.VOC", DIGI_SWCLOAKUNCLOAK, 47, PRI_LOW_PLAYERWEAP,-100, 100, 0, DIST_NORMAL, VF_NORMAL)
//#else //#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 //#endif
// PLAYER DEAD HEAD // PLAYER DEAD HEAD
DIGI_ENTRY("DHVOMIT.VOC", DIGI_DHVOMIT, 48, PRI_PLAYERAMBIENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL) 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("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("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 // WEAPON RELATED
DIGI_ENTRY("LAVAHIT.VOC", DIGI_PROJECTILELAVAHIT,51, PRI_PLAYERAMBIENT,-100, 100, 0, DIST_NORMAL, VF_NORMAL) 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 // HUGE EXP
//DIGI_ENTRY("BIGEXP.VOC", DIGI_HUGEEXP, 184, PRI_ENVIRONMENT, -200, 200, 0, DIST_WIDE, VF_NORMAL ) //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 // CRACKLING FIRE FOR CONTINUOUS BURN
DIGI_ENTRY("FIRE1.VOC", DIGI_FIRE1, 185, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP) 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 // was RAILB10.VOC
DIGI_ENTRY("HSHOT1.VOC", DIGI_RAILFIRE, 269, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL) DIGI_ENTRY("HSHOT1.VOC", DIGI_RAILFIRE, 269, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
//#else //#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 //#endif
DIGI_ENTRY("RAIL2.VOC", DIGI_RAILREADY, 270, PRI_HI_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP) 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) 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("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("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("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("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("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) DIGI_ENTRY("BURGALRM.VOC", DIGI_BURGLARALARM, 285, PRI_LOW_PLAYERWEAP, 0, 0, 0, DIST_NORMAL, VF_LOOP)

View file

@ -866,7 +866,7 @@ tspriteptr_t get_tsprite(spritetype* tsprite, int& spritesortcnt, int SpriteNum)
return &tsprite[tSpriteNum]; return &tsprite[tSpriteNum];
} }
return NULL; return nullptr;
} }
void void
@ -1337,7 +1337,7 @@ void PreDrawStackedWater(void)
// spawn a user // spawn a user
User[New].Alloc(); User[New].Alloc();
nu = User[New].Data(); nu = User[New].Data();
ASSERT(nu != NULL); ASSERT(nu != nullptr);
nu->xchange = -989898; nu->xchange = -989898;

View file

@ -330,28 +330,28 @@ ACTOR_ACTION_SET EelActionSet =
{ {
sg_EelStand, sg_EelStand,
sg_EelRun, sg_EelRun,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
sg_EelRun, sg_EelRun,
NULL, nullptr,
NULL, nullptr,
sg_EelStand, sg_EelStand,
NULL, nullptr,
NULL, //climb nullptr, //climb
sg_EelStand, //pain sg_EelStand, //pain
sg_EelDie, sg_EelDie,
NULL, nullptr,
sg_EelDead, sg_EelDead,
NULL, nullptr,
NULL, nullptr,
{sg_EelAttack}, {sg_EelAttack},
{1024}, {1024},
{sg_EelAttack}, {sg_EelAttack},
{1024}, {1024},
{NULL,NULL}, {nullptr,nullptr},
NULL, nullptr,
NULL nullptr
}; };
int DoEelMatchPlayerZ(short SpriteNum); int DoEelMatchPlayerZ(short SpriteNum);
@ -603,7 +603,7 @@ int DoEelMove(short SpriteNum)
{ {
USERp u = User[SpriteNum].Data(); USERp u = User[SpriteNum].Data();
ASSERT(u->Rot != NULL); ASSERT(u->Rot != nullptr);
if (SpriteOverlap(SpriteNum, int16_t(u->tgt_sp - sprite))) if (SpriteOverlap(SpriteNum, int16_t(u->tgt_sp - sprite)))
NewStateGroup(SpriteNum, u->ActorActionSet->CloseAttack[0]); NewStateGroup(SpriteNum, u->ActorActionSet->CloseAttack[0]);

View file

@ -471,18 +471,18 @@ void TerminateLevel(void)
pp->cookieTime = 0; pp->cookieTime = 0;
memset(pp->cookieQuote, 0, sizeof(pp->cookieQuote)); memset(pp->cookieQuote, 0, sizeof(pp->cookieQuote));
pp->DoPlayerAction = NULL; pp->DoPlayerAction = nullptr;
pp->SpriteP = NULL; pp->SpriteP = nullptr;
pp->PlayerSprite = -1; pp->PlayerSprite = -1;
pp->UnderSpriteP = NULL; pp->UnderSpriteP = nullptr;
pp->PlayerUnderSprite = -1; pp->PlayerUnderSprite = -1;
memset(pp->HasKey, 0, sizeof(pp->HasKey)); memset(pp->HasKey, 0, sizeof(pp->HasKey));
//pp->WpnFlags = 0; //pp->WpnFlags = 0;
pp->CurWpn = NULL; pp->CurWpn = nullptr;
memset(pp->Wpn, 0, sizeof(pp->Wpn)); memset(pp->Wpn, 0, sizeof(pp->Wpn));
memset(pp->InventoryTics, 0, sizeof(pp->InventoryTics)); memset(pp->InventoryTics, 0, sizeof(pp->InventoryTics));

View file

@ -76,7 +76,7 @@ DECISION GirlNinjaEvasive[] =
{400, InitActorDuck}, // 100 {400, InitActorDuck}, // 100
// {300, InitActorEvade}, // {300, InitActorEvade},
// {800, InitActorRunAway}, // {800, InitActorRunAway},
{1024, NULL} {1024, nullptr}
}; };
DECISION GirlNinjaLostTarget[] = DECISION GirlNinjaLostTarget[] =
@ -228,29 +228,29 @@ STATE s_GirlNinjaRise[5][3] =
{ {
{GIRLNINJA_KNEEL_R0 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[0][1]}, {GIRLNINJA_KNEEL_R0 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[0][1]},
{GIRLNINJA_STAND_R0 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[0][2]}, {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 // pointer to the state group. See StateControl() where
// it says "if (!u->State->Pic)". // it says "if (!u->State->Pic)".
}, },
{ {
{GIRLNINJA_KNEEL_R1 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[1][1]}, {GIRLNINJA_KNEEL_R1 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[1][1]},
{GIRLNINJA_STAND_R1 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[1][2]}, {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_KNEEL_R2 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[2][1]},
{GIRLNINJA_STAND_R2 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[2][2]}, {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_KNEEL_R3 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[3][1]},
{GIRLNINJA_STAND_R3 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[3][2]}, {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_KNEEL_R4 + 0, GIRLNINJA_RISE_RATE, NullGirlNinja, &s_GirlNinjaRise[4][1]},
{GIRLNINJA_STAND_R4 + 0, GIRLNINJA_STAND_RATE, NullGirlNinja, &s_GirlNinjaRise[4][2]}, {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_GirlNinjaRun,
sg_GirlNinjaJump, sg_GirlNinjaJump,
sg_GirlNinjaFall, sg_GirlNinjaFall,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
sg_GirlNinjaRise, sg_GirlNinjaRise,
sg_GirlNinjaSit, sg_GirlNinjaSit,
NULL, nullptr,
NULL, nullptr,
sg_GirlNinjaPain, sg_GirlNinjaPain,
sg_GirlNinjaDie, sg_GirlNinjaDie,
NULL, nullptr,
sg_GirlNinjaDead, sg_GirlNinjaDead,
sg_GirlNinjaDeathJump, sg_GirlNinjaDeathJump,
sg_GirlNinjaDeathFall, sg_GirlNinjaDeathFall,
@ -708,9 +708,9 @@ ACTOR_ACTION_SET GirlNinjaActionSet =
{800, 1024}, {800, 1024},
{sg_GirlNinjaCrossbow, sg_GirlNinjaSticky}, {sg_GirlNinjaCrossbow, sg_GirlNinjaSticky},
{800, 1024}, {800, 1024},
{NULL}, {nullptr},
sg_GirlNinjaDuck, sg_GirlNinjaDuck,
NULL nullptr
}; };
int int

View file

@ -457,28 +457,28 @@ ACTOR_ACTION_SET GoroActionSet =
{ {
sg_GoroStand, sg_GoroStand,
sg_GoroRun, sg_GoroRun,
NULL, //sg_GoroJump, nullptr, //sg_GoroJump,
NULL, //sg_GoroFall, nullptr, //sg_GoroFall,
NULL, //sg_GoroCrawl, nullptr, //sg_GoroCrawl,
NULL, //sg_GoroSwim, nullptr, //sg_GoroSwim,
NULL, //sg_GoroFly, nullptr, //sg_GoroFly,
NULL, //sg_GoroRise, nullptr, //sg_GoroRise,
NULL, //sg_GoroSit, nullptr, //sg_GoroSit,
NULL, //sg_GoroLook, nullptr, //sg_GoroLook,
NULL, //climb nullptr, //climb
sg_GoroPain, sg_GoroPain,
sg_GoroDie, sg_GoroDie,
NULL, //sg_GoroHariKari, nullptr, //sg_GoroHariKari,
sg_GoroDead, sg_GoroDead,
NULL, //sg_GoroDeathJump, nullptr, //sg_GoroDeathJump,
NULL, //sg_GoroDeathFall, nullptr, //sg_GoroDeathFall,
{sg_GoroChop}, {sg_GoroChop},
{1024}, {1024},
{sg_GoroSpell}, {sg_GoroSpell},
{1024}, {1024},
{NULL,NULL}, {nullptr,nullptr},
NULL, nullptr,
NULL nullptr
}; };
int int

View file

@ -71,7 +71,7 @@ DECISION HornetSurprised[] =
DECISION HornetEvasive[] = DECISION HornetEvasive[] =
{ {
{20, InitHornetCircle }, {20, InitHornetCircle },
{1024, NULL }, {1024, nullptr },
}; };
DECISION HornetLostTarget[] = DECISION HornetLostTarget[] =
@ -260,28 +260,28 @@ ACTOR_ACTION_SET HornetActionSet =
{ {
sg_HornetStand, sg_HornetStand,
sg_HornetRun, sg_HornetRun,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, //climb nullptr, //climb
NULL, //pain nullptr, //pain
sg_HornetDie, sg_HornetDie,
NULL, nullptr,
sg_HornetDead, sg_HornetDead,
NULL, nullptr,
NULL, nullptr,
{NULL}, {nullptr},
{0}, {0},
{NULL}, {nullptr},
{0}, {0},
{NULL}, {nullptr},
NULL, nullptr,
NULL nullptr
}; };
int DoHornetMatchPlayerZ(short SpriteNum); int DoHornetMatchPlayerZ(short SpriteNum);

View file

@ -72,14 +72,14 @@ extern PANEL_STATE ps_PanelEnvironSuit[];
INVENTORY_DATA InventoryData[MAX_INVENTORY+1] = INVENTORY_DATA InventoryData[MAX_INVENTORY+1] =
{ {
{"PORTABLE MEDKIT", UseInventoryMedkit, NULL, 0, 1, (FRACUNIT), 0}, {"PORTABLE MEDKIT", UseInventoryMedkit, nullptr, 0, 1, (FRACUNIT), 0},
{"REPAIR KIT", NULL, NULL, 100, 1, (FRACUNIT), INVF_AUTO_USE}, {"REPAIR KIT", nullptr, nullptr, 100, 1, (FRACUNIT), INVF_AUTO_USE},
{"SMOKE BOMB", UseInventoryCloak, StopInventoryCloak, 4, 1, (FRACUNIT), INVF_TIMED}, {"SMOKE BOMB", UseInventoryCloak, StopInventoryCloak, 4, 1, (FRACUNIT), INVF_TIMED},
{"NIGHT VISION", UseInventoryNightVision, StopInventoryNightVision, 3, 1, (FRACUNIT), INVF_TIMED}, {"NIGHT VISION", UseInventoryNightVision, StopInventoryNightVision, 3, 1, (FRACUNIT), INVF_TIMED},
{"GAS BOMB", UseInventoryChemBomb, NULL, 0, 1, (FRACUNIT), INVF_COUNT}, {"GAS BOMB", UseInventoryChemBomb, nullptr, 0, 1, (FRACUNIT), INVF_COUNT},
{"FLASH BOMB", UseInventoryFlashBomb, NULL, 0, 2, (FRACUNIT), INVF_COUNT}, {"FLASH BOMB", UseInventoryFlashBomb, nullptr, 0, 2, (FRACUNIT), INVF_COUNT},
{"CALTROPS", UseInventoryCaltrops, NULL, 0, 3, (FRACUNIT), INVF_COUNT}, {"CALTROPS", UseInventoryCaltrops, nullptr, 0, 3, (FRACUNIT), INVF_COUNT},
{NULL, NULL, NULL, 0, 0, 0, 0} {nullptr, nullptr, nullptr, 0, 0, 0, 0}
}; };
void PanelInvTestSuicide(PANEL_SPRITEp psp) void PanelInvTestSuicide(PANEL_SPRITEp psp)

View file

@ -189,7 +189,7 @@ JS_SpriteSetup(void)
if (tag == MIRROR_CAM && sprite[SpriteNum].picnum != ST1) if (tag == MIRROR_CAM && sprite[SpriteNum].picnum != ST1)
{ {
// Just change it to static, sprite has all the info I need // 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); // RESET(sp->cstat, CSTAT_SPRITE_BLOCK);
// SET(sp->cstat, CSTAT_SPRITE_BLOCK_HITSCAN); // SET(sp->cstat, CSTAT_SPRITE_BLOCK_HITSCAN);
change_sprite_stat(SpriteNum, STAT_SPAWN_SPOT); change_sprite_stat(SpriteNum, STAT_SPAWN_SPOT);
@ -219,9 +219,9 @@ JS_SpriteSetup(void)
} }
else if (tag == TAG_DRIPGEN) 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->RotNum = 0;
u->WaitTics = sp->lotag * 120; 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; int camhoriz;
short w; short w;
int dx, dy, dz, tdx, tdy, tdz, midx, midy; int dx, dy, dz, tdx, tdy, tdz, midx, midy;

View file

@ -649,7 +649,7 @@ DoPhosphorus(int16_t Weapon)
if (TEST(hsp->extra, SPRX_BURNABLE)) if (TEST(hsp->extra, SPRX_BURNABLE))
{ {
if (!hu) if (!hu)
hu = SpawnUser(hit_sprite, hsp->picnum, NULL); hu = SpawnUser(hit_sprite, hsp->picnum, nullptr);
SpawnFireballExp(Weapon); SpawnFireballExp(Weapon);
if (hu) if (hu)
SpawnFireballFlames(Weapon, hit_sprite); SpawnFireballFlames(Weapon, hit_sprite);
@ -2229,7 +2229,7 @@ DoCarryFlag(int16_t Weapon)
{ {
if (fp->lotag) // Trigger everything if there is a if (fp->lotag) // Trigger everything if there is a
// lotag // lotag
DoMatchEverything(NULL, fp->lotag, ON); DoMatchEverything(nullptr, fp->lotag, ON);
} }
if (!TEST_BOOL1(fp)) if (!TEST_BOOL1(fp))
{ {
@ -2241,7 +2241,7 @@ DoCarryFlag(int16_t Weapon)
if (fu->filler >= SP_TAG5(fp)) if (fu->filler >= SP_TAG5(fp))
{ {
fu->filler = 0; 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); //MONO_PRINT(ds);
if (fp->lotag) // Trigger everything if there is a if (fp->lotag) // Trigger everything if there is a
// lotag // lotag
DoMatchEverything(NULL, fp->lotag, ON); DoMatchEverything(nullptr, fp->lotag, ON);
fu->WaitTics = 0; // Tell it to respawn fu->WaitTics = 0; // Tell it to respawn
} }
if (!TEST_BOOL1(fp)) if (!TEST_BOOL1(fp))
@ -2382,7 +2382,7 @@ DoCarryFlagNoDet(int16_t Weapon)
if (fu->filler >= SP_TAG5(fp)) if (fu->filler >= SP_TAG5(fp))
{ {
fu->filler = 0; 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; int nx, ny, nz;
short w; short w;
short id=0,velocity=0; short id=0,velocity=0;
STATEp p=NULL; STATEp p=nullptr;
extern STATE s_UziShellShrap[]; extern STATE s_UziShellShrap[];
extern STATE s_ShotgunShellShrap[]; extern STATE s_ShotgunShellShrap[];
@ -2584,7 +2584,7 @@ static saveable_data saveable_jweapon_data[] =
saveable_module saveable_jweapon = saveable_module saveable_jweapon =
{ {
// code // code
NULL,0, nullptr,0,
// data // data
saveable_jweapon_data, saveable_jweapon_data,

View file

@ -67,7 +67,7 @@ DECISION LavaSurprised[] =
DECISION LavaEvasive[] = DECISION LavaEvasive[] =
{ {
{10, InitActorEvade }, {10, InitActorEvade },
{1024, NULL } {1024, nullptr }
}; };
DECISION LavaLostTarget[] = DECISION LavaLostTarget[] =
@ -427,28 +427,28 @@ ACTOR_ACTION_SET LavaActionSet =
{ {
sg_LavaStand, sg_LavaStand,
sg_LavaRun, sg_LavaRun,
NULL, //sg_LavaJump, nullptr, //sg_LavaJump,
NULL, //sg_LavaFall, nullptr, //sg_LavaFall,
NULL, //sg_LavaCrawl, nullptr, //sg_LavaCrawl,
NULL, //sg_LavaSwim, nullptr, //sg_LavaSwim,
NULL, //sg_LavaFly, nullptr, //sg_LavaFly,
NULL, //sg_LavaRise, nullptr, //sg_LavaRise,
NULL, //sg_LavaSit, nullptr, //sg_LavaSit,
NULL, //sg_LavaLook, nullptr, //sg_LavaLook,
NULL, //climb nullptr, //climb
NULL, //pain nullptr, //pain
sg_LavaDie, sg_LavaDie,
NULL, //sg_LavaHariKari, nullptr, //sg_LavaHariKari,
sg_LavaDead, sg_LavaDead,
NULL, //sg_LavaDeathJump, nullptr, //sg_LavaDeathJump,
NULL, //sg_LavaDeathFall, nullptr, //sg_LavaDeathFall,
{sg_LavaFlame}, {sg_LavaFlame},
{1024}, {1024},
{sg_LavaFlame, sg_LavaThrow, sg_LavaThrow, sg_LavaThrow}, {sg_LavaFlame, sg_LavaThrow, sg_LavaThrow, sg_LavaThrow},
{256, 512, 768, 1024}, {256, 512, 768, 1024},
{NULL}, {nullptr},
NULL, nullptr,
NULL nullptr
}; };
int int

View file

@ -129,7 +129,7 @@ SetupToiletGirl(short SpriteNum)
} }
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
ChangeState(SpriteNum,s_ToiletGirlStand); ChangeState(SpriteNum,s_ToiletGirlStand);
u->Attrib = &ToiletGirlAttrib; u->Attrib = &ToiletGirlAttrib;
@ -368,7 +368,7 @@ SetupWashGirl(short SpriteNum)
u->Health = 60; u->Health = 60;
} }
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
ChangeState(SpriteNum,s_WashGirlStand); ChangeState(SpriteNum,s_WashGirlStand);
u->Attrib = &WashGirlAttrib; u->Attrib = &WashGirlAttrib;
@ -577,7 +577,7 @@ SetupTrashCan(short SpriteNum)
u->Health = 60; u->Health = 60;
} }
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
ChangeState(SpriteNum,s_TrashCanStand); ChangeState(SpriteNum,s_TrashCanStand);
u->Attrib = &TrashCanAttrib; u->Attrib = &TrashCanAttrib;
@ -685,7 +685,7 @@ SetupPachinkoLight(short SpriteNum)
u->Health = 1; u->Health = 1;
} }
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
ChangeState(SpriteNum,s_PachinkoLightStand); ChangeState(SpriteNum,s_PachinkoLightStand);
u->Attrib = &PachinkoLightAttrib; u->Attrib = &PachinkoLightAttrib;
@ -786,7 +786,7 @@ SetupPachinko1(short SpriteNum)
u->Health = 1; u->Health = 1;
} }
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
ChangeState(SpriteNum,s_Pachinko1Stand); ChangeState(SpriteNum,s_Pachinko1Stand);
u->Attrib = &Pachinko1Attrib; u->Attrib = &Pachinko1Attrib;
@ -956,7 +956,7 @@ SetupPachinko2(short SpriteNum)
u->Health = 1; u->Health = 1;
} }
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
ChangeState(SpriteNum,s_Pachinko2Stand); ChangeState(SpriteNum,s_Pachinko2Stand);
u->Attrib = &Pachinko2Attrib; u->Attrib = &Pachinko2Attrib;
@ -1040,7 +1040,7 @@ SetupPachinko3(short SpriteNum)
u->Health = 1; u->Health = 1;
} }
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
ChangeState(SpriteNum,s_Pachinko3Stand); ChangeState(SpriteNum,s_Pachinko3Stand);
u->Attrib = &Pachinko3Attrib; u->Attrib = &Pachinko3Attrib;
@ -1125,7 +1125,7 @@ SetupPachinko4(short SpriteNum)
u->Health = 1; u->Health = 1;
} }
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
ChangeState(SpriteNum,s_Pachinko4Stand); ChangeState(SpriteNum,s_Pachinko4Stand);
u->Attrib = &Pachinko4Attrib; u->Attrib = &Pachinko4Attrib;
@ -1239,7 +1239,7 @@ SetupCarGirl(short SpriteNum)
} }
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
ChangeState(SpriteNum,s_CarGirlStand); ChangeState(SpriteNum,s_CarGirlStand);
u->Attrib = &CarGirlAttrib; u->Attrib = &CarGirlAttrib;
@ -1459,7 +1459,7 @@ SetupMechanicGirl(short SpriteNum)
} }
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
ChangeState(SpriteNum,s_MechanicGirlStand); ChangeState(SpriteNum,s_MechanicGirlStand);
u->Attrib = &MechanicGirlAttrib; u->Attrib = &MechanicGirlAttrib;
@ -1678,7 +1678,7 @@ SetupSailorGirl(short SpriteNum)
} }
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
ChangeState(SpriteNum,s_SailorGirlStand); ChangeState(SpriteNum,s_SailorGirlStand);
u->Attrib = &SailorGirlAttrib; u->Attrib = &SailorGirlAttrib;
@ -1891,7 +1891,7 @@ SetupPruneGirl(short SpriteNum)
} }
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
ChangeState(SpriteNum,s_PruneGirlStand); ChangeState(SpriteNum,s_PruneGirlStand);
u->Attrib = &PruneGirlAttrib; u->Attrib = &PruneGirlAttrib;

View file

@ -587,6 +587,6 @@ saveable_module saveable_morph =
SIZ(saveable_morph_code), SIZ(saveable_morph_code),
// data // data
NULL,0 nullptr,0
}; };
END_SW_NS END_SW_NS

View file

@ -88,7 +88,7 @@ DECISION NinjaEvasive[] =
{400, InitActorDuck}, // 100 {400, InitActorDuck}, // 100
// {300, InitActorEvade}, // {300, InitActorEvade},
// {800, InitActorRunAway}, // {800, InitActorRunAway},
{1024, NULL} {1024, nullptr}
}; };
DECISION NinjaLostTarget[] = DECISION NinjaLostTarget[] =
@ -340,27 +340,27 @@ STATE s_NinjaRise[5][3] =
{ {
{NINJA_KNEEL_R0 + 0, NINJA_RISE_RATE, NullNinja, &s_NinjaRise[0][1]}, {NINJA_KNEEL_R0 + 0, NINJA_RISE_RATE, NullNinja, &s_NinjaRise[0][1]},
{NINJA_STAND_R0 + 0, NINJA_STAND_RATE, NullNinja, &s_NinjaRise[0][2]}, {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_KNEEL_R1 + 0, NINJA_RISE_RATE, NullNinja, &s_NinjaRise[1][1]},
{NINJA_STAND_R1 + 0, NINJA_STAND_RATE, NullNinja, &s_NinjaRise[1][2]}, {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_KNEEL_R2 + 0, NINJA_RISE_RATE, NullNinja, &s_NinjaRise[2][1]},
{NINJA_STAND_R2 + 0, NINJA_STAND_RATE, NullNinja, &s_NinjaRise[2][2]}, {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_KNEEL_R3 + 0, NINJA_RISE_RATE, NullNinja, &s_NinjaRise[3][1]},
{NINJA_STAND_R3 + 0, NINJA_STAND_RATE, NullNinja, &s_NinjaRise[3][2]}, {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_KNEEL_R4 + 0, NINJA_RISE_RATE, NullNinja, &s_NinjaRise[4][1]},
{NINJA_STAND_R4 + 0, NINJA_STAND_RATE, NullNinja, &s_NinjaRise[4][2]}, {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_NinjaFly,
sg_NinjaUzi, sg_NinjaUzi,
sg_NinjaDuck, sg_NinjaDuck,
NULL, nullptr,
sg_NinjaClimb, sg_NinjaClimb,
sg_NinjaPain, sg_NinjaPain,
sg_NinjaDie, sg_NinjaDie,
@ -1627,7 +1627,7 @@ ACTOR_ACTION_SET NinjaSniperActionSet =
{1024}, {1024},
{sg_NinjaUzi}, {sg_NinjaUzi},
{1024}, {1024},
{NULL}, {nullptr},
sg_NinjaDuck, sg_NinjaDuck,
sg_NinjaDive sg_NinjaDive
}; };
@ -1643,7 +1643,7 @@ ACTOR_ACTION_SET NinjaActionSet =
sg_NinjaFly, sg_NinjaFly,
sg_NinjaRise, sg_NinjaRise,
sg_NinjaSit, sg_NinjaSit,
NULL, nullptr,
sg_NinjaClimb, sg_NinjaClimb,
sg_NinjaPain, sg_NinjaPain,
sg_NinjaDie, sg_NinjaDie,
@ -1655,7 +1655,7 @@ ACTOR_ACTION_SET NinjaActionSet =
{1000, 1024}, {1000, 1024},
{sg_NinjaUzi, sg_NinjaStar}, {sg_NinjaUzi, sg_NinjaStar},
{800, 1024}, {800, 1024},
{NULL}, {nullptr},
sg_NinjaDuck, sg_NinjaDuck,
sg_NinjaDive sg_NinjaDive
}; };
@ -1671,7 +1671,7 @@ ACTOR_ACTION_SET NinjaRedActionSet =
sg_NinjaFly, sg_NinjaFly,
sg_NinjaRise, sg_NinjaRise,
sg_NinjaSit, sg_NinjaSit,
NULL, nullptr,
sg_NinjaClimb, sg_NinjaClimb,
sg_NinjaPain, sg_NinjaPain,
sg_NinjaDie, sg_NinjaDie,
@ -1683,7 +1683,7 @@ ACTOR_ACTION_SET NinjaRedActionSet =
{812, 1024}, {812, 1024},
{sg_NinjaUzi, sg_NinjaRocket}, {sg_NinjaUzi, sg_NinjaRocket},
{812, 1024}, {812, 1024},
{NULL}, {nullptr},
sg_NinjaDuck, sg_NinjaDuck,
sg_NinjaDive sg_NinjaDive
}; };
@ -1699,7 +1699,7 @@ ACTOR_ACTION_SET NinjaSeekerActionSet =
sg_NinjaFly, sg_NinjaFly,
sg_NinjaRise, sg_NinjaRise,
sg_NinjaSit, sg_NinjaSit,
NULL, nullptr,
sg_NinjaClimb, sg_NinjaClimb,
sg_NinjaPain, sg_NinjaPain,
sg_NinjaDie, sg_NinjaDie,
@ -1711,7 +1711,7 @@ ACTOR_ACTION_SET NinjaSeekerActionSet =
{812, 1024}, {812, 1024},
{sg_NinjaUzi, sg_NinjaRocket}, {sg_NinjaUzi, sg_NinjaRocket},
{812, 1024}, {812, 1024},
{NULL}, {nullptr},
sg_NinjaDuck, sg_NinjaDuck,
sg_NinjaDive sg_NinjaDive
}; };
@ -1727,7 +1727,7 @@ ACTOR_ACTION_SET NinjaGrenadeActionSet =
sg_NinjaFly, sg_NinjaFly,
sg_NinjaRise, sg_NinjaRise,
sg_NinjaSit, sg_NinjaSit,
NULL, nullptr,
sg_NinjaClimb, sg_NinjaClimb,
sg_NinjaPain, sg_NinjaPain,
sg_NinjaDie, sg_NinjaDie,
@ -1739,7 +1739,7 @@ ACTOR_ACTION_SET NinjaGrenadeActionSet =
{812, 1024}, {812, 1024},
{sg_NinjaUzi, sg_NinjaGrenade}, {sg_NinjaUzi, sg_NinjaGrenade},
{812, 1024}, {812, 1024},
{NULL}, {nullptr},
sg_NinjaDuck, sg_NinjaDuck,
sg_NinjaDive sg_NinjaDive
}; };
@ -1755,7 +1755,7 @@ ACTOR_ACTION_SET NinjaGreenActionSet =
sg_NinjaFly, sg_NinjaFly,
sg_NinjaRise, sg_NinjaRise,
sg_NinjaSit, sg_NinjaSit,
NULL, nullptr,
sg_NinjaClimb, sg_NinjaClimb,
sg_NinjaPain, sg_NinjaPain,
sg_NinjaDie, sg_NinjaDie,
@ -1767,7 +1767,7 @@ ACTOR_ACTION_SET NinjaGreenActionSet =
{912, 1024}, {912, 1024},
{sg_NinjaFlashBomb, sg_NinjaUzi, sg_NinjaMirv, sg_NinjaNapalm}, {sg_NinjaFlashBomb, sg_NinjaUzi, sg_NinjaMirv, sg_NinjaNapalm},
{150, 500, 712, 1024}, {150, 500, 712, 1024},
{NULL}, {nullptr},
sg_NinjaDuck, sg_NinjaDuck,
sg_NinjaDive sg_NinjaDive
}; };
@ -1793,7 +1793,7 @@ ACTOR_ACTION_SET PlayerNinjaActionSet =
sg_NinjaFly, sg_NinjaFly,
sg_NinjaRise, sg_NinjaRise,
sg_NinjaSit, sg_NinjaSit,
NULL, nullptr,
sg_PlayerNinjaClimb, sg_PlayerNinjaClimb,
sg_NinjaPain, sg_NinjaPain,
sg_NinjaDie, sg_NinjaDie,
@ -1805,7 +1805,7 @@ ACTOR_ACTION_SET PlayerNinjaActionSet =
{1000, 1024}, {1000, 1024},
{sg_NinjaStar, sg_NinjaUzi}, {sg_NinjaStar, sg_NinjaUzi},
{800, 1024}, {800, 1024},
{NULL}, {nullptr},
sg_NinjaDuck, sg_NinjaDuck,
sg_PlayerNinjaSwim sg_PlayerNinjaSwim
}; };
@ -1960,7 +1960,7 @@ DoNinjaHariKari(short SpriteNum)
RESET(u->Flags, SPR_FALLING | SPR_JUMPING); RESET(u->Flags, SPR_FALLING | SPR_JUMPING);
u->floor_dist = Z(40); u->floor_dist = Z(40);
u->RotNum = 0; u->RotNum = 0;
u->ActorActionFunc = NULL; u->ActorActionFunc = nullptr;
SET(sp->extra, SPRX_BREAKABLE); SET(sp->extra, SPRX_BREAKABLE);
SET(sp->cstat, CSTAT_SPRITE_BREAKABLE); SET(sp->cstat, CSTAT_SPRITE_BREAKABLE);
@ -1993,7 +1993,7 @@ DoNinjaGrabThroat(short SpriteNum)
RESET(u->Flags, SPR_FALLING | SPR_JUMPING); RESET(u->Flags, SPR_FALLING | SPR_JUMPING);
u->floor_dist = Z(40); u->floor_dist = Z(40);
u->RotNum = 0; u->RotNum = 0;
u->ActorActionFunc = NULL; u->ActorActionFunc = nullptr;
SET(sp->extra, SPRX_BREAKABLE); SET(sp->extra, SPRX_BREAKABLE);
SET(sp->cstat, CSTAT_SPRITE_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_WEAPON_DOWN|PF_WEAPON_RETRACT);
RESET(pp->Flags, PF_DEAD); RESET(pp->Flags, PF_DEAD);
pp->sop_control = NULL; pp->sop_control = nullptr;
pp->sop_riding = NULL; pp->sop_riding = nullptr;
pp->sop_remote = NULL; pp->sop_remote = nullptr;
pp->sop = NULL; pp->sop = nullptr;
DoPlayerResetMovement(pp); DoPlayerResetMovement(pp);
DamageData[u->WeaponNum].Init(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_WEAPON_DOWN|PF_WEAPON_RETRACT);
RESET(pp->Flags, PF_DEAD); RESET(pp->Flags, PF_DEAD);
pp->sop_control = NULL; pp->sop_control = nullptr;
pp->sop_riding = NULL; pp->sop_riding = nullptr;
pp->sop_remote = NULL; pp->sop_remote = nullptr;
pp->sop = NULL; pp->sop = nullptr;
DoPlayerResetMovement(pp); DoPlayerResetMovement(pp);
//if (pp->CurWpn) //if (pp->CurWpn)
// RESET(pp->CurWpn->flags, PANF_DEATH_HIDE); // RESET(pp->CurWpn->flags, PANF_DEATH_HIDE);
@ -2310,7 +2310,7 @@ PlayerPanelSetup(void)
u = User[pp->PlayerSprite].Data(); u = User[pp->PlayerSprite].Data();
ASSERT(u != NULL); ASSERT(u != nullptr);
//u->WeaponNum = WPN_STAR; //u->WeaponNum = WPN_STAR;
//pp->WpnFirstType = WPN_SWORD; //pp->WpnFirstType = WPN_SWORD;
@ -2370,10 +2370,10 @@ PlayerGameReset(PLAYERp pp)
RESET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT); RESET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT);
pp->sop_control = NULL; pp->sop_control = nullptr;
pp->sop_riding = NULL; pp->sop_riding = nullptr;
pp->sop_remote = NULL; pp->sop_remote = nullptr;
pp->sop = NULL; pp->sop = nullptr;
DoPlayerResetMovement(pp); DoPlayerResetMovement(pp);
DamageData[u->WeaponNum].Init(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 COVER_SetReverb(0); // Turn off any echoing that may have been going before
pp->Reverb = 0; 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->posy, pp->posz, pp->angle.ang.asbuild(), 0);
pp->SpriteP = sp = &sprite[sp_num]; pp->SpriteP = sp = &sprite[sp_num];
@ -2438,7 +2438,7 @@ InitPlayerSprite(PLAYERp pp)
NewStateGroup(sp_num, u->ActorActionSet->Run); NewStateGroup(sp_num, u->ActorActionSet->Run);
pp->PlayerUnderSprite = -1; pp->PlayerUnderSprite = -1;
pp->UnderSpriteP = NULL; pp->UnderSpriteP = nullptr;
DoPlayerZrange(pp); DoPlayerZrange(pp);
@ -2475,7 +2475,7 @@ SpawnPlayerUnderSprite(PLAYERp pp)
int pnum = int(pp - Player), sp_num; int pnum = int(pp - Player), sp_num;
sp_num = pp->PlayerUnderSprite = SpawnSprite(STAT_PLAYER_UNDER0 + pnum, 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]; sp = &sprite[sp_num];
u = User[sp_num].Data(); u = User[sp_num].Data();

View file

@ -117,13 +117,13 @@ void pNullAnimator(PANEL_SPRITEp)
PANEL_SPRITEp pFindMatchingSprite(PLAYERp pp, int x, int y, short pri) 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) TRAVERSE(&pp->PanelSpriteList, psp, next)
{ {
// early out // early out
if (psp->priority > pri) if (psp->priority > pri)
return NULL; return nullptr;
if (psp->x == x && psp->y == y && psp->priority == pri) 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 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) TRAVERSE(&pp->PanelSpriteList, psp, next)
{ {
// early out // early out
if (psp->priority > pri) if (psp->priority > pri)
return NULL; return nullptr;
if (psp->ID == id && psp->x == x && psp->y == y && psp->priority == pri) 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) bool pKillScreenSpiteIDs(PLAYERp pp, short id)
{ {
PANEL_SPRITEp psp=NULL, next; PANEL_SPRITEp psp=nullptr, next;
bool found = false; bool found = false;
// Kill ALL sprites with the correct id // Kill ALL sprites with the correct id
@ -177,7 +177,7 @@ bool pKillScreenSpiteIDs(PLAYERp pp, short id)
void pSetSuicide(PANEL_SPRITEp psp) void pSetSuicide(PANEL_SPRITEp psp)
{ {
//SET(psp->flags, PANF_SUICIDE); //SET(psp->flags, PANF_SUICIDE);
//psp->State = NULL; //psp->State = nullptr;
psp->PanelSpriteFunc = pSuicide; psp->PanelSpriteFunc = pSuicide;
} }
@ -663,7 +663,7 @@ WeaponOK(PLAYERp pp)
u = User[pp->PlayerSprite].Data(); u = User[pp->PlayerSprite].Data();
if (u == NULL) if (u == nullptr)
return(false); return(false);
// sword // sword
@ -791,7 +791,7 @@ SpawnSwordBlur(PANEL_SPRITEp psp)
if (psp->PlayerP->SwordAng > 200) if (psp->PlayerP->SwordAng > 200)
return; 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); SET(nsp->flags, PANF_WEAPON_SPRITE);
nsp->ang = psp->ang; nsp->ang = psp->ang;
@ -924,9 +924,9 @@ void RetractCurWpn(PLAYERp pp)
{ {
// special case for uzi reload pieces // special case for uzi reload pieces
cur->picnum = cur->picndx; cur->picnum = cur->picndx;
cur->State = NULL; cur->State = nullptr;
cur->PanelSpriteFunc = SpecialUziRetractFunc; cur->PanelSpriteFunc = SpecialUziRetractFunc;
cur->sibling = NULL; cur->sibling = nullptr;
} }
} }
} }
@ -1244,7 +1244,7 @@ pSwordRetract(PANEL_SPRITEp psp)
if (psp->y >= SWORD_YOFF + tileHeight(picnum)) if (psp->y >= SWORD_YOFF + tileHeight(picnum))
{ {
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_SWORD] = NULL; psp->PlayerP->Wpn[WPN_SWORD] = nullptr;
pKillSprite(psp); pKillSprite(psp);
} }
} }
@ -1355,7 +1355,7 @@ pStarRestTest(PANEL_SPRITEp psp)
void void
InitWeaponStar(PLAYERp pp) InitWeaponStar(PLAYERp pp)
{ {
PANEL_SPRITEp psp = NULL; PANEL_SPRITEp psp = nullptr;
if (Prediction) if (Prediction)
return; return;
@ -1539,7 +1539,7 @@ pStarRetract(PANEL_SPRITEp psp)
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
// kill only in its own routine // kill only in its own routine
psp->PlayerP->Wpn[WPN_STAR] = NULL; psp->PlayerP->Wpn[WPN_STAR] = nullptr;
pKillSprite(psp); pKillSprite(psp);
} }
} }
@ -1924,7 +1924,7 @@ pUziDoneReload(PANEL_SPRITEp psp)
New = InitWeaponUziSecondaryReload(psp); New = InitWeaponUziSecondaryReload(psp);
pp->Wpn[WPN_UZI] = New; pp->Wpn[WPN_UZI] = New;
pp->CurWpn = New; pp->CurWpn = New;
pp->CurWpn->sibling = NULL; pp->CurWpn->sibling = nullptr;
pKillSprite(psp); pKillSprite(psp);
return; return;
@ -1938,8 +1938,8 @@ pUziDoneReload(PANEL_SPRITEp psp)
pp->WpnUziType -= 3; pp->WpnUziType -= 3;
// reset uzi variable // reset uzi variable
pp->Wpn[WPN_UZI] = NULL; pp->Wpn[WPN_UZI] = nullptr;
pp->CurWpn = NULL; pp->CurWpn = nullptr;
// kill uzi eject sequence for good // kill uzi eject sequence for good
pKillSprite(psp); pKillSprite(psp);
@ -1990,7 +1990,7 @@ pUziClip(PANEL_SPRITEp oclip)
void void
InitWeaponUzi(PLAYERp pp) InitWeaponUzi(PLAYERp pp)
{ {
PANEL_SPRITEp psp = NULL; PANEL_SPRITEp psp = nullptr;
if (Prediction) if (Prediction)
return; return;
@ -2076,7 +2076,7 @@ InitWeaponUzi2(PANEL_SPRITEp uzi_orig)
// There is already a second uzi, or it's retracting // 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 // NOTE: PRIMARY is ONLY set when there is a powerup
SET(uzi_orig->flags, PANF_PRIMARY); 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 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); InitWeaponUzi2(psp);
} }
@ -2254,7 +2254,7 @@ pUziRest(PANEL_SPRITEp psp)
{ {
if (pWeaponHideKeys(psp, ps_UziHide)) 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); pSetState(psp->sibling, ps_Uzi2Hide);
return; return;
} }
@ -2387,7 +2387,7 @@ pUziRetract(PANEL_SPRITEp psp)
if (TEST(psp->flags, PANF_RELOAD)) if (TEST(psp->flags, PANF_RELOAD))
{ {
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_UZI] = NULL; psp->PlayerP->Wpn[WPN_UZI] = nullptr;
} }
else else
{ {
@ -2396,7 +2396,7 @@ pUziRetract(PANEL_SPRITEp psp)
{ {
// only reset when primary goes off the screen // only reset when primary goes off the screen
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); 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)) 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 // is taken off of the screen. Lets the primary know that
// he is alone. // he is alone.
if (psp->sibling && psp->sibling->sibling == psp) if (psp->sibling && psp->sibling->sibling == psp)
psp->sibling->sibling = NULL; psp->sibling->sibling = nullptr;
} }
else else
{ {
// only one uzi here is retracting // only one uzi here is retracting
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); 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 void
InitWeaponShotgun(PLAYERp pp) InitWeaponShotgun(PLAYERp pp)
{ {
PANEL_SPRITEp psp = NULL; PANEL_SPRITEp psp = nullptr;
if (Prediction) if (Prediction)
return; return;
@ -2869,16 +2869,16 @@ pShotgunOverlays(PANEL_SPRITEp psp)
PANEL_STATE ps_ShotgunFlash[] = PANEL_STATE ps_ShotgunFlash[] =
{ {
{SHOTGUN_AUTO, 30, NULL, &ps_ShotgunFlash[1], 0,0,0}, {SHOTGUN_AUTO, 30, nullptr, &ps_ShotgunFlash[1], 0,0,0},
{0, 30, NULL, &ps_ShotgunFlash[2], 0,0,0}, {0, 30, nullptr, &ps_ShotgunFlash[2], 0,0,0},
{SHOTGUN_AUTO, 30, NULL, &ps_ShotgunFlash[3], 0,0,0}, {SHOTGUN_AUTO, 30, nullptr, &ps_ShotgunFlash[3], 0,0,0},
{0, 30, NULL, &ps_ShotgunFlash[4], 0,0,0}, {0, 30, nullptr, &ps_ShotgunFlash[4], 0,0,0},
{SHOTGUN_AUTO, 30, NULL, &ps_ShotgunFlash[5], 0,0,0}, {SHOTGUN_AUTO, 30, nullptr, &ps_ShotgunFlash[5], 0,0,0},
{0, 30, NULL, &ps_ShotgunFlash[6], 0,0,0}, {0, 30, nullptr, &ps_ShotgunFlash[6], 0,0,0},
{SHOTGUN_AUTO, 30, NULL, &ps_ShotgunFlash[7], 0,0,0}, {SHOTGUN_AUTO, 30, nullptr, &ps_ShotgunFlash[7], 0,0,0},
{0, 30, NULL, &ps_ShotgunFlash[8], 0,0,0}, {0, 30, nullptr, &ps_ShotgunFlash[8], 0,0,0},
{SHOTGUN_AUTO, 30, NULL, &ps_ShotgunFlash[9], 0,0,0}, {SHOTGUN_AUTO, 30, nullptr, &ps_ShotgunFlash[9], 0,0,0},
{0, 0, NULL, NULL, 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) if (psp->y >= SHOTGUN_YOFF + tileHeight(picnum) + 50)
{ {
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[psp->WeaponType] = NULL; psp->PlayerP->Wpn[psp->WeaponType] = nullptr;
pKillSprite(psp); pKillSprite(psp);
} }
} }
@ -3154,7 +3154,7 @@ PANEL_STATE ps_RetractRail[] =
void void
InitWeaponRail(PLAYERp pp) InitWeaponRail(PLAYERp pp)
{ {
PANEL_SPRITEp psp = NULL; PANEL_SPRITEp psp = nullptr;
if (SW_SHAREWARE) return; if (SW_SHAREWARE) return;
@ -3403,7 +3403,7 @@ pRailRetract(PANEL_SPRITEp psp)
if (psp->y >= RAIL_YOFF + tileHeight(picnum) + 50) if (psp->y >= RAIL_YOFF + tileHeight(picnum) + 50)
{ {
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[psp->WeaponType] = NULL; psp->PlayerP->Wpn[psp->WeaponType] = nullptr;
DeleteNoSoundOwner(psp->PlayerP->PlayerSprite); DeleteNoSoundOwner(psp->PlayerP->PlayerSprite);
pKillSprite(psp); pKillSprite(psp);
} }
@ -3596,7 +3596,7 @@ pHotHeadOverlays(PANEL_SPRITEp psp, short mode)
void void
InitWeaponHothead(PLAYERp pp) InitWeaponHothead(PLAYERp pp)
{ {
PANEL_SPRITEp psp = NULL; PANEL_SPRITEp psp = nullptr;
if (SW_SHAREWARE) return; if (SW_SHAREWARE) return;
@ -3819,7 +3819,7 @@ pHotheadRetract(PANEL_SPRITEp psp)
if (psp->y >= HOTHEAD_YOFF + tileHeight(picnum)) if (psp->y >= HOTHEAD_YOFF + tileHeight(picnum))
{ {
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_HOTHEAD] = NULL; psp->PlayerP->Wpn[WPN_HOTHEAD] = nullptr;
pKillSprite(psp); pKillSprite(psp);
} }
} }
@ -4240,30 +4240,30 @@ pMicroOverlays(PANEL_SPRITEp psp)
PANEL_STATE ps_MicroHeatFlash[] = PANEL_STATE ps_MicroHeatFlash[] =
{ {
{MICRO_HEAT, 30, NULL, &ps_MicroHeatFlash[1], 0,0,0}, {MICRO_HEAT, 30, nullptr, &ps_MicroHeatFlash[1], 0,0,0},
{0, 30, NULL, &ps_MicroHeatFlash[2], 0,0,0}, {0, 30, nullptr, &ps_MicroHeatFlash[2], 0,0,0},
{MICRO_HEAT, 30, NULL, &ps_MicroHeatFlash[3], 0,0,0}, {MICRO_HEAT, 30, nullptr, &ps_MicroHeatFlash[3], 0,0,0},
{0, 30, NULL, &ps_MicroHeatFlash[4], 0,0,0}, {0, 30, nullptr, &ps_MicroHeatFlash[4], 0,0,0},
{MICRO_HEAT, 30, NULL, &ps_MicroHeatFlash[5], 0,0,0}, {MICRO_HEAT, 30, nullptr, &ps_MicroHeatFlash[5], 0,0,0},
{0, 30, NULL, &ps_MicroHeatFlash[6], 0,0,0}, {0, 30, nullptr, &ps_MicroHeatFlash[6], 0,0,0},
{MICRO_HEAT, 30, NULL, &ps_MicroHeatFlash[7], 0,0,0}, {MICRO_HEAT, 30, nullptr, &ps_MicroHeatFlash[7], 0,0,0},
{0, 30, NULL, &ps_MicroHeatFlash[8], 0,0,0}, {0, 30, nullptr, &ps_MicroHeatFlash[8], 0,0,0},
{MICRO_HEAT, 30, NULL, &ps_MicroHeatFlash[9], 0,0,0}, {MICRO_HEAT, 30, nullptr, &ps_MicroHeatFlash[9], 0,0,0},
{0, 0, NULL, NULL, 0,0,0} {0, 0, nullptr, nullptr, 0,0,0}
}; };
PANEL_STATE ps_MicroNukeFlash[] = PANEL_STATE ps_MicroNukeFlash[] =
{ {
{MICRO_SHOT_20, 30, NULL, &ps_MicroNukeFlash[1], 0,0,0}, {MICRO_SHOT_20, 30, nullptr, &ps_MicroNukeFlash[1], 0,0,0},
{0, 30, NULL, &ps_MicroNukeFlash[2], 0,0,0}, {0, 30, nullptr, &ps_MicroNukeFlash[2], 0,0,0},
{MICRO_SHOT_20, 30, NULL, &ps_MicroNukeFlash[3], 0,0,0}, {MICRO_SHOT_20, 30, nullptr, &ps_MicroNukeFlash[3], 0,0,0},
{0, 30, NULL, &ps_MicroNukeFlash[4], 0,0,0}, {0, 30, nullptr, &ps_MicroNukeFlash[4], 0,0,0},
{MICRO_SHOT_20, 30, NULL, &ps_MicroNukeFlash[5], 0,0,0}, {MICRO_SHOT_20, 30, nullptr, &ps_MicroNukeFlash[5], 0,0,0},
{0, 30, NULL, &ps_MicroNukeFlash[6], 0,0,0}, {0, 30, nullptr, &ps_MicroNukeFlash[6], 0,0,0},
{MICRO_SHOT_20, 30, NULL, &ps_MicroNukeFlash[7], 0,0,0}, {MICRO_SHOT_20, 30, nullptr, &ps_MicroNukeFlash[7], 0,0,0},
{0, 30, NULL, &ps_MicroNukeFlash[8], 0,0,0}, {0, 30, nullptr, &ps_MicroNukeFlash[8], 0,0,0},
{MICRO_SHOT_20, 30, NULL, &ps_MicroNukeFlash[9], 0,0,0}, {MICRO_SHOT_20, 30, nullptr, &ps_MicroNukeFlash[9], 0,0,0},
{0, 0, NULL, NULL, 0,0,0} {0, 0, nullptr, nullptr, 0,0,0}
}; };
void void
@ -4377,7 +4377,7 @@ pMicroRetract(PANEL_SPRITEp psp)
if (psp->y >= MICRO_YOFF + tileHeight(picnum)) if (psp->y >= MICRO_YOFF + tileHeight(picnum))
{ {
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_MICRO] = NULL; psp->PlayerP->Wpn[WPN_MICRO] = nullptr;
pKillSprite(psp); pKillSprite(psp);
} }
} }
@ -4687,7 +4687,7 @@ pHeartRetract(PANEL_SPRITEp psp)
if (psp->y >= HEART_YOFF + tileHeight(picnum)) if (psp->y >= HEART_YOFF + tileHeight(picnum))
{ {
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_HEART] = NULL; psp->PlayerP->Wpn[WPN_HEART] = nullptr;
pKillSprite(psp); pKillSprite(psp);
} }
} }
@ -5178,7 +5178,7 @@ pGrenadeRetract(PANEL_SPRITEp psp)
if (psp->y >= GRENADE_YOFF + tileHeight(picnum)) if (psp->y >= GRENADE_YOFF + tileHeight(picnum))
{ {
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_GRENADE] = NULL; psp->PlayerP->Wpn[WPN_GRENADE] = nullptr;
pKillSprite(psp); pKillSprite(psp);
} }
} }
@ -5425,7 +5425,7 @@ pMineRetract(PANEL_SPRITEp psp)
if (psp->y >= MINE_YOFF + tileHeight(picnum)) if (psp->y >= MINE_YOFF + tileHeight(picnum))
{ {
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_MINE] = NULL; psp->PlayerP->Wpn[WPN_MINE] = nullptr;
pKillSprite(psp); pKillSprite(psp);
} }
} }
@ -5639,7 +5639,7 @@ pChopsWait(PANEL_SPRITEp psp)
void ChopsSetRetract(PLAYERp pp) void ChopsSetRetract(PLAYERp pp)
{ {
if (pp == NULL || pp->Chops == NULL) if (pp == nullptr || pp->Chops == nullptr)
return; return;
pSetState(pp->Chops, pp->Chops->RetractState); pSetState(pp->Chops, pp->Chops->RetractState);
@ -5657,7 +5657,7 @@ pChopsRetract(PANEL_SPRITEp psp)
{ {
if (RANDOM_RANGE(1000) > 800) if (RANDOM_RANGE(1000) > 800)
PlayerSound(DIGI_GETTINGSTIFF,v3df_follow|v3df_dontpan,psp->PlayerP); PlayerSound(DIGI_GETTINGSTIFF,v3df_follow|v3df_dontpan,psp->PlayerP);
psp->PlayerP->Chops = NULL; psp->PlayerP->Chops = nullptr;
pKillSprite(psp); pKillSprite(psp);
} }
} }
@ -5734,7 +5734,7 @@ SpawnFistBlur(PANEL_SPRITEp psp)
if (psp->PlayerP->FistAng > 200) if (psp->PlayerP->FistAng > 200)
return; 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); SET(nsp->flags, PANF_WEAPON_SPRITE);
nsp->ang = psp->ang; nsp->ang = psp->ang;
@ -6281,7 +6281,7 @@ pFistRetract(PANEL_SPRITEp psp)
if (psp->y >= FIST_YOFF + tileHeight(picnum)) if (psp->y >= FIST_YOFF + tileHeight(picnum))
{ {
RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT); RESET(psp->PlayerP->Flags, PF_WEAPON_RETRACT);
psp->PlayerP->Wpn[WPN_FIST] = NULL; psp->PlayerP->Wpn[WPN_FIST] = nullptr;
pKillSprite(psp); pKillSprite(psp);
} }
} }
@ -6468,7 +6468,7 @@ pSpawnSprite(PLAYERp pp, PANEL_STATEp state, uint8_t priority, double x, double
psp->ox = psp->x = x; psp->ox = psp->x = x;
psp->oy = psp->y = y; psp->oy = psp->y = y;
pSetState(psp, state); pSetState(psp, state);
if (state == NULL) if (state == nullptr)
psp->picndx = -1; psp->picndx = -1;
else else
psp->picndx = state->picndx; 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++) 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].pic = -1;
psp->over[i].xoff = -1; psp->over[i].xoff = -1;
psp->over[i].yoff = -1; psp->over[i].yoff = -1;
@ -6508,7 +6508,7 @@ pKillSprite(PANEL_SPRITEp psp)
void void
pClearSpriteList(PLAYERp pp) pClearSpriteList(PLAYERp pp)
{ {
PANEL_SPRITEp psp=NULL, next_psp=NULL; PANEL_SPRITEp psp=nullptr, next_psp=nullptr;
TRAVERSE(&pp->PanelSpriteList, psp, next_psp) TRAVERSE(&pp->PanelSpriteList, psp, next_psp)
{ {
@ -6582,7 +6582,7 @@ void
pDisplaySprites(PLAYERp pp, double smoothratio) pDisplaySprites(PLAYERp pp, double smoothratio)
{ {
USERp u = User[pp->PlayerSprite].Data(); USERp u = User[pp->PlayerSprite].Data();
PANEL_SPRITEp psp=NULL, next=NULL; PANEL_SPRITEp psp=nullptr, next=nullptr;
short shade, picnum, overlay_shade = 0; short shade, picnum, overlay_shade = 0;
double x, y; double x, y;
unsigned i; unsigned i;
@ -6870,7 +6870,7 @@ pDisplaySprites(PLAYERp pp, double smoothratio)
void void
pSpriteControl(PLAYERp pp) pSpriteControl(PLAYERp pp)
{ {
PANEL_SPRITEp psp=NULL, next=NULL; PANEL_SPRITEp psp=nullptr, next=nullptr;
TRAVERSE(&pp->PanelSpriteList, psp, next) TRAVERSE(&pp->PanelSpriteList, psp, next)
{ {

View file

@ -1397,7 +1397,7 @@ DoPlayerWarpTeleporter(PLAYERp pp)
#endif #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; return;
switch (SP_TAG3(sp_warp)) switch (SP_TAG3(sp_warp))
@ -1790,7 +1790,7 @@ UpdatePlayerUnderSprite(PLAYERp pp)
{ {
KillSprite(pp->PlayerUnderSprite); KillSprite(pp->PlayerUnderSprite);
pp->PlayerUnderSprite = -1; pp->PlayerUnderSprite = -1;
pp->UnderSpriteP = NULL; pp->UnderSpriteP = nullptr;
} }
return; return;
} }
@ -1941,8 +1941,8 @@ DoPlayerZrange(PLAYERp pp)
// 16384+sector (sector first touched) or // 16384+sector (sector first touched) or
// 49152+spritenum (sprite first touched) // 49152+spritenum (sprite first touched)
pp->lo_sectp = pp->hi_sectp = NULL; pp->lo_sectp = pp->hi_sectp = nullptr;
pp->lo_sp = pp->hi_sp = NULL; pp->lo_sp = pp->hi_sp = nullptr;
if (TEST(ceilhit, 0xc000) == 49152) if (TEST(ceilhit, 0xc000) == 49152)
{ {
@ -1962,7 +1962,7 @@ DoPlayerZrange(PLAYERp pp)
{ {
pp->lo_sectp = &sector[pp->lo_sp->sectnum]; pp->lo_sectp = &sector[pp->lo_sp->sectnum];
pp->loz = pp->lo_sp->z; pp->loz = pp->lo_sp->z;
pp->lo_sp = NULL; pp->lo_sp = nullptr;
} }
} }
else else
@ -3574,7 +3574,7 @@ DoPlayerClimb(PLAYERp pp)
neartag(pp->posx, pp->posy, pp->posz, neartag(pp->posx, pp->posy, pp->posz,
pp->cursectnum, pp->angle.ang.asbuild(), pp->cursectnum, pp->angle.ang.asbuild(),
&sec, &wal, &spr, &sec, &wal, &spr,
&dist, 800L, NTAG_SEARCH_LO_HI, NULL); &dist, 800L, NTAG_SEARCH_LO_HI, nullptr);
if (wal >= 0) if (wal >= 0)
{ {
@ -3891,7 +3891,7 @@ FindNearSprite(SPRITEp sp, short stat)
{ {
int fs; int fs;
int dist, near_dist = 15000; int dist, near_dist = 15000;
SPRITEp fp, near_fp = NULL; SPRITEp fp, near_fp = nullptr;
StatIterator it(stat); StatIterator it(stat);
@ -3934,7 +3934,7 @@ PlayerOnLadder(PLAYERp pp)
neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, pp->angle.ang.asbuild(), neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, pp->angle.ang.asbuild(),
&neartagsector, &neartagwall, &neartagsprite, &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()); 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]), neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, NORM_ANGLE(pp->angle.ang.asbuild() + angles[i]),
&sec, &wal, &spr, &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) if (wal < 0 || dist < 100 || wall[wal].lotag != TAG_WALL_CLIMB)
return false; return false;
@ -4272,7 +4272,7 @@ DoPlayerWarpToUnderwater(PLAYERp pp)
USERp u = User[pp->PlayerSprite].Data(); USERp u = User[pp->PlayerSprite].Data();
int i; int i;
SECT_USERp sectu = SectUser[pp->cursectnum].Data(); SECT_USERp sectu = SectUser[pp->cursectnum].Data();
SPRITEp under_sp = NULL, over_sp = NULL; SPRITEp under_sp = nullptr, over_sp = nullptr;
bool Found = false; bool Found = false;
short over, under; short over, under;
@ -4351,7 +4351,7 @@ DoPlayerWarpToSurface(PLAYERp pp)
SECT_USERp sectu = SectUser[pp->cursectnum].Data(); SECT_USERp sectu = SectUser[pp->cursectnum].Data();
short over, under; short over, under;
SPRITEp under_sp = NULL, over_sp = NULL; SPRITEp under_sp = nullptr, over_sp = nullptr;
bool Found = false; bool Found = false;
if (Prediction) if (Prediction)
@ -5240,7 +5240,7 @@ DoPlayerBeginOperate(PLAYERp pp)
{ {
UseInventoryRepairKit(pp); UseInventoryRepairKit(pp);
sop->max_damage = User[sop->sp_child - sprite]->MaxHealth; sop->max_damage = User[sop->sp_child - sprite]->MaxHealth;
VehicleSetSmoke(sop, NULL); VehicleSetSmoke(sop, nullptr);
RESET(sop->flags, SOBJ_BROKEN); RESET(sop->flags, SOBJ_BROKEN);
} }
else else
@ -5328,7 +5328,7 @@ DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop)
{ {
UseInventoryRepairKit(pp); UseInventoryRepairKit(pp);
sop->max_damage = User[sop->sp_child - sprite]->MaxHealth; sop->max_damage = User[sop->sp_child - sprite]->MaxHealth;
VehicleSetSmoke(sop, NULL); VehicleSetSmoke(sop, nullptr);
RESET(sop->flags, SOBJ_BROKEN); RESET(sop->flags, SOBJ_BROKEN);
} }
else else
@ -5478,12 +5478,12 @@ DoPlayerStopOperate(PLAYERp pp)
if (pp->sop_control) if (pp->sop_control)
{ {
pp->sop_control->controller = NULL; pp->sop_control->controller = nullptr;
} }
pp->sop_control = NULL; pp->sop_control = nullptr;
pp->sop_riding = NULL; pp->sop_riding = nullptr;
pp->sop_remote = NULL; pp->sop_remote = nullptr;
pp->sop = NULL; pp->sop = nullptr;
DoPlayerBeginRun(pp); 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)); sprintf(ds,"%s puts the Smack Dab on %s with his %s.",p2,p1,DeathString(pp->HitBy));
return ds; return ds;
} }
return NULL; return nullptr;
}; };
void void
@ -5923,10 +5923,10 @@ DoPlayerBeginDie(PLAYERp pp)
pp->ceiling_dist = PLAYER_WADE_CEILING_DIST; pp->ceiling_dist = PLAYER_WADE_CEILING_DIST;
ASSERT(pp->DeathType < SIZ(PlayerDeathFunc)); ASSERT(pp->DeathType < SIZ(PlayerDeathFunc));
pp->DoPlayerAction = PlayerDeathFunc[pp->DeathType]; pp->DoPlayerAction = PlayerDeathFunc[pp->DeathType];
pp->sop_control = NULL; pp->sop_control = nullptr;
pp->sop_remote = NULL; pp->sop_remote = nullptr;
pp->sop_riding = NULL; pp->sop_riding = nullptr;
pp->sop = NULL; pp->sop = nullptr;
RESET(pp->Flags, PF_TWO_UZI); RESET(pp->Flags, PF_TWO_UZI);
NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Run); NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Run);
@ -6171,10 +6171,10 @@ void DoPlayerDeathCheckKeys(PLAYERp pp)
DoPlayerZrange(pp); DoPlayerZrange(pp);
pp->sop_control = NULL; pp->sop_control = nullptr;
pp->sop_remote = NULL; pp->sop_remote = nullptr;
pp->sop_riding = NULL; pp->sop_riding = nullptr;
pp->sop = NULL; pp->sop = nullptr;
RESET(pp->Flags, PF_WEAPON_DOWN|PF_WEAPON_RETRACT); RESET(pp->Flags, PF_WEAPON_DOWN|PF_WEAPON_RETRACT);
RESET(pp->Flags, PF_DEAD); RESET(pp->Flags, PF_DEAD);
@ -6285,10 +6285,10 @@ SPRITEp DoPlayerDeathCheckKick(PLAYERp pp)
NewStateGroup(pp->PlayerSprite, sg_PlayerHeadFly); NewStateGroup(pp->PlayerSprite, sg_PlayerHeadFly);
SET(pp->Flags, PF_JUMPING); SET(pp->Flags, PF_JUMPING);
SpawnShrap(pp->PlayerSprite, -1); SpawnShrap(pp->PlayerSprite, -1);
return NULL; return nullptr;
} }
return NULL; return nullptr;
} }
@ -6772,7 +6772,7 @@ PlayerStateControl(int16_t SpriteNum)
// Convienience var // Convienience var
u = User[SpriteNum].Data(); u = User[SpriteNum].Data();
if (u == NULL) if (u == nullptr)
return; return;
u->Tics += synctics; u->Tics += synctics;
@ -6863,7 +6863,7 @@ MoveSkipSavePos(void)
sp = &sprite[i]; sp = &sprite[i];
u = User[i].Data(); u = User[i].Data();
if (sp == NULL || u == NULL) if (sp == nullptr || u == nullptr)
continue; continue;
sp->backuppos(); sp->backuppos();
@ -6887,7 +6887,7 @@ MoveSkipSavePos(void)
sp = &sprite[i]; sp = &sprite[i];
u = User[i].Data(); u = User[i].Data();
if (sp == NULL || u == NULL) if (sp == nullptr || u == nullptr)
continue; continue;
sp->backuppos(); sp->backuppos();
u->oz = sp->oz; u->oz = sp->oz;
@ -7438,7 +7438,7 @@ InitMultiPlayerInfo(void)
continue; 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); ASSERT(start0 >= 0);
User[start0].Clear(); User[start0].Clear();
sprite[start0].picnum = ST1; sprite[start0].picnum = ST1;

View file

@ -180,7 +180,7 @@ void QuakeViewChange(PLAYERp pp, int *z_diff, int *x_diff, int *y_diff, short *a
{ {
int i; int i;
SPRITEp sp; SPRITEp sp;
SPRITEp save_sp = NULL; SPRITEp save_sp = nullptr;
int dist,save_dist = 999999; int dist,save_dist = 999999;
int dist_diff, scale_value; int dist_diff, scale_value;
int ang_amt; int ang_amt;
@ -368,7 +368,7 @@ saveable_module saveable_quake =
SIZ(saveable_quake_code), SIZ(saveable_quake_code),
// data // data
NULL,0 nullptr,0
}; };
END_SW_NS END_SW_NS

View file

@ -77,7 +77,7 @@ DECISION RipperSurprised[] =
DECISION RipperEvasive[] = DECISION RipperEvasive[] =
{ {
{6, InitRipperHang}, {6, InitRipperHang},
{1024, NULL} {1024, nullptr}
}; };
DECISION RipperLostTarget[] = DECISION RipperLostTarget[] =
@ -765,16 +765,16 @@ ACTOR_ACTION_SET RipperActionSet =
sg_RipperRun, sg_RipperRun,
sg_RipperJump, sg_RipperJump,
sg_RipperFall, sg_RipperFall,
NULL, // sg_RipperCrawl, nullptr, // sg_RipperCrawl,
NULL, // sg_RipperSwim, nullptr, // sg_RipperSwim,
NULL, // sg_RipperFly, nullptr, // sg_RipperFly,
NULL, // sg_RipperRise, nullptr, // sg_RipperRise,
NULL, // sg_RipperSit, nullptr, // sg_RipperSit,
NULL, // sg_RipperLook, nullptr, // sg_RipperLook,
NULL, // climb nullptr, // climb
sg_RipperPain, sg_RipperPain,
sg_RipperDie, sg_RipperDie,
NULL, // sg_RipperHariKari, nullptr, // sg_RipperHariKari,
sg_RipperDead, sg_RipperDead,
sg_RipperDeathJump, sg_RipperDeathJump,
sg_RipperDeathFall, sg_RipperDeathFall,
@ -783,8 +783,8 @@ ACTOR_ACTION_SET RipperActionSet =
{sg_RipperJumpAttack, sg_RipperSpew}, {sg_RipperJumpAttack, sg_RipperSpew},
{400, 1024}, {400, 1024},
{sg_RipperHeart, sg_RipperHang}, {sg_RipperHeart, sg_RipperHang},
NULL, nullptr,
NULL nullptr
}; };
ACTOR_ACTION_SET RipperBrownActionSet = ACTOR_ACTION_SET RipperBrownActionSet =
@ -793,16 +793,16 @@ ACTOR_ACTION_SET RipperBrownActionSet =
sg_RipperRun, sg_RipperRun,
sg_RipperJump, sg_RipperJump,
sg_RipperFall, sg_RipperFall,
NULL, // sg_RipperCrawl, nullptr, // sg_RipperCrawl,
NULL, // sg_RipperSwim, nullptr, // sg_RipperSwim,
NULL, // sg_RipperFly, nullptr, // sg_RipperFly,
NULL, // sg_RipperRise, nullptr, // sg_RipperRise,
NULL, // sg_RipperSit, nullptr, // sg_RipperSit,
NULL, // sg_RipperLook, nullptr, // sg_RipperLook,
NULL, // climb nullptr, // climb
sg_RipperPain, // pain sg_RipperPain, // pain
sg_RipperDie, sg_RipperDie,
NULL, // sg_RipperHariKari, nullptr, // sg_RipperHariKari,
sg_RipperDead, sg_RipperDead,
sg_RipperDeathJump, sg_RipperDeathJump,
sg_RipperDeathFall, sg_RipperDeathFall,
@ -811,8 +811,8 @@ ACTOR_ACTION_SET RipperBrownActionSet =
{sg_RipperJumpAttack, sg_RipperSwipe}, {sg_RipperJumpAttack, sg_RipperSwipe},
{800, 1024}, {800, 1024},
{sg_RipperHeart, sg_RipperHang}, {sg_RipperHeart, sg_RipperHang},
NULL, nullptr,
NULL nullptr
}; };
int int

View file

@ -835,16 +835,16 @@ ACTOR_ACTION_SET Ripper2ActionSet =
sg_Ripper2Run, sg_Ripper2Run,
sg_Ripper2Jump, sg_Ripper2Jump,
sg_Ripper2Fall, sg_Ripper2Fall,
NULL, // sg_Ripper2Crawl, nullptr, // sg_Ripper2Crawl,
NULL, // sg_Ripper2Swim, nullptr, // sg_Ripper2Swim,
NULL, // sg_Ripper2Fly, nullptr, // sg_Ripper2Fly,
NULL, // sg_Ripper2Rise, nullptr, // sg_Ripper2Rise,
NULL, // sg_Ripper2Sit, nullptr, // sg_Ripper2Sit,
NULL, // sg_Ripper2Look, nullptr, // sg_Ripper2Look,
NULL, // climb nullptr, // climb
sg_Ripper2Pain, sg_Ripper2Pain,
sg_Ripper2Die, sg_Ripper2Die,
NULL, // sg_Ripper2HariKari, nullptr, // sg_Ripper2HariKari,
sg_Ripper2Dead, sg_Ripper2Dead,
sg_Ripper2DeathJump, sg_Ripper2DeathJump,
sg_Ripper2DeathFall, sg_Ripper2DeathFall,
@ -853,8 +853,8 @@ ACTOR_ACTION_SET Ripper2ActionSet =
{sg_Ripper2JumpAttack, sg_Ripper2Kong}, {sg_Ripper2JumpAttack, sg_Ripper2Kong},
{500, 1024}, {500, 1024},
{sg_Ripper2Heart, sg_Ripper2Hang}, {sg_Ripper2Heart, sg_Ripper2Hang},
NULL, nullptr,
NULL nullptr
}; };
ACTOR_ACTION_SET Ripper2BrownActionSet = ACTOR_ACTION_SET Ripper2BrownActionSet =
@ -863,16 +863,16 @@ ACTOR_ACTION_SET Ripper2BrownActionSet =
sg_Ripper2Run, sg_Ripper2Run,
sg_Ripper2Jump, sg_Ripper2Jump,
sg_Ripper2Fall, sg_Ripper2Fall,
NULL, // sg_Ripper2Crawl, nullptr, // sg_Ripper2Crawl,
NULL, // sg_Ripper2Swim, nullptr, // sg_Ripper2Swim,
NULL, // sg_Ripper2Fly, nullptr, // sg_Ripper2Fly,
NULL, // sg_Ripper2Rise, nullptr, // sg_Ripper2Rise,
NULL, // sg_Ripper2Sit, nullptr, // sg_Ripper2Sit,
NULL, // sg_Ripper2Look, nullptr, // sg_Ripper2Look,
NULL, // climb nullptr, // climb
sg_Ripper2Pain, // pain sg_Ripper2Pain, // pain
sg_Ripper2Die, sg_Ripper2Die,
NULL, // sg_Ripper2HariKari, nullptr, // sg_Ripper2HariKari,
sg_Ripper2Dead, sg_Ripper2Dead,
sg_Ripper2DeathJump, sg_Ripper2DeathJump,
sg_Ripper2DeathFall, sg_Ripper2DeathFall,
@ -881,8 +881,8 @@ ACTOR_ACTION_SET Ripper2BrownActionSet =
{sg_Ripper2JumpAttack, sg_Ripper2Kong}, {sg_Ripper2JumpAttack, sg_Ripper2Kong},
{400, 1024}, {400, 1024},
{sg_Ripper2Heart, sg_Ripper2Hang}, {sg_Ripper2Heart, sg_Ripper2Hang},
NULL, nullptr,
NULL nullptr
}; };
int int

View file

@ -544,7 +544,7 @@ void FAFgetzrange(int32_t x, int32_t y, int32_t z, int16_t sectnum,
if (uppersect < 0) if (uppersect < 0)
return; // _ErrMsg(ERR_STD_ARG, "Did not find a sector at %d, %d, %d", x, y, newz); 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); 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)) else if (FAF_ConnectFloor(sectnum) && !TEST(sector[sectnum].floorstat, FLOOR_STAT_FAF_BLOCK_HITSCAN))
//if (FAF_ConnectFloor(sectnum)) //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) if (lowersect < 0)
return; // _ErrMsg(ERR_STD_ARG, "Did not find a sector at %d, %d, %d", x, y, newz); 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); 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); WaterAdjust(*florhit, loz);
} }
} }
@ -612,7 +612,7 @@ void FAFgetzrangepoint(int32_t x, int32_t y, int32_t z, int16_t sectnum,
if (uppersect < 0) if (uppersect < 0)
return; // _ErrMsg(ERR_STD_ARG, "Did not find a sector at %d, %d, %d, sectnum %d", x, y, newz, sectnum); 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); 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)) else if (FAF_ConnectFloor(sectnum) && !TEST(sector[sectnum].floorstat, FLOOR_STAT_FAF_BLOCK_HITSCAN))
//if (FAF_ConnectFloor(sectnum)) //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) if (lowersect < 0)
return; // _ErrMsg(ERR_STD_ARG, "Did not find a sector at %d, %d, %d, sectnum %d", x, y, newz, sectnum); 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); getzrangepoint(x, y, newz, lowersect, &foo1, &foo2, loz, florhit);
SectorZadjust(-1, NULL, *florhit, loz); SectorZadjust(-1, nullptr, *florhit, loz);
WaterAdjust(*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 xoff = 0;
int yoff = 0; int yoff = 0;
int i; int i;
SPRITEp sp = NULL; SPRITEp sp = nullptr;
int pix_diff; int pix_diff;
int newz; 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 xoff = 0;
int yoff = 0; int yoff = 0;
int i; int i;
SPRITEp sp = NULL; SPRITEp sp = nullptr;
int newz; int newz;
int pix_diff; int pix_diff;

View file

@ -314,7 +314,7 @@ int DoRotatorMove(short SpriteNum)
SPRITEp sp = u->SpriteP; SPRITEp sp = u->SpriteP;
ROTATORp r; ROTATORp r;
short ndx,w,startwall,endwall; short ndx,w,startwall,endwall;
SPRITEp pivot = NULL; SPRITEp pivot = nullptr;
int i; int i;
vec2_t nxy; vec2_t nxy;
int dist,closest; int dist,closest;
@ -358,7 +358,7 @@ int DoRotatorMove(short SpriteNum)
SetRotatorInactive(SpriteNum); SetRotatorInactive(SpriteNum);
if (SP_TAG6(sp)) if (SP_TAG6(sp))
DoMatchEverything(NULL, SP_TAG6(sp), -1); DoMatchEverything(nullptr, SP_TAG6(sp), -1);
// wait a bit and close it // wait a bit and close it
if (u->WaitTics) if (u->WaitTics)
@ -385,7 +385,7 @@ int DoRotatorMove(short SpriteNum)
} }
if (SP_TAG6(sp) && TEST_BOOL5(sp)) if (SP_TAG6(sp) && TEST_BOOL5(sp))
DoMatchEverything(NULL, SP_TAG6(sp), -1); DoMatchEverything(nullptr, SP_TAG6(sp), -1);
} }
if (TEST_BOOL2(sp)) if (TEST_BOOL2(sp))
@ -468,7 +468,7 @@ saveable_module saveable_rotator =
SIZ(saveable_rotator_code), SIZ(saveable_rotator_code),
// data // data
NULL,0 nullptr,0
}; };
END_SW_NS END_SW_NS

View file

@ -145,7 +145,7 @@ int Saveable_RestoreCodeSym(savedcodesym *sym, void **ptr)
{ {
if (sym->module == 0) if (sym->module == 0)
{ {
*ptr = NULL; *ptr = nullptr;
return 0; return 0;
} }
@ -169,7 +169,7 @@ int Saveable_RestoreDataSym(saveddatasym *sym, void **ptr)
{ {
if (sym->module == 0) if (sym->module == 0)
{ {
*ptr = NULL; *ptr = nullptr;
return 0; return 0;
} }

View file

@ -242,7 +242,7 @@ void LoadKVXFromScript(const char* filename)
} }
while (script_p < scriptend_p); while (script_p < scriptend_p);
script_p = NULL; script_p = nullptr;
} }
/* /*

View file

@ -382,12 +382,12 @@ SectorSetup(void)
{ {
memset(&SectorObject[ndx], -1, sizeof(SectorObject[0])); memset(&SectorObject[ndx], -1, sizeof(SectorObject[0]));
// 0 pointers // 0 pointers
//memset(&SectorObject[ndx].sectp, NULL, sizeof(SectorObject[0].sectp)); //memset(&SectorObject[ndx].sectp, nullptr, sizeof(SectorObject[0].sectp));
SectorObject[ndx].PreMoveAnimator = NULL; SectorObject[ndx].PreMoveAnimator = nullptr;
SectorObject[ndx].PostMoveAnimator = NULL; SectorObject[ndx].PostMoveAnimator = nullptr;
SectorObject[ndx].Animator = NULL; SectorObject[ndx].Animator = nullptr;
SectorObject[ndx].controller = NULL; SectorObject[ndx].controller = nullptr;
SectorObject[ndx].sp_child = NULL; SectorObject[ndx].sp_child = nullptr;
SectorObject[ndx].xmid = INT32_MAX; SectorObject[ndx].xmid = INT32_MAX;
} }
@ -1083,7 +1083,7 @@ DoExplodeSector(short match)
continue; continue;
if (!User[cf].Data()) if (!User[cf].Data())
/*u = */SpawnUser(cf, 0, NULL); /*u = */SpawnUser(cf, 0, nullptr);
sectp = &sector[esp->sectnum]; sectp = &sector[esp->sectnum];
@ -1429,7 +1429,7 @@ WeaponExplodeSectorInRange(short weapon)
// don't use them // don't use them
KillMatchingCrackSprites(match); KillMatchingCrackSprites(match);
DoExplodeSector(match); DoExplodeSector(match);
DoMatchEverything(NULL, match, -1); DoMatchEverything(nullptr, match, -1);
#else #else
// pass in explosion type // pass in explosion type
MissileHitMatch(weapon, WPN_ROCKET, i); MissileHitMatch(weapon, WPN_ROCKET, i);
@ -1592,7 +1592,7 @@ void DoMatchEverything(PLAYERp pp, short match, short state)
bak = GlobPlayerP; bak = GlobPlayerP;
GlobPlayerP = pp; GlobPlayerP = pp;
// CAREFUL! pp == NULL is a valid case for this routine // CAREFUL! pp == nullptr is a valid case for this routine
DoStopSoundSpotMatch(match); DoStopSoundSpotMatch(match);
DoSoundSpotMatch(match, 1, SOUND_EVERYTHING_TYPE); DoSoundSpotMatch(match, 1, SOUND_EVERYTHING_TYPE);
GlobPlayerP = bak; GlobPlayerP = bak;
@ -1669,7 +1669,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum].Data(); USERp u = User[SpriteNum].Data();
PLAYERp pp = NULL; PLAYERp pp = nullptr;
short state; short state;
short key_num=0; short key_num=0;
extern STATE s_Pachinko1Operate[]; extern STATE s_Pachinko1Operate[];
@ -1925,7 +1925,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
change_sprite_stat(SpriteNum, STAT_NO_STATE); change_sprite_stat(SpriteNum, STAT_NO_STATE);
u = SpawnUser(SpriteNum, 0, NULL); u = SpawnUser(SpriteNum, 0, nullptr);
u->ActorActionFunc = DoGrating; u->ActorActionFunc = DoGrating;
@ -1951,7 +1951,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
{ {
state = AnimateSwitch(sp, -1); state = AnimateSwitch(sp, -1);
DoMatchEverything(NULL, sp->hitag, state); DoMatchEverything(nullptr, sp->hitag, state);
sp->hitag = 0; sp->hitag = 0;
sp->lotag = 0; sp->lotag = 0;
@ -2185,13 +2185,13 @@ OperateTripTrigger(PLAYERp pp)
case TAG_TRIGGER_EXPLODING_SECTOR: case TAG_TRIGGER_EXPLODING_SECTOR:
{ {
DoMatchEverything(NULL, sector[pp->cursectnum].hitag, -1); DoMatchEverything(nullptr, sector[pp->cursectnum].hitag, -1);
break; break;
} }
case TAG_SPAWN_ACTOR_TRIGGER: 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].hitag = 0;
sector[pp->cursectnum].lotag = 0; sector[pp->cursectnum].lotag = 0;
@ -2200,7 +2200,7 @@ OperateTripTrigger(PLAYERp pp)
case TAG_SO_EVENT_TRIGGER: 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].hitag = 0;
sector[pp->cursectnum].lotag = 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(), neartag(pp->posx, pp->posy, pp->posz, pp->cursectnum, pp->angle.ang.asbuild(),
&neartagsect, &neartagwall, &neartagsprite, &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! // 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(), neartag(pp->posx, pp->posy, z, pp->cursectnum, pp->angle.ang.asbuild(),
&neartagsector, &neartagwall, &neartagsprite, &neartagsector, &neartagwall, &neartagsprite,
&neartaghitdist, dist, type, NULL); &neartaghitdist, dist, type, nullptr);
if (neartagsector >= 0) 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) int DoPlayerGrabStar(PLAYERp pp)
{ {
SPRITEp sp = NULL; SPRITEp sp = nullptr;
int i; int i;
extern short StarQueue[MAX_STAR_QUEUE]; extern short StarQueue[MAX_STAR_QUEUE];
@ -2878,7 +2878,7 @@ DoAnim(int numtics)
{ {
ANIM_CALLBACKp acp = Anim[i].callback; 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) if (Anim[i].callback)
(*Anim[i].callback)(&Anim[i], Anim[i].callbackdata); (*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].goal = thegoal;
Anim[j].vel = Z(thevel); Anim[j].vel = Z(thevel);
Anim[j].vel_adj = 0; Anim[j].vel_adj = 0;
Anim[j].callback = NULL; Anim[j].callback = nullptr;
Anim[j].callbackdata = NULL; Anim[j].callbackdata = nullptr;
if (j == AnimCnt) if (j == AnimCnt)
AnimCnt++; AnimCnt++;
@ -3271,7 +3271,7 @@ DoSector(void)
if (pp->sop_riding == sop) if (pp->sop_riding == sop)
{ {
riding = true; riding = true;
pp->sop_riding = NULL; pp->sop_riding = nullptr;
break; break;
} }
else else
@ -3422,7 +3422,7 @@ saveable_module saveable_sector =
SIZ(saveable_sector_code), SIZ(saveable_sector_code),
// data // data
NULL, nullptr,
0 0
}; };

View file

@ -70,7 +70,7 @@ DECISION SerpSurprised[] =
DECISION SerpEvasive[] = DECISION SerpEvasive[] =
{ {
{10, InitActorEvade }, {10, InitActorEvade },
{1024, NULL } {1024, nullptr }
}; };
DECISION SerpLostTarget[] = DECISION SerpLostTarget[] =
@ -671,28 +671,28 @@ ACTOR_ACTION_SET SerpActionSet =
{ {
sg_SerpStand, sg_SerpStand,
sg_SerpRun, sg_SerpRun,
NULL, //sg_SerpJump, nullptr, //sg_SerpJump,
NULL, //sg_SerpFall, nullptr, //sg_SerpFall,
NULL, //sg_SerpCrawl, nullptr, //sg_SerpCrawl,
NULL, //sg_SerpSwim, nullptr, //sg_SerpSwim,
NULL, //sg_SerpFly, nullptr, //sg_SerpFly,
NULL, //sg_SerpRise, nullptr, //sg_SerpRise,
NULL, //sg_SerpSit, nullptr, //sg_SerpSit,
NULL, //sg_SerpLook, nullptr, //sg_SerpLook,
NULL, //climb nullptr, //climb
NULL, //pain nullptr, //pain
sg_SerpDie, sg_SerpDie,
NULL, //sg_SerpHariKari, nullptr, //sg_SerpHariKari,
sg_SerpDead, sg_SerpDead,
NULL, //sg_SerpDeathJump, nullptr, //sg_SerpDeathJump,
NULL, //sg_SerpDeathFall, nullptr, //sg_SerpDeathFall,
{sg_SerpSlash}, {sg_SerpSlash},
{1024}, {1024},
{sg_SerpSlash, sg_SerpSpell, sg_SerpRapidSpell, sg_SerpRapidSpell}, {sg_SerpSlash, sg_SerpSpell, sg_SerpRapidSpell, sg_SerpRapidSpell},
{256, 724, 900, 1024}, {256, 724, 900, 1024},
{NULL}, {nullptr},
NULL, nullptr,
NULL nullptr
}; };
int int
@ -812,7 +812,7 @@ int DoDeathSpecial(short SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
DoMatchEverything(NULL, sp->lotag, ON); DoMatchEverything(nullptr, sp->lotag, ON);
if (!SW_SHAREWARE) if (!SW_SHAREWARE)
{ {

View file

@ -66,7 +66,7 @@ DECISION SkelEvasive[] =
{ {
{22, InitActorDuck }, {22, InitActorDuck },
{30, InitActorEvade }, {30, InitActorEvade },
{1024, NULL }, {1024, nullptr },
}; };
DECISION SkelLostTarget[] = DECISION SkelLostTarget[] =
@ -476,28 +476,28 @@ ACTOR_ACTION_SET SkelActionSet =
{ {
sg_SkelStand, sg_SkelStand,
sg_SkelRun, sg_SkelRun,
NULL, //sg_SkelJump, nullptr, //sg_SkelJump,
NULL, //sg_SkelFall, nullptr, //sg_SkelFall,
NULL, //sg_SkelCrawl, nullptr, //sg_SkelCrawl,
NULL, //sg_SkelSwim, nullptr, //sg_SkelSwim,
NULL, //sg_SkelFly, nullptr, //sg_SkelFly,
NULL, //sg_SkelRise, nullptr, //sg_SkelRise,
NULL, //sg_SkelSit, nullptr, //sg_SkelSit,
NULL, //sg_SkelLook, nullptr, //sg_SkelLook,
NULL, //climb nullptr, //climb
sg_SkelPain, //pain sg_SkelPain, //pain
sg_SkelDie, sg_SkelDie,
NULL, //sg_SkelHariKari, nullptr, //sg_SkelHariKari,
NULL, //sg_SkelDead, nullptr, //sg_SkelDead,
NULL, //sg_SkelDeathJump, nullptr, //sg_SkelDeathJump,
NULL, //sg_SkelDeathFall, nullptr, //sg_SkelDeathFall,
{sg_SkelSlash}, {sg_SkelSlash},
{1024}, {1024},
{sg_SkelSpell}, {sg_SkelSpell},
{1024}, {1024},
{NULL}, {nullptr},
sg_SkelTeleport, sg_SkelTeleport,
NULL nullptr
}; };
int int

View file

@ -236,7 +236,7 @@ SetupSkull(short SpriteNum)
u->ID = SKULL_R0; u->ID = SKULL_R0;
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
sp->clipdist = (128+64) >> 2; sp->clipdist = (128+64) >> 2;
SET(u->Flags, SPR_XFLIP_TOGGLE); SET(u->Flags, SPR_XFLIP_TOGGLE);
SET(sp->cstat, CSTAT_SPRITE_YCENTER); SET(sp->cstat, CSTAT_SPRITE_YCENTER);
@ -654,7 +654,7 @@ SetupBetty(short SpriteNum)
u->ID = BETTY_R0; u->ID = BETTY_R0;
EnemyDefaults(SpriteNum, NULL, NULL); EnemyDefaults(SpriteNum, nullptr, nullptr);
sp->clipdist = (128+64) >> 2; sp->clipdist = (128+64) >> 2;
SET(u->Flags, SPR_XFLIP_TOGGLE); SET(u->Flags, SPR_XFLIP_TOGGLE);
SET(sp->cstat, CSTAT_SPRITE_YCENTER); SET(sp->cstat, CSTAT_SPRITE_YCENTER);

View file

@ -583,7 +583,7 @@ int DoSlidorMove(short SpriteNum)
SetSlidorInactive(SpriteNum); SetSlidorInactive(SpriteNum);
if (SP_TAG6(sp) && !TEST_BOOL8(sp)) 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 // wait a bit and close it
if (u->WaitTics) if (u->WaitTics)
@ -612,7 +612,7 @@ int DoSlidorMove(short SpriteNum)
} }
if (SP_TAG6(sp) && TEST_BOOL8(sp)) if (SP_TAG6(sp) && TEST_BOOL8(sp))
DoMatchEverything(NULL, SP_TAG6(sp), -1); DoMatchEverything(nullptr, SP_TAG6(sp), -1);
} }
if (TEST_BOOL2(sp)) if (TEST_BOOL2(sp))
@ -716,6 +716,6 @@ saveable_module saveable_slidor =
SIZ(saveable_slidor_code), SIZ(saveable_slidor_code),
// data // data
NULL,0 nullptr,0
}; };
END_SW_NS END_SW_NS

View file

@ -455,9 +455,9 @@ public:
void StopChannel(FSoundChan* chan) override 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; chan->SourceType = SOURCE_Unattached;
} }
SoundEngine::StopChannel(chan); SoundEngine::StopChannel(chan);

View file

@ -354,7 +354,7 @@ int DoSpike(short SpriteNum)
SetSpikeInactive(SpriteNum); SetSpikeInactive(SpriteNum);
if (SP_TAG6(sp)) if (SP_TAG6(sp))
DoMatchEverything(NULL, SP_TAG6(sp), -1); DoMatchEverything(nullptr, SP_TAG6(sp), -1);
} }
else else
// in the OFF position // in the OFF position
@ -377,7 +377,7 @@ int DoSpike(short SpriteNum)
} }
if (SP_TAG6(sp) && TEST_BOOL5(sp)) if (SP_TAG6(sp) && TEST_BOOL5(sp))
DoMatchEverything(NULL, SP_TAG6(sp), -1); DoMatchEverything(nullptr, SP_TAG6(sp), -1);
} }
// operate only once // operate only once
@ -466,7 +466,7 @@ int DoSpikeAuto(short SpriteNum)
u->Tics = u->WaitTics; u->Tics = u->WaitTics;
if (SP_TAG6(sp)) if (SP_TAG6(sp))
DoMatchEverything(NULL, SP_TAG6(sp), -1); DoMatchEverything(nullptr, SP_TAG6(sp), -1);
} }
else else
// in the DOWN position // in the DOWN position
@ -479,7 +479,7 @@ int DoSpikeAuto(short SpriteNum)
u->Tics = u->WaitTics; u->Tics = u->WaitTics;
if (SP_TAG6(sp) && TEST_BOOL5(sp)) 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), SIZ(saveable_spike_code),
// data // data
NULL,0 nullptr,0
}; };
END_SW_NS END_SW_NS

View file

@ -767,7 +767,7 @@ KillSprite(int16_t SpriteNum)
StatIterator it(STAT_ENEMY); StatIterator it(STAT_ENEMY);
while ((i = it.NextIndex()) >= 0) 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); DoActorPickClosePlayer(i);
} }
@ -875,9 +875,9 @@ SpawnUser(short SpriteNum, short id, STATEp state)
User[SpriteNum].Alloc(); User[SpriteNum].Alloc();
u = User[SpriteNum].Data(); 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; u->State = u->StateStart = state;
change_sprite_stat(SpriteNum, sp->statnum); change_sprite_stat(SpriteNum, sp->statnum);
@ -919,8 +919,8 @@ SpawnUser(short SpriteNum, short id, STATEp state)
#else #else
u->loz = sector[sp->sectnum].floorz; u->loz = sector[sp->sectnum].floorz;
u->hiz = sector[sp->sectnum].ceilingz; u->hiz = sector[sp->sectnum].ceilingz;
u->lo_sp = NULL; u->lo_sp = nullptr;
u->hi_sp = NULL; u->hi_sp = nullptr;
u->lo_sectp = &sector[sp->sectnum]; u->lo_sectp = &sector[sp->sectnum];
u->hi_sectp = &sector[sp->sectnum]; u->hi_sectp = &sector[sp->sectnum];
#endif #endif
@ -939,7 +939,7 @@ GetSectUser(short sectnum)
SectUser[sectnum].Alloc(); SectUser[sectnum].Alloc();
sectu = SectUser[sectnum].Data(); sectu = SectUser[sectnum].Data();
ASSERT(sectu != NULL); ASSERT(sectu != nullptr);
return sectu; 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); u = SpawnUser(SpriteNum, id, state);
// be careful State can be NULL // be careful State can be nullptr
if (u->State) if (u->State)
{ {
sp->picnum = u->State->Pic; sp->picnum = u->State->Pic;
@ -1789,7 +1789,7 @@ SpriteSetupPost(void)
if (labs(ds->z - fz) > Z(4)) if (labs(ds->z - fz) > Z(4))
continue; continue;
u = SpawnUser(i, 0, NULL); u = SpawnUser(i, 0, nullptr);
change_sprite_stat(i, STAT_NO_STATE); change_sprite_stat(i, STAT_NO_STATE);
u->ceiling_dist = Z(4); u->ceiling_dist = Z(4);
u->floor_dist = -Z(2); u->floor_dist = -Z(2);
@ -2265,9 +2265,9 @@ SpriteSetup(void)
{ {
ANIMATOR DoGenerateSewerDebris; ANIMATOR DoGenerateSewerDebris;
u = SpawnUser(SpriteNum, 0, NULL); u = SpawnUser(SpriteNum, 0, nullptr);
ASSERT(u != NULL); ASSERT(u != nullptr);
u->RotNum = 0; u->RotNum = 0;
u->WaitTics = sp->lotag * 120; u->WaitTics = sp->lotag * 120;
@ -2283,7 +2283,7 @@ SpriteSetup(void)
SECTORp sectp = &sector[sp->sectnum]; SECTORp sectp = &sector[sp->sectnum];
SECT_USERp sectu; SECT_USERp sectu;
short speed,vel,time,type,start_on,floor_vator; 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 // vator already set - ceiling AND floor vator
if (TEST(sectp->extra, SECTFX_VATOR)) if (TEST(sectp->extra, SECTFX_VATOR))
@ -2393,7 +2393,7 @@ SpriteSetup(void)
SECTORp sectp = &sector[sp->sectnum]; SECTORp sectp = &sector[sp->sectnum];
short time,type; short time,type;
short wallcount,startwall,endwall,w; short wallcount,startwall,endwall,w;
u = SpawnUser(SpriteNum, 0, NULL); u = SpawnUser(SpriteNum, 0, nullptr);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, true, true); SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, true, true);
@ -2454,7 +2454,7 @@ SpriteSetup(void)
SECTORp sectp = &sector[sp->sectnum]; SECTORp sectp = &sector[sp->sectnum];
short time,type; short time,type;
u = SpawnUser(SpriteNum, 0, NULL); u = SpawnUser(SpriteNum, 0, nullptr);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, true, true); SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, true, true);
@ -2505,7 +2505,7 @@ SpriteSetup(void)
{ {
short speed,vel,time,type,start_on,floor_vator; short speed,vel,time,type,start_on,floor_vator;
int floorz,ceilingz,trash; int floorz,ceilingz,trash;
u = SpawnUser(SpriteNum, 0, NULL); u = SpawnUser(SpriteNum, 0, nullptr);
SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, false, true); SetSectorWallBits(sp->sectnum, WALLFX_DONT_STICK, false, true);
SET(sector[sp->sectnum].extra, SECTFX_DYNAMIC_AREA); 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); u->WallShade.Resize(wallcount);
wall_shade = u->WallShade.Data(); wall_shade = u->WallShade.Data();
@ -2674,7 +2674,7 @@ SpriteSetup(void)
// !LIGHT // !LIGHT
// make an wall_shade array and put it in User // make an wall_shade array and put it in User
u = SpawnUser(SpriteNum, 0, NULL); u = SpawnUser(SpriteNum, 0, nullptr);
u->WallShade.Resize(wallcount); u->WallShade.Resize(wallcount);
wall_shade = u->WallShade.Data(); wall_shade = u->WallShade.Data();
@ -2723,7 +2723,7 @@ SpriteSetup(void)
case LAVA_ERUPT: case LAVA_ERUPT:
{ {
u = SpawnUser(SpriteNum, ST1, NULL); u = SpawnUser(SpriteNum, ST1, nullptr);
change_sprite_stat(SpriteNum, STAT_NO_STATE); change_sprite_stat(SpriteNum, STAT_NO_STATE);
u->ActorActionFunc = DoLavaErupt; u->ActorActionFunc = DoLavaErupt;
@ -2883,7 +2883,7 @@ SpriteSetup(void)
case SPAWN_SPOT: case SPAWN_SPOT:
if (!User[SpriteNum].Data()) if (!User[SpriteNum].Data())
u = SpawnUser(SpriteNum, ST1, NULL); u = SpawnUser(SpriteNum, ST1, nullptr);
if (SP_TAG14(sp) == ((64<<8)|64)) if (SP_TAG14(sp) == ((64<<8)|64))
//SP_TAG14(sp) = 0; //SP_TAG14(sp) = 0;
@ -3002,7 +3002,7 @@ SpriteSetup(void)
case BOLT_TRAP: case BOLT_TRAP:
case SPEAR_TRAP: case SPEAR_TRAP:
{ {
u = SpawnUser(SpriteNum, 0, NULL); u = SpawnUser(SpriteNum, 0, nullptr);
sp->owner = -1; sp->owner = -1;
change_sprite_stat(SpriteNum, STAT_TRAP); change_sprite_stat(SpriteNum, STAT_TRAP);
break; break;
@ -3140,9 +3140,9 @@ KeyMain:
break; 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; sprite[SpriteNum].picnum = u->ID = sprite[SpriteNum].picnum;
u->spal = sprite[SpriteNum].pal; // Set the palette from build u->spal = sprite[SpriteNum].pal; // Set the palette from build
@ -3178,9 +3178,9 @@ KeyMain:
num = 3; num = 3;
KeyStatueMain: 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; sprite[SpriteNum].picnum = u->ID = sprite[SpriteNum].picnum;
u->spal = sp->pal; u->spal = sp->pal;
@ -3212,7 +3212,7 @@ KeyStatueMain:
case FIRE_FLY0: 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; * u->State = u->StateStart = &s_FireFly[0]; u->RotNum = 0;
* *
@ -3727,7 +3727,7 @@ NUKE_REPLACEMENT:
case 3143: case 3143:
case 3157: case 3157:
{ {
u = SpawnUser(SpriteNum, sp->picnum, NULL); u = SpawnUser(SpriteNum, sp->picnum, nullptr);
change_sprite_stat(SpriteNum, STAT_STATIC_FIRE); change_sprite_stat(SpriteNum, STAT_STATIC_FIRE);
@ -3748,7 +3748,7 @@ NUKE_REPLACEMENT:
case BLADE3: case BLADE3:
case 5011: case 5011:
{ {
u = SpawnUser(SpriteNum, sp->picnum, NULL); u = SpawnUser(SpriteNum, sp->picnum, nullptr);
change_sprite_stat(SpriteNum, STAT_DEFAULT); change_sprite_stat(SpriteNum, STAT_DEFAULT);
@ -3769,7 +3769,7 @@ NUKE_REPLACEMENT:
//if (TEST(sp->extra, SPRX_BREAKABLE)) //if (TEST(sp->extra, SPRX_BREAKABLE))
// break; // break;
u = SpawnUser(SpriteNum, sp->picnum, NULL); u = SpawnUser(SpriteNum, sp->picnum, nullptr);
sp->clipdist = SPRITEp_SIZE_X(sp); sp->clipdist = SPRITEp_SIZE_X(sp);
SET(sp->cstat, CSTAT_SPRITE_BREAKABLE); SET(sp->cstat, CSTAT_SPRITE_BREAKABLE);
@ -4610,7 +4610,7 @@ int SpawnItemsMatch(short match)
sp = &sprite[SpriteNum]; sp = &sprite[SpriteNum];
ASSERT(u != NULL); ASSERT(u != nullptr);
sprite[SpriteNum].picnum = u->ID = s_Key[num]->Pic; 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); 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); SET(sp->cstat, save_cstat);
u->lo_sectp = u->hi_sectp = NULL; u->lo_sectp = u->hi_sectp = nullptr;
u->lo_sp = u->hi_sp = NULL; u->lo_sp = u->hi_sp = nullptr;
switch (TEST(ceilhit, HIT_MASK)) switch (TEST(ceilhit, HIT_MASK))
{ {
@ -4921,8 +4921,8 @@ DoActorGlobZ(short SpriteNum)
u->loz = globloz; u->loz = globloz;
u->hiz = globhiz; u->hiz = globhiz;
u->lo_sectp = u->hi_sectp = NULL; u->lo_sectp = u->hi_sectp = nullptr;
u->lo_sp = u->hi_sp = NULL; u->lo_sp = u->hi_sp = nullptr;
switch (TEST(globhihit, HIT_MASK)) switch (TEST(globhihit, HIT_MASK))
{ {
@ -6720,11 +6720,11 @@ SpriteControl(void)
u = User[i].Data(); u = User[i].Data();
sp = User[i]->SpriteP; sp = User[i]->SpriteP;
STATE_CONTROL(i, sp, u, StateTics) 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 #else
ASSERT(User[i]); ASSERT(User[i]);
StateControl(i); StateControl(i);
// ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()] != NULL : true); // ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()] != nullptr : true);
#endif #endif
} }
@ -6741,11 +6741,11 @@ SpriteControl(void)
u = User[i].Data(); u = User[i].Data();
sp = User[i]->SpriteP; sp = User[i]->SpriteP;
STATE_CONTROL(i, sp, u, StateTics) 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 #else
ASSERT(User[i]); ASSERT(User[i]);
StateControl(i); StateControl(i);
ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()] != NULL : true); ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()] != nullptr : true);
#endif #endif
} }
} }
@ -6793,7 +6793,7 @@ SpriteControl(void)
#else #else
StateControl(i); StateControl(i);
#endif #endif
ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != NULL : true); ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != nullptr : true);
} }
else else
{ {
@ -6816,11 +6816,11 @@ SpriteControl(void)
u = User[i].Data(); u = User[i].Data();
sp = User[i]->SpriteP; sp = User[i]->SpriteP;
STATE_CONTROL(i, sp, u, StateTics) 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 #else
ASSERT(User[i]); ASSERT(User[i]);
StateControl(i); StateControl(i);
ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != NULL : true); ASSERT(it.PeekIndex() >= 0 ? User[it.PeekIndex()].Data() != nullptr : true);
#endif #endif
} }
} }
@ -6854,7 +6854,7 @@ SpriteControl(void)
u = User[i].Data(); u = User[i].Data();
sp = User[i]->SpriteP; sp = User[i]->SpriteP;
STATE_CONTROL(i, sp, u, StateTics) 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); getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
u->hi_sectp = u->lo_sectp = &sector[sp->sectnum]; u->hi_sectp = u->lo_sectp = &sector[sp->sectnum];
u->hi_sp = u->lo_sp = NULL; u->hi_sp = u->lo_sp = nullptr;
return retval; return retval;
} }
else 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); getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
u->hi_sectp = u->lo_sectp = &sector[sp->sectnum]; u->hi_sectp = u->lo_sectp = &sector[sp->sectnum];
u->hi_sp = u->lo_sp = NULL; u->hi_sp = u->lo_sp = nullptr;
sp->z = u->loz - Z(8); sp->z = u->loz - Z(8);
if (labs(u->hiz - u->loz) < Z(12)) if (labs(u->hiz - u->loz) < Z(12))

View file

@ -574,56 +574,56 @@ ACTOR_ACTION_SET SumoActionSet =
{ {
sg_SumoStand, sg_SumoStand,
sg_SumoRun, sg_SumoRun,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, //climb nullptr, //climb
sg_SumoPain, //pain sg_SumoPain, //pain
sg_SumoDie, sg_SumoDie,
NULL, nullptr,
sg_SumoDead, sg_SumoDead,
NULL, nullptr,
NULL, nullptr,
{sg_SumoStomp,sg_SumoFart}, {sg_SumoStomp,sg_SumoFart},
{800,1024}, {800,1024},
{sg_SumoClap,sg_SumoStomp,sg_SumoFart}, {sg_SumoClap,sg_SumoStomp,sg_SumoFart},
{400,750,1024}, {400,750,1024},
{NULL}, {nullptr},
NULL, nullptr,
NULL nullptr
}; };
ACTOR_ACTION_SET MiniSumoActionSet = ACTOR_ACTION_SET MiniSumoActionSet =
{ {
sg_SumoStand, sg_SumoStand,
sg_SumoRun, sg_SumoRun,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, //climb nullptr, //climb
sg_SumoPain, //pain sg_SumoPain, //pain
sg_SumoDie, sg_SumoDie,
NULL, nullptr,
sg_SumoDead, sg_SumoDead,
NULL, nullptr,
NULL, nullptr,
{sg_SumoClap}, {sg_SumoClap},
{1024}, {1024},
{sg_SumoClap}, {sg_SumoClap},
{1024}, {1024},
{NULL}, {nullptr},
NULL, nullptr,
NULL nullptr
}; };
@ -793,7 +793,7 @@ int DoSumoDeathMelt(short SpriteNum)
InitChemBomb(SpriteNum); InitChemBomb(SpriteNum);
u->ID = 0; u->ID = 0;
DoMatchEverything(NULL, sp->lotag, ON); DoMatchEverything(nullptr, sp->lotag, ON);
if (!SW_SHAREWARE) if (!SW_SHAREWARE)
{ {
// Resume the regular music - in a hack-free fashion. // Resume the regular music - in a hack-free fashion.

View file

@ -135,8 +135,8 @@ ActorFindTrack(short SpriteNum, int8_t player_dir, int track_type, short *track_
short i; short i;
short end_point[2] = {0,0}; short end_point[2] = {0,0};
TRACKp t, near_track = NULL; TRACKp t, near_track = nullptr;
TRACK_POINTp tp, near_tp = NULL; TRACK_POINTp tp, near_tp = nullptr;
#define TOWARD_PLAYER 1 #define TOWARD_PLAYER 1
#define AWAY_FROM_PLAYER -1 #define AWAY_FROM_PLAYER -1
@ -439,7 +439,7 @@ void QuickScanSetup(short stat, short lotag, short type)
// save space for 3 points // save space for 3 points
Track[ndx].SetTrackSize(4); Track[ndx].SetTrackSize(4);
ASSERT(Track[ndx].TrackPoint != NULL); ASSERT(Track[ndx].TrackPoint != nullptr);
tp = Track[ndx].TrackPoint; tp = Track[ndx].TrackPoint;
t = &Track[ndx]; t = &Track[ndx];
@ -499,7 +499,7 @@ void QuickExitSetup(short stat, short type)
// save space for 3 points // save space for 3 points
Track[ndx].SetTrackSize(4); Track[ndx].SetTrackSize(4);
ASSERT(Track[ndx].TrackPoint != NULL); ASSERT(Track[ndx].TrackPoint != nullptr);
tp = Track[ndx].TrackPoint; tp = Track[ndx].TrackPoint;
t = &Track[ndx]; t = &Track[ndx];
@ -554,7 +554,7 @@ void QuickLadderSetup(short stat, short lotag, short type)
// save space for 3 points // save space for 3 points
Track[ndx].SetTrackSize(4); Track[ndx].SetTrackSize(4);
ASSERT(Track[ndx].TrackPoint != NULL); ASSERT(Track[ndx].TrackPoint != nullptr);
tp = Track[ndx].TrackPoint; tp = Track[ndx].TrackPoint;
t = &Track[ndx]; t = &Track[ndx];
@ -611,13 +611,13 @@ TrackSetup(void)
continue; continue;
} }
ASSERT(Track[ndx].TrackPoint == NULL); ASSERT(Track[ndx].TrackPoint == nullptr);
// make the track array rather large. I'll resize it to correct size // make the track array rather large. I'll resize it to correct size
// later. // later.
Track[ndx].TrackPoint = (TRACK_POINTp)CallocMem(sizeof(TRACK_POINT) * 500, 1); 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; tp = Track[ndx].TrackPoint;
t = &Track[ndx]; t = &Track[ndx];
@ -688,7 +688,7 @@ TrackSetup(void)
FreeMem(Track[ndx].TrackPoint); FreeMem(Track[ndx].TrackPoint);
Track[ndx].TrackPoint = New; 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); 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); //DSPRINTF(ds,"tagnum %d, so num %d",500 + ((sop - SectorObject) * 5), sop - SectorObject);
MONO_PRINT(ds); MONO_PRINT(ds);
ASSERT(BoundSprite != NULL); ASSERT(BoundSprite != nullptr);
xlow = BoundSprite->x; xlow = BoundSprite->x;
ylow = BoundSprite->y; ylow = BoundSprite->y;
KillSprite(short(BoundSprite - sprite)); KillSprite(short(BoundSprite - sprite));
BoundSprite = FindBoundSprite(501 + (int(sop - SectorObject) * 5)); BoundSprite = FindBoundSprite(501 + (int(sop - SectorObject) * 5));
ASSERT(BoundSprite != NULL); ASSERT(BoundSprite != nullptr);
xhigh = BoundSprite->x; xhigh = BoundSprite->x;
yhigh = BoundSprite->y; yhigh = BoundSprite->y;
@ -903,8 +903,8 @@ SectorObjectSetupBounds(SECTOR_OBJECTp sop)
continue; continue;
} }
if (User[sp_num].Data() == NULL) if (User[sp_num].Data() == nullptr)
u = SpawnUser(sp_num, 0, NULL); u = SpawnUser(sp_num, 0, nullptr);
else else
u = User[sp_num].Data(); u = User[sp_num].Data();
@ -1107,9 +1107,9 @@ SetupSectorObject(short sectnum, short tag)
sop->morph_xoff = 0; sop->morph_xoff = 0;
sop->morph_yoff = 0; sop->morph_yoff = 0;
sop->PreMoveAnimator = NULL; sop->PreMoveAnimator = nullptr;
sop->PostMoveAnimator = NULL; sop->PostMoveAnimator = nullptr;
sop->Animator = NULL; sop->Animator = nullptr;
} }
switch (tag % 5) switch (tag % 5)
@ -1125,7 +1125,7 @@ SetupSectorObject(short sectnum, short tag)
sop->track = HIGH_TAG(sectnum); sop->track = HIGH_TAG(sectnum);
// spawn a sprite to make it easier to integrate with sprite routines // 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->xmid, sop->ymid, sop->zmid, 0, 0);
sop->sp_child = &sprite[New]; sop->sp_child = &sprite[New];
u = User[New].Data(); u = User[New].Data();
@ -1196,8 +1196,8 @@ SetupSectorObject(short sectnum, short tag)
{ {
USERp u; USERp u;
change_sprite_stat(SpriteNum, STAT_NO_STATE); change_sprite_stat(SpriteNum, STAT_NO_STATE);
u = SpawnUser(SpriteNum, 0, NULL); u = SpawnUser(SpriteNum, 0, nullptr);
u->ActorActionFunc = NULL; u->ActorActionFunc = nullptr;
} }
break; break;
@ -1463,7 +1463,7 @@ PlayerOnObject(short sectnum_match)
} }
} }
return NULL; return nullptr;
} }
@ -1478,7 +1478,7 @@ PlaceSectorObjectsOnTracks(void)
{ {
int low_dist = 999999, dist; int low_dist = 999999, dist;
SECTOR_OBJECTp sop = &SectorObject[i]; SECTOR_OBJECTp sop = &SectorObject[i];
TRACK_POINTp tpoint = NULL; TRACK_POINTp tpoint = nullptr;
if (SO_EMPTY(sop)) if (SO_EMPTY(sop))
continue; continue;
@ -1550,7 +1550,7 @@ PlaceActorsOnTracks(void)
short i, j, tag; short i, j, tag;
SPRITEp sp; SPRITEp sp;
USERp u; USERp u;
TRACK_POINTp tpoint = NULL; TRACK_POINTp tpoint = nullptr;
// place each actor on the track // place each actor on the track
StatIterator it(STAT_ENEMY); StatIterator it(STAT_ENEMY);
@ -2082,7 +2082,7 @@ DetectSectorObject(SECTORp sectph)
} }
} }
return NULL; return nullptr;
} }
SECTOR_OBJECTp 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); su = GetSectUser(dest_sector);
ASSERT(su != NULL); ASSERT(su != nullptr);
ASSERT(GetSectUser(src_sector)); ASSERT(GetSectUser(src_sector));
tgt_depth = FixedToInt((GetSectUser(src_sector))->depth_fixed); 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) switch (tpoint->tag_low)
{ {
case TRACK_MATCH_EVERYTHING: case TRACK_MATCH_EVERYTHING:
DoMatchEverything(NULL, tpoint->tag_high, -1); DoMatchEverything(nullptr, tpoint->tag_high, -1);
break; break;
case TRACK_MATCH_EVERYTHING_ONCE: case TRACK_MATCH_EVERYTHING_ONCE:
DoMatchEverything(NULL, tpoint->tag_high, -1); DoMatchEverything(nullptr, tpoint->tag_high, -1);
tpoint->tag_low = 0; tpoint->tag_low = 0;
tpoint->tag_high = 0; tpoint->tag_high = 0;
break; break;
@ -2972,7 +2972,7 @@ DoAutoTurretObject(SECTOR_OBJECTp sop)
if (u->Counter == 0) if (u->Counter == 0)
{ {
shootp = NULL; shootp = nullptr;
for (i = 0; sop->sp_num[i] != -1; i++) for (i = 0; sop->sp_num[i] != -1; i++)
{ {
if (sprite[sop->sp_num[i]].statnum == STAT_SO_SHOOT_POINT) 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, neartag(sp->x, sp->y, z[i], sp->sectnum, sp->ang,
&nearsector, &nearwall, &nearsprite, &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); // //DSPRINTF(ds,"nearsector = %d, nearwall = %d, nearsprite = %d hitdist == %ld\n",nearsector,nearwall,nearsprite,nearhitdist);
// MONO_PRINT(ds); // 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, neartag(sp->x, sp->y, SPRITEp_TOS(sp) - DIV2(SPRITEp_SIZE_Z(sp)), sp->sectnum,
sp->ang, sp->ang,
&hit_sect, &hit_wall, &hit_sprite, &hit_sect, &hit_wall, &hit_sprite,
&dist, 600L, NTAG_SEARCH_LO_HI, NULL); &dist, 600L, NTAG_SEARCH_LO_HI, nullptr);
if (hit_wall < 0) if (hit_wall < 0)
{ {
@ -3839,7 +3839,7 @@ saveable_module saveable_track =
SIZ(saveable_track_code), SIZ(saveable_track_code),
// data // data
NULL,0 nullptr,0
}; };
END_SW_NS END_SW_NS

View file

@ -668,7 +668,7 @@ int DoVatorAuto(short SpriteNum)
u->Tics = u->WaitTics; u->Tics = u->WaitTics;
if (SP_TAG6(sp) && TEST_BOOL5(sp)) 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), SIZ(saveable_vator_code),
// data // data
NULL,0 nullptr,0
}; };
END_SW_NS END_SW_NS

View file

@ -230,6 +230,6 @@ saveable_module saveable_wallmove =
SIZ(saveable_wallmove_code), SIZ(saveable_wallmove_code),
// data // data
NULL,0 nullptr,0
}; };
END_SW_NS END_SW_NS

View file

@ -46,8 +46,8 @@ WarpPlaneSectorInfo(short sectnum, SPRITEp *sp_ceiling, SPRITEp *sp_floor)
int i; int i;
SPRITEp sp; SPRITEp sp;
*sp_floor = NULL; *sp_floor = nullptr;
*sp_ceiling = NULL; *sp_ceiling = nullptr;
if (Prediction) if (Prediction)
return false; return false;
@ -86,10 +86,10 @@ WarpPlane(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum)
SPRITEp sp_floor, sp_ceiling; SPRITEp sp_floor, sp_ceiling;
if (Prediction) if (Prediction)
return NULL; return nullptr;
if (!WarpPlaneSectorInfo(*sectnum, &sp_ceiling, &sp_floor)) if (!WarpPlaneSectorInfo(*sectnum, &sp_ceiling, &sp_floor))
return NULL; return nullptr;
if (sp_ceiling) 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 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; int i;
SPRITEp sp; SPRITEp sp;
*sp_warp = NULL; *sp_warp = nullptr;
if (!TEST(sector[sectnum].extra, SECTFX_WARP_SECTOR)) if (!TEST(sector[sectnum].extra, SECTFX_WARP_SECTOR))
return false; return false;
@ -250,16 +250,16 @@ Warp(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum)
SPRITEp sp_warp; SPRITEp sp_warp;
if (Prediction) if (Prediction)
return NULL; return nullptr;
if (!WarpSectorInfo(*sectnum, &sp_warp)) if (!WarpSectorInfo(*sectnum, &sp_warp))
return NULL; return nullptr;
if (sp_warp) if (sp_warp)
{ {
return WarpToArea(sp_warp, x, y, z, sectnum); return WarpToArea(sp_warp, x, y, z, sectnum);
} }
return NULL; return nullptr;
} }
END_SW_NS END_SW_NS

View file

@ -327,9 +327,9 @@ STATEp sg_RailPuff[] =
#define LASER_PUFF_RATE 8 #define LASER_PUFF_RATE 8
STATE s_LaserPuff[] = STATE s_LaserPuff[] =
{ {
{LASER_PUFF + 0, LASER_PUFF_RATE, NULL, &s_LaserPuff[1]}, {LASER_PUFF + 0, LASER_PUFF_RATE, nullptr, &s_LaserPuff[1]},
//{LASER_PUFF + 1, LASER_PUFF_RATE, NULL, &s_LaserPuff[2]}, //{LASER_PUFF + 1, LASER_PUFF_RATE, nullptr, &s_LaserPuff[2]},
//{LASER_PUFF + 2, LASER_PUFF_RATE, NULL, &s_LaserPuff[3]}, //{LASER_PUFF + 2, LASER_PUFF_RATE, nullptr, &s_LaserPuff[3]},
{LASER_PUFF + 0, 100, DoSuicide, &s_LaserPuff[0]} {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)) if (TEST(wu->Flags2, SPR2_SO_MISSILE))
{ {
DoMatchEverything(NULL, hsp->hitag, -1); DoMatchEverything(nullptr, hsp->hitag, -1);
return true; return true;
} }
else else
@ -2676,7 +2676,7 @@ bool MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite)
case WPN_MICRO: case WPN_MICRO:
case WPN_NAPALM: case WPN_NAPALM:
case WPN_ROCKET: case WPN_ROCKET:
DoMatchEverything(NULL, hsp->hitag, -1); DoMatchEverything(nullptr, hsp->hitag, -1);
return true; return true;
} }
} }
@ -2689,7 +2689,7 @@ bool MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite)
case WPN_HOTHEAD: case WPN_HOTHEAD:
case WPN_NAPALM: case WPN_NAPALM:
case WPN_ROCKET: case WPN_ROCKET:
DoMatchEverything(NULL, hsp->hitag, -1); DoMatchEverything(nullptr, hsp->hitag, -1);
return true; return true;
} }
} }
@ -2704,7 +2704,7 @@ bool MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite)
case WPN_ROCKET: case WPN_ROCKET:
case WPN_UZI: case WPN_UZI:
case WPN_SHOTGUN: case WPN_SHOTGUN:
DoMatchEverything(NULL, hsp->hitag, -1); DoMatchEverything(nullptr, hsp->hitag, -1);
return true; return true;
} }
} }
@ -2722,7 +2722,7 @@ bool MissileHitMatch(short Weapon, short WeaponNum, short hit_sprite)
case WPN_ROCKET: case WPN_ROCKET:
case WPN_UZI: case WPN_UZI:
case WPN_SHOTGUN: case WPN_SHOTGUN:
DoMatchEverything(NULL, hsp->hitag, -1); DoMatchEverything(nullptr, hsp->hitag, -1);
return true; 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_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_MetalShrapB, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048},
{s_MetalShrapC, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {s_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[] = 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_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_GlassShrapB, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048},
{s_GlassShrapC, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {s_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[] = 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_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_WoodShrapB, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048},
{s_WoodShrapC, WOOD_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {s_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[] = 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_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_StoneShrapB, STONE_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048},
{s_StoneShrapC, STONE_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {s_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[] = 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_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_PaperShrapB, PAPER_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048},
{s_PaperShrapC, PAPER_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {s_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[] = 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_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_MetalShrapB, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048},
{s_MetalShrapC, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {s_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[] = 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_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_MetalShrapB, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048},
{s_MetalShrapC, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {s_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[] = 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_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_MetalShrapB, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048},
{s_MetalShrapC, METAL_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {s_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[] = 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_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_PaperShrapB, PAPER_SHRAP_A, 2, Z_MID, 200, 600, 100, 500, true, 2048},
{s_PaperShrapC, PAPER_SHRAP_A, 2, Z_MID, 200, 600, 100, 500, true, 2048}, {s_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[] = 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_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_GlassShrapB, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048},
{s_GlassShrapC, GLASS_SHRAP_A, 1, Z_MID, 200, 600, 100, 500, true, 2048}, {s_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 #if 0
static SHRAP BloodShrap[] = static SHRAP BloodShrap[] =
{ {
{s_BloodShrap, BLOOD_SHRAP, 8, Z_MID, 200, 600, 100, 500, true, 2048}, {s_BloodShrap, BLOOD_SHRAP, 8, Z_MID, 200, 600, 100, 500, true, 2048},
{NULL}, {nullptr},
}; };
#endif #endif
@ -2994,7 +2994,7 @@ SpawnShrap(short ParentNum, short Secondary)
static SHRAP EMPShrap[] = static SHRAP EMPShrap[] =
{ {
{s_EMPShrap, EMP, 1, Z_MID, 500, 1100, 300, 600, false, 128}, {s_EMPShrap, EMP, 1, Z_MID, 500, 1100, 300, 600, false, 128},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
static SHRAP StdShrap[] = 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_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_GoreSkullCap, GORE_SkullCap, 1, Z_TOP, 300, 500, 250, 500, true, 2048},
{s_FastGoreDrip, GORE_Drip, 8, Z_BOT, 600, 800, 50, 70, false, 2048}, {s_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 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_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_GoreLiver, GORE_Liver, 1, Z_MID, 500, 1100, 300, 500, true, 2048},
{s_GoreArm, GORE_Arm, 2, Z_MID, 500, 1100, 350, 600, true, 2048}, {s_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[] = 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_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_GoreLeg, GORE_Leg, 2, Z_BOT, 200, 400, 250, 500, true, 2048},
{s_GoreChunkS, GORE_ChunkS, 4, Z_BOT, 200, 400, 250, 400, true, 2048}, {s_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[] = 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_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_GoreSkullCap, GORE_SkullCap, 1, Z_TOP, 300, 500, 100, 150, true, 2048},
{s_GoreArm, GORE_Arm, 1, Z_MID, 300, 500, 250, 500, true, 2048}, {s_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 #if 0
static SHRAP LowerGore[] = static SHRAP LowerGore[] =
{ {
{s_GoreLeg, GORE_Leg, 4, Z_BOT, 300, 500, 100, 200, true, 2048}, {s_GoreLeg, GORE_Leg, 4, Z_BOT, 300, 500, 100, 200, true, 2048},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
#endif #endif
@ -3050,7 +3050,7 @@ SpawnShrap(short ParentNum, short Secondary)
{ {
{s_GoreDrip, GORE_Drip, 3, Z_TOP, 600, 800, 50, 70, false, 2048}, {s_GoreDrip, GORE_Drip, 3, Z_TOP, 600, 800, 50, 70, false, 2048},
{s_FastGoreDrip, GORE_Drip, 3, Z_BOT, 600, 800, 70, 100, false, 2048}, {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[] = 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_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_GoreFlameChunkB, GORE_Drip, 4, Z_MID, 300, 500, 100, 200, false, 2048},
{s_GoreFlame, GORE_Drip, 2, Z_BOT, 100, 200, 100, 200, false, 2048}, {s_GoreFlame, GORE_Drip, 2, Z_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 #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_MID, 300, 700, 300, 600, true, 2048},
{s_GoreFlame, GORE_Drip, 4, Z_BOT, 300, 700, 300, 600, true, 2048}, {s_GoreFlame, GORE_Drip, 4, Z_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[] = static SHRAP TracerExpShrap[] =
{ {
{s_TracerShrap, GORE_Drip, 3, Z_MID, 300, 700, 300, 600, true, 2048}, {s_TracerShrap, GORE_Drip, 3, Z_MID, 300, 700, 300, 600, true, 2048},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
static SHRAP FireballExpShrap1[] = static SHRAP FireballExpShrap1[] =
{ {
{s_GoreFlame, GORE_Drip, 1, Z_MID, 100, 300, 100, 200, true, 2048}, {s_GoreFlame, GORE_Drip, 1, Z_MID, 100, 300, 100, 200, true, 2048},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
static SHRAP FireballExpShrap2[] = static SHRAP FireballExpShrap2[] =
{ {
{s_GoreFlame, GORE_Drip, 2, Z_MID, 100, 300, 100, 200, true, 2048}, {s_GoreFlame, GORE_Drip, 2, Z_MID, 100, 300, 100, 200, true, 2048},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
static SHRAPp FireballExpShrap[] = static SHRAPp FireballExpShrap[] =
@ -3099,7 +3099,7 @@ SpawnShrap(short ParentNum, short Secondary)
static SHRAP ElectroShrap[] = static SHRAP ElectroShrap[] =
{ {
{s_ElectroShrap, ELECTRO_SHARD, 12, Z_TOP, 200, 600, 100, 500, true, 2048}, {s_ElectroShrap, ELECTRO_SHARD, 12, Z_TOP, 200, 600, 100, 500, true, 2048},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
// state, id, num, zlevel, min_jspeed, max_jspeed, min_vel, max_vel, // state, id, num, zlevel, min_jspeed, max_jspeed, min_vel, max_vel,
@ -3107,13 +3107,13 @@ SpawnShrap(short ParentNum, short Secondary)
static SHRAP LavaShrap1[] = static SHRAP LavaShrap1[] =
{ {
{s_GoreFlame, GORE_Drip, 1, Z_TOP, 400, 1400, 100, 400, true, 2048}, {s_GoreFlame, GORE_Drip, 1, Z_TOP, 400, 1400, 100, 400, true, 2048},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
static SHRAP LavaShrap2[] = static SHRAP LavaShrap2[] =
{ {
{s_GoreFlameChunkB, GORE_Drip, 1, Z_TOP, 400, 1400, 100, 400, true, 2048}, {s_GoreFlameChunkB, GORE_Drip, 1, Z_TOP, 400, 1400, 100, 400, true, 2048},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
static SHRAP *LavaShrapTable[] = static SHRAP *LavaShrapTable[] =
@ -3125,14 +3125,14 @@ SpawnShrap(short ParentNum, short Secondary)
static SHRAP LavaBoulderShrap[] = static SHRAP LavaBoulderShrap[] =
{ {
{s_LavaShard, LAVA_SHARD, 16, Z_MID, 400, 900, 200, 600, true, 2048}, {s_LavaShard, LAVA_SHARD, 16, Z_MID, 400, 900, 200, 600, true, 2048},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
#if 0 #if 0
static SHRAP SectorSquishGore[] = static SHRAP SectorSquishGore[] =
{ {
{s_FastGoreDrip, GORE_Drip, 24, Z_MID, -400, -200, 600, 800, false, 2048}, {s_FastGoreDrip, GORE_Drip, 24, Z_MID, -400, -200, 600, 800, false, 2048},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
#endif #endif
@ -3152,7 +3152,7 @@ SpawnShrap(short ParentNum, short Secondary)
{s_GoreDrip, GORE_Drip, 10, Z_MID, 200, 300, 100, 200, false, 2048}, {s_GoreDrip, GORE_Drip, 10, Z_MID, 200, 300, 100, 200, false, 2048},
{s_GoreArm, GORE_Arm, 1, Z_MID, 200, 300, 100, 200, true, 2048}, {s_GoreArm, GORE_Arm, 1, Z_MID, 200, 300, 100, 200, true, 2048},
{s_FastGoreDrip, GORE_Drip, 10, Z_BOT, 200, 300, 100, 200, false, 2048}, {s_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[] = 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_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_MID, 500, 1100, 350, 600, false, 2048},
{s_FastGoreDrip, GORE_Drip, 16, Z_BOT, 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[] = static SHRAP PlayerDeadHead[] =
{ {
{s_GoreDrip, GORE_Drip, 2, Z_TOP, 150, 400, 40, 80, true, 2048}, {s_GoreDrip, GORE_Drip, 2, Z_TOP, 150, 400, 40, 80, true, 2048},
{s_GoreDrip, GORE_Drip, 2, Z_MID, 150, 400, 40, 80, true, 2048}, {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, // state, id, num, zlevel, min_jspeed, max_jspeed, min_vel, max_vel,
@ -3178,7 +3178,7 @@ SpawnShrap(short ParentNum, short Secondary)
static SHRAP PlayerHeadHurl1[] = static SHRAP PlayerHeadHurl1[] =
{ {
{s_Vomit1, Vomit1, 1, Z_BOT, 250, 400, 100, 200, true, 256}, {s_Vomit1, Vomit1, 1, Z_BOT, 250, 400, 100, 200, true, 256},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
#define WALL_FLOOR_SHRAP 4097 #define WALL_FLOOR_SHRAP 4097
@ -3186,8 +3186,8 @@ SpawnShrap(short ParentNum, short Secondary)
#if 0 #if 0
static SHRAP SectorExpShrap[] = static SHRAP SectorExpShrap[] =
{ {
{NULL, WALL_FLOOR_SHRAP, 1, Z_BOT, 550, 800, 200, 400, true, 512}, {nullptr, WALL_FLOOR_SHRAP, 1, Z_BOT, 550, 800, 200, 400, true, 512},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
#endif #endif
@ -3230,7 +3230,7 @@ SpawnShrap(short ParentNum, short Secondary)
{ {
shrap_type = GlobBreakInfo->shrap_type; shrap_type = GlobBreakInfo->shrap_type;
shrap_amt = GlobBreakInfo->shrap_amt; shrap_amt = GlobBreakInfo->shrap_amt;
GlobBreakInfo = NULL; GlobBreakInfo = nullptr;
goto AutoShrap; goto AutoShrap;
} }
else if (TEST(parent->extra, SPRX_BREAKABLE)) 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_GoreDrip, GORE_Drip, 1, Z_MID, 100, 250, 10, 20, true, 512}, // 70,200 vels
//{s_GoreSplash, PLASMA_Drip, 1, Z_BOT, 0, 0, 0, 0, false, 512}, //{s_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[] = static SHRAP SmallBlood[] =
{ {
{s_GoreDrip, GORE_Drip, 1, Z_TOP, 100, 250, 10, 20, true, 512}, {s_GoreDrip, GORE_Drip, 1, Z_TOP, 100, 250, 10, 20, true, 512},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
static SHRAP PlasmaFountainBlood[] = static SHRAP PlasmaFountainBlood[] =
{ {
{s_PlasmaDrip, PLASMA_Drip, 1, Z_TOP, 200, 500, 100, 300, true, 16}, {s_PlasmaDrip, PLASMA_Drip, 1, Z_TOP, 200, 500, 100, 300, true, 16},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
static SHRAP SomeBlood[] = static SHRAP SomeBlood[] =
{ {
{s_GoreDrip, GORE_Drip, 1, Z_TOP, 100, 250, 10, 20, true, 512}, {s_GoreDrip, GORE_Drip, 1, Z_TOP, 100, 250, 10, 20, true, 512},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
#if 0 #if 0
static SHRAP MoreBlood[] = static SHRAP MoreBlood[] =
{ {
{s_GoreDrip, GORE_Drip, 2, Z_TOP, 100, 250, 10, 20, true, 512}, {s_GoreDrip, GORE_Drip, 2, Z_TOP, 100, 250, 10, 20, true, 512},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
#endif #endif
static SHRAP ExtraBlood[] = static SHRAP ExtraBlood[] =
{ {
{s_GoreDrip, GORE_Drip, 4, Z_TOP, 100, 250, 10, 20, true, 512}, {s_GoreDrip, GORE_Drip, 4, Z_TOP, 100, 250, 10, 20, true, 512},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
static SHRAP HariKariBlood[] = static SHRAP HariKariBlood[] =
{ {
{s_FastGoreDrip, GORE_Drip, 32, Z_TOP, 200, 650, 70, 100, true, 1024}, {s_FastGoreDrip, GORE_Drip, 32, Z_TOP, 200, 650, 70, 100, true, 1024},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
#if 0 #if 0
static SHRAP SwordPowerup[] = static SHRAP SwordPowerup[] =
{ {
{s_ElectroShrap, ELECTRO_SHARD, 16, Z_TOP, 75, 200, 70, 150, true, 512}, {s_ElectroShrap, ELECTRO_SHARD, 16, Z_TOP, 75, 200, 70, 150, true, 512},
{NULL,0,0,0,0,0,0,0,0,0}, {nullptr,0,0,0,0,0,0,0,0,0},
}; };
#endif #endif
@ -4509,7 +4509,7 @@ WeaponMoveHit(short SpriteNum)
{ {
if (MissileHitMatch(SpriteNum, -1, short(u->lo_sp - sprite))) if (MissileHitMatch(SpriteNum, -1, short(u->lo_sp - sprite)))
return true; return true;
//DoMatchEverything(NULL, u->lo_sp->hitag, -1); //DoMatchEverything(nullptr, u->lo_sp->hitag, -1);
//return(true); //return(true);
} }
@ -4534,7 +4534,7 @@ WeaponMoveHit(short SpriteNum)
{ {
if (MissileHitMatch(SpriteNum, -1, short(u->hi_sp - sprite))) if (MissileHitMatch(SpriteNum, -1, short(u->hi_sp - sprite)))
return true; return true;
//DoMatchEverything(NULL, u->hi_sp->hitag, -1); //DoMatchEverything(nullptr, u->hi_sp->hitag, -1);
//return(true); //return(true);
} }
} }
@ -4636,7 +4636,7 @@ WeaponMoveHit(short SpriteNum)
{ {
if (MissileHitMatch(SpriteNum, -1, hit_sprite)) if (MissileHitMatch(SpriteNum, -1, hit_sprite))
return true; return true;
//DoMatchEverything(NULL, hsp->hitag, -1); //DoMatchEverything(nullptr, hsp->hitag, -1);
//return(true); //return(true);
} }
@ -4723,7 +4723,7 @@ DoUziSmoke(short SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
//if (sp->picnum != NULL) //if (sp->picnum != nullptr)
// DoDamageTest(SpriteNum); // DoDamageTest(SpriteNum);
sp->z -= 200; // !JIM! Make them float up sp->z -= 200; // !JIM! Make them float up
@ -4735,7 +4735,7 @@ DoShotgunSmoke(short SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
//if (sp->picnum != NULL) //if (sp->picnum != nullptr)
// DoDamageTest(SpriteNum); // DoDamageTest(SpriteNum);
sp->z -= 200; // !JIM! Make them float up 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->WaitTics = SEC(1) + SEC(RANDOM_RANGE(2));
u->Health = 60; u->Health = 60;
PlaySound(DIGI_NINJACHOKE, sp, v3df_follow); PlaySound(DIGI_NINJACHOKE, sp, v3df_follow);
InitPlasmaFountain(NULL, sp); InitPlasmaFountain(nullptr, sp);
InitBloodSpray(SpriteNum,false,105); InitBloodSpray(SpriteNum,false,105);
sp->ang = NORM_ANGLE(getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y) + 1024); sp->ang = NORM_ANGLE(getangle(u->tgt_sp->x - sp->x, u->tgt_sp->y - sp->y) + 1024);
RESET(sp->cstat, CSTAT_SPRITE_YFLIP); RESET(sp->cstat, CSTAT_SPRITE_YFLIP);
@ -7772,7 +7772,7 @@ int DoExpDamageTest(short Weapon)
int max_stat; int max_stat;
short break_count; short break_count;
SPRITEp found_sp = NULL; SPRITEp found_sp = nullptr;
int found_dist = 999999; int found_dist = 999999;
int DoWallMoveMatch(short match); int DoWallMoveMatch(short match);
@ -8967,7 +8967,7 @@ DoGrenade(int16_t Weapon)
if (hsp->lotag == TAG_SPRITE_HIT_MATCH) if (hsp->lotag == TAG_SPRITE_HIT_MATCH)
{ {
if (TEST(SP_TAG8(hsp), BIT(3))) 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)) if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL))
@ -10885,7 +10885,7 @@ SpawnBreakStaticFlames(int16_t SpriteNum)
USERp nu; USERp nu;
short New; 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); sp->x, sp->y, sp->z, sp->ang, 0);
np = &sprite[New]; np = &sprite[New];
nu = User[New].Data(); nu = User[New].Data();
@ -11168,7 +11168,7 @@ SpawnNuclearExp(int16_t Weapon)
SPRITEp exp; SPRITEp exp;
USERp eu; USERp eu;
short explosion,ang=0; short explosion,ang=0;
PLAYERp pp = NULL; PLAYERp pp = nullptr;
short rnd_rng; short rnd_rng;
ASSERT(u); ASSERT(u);
@ -11354,7 +11354,7 @@ AddSpriteToSectorObject(short SpriteNum, SECTOR_OBJECTp sop)
// make sure it has a user // make sure it has a user
if (!u) if (!u)
{ {
u = SpawnUser(SpriteNum, 0, NULL); u = SpawnUser(SpriteNum, 0, nullptr);
} }
// find a free place on this list // find a free place on this list
@ -11971,7 +11971,7 @@ DoFireball(int16_t Weapon)
if (TEST(hsp->extra, SPRX_BURNABLE)) if (TEST(hsp->extra, SPRX_BURNABLE))
{ {
if (!hu) if (!hu)
hu = SpawnUser(short(sp - sprite), hsp->picnum, NULL); hu = SpawnUser(short(sp - sprite), hsp->picnum, nullptr);
SpawnFireballFlames(Weapon, short(hsp - sprite)); SpawnFireballFlames(Weapon, short(hsp - sprite));
hit_burn = true; hit_burn = true;
} }
@ -12027,7 +12027,7 @@ DoFindGround(int16_t SpriteNum)
{ {
// found a sprite floor // found a sprite floor
u->lo_sp = hsp; u->lo_sp = hsp;
u->lo_sectp = NULL; u->lo_sectp = nullptr;
return true; return true;
} }
else else
@ -12045,7 +12045,7 @@ DoFindGround(int16_t SpriteNum)
case HIT_SECTOR: case HIT_SECTOR:
{ {
u->lo_sectp = &sector[NORM_SECTOR(florhit)]; u->lo_sectp = &sector[NORM_SECTOR(florhit)];
u->lo_sp = NULL; u->lo_sp = nullptr;
return true; return true;
} }
@ -12086,7 +12086,7 @@ DoFindGroundPoint(int16_t SpriteNum)
{ {
// found a sprite floor // found a sprite floor
u->lo_sp = hsp; u->lo_sp = hsp;
u->lo_sectp = NULL; u->lo_sectp = nullptr;
return true; return true;
} }
else else
@ -12104,7 +12104,7 @@ DoFindGroundPoint(int16_t SpriteNum)
case HIT_SECTOR: case HIT_SECTOR:
{ {
u->lo_sectp = &sector[NORM_SECTOR(florhit)]; u->lo_sectp = &sector[NORM_SECTOR(florhit)];
u->lo_sp = NULL; u->lo_sp = nullptr;
return true; return true;
} }
@ -13283,7 +13283,7 @@ InitSerpRing(short SpriteNum)
nu->Rot = sg_SkullRing; nu->Rot = sg_SkullRing;
// defaults do change the statnum // defaults do change the statnum
EnemyDefaults(New, NULL, NULL); EnemyDefaults(New, nullptr, nullptr);
change_sprite_stat(New, STAT_SKIP4); change_sprite_stat(New, STAT_SKIP4);
RESET(np->extra, SPRX_PLAYER_OR_ENEMY); RESET(np->extra, SPRX_PLAYER_OR_ENEMY);
@ -13361,7 +13361,7 @@ InitSerpRing2(short SpriteNum)
nu->Rot = sg_SkullRing; nu->Rot = sg_SkullRing;
// defaults do change the statnum // defaults do change the statnum
EnemyDefaults(New, NULL, NULL); EnemyDefaults(New, nullptr, nullptr);
RESET(np->extra, SPRX_PLAYER_OR_ENEMY); RESET(np->extra, SPRX_PLAYER_OR_ENEMY);
change_sprite_stat(New, STAT_MISSILE_SKIP4); change_sprite_stat(New, STAT_MISSILE_SKIP4);
@ -13658,7 +13658,7 @@ int
InitSwordAttack(PLAYERp pp) InitSwordAttack(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite].Data(),tu; USERp u = User[pp->PlayerSprite].Data(),tu;
SPRITEp sp = NULL; SPRITEp sp = nullptr;
int i; int i;
unsigned stat; unsigned stat;
int dist; int dist;
@ -13837,7 +13837,7 @@ int
InitFistAttack(PLAYERp pp) InitFistAttack(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite].Data(),tu; USERp u = User[pp->PlayerSprite].Data(),tu;
SPRITEp sp = NULL; SPRITEp sp = nullptr;
int i; int i;
unsigned stat; unsigned stat;
int dist; int dist;
@ -14171,7 +14171,7 @@ InitSumoSkull(short SpriteNum)
nu->Health = 100; nu->Health = 100;
// defaults do change the statnum // defaults do change the statnum
EnemyDefaults(New, NULL, NULL); EnemyDefaults(New, nullptr, nullptr);
//change_sprite_stat(New, STAT_SKIP4); //change_sprite_stat(New, STAT_SKIP4);
SET(np->extra, SPRX_PLAYER_OR_ENEMY); SET(np->extra, SPRX_PLAYER_OR_ENEMY);
@ -15844,8 +15844,8 @@ InitMicro(PLAYERp pp)
} }
else else
{ {
hp = NULL; hp = nullptr;
hu = NULL; hu = nullptr;
ang = pp->angle.ang.asbuild(); ang = pp->angle.ang.asbuild();
} }
@ -17962,7 +17962,7 @@ int
InitEMP(PLAYERp pp) InitEMP(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite].Data(); USERp u = User[pp->PlayerSprite].Data();
SPRITEp wp, hsp=NULL; SPRITEp wp, hsp=nullptr;
USERp wu; USERp wu;
short daang, j; short daang, j;
hitdata_t hitinfo; hitdata_t hitinfo;
@ -18220,8 +18220,8 @@ InitTurretMicro(short SpriteNum, PLAYERp pp)
} }
else else
{ {
hp = NULL; hp = nullptr;
hu = NULL; hu = nullptr;
ang = sp->ang; ang = sp->ang;
} }
@ -19628,7 +19628,7 @@ InitFireball(PLAYERp pp)
int int
InitEnemyFireball(short SpriteNum) InitEnemyFireball(short SpriteNum)
{ {
SPRITEp sp = User[SpriteNum]->SpriteP, fp = NULL; SPRITEp sp = User[SpriteNum]->SpriteP, fp = nullptr;
USERp u = User[SpriteNum].Data(); USERp u = User[SpriteNum].Data();
SPRITEp wp; SPRITEp wp;
int nz, dist; int nz, dist;
@ -19725,7 +19725,7 @@ WarpToUnderwater(short *sectnum, int *x, int *y, int *z)
{ {
int i; int i;
SECT_USERp sectu = SectUser[*sectnum].Data(); SECT_USERp sectu = SectUser[*sectnum].Data();
SPRITEp under_sp = NULL, over_sp = NULL; SPRITEp under_sp = nullptr, over_sp = nullptr;
bool Found = false; bool Found = false;
short over, under; short over, under;
int sx, sy; int sx, sy;
@ -19802,7 +19802,7 @@ WarpToSurface(short *sectnum, int *x, int *y, int *z)
short over, under; short over, under;
int sx, sy; int sx, sy;
SPRITEp under_sp = NULL, over_sp = NULL; SPRITEp under_sp = nullptr, over_sp = nullptr;
bool Found = false; bool Found = false;
// 0 not valid for water match tags // 0 not valid for water match tags
@ -19874,7 +19874,7 @@ SpriteWarpToUnderwater(SPRITEp sp)
USERp u = User[sp - sprite].Data(); USERp u = User[sp - sprite].Data();
int i; int i;
SECT_USERp sectu = SectUser[sp->sectnum].Data(); SECT_USERp sectu = SectUser[sp->sectnum].Data();
SPRITEp under_sp = NULL, over_sp = NULL; SPRITEp under_sp = nullptr, over_sp = nullptr;
bool Found = false; bool Found = false;
short over, under; short over, under;
int sx, sy; int sx, sy;
@ -19955,7 +19955,7 @@ SpriteWarpToSurface(SPRITEp sp)
short over, under; short over, under;
int sx, sy; int sx, sy;
SPRITEp under_sp = NULL, over_sp = NULL; SPRITEp under_sp = nullptr, over_sp = nullptr;
bool Found = false; bool Found = false;
// 0 not valid for water match tags // 0 not valid for water match tags

View file

@ -616,28 +616,28 @@ ACTOR_ACTION_SET ZillaActionSet =
{ {
sg_ZillaStand, sg_ZillaStand,
sg_ZillaRun, sg_ZillaRun,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, //climb nullptr, //climb
sg_ZillaPain, //pain sg_ZillaPain, //pain
sg_ZillaDie, sg_ZillaDie,
NULL, nullptr,
sg_ZillaDead, sg_ZillaDead,
NULL, nullptr,
NULL, nullptr,
{sg_ZillaUzi,sg_ZillaRail}, {sg_ZillaUzi,sg_ZillaRail},
{950,1024}, {950,1024},
{sg_ZillaUzi,sg_ZillaRocket,sg_ZillaRail}, {sg_ZillaUzi,sg_ZillaRocket,sg_ZillaRail},
{400,950,1024}, {400,950,1024},
{NULL}, {nullptr},
NULL, nullptr,
NULL nullptr
}; };
int int
@ -701,8 +701,8 @@ int NullZilla(short SpriteNum)
getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz); getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
u->lo_sectp = &sector[sp->sectnum]; u->lo_sectp = &sector[sp->sectnum];
u->hi_sectp = &sector[sp->sectnum]; u->hi_sectp = &sector[sp->sectnum];
u->lo_sp = NULL; u->lo_sp = nullptr;
u->hi_sp = NULL; u->hi_sp = nullptr;
sp->z = u->loz; sp->z = u->loz;
DoActorSectorDamage(SpriteNum); DoActorSectorDamage(SpriteNum);
@ -771,7 +771,7 @@ int DoZillaDeathMelt(short SpriteNum)
u->ID = ZILLA_RUN_R0; u->ID = ZILLA_RUN_R0;
RESET(u->Flags, SPR_JUMPING|SPR_FALLING|SPR_MOVED); RESET(u->Flags, SPR_JUMPING|SPR_FALLING|SPR_MOVED);
//DoMatchEverything(NULL, sp->lotag, ON); //DoMatchEverything(nullptr, sp->lotag, ON);
if (!SW_SHAREWARE) if (!SW_SHAREWARE)
{ {
// Resume the regular music - in a hack-free fashion. // 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); getzsofslope(sp->sectnum, sp->x, sp->y, &u->hiz, &u->loz);
u->lo_sectp = &sector[sp->sectnum]; u->lo_sectp = &sector[sp->sectnum];
u->hi_sectp = &sector[sp->sectnum]; u->hi_sectp = &sector[sp->sectnum];
u->lo_sp = NULL; u->lo_sp = nullptr;
u->hi_sp = NULL; u->hi_sp = nullptr;
sp->z = u->loz; sp->z = u->loz;
BossSpriteNum[2] = -2; BossSpriteNum[2] = -2;

View file

@ -70,7 +70,7 @@ DECISION ZombieSurprised[] =
DECISION ZombieEvasive[] = DECISION ZombieEvasive[] =
{ {
{400, InitActorDuck}, {400, InitActorDuck},
{1024, NULL} {1024, nullptr}
}; };
DECISION ZombieLostTarget[] = DECISION ZombieLostTarget[] =
@ -718,21 +718,21 @@ ACTOR_ACTION_SET ZombieActionSet =
{ {
sg_ZombieStand, sg_ZombieStand,
sg_ZombieRun, sg_ZombieRun,
NULL, nullptr,
sg_ZombieFall, sg_ZombieFall,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
sg_ZombieRun, sg_ZombieRun,
sg_ZombieRun, sg_ZombieRun,
NULL, nullptr,
NULL, nullptr,
sg_ZombiePain, sg_ZombiePain,
sg_ZombieRun, sg_ZombieRun,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
NULL, nullptr,
#if 0 #if 0
{sg_ZombieUzi}, {sg_ZombieUzi},
{1024}, {1024},
@ -743,9 +743,9 @@ ACTOR_ACTION_SET ZombieActionSet =
{1024}, {1024},
{sg_ZombieRail}, {sg_ZombieRail},
{1024}, {1024},
{NULL}, {nullptr},
NULL, nullptr,
NULL nullptr
}; };
int int