- renamed all tile constants for Duke to DTILE_*.

We need to be able to find them for the ongoing work
This commit is contained in:
Christoph Oelckers 2022-12-04 14:03:24 +01:00
parent 9e3318a2fb
commit e9b6e84d47
11 changed files with 1144 additions and 1143 deletions

View file

@ -53,57 +53,57 @@ void check_fta_sounds_d(DDukeActor* actor)
{ {
if (actor->spr.extra > 0) switch (actor->spr.picnum) if (actor->spr.extra > 0) switch (actor->spr.picnum)
{ {
case LIZTROOPONTOILET: case DTILE_LIZTROOPONTOILET:
case LIZTROOPJUSTSIT: case DTILE_LIZTROOPJUSTSIT:
case LIZTROOPSHOOT: case DTILE_LIZTROOPSHOOT:
case LIZTROOPJETPACK: case DTILE_LIZTROOPJETPACK:
case LIZTROOPDUCKING: case DTILE_LIZTROOPDUCKING:
case LIZTROOPRUNNING: case DTILE_LIZTROOPRUNNING:
case LIZTROOP: case DTILE_LIZTROOP:
S_PlayActorSound(PRED_RECOG, actor); S_PlayActorSound(PRED_RECOG, actor);
break; break;
case LIZMAN: case DTILE_LIZMAN:
case LIZMANSPITTING: case DTILE_LIZMANSPITTING:
case LIZMANFEEDING: case DTILE_LIZMANFEEDING:
case LIZMANJUMP: case DTILE_LIZMANJUMP:
S_PlayActorSound(CAPT_RECOG, actor); S_PlayActorSound(CAPT_RECOG, actor);
break; break;
case PIGCOP: case DTILE_PIGCOP:
case PIGCOPDIVE: case DTILE_PIGCOPDIVE:
S_PlayActorSound(PIG_RECOG, actor); S_PlayActorSound(PIG_RECOG, actor);
break; break;
case RECON: case DTILE_RECON:
S_PlayActorSound(RECO_RECOG, actor); S_PlayActorSound(RECO_RECOG, actor);
break; break;
case DRONE: case DTILE_DRONE:
S_PlayActorSound(DRON_RECOG, actor); S_PlayActorSound(DRON_RECOG, actor);
break; break;
case COMMANDER: case DTILE_COMMANDER:
case COMMANDERSTAYPUT: case DTILE_COMMANDERSTAYPUT:
S_PlayActorSound(COMM_RECOG, actor); S_PlayActorSound(COMM_RECOG, actor);
break; break;
case ORGANTIC: case DTILE_ORGANTIC:
S_PlayActorSound(TURR_RECOG, actor); S_PlayActorSound(TURR_RECOG, actor);
break; break;
case OCTABRAIN: case DTILE_OCTABRAIN:
case OCTABRAINSTAYPUT: case DTILE_OCTABRAINSTAYPUT:
S_PlayActorSound(OCTA_RECOG, actor); S_PlayActorSound(OCTA_RECOG, actor);
break; break;
case BOSS1: case DTILE_BOSS1:
S_PlaySound(BOS1_RECOG); S_PlaySound(BOS1_RECOG);
break; break;
case BOSS2: case DTILE_BOSS2:
if (actor->spr.pal == 1) if (actor->spr.pal == 1)
S_PlaySound(BOS2_RECOG); S_PlaySound(BOS2_RECOG);
else S_PlaySound(WHIPYOURASS); else S_PlaySound(WHIPYOURASS);
break; break;
case BOSS3: case DTILE_BOSS3:
if (actor->spr.pal == 1) if (actor->spr.pal == 1)
S_PlaySound(BOS3_RECOG); S_PlaySound(BOS3_RECOG);
else S_PlaySound(RIPHEADNECK); else S_PlaySound(RIPHEADNECK);
break; break;
case BOSS4: case DTILE_BOSS4:
case BOSS4STAYPUT: case DTILE_BOSS4STAYPUT:
if (actor->spr.pal == 1) if (actor->spr.pal == 1)
S_PlaySound(BOS4_RECOG); S_PlaySound(BOS4_RECOG);
S_PlaySound(BOSS4_FIRSTSEE); S_PlaySound(BOSS4_FIRSTSEE);
@ -199,7 +199,7 @@ bool ifsquished(DDukeActor* actor, int p)
if (actor->spr.pal == 1) if (actor->spr.pal == 1)
{ {
actor->attackertype = SHOTSPARK1; actor->attackertype = DTILE_SHOTSPARK1;
actor->hitextra = 1; actor->hitextra = 1;
return false; return false;
} }
@ -220,7 +220,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
double radius = r * inttoworld; double radius = r * inttoworld;
static const uint8_t statlist[] = { STAT_DEFAULT, STAT_ACTOR, STAT_STANDABLE, STAT_PLAYER, STAT_FALLER, STAT_ZOMBIEACTOR, STAT_MISC }; static const uint8_t statlist[] = { STAT_DEFAULT, STAT_ACTOR, STAT_STANDABLE, STAT_PLAYER, STAT_FALLER, STAT_ZOMBIEACTOR, STAT_MISC };
if(actor->spr.picnum != SHRINKSPARK && !(actor->spr.picnum == RPG && actor->spr.scale.X < 0.171875)) if(actor->spr.picnum != DTILE_SHRINKSPARK && !(actor->spr.picnum == DTILE_RPG && actor->spr.scale.X < 0.171875))
{ {
BFSSectorSearch search(actor->sector()); BFSSectorSearch search(actor->sector());
@ -275,7 +275,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
continue; continue;
} }
if (actor->spr.picnum == FLAMETHROWERFLAME && ((Owner->spr.picnum == FIREFLY && act2->spr.picnum == FIREFLY) || (Owner->spr.picnum == BOSS5 && act2->spr.picnum == BOSS5))) if (actor->spr.picnum == DTILE_FLAMETHROWERFLAME && ((Owner->spr.picnum == DTILE_FIREFLY && act2->spr.picnum == DTILE_FIREFLY) || (Owner->spr.picnum == DTILE_BOSS5 && act2->spr.picnum == DTILE_BOSS5)))
{ {
continue; continue;
} }
@ -283,7 +283,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
if (x == 0 || x >= 5 || actorflag(act2, SFLAG_HITRADIUS_FLAG1)) if (x == 0 || x >= 5 || actorflag(act2, SFLAG_HITRADIUS_FLAG1))
{ {
if (actor->spr.picnum != SHRINKSPARK || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL)) if (actor->spr.picnum != DTILE_SHRINKSPARK || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL))
if ((actor->spr.pos - act2->spr.pos).Length() < radius) if ((actor->spr.pos - act2->spr.pos).Length() < radius)
{ {
if (badguy(act2) && !cansee(act2->spr.pos.plusZ(q), act2->sector(), actor->spr.pos.plusZ(q), actor->sector())) if (badguy(act2) && !cansee(act2->spr.pos.plusZ(q), act2->sector(), actor->spr.pos.plusZ(q), actor->sector()))
@ -293,11 +293,11 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
} }
else if (act2->spr.extra >= 0 && act2 != actor && (actorflag(act2, SFLAG_HITRADIUS_FLAG2) || badguy(act2) || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL))) else if (act2->spr.extra >= 0 && act2 != actor && (actorflag(act2, SFLAG_HITRADIUS_FLAG2) || badguy(act2) || (act2->spr.cstat & CSTAT_SPRITE_BLOCK_ALL)))
{ {
if (actor->spr.picnum == SHRINKSPARK && act2->spr.picnum != SHARK && (act2 == Owner || act2->spr.scale.X < 0.375)) if (actor->spr.picnum == DTILE_SHRINKSPARK && act2->spr.picnum != DTILE_SHARK && (act2 == Owner || act2->spr.scale.X < 0.375))
{ {
continue; continue;
} }
if (actor->spr.picnum == MORTER && act2 == Owner) if (actor->spr.picnum == DTILE_MORTER && act2 == Owner)
{ {
continue; continue;
} }
@ -308,30 +308,30 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
{ {
act2->hitang = (act2->spr.pos - actor->spr.pos).Angle(); act2->hitang = (act2->spr.pos - actor->spr.pos).Angle();
if (actor->spr.picnum == RPG && act2->spr.extra > 0) if (actor->spr.picnum == DTILE_RPG && act2->spr.extra > 0)
act2->attackertype = RPG; act2->attackertype = DTILE_RPG;
else if (!isWorldTour()) else if (!isWorldTour())
{ {
if (actor->spr.picnum == SHRINKSPARK) if (actor->spr.picnum == DTILE_SHRINKSPARK)
act2->attackertype = SHRINKSPARK; act2->attackertype = DTILE_SHRINKSPARK;
else act2->attackertype = RADIUSEXPLOSION; else act2->attackertype = DTILE_RADIUSEXPLOSION;
} }
else else
{ {
if (actor->spr.picnum == SHRINKSPARK || actor->spr.picnum == FLAMETHROWERFLAME) if (actor->spr.picnum == DTILE_SHRINKSPARK || actor->spr.picnum == DTILE_FLAMETHROWERFLAME)
act2-> attackertype = actor->spr.picnum; act2-> attackertype = actor->spr.picnum;
else if (actor->spr.picnum != FIREBALL || !Owner || !Owner->isPlayer()) else if (actor->spr.picnum != DTILE_FIREBALL || !Owner || !Owner->isPlayer())
{ {
if (actor->spr.picnum == LAVAPOOL) if (actor->spr.picnum == DTILE_LAVAPOOL)
act2->attackertype = FLAMETHROWERFLAME; act2->attackertype = DTILE_FLAMETHROWERFLAME;
else else
act2->attackertype = RADIUSEXPLOSION; act2->attackertype = DTILE_RADIUSEXPLOSION;
} }
else else
act2->attackertype = FLAMETHROWERFLAME; act2->attackertype = DTILE_FLAMETHROWERFLAME;
} }
if (actor->spr.picnum != SHRINKSPARK && (!isWorldTour() || actor->spr.picnum != LAVAPOOL)) if (actor->spr.picnum != DTILE_SHRINKSPARK && (!isWorldTour() || actor->spr.picnum != DTILE_LAVAPOOL))
{ {
if (dist < radius / 3) if (dist < radius / 3)
{ {
@ -360,13 +360,13 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
} }
else if (actor->spr.extra == 0) act2->hitextra = 0; else if (actor->spr.extra == 0) act2->hitextra = 0;
if (act2->spr.picnum != RADIUSEXPLOSION && Owner && Owner->spr.statnum < MAXSTATUS) if (act2->spr.picnum != DTILE_RADIUSEXPLOSION && Owner && Owner->spr.statnum < MAXSTATUS)
{ {
if (act2->isPlayer()) if (act2->isPlayer())
{ {
int p = act2->spr.yint; int p = act2->spr.yint;
if (isWorldTour() && act2->attackertype == FLAMETHROWERFLAME && Owner->isPlayer()) if (isWorldTour() && act2->attackertype == DTILE_FLAMETHROWERFLAME && Owner->isPlayer())
{ {
ps[p].numloogs = -1 - actor->spr.yint; ps[p].numloogs = -1 - actor->spr.yint;
} }
@ -415,7 +415,7 @@ int movesprite_ex_d(DDukeActor* actor, const DVector3& change, unsigned int clip
else else
{ {
double clipdist; double clipdist;
if (actor->spr.picnum == LIZMAN) if (actor->spr.picnum == DTILE_LIZMAN)
clipdist = 18.25; clipdist = 18.25;
else if (actorflag(actor, SFLAG_BADGUY)) else if (actorflag(actor, SFLAG_BADGUY))
clipdist = actor->clipdist; clipdist = actor->clipdist;
@ -428,15 +428,15 @@ int movesprite_ex_d(DDukeActor* actor, const DVector3& change, unsigned int clip
// conditional code from hell... // conditional code from hell...
if (dasectp == nullptr || (dasectp != nullptr && if (dasectp == nullptr || (dasectp != nullptr &&
((actor->actorstayput != nullptr && actor->actorstayput != dasectp) || ((actor->actorstayput != nullptr && actor->actorstayput != dasectp) ||
((actor->spr.picnum == BOSS2) && actor->spr.pal == 0 && dasectp->lotag != 3) || ((actor->spr.picnum == DTILE_BOSS2) && actor->spr.pal == 0 && dasectp->lotag != 3) ||
((actor->spr.picnum == BOSS1 || actor->spr.picnum == BOSS2) && dasectp->lotag == ST_1_ABOVE_WATER) || ((actor->spr.picnum == DTILE_BOSS1 || actor->spr.picnum == DTILE_BOSS2) && dasectp->lotag == ST_1_ABOVE_WATER) ||
(dasectp->lotag == ST_1_ABOVE_WATER && (actor->spr.picnum == LIZMAN || (actor->spr.picnum == LIZTROOP && actor->vel.Z == 0))) (dasectp->lotag == ST_1_ABOVE_WATER && (actor->spr.picnum == DTILE_LIZMAN || (actor->spr.picnum == DTILE_LIZTROOP && actor->vel.Z == 0)))
)) ))
) )
{ {
if (dasectp && dasectp->lotag == ST_1_ABOVE_WATER && actor->spr.picnum == LIZMAN) if (dasectp && dasectp->lotag == ST_1_ABOVE_WATER && actor->spr.picnum == DTILE_LIZMAN)
actor->spr.Angles.Yaw = randomAngle(); actor->spr.Angles.Yaw = randomAngle();
else if ((actor->temp_data[0]&3) == 1 && actor->spr.picnum != COMMANDER) else if ((actor->temp_data[0]&3) == 1 && actor->spr.picnum != DTILE_COMMANDER)
actor->spr.Angles.Yaw = randomAngle(); actor->spr.Angles.Yaw = randomAngle();
SetActor(actor,actor->spr.pos); SetActor(actor,actor->spr.pos);
if (dasectp == nullptr) dasectp = &sector[0]; if (dasectp == nullptr) dasectp = &sector[0];
@ -472,17 +472,17 @@ int movesprite_ex_d(DDukeActor* actor, const DVector3& change, unsigned int clip
void lotsofmoney_d(DDukeActor *actor, int n) void lotsofmoney_d(DDukeActor *actor, int n)
{ {
lotsofstuff(actor, n, MONEY); lotsofstuff(actor, n, DTILE_MONEY);
} }
void lotsofmail_d(DDukeActor *actor, int n) void lotsofmail_d(DDukeActor *actor, int n)
{ {
lotsofstuff(actor, n, MAIL); lotsofstuff(actor, n, DTILE_MAIL);
} }
void lotsofpaper_d(DDukeActor *actor, int n) void lotsofpaper_d(DDukeActor *actor, int n)
{ {
lotsofstuff(actor, n, PAPER); lotsofstuff(actor, n, DTILE_PAPER);
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -502,7 +502,7 @@ int ifhitbyweapon_d(DDukeActor *actor)
{ {
if (actor->isPlayer()) if (actor->isPlayer())
{ {
if (ud.god && actor->attackertype != SHRINKSPARK) return -1; if (ud.god && actor->attackertype != DTILE_SHRINKSPARK) return -1;
p = actor->PlayerIndex(); p = actor->PlayerIndex();
@ -516,7 +516,7 @@ int ifhitbyweapon_d(DDukeActor *actor)
if (hitowner) if (hitowner)
{ {
if (actor->spr.extra <= 0 && actor->attackertype != FREEZEBLAST) if (actor->spr.extra <= 0 && actor->attackertype != DTILE_FREEZEBLAST)
{ {
actor->spr.extra = 0; actor->spr.extra = 0;
@ -542,12 +542,12 @@ int ifhitbyweapon_d(DDukeActor *actor)
else else
{ {
if (actor->hitextra == 0) if (actor->hitextra == 0)
if (actor->attackertype == SHRINKSPARK && actor->spr.scale.X < 0.375) if (actor->attackertype == DTILE_SHRINKSPARK && actor->spr.scale.X < 0.375)
return -1; return -1;
if (isWorldTour() && actor->attackertype == FIREFLY && actor->spr.scale.X < 0.75) if (isWorldTour() && actor->attackertype == DTILE_FIREFLY && actor->spr.scale.X < 0.75)
{ {
if (actor->attackertype != RADIUSEXPLOSION && actor->attackertype != RPG) if (actor->attackertype != DTILE_RADIUSEXPLOSION && actor->attackertype != DTILE_RPG)
return -1; return -1;
} }
@ -564,7 +564,7 @@ int ifhitbyweapon_d(DDukeActor *actor)
if (ud.multimode < 2 || !isWorldTour() if (ud.multimode < 2 || !isWorldTour()
|| actor->attackertype != FLAMETHROWERFLAME || actor->attackertype != DTILE_FLAMETHROWERFLAME
|| actor->hitextra >= 0 || actor->hitextra >= 0
|| actor->spr.extra > 0 || actor->spr.extra > 0
|| !actor->isPlayer() || !actor->isPlayer()
@ -586,7 +586,7 @@ int ifhitbyweapon_d(DDukeActor *actor)
actor->SetHitOwner(ps[p].GetActor()); actor->SetHitOwner(ps[p].GetActor());
actor->hitextra = -1; actor->hitextra = -1;
return FLAMETHROWERFLAME; return DTILE_FLAMETHROWERFLAME;
} }
} }
@ -626,7 +626,7 @@ void movefallers_d(void)
{ {
a2->temp_data[0] = 1; a2->temp_data[0] = 1;
a2->spr.cstat &= ~CSTAT_SPRITE_ONE_SIDE; a2->spr.cstat &= ~CSTAT_SPRITE_ONE_SIDE;
if (a2->spr.picnum == CEILINGSTEAM || a2->spr.picnum == STEAM) if (a2->spr.picnum == DTILE_CEILINGSTEAM || a2->spr.picnum == DTILE_STEAM)
a2->spr.cstat |= CSTAT_SPRITE_INVISIBLE; a2->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
} }
} }
@ -735,7 +735,7 @@ void movetransports_d(void)
{ {
if (act->spr.pal == 0) if (act->spr.pal == 0)
{ {
spawn(act, TRANSPORTERBEAM); spawn(act, DTILE_TRANSPORTERBEAM);
S_PlayActorSound(TELEPORTER, act); S_PlayActorSound(TELEPORTER, act);
} }
@ -764,7 +764,7 @@ void movetransports_d(void)
if (act->spr.pal == 0) if (act->spr.pal == 0)
{ {
auto k = spawn(Owner, TRANSPORTERBEAM); auto k = spawn(Owner, DTILE_TRANSPORTERBEAM);
if (k) S_PlayActorSound(TELEPORTER, k); if (k) S_PlayActorSound(TELEPORTER, k);
} }
@ -845,12 +845,12 @@ void movetransports_d(void)
SetActor(act2, act2->spr.pos); SetActor(act2, act2->spr.pos);
if ((krand() & 255) < 32) if ((krand() & 255) < 32)
spawn(act2, WATERSPLASH2); spawn(act2, DTILE_WATERSPLASH2);
if (sectlotag == 1) if (sectlotag == 1)
for (int l = 0; l < 9; l++) for (int l = 0; l < 9; l++)
{ {
auto q = spawn(ps[p].GetActor(), WATERBUBBLE); auto q = spawn(ps[p].GetActor(), DTILE_WATERBUBBLE);
if (q) q->spr.pos.Z += krandf(64); if (q) q->spr.pos.Z += krandf(64);
} }
} }
@ -891,7 +891,7 @@ void movetransports_d(void)
if (actorflag(act2, SFLAG_NOTELEPORT)) continue; if (actorflag(act2, SFLAG_NOTELEPORT)) continue;
switch (act2->spr.picnum) switch (act2->spr.picnum)
{ {
case PLAYERONWATER: case DTILE_PLAYERONWATER:
if (sectlotag == 2) if (sectlotag == 2)
{ {
act2->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE; act2->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE;
@ -903,13 +903,13 @@ void movetransports_d(void)
break; break;
[[fallthrough]]; [[fallthrough]];
case WATERBUBBLE: case DTILE_WATERBUBBLE:
//if( rnd(192) && a2->s.picnum == WATERBUBBLE) //if( rnd(192) && a2->s.picnum == DTILE_WATERBUBBLE)
// break; // break;
if (sectlotag > 0) if (sectlotag > 0)
{ {
auto k = spawn(act2, WATERSPLASH2); auto k = spawn(act2, DTILE_WATERSPLASH2);
if (k && sectlotag == 1 && act2->spr.statnum == 4) if (k && sectlotag == 1 && act2->spr.statnum == 4)
{ {
k->vel.X = act2->vel.X * 0.5; k->vel.X = act2->vel.X * 0.5;
@ -932,10 +932,10 @@ void movetransports_d(void)
if (act->spr.pal == 0) if (act->spr.pal == 0)
{ {
auto k = spawn(act, TRANSPORTERBEAM); auto k = spawn(act, DTILE_TRANSPORTERBEAM);
if (k) S_PlayActorSound(TELEPORTER, k); if (k) S_PlayActorSound(TELEPORTER, k);
k = spawn(Owner, TRANSPORTERBEAM); k = spawn(Owner, DTILE_TRANSPORTERBEAM);
if (k) S_PlayActorSound(TELEPORTER, k); if (k) S_PlayActorSound(TELEPORTER, k);
} }
@ -998,7 +998,7 @@ static void flamethrowerflame(DDukeActor *actor)
actor->temp_data[0]++; actor->temp_data[0]++;
if (sectp->lotag == 2) if (sectp->lotag == 2)
{ {
spawn(actor, EXPLOSION2)->spr.shade = 127; spawn(actor, DTILE_EXPLOSION2)->spr.shade = 127;
actor->Destroy(); actor->Destroy();
return; return;
} }
@ -1018,7 +1018,7 @@ static void flamethrowerflame(DDukeActor *actor)
actor->temp_data[3] = krand() % 10; actor->temp_data[3] = krand() % 10;
if (actor->temp_data[0] > 30) if (actor->temp_data[0] > 30)
{ {
spawn(actor, EXPLOSION2)->spr.shade = 127; spawn(actor, DTILE_EXPLOSION2)->spr.shade = 127;
actor->Destroy(); actor->Destroy();
return; return;
} }
@ -1102,7 +1102,7 @@ void moveactors_d(void)
{ {
continue; continue;
} }
else if (isWorldTour() && act->spr.picnum == FLAMETHROWERFLAME) else if (isWorldTour() && act->spr.picnum == DTILE_FLAMETHROWERFLAME)
{ {
flamethrowerflame(act); flamethrowerflame(act);
} }
@ -1128,7 +1128,7 @@ static void fireflyflyingeffect(DDukeActor *actor)
if (actor->ObjectFlags & OF_EuthanizeMe) return; // killed by script. if (actor->ObjectFlags & OF_EuthanizeMe) return; // killed by script.
auto Owner = actor->GetOwner(); auto Owner = actor->GetOwner();
if (!Owner || Owner->spr.picnum != FIREFLY) if (!Owner || Owner->spr.picnum != DTILE_FIREFLY)
{ {
actor->Destroy(); actor->Destroy();
return; return;
@ -1166,7 +1166,7 @@ void moveexplosions_d(void) // STATNUM 5
{ {
act->Destroy(); act->Destroy();
} }
else if (isWorldTour() && act->spr.picnum == FIREFLYFLYINGEFFECT) else if (isWorldTour() && act->spr.picnum == DTILE_FIREFLYFLYINGEFFECT)
{ {
fireflyflyingeffect(act); fireflyflyingeffect(act);
} }
@ -1225,7 +1225,7 @@ void handle_se06_d(DDukeActor* actor)
act2->temp_data[4] = actor->temp_data[4]; act2->temp_data[4] = actor->temp_data[4];
} }
} }
handle_se14(actor, true, RPG, JIBS6); handle_se14(actor, true, DTILE_RPG, DTILE_JIBS6);
} }
@ -1293,7 +1293,7 @@ static void handle_se28(DDukeActor* actor)
if (rnd(32) && (actor->temp_data[2] & 1)) if (rnd(32) && (actor->temp_data[2] & 1))
{ {
act2->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE; act2->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE;
spawn(act2, SMALLSMOKE); spawn(act2, DTILE_SMALLSMOKE);
double x; double x;
int p = findplayer(actor, &x); int p = findplayer(actor, &x);
@ -1345,18 +1345,18 @@ void moveeffectors_d(void) //STATNUM 3
break; break;
case SE_14_SUBWAY_CAR: case SE_14_SUBWAY_CAR:
handle_se14(act, true, RPG, JIBS6); handle_se14(act, true, DTILE_RPG, DTILE_JIBS6);
break; break;
case SE_30_TWO_WAY_TRAIN: case SE_30_TWO_WAY_TRAIN:
handle_se30(act, JIBS6); handle_se30(act, DTILE_JIBS6);
break; break;
case SE_2_EARTHQUAKE: case SE_2_EARTHQUAKE:
handle_se02(act); handle_se02(act);
break; break;
//Flashing sector lights after reactor EXPLOSION2 //Flashing sector lights after reactor DTILE_EXPLOSION2
case SE_3_RANDOM_LIGHTS_AFTER_SHOT_OUT: case SE_3_RANDOM_LIGHTS_AFTER_SHOT_OUT:
handle_se03(act); handle_se03(act);
break; break;
@ -1410,7 +1410,7 @@ void moveeffectors_d(void) //STATNUM 3
break; break;
case SE_19_EXPLOSION_LOWERS_CEILING: case SE_19_EXPLOSION_LOWERS_CEILING:
handle_se19(act, BIGFORCE); handle_se19(act, DTILE_BIGFORCE);
break; break;
case SE_20_STRETCH_BRIDGE: case SE_20_STRETCH_BRIDGE:
@ -1433,7 +1433,7 @@ void moveeffectors_d(void) //STATNUM 3
break; break;
} }
case SE_35: case SE_35:
handle_se35(act, SMALLSMOKE, EXPLOSION2); handle_se35(act, DTILE_SMALLSMOKE, DTILE_EXPLOSION2);
break; break;
case SE_25_PISTON: //PISTONS case SE_25_PISTON: //PISTONS
@ -1485,10 +1485,10 @@ void moveeffectors_d(void) //STATNUM 3
break; break;
case 130: case 130:
handle_se130(act, 80, EXPLOSION2); handle_se130(act, 80, DTILE_EXPLOSION2);
break; break;
case 131: case 131:
handle_se130(act, 40, EXPLOSION2); handle_se130(act, 40, DTILE_EXPLOSION2);
break; break;
} }
} }
@ -1570,7 +1570,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
return; return;
} }
if (actor->spr.picnum == WATERBUBBLE) if (actor->spr.picnum == DTILE_WATERBUBBLE)
{ {
int a = 0; int a = 0;
} }
@ -1592,11 +1592,11 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
if (actor->vel.X != 0 || actor->vel.Z != 0) if (actor->vel.X != 0 || actor->vel.Z != 0)
{ {
if (a && actor->spr.picnum != ROTATEGUN) if (a && actor->spr.picnum != DTILE_ROTATEGUN)
{ {
if ((actor->spr.picnum == DRONE || actor->spr.picnum == COMMANDER) && actor->spr.extra > 0) if ((actor->spr.picnum == DTILE_DRONE || actor->spr.picnum == DTILE_COMMANDER) && actor->spr.extra > 0)
{ {
if (actor->spr.picnum == COMMANDER) if (actor->spr.picnum == DTILE_COMMANDER)
{ {
double c, f; double c, f;
calcSlope(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y, &c, &f); calcSlope(actor->sector(), actor->spr.pos.X, actor->spr.pos.Y, &c, &f);
@ -1636,7 +1636,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
} }
} }
} }
else if (actor->spr.picnum != ORGANTIC) else if (actor->spr.picnum != DTILE_ORGANTIC)
{ {
if (actor->vel.Z > 0 && actor->floorz < actor->spr.pos.Z) if (actor->vel.Z > 0 && actor->floorz < actor->spr.pos.Z)
actor->spr.pos.Z = actor->floorz; actor->spr.pos.Z = actor->floorz;
@ -1655,7 +1655,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
daxvel = actor->vel.X; daxvel = actor->vel.X;
angdif = actor->spr.Angles.Yaw; angdif = actor->spr.Angles.Yaw;
if (a && actor->spr.picnum != ROTATEGUN) if (a && actor->spr.picnum != DTILE_ROTATEGUN)
{ {
if (xvel < 960 && actor->spr.scale.X > 0.25 ) if (xvel < 960 && actor->spr.scale.X > 0.25 )
{ {
@ -1701,7 +1701,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
actor->spr.shade += (actor->sector()->ceilingshade - actor->spr.shade) >> 1; actor->spr.shade += (actor->sector()->ceilingshade - actor->spr.shade) >> 1;
else actor->spr.shade += (actor->sector()->floorshade - actor->spr.shade) >> 1; else actor->spr.shade += (actor->sector()->floorshade - actor->spr.shade) >> 1;
if (actor->sector()->floorpicnum == MIRROR) if (actor->sector()->floorpicnum == DTILE_MIRROR)
actor->Destroy(); actor->Destroy();
} }
} }
@ -1715,12 +1715,12 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
void fall_d(DDukeActor *actor, int g_p) void fall_d(DDukeActor *actor, int g_p)
{ {
fall_common(actor, g_p, JIBS6, DRONE, BLOODPOOL, SHOTSPARK1, SQUISHED, THUD, nullptr); fall_common(actor, g_p, DTILE_JIBS6, DTILE_DRONE, DTILE_BLOODPOOL, DTILE_SHOTSPARK1, SQUISHED, THUD, nullptr);
} }
bool spawnweapondebris_d(int picnum) bool spawnweapondebris_d(int picnum)
{ {
return picnum == BLIMP; return picnum == DTILE_BLIMP;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View file

@ -134,11 +134,11 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
switch (h->spr.picnum) switch (h->spr.picnum)
{ {
case DUKELYINGDEAD: case DTILE_DUKELYINGDEAD:
t->pos.Z += 24; t->pos.Z += 24;
break; break;
case BURNING: case DTILE_BURNING:
case BURNING2: case DTILE_BURNING2:
if (OwnerAc && OwnerAc->spr.statnum == STAT_PLAYER) if (OwnerAc && OwnerAc->spr.statnum == STAT_PLAYER)
{ {
if (display_mirror == 0 && OwnerAc->PlayerIndex() == screenpeek && ps[screenpeek].over_shoulder_on == 0) if (display_mirror == 0 && OwnerAc->PlayerIndex() == screenpeek && ps[screenpeek].over_shoulder_on == 0)
@ -151,16 +151,16 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
} }
break; break;
case ATOMICHEALTH: case DTILE_ATOMICHEALTH:
t->pos.Z -= 4; t->pos.Z -= 4;
break; break;
case CRYSTALAMMO: case DTILE_CRYSTALAMMO:
t->shade = int(BobVal(PlayClock << 4) * 16); t->shade = int(BobVal(PlayClock << 4) * 16);
continue; continue;
case GROWSPARK: case DTILE_GROWSPARK:
t->picnum = GROWSPARK + ((PlayClock >> 4) & 3); t->picnum = DTILE_GROWSPARK + ((PlayClock >> 4) & 3);
break; break;
case APLAYER: case DTILE_APLAYER:
p = h->PlayerIndex(); p = h->PlayerIndex();
@ -193,21 +193,21 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
switch (ps[p].curr_weapon) switch (ps[p].curr_weapon)
{ {
case PISTOL_WEAPON: newtspr->picnum = FIRSTGUNSPRITE; break; case PISTOL_WEAPON: newtspr->picnum = DTILE_FIRSTGUNSPRITE; break;
case SHOTGUN_WEAPON: newtspr->picnum = SHOTGUNSPRITE; break; case SHOTGUN_WEAPON: newtspr->picnum = DTILE_SHOTGUNSPRITE; break;
case CHAINGUN_WEAPON: newtspr->picnum = CHAINGUNSPRITE; break; case CHAINGUN_WEAPON: newtspr->picnum = DTILE_CHAINGUNSPRITE; break;
case RPG_WEAPON: newtspr->picnum = RPGSPRITE; break; case RPG_WEAPON: newtspr->picnum = DTILE_RPGSPRITE; break;
case HANDREMOTE_WEAPON: case HANDREMOTE_WEAPON:
case HANDBOMB_WEAPON: newtspr->picnum = HEAVYHBOMB; break; case HANDBOMB_WEAPON: newtspr->picnum = DTILE_HEAVYHBOMB; break;
case TRIPBOMB_WEAPON: newtspr->picnum = TRIPBOMBSPRITE; break; case TRIPBOMB_WEAPON: newtspr->picnum = DTILE_TRIPBOMBSPRITE; break;
case GROW_WEAPON: newtspr->picnum = GROWSPRITEICON; break; case GROW_WEAPON: newtspr->picnum = DTILE_GROWSPRITEICON; break;
case SHRINKER_WEAPON: newtspr->picnum = SHRINKERSPRITE; break; case SHRINKER_WEAPON: newtspr->picnum = DTILE_SHRINKERSPRITE; break;
case FREEZE_WEAPON: newtspr->picnum = FREEZESPRITE; break; case FREEZE_WEAPON: newtspr->picnum = DTILE_FREEZESPRITE; break;
case FLAMETHROWER_WEAPON: //Twentieth Anniversary World Tour case FLAMETHROWER_WEAPON: //Twentieth Anniversary World Tour
if (isWorldTour()) if (isWorldTour())
newtspr->picnum = FLAMETHROWERSPRITE; newtspr->picnum = DTILE_FLAMETHROWERSPRITE;
break; break;
case DEVISTATOR_WEAPON: newtspr->picnum = DEVISTATORSPRITE; break; case DEVISTATOR_WEAPON: newtspr->picnum = DTILE_DEVISTATORSPRITE; break;
} }
if (h->GetOwner()) newtspr->pos.Z = ps[p].GetActor()->getOffsetZ() - 12; if (h->GetOwner()) newtspr->pos.Z = ps[p].GetActor()->getOffsetZ() - 12;
@ -260,9 +260,9 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
if (ps[p].newOwner != nullptr) if (ps[p].newOwner != nullptr)
{ {
t4 = ScriptCode[gs.actorinfo[APLAYER].scriptaddress + 1]; t4 = ScriptCode[gs.actorinfo[DTILE_APLAYER].scriptaddress + 1];
t3 = 0; t3 = 0;
t1 = ScriptCode[gs.actorinfo[APLAYER].scriptaddress + 2]; t1 = ScriptCode[gs.actorinfo[DTILE_APLAYER].scriptaddress + 2];
} }
if (ud.cameraactor == nullptr && ps[p].newOwner == nullptr) if (ud.cameraactor == nullptr && ps[p].newOwner == nullptr)
@ -286,8 +286,8 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
break; break;
case WATERBUBBLE: case DTILE_WATERBUBBLE:
if (t->sectp->floorpicnum == FLOORSLIME) if (t->sectp->floorpicnum == DTILE_FLOORSLIME)
{ {
t->pal = 7; t->pal = 7;
break; break;
@ -314,32 +314,32 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
switch (h->spr.picnum) switch (h->spr.picnum)
{ {
case EXPLOSION2: case DTILE_EXPLOSION2:
case EXPLOSION2BOT: case DTILE_EXPLOSION2BOT:
case ATOMICHEALTH: case DTILE_ATOMICHEALTH:
case GROWSPARK: case DTILE_GROWSPARK:
case CHAINGUN: case DTILE_CHAINGUN:
case SHRINKEREXPLOSION: case DTILE_SHRINKEREXPLOSION:
case FLOORFLAME: case DTILE_FLOORFLAME:
if (t->picnum == EXPLOSION2) if (t->picnum == DTILE_EXPLOSION2)
{ {
ps[screenpeek].visibility = -127; ps[screenpeek].visibility = -127;
lastvisinc = PlayClock + 32; lastvisinc = PlayClock + 32;
} }
t->shade = -127; t->shade = -127;
break; break;
case FIRE: case DTILE_FIRE:
case FIRE2: case DTILE_FIRE2:
t->cstat |= CSTAT_SPRITE_YCENTER; t->cstat |= CSTAT_SPRITE_YCENTER;
[[fallthrough]]; [[fallthrough]];
case BURNING: case DTILE_BURNING:
case BURNING2: case DTILE_BURNING2:
if (!OwnerAc) break; if (!OwnerAc) break;
if (!actorflag(OwnerAc, SFLAG_NOFLOORFIRE)) if (!actorflag(OwnerAc, SFLAG_NOFLOORFIRE))
t->pos.Z = t->sectp->floorz; t->pos.Z = t->sectp->floorz;
t->shade = -127; t->shade = -127;
break; break;
case PLAYERONWATER: case DTILE_PLAYERONWATER:
if (hw_models && modelManager.CheckModel(h->spr.picnum, h->spr.pal)) if (hw_models && modelManager.CheckModel(h->spr.picnum, h->spr.pal))
{ {
k = 0; k = 0;
@ -364,7 +364,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
} }
h->dispicnum = t->picnum; h->dispicnum = t->picnum;
if (t->sectp->floorpicnum == MIRROR) if (t->sectp->floorpicnum == DTILE_MIRROR)
t->scale = DVector2(0, 0); t->scale = DVector2(0, 0);
} }
} }

View file

@ -41,263 +41,263 @@ BEGIN_DUKE_NS
void initactorflags_d() void initactorflags_d()
{ {
gs.actorinfo[COMMANDER].gutsoffset = -24; gs.actorinfo[DTILE_COMMANDER].gutsoffset = -24;
for (auto &fa : gs.actorinfo) for (auto &fa : gs.actorinfo)
{ {
fa.falladjustz = 24; fa.falladjustz = 24;
} }
gs.actorinfo[OCTABRAIN].falladjustz = gs.actorinfo[COMMANDER].falladjustz = gs.actorinfo[DRONE].falladjustz = 0; gs.actorinfo[DTILE_OCTABRAIN].falladjustz = gs.actorinfo[DTILE_COMMANDER].falladjustz = gs.actorinfo[DTILE_DRONE].falladjustz = 0;
setflag(SFLAG_INTERNAL_BADGUY, { setflag(SFLAG_INTERNAL_BADGUY, {
SHARK, DTILE_SHARK,
RECON, DTILE_RECON,
DRONE, DTILE_DRONE,
LIZTROOPONTOILET, DTILE_LIZTROOPONTOILET,
LIZTROOPJUSTSIT, DTILE_LIZTROOPJUSTSIT,
LIZTROOPSTAYPUT, DTILE_LIZTROOPSTAYPUT,
LIZTROOPSHOOT, DTILE_LIZTROOPSHOOT,
LIZTROOPJETPACK, DTILE_LIZTROOPJETPACK,
LIZTROOPDUCKING, DTILE_LIZTROOPDUCKING,
LIZTROOPRUNNING, DTILE_LIZTROOPRUNNING,
LIZTROOP, DTILE_LIZTROOP,
OCTABRAIN, DTILE_OCTABRAIN,
COMMANDER, DTILE_COMMANDER,
COMMANDERSTAYPUT, DTILE_COMMANDERSTAYPUT,
PIGCOP, DTILE_PIGCOP,
EGG, DTILE_EGG,
PIGCOPSTAYPUT, DTILE_PIGCOPSTAYPUT,
PIGCOPDIVE, DTILE_PIGCOPDIVE,
LIZMAN, DTILE_LIZMAN,
LIZMANSPITTING, DTILE_LIZMANSPITTING,
LIZMANFEEDING, DTILE_LIZMANFEEDING,
LIZMANJUMP, DTILE_LIZMANJUMP,
ORGANTIC, DTILE_ORGANTIC,
BOSS1, DTILE_BOSS1,
BOSS2, DTILE_BOSS2,
BOSS3, DTILE_BOSS3,
BOSS4, DTILE_BOSS4,
GREENSLIME, DTILE_GREENSLIME,
RAT, DTILE_RAT,
ROTATEGUN }); DTILE_ROTATEGUN });
// non-STAT_ACTOR classes that need CON support. For compatibility this must be explicitly enabled. // non-STAT_ACTOR classes that need CON support. For compatibility this must be explicitly enabled.
setflag(SFLAG3_FORCERUNCON, { setflag(SFLAG3_FORCERUNCON, {
EXPLODINGBARREL, DTILE_EXPLODINGBARREL,
WOODENHORSE, DTILE_WOODENHORSE,
HORSEONSIDE, DTILE_HORSEONSIDE,
FLOORFLAME, DTILE_FLOORFLAME,
FIREBARREL, DTILE_FIREBARREL,
FIREVASE, DTILE_FIREVASE,
NUKEBARREL, DTILE_NUKEBARREL,
NUKEBARRELDENTED, DTILE_NUKEBARRELDENTED,
NUKEBARRELLEAKED, DTILE_NUKEBARRELLEAKED,
TOILETWATER, DTILE_TOILETWATER,
RUBBERCAN, DTILE_RUBBERCAN,
STEAM, DTILE_STEAM,
CEILINGSTEAM, DTILE_CEILINGSTEAM,
WATERBUBBLEMAKER, DTILE_WATERBUBBLEMAKER,
SHOTSPARK1, DTILE_SHOTSPARK1,
BURNING, DTILE_BURNING,
BURNING2, DTILE_BURNING2,
FECES, DTILE_FECES,
WATERBUBBLE, DTILE_WATERBUBBLE,
SMALLSMOKE, DTILE_SMALLSMOKE,
EXPLOSION2, DTILE_EXPLOSION2,
SHRINKEREXPLOSION, DTILE_SHRINKEREXPLOSION,
EXPLOSION2BOT, DTILE_EXPLOSION2BOT,
BLOOD, DTILE_BLOOD,
LASERSITE, DTILE_LASERSITE,
FORCERIPPLE, DTILE_FORCERIPPLE,
TRANSPORTERSTAR, DTILE_TRANSPORTERSTAR,
TRANSPORTERBEAM DTILE_TRANSPORTERBEAM
}); });
// Some flags taken from RedNukem's init code. This is a good start as any to reduce the insane dependency on tile numbers for making decisions in the play code. A lot more will be added here later. // Some flags taken from RedNukem's init code. This is a good start as any to reduce the insane dependency on tile numbers for making decisions in the play code. A lot more will be added here later.
setflag(SFLAG_NODAMAGEPUSH, { TANK, BOSS1, BOSS2, BOSS3, BOSS4, RECON, ROTATEGUN }); setflag(SFLAG_NODAMAGEPUSH, { DTILE_TANK, DTILE_BOSS1, DTILE_BOSS2, DTILE_BOSS3, DTILE_BOSS4, DTILE_RECON, DTILE_ROTATEGUN });
setflag(SFLAG_BOSS, { BOSS1, BOSS2, BOSS3, BOSS4, BOSS4STAYPUT, BOSS1STAYPUT }); setflag(SFLAG_BOSS, { DTILE_BOSS1, DTILE_BOSS2, DTILE_BOSS3, DTILE_BOSS4, DTILE_BOSS4STAYPUT, DTILE_BOSS1STAYPUT });
if (isWorldTour()) setflag(SFLAG_BOSS, { BOSS2STAYPUT, BOSS3STAYPUT, BOSS5, BOSS5STAYPUT }); if (isWorldTour()) setflag(SFLAG_BOSS, { DTILE_BOSS2STAYPUT, DTILE_BOSS3STAYPUT, DTILE_BOSS5, DTILE_BOSS5STAYPUT });
setflag(SFLAG_NOWATERDIP, { OCTABRAIN, COMMANDER, DRONE }); setflag(SFLAG_NOWATERDIP, { DTILE_OCTABRAIN, DTILE_COMMANDER, DTILE_DRONE });
setflag(SFLAG_GREENSLIMEFOOD, { LIZTROOP, LIZMAN, PIGCOP, NEWBEAST }); setflag(SFLAG_GREENSLIMEFOOD, { DTILE_LIZTROOP, DTILE_LIZMAN, DTILE_PIGCOP, DTILE_NEWBEAST });
setflag(SFLAG_NOINTERPOLATE, { CRANEPOLE }); setflag(SFLAG_NOINTERPOLATE, { DTILE_CRANEPOLE });
setflag(SFLAG_FLAMMABLEPOOLEFFECT, { TIRE }); setflag(SFLAG_FLAMMABLEPOOLEFFECT, { DTILE_TIRE });
setflag(SFLAG_FALLINGFLAMMABLE, { BOX }); setflag(SFLAG_FALLINGFLAMMABLE, { DTILE_BOX });
setflag(SFLAG_INFLAME, { RADIUSEXPLOSION, RPG, FIRELASER, HYDRENT, HEAVYHBOMB }); setflag(SFLAG_INFLAME, { DTILE_RADIUSEXPLOSION, DTILE_RPG, DTILE_FIRELASER, DTILE_HYDRENT, DTILE_HEAVYHBOMB });
setflag(SFLAG_NOFLOORFIRE, { TREE1, TREE2 }); setflag(SFLAG_NOFLOORFIRE, { DTILE_TREE1, DTILE_TREE2 });
setflag(SFLAG_HITRADIUS_FLAG1, { BOX, TREE1, TREE2, TIRE, CONE }); setflag(SFLAG_HITRADIUS_FLAG1, { DTILE_BOX, DTILE_TREE1, DTILE_TREE2, DTILE_TIRE, DTILE_CONE });
setflag(SFLAG_HITRADIUS_FLAG2, { TRIPBOMB, QUEBALL, STRIPEBALL, DUKELYINGDEAD }); setflag(SFLAG_HITRADIUS_FLAG2, { DTILE_TRIPBOMB, DTILE_QUEBALL, DTILE_STRIPEBALL, DTILE_DUKELYINGDEAD });
setflag(SFLAG_CHECKSLEEP, { RUBBERCAN, EXPLODINGBARREL, WOODENHORSE, HORSEONSIDE, CANWITHSOMETHING, FIREBARREL, NUKEBARREL, NUKEBARRELDENTED, NUKEBARRELLEAKED, TRIPBOMB }); setflag(SFLAG_CHECKSLEEP, { DTILE_RUBBERCAN, DTILE_EXPLODINGBARREL, DTILE_WOODENHORSE, DTILE_HORSEONSIDE, DTILE_CANWITHSOMETHING, DTILE_FIREBARREL, DTILE_NUKEBARREL, DTILE_NUKEBARRELDENTED, DTILE_NUKEBARRELLEAKED, DTILE_TRIPBOMB });
setflag(SFLAG_NOTELEPORT, { TRANSPORTERSTAR, TRANSPORTERBEAM, TRIPBOMB, BULLETHOLE, WATERSPLASH2, BURNING, BURNING2, FIRE, FIRE2, TOILETWATER, LASERLINE }); setflag(SFLAG_NOTELEPORT, { DTILE_TRANSPORTERSTAR, DTILE_TRANSPORTERBEAM, DTILE_TRIPBOMB, DTILE_BULLETHOLE, DTILE_WATERSPLASH2, DTILE_BURNING, DTILE_BURNING2, DTILE_FIRE, DTILE_FIRE2, DTILE_TOILETWATER, DTILE_LASERLINE });
setflag(SFLAG_SE24_NOCARRY, { TRIPBOMB, LASERLINE, BOLT1, BOLT2, BOLT3, BOLT4, SIDEBOLT1, SIDEBOLT2, SIDEBOLT3, SIDEBOLT4, CRANE, CRANE1, CRANE2, BARBROKE }); setflag(SFLAG_SE24_NOCARRY, { DTILE_TRIPBOMB, DTILE_LASERLINE, DTILE_BOLT1, DTILE_BOLT2, DTILE_BOLT3, DTILE_BOLT4, DTILE_SIDEBOLT1, DTILE_SIDEBOLT2, DTILE_SIDEBOLT3, DTILE_SIDEBOLT4, DTILE_CRANE, DTILE_CRANE1, DTILE_CRANE2, DTILE_BARBROKE });
setflag(SFLAG_SE24_REMOVE, { BLOODPOOL, PUKE, FOOTPRINTS, FOOTPRINTS2, FOOTPRINTS3, FOOTPRINTS4, BULLETHOLE, BLOODSPLAT1, BLOODSPLAT2, BLOODSPLAT3, BLOODSPLAT4 }); setflag(SFLAG_SE24_REMOVE, { DTILE_BLOODPOOL, DTILE_PUKE, DTILE_FOOTPRINTS, DTILE_FOOTPRINTS2, DTILE_FOOTPRINTS3, DTILE_FOOTPRINTS4, DTILE_BULLETHOLE, DTILE_BLOODSPLAT1, DTILE_BLOODSPLAT2, DTILE_BLOODSPLAT3, DTILE_BLOODSPLAT4 });
setflag(SFLAG_BLOCK_TRIPBOMB, { TRIPBOMB }); // making this a flag adds the option to let other things block placing trip bombs as well. setflag(SFLAG_BLOCK_TRIPBOMB, { DTILE_TRIPBOMB }); // making this a flag adds the option to let other things block placing trip bombs as well.
setflag(SFLAG_NOFALLER, { CRACK1, CRACK2, CRACK3, CRACK4, SPEAKER, LETTER, DUCK, TARGET, TRIPBOMB, VIEWSCREEN, VIEWSCREEN2 }); setflag(SFLAG_NOFALLER, { DTILE_CRACK1, DTILE_CRACK2, DTILE_CRACK3, DTILE_CRACK4, DTILE_SPEAKER, DTILE_LETTER, DTILE_DUCK, DTILE_TARGET, DTILE_TRIPBOMB, DTILE_VIEWSCREEN, DTILE_VIEWSCREEN2 });
setflag(SFLAG2_NOROTATEWITHSECTOR, { LASERLINE }); setflag(SFLAG2_NOROTATEWITHSECTOR, { DTILE_LASERLINE });
setflag(SFLAG2_SHOWWALLSPRITEONMAP, { LASERLINE }); setflag(SFLAG2_SHOWWALLSPRITEONMAP, { DTILE_LASERLINE });
setflag(SFLAG2_NOFLOORPAL, { setflag(SFLAG2_NOFLOORPAL, {
TRIPBOMB, DTILE_TRIPBOMB,
LASERLINE, DTILE_LASERLINE,
FORCESPHERE, DTILE_FORCESPHERE,
BURNING, DTILE_BURNING,
BURNING2, DTILE_BURNING2,
ATOMICHEALTH, DTILE_ATOMICHEALTH,
CRYSTALAMMO, DTILE_CRYSTALAMMO,
VIEWSCREEN, DTILE_VIEWSCREEN,
VIEWSCREEN2, DTILE_VIEWSCREEN2,
SHRINKSPARK, DTILE_SHRINKSPARK,
GROWSPARK, DTILE_GROWSPARK,
RPG, DTILE_RPG,
RECON }); DTILE_RECON });
setflag(SFLAG2_EXPLOSIVE, { FIREEXT, RPG, RADIUSEXPLOSION, SEENINE, OOZFILTER }); setflag(SFLAG2_EXPLOSIVE, { DTILE_FIREEXT, DTILE_RPG, DTILE_RADIUSEXPLOSION, DTILE_SEENINE, DTILE_OOZFILTER });
setflag(SFLAG2_BRIGHTEXPLODE, { SEENINE, OOZFILTER }); setflag(SFLAG2_BRIGHTEXPLODE, { DTILE_SEENINE, DTILE_OOZFILTER });
setflag(SFLAG2_DOUBLEDMGTHRUST, { RADIUSEXPLOSION, RPG, HYDRENT, HEAVYHBOMB, SEENINE, OOZFILTER, EXPLODINGBARREL }); setflag(SFLAG2_DOUBLEDMGTHRUST, { DTILE_RADIUSEXPLOSION, DTILE_RPG, DTILE_HYDRENT, DTILE_HEAVYHBOMB, DTILE_SEENINE, DTILE_OOZFILTER, DTILE_EXPLODINGBARREL });
setflag(SFLAG2_BREAKMIRRORS, { RADIUSEXPLOSION, RPG, HYDRENT, HEAVYHBOMB, SEENINE, OOZFILTER, EXPLODINGBARREL }); setflag(SFLAG2_BREAKMIRRORS, { DTILE_RADIUSEXPLOSION, DTILE_RPG, DTILE_HYDRENT, DTILE_HEAVYHBOMB, DTILE_SEENINE, DTILE_OOZFILTER, DTILE_EXPLODINGBARREL });
setflag(SFLAG2_CAMERA, { CAMERA1 }); setflag(SFLAG2_CAMERA, { DTILE_CAMERA1 });
setflag(SFLAG2_DONTANIMATE, { TRIPBOMB, LASERLINE }); setflag(SFLAG2_DONTANIMATE, { DTILE_TRIPBOMB, DTILE_LASERLINE });
setflag(SFLAG2_INTERPOLATEANGLE, { BEARINGPLATE }); setflag(SFLAG2_INTERPOLATEANGLE, { DTILE_BEARINGPLATE });
setflag(SFLAG2_GREENBLOOD, { OOZFILTER, NEWBEAST, NUKEBARREL }); setflag(SFLAG2_GREENBLOOD, { DTILE_OOZFILTER, DTILE_NEWBEAST, DTILE_NUKEBARREL });
setflag(SFLAG2_ALWAYSROTATE1, { RAT, CAMERA1, CHAIR3 }); setflag(SFLAG2_ALWAYSROTATE1, { DTILE_RAT, DTILE_CAMERA1, DTILE_CHAIR3 });
setflag(SFLAG2_ALWAYSROTATE2, { RPG }); setflag(SFLAG2_ALWAYSROTATE2, { DTILE_RPG });
setflag(SFLAG2_DIENOW, { RADIUSEXPLOSION, KNEE }); setflag(SFLAG2_DIENOW, { DTILE_RADIUSEXPLOSION, DTILE_KNEE });
setflag(SFLAG2_TRANFERPALTOJIBS, { LIZTROOP }); setflag(SFLAG2_TRANFERPALTOJIBS, { DTILE_LIZTROOP });
setflag(SFLAG2_NORADIUSPUSH, { TANK, ROTATEGUN, RECON }); setflag(SFLAG2_NORADIUSPUSH, { DTILE_TANK, DTILE_ROTATEGUN, DTILE_RECON });
setflag(SFLAG2_FREEZEDAMAGE | SFLAG2_REFLECTIVE, { FREEZEBLAST }); setflag(SFLAG2_FREEZEDAMAGE | SFLAG2_REFLECTIVE, { DTILE_FREEZEBLAST });
setflag(SFLAG2_ALWAYSROTATE2, { RECON }); setflag(SFLAG2_ALWAYSROTATE2, { DTILE_RECON });
setflag(SFLAG2_SPECIALAUTOAIM, { RECON }); setflag(SFLAG2_SPECIALAUTOAIM, { DTILE_RECON });
setflag(SFLAG2_IGNOREHITOWNER, { RECON }); setflag(SFLAG2_IGNOREHITOWNER, { DTILE_RECON });
setflag(SFLAG2_NODAMAGEPUSH, { RECON, TANK, ROTATEGUN }); setflag(SFLAG2_NODAMAGEPUSH, { DTILE_RECON, DTILE_TANK, DTILE_ROTATEGUN });
setflag(SFLAG2_FLOATING, { DRONE, SHARK, COMMANDER }); setflag(SFLAG2_FLOATING, { DTILE_DRONE, DTILE_SHARK, DTILE_COMMANDER });
setflag(SFLAG2_NONSMOKYROCKET, { BOSS2 }); // If this wasn't needed for a CON defined actor it could be handled better setflag(SFLAG2_NONSMOKYROCKET, { DTILE_BOSS2 }); // If this wasn't needed for a CON defined actor it could be handled better
setflag(SFLAG2_MIRRORREFLECT, { SHRINKSPARK, FIRELASER, COOLEXPLOSION1 }); setflag(SFLAG2_MIRRORREFLECT, { DTILE_SHRINKSPARK, DTILE_FIRELASER, DTILE_COOLEXPLOSION1 });
setflag(SFLAG2_UNDERWATERSLOWDOWN, { RPG }); setflag(SFLAG2_UNDERWATERSLOWDOWN, { DTILE_RPG });
setflag(SFLAG3_BROWNBLOOD, { FECES }); setflag(SFLAG3_BROWNBLOOD, { DTILE_FECES });
setflag(SFLAG3_DONTDIVEALIVE, { OCTABRAIN, SHARK, GREENSLIME }); setflag(SFLAG3_DONTDIVEALIVE, { DTILE_OCTABRAIN, DTILE_SHARK, DTILE_GREENSLIME });
setflag(SFLAG3_LIGHTDAMAGE, { SHOTSPARK1 }); setflag(SFLAG3_LIGHTDAMAGE, { DTILE_SHOTSPARK1 });
if (isWorldTour()) if (isWorldTour())
{ {
setflag(SFLAG_INTERNAL_BADGUY, { FIREFLY }); setflag(SFLAG_INTERNAL_BADGUY, { DTILE_FIREFLY });
setflag(SFLAG_INTERNAL_BADGUY|SFLAG_NODAMAGEPUSH|SFLAG_BOSS, { BOSS5 }); setflag(SFLAG_INTERNAL_BADGUY|SFLAG_NODAMAGEPUSH|SFLAG_BOSS, { DTILE_BOSS5 });
setflag(SFLAG3_FORCERUNCON, { LAVAPOOL, ONFIRE, ONFIRESMOKE, BURNEDCORPSE, LAVAPOOLBUBBLE, WHISPYSMOKE, FIREFLYFLYINGEFFECT }); setflag(SFLAG3_FORCERUNCON, { DTILE_LAVAPOOL, DTILE_ONFIRE, DTILE_ONFIRESMOKE, DTILE_BURNEDCORPSE, DTILE_LAVAPOOLBUBBLE, DTILE_WHISPYSMOKE, DTILE_FIREFLYFLYINGEFFECT });
} }
setflag(SFLAG_INVENTORY, { setflag(SFLAG_INVENTORY, {
FIRSTAID, DTILE_FIRSTAID,
STEROIDS, DTILE_STEROIDS,
HEATSENSOR, DTILE_HEATSENSOR,
BOOTS, DTILE_BOOTS,
JETPACK, DTILE_JETPACK,
HOLODUKE, DTILE_HOLODUKE,
AIRTANK }); DTILE_AIRTANK });
setflag(SFLAG_SHRINKAUTOAIM, { setflag(SFLAG_SHRINKAUTOAIM, {
GREENSLIME, DTILE_GREENSLIME,
}); });
setflag(SFLAG_HITRADIUSCHECK, { setflag(SFLAG_HITRADIUSCHECK, {
PODFEM1 , DTILE_PODFEM1 ,
FEM1, DTILE_FEM1,
FEM2, DTILE_FEM2,
FEM3, DTILE_FEM3,
FEM4, DTILE_FEM4,
FEM5, DTILE_FEM5,
FEM6, DTILE_FEM6,
FEM7, DTILE_FEM7,
FEM8, DTILE_FEM8,
FEM9, DTILE_FEM9,
FEM10, DTILE_FEM10,
STATUE, DTILE_STATUE,
STATUEFLASH, DTILE_STATUEFLASH,
SPACEMARINE, DTILE_SPACEMARINE,
QUEBALL, DTILE_QUEBALL,
STRIPEBALL DTILE_STRIPEBALL
}); });
setflag(SFLAG_TRIGGER_IFHITSECTOR, { EXPLOSION2 }); setflag(SFLAG_TRIGGER_IFHITSECTOR, { DTILE_EXPLOSION2 });
setflag(SFLAG_MOVEFTA_MAKESTANDABLE, { setflag(SFLAG_MOVEFTA_MAKESTANDABLE, {
RUBBERCAN, DTILE_RUBBERCAN,
EXPLODINGBARREL, DTILE_EXPLODINGBARREL,
WOODENHORSE, DTILE_WOODENHORSE,
HORSEONSIDE, DTILE_HORSEONSIDE,
CANWITHSOMETHING, DTILE_CANWITHSOMETHING,
CANWITHSOMETHING2, DTILE_CANWITHSOMETHING2,
CANWITHSOMETHING3, DTILE_CANWITHSOMETHING3,
CANWITHSOMETHING4, DTILE_CANWITHSOMETHING4,
FIREBARREL, DTILE_FIREBARREL,
FIREVASE, DTILE_FIREVASE,
NUKEBARREL, DTILE_NUKEBARREL,
NUKEBARRELDENTED, DTILE_NUKEBARRELDENTED,
NUKEBARRELLEAKED, DTILE_NUKEBARRELLEAKED,
TRIPBOMB DTILE_TRIPBOMB
}); });
setflag(SFLAG2_TRIGGERRESPAWN, { setflag(SFLAG2_TRIGGERRESPAWN, {
FEM1, DTILE_FEM1,
FEM2, DTILE_FEM2,
FEM3, DTILE_FEM3,
FEM4, DTILE_FEM4,
FEM5, DTILE_FEM5,
FEM6, DTILE_FEM6,
FEM7, DTILE_FEM7,
FEM8, DTILE_FEM8,
FEM9, DTILE_FEM9,
FEM10, DTILE_FEM10,
PODFEM1, DTILE_PODFEM1,
NAKED1, DTILE_NAKED1,
STATUE, DTILE_STATUE,
TOUGHGAL DTILE_TOUGHGAL
}); });
setflag(SFLAG2_FORCESECTORSHADE, { GREENSLIME }); setflag(SFLAG2_FORCESECTORSHADE, { DTILE_GREENSLIME });
setflag(SFLAG3_DONTDIVEALIVE, { GREENSLIME, SHARK, OCTABRAIN }); setflag(SFLAG3_DONTDIVEALIVE, { DTILE_GREENSLIME, DTILE_SHARK, DTILE_OCTABRAIN });
setflag(SFLAG3_BLOODY, { BLOODPOOL }); setflag(SFLAG3_BLOODY, { DTILE_BLOODPOOL });
// The feature guarded by this flag does not exist in Duke, it always acts as if the flag was set. // The feature guarded by this flag does not exist in Duke, it always acts as if the flag was set.
for (auto& ainf : gs.actorinfo) ainf.flags |= SFLAG_MOVEFTA_CHECKSEE; for (auto& ainf : gs.actorinfo) ainf.flags |= SFLAG_MOVEFTA_CHECKSEE;
gs.actorinfo[ORGANTIC].aimoffset = 32; gs.actorinfo[DTILE_ORGANTIC].aimoffset = 32;
gs.actorinfo[ROTATEGUN].aimoffset = 32; gs.actorinfo[DTILE_ROTATEGUN].aimoffset = 32;
gs.weaponsandammosprites[0] = RPGSPRITE; gs.weaponsandammosprites[0] = DTILE_RPGSPRITE;
gs.weaponsandammosprites[1] = CHAINGUNSPRITE; gs.weaponsandammosprites[1] = DTILE_CHAINGUNSPRITE;
gs.weaponsandammosprites[2] = DEVISTATORAMMO; gs.weaponsandammosprites[2] = DTILE_DEVISTATORAMMO;
gs.weaponsandammosprites[3] = RPGAMMO; gs.weaponsandammosprites[3] = DTILE_RPGAMMO;
gs.weaponsandammosprites[4] = RPGAMMO; gs.weaponsandammosprites[4] = DTILE_RPGAMMO;
gs.weaponsandammosprites[5] = JETPACK; gs.weaponsandammosprites[5] = DTILE_JETPACK;
gs.weaponsandammosprites[6] = SHIELD; gs.weaponsandammosprites[6] = DTILE_SHIELD;
gs.weaponsandammosprites[7] = FIRSTAID; gs.weaponsandammosprites[7] = DTILE_FIRSTAID;
gs.weaponsandammosprites[8] = STEROIDS; gs.weaponsandammosprites[8] = DTILE_STEROIDS;
gs.weaponsandammosprites[9] = RPGAMMO; gs.weaponsandammosprites[9] = DTILE_RPGAMMO;
gs.weaponsandammosprites[10] = RPGAMMO; gs.weaponsandammosprites[10] = DTILE_RPGAMMO;
gs.weaponsandammosprites[11] = RPGSPRITE; gs.weaponsandammosprites[11] = DTILE_RPGSPRITE;
gs.weaponsandammosprites[12] = RPGAMMO; gs.weaponsandammosprites[12] = DTILE_RPGAMMO;
gs.weaponsandammosprites[13] = FREEZESPRITE; gs.weaponsandammosprites[13] = DTILE_FREEZESPRITE;
gs.weaponsandammosprites[14] = FREEZEAMMO; gs.weaponsandammosprites[14] = DTILE_FREEZEAMMO;
gs.firstdebris = SCRAP6; gs.firstdebris = DTILE_SCRAP6;
TILE_W_FORCEFIELD = W_FORCEFIELD; TILE_W_FORCEFIELD = DTILE_W_FORCEFIELD;
TILE_APLAYER = APLAYER; TILE_APLAYER = DTILE_APLAYER;
TILE_DRONE = DRONE; TILE_DRONE = DTILE_DRONE;
TILE_SCREENBORDER = BIGHOLE; TILE_SCREENBORDER = DTILE_BIGHOLE;
TILE_VIEWBORDER = VIEWBORDER; TILE_VIEWBORDER = DTILE_VIEWBORDER;
TILE_APLAYERTOP = APLAYERTOP; TILE_APLAYERTOP = DTILE_APLAYERTOP;
TILE_CAMCORNER = CAMCORNER; TILE_CAMCORNER = DTILE_CAMCORNER;
TILE_CAMLIGHT = CAMLIGHT; TILE_CAMLIGHT = DTILE_CAMLIGHT;
TILE_STATIC = STATIC; TILE_STATIC = DTILE_STATIC;
TILE_BOTTOMSTATUSBAR = isWorldTour()? WIDESCREENSTATUSBAR : BOTTOMSTATUSBAR; TILE_BOTTOMSTATUSBAR = isWorldTour()? DTILE_WIDESCREENSTATUSBAR : DTILE_BOTTOMSTATUSBAR;
TILE_ATOMICHEALTH = ATOMICHEALTH; TILE_ATOMICHEALTH = DTILE_ATOMICHEALTH;
TILE_FIRE = FIRE; TILE_FIRE = DTILE_FIRE;
TILE_WATERBUBBLE = WATERBUBBLE; TILE_WATERBUBBLE = DTILE_WATERBUBBLE;
TILE_SMALLSMOKE = SMALLSMOKE; TILE_SMALLSMOKE = DTILE_SMALLSMOKE;
TILE_BLOODPOOL = BLOODPOOL; TILE_BLOODPOOL = DTILE_BLOODPOOL;
TILE_CLOUDYSKIES = CLOUDYSKIES; TILE_CLOUDYSKIES = DTILE_CLOUDYSKIES;
TILE_ACCESSSWITCH = ACCESSSWITCH; TILE_ACCESSSWITCH = DTILE_ACCESSSWITCH;
TILE_ACCESSSWITCH2 = ACCESSSWITCH2; TILE_ACCESSSWITCH2 = DTILE_ACCESSSWITCH2;
TILE_MIRROR = MIRROR; TILE_MIRROR = DTILE_MIRROR;
TILE_LOADSCREEN = LOADSCREEN; TILE_LOADSCREEN = DTILE_LOADSCREEN;
TILE_CROSSHAIR = CROSSHAIR; TILE_CROSSHAIR = DTILE_CROSSHAIR;
TILE_EGG = EGG; TILE_EGG = DTILE_EGG;
} }

View file

@ -642,7 +642,7 @@ void AddSystemVars()
AddGameVar(aszBuf, WEAPON_FLAG_NOVISIBLE | WEAPON_FLAG_AUTOMATIC | WEAPON_FLAG_RANDOMRESTART, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, WEAPON_FLAG_NOVISIBLE | WEAPON_FLAG_AUTOMATIC | WEAPON_FLAG_RANDOMRESTART, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOOTS", KNEE_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOOTS", KNEE_WEAPON);
AddGameVar(aszBuf, KNEE, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_KNEE, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWNTIME", KNEE_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWNTIME", KNEE_WEAPON);
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
@ -689,13 +689,13 @@ void AddSystemVars()
AddGameVar(aszBuf, WEAPON_FLAG_AUTOMATIC | WEAPON_FLAG_HOLSTER_CLEARS_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, WEAPON_FLAG_AUTOMATIC | WEAPON_FLAG_HOLSTER_CLEARS_CLIP, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOOTS", PISTOL_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOOTS", PISTOL_WEAPON);
AddGameVar(aszBuf, SHOTSPARK1, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_SHOTSPARK1, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWNTIME", PISTOL_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWNTIME", PISTOL_WEAPON);
AddGameVar(aszBuf, 2, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 2, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWN", PISTOL_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWN", PISTOL_WEAPON);
AddGameVar(aszBuf, SHELL, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_SHELL, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOTSPERBURST", PISTOL_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOTSPERBURST", PISTOL_WEAPON);
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
@ -735,13 +735,13 @@ void AddSystemVars()
AddGameVar(aszBuf, WEAPON_FLAG_CHECKATRELOAD, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, WEAPON_FLAG_CHECKATRELOAD, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOOTS", SHOTGUN_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOOTS", SHOTGUN_WEAPON);
AddGameVar(aszBuf, SHOTGUN, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_SHOTGUN, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWNTIME", SHOTGUN_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWNTIME", SHOTGUN_WEAPON);
AddGameVar(aszBuf, 24, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 24, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWN", SHOTGUN_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWN", SHOTGUN_WEAPON);
AddGameVar(aszBuf, SHOTGUNSHELL, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_SHOTGUNSHELL, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOTSPERBURST", SHOTGUN_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOTSPERBURST", SHOTGUN_WEAPON);
AddGameVar(aszBuf, 7, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 7, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
@ -783,13 +783,13 @@ void AddSystemVars()
sprintf(aszBuf, "WEAPON%d_SHOOTS", CHAINGUN_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOOTS", CHAINGUN_WEAPON);
AddGameVar(aszBuf, CHAINGUN, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_CHAINGUN, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWNTIME", CHAINGUN_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWNTIME", CHAINGUN_WEAPON);
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWN", CHAINGUN_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWN", CHAINGUN_WEAPON);
AddGameVar(aszBuf, SHELL, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_SHELL, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOTSPERBURST", CHAINGUN_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOTSPERBURST", CHAINGUN_WEAPON);
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
@ -829,7 +829,7 @@ void AddSystemVars()
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOOTS", RPG_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOOTS", RPG_WEAPON);
AddGameVar(aszBuf, RPG, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_RPG, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWNTIME", RPG_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWNTIME", RPG_WEAPON);
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
@ -875,7 +875,7 @@ void AddSystemVars()
AddGameVar(aszBuf, WEAPON_FLAG_THROWIT, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, WEAPON_FLAG_THROWIT, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOOTS", HANDBOMB_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOOTS", HANDBOMB_WEAPON);
AddGameVar(aszBuf, HEAVYHBOMB, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_HEAVYHBOMB, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWNTIME", HANDBOMB_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWNTIME", HANDBOMB_WEAPON);
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
@ -923,7 +923,7 @@ void AddSystemVars()
AddGameVar(aszBuf, WEAPON_FLAG_GLOWS, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, WEAPON_FLAG_GLOWS, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOOTS", SHRINKER_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOOTS", SHRINKER_WEAPON);
AddGameVar(aszBuf, SHRINKER, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_SHRINKER, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWNTIME", SHRINKER_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWNTIME", SHRINKER_WEAPON);
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
@ -969,7 +969,7 @@ void AddSystemVars()
AddGameVar(aszBuf, WEAPON_FLAG_FIREEVERYOTHER, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, WEAPON_FLAG_FIREEVERYOTHER, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOOTS", DEVISTATOR_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOOTS", DEVISTATOR_WEAPON);
AddGameVar(aszBuf, RPG, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_RPG, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWNTIME", DEVISTATOR_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWNTIME", DEVISTATOR_WEAPON);
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
@ -1015,7 +1015,7 @@ void AddSystemVars()
AddGameVar(aszBuf, WEAPON_FLAG_STANDSTILL, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, WEAPON_FLAG_STANDSTILL, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOOTS", TRIPBOMB_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOOTS", TRIPBOMB_WEAPON);
AddGameVar(aszBuf, HANDHOLDINGLASER, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_HANDHOLDINGLASER, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWNTIME", TRIPBOMB_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWNTIME", TRIPBOMB_WEAPON);
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
@ -1061,7 +1061,7 @@ void AddSystemVars()
AddGameVar(aszBuf, WEAPON_FLAG_FIREEVERYOTHER, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, WEAPON_FLAG_FIREEVERYOTHER, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOOTS", FREEZE_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOOTS", FREEZE_WEAPON);
AddGameVar(aszBuf, FREEZEBLAST, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_FREEZEBLAST, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWNTIME", FREEZE_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWNTIME", FREEZE_WEAPON);
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
@ -1156,7 +1156,7 @@ void AddSystemVars()
AddGameVar(aszBuf, WEAPON_FLAG_GLOWS, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, WEAPON_FLAG_GLOWS, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SHOOTS", GROW_WEAPON); sprintf(aszBuf, "WEAPON%d_SHOOTS", GROW_WEAPON);
AddGameVar(aszBuf, GROWSPARK, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, DTILE_GROWSPARK, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);
sprintf(aszBuf, "WEAPON%d_SPAWNTIME", GROW_WEAPON); sprintf(aszBuf, "WEAPON%d_SPAWNTIME", GROW_WEAPON);
AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM); AddGameVar(aszBuf, 0, GAMEVAR_FLAG_PERPLAYER | GAMEVAR_FLAG_SYSTEM);

View file

@ -74,7 +74,7 @@ static void displayloogie(player_struct* p, double const interpfrac)
const double z = 4096. + ((loogi + i) * 512.); const double z = 4096. + ((loogi + i) * 512.);
const double x = -getavel(p->GetPlayerNum()) + BobVal((loogi + i) * 64.) * 16; const double x = -getavel(p->GetPlayerNum()) + BobVal((loogi + i) * 64.) * 16;
hud_drawsprite((p->loogie[i].X + x), (200 + p->loogie[i].Y - y), z - (i << 8), 256 - a, LOOGIE, 0, 0, 2); hud_drawsprite((p->loogie[i].X + x), (200 + p->loogie[i].Y - y), z - (i << 8), 256 - a, DTILE_LOOGIE, 0, 0, 2);
} }
} }
@ -92,7 +92,7 @@ static bool animatefist(int gs, player_struct* p, double xoffset, double yoffset
hud_drawsprite( hud_drawsprite(
(-fisti + 222 + xoffset), (-fisti + 222 + xoffset),
(yoffset + 194 + BobVal((6 + fisti) * 128.) * 32), (yoffset + 194 + BobVal((6 + fisti) * 128.) * 32),
clamp(65536. - 65536. * BobVal(512 + fisti * 64.), 40920., 90612.), 0, FIST, gs, fistpal, 2); clamp(65536. - 65536. * BobVal(512 + fisti * 64.), 40920., 90612.), 0, DTILE_FIST, gs, fistpal, 2);
return true; return true;
} }
@ -110,7 +110,7 @@ static bool animateknee(int gs, player_struct* p, double xoffset, double yoffset
static const int8_t knee_y[] = { 0,-8,-16,-32,-64,-84,-108,-108,-108,-72,-32,-8 }; static const int8_t knee_y[] = { 0,-8,-16,-32,-64,-84,-108,-108,-108,-72,-32,-8 };
const double kneei = interpolatedvalue<double>(knee_y[p->oknee_incs], knee_y[p->knee_incs], interpfrac); const double kneei = interpolatedvalue<double>(knee_y[p->oknee_incs], knee_y[p->knee_incs], interpfrac);
hud_drawpal(105 + (kneei * 0.25) + xoffset, 280 + kneei + yoffset, KNEE, gs, 4, pal, angle); hud_drawpal(105 + (kneei * 0.25) + xoffset, 280 + kneei + yoffset, DTILE_KNEE, gs, 4, pal, angle);
return true; return true;
} }
@ -127,7 +127,7 @@ static bool animateknuckles(int gs, player_struct* p, double xoffset, double yof
static const uint8_t knuckle_frames[] = { 0,1,2,2,3,3,3,2,2,1,0 }; static const uint8_t knuckle_frames[] = { 0,1,2,2,3,3,3,2,2,1,0 };
hud_drawpal(160 + xoffset, 180 + yoffset, CRACKKNUCKLES + knuckle_frames[p->knuckle_incs >> 1], gs, 4, pal, angle); hud_drawpal(160 + xoffset, 180 + yoffset, DTILE_CRACKKNUCKLES + knuckle_frames[p->knuckle_incs >> 1], gs, 4, pal, angle);
return true; return true;
} }
@ -143,9 +143,9 @@ void displaymasks_d(int snum, int p, double interpfrac)
{ {
if (ps[snum].scuba_on) if (ps[snum].scuba_on)
{ {
int y = 200 - tileHeight(SCUBAMASK); int y = 200 - tileHeight(DTILE_SCUBAMASK);
hud_drawsprite(44, y, 65536, 0, SCUBAMASK, 0, p, 2 + 16); hud_drawsprite(44, y, 65536, 0, DTILE_SCUBAMASK, 0, p, 2 + 16);
hud_drawsprite((320 - 43), y, 65536, 0, SCUBAMASK, 0, p, 2 + 4 + 16); hud_drawsprite((320 - 43), y, 65536, 0, DTILE_SCUBAMASK, 0, p, 2 + 4 + 16);
} }
} }
@ -162,7 +162,7 @@ static bool animatetip(int gs, player_struct* p, double xoffset, double yoffset,
static const int8_t tip_y[] = { 0,-8,-16,-32,-64,-84,-108,-108,-108,-108,-108,-108,-108,-108,-108,-108,-96,-72,-64,-32,-16 }; static const int8_t tip_y[] = { 0,-8,-16,-32,-64,-84,-108,-108,-108,-108,-108,-108,-108,-108,-108,-108,-96,-72,-64,-32,-16 };
const double tipi = interpolatedvalue<double>(tip_y[p->otipincs], tip_y[p->tipincs], interpfrac) * 0.5; const double tipi = interpolatedvalue<double>(tip_y[p->otipincs], tip_y[p->tipincs], interpfrac) * 0.5;
hud_drawpal(170 + xoffset, 240 + tipi + yoffset, TIP + ((26 - p->tipincs) >> 4), gs, 0, pal, angle); hud_drawpal(170 + xoffset, 240 + tipi + yoffset, DTILE_TIP + ((26 - p->tipincs) >> 4), gs, 0, pal, angle);
return true; return true;
} }
@ -183,9 +183,9 @@ static bool animateaccess(int gs, player_struct* p, double xoffset, double yoffs
const int pal = p->access_spritenum != nullptr ? p->access_spritenum->spr.pal : 0; const int pal = p->access_spritenum != nullptr ? p->access_spritenum->spr.pal : 0;
if ((p->access_incs-3) > 0 && (p->access_incs-3)>>3) if ((p->access_incs-3) > 0 && (p->access_incs-3)>>3)
hud_drawpal(170 + (accessi * 0.25) + xoffset, 266 + accessi + yoffset, HANDHOLDINGLASER + (p->access_incs >> 3), gs, 0, pal, angle); hud_drawpal(170 + (accessi * 0.25) + xoffset, 266 + accessi + yoffset, DTILE_HANDHOLDINGLASER + (p->access_incs >> 3), gs, 0, pal, angle);
else else
hud_drawpal(170 + (accessi * 0.25) + xoffset, 266 + accessi + yoffset, HANDHOLDINGACCESS, gs, 4, pal, angle); hud_drawpal(170 + (accessi * 0.25) + xoffset, 266 + accessi + yoffset, DTILE_HANDHOLDINGACCESS, gs, 4, pal, angle);
return true; return true;
} }
@ -266,18 +266,18 @@ void displayweapon_d(int snum, double interpfrac)
{ {
if (quick_kick < 5 || quick_kick > 9) if (quick_kick < 5 || quick_kick > 9)
{ {
hud_drawpal(80 + offsets.X, 250 + offsets.Y, KNEE, shade, o | 4, pal2, angle); hud_drawpal(80 + offsets.X, 250 + offsets.Y, DTILE_KNEE, shade, o | 4, pal2, angle);
} }
else else
{ {
hud_drawpal(160 - 16 + offsets.X, 214 + offsets.Y, KNEE + 1, shade, o | 4, pal2, angle); hud_drawpal(160 - 16 + offsets.X, 214 + offsets.Y, DTILE_KNEE + 1, shade, o | 4, pal2, angle);
} }
} }
if (p->GetActor()->spr.scale.X < 0.625) if (p->GetActor()->spr.scale.X < 0.625)
{ {
//shrunken.. //shrunken..
animateshrunken(p, 0, offsets.Y + gun_pos, -offsets.X, FIST, shade, o, interpfrac); animateshrunken(p, 0, offsets.Y + gun_pos, -offsets.X, DTILE_FIST, shade, o, interpfrac);
} }
else else
{ {
@ -297,11 +297,11 @@ void displayweapon_d(int snum, double interpfrac)
{ {
if (*kb < 5 || *kb > 9) if (*kb < 5 || *kb > 9)
{ {
hud_drawpal(220 + offsets.X, 250 + offsets.Y, KNEE, shade, o, pal2, angle); hud_drawpal(220 + offsets.X, 250 + offsets.Y, DTILE_KNEE, shade, o, pal2, angle);
} }
else else
{ {
hud_drawpal(160 + offsets.X, 214 + offsets.Y, KNEE + 1, shade, o, pal2, angle); hud_drawpal(160 + offsets.X, 214 + offsets.Y, DTILE_KNEE + 1, shade, o, pal2, angle);
} }
} }
}; };
@ -320,10 +320,10 @@ void displayweapon_d(int snum, double interpfrac)
if (*kb > 6) if (*kb > 6)
offsets.Y += kickback_pic * 8.; offsets.Y += kickback_pic * 8.;
else if (*kb < 4) else if (*kb < 4)
hud_drawpal(142 + offsets.X, 234 + offsets.Y, HANDHOLDINGLASER + 3, shade, o, pal, angle); hud_drawpal(142 + offsets.X, 234 + offsets.Y, DTILE_HANDHOLDINGLASER + 3, shade, o, pal, angle);
hud_drawpal(130 + offsets.X, 249 + offsets.Y, HANDHOLDINGLASER + (*kb >> 2), shade, o, pal, angle); hud_drawpal(130 + offsets.X, 249 + offsets.Y, DTILE_HANDHOLDINGLASER + (*kb >> 2), shade, o, pal, angle);
hud_drawpal(152 + offsets.X, 249 + offsets.Y, HANDHOLDINGLASER + (*kb >> 2), shade, o | 4, pal, angle); hud_drawpal(152 + offsets.X, 249 + offsets.Y, DTILE_HANDHOLDINGLASER + (*kb >> 2), shade, o | 4, pal, angle);
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -342,7 +342,7 @@ void displayweapon_d(int snum, double interpfrac)
{ {
if (*kb < (isWW2GI() ? weapTotalTime : 8)) if (*kb < (isWW2GI() ? weapTotalTime : 8))
{ {
hud_drawpal(164 + offsets.X, 176 + offsets.Y, RPGGUN + (*kb >> 1), shade, o | pin, pal, angle); hud_drawpal(164 + offsets.X, 176 + offsets.Y, DTILE_RPGGUN + (*kb >> 1), shade, o | pin, pal, angle);
} }
else if (isWW2GI()) else if (isWW2GI())
{ {
@ -360,7 +360,7 @@ void displayweapon_d(int snum, double interpfrac)
} }
} }
hud_drawpal(164 + offsets.X, 176 + offsets.Y, RPGGUN, shade, o | pin, pal, angle); hud_drawpal(164 + offsets.X, 176 + offsets.Y, DTILE_RPGGUN, shade, o | pin, pal, angle);
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -379,7 +379,7 @@ void displayweapon_d(int snum, double interpfrac)
if (*kb > 0 && p->GetActor()->spr.pal != 1) if (*kb > 0 && p->GetActor()->spr.pal != 1)
offsets.X += 1 - (rand() & 3); offsets.X += 1 - (rand() & 3);
int pic = SHOTGUN; int pic = DTILE_SHOTGUN;
if (*kb == 0) if (*kb == 0)
{ {
@ -418,13 +418,13 @@ void displayweapon_d(int snum, double interpfrac)
{ {
case 1: case 1:
case 2: case 2:
hud_drawpal(168 + offsets.X, 201 + offsets.Y, SHOTGUN + 2, -128, o, pal, angle); hud_drawpal(168 + offsets.X, 201 + offsets.Y, DTILE_SHOTGUN + 2, -128, o, pal, angle);
[[fallthrough]]; [[fallthrough]];
case 0: case 0:
case 6: case 6:
case 7: case 7:
case 8: case 8:
hud_drawpal(146 + offsets.X, 202 + offsets.Y, SHOTGUN, shade, o, pal, angle); hud_drawpal(146 + offsets.X, 202 + offsets.Y, DTILE_SHOTGUN, shade, o, pal, angle);
break; break;
case 3: case 3:
case 4: case 4:
@ -438,37 +438,37 @@ void displayweapon_d(int snum, double interpfrac)
offsets.Y += 40; offsets.Y += 40;
offsets.X += 20; offsets.X += 20;
hud_drawpal(178 + offsets.X, 194 + offsets.Y, SHOTGUN + 1 + ((*(kb)-1) >> 1), -128, o, pal, angle); hud_drawpal(178 + offsets.X, 194 + offsets.Y, DTILE_SHOTGUN + 1 + ((*(kb)-1) >> 1), -128, o, pal, angle);
} }
hud_drawpal(158 + offsets.X, 220 + offsets.Y, SHOTGUN + 3, shade, o, pal, angle); hud_drawpal(158 + offsets.X, 220 + offsets.Y, DTILE_SHOTGUN + 3, shade, o, pal, angle);
break; break;
case 13: case 13:
case 14: case 14:
case 15: case 15:
hud_drawpal(198 + offsets.X, 210 + offsets.Y, SHOTGUN + 4, shade, o, pal, angle); hud_drawpal(198 + offsets.X, 210 + offsets.Y, DTILE_SHOTGUN + 4, shade, o, pal, angle);
break; break;
case 16: case 16:
case 17: case 17:
case 18: case 18:
case 19: case 19:
hud_drawpal(234 + offsets.X, 196 + offsets.Y, SHOTGUN + 5, shade, o, pal, angle); hud_drawpal(234 + offsets.X, 196 + offsets.Y, DTILE_SHOTGUN + 5, shade, o, pal, angle);
break; break;
case 20: case 20:
case 21: case 21:
case 22: case 22:
case 23: case 23:
hud_drawpal(240 + offsets.X, 196 + offsets.Y, SHOTGUN + 6, shade, o, pal, angle); hud_drawpal(240 + offsets.X, 196 + offsets.Y, DTILE_SHOTGUN + 6, shade, o, pal, angle);
break; break;
case 24: case 24:
case 25: case 25:
case 26: case 26:
case 27: case 27:
hud_drawpal(234 + offsets.X, 196 + offsets.Y, SHOTGUN + 5, shade, o, pal, angle); hud_drawpal(234 + offsets.X, 196 + offsets.Y, DTILE_SHOTGUN + 5, shade, o, pal, angle);
break; break;
case 28: case 28:
case 29: case 29:
case 30: case 30:
hud_drawpal(188 + offsets.X, 206 + offsets.Y, SHOTGUN + 4, shade, o, pal, angle); hud_drawpal(188 + offsets.X, 206 + offsets.Y, DTILE_SHOTGUN + 4, shade, o, pal, angle);
break; break;
} }
}; };
@ -489,11 +489,11 @@ void displayweapon_d(int snum, double interpfrac)
if (*kb == 0) if (*kb == 0)
{ {
hud_drawpal(178 + offsets.X, 233 + offsets.Y, CHAINGUN + 1, shade, o, pal, angle); hud_drawpal(178 + offsets.X, 233 + offsets.Y, DTILE_CHAINGUN + 1, shade, o, pal, angle);
} }
else if (*kb <= weapTotalTime) else if (*kb <= weapTotalTime)
{ {
hud_drawpal(188 + offsets.X, 243 + offsets.Y, CHAINGUN + 2, shade, o, pal, angle); hud_drawpal(188 + offsets.X, 243 + offsets.Y, DTILE_CHAINGUN + 2, shade, o, pal, angle);
} }
else else
{ {
@ -558,32 +558,32 @@ void displayweapon_d(int snum, double interpfrac)
if (*kb > 0 && p->GetActor()->spr.pal != 1) if (*kb > 0 && p->GetActor()->spr.pal != 1)
offsets.X += 1 - (rand() & 3); offsets.X += 1 - (rand() & 3);
hud_drawpal(168 + offsets.X, 260 + offsets.Y, CHAINGUN, shade, o, pal, angle); hud_drawpal(168 + offsets.X, 260 + offsets.Y, DTILE_CHAINGUN, shade, o, pal, angle);
switch(*kb) switch(*kb)
{ {
case 0: case 0:
hud_drawpal(178 + offsets.X, 233 + offsets.Y, CHAINGUN + 1, shade, o, pal, angle); hud_drawpal(178 + offsets.X, 233 + offsets.Y, DTILE_CHAINGUN + 1, shade, o, pal, angle);
break; break;
default: default:
if (*kb > 4 && *kb < 12) if (*kb > 4 && *kb < 12)
{ {
auto rnd = p->GetActor()->spr.pal != 1 ? rand() & 7 : 0; auto rnd = p->GetActor()->spr.pal != 1 ? rand() & 7 : 0;
hud_drawpal(136 + offsets.X + rnd, 208 + offsets.Y + rnd - (kickback_pic * 0.5), CHAINGUN + 5 + ((*kb - 4) / 5), shade, o, pal, angle); hud_drawpal(136 + offsets.X + rnd, 208 + offsets.Y + rnd - (kickback_pic * 0.5), DTILE_CHAINGUN + 5 + ((*kb - 4) / 5), shade, o, pal, angle);
if (p->GetActor()->spr.pal != 1) rnd = rand() & 7; if (p->GetActor()->spr.pal != 1) rnd = rand() & 7;
hud_drawpal(180 + offsets.X + rnd, 208 + offsets.Y + rnd - (kickback_pic * 0.5), CHAINGUN + 5 + ((*kb - 4) / 5), shade, o, pal, angle); hud_drawpal(180 + offsets.X + rnd, 208 + offsets.Y + rnd - (kickback_pic * 0.5), DTILE_CHAINGUN + 5 + ((*kb - 4) / 5), shade, o, pal, angle);
} }
if (*kb < 8) if (*kb < 8)
{ {
auto rnd = rand() & 7; auto rnd = rand() & 7;
hud_drawpal(158 + offsets.X + rnd, 208 + offsets.Y + rnd - (kickback_pic * 0.5), CHAINGUN + 5 + ((*kb - 2) / 5), shade, o, pal, angle); hud_drawpal(158 + offsets.X + rnd, 208 + offsets.Y + rnd - (kickback_pic * 0.5), DTILE_CHAINGUN + 5 + ((*kb - 2) / 5), shade, o, pal, angle);
hud_drawpal(178 + offsets.X, 233 + offsets.Y, CHAINGUN + 1 + (*kb >> 1), shade, o, pal, angle); hud_drawpal(178 + offsets.X, 233 + offsets.Y, DTILE_CHAINGUN + 1 + (*kb >> 1), shade, o, pal, angle);
} }
else else
{ {
hud_drawpal(178 + offsets.X, 233 + offsets.Y, CHAINGUN + 1, shade, o, pal, angle); hud_drawpal(178 + offsets.X, 233 + offsets.Y, DTILE_CHAINGUN + 1, shade, o, pal, angle);
} }
break; break;
} }
@ -600,12 +600,12 @@ void displayweapon_d(int snum, double interpfrac)
if (*kb < 5) if (*kb < 5)
{ {
static constexpr uint8_t kb_frames[] = { 0,1,2,0,0 }; static constexpr uint8_t kb_frames[] = { 0,1,2,0,0 };
hud_drawpal((195 - 12 - (*kb == 2) * 3) + offsets.X, 244 + offsets.Y, FIRSTGUN + kb_frames[*kb], shade, 2, pal, angle); hud_drawpal((195 - 12 - (*kb == 2) * 3) + offsets.X, 244 + offsets.Y, DTILE_FIRSTGUN + kb_frames[*kb], shade, 2, pal, angle);
} }
else else
{ {
const int pin = (isWW2GI() || (gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R; const int pin = (isWW2GI() || (gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) ? 0 : RS_ALIGN_R;
const int pic_5 = FIRSTGUN+5; const int pic_5 = DTILE_FIRSTGUN+5;
const int WEAPON2_RELOAD_TIME = 50; const int WEAPON2_RELOAD_TIME = 50;
const int reload_time = isWW2GI() ? weapReload : WEAPON2_RELOAD_TIME; const int reload_time = isWW2GI() ? weapReload : WEAPON2_RELOAD_TIME;
@ -613,26 +613,26 @@ void displayweapon_d(int snum, double interpfrac)
if (*kb < 10) if (*kb < 10)
{ {
hud_drawpal(194 + offsets.X, 230 + offsets.Y, FIRSTGUN + 4, shade, o | pin, pal, angle); hud_drawpal(194 + offsets.X, 230 + offsets.Y, DTILE_FIRSTGUN + 4, shade, o | pin, pal, angle);
} }
else if (*kb < 15) else if (*kb < 15)
{ {
hud_drawpal(244 + offsets.X - (kickback_pic * 8.), 130 + offsets.Y + (kickback_pic * 16.), FIRSTGUN + 6, shade, o | pin, pal, angle); hud_drawpal(244 + offsets.X - (kickback_pic * 8.), 130 + offsets.Y + (kickback_pic * 16.), DTILE_FIRSTGUN + 6, shade, o | pin, pal, angle);
hud_drawpal(224 + offsets.X, 220 + offsets.Y, pic_5, shade, o | pin, pal, angle); hud_drawpal(224 + offsets.X, 220 + offsets.Y, pic_5, shade, o | pin, pal, angle);
} }
else if (*kb < 20) else if (*kb < 20)
{ {
hud_drawpal(124 + offsets.X + (kickback_pic * 2.), 430 + offsets.Y - (kickback_pic * 8.), FIRSTGUN + 6, shade, o | pin, pal, angle); hud_drawpal(124 + offsets.X + (kickback_pic * 2.), 430 + offsets.Y - (kickback_pic * 8.), DTILE_FIRSTGUN + 6, shade, o | pin, pal, angle);
hud_drawpal(224 + offsets.X, 220 + offsets.Y, pic_5, shade, o | pin, pal, angle); hud_drawpal(224 + offsets.X, 220 + offsets.Y, pic_5, shade, o | pin, pal, angle);
} }
else if (*kb < (isNamWW2GI()? (reload_time - 12) : 23)) else if (*kb < (isNamWW2GI()? (reload_time - 12) : 23))
{ {
hud_drawpal(184 + offsets.X, 235 + offsets.Y, FIRSTGUN + 8, shade, o | pin, pal, angle); hud_drawpal(184 + offsets.X, 235 + offsets.Y, DTILE_FIRSTGUN + 8, shade, o | pin, pal, angle);
hud_drawpal(224 + offsets.X, 210 + offsets.Y, pic_5, shade, o | pin, pal, angle); hud_drawpal(224 + offsets.X, 210 + offsets.Y, pic_5, shade, o | pin, pal, angle);
} }
else if (*kb < (isNamWW2GI()? (reload_time - 6) : 25)) else if (*kb < (isNamWW2GI()? (reload_time - 6) : 25))
{ {
hud_drawpal(164 + offsets.X, 245 + offsets.Y, FIRSTGUN + 8, shade, o | pin, pal, angle); hud_drawpal(164 + offsets.X, 245 + offsets.Y, DTILE_FIRSTGUN + 8, shade, o | pin, pal, angle);
hud_drawpal(224 + offsets.X, 220 + offsets.Y, pic_5, shade, o | pin, pal, angle); hud_drawpal(224 + offsets.X, 220 + offsets.Y, pic_5, shade, o | pin, pal, angle);
} }
else if (*kb < (isNamWW2GI()? reload_time : 27)) else if (*kb < (isNamWW2GI()? reload_time : 27))
@ -650,7 +650,7 @@ void displayweapon_d(int snum, double interpfrac)
auto displayhandbomb = [&]() auto displayhandbomb = [&]()
{ {
int pic = HANDTHROW; int pic = DTILE_HANDTHROW;
if (*kb) if (*kb)
{ {
@ -703,7 +703,7 @@ void displayweapon_d(int snum, double interpfrac)
auto displayhandremote = [&]() auto displayhandremote = [&]()
{ {
static constexpr uint8_t remote_frames[] = { 0,1,1,2,1,1,0,0,0,0,0 }; static constexpr uint8_t remote_frames[] = { 0,1,1,2,1,1,0,0,0,0,0 };
hud_drawpal(102 + offsets.X, 258 + offsets.Y, HANDREMOTE + (*kb ? remote_frames[*kb] : 0), shade, o, pal, angle); hud_drawpal(102 + offsets.X, 258 + offsets.Y, DTILE_HANDREMOTE + (*kb ? remote_frames[*kb] : 0), shade, o, pal, angle);
}; };
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -722,13 +722,13 @@ void displayweapon_d(int snum, double interpfrac)
if (p->ammo_amount[p->curr_weapon] & 1) if (p->ammo_amount[p->curr_weapon] & 1)
{ {
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR, shade, o | 4, pal, angle); hud_drawpal(30 + offsets.X, 240 + offsets.Y, DTILE_DEVISTATOR, shade, o | 4, pal, angle);
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR + i, -32, o, pal, angle); hud_drawpal(268 + offsets.X, 238 + offsets.Y, DTILE_DEVISTATOR + i, -32, o, pal, angle);
} }
else else
{ {
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR + i, -32, o | 4, pal, angle); hud_drawpal(30 + offsets.X, 240 + offsets.Y, DTILE_DEVISTATOR + i, -32, o | 4, pal, angle);
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR, shade, o, pal, angle); hud_drawpal(268 + offsets.X, 238 + offsets.Y, DTILE_DEVISTATOR, shade, o, pal, angle);
} }
} }
// else we are in 'reload time' // else we are in 'reload time'
@ -737,22 +737,22 @@ void displayweapon_d(int snum, double interpfrac)
// down // down
offsets.Y += 10 * (kickback_pic - weapTotalTime); //D offsets.Y += 10 * (kickback_pic - weapTotalTime); //D
// offsets.X += 80 * (*kb - aplWeaponTotalTime[cw][snum]); // offsets.X += 80 * (*kb - aplWeaponTotalTime[cw][snum]);
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR, shade, o, pal, angle); hud_drawpal(268 + offsets.X, 238 + offsets.Y, DTILE_DEVISTATOR, shade, o, pal, angle);
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR, shade, o | 4, pal, angle); hud_drawpal(30 + offsets.X, 240 + offsets.Y, DTILE_DEVISTATOR, shade, o | 4, pal, angle);
} }
else else
{ {
// up and left // up and left
offsets.Y += 10 * (weapReload - kickback_pic); //U offsets.Y += 10 * (weapReload - kickback_pic); //U
// offsets.X += 80 * (*kb - aplWeaponTotalTime[cw][snum]); // offsets.X += 80 * (*kb - aplWeaponTotalTime[cw][snum]);
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR, shade, o, pal, angle); hud_drawpal(268 + offsets.X, 238 + offsets.Y, DTILE_DEVISTATOR, shade, o, pal, angle);
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR, shade, o | 4, pal, angle); hud_drawpal(30 + offsets.X, 240 + offsets.Y, DTILE_DEVISTATOR, shade, o | 4, pal, angle);
} }
} }
else else
{ {
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR, shade, o, pal, angle); hud_drawpal(268 + offsets.X, 238 + offsets.Y, DTILE_DEVISTATOR, shade, o, pal, angle);
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR, shade, o | 4, pal, angle); hud_drawpal(30 + offsets.X, 240 + offsets.Y, DTILE_DEVISTATOR, shade, o | 4, pal, angle);
} }
}; };
@ -771,19 +771,19 @@ void displayweapon_d(int snum, double interpfrac)
if (p->hbomb_hold_delay) if (p->hbomb_hold_delay)
{ {
hud_drawpal(268 + offsets.X + (cycloidy[*kb] >> 1), 238 + offsets.Y + cycloidy[*kb], DEVISTATOR + i, -32, o, pal, angle); hud_drawpal(268 + offsets.X + (cycloidy[*kb] >> 1), 238 + offsets.Y + cycloidy[*kb], DTILE_DEVISTATOR + i, -32, o, pal, angle);
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR, shade, o | 4, pal, angle); hud_drawpal(30 + offsets.X, 240 + offsets.Y, DTILE_DEVISTATOR, shade, o | 4, pal, angle);
} }
else else
{ {
hud_drawpal(30 + offsets.X - (cycloidy[*kb] >> 1), 240 + offsets.Y + cycloidy[*kb], DEVISTATOR + i, -32, o | 4, pal, angle); hud_drawpal(30 + offsets.X - (cycloidy[*kb] >> 1), 240 + offsets.Y + cycloidy[*kb], DTILE_DEVISTATOR + i, -32, o | 4, pal, angle);
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR, shade, o, pal, angle); hud_drawpal(268 + offsets.X, 238 + offsets.Y, DTILE_DEVISTATOR, shade, o, pal, angle);
} }
} }
else else
{ {
hud_drawpal(268 + offsets.X, 238 + offsets.Y, DEVISTATOR, shade, o, pal, angle); hud_drawpal(268 + offsets.X, 238 + offsets.Y, DTILE_DEVISTATOR, shade, o, pal, angle);
hud_drawpal(30 + offsets.X, 240 + offsets.Y, DEVISTATOR, shade, o | 4, pal, angle); hud_drawpal(30 + offsets.X, 240 + offsets.Y, DTILE_DEVISTATOR, shade, o | 4, pal, angle);
} }
}; };
@ -809,12 +809,12 @@ void displayweapon_d(int snum, double interpfrac)
offsets.Y += 16; offsets.Y += 16;
hud_drawpal(210 + offsets.X, 261 + offsets.Y, FREEZE + 2, -32, o | pin, pal, angle); hud_drawpal(210 + offsets.X, 261 + offsets.Y, DTILE_FREEZE + 2, -32, o | pin, pal, angle);
hud_drawpal(210 + offsets.X, 235 + offsets.Y, FREEZE + 3 + cat_frames[*kb % 6], -32, o | pin, pal, angle); hud_drawpal(210 + offsets.X, 235 + offsets.Y, DTILE_FREEZE + 3 + cat_frames[*kb % 6], -32, o | pin, pal, angle);
} }
else else
{ {
hud_drawpal(210 + offsets.X, 261 + offsets.Y, FREEZE, shade, o | pin, pal, angle); hud_drawpal(210 + offsets.X, 261 + offsets.Y, DTILE_FREEZE, shade, o | pin, pal, angle);
} }
}; };
@ -834,13 +834,13 @@ void displayweapon_d(int snum, double interpfrac)
// the 'at rest' display // the 'at rest' display
if (p->ammo_amount[cw] <= 0) //p->last_weapon >= 0) if (p->ammo_amount[cw] <= 0) //p->last_weapon >= 0)
{ {
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 3 + (*kb & 3), -32, o, 0, angle); hud_drawpal(184 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER + 3 + (*kb & 3), -32, o, 0, angle);
hud_drawpal(188 + offsets.X, 240 + offsets.Y, SHRINKER + 1, shade, o, pal, angle); hud_drawpal(188 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER + 1, shade, o, pal, angle);
} }
else else
{ {
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 2, 16 - int(BobVal(random_club_frame) * 16), o, 0, angle); hud_drawpal(184 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER + 2, 16 - int(BobVal(random_club_frame) * 16), o, 0, angle);
hud_drawpal(188 + offsets.X, 240 + offsets.Y, SHRINKER, shade, o, pal, angle); hud_drawpal(188 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER, shade, o, pal, angle);
} }
} }
else else
@ -874,8 +874,8 @@ void displayweapon_d(int snum, double interpfrac)
} }
// draw weapon // draw weapon
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 3 + (*kb & 3), -32, o, 0, angle); hud_drawpal(184 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER + 3 + (*kb & 3), -32, o, 0, angle);
hud_drawpal(188 + offsets.X, 240 + offsets.Y, SHRINKER + 1, shade, o, pal, angle); hud_drawpal(188 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER + 1, shade, o, pal, angle);
} }
}; };
@ -892,7 +892,7 @@ void displayweapon_d(int snum, double interpfrac)
if (*kb == 0) if (*kb == 0)
{ {
hud_drawpal(188 + offsets.X, 240 + offsets.Y, SHRINKER - 2, shade, o, pal, angle); hud_drawpal(188 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER - 2, shade, o, pal, angle);
} }
else else
{ {
@ -923,8 +923,8 @@ void displayweapon_d(int snum, double interpfrac)
} }
// display weapon // display weapon
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 3 + (*kb & 3), -32, o, 2, angle); hud_drawpal(184 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER + 3 + (*kb & 3), -32, o, 2, angle);
hud_drawpal(188 + offsets.X, 240 + offsets.Y, SHRINKER - 1, shade, o, pal, angle); hud_drawpal(188 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER - 1, shade, o, pal, angle);
} }
}; };
@ -936,7 +936,7 @@ void displayweapon_d(int snum, double interpfrac)
auto displayshrinker = [&] auto displayshrinker = [&]
{ {
auto shrinker = /*isWorldTour() ? SHRINKERWIDE :*/ SHRINKER; auto shrinker = /*isWorldTour() ? DTILE_SHRINKERWIDE :*/ DTILE_SHRINKER;
offsets.X += 28; offsets.X += 28;
offsets.Y += 18; offsets.Y += 18;
@ -944,12 +944,12 @@ void displayweapon_d(int snum, double interpfrac)
{ {
if (cw == GROW_WEAPON) if (cw == GROW_WEAPON)
{ {
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 2, 16 - int(BobVal(random_club_frame) * 16), o, 2, angle); hud_drawpal(184 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER + 2, 16 - int(BobVal(random_club_frame) * 16), o, 2, angle);
hud_drawpal(188 + offsets.X, 240 + offsets.Y, shrinker - 2, shade, o, pal, angle); hud_drawpal(188 + offsets.X, 240 + offsets.Y, shrinker - 2, shade, o, pal, angle);
} }
else else
{ {
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 2, 16 - int(BobVal(random_club_frame) * 16), o, 0, angle); hud_drawpal(184 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER + 2, 16 - int(BobVal(random_club_frame) * 16), o, 0, angle);
hud_drawpal(188 + offsets.X, 240 + offsets.Y, shrinker, shade, o, pal, angle); hud_drawpal(188 + offsets.X, 240 + offsets.Y, shrinker, shade, o, pal, angle);
} }
} }
@ -963,12 +963,12 @@ void displayweapon_d(int snum, double interpfrac)
if (cw == GROW_WEAPON) if (cw == GROW_WEAPON)
{ {
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 3 + (*kb & 3), -32, o, 2, angle); hud_drawpal(184 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER + 3 + (*kb & 3), -32, o, 2, angle);
hud_drawpal(188 + offsets.X, 240 + offsets.Y, shrinker - 1, shade, o, pal, angle); hud_drawpal(188 + offsets.X, 240 + offsets.Y, shrinker - 1, shade, o, pal, angle);
} }
else else
{ {
hud_drawpal(184 + offsets.X, 240 + offsets.Y, SHRINKER + 3 + (*kb & 3), -32, o, 0, angle); hud_drawpal(184 + offsets.X, 240 + offsets.Y, DTILE_SHRINKER + 3 + (*kb & 3), -32, o, 0, angle);
hud_drawpal(188 + offsets.X, 240 + offsets.Y, shrinker + 1, shade, o, pal, angle); hud_drawpal(188 + offsets.X, 240 + offsets.Y, shrinker + 1, shade, o, pal, angle);
} }
} }
@ -984,8 +984,8 @@ void displayweapon_d(int snum, double interpfrac)
{ {
if (*kb < 1 || p->cursector->lotag == 2) if (*kb < 1 || p->cursector->lotag == 2)
{ {
hud_drawpal(210 + offsets.X, 261 + offsets.Y, FLAMETHROWER, shade, o, pal, angle); hud_drawpal(210 + offsets.X, 261 + offsets.Y, DTILE_FLAMETHROWER, shade, o, pal, angle);
hud_drawpal(210 + offsets.X, 261 + offsets.Y, FLAMETHROWERPILOT, shade, o, pal, angle); hud_drawpal(210 + offsets.X, 261 + offsets.Y, DTILE_FLAMETHROWERPILOT, shade, o, pal, angle);
} }
else else
{ {
@ -999,8 +999,8 @@ void displayweapon_d(int snum, double interpfrac)
offsets.Y += 16; offsets.Y += 16;
hud_drawpal(210 + offsets.X, 261 + offsets.Y, FLAMETHROWER + 1, -32, o, pal, angle); hud_drawpal(210 + offsets.X, 261 + offsets.Y, DTILE_FLAMETHROWER + 1, -32, o, pal, angle);
hud_drawpal(210 + offsets.X, 235 + offsets.Y, FLAMETHROWER + 2 + cat_frames[*kb % 6], -32, o, pal, angle); hud_drawpal(210 + offsets.X, 235 + offsets.Y, DTILE_FLAMETHROWER + 2 + cat_frames[*kb % 6], -32, o, pal, angle);
} }
}; };

View file

@ -27,7 +27,8 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
BEGIN_DUKE_NS BEGIN_DUKE_NS
#define x(a, b) a = b, #define x(a, b) DTILE_##a = b,
#define y(a, b) DTILE_##a = b,
enum enum
{ {
#include "namelist_d.h" #include "namelist_d.h"

View file

@ -96,7 +96,7 @@ static void shootfireball(DDukeActor *actor, int p, DVector3 pos, DAngle ang)
actor->spr.shade = -96; actor->spr.shade = -96;
pos.Z -= 2; pos.Z -= 2;
if (actor->spr.picnum != BOSS5) if (actor->spr.picnum != DTILE_BOSS5)
vel = 840/16.; vel = 840/16.;
else { else {
vel = 968/16.; vel = 968/16.;
@ -120,11 +120,11 @@ static void shootfireball(DDukeActor *actor, int p, DVector3 pos, DAngle ang)
double scale = p >= 0? 0.109375 : 0.28125; double scale = p >= 0? 0.109375 : 0.28125;
auto spawned = CreateActor(actor->sector(), pos, FIREBALL, -127, DVector2(scale, scale), ang, vel, zvel, actor, (short)4); auto spawned = CreateActor(actor->sector(), pos, DTILE_FIREBALL, -127, DVector2(scale, scale), ang, vel, zvel, actor, (short)4);
if (spawned) if (spawned)
{ {
spawned->spr.extra += (krand() & 7); spawned->spr.extra += (krand() & 7);
if (actor->spr.picnum == BOSS5 || p >= 0) if (actor->spr.picnum == DTILE_BOSS5 || p >= 0)
{ {
spawned->spr.scale = DVector2(0.625, 0.625); spawned->spr.scale = DVector2(0.625, 0.625);
} }
@ -155,12 +155,12 @@ static void shootflamethrowerflame(DDukeActor* actor, int p, DVector3 spos, DAng
int j = findplayer(actor, &x); int j = findplayer(actor, &x);
sang = (ps[j].GetActor()->opos.XY() - spos.XY()).Angle(); sang = (ps[j].GetActor()->opos.XY() - spos.XY()).Angle();
if (actor->spr.picnum == BOSS5) if (actor->spr.picnum == DTILE_BOSS5)
{ {
vel = 33; vel = 33;
spos.Z += 24; spos.Z += 24;
} }
else if (actor->spr.picnum == BOSS3) else if (actor->spr.picnum == DTILE_BOSS3)
spos.Z -= 32; spos.Z -= 32;
double dist = (ps[j].GetActor()->spr.pos.XY() - actor->spr.pos.XY()).Length(); double dist = (ps[j].GetActor()->spr.pos.XY() - actor->spr.pos.XY()).Length();
@ -171,7 +171,7 @@ static void shootflamethrowerflame(DDukeActor* actor, int p, DVector3 spos, DAng
sang = actor->spr.Angles.Yaw + mapangle((krand() & 31) - 16); sang = actor->spr.Angles.Yaw + mapangle((krand() & 31) - 16);
if (actor->sector()->lotag == 2 && (krand() % 5) == 0) if (actor->sector()->lotag == 2 && (krand() % 5) == 0)
spawned = spawn(actor, WATERBUBBLE); spawned = spawn(actor, DTILE_WATERBUBBLE);
} }
else else
{ {
@ -182,12 +182,12 @@ static void shootflamethrowerflame(DDukeActor* actor, int p, DVector3 spos, DAng
if (ps[p].GetActor()->vel.X != 0) if (ps[p].GetActor()->vel.X != 0)
vel = ((myang / DAngle90) * ps[p].GetActor()->vel.X) + 25; vel = ((myang / DAngle90) * ps[p].GetActor()->vel.X) + 25;
if (actor->sector()->lotag == 2 && (krand() % 5) == 0) if (actor->sector()->lotag == 2 && (krand() % 5) == 0)
spawned = spawn(actor, WATERBUBBLE); spawned = spawn(actor, DTILE_WATERBUBBLE);
} }
if (spawned == nullptr) if (spawned == nullptr)
{ {
spawned = spawn(actor, FLAMETHROWERFLAME); spawned = spawn(actor, DTILE_FLAMETHROWERFLAME);
if (!spawned) return; if (!spawned) return;
spawned->vel.X = vel; spawned->vel.X = vel;
spawned->vel.Z = zvel; spawned->vel.Z = zvel;
@ -211,7 +211,7 @@ static void shootflamethrowerflame(DDukeActor* actor, int p, DVector3 spos, DAng
if (p == -1) if (p == -1)
{ {
if (actor->spr.picnum == BOSS5) if (actor->spr.picnum == DTILE_BOSS5)
{ {
spawned->spr.pos += sang.ToVector() * (128. / 7); spawned->spr.pos += sang.ToVector() * (128. / 7);
spawned->spr.scale = DVector2(0.15625, 0.15625); spawned->spr.scale = DVector2(0.15625, 0.15625);
@ -254,13 +254,13 @@ static void shootknee(DDukeActor* actor, int p, DVector3 pos, DAngle ang)
{ {
if (hit.hitWall || hit.actor()) if (hit.hitWall || hit.actor())
{ {
auto knee = CreateActor(hit.hitSector, hit.hitpos, KNEE, -15, DVector2(0, 0), ang, 2., 0., actor, 4); auto knee = CreateActor(hit.hitSector, hit.hitpos, DTILE_KNEE, -15, DVector2(0, 0), ang, 2., 0., actor, 4);
if (knee) if (knee)
{ {
knee->spr.extra += (krand() & 7); knee->spr.extra += (krand() & 7);
if (p >= 0) if (p >= 0)
{ {
auto k = spawn(knee, SMALLSMOKE); auto k = spawn(knee, DTILE_SMALLSMOKE);
if (k) k->spr.pos.Z -= 8; if (k) k->spr.pos.Z -= 8;
S_PlayActorSound(KICK_HIT, knee); S_PlayActorSound(KICK_HIT, knee);
} }
@ -268,7 +268,7 @@ static void shootknee(DDukeActor* actor, int p, DVector3 pos, DAngle ang)
if (p >= 0 && ps[p].steroids_amount > 0 && ps[p].steroids_amount < 400) if (p >= 0 && ps[p].steroids_amount > 0 && ps[p].steroids_amount < 400)
knee->spr.extra += (gs.max_player_health >> 2); knee->spr.extra += (gs.max_player_health >> 2);
} }
if (hit.actor() && hit.actor()->spr.picnum != ACCESSSWITCH && hit.actor()->spr.picnum != ACCESSSWITCH2) if (hit.actor() && hit.actor()->spr.picnum != DTILE_ACCESSSWITCH && hit.actor()->spr.picnum != DTILE_ACCESSSWITCH2)
{ {
fi.checkhitsprite(hit.actor(), knee); fi.checkhitsprite(hit.actor(), knee);
if (p >= 0) fi.checkhitswitch(p, nullptr, hit.actor()); if (p >= 0) fi.checkhitswitch(p, nullptr, hit.actor());
@ -281,16 +281,16 @@ static void shootknee(DDukeActor* actor, int p, DVector3 pos, DAngle ang)
if (hit.hitpos.Z >= hit.hitWall->nextSector()->floorz) if (hit.hitpos.Z >= hit.hitWall->nextSector()->floorz)
hit.hitWall =hit.hitWall->nextWall(); hit.hitWall =hit.hitWall->nextWall();
if (hit.hitWall->picnum != ACCESSSWITCH && hit.hitWall->picnum != ACCESSSWITCH2) if (hit.hitWall->picnum != DTILE_ACCESSSWITCH && hit.hitWall->picnum != DTILE_ACCESSSWITCH2)
{ {
fi.checkhitwall(knee, hit.hitWall, hit.hitpos, KNEE); fi.checkhitwall(knee, hit.hitWall, hit.hitpos, DTILE_KNEE);
if (p >= 0) fi.checkhitswitch(p, hit.hitWall, nullptr); if (p >= 0) fi.checkhitswitch(p, hit.hitWall, nullptr);
} }
} }
} }
else if (p >= 0 && zvel > 0 && hit.hitSector->lotag == 1) else if (p >= 0 && zvel > 0 && hit.hitSector->lotag == 1)
{ {
auto splash = spawn(ps[p].GetActor(), WATERSPLASH2); auto splash = spawn(ps[p].GetActor(), DTILE_WATERSPLASH2);
if (splash) if (splash)
{ {
splash->spr.pos.XY() = hit.hitpos.XY(); splash->spr.pos.XY() = hit.hitpos.XY();
@ -334,8 +334,8 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) + 5; double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) + 5;
switch (aimed->spr.picnum) switch (aimed->spr.picnum)
{ {
case GREENSLIME: case DTILE_GREENSLIME:
case ROTATEGUN: case DTILE_ROTATEGUN:
dal -= 8; dal -= 8;
break; break;
} }
@ -379,7 +379,7 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
double dist = (ps[j].GetActor()->spr.pos.XY() - actor->spr.pos.XY()).Length(); double dist = (ps[j].GetActor()->spr.pos.XY() - actor->spr.pos.XY()).Length();
zvel = ((ps[j].GetActor()->getOffsetZ() - pos.Z) * 16) / dist; zvel = ((ps[j].GetActor()->getOffsetZ() - pos.Z) * 16) / dist;
zvel += 0.5 - krandf(1); zvel += 0.5 - krandf(1);
if (actor->spr.picnum != BOSS1) if (actor->spr.picnum != DTILE_BOSS1)
{ {
ang += DAngle22_5 / 8 - randomAngle(22.5 / 4); ang += DAngle22_5 / 8 - randomAngle(22.5 / 4);
} }
@ -402,7 +402,7 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
DDukeActor* spark; DDukeActor* spark;
if (p >= 0) if (p >= 0)
{ {
spark = CreateActor(hit.hitSector, hit.hitpos, SHOTSPARK1, -15, DVector2(0.15625, 0.15625), ang, 0., 0., actor, 4); spark = CreateActor(hit.hitSector, hit.hitpos, DTILE_SHOTSPARK1, -15, DVector2(0.15625, 0.15625), ang, 0., 0., actor, 4);
if (!spark) return; if (!spark) return;
spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress]; spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress];
@ -420,7 +420,7 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
else else
fi.checkhitceiling(hit.hitSector); fi.checkhitceiling(hit.hitSector);
} }
spawn(spark, SMALLSMOKE); spawn(spark, DTILE_SMALLSMOKE);
} }
if (hit.actor()) if (hit.actor())
@ -429,7 +429,7 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
if (hit.actor()->isPlayer() && (ud.coop != 1 || ud.ffire == 1)) if (hit.actor()->isPlayer() && (ud.coop != 1 || ud.ffire == 1))
{ {
spark->spr.scale = DVector2(0, 0); spark->spr.scale = DVector2(0, 0);
auto jib = spawn(spark, JIBS6); auto jib = spawn(spark, DTILE_JIBS6);
if (jib) if (jib)
{ {
jib->spr.pos.Z += 4; jib->spr.pos.Z += 4;
@ -438,17 +438,17 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
jib->spr.Angles.Yaw += DAngle22_5 / 2 - randomAngle(22.5); jib->spr.Angles.Yaw += DAngle22_5 / 2 - randomAngle(22.5);
} }
} }
else spawn(spark, SMALLSMOKE); else spawn(spark, DTILE_SMALLSMOKE);
if (p >= 0 && ( if (p >= 0 && (
hit.actor()->spr.picnum == DIPSWITCH || hit.actor()->spr.picnum == DTILE_DIPSWITCH ||
hit.actor()->spr.picnum == DIPSWITCHON || hit.actor()->spr.picnum == DTILE_DIPSWITCHON ||
hit.actor()->spr.picnum == DIPSWITCH2 || hit.actor()->spr.picnum == DTILE_DIPSWITCH2 ||
hit.actor()->spr.picnum == DIPSWITCH2ON || hit.actor()->spr.picnum == DTILE_DIPSWITCH2ON ||
hit.actor()->spr.picnum == DIPSWITCH3 || hit.actor()->spr.picnum == DTILE_DIPSWITCH3 ||
hit.actor()->spr.picnum == DIPSWITCH3ON || hit.actor()->spr.picnum == DTILE_DIPSWITCH3ON ||
hit.actor()->spr.picnum == HANDSWITCH || hit.actor()->spr.picnum == DTILE_HANDSWITCH ||
hit.actor()->spr.picnum == HANDSWITCHON)) hit.actor()->spr.picnum == DTILE_HANDSWITCHON))
{ {
fi.checkhitswitch(p, nullptr, hit.actor()); fi.checkhitswitch(p, nullptr, hit.actor());
return; return;
@ -456,21 +456,21 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
} }
else if (hit.hitWall) else if (hit.hitWall)
{ {
spawn(spark, SMALLSMOKE); spawn(spark, DTILE_SMALLSMOKE);
if (isadoorwall(hit.hitWall->picnum) == 1) if (isadoorwall(hit.hitWall->picnum) == 1)
goto SKIPBULLETHOLE; goto SKIPBULLETHOLE;
if (isablockdoor(hit.hitWall->picnum) == 1) if (isablockdoor(hit.hitWall->picnum) == 1)
goto SKIPBULLETHOLE; goto SKIPBULLETHOLE;
if (p >= 0 && ( if (p >= 0 && (
hit.hitWall->picnum == DIPSWITCH || hit.hitWall->picnum == DTILE_DIPSWITCH ||
hit.hitWall->picnum == DIPSWITCHON || hit.hitWall->picnum == DTILE_DIPSWITCHON ||
hit.hitWall->picnum == DIPSWITCH2 || hit.hitWall->picnum == DTILE_DIPSWITCH2 ||
hit.hitWall->picnum == DIPSWITCH2ON || hit.hitWall->picnum == DTILE_DIPSWITCH2ON ||
hit.hitWall->picnum == DIPSWITCH3 || hit.hitWall->picnum == DTILE_DIPSWITCH3 ||
hit.hitWall->picnum == DIPSWITCH3ON || hit.hitWall->picnum == DTILE_DIPSWITCH3ON ||
hit.hitWall->picnum == HANDSWITCH || hit.hitWall->picnum == DTILE_HANDSWITCH ||
hit.hitWall->picnum == HANDSWITCHON)) hit.hitWall->picnum == DTILE_HANDSWITCHON))
{ {
fi.checkhitswitch(p, hit.hitWall, nullptr); fi.checkhitswitch(p, hit.hitWall, nullptr);
return; return;
@ -480,7 +480,7 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
goto SKIPBULLETHOLE; goto SKIPBULLETHOLE;
if (hit.hitSector && hit.hitSector->lotag == 0) if (hit.hitSector && hit.hitSector->lotag == 0)
if (hit.hitWall->overpicnum != BIGFORCE) if (hit.hitWall->overpicnum != DTILE_BIGFORCE)
if ((hit.hitWall->twoSided() && hit.hitWall->nextSector()->lotag == 0) || if ((hit.hitWall->twoSided() && hit.hitWall->nextSector()->lotag == 0) ||
(!hit.hitWall->twoSided() && hit.hitSector->lotag == 0)) (!hit.hitWall->twoSided() && hit.hitSector->lotag == 0))
if ((hit.hitWall->cstat & CSTAT_WALL_MASKED) == 0) if ((hit.hitWall->cstat & CSTAT_WALL_MASKED) == 0)
@ -498,11 +498,11 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
DukeStatIterator it(STAT_MISC); DukeStatIterator it(STAT_MISC);
while (auto l = it.Next()) while (auto l = it.Next())
{ {
if (l->spr.picnum == BULLETHOLE) if (l->spr.picnum == DTILE_BULLETHOLE)
if ((l->spr.pos - spark->spr.pos).Length() < 0.75 + krandf(0.5)) if ((l->spr.pos - spark->spr.pos).Length() < 0.75 + krandf(0.5))
goto SKIPBULLETHOLE; goto SKIPBULLETHOLE;
} }
auto hole = spawn(spark, BULLETHOLE); auto hole = spawn(spark, DTILE_BULLETHOLE);
if (hole) if (hole)
{ {
hole->vel.X = -1 / 16.; hole->vel.X = -1 / 16.;
@ -519,12 +519,12 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
if (hit.hitpos.Z >= hit.hitWall->nextSector()->floorz) if (hit.hitpos.Z >= hit.hitWall->nextSector()->floorz)
hit.hitWall = hit.hitWall->nextWall(); hit.hitWall = hit.hitWall->nextWall();
fi.checkhitwall(spark, hit.hitWall, hit.hitpos, SHOTSPARK1); fi.checkhitwall(spark, hit.hitWall, hit.hitpos, DTILE_SHOTSPARK1);
} }
} }
else else
{ {
spark = CreateActor(hit.hitSector, hit.hitpos, SHOTSPARK1, -15, DVector2(0.375, 0.375), ang, 0., 0., actor, 4); spark = CreateActor(hit.hitSector, hit.hitpos, DTILE_SHOTSPARK1, -15, DVector2(0.375, 0.375), ang, 0., 0., actor, 4);
if (spark) if (spark)
{ {
spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress]; spark->spr.extra = ScriptCode[gs.actorinfo[atwith].scriptaddress];
@ -533,11 +533,11 @@ static void shootweapon(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int
{ {
fi.checkhitsprite(hit.actor(), spark); fi.checkhitsprite(hit.actor(), spark);
if (!hit.actor()->isPlayer()) if (!hit.actor()->isPlayer())
spawn(spark, SMALLSMOKE); spawn(spark, DTILE_SMALLSMOKE);
else spark->spr.scale = DVector2(0, 0); else spark->spr.scale = DVector2(0, 0);
} }
else if (hit.hitWall) else if (hit.hitWall)
fi.checkhitwall(spark, hit.hitWall, hit.hitpos, SHOTSPARK1); fi.checkhitwall(spark, hit.hitWall, hit.hitpos, DTILE_SHOTSPARK1);
} }
} }
@ -562,12 +562,12 @@ static void shootstuff(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int a
if (actor->spr.extra >= 0) actor->spr.shade = -96; if (actor->spr.extra >= 0) actor->spr.shade = -96;
scount = 1; scount = 1;
if (atwith == SPIT) vel = 292 / 16.; if (atwith == DTILE_SPIT) vel = 292 / 16.;
else else
{ {
if (atwith == COOLEXPLOSION1) if (atwith == DTILE_COOLEXPLOSION1)
{ {
if (actor->spr.picnum == BOSS2) vel = 644 / 16.; if (actor->spr.picnum == DTILE_BOSS2) vel = 644 / 16.;
else vel = 348 / 16.; else vel = 348 / 16.;
pos.Z -= 2; pos.Z -= 2;
} }
@ -611,7 +611,7 @@ static void shootstuff(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int a
double oldzvel = zvel; double oldzvel = zvel;
double scale = p >= 0? 0.109375 : 0.28125; double scale = p >= 0? 0.109375 : 0.28125;
if (atwith == SPIT) if (atwith == DTILE_SPIT)
{ {
pos.Z -= 10; pos.Z -= 10;
} }
@ -624,10 +624,10 @@ static void shootstuff(DDukeActor* actor, int p, DVector3 pos, DAngle ang, int a
if (!spawned) return; if (!spawned) return;
spawned->spr.extra += (krand() & 7); spawned->spr.extra += (krand() & 7);
if (atwith == COOLEXPLOSION1) if (atwith == DTILE_COOLEXPLOSION1)
{ {
spawned->spr.shade = 0; spawned->spr.shade = 0;
if (actor->spr.picnum == BOSS2) if (actor->spr.picnum == DTILE_BOSS2)
{ {
auto ovel = spawned->vel.X; auto ovel = spawned->vel.X;
spawned->vel.X = 64; spawned->vel.X = 64;
@ -685,14 +685,14 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw
double x; double x;
int j = findplayer(actor, &x); int j = findplayer(actor, &x);
ang = (ps[j].GetActor()->opos.XY() - pos.XY()).Angle(); ang = (ps[j].GetActor()->opos.XY() - pos.XY()).Angle();
if (actor->spr.picnum == BOSS3) if (actor->spr.picnum == DTILE_BOSS3)
{ {
double zoffs = 32; double zoffs = 32;
if (isWorldTour()) // Twentieth Anniversary World Tour if (isWorldTour()) // Twentieth Anniversary World Tour
zoffs *= (actor->spr.scale.Y * 0.8); zoffs *= (actor->spr.scale.Y * 0.8);
pos.Z += zoffs; pos.Z += zoffs;
} }
else if (actor->spr.picnum == BOSS2) else if (actor->spr.picnum == DTILE_BOSS2)
{ {
vel += 8; vel += 8;
double zoffs = 24; double zoffs = 24;
@ -733,7 +733,7 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw
if (p == -1) if (p == -1)
{ {
if (actor->spr.picnum == BOSS3) if (actor->spr.picnum == DTILE_BOSS3)
{ {
DVector2 spawnofs(ang.Sin() * 4, ang.Cos() * -4); DVector2 spawnofs(ang.Sin() * 4, ang.Cos() * -4);
DAngle aoffs = DAngle22_5 / 32.; DAngle aoffs = DAngle22_5 / 32.;
@ -756,7 +756,7 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw
spawned->spr.scale = DVector2(0.65625, 0.65625); spawned->spr.scale = DVector2(0.65625, 0.65625);
} }
else if (actor->spr.picnum == BOSS2) else if (actor->spr.picnum == DTILE_BOSS2)
{ {
DVector2 spawnofs(ang.Sin() * (1024. / 56.), ang.Cos() * -(1024. / 56.)); DVector2 spawnofs(ang.Sin() * (1024. / 56.), ang.Cos() * -(1024. / 56.));
DAngle aoffs = DAngle22_5 / 16. - DAngle45 + randomAngle(90); DAngle aoffs = DAngle22_5 / 16. - DAngle45 + randomAngle(90);
@ -772,7 +772,7 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw
spawned->spr.scale = DVector2(0.375, 0.375); spawned->spr.scale = DVector2(0.375, 0.375);
} }
else if (atwith != FREEZEBLAST) else if (atwith != DTILE_FREEZEBLAST)
{ {
spawned->spr.scale = DVector2(0.46875, 0.46875); spawned->spr.scale = DVector2(0.46875, 0.46875);
spawned->spr.extra >>= 2; spawned->spr.extra >>= 2;
@ -798,7 +798,7 @@ static void shootrpg(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int atw
} }
spawned->spr.cstat = CSTAT_SPRITE_YCENTER; spawned->spr.cstat = CSTAT_SPRITE_YCENTER;
if (atwith == RPG) if (atwith == DTILE_RPG)
spawned->clipdist = 1; spawned->clipdist = 1;
else else
spawned->clipdist = 10; spawned->clipdist = 10;
@ -842,7 +842,7 @@ static void shootlaser(DDukeActor* actor, int p, DVector3 pos, DAngle ang)
if (j == 1) if (j == 1)
{ {
auto bomb = CreateActor(hit.hitSector, hit.hitpos, TRIPBOMB, -16, DVector2(0.0625, 0.078125), ang, 0., 0., actor, STAT_STANDABLE); auto bomb = CreateActor(hit.hitSector, hit.hitpos, DTILE_TRIPBOMB, -16, DVector2(0.0625, 0.078125), ang, 0., 0., actor, STAT_STANDABLE);
if (!bomb) return; if (!bomb) return;
if (isWW2GI()) if (isWW2GI())
{ {
@ -899,8 +899,8 @@ static void shootgrowspark(DDukeActor* actor, int p, DVector3 pos, DAngle ang)
double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) + 5; double dal = ((aimed->spr.scale.X * tileHeight(aimed->spr.picnum)) * 0.5) + 5;
switch (aimed->spr.picnum) switch (aimed->spr.picnum)
{ {
case GREENSLIME: case DTILE_GREENSLIME:
case ROTATEGUN: case DTILE_ROTATEGUN:
dal -= 8; dal -= 8;
break; break;
} }
@ -937,7 +937,7 @@ static void shootgrowspark(DDukeActor* actor, int p, DVector3 pos, DAngle ang)
actor->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; actor->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
auto spark = CreateActor(sect, hit.hitpos, GROWSPARK, -16, DVector2(0.4375, 0.4375), ang, 0., 0., actor, 1); auto spark = CreateActor(sect, hit.hitpos, DTILE_GROWSPARK, -16, DVector2(0.4375, 0.4375), ang, 0., 0., actor, 1);
if (!spark) return; if (!spark) return;
spark->spr.pal = 2; spark->spr.pal = 2;
@ -952,9 +952,9 @@ static void shootgrowspark(DDukeActor* actor, int p, DVector3 pos, DAngle ang)
else if (hit.actor() != nullptr) fi.checkhitsprite(hit.actor(), spark); else if (hit.actor() != nullptr) fi.checkhitsprite(hit.actor(), spark);
else if (hit.hitWall != nullptr) else if (hit.hitWall != nullptr)
{ {
if (hit.hitWall->picnum != ACCESSSWITCH && hit.hitWall->picnum != ACCESSSWITCH2) if (hit.hitWall->picnum != DTILE_ACCESSSWITCH && hit.hitWall->picnum != DTILE_ACCESSSWITCH2)
{ {
fi.checkhitwall(spark, hit.hitWall, hit.hitpos, GROWSPARK); fi.checkhitwall(spark, hit.hitWall, hit.hitpos, DTILE_GROWSPARK);
} }
} }
} }
@ -1053,10 +1053,10 @@ void shoot_d(DDukeActor* actor, int atwith, PClass *cls)
p = -1; p = -1;
spos = actor->spr.pos.plusZ(-(actor->spr.scale.Y * tileHeight(actor->spr.picnum) * 0.5) + 4); spos = actor->spr.pos.plusZ(-(actor->spr.scale.Y * tileHeight(actor->spr.picnum) * 0.5) + 4);
if (actor->spr.picnum != ROTATEGUN) if (actor->spr.picnum != DTILE_ROTATEGUN)
{ {
spos.Z -= 7; spos.Z -= 7;
if (badguy(actor) && actor->spr.picnum != COMMANDER) if (badguy(actor) && actor->spr.picnum != DTILE_COMMANDER)
{ {
spos.X -= (sang + DAngle22_5 * 0.75).Sin() * 8; spos.X -= (sang + DAngle22_5 * 0.75).Sin() * 8;
spos.Y += (sang + DAngle22_5 * 0.75).Cos() * 8; spos.Y += (sang + DAngle22_5 * 0.75).Cos() * 8;
@ -1078,15 +1078,15 @@ void shoot_d(DDukeActor* actor, int atwith, PClass *cls)
{ // Twentieth Anniversary World Tour { // Twentieth Anniversary World Tour
switch (atwith) switch (atwith)
{ {
case FIREBALL: case DTILE_FIREBALL:
shootfireball(actor, p, spos, sang); shootfireball(actor, p, spos, sang);
return; return;
case FLAMETHROWERFLAME: case DTILE_FLAMETHROWERFLAME:
shootflamethrowerflame(actor, p, spos, sang); shootflamethrowerflame(actor, p, spos, sang);
return; return;
case FIREFLY: // BOSS5 shot case DTILE_FIREFLY: // DTILE_BOSS5 shot
{ {
auto k = spawn(actor, atwith); auto k = spawn(actor, atwith);
if (k) if (k)
@ -1104,44 +1104,44 @@ void shoot_d(DDukeActor* actor, int atwith, PClass *cls)
switch (atwith) switch (atwith)
{ {
case KNEE: case DTILE_KNEE:
shootknee(actor, p, spos, sang); shootknee(actor, p, spos, sang);
break; break;
case SHOTSPARK1: case DTILE_SHOTSPARK1:
case SHOTGUN: case DTILE_SHOTGUN:
case CHAINGUN: case DTILE_CHAINGUN:
shootweapon(actor, p, spos, sang, atwith); shootweapon(actor, p, spos, sang, atwith);
return; return;
case FIRELASER: case DTILE_FIRELASER:
case SPIT: case DTILE_SPIT:
case COOLEXPLOSION1: case DTILE_COOLEXPLOSION1:
shootstuff(actor, p, spos, sang, atwith); shootstuff(actor, p, spos, sang, atwith);
return; return;
case FREEZEBLAST: case DTILE_FREEZEBLAST:
spos.Z += 3; spos.Z += 3;
[[fallthrough]]; [[fallthrough]];
case RPG: case DTILE_RPG:
shootrpg(actor, p, spos, sang, atwith); shootrpg(actor, p, spos, sang, atwith);
break; break;
case HANDHOLDINGLASER: case DTILE_HANDHOLDINGLASER:
shootlaser(actor, p, spos, sang); shootlaser(actor, p, spos, sang);
return; return;
case BOUNCEMINE: case DTILE_BOUNCEMINE:
case MORTER: case DTILE_MORTER:
shootmortar(actor, p, spos, sang, atwith); shootmortar(actor, p, spos, sang, atwith);
return; return;
case GROWSPARK: case DTILE_GROWSPARK:
shootgrowspark(actor, p, spos, sang); shootgrowspark(actor, p, spos, sang);
break; break;
case SHRINKER: case DTILE_SHRINKER:
shootshrinker(actor, p, spos, sang, atwith); shootshrinker(actor, p, spos, sang, atwith);
break; break;
} }
@ -1288,7 +1288,7 @@ void selectweapon_d(int snum, int weap) // playernum, weaponnum
DukeStatIterator it(STAT_ACTOR); DukeStatIterator it(STAT_ACTOR);
while (auto act = it.Next()) while (auto act = it.Next())
{ {
if (act->spr.picnum == HEAVYHBOMB && act->GetOwner() == p->GetActor()) if (act->spr.picnum == DTILE_HEAVYHBOMB && act->GetOwner() == p->GetActor())
{ {
p->gotweapon[HANDBOMB_WEAPON] = true; p->gotweapon[HANDBOMB_WEAPON] = true;
j = HANDREMOTE_WEAPON; j = HANDREMOTE_WEAPON;
@ -1501,7 +1501,7 @@ int doincrements_d(player_struct* p)
p->last_quick_kick = p->quick_kick + 1; p->last_quick_kick = p->quick_kick + 1;
p->quick_kick--; p->quick_kick--;
if (p->quick_kick == 8) if (p->quick_kick == 8)
fi.shoot(p->GetActor(), KNEE, nullptr); fi.shoot(p->GetActor(), DTILE_KNEE, nullptr);
} }
else if (p->last_quick_kick > 0) else if (p->last_quick_kick > 0)
p->last_quick_kick--; p->last_quick_kick--;
@ -1606,9 +1606,9 @@ int doincrements_d(player_struct* p)
void checkweapons_d(player_struct* p) void checkweapons_d(player_struct* p)
{ {
static const uint16_t weapon_sprites[MAX_WEAPONS] = { KNEE, FIRSTGUNSPRITE, SHOTGUNSPRITE, static const uint16_t weapon_sprites[MAX_WEAPONS] = { DTILE_KNEE, DTILE_FIRSTGUNSPRITE, DTILE_SHOTGUNSPRITE,
CHAINGUNSPRITE, RPGSPRITE, HEAVYHBOMB, SHRINKERSPRITE, DEVISTATORSPRITE, DTILE_CHAINGUNSPRITE, DTILE_RPGSPRITE, DTILE_HEAVYHBOMB, DTILE_SHRINKERSPRITE, DTILE_DEVISTATORSPRITE,
TRIPBOMBSPRITE, FREEZESPRITE, HEAVYHBOMB, SHRINKERSPRITE }; DTILE_TRIPBOMBSPRITE, DTILE_FREEZESPRITE, DTILE_HEAVYHBOMB, DTILE_SHRINKERSPRITE };
int cw; int cw;
@ -1631,7 +1631,7 @@ void checkweapons_d(player_struct* p)
{ {
case RPG_WEAPON: case RPG_WEAPON:
case HANDBOMB_WEAPON: case HANDBOMB_WEAPON:
spawn(p->GetActor(), EXPLOSION2); spawn(p->GetActor(), DTILE_EXPLOSION2);
break; break;
} }
} }
@ -1746,10 +1746,10 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, double floo
if (p->on_ground == 1) if (p->on_ground == 1)
{ {
if (p->dummyplayersprite == nullptr) if (p->dummyplayersprite == nullptr)
p->dummyplayersprite = spawn(pact, PLAYERONWATER); p->dummyplayersprite = spawn(pact, DTILE_PLAYERONWATER);
p->footprintcount = 6; p->footprintcount = 6;
if (p->cursector->floorpicnum == FLOORSLIME) if (p->cursector->floorpicnum == DTILE_FLOORSLIME)
p->footprintpal = 8; p->footprintpal = 8;
else p->footprintpal = 0; else p->footprintpal = 0;
p->footprintshade = 0; p->footprintshade = 0;
@ -1964,7 +1964,7 @@ static void underwater(int snum, ESyncBits actions, double floorz, double ceilin
if (p->scuba_on && (krand() & 255) < 8) if (p->scuba_on && (krand() & 255) < 8)
{ {
auto j = spawn(pact, WATERBUBBLE); auto j = spawn(pact, DTILE_WATERBUBBLE);
if (j) if (j)
{ {
j->spr.pos += (p->GetActor()->spr.Angles.Yaw.ToVector() + DVector2(4 - (global_random & 8), 4 - (global_random & 8))) * 16; j->spr.pos += (p->GetActor()->spr.Angles.Yaw.ToVector() + DVector2(4 - (global_random & 8), 4 - (global_random & 8))) * 16;
@ -1996,7 +1996,7 @@ int operateTripbomb(int snum)
return 0; return 0;
if (hit.hitWall != nullptr && hit.hitWall->overpicnum >= 0) if (hit.hitWall != nullptr && hit.hitWall->overpicnum >= 0)
if (hit.hitWall->overpicnum == BIGFORCE) if (hit.hitWall->overpicnum == DTILE_BIGFORCE)
return 0; return 0;
DDukeActor* act; DDukeActor* act;
@ -2184,7 +2184,7 @@ static void operateweapon(int snum, ESyncBits actions)
zvel -= 4; zvel -= 4;
} }
auto spawned = CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ() + p->GetActor()->spr.Angles.Yaw.ToVector() * 16, HEAVYHBOMB, -16, DVector2(0.140625, 0.140625), auto spawned = CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ() + p->GetActor()->spr.Angles.Yaw.ToVector() * 16, DTILE_HEAVYHBOMB, -16, DVector2(0.140625, 0.140625),
p->GetActor()->spr.Angles.Yaw, vel + p->hbomb_hold_delay * 2, zvel, pact, STAT_ACTOR); p->GetActor()->spr.Angles.Yaw, vel + p->hbomb_hold_delay * 2, zvel, pact, STAT_ACTOR);
if (isNam()) if (isNam())
@ -2250,14 +2250,14 @@ static void operateweapon(int snum, ESyncBits actions)
case PISTOL_WEAPON: // m-16 in NAM case PISTOL_WEAPON: // m-16 in NAM
if (p->kickback_pic == 1) if (p->kickback_pic == 1)
{ {
fi.shoot(pact, SHOTSPARK1, nullptr); fi.shoot(pact, DTILE_SHOTSPARK1, nullptr);
S_PlayActorSound(PISTOL_FIRE, pact); S_PlayActorSound(PISTOL_FIRE, pact);
lastvisinc = PlayClock + 32; lastvisinc = PlayClock + 32;
p->visibility = 0; p->visibility = 0;
} }
else if (p->kickback_pic == 2) else if (p->kickback_pic == 2)
spawn(pact, SHELL); spawn(pact, DTILE_SHELL);
p->kickback_pic++; p->kickback_pic++;
@ -2301,7 +2301,7 @@ static void operateweapon(int snum, ESyncBits actions)
if (p->kickback_pic == 4) if (p->kickback_pic == 4)
{ {
for(int ii = 0; ii < 7; ii++) for(int ii = 0; ii < 7; ii++)
fi.shoot(pact, SHOTGUN, nullptr); fi.shoot(pact, DTILE_SHOTGUN, nullptr);
p->ammo_amount[SHOTGUN_WEAPON]--; p->ammo_amount[SHOTGUN_WEAPON]--;
S_PlayActorSound(SHOTGUN_FIRE, pact); S_PlayActorSound(SHOTGUN_FIRE, pact);
@ -2325,7 +2325,7 @@ static void operateweapon(int snum, ESyncBits actions)
break; break;
case 24: case 24:
{ {
auto j = spawn(pact, SHOTGUNSHELL); auto j = spawn(pact, DTILE_SHOTGUNSHELL);
if (j) if (j)
{ {
j->spr.Angles.Yaw += DAngle180; j->spr.Angles.Yaw += DAngle180;
@ -2359,7 +2359,7 @@ static void operateweapon(int snum, ESyncBits actions)
if ((p->kickback_pic % 3) == 0) if ((p->kickback_pic % 3) == 0)
{ {
auto j = spawn(pact, SHELL); auto j = spawn(pact, DTILE_SHELL);
if (j) if (j)
{ {
j->spr.Angles.Yaw += DAngle180; j->spr.Angles.Yaw += DAngle180;
@ -2370,7 +2370,7 @@ static void operateweapon(int snum, ESyncBits actions)
} }
S_PlayActorSound(CHAINGUN_FIRE, pact); S_PlayActorSound(CHAINGUN_FIRE, pact);
fi.shoot(pact, CHAINGUN, nullptr); fi.shoot(pact, DTILE_CHAINGUN, nullptr);
lastvisinc = PlayClock + 32; lastvisinc = PlayClock + 32;
p->visibility = 0; p->visibility = 0;
checkavailweapon(p); checkavailweapon(p);
@ -2414,7 +2414,7 @@ static void operateweapon(int snum, ESyncBits actions)
else else
p->okickback_pic = p->kickback_pic = 0; p->okickback_pic = p->kickback_pic = 0;
p->ammo_amount[p->curr_weapon]--; p->ammo_amount[p->curr_weapon]--;
fi.shoot(pact, GROWSPARK, nullptr); fi.shoot(pact, DTILE_GROWSPARK, nullptr);
//#ifdef NAM //#ifdef NAM
//#else //#else
@ -2449,7 +2449,7 @@ static void operateweapon(int snum, ESyncBits actions)
else p->okickback_pic = p->kickback_pic = 0; else p->okickback_pic = p->kickback_pic = 0;
p->ammo_amount[SHRINKER_WEAPON]--; p->ammo_amount[SHRINKER_WEAPON]--;
fi.shoot(pact, SHRINKER, nullptr); fi.shoot(pact, DTILE_SHRINKER, nullptr);
if (!isNam()) if (!isNam())
{ {
@ -2482,7 +2482,7 @@ static void operateweapon(int snum, ESyncBits actions)
{ {
p->visibility = 0; p->visibility = 0;
lastvisinc = PlayClock + 32; lastvisinc = PlayClock + 32;
fi.shoot(pact, RPG, nullptr); fi.shoot(pact, DTILE_RPG, nullptr);
p->ammo_amount[DEVISTATOR_WEAPON]--; p->ammo_amount[DEVISTATOR_WEAPON]--;
checkavailweapon(p); checkavailweapon(p);
} }
@ -2492,7 +2492,7 @@ static void operateweapon(int snum, ESyncBits actions)
{ {
p->visibility = 0; p->visibility = 0;
lastvisinc = PlayClock + 32; lastvisinc = PlayClock + 32;
fi.shoot(pact, RPG, nullptr); fi.shoot(pact, DTILE_RPG, nullptr);
p->ammo_amount[DEVISTATOR_WEAPON]--; p->ammo_amount[DEVISTATOR_WEAPON]--;
checkavailweapon(p); checkavailweapon(p);
if (p->ammo_amount[DEVISTATOR_WEAPON] <= 0) p->okickback_pic = p->kickback_pic = 0; if (p->ammo_amount[DEVISTATOR_WEAPON] <= 0) p->okickback_pic = p->kickback_pic = 0;
@ -2512,7 +2512,7 @@ static void operateweapon(int snum, ESyncBits actions)
p->visibility = 0; p->visibility = 0;
lastvisinc = PlayClock + 32; lastvisinc = PlayClock + 32;
fi.shoot(pact, FREEZEBLAST, nullptr); fi.shoot(pact, DTILE_FREEZEBLAST, nullptr);
checkavailweapon(p); checkavailweapon(p);
} }
if (pact->spr.scale.X < 0.5) if (pact->spr.scale.X < 0.5)
@ -2540,7 +2540,7 @@ static void operateweapon(int snum, ESyncBits actions)
if (p->cursector->lotag != 2) if (p->cursector->lotag != 2)
{ {
p->ammo_amount[FLAMETHROWER_WEAPON]--; p->ammo_amount[FLAMETHROWER_WEAPON]--;
fi.shoot(pact, FIREBALL, nullptr); fi.shoot(pact, DTILE_FIREBALL, nullptr);
} }
checkavailweapon(p); checkavailweapon(p);
} }
@ -2562,7 +2562,7 @@ static void operateweapon(int snum, ESyncBits actions)
p->GetActor()->restorez(); p->GetActor()->restorez();
p->vel.Z = 0; p->vel.Z = 0;
if (p->kickback_pic == 3) if (p->kickback_pic == 3)
fi.shoot(pact, HANDHOLDINGLASER, nullptr); fi.shoot(pact, DTILE_HANDHOLDINGLASER, nullptr);
} }
if (p->kickback_pic == 16) if (p->kickback_pic == 16)
{ {
@ -2575,7 +2575,7 @@ static void operateweapon(int snum, ESyncBits actions)
case KNEE_WEAPON: case KNEE_WEAPON:
p->kickback_pic++; p->kickback_pic++;
if (p->kickback_pic == 7) fi.shoot(pact, KNEE, nullptr); if (p->kickback_pic == 7) fi.shoot(pact, DTILE_KNEE, nullptr);
else if (p->kickback_pic == 14) else if (p->kickback_pic == 14)
{ {
if (actions & SB_FIRE) if (actions & SB_FIRE)
@ -2594,7 +2594,7 @@ static void operateweapon(int snum, ESyncBits actions)
p->ammo_amount[RPG_WEAPON]--; p->ammo_amount[RPG_WEAPON]--;
lastvisinc = PlayClock + 32; lastvisinc = PlayClock + 32;
p->visibility = 0; p->visibility = 0;
fi.shoot(pact, RPG, nullptr); fi.shoot(pact, DTILE_RPG, nullptr);
checkavailweapon(p); checkavailweapon(p);
} }
else if (p->kickback_pic == 20) else if (p->kickback_pic == 20)
@ -2837,7 +2837,7 @@ void processinput_d(int snum)
pact->vel.X = clamp((p->GetActor()->spr.pos.XY() - p->bobpos).Length(), 0., 32.); pact->vel.X = clamp((p->GetActor()->spr.pos.XY() - p->bobpos).Length(), 0., 32.);
if (p->on_ground) p->bobcounter += int(p->GetActor()->vel.X * 8); if (p->on_ground) p->bobcounter += int(p->GetActor()->vel.X * 8);
p->backuppos(ud.clipping == 0 && ((p->insector() && p->cursector->floorpicnum == MIRROR) || !p->insector())); p->backuppos(ud.clipping == 0 && ((p->insector() && p->cursector->floorpicnum == DTILE_MIRROR) || !p->insector()));
// Shrinking code // Shrinking code
@ -2881,7 +2881,7 @@ void processinput_d(int snum)
{ {
int j = pact->sector()->floorpicnum; int j = pact->sector()->floorpicnum;
if (j == PURPLELAVA || pact->sector()->ceilingpicnum == PURPLELAVA) if (j == DTILE_PURPLELAVA || pact->sector()->ceilingpicnum == DTILE_PURPLELAVA)
{ {
if (p->boot_amount > 0) if (p->boot_amount > 0)
{ {
@ -2903,7 +2903,7 @@ void processinput_d(int snum)
if (p->on_ground && truefdist <= gs.playerheight + 16) if (p->on_ground && truefdist <= gs.playerheight + 16)
{ {
int whichsound = (tileflags(j) & TFLAG_ELECTRIC) ? 0 : j == FLOORSLIME ? 1 : j == FLOORPLASMA ? 2 : -1; int whichsound = (tileflags(j) & TFLAG_ELECTRIC) ? 0 : j == DTILE_FLOORSLIME ? 1 : j == DTILE_FLOORPLASMA ? 2 : -1;
if (j >= 0) k = makepainsounds(snum, whichsound); if (j >= 0) k = makepainsounds(snum, whichsound);
} }
@ -2938,8 +2938,8 @@ void processinput_d(int snum)
switch (j) switch (j)
{ {
case PANNEL1: case DTILE_PANNEL1:
case PANNEL2: case DTILE_PANNEL2:
S_PlayActorSound(DUKE_WALKINDUCTS, pact); S_PlayActorSound(DUKE_WALKINDUCTS, pact);
p->walking_snd_toggle = 1; p->walking_snd_toggle = 1;
break; break;

View file

@ -342,7 +342,7 @@ void operateweapon_ww(int snum, ESyncBits actions)
zvel -= 4; zvel -= 4;
} }
auto spawned = CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ() + p->GetActor()->spr.Angles.Yaw.ToVector() * 16, HEAVYHBOMB, -16, DVector2(0.140625, 0.140625), auto spawned = CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ() + p->GetActor()->spr.Angles.Yaw.ToVector() * 16, DTILE_HEAVYHBOMB, -16, DVector2(0.140625, 0.140625),
p->GetActor()->spr.Angles.Yaw, vel + p->hbomb_hold_delay * 2, zvel, pact, 1); p->GetActor()->spr.Angles.Yaw, vel + p->hbomb_hold_delay * 2, zvel, pact, 1);
if (spawned) if (spawned)

View file

@ -65,81 +65,81 @@ static void cachespritenum(DDukeActor* actor)
switch(actor->spr.picnum) switch(actor->spr.picnum)
{ {
case HYDRENT: case DTILE_HYDRENT:
tloadtile(BROKEFIREHYDRENT); tloadtile(DTILE_BROKEFIREHYDRENT);
for(j = TOILETWATER; j < (TOILETWATER+4); j++) for(j = DTILE_TOILETWATER; j < (DTILE_TOILETWATER+4); j++)
tloadtile(j, pal); tloadtile(j, pal);
break; break;
case TOILET: case DTILE_TOILET:
tloadtile(TOILETBROKE); tloadtile(DTILE_TOILETBROKE);
for(j = TOILETWATER; j < (TOILETWATER+4); j++) for(j = DTILE_TOILETWATER; j < (DTILE_TOILETWATER+4); j++)
tloadtile(j, pal); tloadtile(j, pal);
break; break;
case STALL: case DTILE_STALL:
tloadtile(STALLBROKE); tloadtile(DTILE_STALLBROKE);
for(j = TOILETWATER; j < (TOILETWATER+4); j++) for(j = DTILE_TOILETWATER; j < (DTILE_TOILETWATER+4); j++)
tloadtile(j, pal); tloadtile(j, pal);
break; break;
case RUBBERCAN: case DTILE_RUBBERCAN:
maxc = 2; maxc = 2;
break; break;
case TOILETWATER: case DTILE_TOILETWATER:
maxc = 4; maxc = 4;
break; break;
case FEMPIC1: case DTILE_FEMPIC1:
maxc = 44; maxc = 44;
break; break;
case LIZTROOP: case DTILE_LIZTROOP:
case LIZTROOPRUNNING: case DTILE_LIZTROOPRUNNING:
case LIZTROOPSHOOT: case DTILE_LIZTROOPSHOOT:
case LIZTROOPJETPACK: case DTILE_LIZTROOPJETPACK:
case LIZTROOPONTOILET: case DTILE_LIZTROOPONTOILET:
case LIZTROOPDUCKING: case DTILE_LIZTROOPDUCKING:
for(j = LIZTROOP; j < (LIZTROOP+72); j++) for(j = DTILE_LIZTROOP; j < (DTILE_LIZTROOP+72); j++)
tloadtile(j, pal); tloadtile(j, pal);
for(j=HEADJIB1;j<LEGJIB1+3;j++) for(j=DTILE_HEADJIB1;j<DTILE_LEGJIB1+3;j++)
tloadtile(j, pal); tloadtile(j, pal);
maxc = 0; maxc = 0;
break; break;
case WOODENHORSE: case DTILE_WOODENHORSE:
maxc = 5; maxc = 5;
for(j = HORSEONSIDE; j < (HORSEONSIDE+4); j++) for(j = DTILE_HORSEONSIDE; j < (DTILE_HORSEONSIDE+4); j++)
tloadtile(j, pal); tloadtile(j, pal);
break; break;
case NEWBEAST: case DTILE_NEWBEAST:
case NEWBEASTSTAYPUT: case DTILE_NEWBEASTSTAYPUT:
maxc = 90; maxc = 90;
break; break;
case BOSS1: case DTILE_BOSS1:
case BOSS2: case DTILE_BOSS2:
case BOSS3: case DTILE_BOSS3:
maxc = 30; maxc = 30;
break; break;
case OCTABRAIN: case DTILE_OCTABRAIN:
case OCTABRAINSTAYPUT: case DTILE_OCTABRAINSTAYPUT:
case COMMANDER: case DTILE_COMMANDER:
case COMMANDERSTAYPUT: case DTILE_COMMANDERSTAYPUT:
maxc = 38; maxc = 38;
break; break;
case RECON: case DTILE_RECON:
maxc = 13; maxc = 13;
break; break;
case PIGCOP: case DTILE_PIGCOP:
case PIGCOPDIVE: case DTILE_PIGCOPDIVE:
maxc = 61; maxc = 61;
break; break;
case SHARK: case DTILE_SHARK:
maxc = 30; maxc = 30;
break; break;
case LIZMAN: case DTILE_LIZMAN:
case LIZMANSPITTING: case DTILE_LIZMANSPITTING:
case LIZMANFEEDING: case DTILE_LIZMANFEEDING:
case LIZMANJUMP: case DTILE_LIZMANJUMP:
for(j=LIZMANHEAD1;j<LIZMANLEG1+3;j++) for(j=DTILE_LIZMANHEAD1;j<DTILE_LIZMANLEG1+3;j++)
tloadtile(j, pal); tloadtile(j, pal);
maxc = 80; maxc = 80;
break; break;
case APLAYER: case DTILE_APLAYER:
maxc = 0; maxc = 0;
if(ud.multimode > 1) if(ud.multimode > 1)
{ {
@ -148,16 +148,16 @@ static void cachespritenum(DDukeActor* actor)
tloadtile(j, pal); tloadtile(j, pal);
} }
break; break;
case ATOMICHEALTH: case DTILE_ATOMICHEALTH:
maxc = 14; maxc = 14;
break; break;
case DRONE: case DTILE_DRONE:
maxc = 10; maxc = 10;
break; break;
case EXPLODINGBARREL: case DTILE_EXPLODINGBARREL:
maxc = 3; maxc = 3;
break; break;
case NUKEBARREL: case DTILE_NUKEBARREL:
maxc = 5; maxc = 5;
break; break;
} }
@ -176,46 +176,46 @@ static void cachegoodsprites(void)
{ {
int i; int i;
tloadtile(BOTTOMSTATUSBAR); tloadtile(DTILE_BOTTOMSTATUSBAR);
if (ud.multimode > 1) if (ud.multimode > 1)
{ {
tloadtile(FRAGBAR); tloadtile(DTILE_FRAGBAR);
for (i = MINIFONT; i < MINIFONT + 63; i++) for (i = DTILE_MINIFONT; i < DTILE_MINIFONT + 63; i++)
tloadtile(i); tloadtile(i);
} }
for(i=FOOTPRINTS;i<FOOTPRINTS+3;i++) for(i=DTILE_FOOTPRINTS;i<DTILE_FOOTPRINTS+3;i++)
tloadtile(i); tloadtile(i);
for( i = BURNING; i < BURNING+14; i++) for( i = DTILE_BURNING; i < DTILE_BURNING+14; i++)
tloadtile(i); tloadtile(i);
for( i = BURNING2; i < BURNING2+14; i++) for( i = DTILE_BURNING2; i < DTILE_BURNING2+14; i++)
tloadtile(i); tloadtile(i);
for( i = CRACKKNUCKLES; i < CRACKKNUCKLES+4; i++) for( i = DTILE_CRACKKNUCKLES; i < DTILE_CRACKKNUCKLES+4; i++)
tloadtile(i); tloadtile(i);
for( i = FIRSTGUN; i < FIRSTGUN+3 ; i++ ) for( i = DTILE_FIRSTGUN; i < DTILE_FIRSTGUN+3 ; i++ )
tloadtile(i); tloadtile(i);
for( i = EXPLOSION2; i < EXPLOSION2+21 ; i++ ) for( i = DTILE_EXPLOSION2; i < DTILE_EXPLOSION2+21 ; i++ )
tloadtile(i); tloadtile(i);
tloadtile(BULLETHOLE); tloadtile(DTILE_BULLETHOLE);
for( i = FIRSTGUNRELOAD; i < FIRSTGUNRELOAD+8 ; i++ ) for( i = DTILE_FIRSTGUNRELOAD; i < DTILE_FIRSTGUNRELOAD+8 ; i++ )
tloadtile(i); tloadtile(i);
tloadtile(FOOTPRINTS); tloadtile(DTILE_FOOTPRINTS);
for( i = JIBS1; i < (JIBS5+5); i++) for( i = DTILE_JIBS1; i < (DTILE_JIBS5+5); i++)
tloadtile(i); tloadtile(i);
for( i = SCRAP1; i < (SCRAP1+19); i++) for( i = DTILE_SCRAP1; i < (DTILE_SCRAP1+19); i++)
tloadtile(i); tloadtile(i);
for( i = SMALLSMOKE; i < (SMALLSMOKE+4); i++) for( i = DTILE_SMALLSMOKE; i < (DTILE_SMALLSMOKE+4); i++)
tloadtile(i); tloadtile(i);
} }
@ -311,19 +311,19 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
{ {
switch (actor->spr.picnum) switch (actor->spr.picnum)
{ {
case DIPSWITCHON: case DTILE_DIPSWITCHON:
case DIPSWITCH2ON: case DTILE_DIPSWITCH2ON:
case PULLSWITCHON: case DTILE_PULLSWITCHON:
case HANDSWITCHON: case DTILE_HANDSWITCHON:
case SLOTDOORON: case DTILE_SLOTDOORON:
case LIGHTSWITCHON: case DTILE_LIGHTSWITCHON:
case SPACELIGHTSWITCHON: case DTILE_SPACELIGHTSWITCHON:
case SPACEDOORSWITCHON: case DTILE_SPACEDOORSWITCHON:
case FRANKENSTINESWITCHON: case DTILE_FRANKENSTINESWITCHON:
case LIGHTSWITCH2ON: case DTILE_LIGHTSWITCH2ON:
case POWERSWITCH1ON: case DTILE_POWERSWITCH1ON:
case LOCKSWITCH1ON: case DTILE_LOCKSWITCH1ON:
case POWERSWITCH2ON: case DTILE_POWERSWITCH2ON:
j = lotags.Find(actor->spr.lotag); j = lotags.Find(actor->spr.lotag);
if (j == lotags.Size()) if (j == lotags.Size())
{ {
@ -343,16 +343,16 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
for (auto& wal : wall) for (auto& wal : wall)
{ {
if (wal.overpicnum == MIRROR && (wal.cstat & CSTAT_WALL_1WAY) != 0) if (wal.overpicnum == DTILE_MIRROR && (wal.cstat & CSTAT_WALL_1WAY) != 0)
{ {
auto sectp = wal.nextSector(); auto sectp = wal.nextSector();
if (mirrorcnt > 63) if (mirrorcnt > 63)
I_Error("Too many mirrors (64 max.)"); I_Error("Too many mirrors (64 max.)");
if (sectp && sectp->ceilingpicnum != MIRROR) if (sectp && sectp->ceilingpicnum != DTILE_MIRROR)
{ {
sectp->ceilingpicnum = MIRROR; sectp->ceilingpicnum = DTILE_MIRROR;
sectp->floorpicnum = MIRROR; sectp->floorpicnum = DTILE_MIRROR;
mirrorwall[mirrorcnt] = &wal; mirrorwall[mirrorcnt] = &wal;
mirrorsector[mirrorcnt] = sectp; mirrorsector[mirrorcnt] = sectp;
mirrorcnt++; mirrorcnt++;
@ -368,19 +368,19 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
switch (wal.overpicnum) switch (wal.overpicnum)
{ {
case FANSHADOW: case DTILE_FANSHADOW:
case FANSPRITE: case DTILE_FANSPRITE:
//wal.cstat |= CSTAT_WALL_BLOCK | CSTAT_WALL_BLOCK_HITSCAN; Original code assigned this to 'wall', i.e. wall[0] //wal.cstat |= CSTAT_WALL_BLOCK | CSTAT_WALL_BLOCK_HITSCAN; Original code assigned this to 'wall', i.e. wall[0]
animwall[numanimwalls].wall = &wal; animwall[numanimwalls].wall = &wal;
numanimwalls++; numanimwalls++;
break; break;
case W_FORCEFIELD: case DTILE_W_FORCEFIELD:
for (int jj = 0; jj < 3; jj++) for (int jj = 0; jj < 3; jj++)
tloadtile(W_FORCEFIELD + jj); tloadtile(DTILE_W_FORCEFIELD + jj);
[[fallthrough]]; [[fallthrough]];
case W_FORCEFIELD + 1: case DTILE_W_FORCEFIELD + 1:
case W_FORCEFIELD + 2: case DTILE_W_FORCEFIELD + 2:
if (wal.shade > 31) if (wal.shade > 31)
wal.cstat = 0; wal.cstat = 0;
else wal.cstat |= CSTAT_WALL_BLOCK | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_MASKED | CSTAT_WALL_BLOCK_HITSCAN | CSTAT_WALL_YFLIP; else wal.cstat |= CSTAT_WALL_BLOCK | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_MASKED | CSTAT_WALL_BLOCK_HITSCAN | CSTAT_WALL_YFLIP;
@ -389,7 +389,7 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
wal.nextWall()->lotag = wal.lotag; wal.nextWall()->lotag = wal.lotag;
[[fallthrough]]; [[fallthrough]];
case BIGFORCE: case DTILE_BIGFORCE:
animwall[numanimwalls].wall = &wal; animwall[numanimwalls].wall = &wal;
numanimwalls++; numanimwalls++;
@ -401,27 +401,27 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
switch (wal.picnum) switch (wal.picnum)
{ {
case W_TECHWALL1: case DTILE_W_TECHWALL1:
case W_TECHWALL2: case DTILE_W_TECHWALL2:
case W_TECHWALL3: case DTILE_W_TECHWALL3:
case W_TECHWALL4: case DTILE_W_TECHWALL4:
animwall[numanimwalls].wall = &wal; animwall[numanimwalls].wall = &wal;
// animwall[numanimwalls].tag = -1; // animwall[numanimwalls].tag = -1;
numanimwalls++; numanimwalls++;
break; break;
case SCREENBREAK6: case DTILE_SCREENBREAK6:
case SCREENBREAK7: case DTILE_SCREENBREAK7:
case SCREENBREAK8: case DTILE_SCREENBREAK8:
for (int jj = SCREENBREAK6; jj < SCREENBREAK9; jj++) for (int jj = DTILE_SCREENBREAK6; jj < DTILE_SCREENBREAK9; jj++)
tloadtile(jj); tloadtile(jj);
animwall[numanimwalls].wall = &wal; animwall[numanimwalls].wall = &wal;
animwall[numanimwalls].tag = -1; animwall[numanimwalls].tag = -1;
numanimwalls++; numanimwalls++;
break; break;
case FEMPIC1: case DTILE_FEMPIC1:
case FEMPIC2: case DTILE_FEMPIC2:
case FEMPIC3: case DTILE_FEMPIC3:
wal.extra = wal.picnum; wal.extra = wal.picnum;
animwall[numanimwalls].tag = -1; animwall[numanimwalls].tag = -1;
@ -431,23 +431,23 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
numanimwalls++; numanimwalls++;
break; break;
case SCREENBREAK1: case DTILE_SCREENBREAK1:
case SCREENBREAK2: case DTILE_SCREENBREAK2:
case SCREENBREAK3: case DTILE_SCREENBREAK3:
case SCREENBREAK4: case DTILE_SCREENBREAK4:
case SCREENBREAK5: case DTILE_SCREENBREAK5:
case SCREENBREAK9: case DTILE_SCREENBREAK9:
case SCREENBREAK10: case DTILE_SCREENBREAK10:
case SCREENBREAK11: case DTILE_SCREENBREAK11:
case SCREENBREAK12: case DTILE_SCREENBREAK12:
case SCREENBREAK13: case DTILE_SCREENBREAK13:
case SCREENBREAK14: case DTILE_SCREENBREAK14:
case SCREENBREAK15: case DTILE_SCREENBREAK15:
case SCREENBREAK16: case DTILE_SCREENBREAK16:
case SCREENBREAK17: case DTILE_SCREENBREAK17:
case SCREENBREAK18: case DTILE_SCREENBREAK18:
case SCREENBREAK19: case DTILE_SCREENBREAK19:
animwall[numanimwalls].wall = &wal; animwall[numanimwalls].wall = &wal;
animwall[numanimwalls].tag = wal.picnum; animwall[numanimwalls].tag = wal.picnum;
@ -461,8 +461,8 @@ void prelevel_d(int g, TArray<DDukeActor*>& actors)
{ {
for (auto& wal : mirrorsector[i]->walls) for (auto& wal : mirrorsector[i]->walls)
{ {
wal.picnum = MIRROR; wal.picnum = DTILE_MIRROR;
wal.overpicnum = MIRROR; wal.overpicnum = DTILE_MIRROR;
} }
} }
} }

View file

@ -60,43 +60,43 @@ void animatewalls_d(void)
switch (j) switch (j)
{ {
case SCREENBREAK1: case DTILE_SCREENBREAK1:
case SCREENBREAK2: case DTILE_SCREENBREAK2:
case SCREENBREAK3: case DTILE_SCREENBREAK3:
case SCREENBREAK4: case DTILE_SCREENBREAK4:
case SCREENBREAK5: case DTILE_SCREENBREAK5:
case SCREENBREAK9: case DTILE_SCREENBREAK9:
case SCREENBREAK10: case DTILE_SCREENBREAK10:
case SCREENBREAK11: case DTILE_SCREENBREAK11:
case SCREENBREAK12: case DTILE_SCREENBREAK12:
case SCREENBREAK13: case DTILE_SCREENBREAK13:
case SCREENBREAK14: case DTILE_SCREENBREAK14:
case SCREENBREAK15: case DTILE_SCREENBREAK15:
case SCREENBREAK16: case DTILE_SCREENBREAK16:
case SCREENBREAK17: case DTILE_SCREENBREAK17:
case SCREENBREAK18: case DTILE_SCREENBREAK18:
case SCREENBREAK19: case DTILE_SCREENBREAK19:
if ((krand() & 255) < 16) if ((krand() & 255) < 16)
{ {
animwall[p].tag = wal->picnum; animwall[p].tag = wal->picnum;
wal->picnum = SCREENBREAK6; wal->picnum = DTILE_SCREENBREAK6;
} }
continue; continue;
case SCREENBREAK6: case DTILE_SCREENBREAK6:
case SCREENBREAK7: case DTILE_SCREENBREAK7:
case SCREENBREAK8: case DTILE_SCREENBREAK8:
if (animwall[p].tag >= 0 && wal->extra != FEMPIC2 && wal->extra != FEMPIC3) if (animwall[p].tag >= 0 && wal->extra != DTILE_FEMPIC2 && wal->extra != DTILE_FEMPIC3)
wal->picnum = animwall[p].tag; wal->picnum = animwall[p].tag;
else else
{ {
wal->picnum++; wal->picnum++;
if (wal->picnum == (SCREENBREAK6 + 3)) if (wal->picnum == (DTILE_SCREENBREAK6 + 3))
wal->picnum = SCREENBREAK6; wal->picnum = DTILE_SCREENBREAK6;
} }
continue; continue;
@ -105,9 +105,9 @@ void animatewalls_d(void)
if (wal->cstat & CSTAT_WALL_MASKED) if (wal->cstat & CSTAT_WALL_MASKED)
switch (wal->overpicnum) switch (wal->overpicnum)
{ {
case W_FORCEFIELD: case DTILE_W_FORCEFIELD:
case W_FORCEFIELD + 1: case DTILE_W_FORCEFIELD + 1:
case W_FORCEFIELD + 2: case DTILE_W_FORCEFIELD + 2:
t = animwall[p].tag; t = animwall[p].tag;
@ -127,14 +127,14 @@ void animatewalls_d(void)
if (animwall[p].tag < (128 << 4)) if (animwall[p].tag < (128 << 4))
{ {
if (animwall[p].tag & 128) if (animwall[p].tag & 128)
wal->overpicnum = W_FORCEFIELD; wal->overpicnum = DTILE_W_FORCEFIELD;
else wal->overpicnum = W_FORCEFIELD + 1; else wal->overpicnum = DTILE_W_FORCEFIELD + 1;
} }
else else
{ {
if ((krand() & 255) < 32) if ((krand() & 255) < 32)
animwall[p].tag = 128 << (krand() & 3); animwall[p].tag = 128 << (krand() & 3);
else wal->overpicnum = W_FORCEFIELD + 1; else wal->overpicnum = DTILE_W_FORCEFIELD + 1;
} }
} }
@ -151,7 +151,7 @@ void animatewalls_d(void)
void operateforcefields_d(DDukeActor* act, int low) void operateforcefields_d(DDukeActor* act, int low)
{ {
operateforcefields_common(act, low, { W_FORCEFIELD, W_FORCEFIELD + 1, W_FORCEFIELD + 2, BIGFORCE }); operateforcefields_common(act, low, { DTILE_W_FORCEFIELD, DTILE_W_FORCEFIELD + 1, DTILE_W_FORCEFIELD + 2, DTILE_BIGFORCE });
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -191,15 +191,15 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
switch (picnum) switch (picnum)
{ {
case DIPSWITCH: case DTILE_DIPSWITCH:
case DIPSWITCHON: case DTILE_DIPSWITCHON:
case TECHSWITCH: case DTILE_TECHSWITCH:
case TECHSWITCHON: case DTILE_TECHSWITCHON:
case ALIENSWITCH: case DTILE_ALIENSWITCH:
case ALIENSWITCHON: case DTILE_ALIENSWITCHON:
break; break;
case ACCESSSWITCH: case DTILE_ACCESSSWITCH:
case ACCESSSWITCH2: case DTILE_ACCESSSWITCH2:
if (ps[snum].access_incs == 0) if (ps[snum].access_incs == 0)
{ {
if (switchpal == 0) if (switchpal == 0)
@ -234,36 +234,36 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
return 0; return 0;
} }
[[fallthrough]]; [[fallthrough]];
case DIPSWITCH2: case DTILE_DIPSWITCH2:
case DIPSWITCH2ON: case DTILE_DIPSWITCH2ON:
case DIPSWITCH3: case DTILE_DIPSWITCH3:
case DIPSWITCH3ON: case DTILE_DIPSWITCH3ON:
case MULTISWITCH: case DTILE_MULTISWITCH:
case MULTISWITCH_2: case DTILE_MULTISWITCH_2:
case MULTISWITCH_3: case DTILE_MULTISWITCH_3:
case MULTISWITCH_4: case DTILE_MULTISWITCH_4:
case PULLSWITCH: case DTILE_PULLSWITCH:
case PULLSWITCHON: case DTILE_PULLSWITCHON:
case HANDSWITCH: case DTILE_HANDSWITCH:
case HANDSWITCHON: case DTILE_HANDSWITCHON:
case SLOTDOOR: case DTILE_SLOTDOOR:
case SLOTDOORON: case DTILE_SLOTDOORON:
case LIGHTSWITCH: case DTILE_LIGHTSWITCH:
case LIGHTSWITCHON: case DTILE_LIGHTSWITCHON:
case SPACELIGHTSWITCH: case DTILE_SPACELIGHTSWITCH:
case SPACELIGHTSWITCHON: case DTILE_SPACELIGHTSWITCHON:
case SPACEDOORSWITCH: case DTILE_SPACEDOORSWITCH:
case SPACEDOORSWITCHON: case DTILE_SPACEDOORSWITCHON:
case FRANKENSTINESWITCH: case DTILE_FRANKENSTINESWITCH:
case FRANKENSTINESWITCHON: case DTILE_FRANKENSTINESWITCHON:
case LIGHTSWITCH2: case DTILE_LIGHTSWITCH2:
case LIGHTSWITCH2ON: case DTILE_LIGHTSWITCH2ON:
case POWERSWITCH1: case DTILE_POWERSWITCH1:
case POWERSWITCH1ON: case DTILE_POWERSWITCH1ON:
case LOCKSWITCH1: case DTILE_LOCKSWITCH1:
case LOCKSWITCH1ON: case DTILE_LOCKSWITCH1ON:
case POWERSWITCH2: case DTILE_POWERSWITCH2:
case POWERSWITCH2ON: case DTILE_POWERSWITCH2ON:
if (check_activator_motion(lotag)) return 0; if (check_activator_motion(lotag)) return 0;
break; break;
default: default:
@ -276,58 +276,58 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
{ {
if (lotag == other->spr.lotag) switch (other->spr.picnum) if (lotag == other->spr.lotag) switch (other->spr.picnum)
{ {
case DIPSWITCH: case DTILE_DIPSWITCH:
case TECHSWITCH: case DTILE_TECHSWITCH:
case ALIENSWITCH: case DTILE_ALIENSWITCH:
if (act && act == other) other->spr.picnum++; if (act && act == other) other->spr.picnum++;
else if (other->spr.hitag == 0) correctdips++; else if (other->spr.hitag == 0) correctdips++;
numdips++; numdips++;
break; break;
case TECHSWITCHON: case DTILE_TECHSWITCHON:
case DIPSWITCHON: case DTILE_DIPSWITCHON:
case ALIENSWITCHON: case DTILE_ALIENSWITCHON:
if (act && act == other) other->spr.picnum--; if (act && act == other) other->spr.picnum--;
else if (other->spr.hitag == 1) correctdips++; else if (other->spr.hitag == 1) correctdips++;
numdips++; numdips++;
break; break;
case MULTISWITCH: case DTILE_MULTISWITCH:
case MULTISWITCH_2: case DTILE_MULTISWITCH_2:
case MULTISWITCH_3: case DTILE_MULTISWITCH_3:
case MULTISWITCH_4: case DTILE_MULTISWITCH_4:
other->spr.picnum++; other->spr.picnum++;
if (other->spr.picnum > (MULTISWITCH_4)) if (other->spr.picnum > (DTILE_MULTISWITCH_4))
other->spr.picnum = MULTISWITCH; other->spr.picnum = DTILE_MULTISWITCH;
break; break;
case ACCESSSWITCH: case DTILE_ACCESSSWITCH:
case ACCESSSWITCH2: case DTILE_ACCESSSWITCH2:
case SLOTDOOR: case DTILE_SLOTDOOR:
case LIGHTSWITCH: case DTILE_LIGHTSWITCH:
case SPACELIGHTSWITCH: case DTILE_SPACELIGHTSWITCH:
case SPACEDOORSWITCH: case DTILE_SPACEDOORSWITCH:
case FRANKENSTINESWITCH: case DTILE_FRANKENSTINESWITCH:
case LIGHTSWITCH2: case DTILE_LIGHTSWITCH2:
case POWERSWITCH1: case DTILE_POWERSWITCH1:
case LOCKSWITCH1: case DTILE_LOCKSWITCH1:
case POWERSWITCH2: case DTILE_POWERSWITCH2:
case HANDSWITCH: case DTILE_HANDSWITCH:
case PULLSWITCH: case DTILE_PULLSWITCH:
case DIPSWITCH2: case DTILE_DIPSWITCH2:
case DIPSWITCH3: case DTILE_DIPSWITCH3:
other->spr.picnum++; other->spr.picnum++;
break; break;
case PULLSWITCHON: case DTILE_PULLSWITCHON:
case HANDSWITCHON: case DTILE_HANDSWITCHON:
case LIGHTSWITCH2ON: case DTILE_LIGHTSWITCH2ON:
case POWERSWITCH1ON: case DTILE_POWERSWITCH1ON:
case LOCKSWITCH1ON: case DTILE_LOCKSWITCH1ON:
case POWERSWITCH2ON: case DTILE_POWERSWITCH2ON:
case SLOTDOORON: case DTILE_SLOTDOORON:
case LIGHTSWITCHON: case DTILE_LIGHTSWITCHON:
case SPACELIGHTSWITCHON: case DTILE_SPACELIGHTSWITCHON:
case SPACEDOORSWITCHON: case DTILE_SPACEDOORSWITCHON:
case FRANKENSTINESWITCHON: case DTILE_FRANKENSTINESWITCHON:
case DIPSWITCH2ON: case DTILE_DIPSWITCH2ON:
case DIPSWITCH3ON: case DTILE_DIPSWITCH3ON:
other->spr.picnum--; other->spr.picnum--;
break; break;
} }
@ -338,56 +338,56 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
if (lotag == wal.lotag) if (lotag == wal.lotag)
switch (wal.picnum) switch (wal.picnum)
{ {
case DIPSWITCH: case DTILE_DIPSWITCH:
case TECHSWITCH: case DTILE_TECHSWITCH:
case ALIENSWITCH: case DTILE_ALIENSWITCH:
if (!act && &wal == wwal) wal.picnum++; if (!act && &wal == wwal) wal.picnum++;
else if (wal.hitag == 0) correctdips++; else if (wal.hitag == 0) correctdips++;
numdips++; numdips++;
break; break;
case DIPSWITCHON: case DTILE_DIPSWITCHON:
case TECHSWITCHON: case DTILE_TECHSWITCHON:
case ALIENSWITCHON: case DTILE_ALIENSWITCHON:
if (!act && &wal == wwal) wal.picnum--; if (!act && &wal == wwal) wal.picnum--;
else if (wal.hitag == 1) correctdips++; else if (wal.hitag == 1) correctdips++;
numdips++; numdips++;
break; break;
case MULTISWITCH: case DTILE_MULTISWITCH:
case MULTISWITCH_2: case DTILE_MULTISWITCH_2:
case MULTISWITCH_3: case DTILE_MULTISWITCH_3:
case MULTISWITCH_4: case DTILE_MULTISWITCH_4:
wal.picnum++; wal.picnum++;
if (wal.picnum > (MULTISWITCH_4)) if (wal.picnum > (DTILE_MULTISWITCH_4))
wal.picnum = MULTISWITCH; wal.picnum = DTILE_MULTISWITCH;
break; break;
case ACCESSSWITCH: case DTILE_ACCESSSWITCH:
case ACCESSSWITCH2: case DTILE_ACCESSSWITCH2:
case SLOTDOOR: case DTILE_SLOTDOOR:
case LIGHTSWITCH: case DTILE_LIGHTSWITCH:
case SPACELIGHTSWITCH: case DTILE_SPACELIGHTSWITCH:
case SPACEDOORSWITCH: case DTILE_SPACEDOORSWITCH:
case LIGHTSWITCH2: case DTILE_LIGHTSWITCH2:
case POWERSWITCH1: case DTILE_POWERSWITCH1:
case LOCKSWITCH1: case DTILE_LOCKSWITCH1:
case POWERSWITCH2: case DTILE_POWERSWITCH2:
case PULLSWITCH: case DTILE_PULLSWITCH:
case HANDSWITCH: case DTILE_HANDSWITCH:
case DIPSWITCH2: case DTILE_DIPSWITCH2:
case DIPSWITCH3: case DTILE_DIPSWITCH3:
wal.picnum++; wal.picnum++;
break; break;
case HANDSWITCHON: case DTILE_HANDSWITCHON:
case PULLSWITCHON: case DTILE_PULLSWITCHON:
case LIGHTSWITCH2ON: case DTILE_LIGHTSWITCH2ON:
case POWERSWITCH1ON: case DTILE_POWERSWITCH1ON:
case LOCKSWITCH1ON: case DTILE_LOCKSWITCH1ON:
case POWERSWITCH2ON: case DTILE_POWERSWITCH2ON:
case SLOTDOORON: case DTILE_SLOTDOORON:
case LIGHTSWITCHON: case DTILE_LIGHTSWITCHON:
case SPACELIGHTSWITCHON: case DTILE_SPACELIGHTSWITCHON:
case SPACEDOORSWITCHON: case DTILE_SPACEDOORSWITCHON:
case DIPSWITCH2ON: case DTILE_DIPSWITCH2ON:
case DIPSWITCH3ON: case DTILE_DIPSWITCH3ON:
wal.picnum--; wal.picnum--;
break; break;
} }
@ -405,17 +405,17 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
default: default:
if (isadoorwall(picnum) == 0) break; if (isadoorwall(picnum) == 0) break;
[[fallthrough]]; [[fallthrough]];
case DIPSWITCH: case DTILE_DIPSWITCH:
case DIPSWITCHON: case DTILE_DIPSWITCHON:
case TECHSWITCH: case DTILE_TECHSWITCH:
case TECHSWITCHON: case DTILE_TECHSWITCHON:
case ALIENSWITCH: case DTILE_ALIENSWITCH:
case ALIENSWITCHON: case DTILE_ALIENSWITCHON:
if (picnum == DIPSWITCH || picnum == DIPSWITCHON || if (picnum == DTILE_DIPSWITCH || picnum == DTILE_DIPSWITCHON ||
picnum == ALIENSWITCH || picnum == ALIENSWITCHON || picnum == DTILE_ALIENSWITCH || picnum == DTILE_ALIENSWITCHON ||
picnum == TECHSWITCH || picnum == TECHSWITCHON) picnum == DTILE_TECHSWITCH || picnum == DTILE_TECHSWITCHON)
{ {
if (picnum == ALIENSWITCH || picnum == ALIENSWITCHON) if (picnum == DTILE_ALIENSWITCH || picnum == DTILE_ALIENSWITCHON)
{ {
if (act) if (act)
S_PlaySound3D(ALIEN_SWITCH1, act, v); S_PlaySound3D(ALIEN_SWITCH1, act, v);
@ -431,42 +431,42 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
S_PlaySound3D(END_OF_LEVEL_WARN, ps[snum].GetActor(), v); S_PlaySound3D(END_OF_LEVEL_WARN, ps[snum].GetActor(), v);
} }
[[fallthrough]]; [[fallthrough]];
case DIPSWITCH2: case DTILE_DIPSWITCH2:
case DIPSWITCH2ON: case DTILE_DIPSWITCH2ON:
case DIPSWITCH3: case DTILE_DIPSWITCH3:
case DIPSWITCH3ON: case DTILE_DIPSWITCH3ON:
case MULTISWITCH: case DTILE_MULTISWITCH:
case MULTISWITCH_2: case DTILE_MULTISWITCH_2:
case MULTISWITCH_3: case DTILE_MULTISWITCH_3:
case MULTISWITCH_4: case DTILE_MULTISWITCH_4:
case ACCESSSWITCH: case DTILE_ACCESSSWITCH:
case ACCESSSWITCH2: case DTILE_ACCESSSWITCH2:
case SLOTDOOR: case DTILE_SLOTDOOR:
case SLOTDOORON: case DTILE_SLOTDOORON:
case LIGHTSWITCH: case DTILE_LIGHTSWITCH:
case LIGHTSWITCHON: case DTILE_LIGHTSWITCHON:
case SPACELIGHTSWITCH: case DTILE_SPACELIGHTSWITCH:
case SPACELIGHTSWITCHON: case DTILE_SPACELIGHTSWITCHON:
case SPACEDOORSWITCH: case DTILE_SPACEDOORSWITCH:
case SPACEDOORSWITCHON: case DTILE_SPACEDOORSWITCHON:
case FRANKENSTINESWITCH: case DTILE_FRANKENSTINESWITCH:
case FRANKENSTINESWITCHON: case DTILE_FRANKENSTINESWITCHON:
case LIGHTSWITCH2: case DTILE_LIGHTSWITCH2:
case LIGHTSWITCH2ON: case DTILE_LIGHTSWITCH2ON:
case POWERSWITCH1: case DTILE_POWERSWITCH1:
case POWERSWITCH1ON: case DTILE_POWERSWITCH1ON:
case LOCKSWITCH1: case DTILE_LOCKSWITCH1:
case LOCKSWITCH1ON: case DTILE_LOCKSWITCH1ON:
case POWERSWITCH2: case DTILE_POWERSWITCH2:
case POWERSWITCH2ON: case DTILE_POWERSWITCH2ON:
case HANDSWITCH: case DTILE_HANDSWITCH:
case HANDSWITCHON: case DTILE_HANDSWITCHON:
case PULLSWITCH: case DTILE_PULLSWITCH:
case PULLSWITCHON: case DTILE_PULLSWITCHON:
if (picnum == MULTISWITCH || picnum == (MULTISWITCH_2) || if (picnum == DTILE_MULTISWITCH || picnum == (DTILE_MULTISWITCH_2) ||
picnum == (MULTISWITCH_3) || picnum == (MULTISWITCH_4)) picnum == (DTILE_MULTISWITCH_3) || picnum == (DTILE_MULTISWITCH_4))
lotag += picnum - MULTISWITCH; lotag += picnum - DTILE_MULTISWITCH;
DukeStatIterator itr(STAT_EFFECTOR); DukeStatIterator itr(STAT_EFFECTOR);
while (auto other = itr.Next()) while (auto other = itr.Next())
@ -501,9 +501,9 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
fi.operateforcefields(ps[snum].GetActor(), lotag); fi.operateforcefields(ps[snum].GetActor(), lotag);
operatemasterswitches(lotag); operatemasterswitches(lotag);
if (picnum == DIPSWITCH || picnum == DIPSWITCHON || if (picnum == DTILE_DIPSWITCH || picnum == DTILE_DIPSWITCHON ||
picnum == ALIENSWITCH || picnum == ALIENSWITCHON || picnum == DTILE_ALIENSWITCH || picnum == DTILE_ALIENSWITCHON ||
picnum == TECHSWITCH || picnum == TECHSWITCHON) return 1; picnum == DTILE_TECHSWITCH || picnum == DTILE_TECHSWITCHON) return 1;
if (hitag == 0 && isadoorwall(picnum) == 0) if (hitag == 0 && isadoorwall(picnum) == 0)
{ {
@ -561,39 +561,39 @@ void checkhitwall_d(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw
{ {
int j, sn = -1, darkestwall; int j, sn = -1, darkestwall;
if (wal->overpicnum == MIRROR && atwith != -1 && gs.actorinfo[atwith].flags2 & SFLAG2_BREAKMIRRORS) if (wal->overpicnum == DTILE_MIRROR && atwith != -1 && gs.actorinfo[atwith].flags2 & SFLAG2_BREAKMIRRORS)
{ {
lotsofglass(spr, wal, 70); lotsofglass(spr, wal, 70);
wal->cstat &= ~CSTAT_WALL_MASKED; wal->cstat &= ~CSTAT_WALL_MASKED;
wal->overpicnum = MIRRORBROKE; wal->overpicnum = DTILE_MIRRORBROKE;
wal->portalflags = 0; wal->portalflags = 0;
S_PlayActorSound(GLASS_HEAVYBREAK, spr); S_PlayActorSound(GLASS_HEAVYBREAK, spr);
return; return;
} }
if (((wal->cstat & CSTAT_WALL_MASKED) || wal->overpicnum == BIGFORCE) && wal->twoSided()) if (((wal->cstat & CSTAT_WALL_MASKED) || wal->overpicnum == DTILE_BIGFORCE) && wal->twoSided())
if (wal->nextSector()->floorz> pos.Z) if (wal->nextSector()->floorz> pos.Z)
if (wal->nextSector()->floorz - wal->nextSector()->ceilingz) if (wal->nextSector()->floorz - wal->nextSector()->ceilingz)
switch (wal->overpicnum) switch (wal->overpicnum)
{ {
case W_FORCEFIELD: case DTILE_W_FORCEFIELD:
case W_FORCEFIELD + 1: case DTILE_W_FORCEFIELD + 1:
case W_FORCEFIELD + 2: case DTILE_W_FORCEFIELD + 2:
wal->extra = 1; // tell the forces to animate wal->extra = 1; // tell the forces to animate
[[fallthrough]]; [[fallthrough]];
case BIGFORCE: case DTILE_BIGFORCE:
{ {
sectortype* sptr = nullptr; sectortype* sptr = nullptr;
updatesector(pos, &sptr); updatesector(pos, &sptr);
if (sptr == nullptr) return; if (sptr == nullptr) return;
DDukeActor* spawned; DDukeActor* spawned;
if (atwith == -1) if (atwith == -1)
spawned = CreateActor(sptr, pos, FORCERIPPLE, -127, DVector2(0.125, 0.125), nullAngle, 0., 0., spr, 5); spawned = CreateActor(sptr, pos, DTILE_FORCERIPPLE, -127, DVector2(0.125, 0.125), nullAngle, 0., 0., spr, 5);
else else
{ {
if (atwith == CHAINGUN) if (atwith == DTILE_CHAINGUN)
spawned = CreateActor(sptr, pos, FORCERIPPLE, -127, DVector2(0.25, 0.25) + spr->spr.scale, nullAngle, 0., 0., spr, 5); spawned = CreateActor(sptr, pos, DTILE_FORCERIPPLE, -127, DVector2(0.25, 0.25) + spr->spr.scale, nullAngle, 0., 0., spr, 5);
else spawned = CreateActor(sptr, pos, FORCERIPPLE, -127, DVector2(0.5, 0.5), nullAngle, 0., 0., spr, 5); else spawned = CreateActor(sptr, pos, DTILE_FORCERIPPLE, -127, DVector2(0.5, 0.5), nullAngle, 0., 0., spr, 5);
} }
if (spawned) if (spawned)
{ {
@ -604,24 +604,24 @@ void checkhitwall_d(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw
} }
return; return;
} }
case FANSPRITE: case DTILE_FANSPRITE:
wal->overpicnum = FANSPRITEBROKE; wal->overpicnum = DTILE_FANSPRITEBROKE;
wal->cstat &= ~(CSTAT_WALL_BLOCK | CSTAT_WALL_BLOCK_HITSCAN); wal->cstat &= ~(CSTAT_WALL_BLOCK | CSTAT_WALL_BLOCK_HITSCAN);
if (wal->twoSided()) if (wal->twoSided())
{ {
wal->nextWall()->overpicnum = FANSPRITEBROKE; wal->nextWall()->overpicnum = DTILE_FANSPRITEBROKE;
wal->nextWall()->cstat &= ~(CSTAT_WALL_BLOCK | CSTAT_WALL_BLOCK_HITSCAN); wal->nextWall()->cstat &= ~(CSTAT_WALL_BLOCK | CSTAT_WALL_BLOCK_HITSCAN);
} }
S_PlayActorSound(VENT_BUST, spr); S_PlayActorSound(VENT_BUST, spr);
S_PlayActorSound(GLASS_BREAKING, spr); S_PlayActorSound(GLASS_BREAKING, spr);
return; return;
case GLASS: case DTILE_GLASS:
{ {
sectortype* sptr = nullptr; sectortype* sptr = nullptr;
updatesector(pos, &sptr); updatesector(pos, &sptr);
if (sptr == nullptr) return; if (sptr == nullptr) return;
wal->overpicnum = GLASS2; wal->overpicnum = DTILE_GLASS2;
lotsofglass(spr, wal, 10); lotsofglass(spr, wal, 10);
wal->cstat = 0; wal->cstat = 0;
@ -638,7 +638,7 @@ void checkhitwall_d(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw
} }
return; return;
} }
case STAINGLASS1: case DTILE_STAINGLASS1:
sectortype* sptr = nullptr; sectortype* sptr = nullptr;
updatesector(pos, &sptr); updatesector(pos, &sptr);
if (sptr == nullptr) return; if (sptr == nullptr) return;
@ -653,122 +653,122 @@ void checkhitwall_d(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw
switch (wal->picnum) switch (wal->picnum)
{ {
case COLAMACHINE: case DTILE_COLAMACHINE:
case VENDMACHINE: case DTILE_VENDMACHINE:
breakwall(wal->picnum + 2, spr, wal); breakwall(wal->picnum + 2, spr, wal);
S_PlayActorSound(VENT_BUST, spr); S_PlayActorSound(VENT_BUST, spr);
return; return;
case OJ: case DTILE_OJ:
case FEMPIC2: case DTILE_FEMPIC2:
case FEMPIC3: case DTILE_FEMPIC3:
case SCREENBREAK6: case DTILE_SCREENBREAK6:
case SCREENBREAK7: case DTILE_SCREENBREAK7:
case SCREENBREAK8: case DTILE_SCREENBREAK8:
case SCREENBREAK1: case DTILE_SCREENBREAK1:
case SCREENBREAK2: case DTILE_SCREENBREAK2:
case SCREENBREAK3: case DTILE_SCREENBREAK3:
case SCREENBREAK4: case DTILE_SCREENBREAK4:
case SCREENBREAK5: case DTILE_SCREENBREAK5:
case SCREENBREAK9: case DTILE_SCREENBREAK9:
case SCREENBREAK10: case DTILE_SCREENBREAK10:
case SCREENBREAK11: case DTILE_SCREENBREAK11:
case SCREENBREAK12: case DTILE_SCREENBREAK12:
case SCREENBREAK13: case DTILE_SCREENBREAK13:
case SCREENBREAK14: case DTILE_SCREENBREAK14:
case SCREENBREAK15: case DTILE_SCREENBREAK15:
case SCREENBREAK16: case DTILE_SCREENBREAK16:
case SCREENBREAK17: case DTILE_SCREENBREAK17:
case SCREENBREAK18: case DTILE_SCREENBREAK18:
case SCREENBREAK19: case DTILE_SCREENBREAK19:
case BORNTOBEWILDSCREEN: case DTILE_BORNTOBEWILDSCREEN:
lotsofglass(spr, wal, 30); lotsofglass(spr, wal, 30);
wal->picnum = W_SCREENBREAK + (krand() % 3); wal->picnum = DTILE_W_SCREENBREAK + (krand() % 3);
S_PlayActorSound(GLASS_HEAVYBREAK, spr); S_PlayActorSound(GLASS_HEAVYBREAK, spr);
return; return;
case W_TECHWALL5: case DTILE_W_TECHWALL5:
case W_TECHWALL6: case DTILE_W_TECHWALL6:
case W_TECHWALL7: case DTILE_W_TECHWALL7:
case W_TECHWALL8: case DTILE_W_TECHWALL8:
case W_TECHWALL9: case DTILE_W_TECHWALL9:
breakwall(wal->picnum + 1, spr, wal); breakwall(wal->picnum + 1, spr, wal);
return; return;
case W_MILKSHELF: case DTILE_W_MILKSHELF:
breakwall(W_MILKSHELFBROKE, spr, wal); breakwall(DTILE_W_MILKSHELFBROKE, spr, wal);
return; return;
case W_TECHWALL10: case DTILE_W_TECHWALL10:
breakwall(W_HITTECHWALL10, spr, wal); breakwall(DTILE_W_HITTECHWALL10, spr, wal);
return; return;
case W_TECHWALL1: case DTILE_W_TECHWALL1:
case W_TECHWALL11: case DTILE_W_TECHWALL11:
case W_TECHWALL12: case DTILE_W_TECHWALL12:
case W_TECHWALL13: case DTILE_W_TECHWALL13:
case W_TECHWALL14: case DTILE_W_TECHWALL14:
breakwall(W_HITTECHWALL1, spr, wal); breakwall(DTILE_W_HITTECHWALL1, spr, wal);
return; return;
case W_TECHWALL15: case DTILE_W_TECHWALL15:
breakwall(W_HITTECHWALL15, spr, wal); breakwall(DTILE_W_HITTECHWALL15, spr, wal);
return; return;
case W_TECHWALL16: case DTILE_W_TECHWALL16:
breakwall(W_HITTECHWALL16, spr, wal); breakwall(DTILE_W_HITTECHWALL16, spr, wal);
return; return;
case W_TECHWALL2: case DTILE_W_TECHWALL2:
breakwall(W_HITTECHWALL2, spr, wal); breakwall(DTILE_W_HITTECHWALL2, spr, wal);
return; return;
case W_TECHWALL3: case DTILE_W_TECHWALL3:
breakwall(W_HITTECHWALL3, spr, wal); breakwall(DTILE_W_HITTECHWALL3, spr, wal);
return; return;
case W_TECHWALL4: case DTILE_W_TECHWALL4:
breakwall(W_HITTECHWALL4, spr, wal); breakwall(DTILE_W_HITTECHWALL4, spr, wal);
return; return;
case ATM: case DTILE_ATM:
wal->picnum = ATMBROKE; wal->picnum = DTILE_ATMBROKE;
fi.lotsofmoney(spr, 1 + (krand() & 7)); fi.lotsofmoney(spr, 1 + (krand() & 7));
S_PlayActorSound(GLASS_HEAVYBREAK, spr); S_PlayActorSound(GLASS_HEAVYBREAK, spr);
break; break;
case WALLLIGHT1: case DTILE_WALLLIGHT1:
case WALLLIGHT2: case DTILE_WALLLIGHT2:
case WALLLIGHT3: case DTILE_WALLLIGHT3:
case WALLLIGHT4: case DTILE_WALLLIGHT4:
case TECHLIGHT2: case DTILE_TECHLIGHT2:
case TECHLIGHT4: case DTILE_TECHLIGHT4:
if (rnd(128)) if (rnd(128))
S_PlayActorSound(GLASS_HEAVYBREAK, spr); S_PlayActorSound(GLASS_HEAVYBREAK, spr);
else S_PlayActorSound(GLASS_BREAKING, spr); else S_PlayActorSound(GLASS_BREAKING, spr);
lotsofglass(spr, wal, 30); lotsofglass(spr, wal, 30);
if (wal->picnum == WALLLIGHT1) if (wal->picnum == DTILE_WALLLIGHT1)
wal->picnum = WALLLIGHTBUST1; wal->picnum = DTILE_WALLLIGHTBUST1;
if (wal->picnum == WALLLIGHT2) if (wal->picnum == DTILE_WALLLIGHT2)
wal->picnum = WALLLIGHTBUST2; wal->picnum = DTILE_WALLLIGHTBUST2;
if (wal->picnum == WALLLIGHT3) if (wal->picnum == DTILE_WALLLIGHT3)
wal->picnum = WALLLIGHTBUST3; wal->picnum = DTILE_WALLLIGHTBUST3;
if (wal->picnum == WALLLIGHT4) if (wal->picnum == DTILE_WALLLIGHT4)
wal->picnum = WALLLIGHTBUST4; wal->picnum = DTILE_WALLLIGHTBUST4;
if (wal->picnum == TECHLIGHT2) if (wal->picnum == DTILE_TECHLIGHT2)
wal->picnum = TECHLIGHTBUST2; wal->picnum = DTILE_TECHLIGHTBUST2;
if (wal->picnum == TECHLIGHT4) if (wal->picnum == DTILE_TECHLIGHT4)
wal->picnum = TECHLIGHTBUST4; wal->picnum = DTILE_TECHLIGHTBUST4;
if (!wal->lotag) return; if (!wal->lotag) return;
@ -814,9 +814,9 @@ void checkplayerhurt_d(player_struct* p, const Collision& coll)
if (p->hurt_delay > 0) p->hurt_delay--; if (p->hurt_delay > 0) p->hurt_delay--;
else if (wal->cstat & (CSTAT_WALL_BLOCK | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_MASKED | CSTAT_WALL_BLOCK_HITSCAN)) switch (wal->overpicnum) else if (wal->cstat & (CSTAT_WALL_BLOCK | CSTAT_WALL_ALIGN_BOTTOM | CSTAT_WALL_MASKED | CSTAT_WALL_BLOCK_HITSCAN)) switch (wal->overpicnum)
{ {
case W_FORCEFIELD: case DTILE_W_FORCEFIELD:
case W_FORCEFIELD + 1: case DTILE_W_FORCEFIELD + 1:
case W_FORCEFIELD + 2: case DTILE_W_FORCEFIELD + 2:
p->GetActor()->spr.extra -= 5; p->GetActor()->spr.extra -= 5;
p->hurt_delay = 16; p->hurt_delay = 16;
@ -828,7 +828,7 @@ void checkplayerhurt_d(player_struct* p, const Collision& coll)
fi.checkhitwall(p->GetActor(), wal, p->GetActor()->getPosWithOffsetZ() + p->GetActor()->spr.Angles.Yaw.ToVector() * 2, -1); fi.checkhitwall(p->GetActor(), wal, p->GetActor()->getPosWithOffsetZ() + p->GetActor()->spr.Angles.Yaw.ToVector() * 2, -1);
break; break;
case BIGFORCE: case DTILE_BIGFORCE:
p->hurt_delay = 26; p->hurt_delay = 26;
fi.checkhitwall(p->GetActor(), wal, p->GetActor()->getPosWithOffsetZ() + p->GetActor()->spr.Angles.Yaw.ToVector() * 2, -1); fi.checkhitwall(p->GetActor(), wal, p->GetActor()->getPosWithOffsetZ() + p->GetActor()->spr.Angles.Yaw.ToVector() * 2, -1);
break; break;
@ -848,33 +848,33 @@ bool checkhitceiling_d(sectortype* sectp)
switch (sectp->ceilingpicnum) switch (sectp->ceilingpicnum)
{ {
case WALLLIGHT1: case DTILE_WALLLIGHT1:
case WALLLIGHT2: case DTILE_WALLLIGHT2:
case WALLLIGHT3: case DTILE_WALLLIGHT3:
case WALLLIGHT4: case DTILE_WALLLIGHT4:
case TECHLIGHT2: case DTILE_TECHLIGHT2:
case TECHLIGHT4: case DTILE_TECHLIGHT4:
ceilingglass(ps[myconnectindex].GetActor(), sectp, 10); ceilingglass(ps[myconnectindex].GetActor(), sectp, 10);
S_PlayActorSound(GLASS_BREAKING, ps[screenpeek].GetActor()); S_PlayActorSound(GLASS_BREAKING, ps[screenpeek].GetActor());
if (sectp->ceilingpicnum == WALLLIGHT1) if (sectp->ceilingpicnum == DTILE_WALLLIGHT1)
sectp->ceilingpicnum = WALLLIGHTBUST1; sectp->ceilingpicnum = DTILE_WALLLIGHTBUST1;
if (sectp->ceilingpicnum == WALLLIGHT2) if (sectp->ceilingpicnum == DTILE_WALLLIGHT2)
sectp->ceilingpicnum = WALLLIGHTBUST2; sectp->ceilingpicnum = DTILE_WALLLIGHTBUST2;
if (sectp->ceilingpicnum == WALLLIGHT3) if (sectp->ceilingpicnum == DTILE_WALLLIGHT3)
sectp->ceilingpicnum = WALLLIGHTBUST3; sectp->ceilingpicnum = DTILE_WALLLIGHTBUST3;
if (sectp->ceilingpicnum == WALLLIGHT4) if (sectp->ceilingpicnum == DTILE_WALLLIGHT4)
sectp->ceilingpicnum = WALLLIGHTBUST4; sectp->ceilingpicnum = DTILE_WALLLIGHTBUST4;
if (sectp->ceilingpicnum == TECHLIGHT2) if (sectp->ceilingpicnum == DTILE_TECHLIGHT2)
sectp->ceilingpicnum = TECHLIGHTBUST2; sectp->ceilingpicnum = DTILE_TECHLIGHTBUST2;
if (sectp->ceilingpicnum == TECHLIGHT4) if (sectp->ceilingpicnum == DTILE_TECHLIGHT4)
sectp->ceilingpicnum = TECHLIGHTBUST4; sectp->ceilingpicnum = DTILE_TECHLIGHTBUST4;
if (!sectp->hitag) if (!sectp->hitag)
@ -923,20 +923,20 @@ void checkhitdefault_d(DDukeActor* targ, DDukeActor* proj)
if ((targ->spr.cstat & CSTAT_SPRITE_ALIGNMENT_WALL) && targ->spr.hitag == 0 && targ->spr.lotag == 0 && targ->spr.statnum == STAT_DEFAULT) if ((targ->spr.cstat & CSTAT_SPRITE_ALIGNMENT_WALL) && targ->spr.hitag == 0 && targ->spr.lotag == 0 && targ->spr.statnum == STAT_DEFAULT)
return; return;
if ((proj->spr.picnum == FREEZEBLAST || proj->GetOwner() != targ) && targ->spr.statnum != STAT_PROJECTILE) if ((proj->spr.picnum == DTILE_FREEZEBLAST || proj->GetOwner() != targ) && targ->spr.statnum != STAT_PROJECTILE)
{ {
if (badguy(targ) == 1) if (badguy(targ) == 1)
{ {
if (isWorldTour() && targ->spr.picnum == FIREFLY && targ->spr.scale.X < 0.75) if (isWorldTour() && targ->spr.picnum == DTILE_FIREFLY && targ->spr.scale.X < 0.75)
return; return;
if (proj->spr.picnum == RPG) proj->spr.extra <<= 1; if (proj->spr.picnum == DTILE_RPG) proj->spr.extra <<= 1;
if ((targ->spr.picnum != DRONE) && (targ->spr.picnum != ROTATEGUN) && (targ->spr.picnum != COMMANDER) && targ->spr.picnum != GREENSLIME) if ((targ->spr.picnum != DTILE_DRONE) && (targ->spr.picnum != DTILE_ROTATEGUN) && (targ->spr.picnum != DTILE_COMMANDER) && targ->spr.picnum != DTILE_GREENSLIME)
if (proj->spr.picnum != FREEZEBLAST) if (proj->spr.picnum != DTILE_FREEZEBLAST)
//if (actortype[targ->spr.picnum] == 0) //TRANSITIONAL. //if (actortype[targ->spr.picnum] == 0) //TRANSITIONAL.
{ {
auto spawned = spawn(proj, JIBS6); auto spawned = spawn(proj, DTILE_JIBS6);
if (spawned) if (spawned)
{ {
if (proj->spr.pal == 6) if (proj->spr.pal == 6)
@ -950,7 +950,7 @@ void checkhitdefault_d(DDukeActor* targ, DDukeActor* proj)
auto Owner = proj->GetOwner(); auto Owner = proj->GetOwner();
if (Owner && Owner->isPlayer() && targ->spr.picnum != ROTATEGUN && targ->spr.picnum != DRONE) if (Owner && Owner->isPlayer() && targ->spr.picnum != DTILE_ROTATEGUN && targ->spr.picnum != DTILE_DRONE)
if (ps[Owner->PlayerIndex()].curr_weapon == SHOTGUN_WEAPON) if (ps[Owner->PlayerIndex()].curr_weapon == SHOTGUN_WEAPON)
{ {
fi.shoot(targ, -1, PClass::FindActor("DukeBloodSplat3")); fi.shoot(targ, -1, PClass::FindActor("DukeBloodSplat3"));
@ -976,12 +976,12 @@ void checkhitdefault_d(DDukeActor* targ, DDukeActor* proj)
ChangeActorStat(targ, STAT_ACTOR); ChangeActorStat(targ, STAT_ACTOR);
targ->timetosleep = SLEEPTIME; targ->timetosleep = SLEEPTIME;
} }
if ((targ->spr.scale.X < 0.375 || targ->spr.picnum == SHARK) && proj->spr.picnum == SHRINKSPARK) return; if ((targ->spr.scale.X < 0.375 || targ->spr.picnum == DTILE_SHARK) && proj->spr.picnum == DTILE_SHRINKSPARK) return;
} }
if (targ->spr.statnum != STAT_ZOMBIEACTOR) if (targ->spr.statnum != STAT_ZOMBIEACTOR)
{ {
if (proj->spr.picnum == FREEZEBLAST && ((targ->isPlayer() && targ->spr.pal == 1) || (gs.freezerhurtowner == 0 && proj->GetOwner() == targ))) if (proj->spr.picnum == DTILE_FREEZEBLAST && ((targ->isPlayer() && targ->spr.pal == 1) || (gs.freezerhurtowner == 0 && proj->GetOwner() == targ)))
return; return;
int hitpic = proj->spr.picnum; int hitpic = proj->spr.picnum;
@ -992,8 +992,8 @@ void checkhitdefault_d(DDukeActor* targ, DDukeActor* proj)
return; return;
auto tOwner = targ->GetOwner(); auto tOwner = targ->GetOwner();
if (isWorldTour() && hitpic == FIREBALL && tOwner && tOwner->spr.picnum != FIREBALL) if (isWorldTour() && hitpic == DTILE_FIREBALL && tOwner && tOwner->spr.picnum != DTILE_FIREBALL)
hitpic = FLAMETHROWERFLAME; hitpic = DTILE_FLAMETHROWERFLAME;
} }
targ->attackertype = hitpic; targ->attackertype = hitpic;
@ -1019,7 +1019,7 @@ void checkhitdefault_d(DDukeActor* targ, DDukeActor* proj)
} }
} }
if (targ->spr.scale.X < 0.375 && proj->spr.picnum == SHRINKSPARK) if (targ->spr.scale.X < 0.375 && proj->spr.picnum == DTILE_SHRINKSPARK)
return; return;
auto hitowner = targ->GetHitOwner(); auto hitowner = targ->GetHitOwner();
@ -1040,7 +1040,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
} }
if (targ->spr.picnum == PLAYERONWATER) if (targ->spr.picnum == DTILE_PLAYERONWATER)
{ {
targ = targ->GetOwner(); targ = targ->GetOwner();
if (!targ) return; if (!targ) return;
@ -1149,7 +1149,7 @@ void checksectors_d(int snum)
if (hitscanwall != nullptr) if (hitscanwall != nullptr)
{ {
if (dist < 80 && hitscanwall->overpicnum == MIRROR) if (dist < 80 && hitscanwall->overpicnum == DTILE_MIRROR)
if (hitscanwall->lotag > 0 && S_CheckSoundPlaying(hitscanwall->lotag) == 0 && snum == screenpeek) if (hitscanwall->lotag > 0 && S_CheckSoundPlaying(hitscanwall->lotag) == 0 && snum == screenpeek)
{ {
S_PlayActorSound(hitscanwall->lotag, pact); S_PlayActorSound(hitscanwall->lotag, pact);

View file

@ -61,14 +61,14 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
{ {
switch (act->spr.picnum) switch (act->spr.picnum)
{ {
case BOSS2STAYPUT: case DTILE_BOSS2STAYPUT:
case BOSS3STAYPUT: case DTILE_BOSS3STAYPUT:
case BOSS5STAYPUT: case DTILE_BOSS5STAYPUT:
act->actorstayput = act->sector(); act->actorstayput = act->sector();
[[fallthrough]]; [[fallthrough]];
case FIREFLY: case DTILE_FIREFLY:
case BOSS5: case DTILE_BOSS5:
if (act->spr.picnum != FIREFLY) if (act->spr.picnum != DTILE_FIREFLY)
{ {
if (actj && isrespawncontroller(actj)) if (actj && isrespawncontroller(actj))
act->spr.pal = actj->spr.pal; act->spr.pal = actj->spr.pal;
@ -114,12 +114,12 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, STAT_ZOMBIEACTOR); ChangeActorStat(act, STAT_ZOMBIEACTOR);
} }
return act; return act;
case FIREFLYFLYINGEFFECT: case DTILE_FIREFLYFLYINGEFFECT:
act->SetOwner(actj); act->SetOwner(actj);
ChangeActorStat(act, STAT_MISC); ChangeActorStat(act, STAT_MISC);
act->spr.scale = DVector2(0.25, 0.25); act->spr.scale = DVector2(0.25, 0.25);
return act; return act;
case LAVAPOOLBUBBLE: case DTILE_LAVAPOOLBUBBLE:
if (actj->spr.scale.X < 0.46875) if (actj->spr.scale.X < 0.46875)
return act; return act;
act->SetOwner(actj); act->SetOwner(actj);
@ -128,13 +128,13 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.pos.Y += krandf(32) - 16; act->spr.pos.Y += krandf(32) - 16;
act->spr.scale = DVector2(0.25, 0.25); act->spr.scale = DVector2(0.25, 0.25);
return act; return act;
case WHISPYSMOKE: case DTILE_WHISPYSMOKE:
ChangeActorStat(act, STAT_MISC); ChangeActorStat(act, STAT_MISC);
act->spr.pos.X += krandf(16) - 8; act->spr.pos.X += krandf(16) - 8;
act->spr.pos.Y += krandf(16) - 8; act->spr.pos.Y += krandf(16) - 8;
act->spr.scale = DVector2(0.3125, 0.3125); act->spr.scale = DVector2(0.3125, 0.3125);
return act; return act;
case SERIOUSSAM: case DTILE_SERIOUSSAM:
ChangeActorStat(act, STAT_ZOMBIEACTOR); ChangeActorStat(act, STAT_ZOMBIEACTOR);
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL; act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
act->spr.extra = 150; act->spr.extra = 150;
@ -151,19 +151,19 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.scale = DVector2(0, 0); act->spr.scale = DVector2(0, 0);
ChangeActorStat(act, STAT_MISC); ChangeActorStat(act, STAT_MISC);
break; break;
case TRANSPORTERSTAR: case DTILE_TRANSPORTERSTAR:
case TRANSPORTERBEAM: case DTILE_TRANSPORTERBEAM:
spawntransporter(actj, act, act->spr.picnum == TRANSPORTERBEAM); spawntransporter(actj, act, act->spr.picnum == DTILE_TRANSPORTERBEAM);
break; break;
case BLOOD: case DTILE_BLOOD:
act->spr.scale = DVector2(0.25, 0.25); act->spr.scale = DVector2(0.25, 0.25);
act->spr.pos.Z -= 26; act->spr.pos.Z -= 26;
if (actj && actj->spr.pal == 6) if (actj && actj->spr.pal == 6)
act->spr.pal = 6; act->spr.pal = 6;
ChangeActorStat(act, STAT_MISC); ChangeActorStat(act, STAT_MISC);
break; break;
case LAVAPOOL: case DTILE_LAVAPOOL:
if (!isWorldTour()) // Twentieth Anniversary World Tour if (!isWorldTour()) // Twentieth Anniversary World Tour
return act; return act;
@ -173,35 +173,35 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.pos.Z = getflorzofslopeptr(act->sector(), act->spr.pos) - 0.78125; act->spr.pos.Z = getflorzofslopeptr(act->sector(), act->spr.pos) - 0.78125;
[[fallthrough]]; [[fallthrough]];
case FECES: case DTILE_FECES:
if (actj) if (actj)
act->spr.scale = DVector2(REPEAT_SCALE, REPEAT_SCALE); act->spr.scale = DVector2(REPEAT_SCALE, REPEAT_SCALE);
ChangeActorStat(act, STAT_MISC); ChangeActorStat(act, STAT_MISC);
break; break;
case FEM1: case DTILE_FEM1:
case FEM2: case DTILE_FEM2:
case FEM3: case DTILE_FEM3:
case FEM4: case DTILE_FEM4:
case FEM5: case DTILE_FEM5:
case FEM6: case DTILE_FEM6:
case FEM7: case DTILE_FEM7:
case FEM8: case DTILE_FEM8:
case FEM9: case DTILE_FEM9:
case FEM10: case DTILE_FEM10:
case PODFEM1: case DTILE_PODFEM1:
case NAKED1: case DTILE_NAKED1:
case TOUGHGAL: case DTILE_TOUGHGAL:
if (act->spr.picnum == PODFEM1) act->spr.extra <<= 1; if (act->spr.picnum == DTILE_PODFEM1) act->spr.extra <<= 1;
[[fallthrough]]; [[fallthrough]];
case BLOODYPOLE: case DTILE_BLOODYPOLE:
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
act->clipdist = 8; act->clipdist = 8;
ChangeActorStat(act, STAT_ZOMBIEACTOR); ChangeActorStat(act, STAT_ZOMBIEACTOR);
break; break;
case DUKELYINGDEAD: case DTILE_DUKELYINGDEAD:
if (actj && actj->isPlayer()) if (actj && actj->isPlayer())
{ {
act->spr.scale = actj->spr.scale; act->spr.scale = actj->spr.scale;
@ -213,26 +213,26 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->vel.X = 292 / 16.; act->vel.X = 292 / 16.;
act->vel.Z = 360 / 256.; act->vel.Z = 360 / 256.;
[[fallthrough]]; [[fallthrough]];
case BLIMP: case DTILE_BLIMP:
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
act->clipdist = 32; act->clipdist = 32;
[[fallthrough]]; [[fallthrough]];
case MIKE: case DTILE_MIKE:
if (act->spr.picnum == MIKE) if (act->spr.picnum == DTILE_MIKE)
act->spr.yint = act->spr.hitag; act->spr.yint = act->spr.hitag;
ChangeActorStat(act, 1); ChangeActorStat(act, 1);
break; break;
case ONFIRE: case DTILE_ONFIRE:
// Twentieth Anniversary World Tour // Twentieth Anniversary World Tour
if (!isWorldTour()) if (!isWorldTour())
break; break;
[[fallthrough]]; [[fallthrough]];
case EXPLOSION2: case DTILE_EXPLOSION2:
case EXPLOSION2BOT: case DTILE_EXPLOSION2BOT:
case BURNING: case DTILE_BURNING:
case BURNING2: case DTILE_BURNING2:
case SMALLSMOKE: case DTILE_SMALLSMOKE:
case SHRINKEREXPLOSION: case DTILE_SHRINKEREXPLOSION:
if (actj) if (actj)
{ {
@ -241,21 +241,21 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.cstat = CSTAT_SPRITE_YCENTER | randomXFlip(); act->spr.cstat = CSTAT_SPRITE_YCENTER | randomXFlip();
} }
if (act->spr.picnum == EXPLOSION2 || act->spr.picnum == EXPLOSION2BOT) if (act->spr.picnum == DTILE_EXPLOSION2 || act->spr.picnum == DTILE_EXPLOSION2BOT)
{ {
act->spr.scale = DVector2(0.75, 0.75); act->spr.scale = DVector2(0.75, 0.75);
act->spr.shade = -127; act->spr.shade = -127;
act->spr.cstat |= CSTAT_SPRITE_YCENTER; act->spr.cstat |= CSTAT_SPRITE_YCENTER;
} }
else if (act->spr.picnum == SHRINKEREXPLOSION) else if (act->spr.picnum == DTILE_SHRINKEREXPLOSION)
{ {
act->spr.scale = DVector2(0.5, 0.5); act->spr.scale = DVector2(0.5, 0.5);
} }
else if (act->spr.picnum == SMALLSMOKE || act->spr.picnum == ONFIRE) else if (act->spr.picnum == DTILE_SMALLSMOKE || act->spr.picnum == DTILE_ONFIRE)
{ {
act->spr.scale = DVector2(0.375, 0.375); act->spr.scale = DVector2(0.375, 0.375);
} }
else if (act->spr.picnum == BURNING || act->spr.picnum == BURNING2) else if (act->spr.picnum == DTILE_BURNING || act->spr.picnum == DTILE_BURNING2)
{ {
act->spr.scale = DVector2(0.0625, 0.0625); act->spr.scale = DVector2(0.0625, 0.0625);
} }
@ -267,7 +267,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.pos.Z = x - 12; act->spr.pos.Z = x - 12;
} }
if (act->spr.picnum == ONFIRE) if (act->spr.picnum == DTILE_ONFIRE)
{ {
act->spr.pos.X += krandf(32) - 16; act->spr.pos.X += krandf(32) - 16;
act->spr.pos.Y += krandf(32) - 16; act->spr.pos.Y += krandf(32) - 16;
@ -279,7 +279,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
break; break;
case PLAYERONWATER: case DTILE_PLAYERONWATER:
if (actj) if (actj)
{ {
act->spr.scale = actj->spr.scale; act->spr.scale = actj->spr.scale;
@ -290,7 +290,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, STAT_DUMMYPLAYER); ChangeActorStat(act, STAT_DUMMYPLAYER);
break; break;
case APLAYER: case DTILE_APLAYER:
{ {
act->spr.scale = DVector2(0, 0); act->spr.scale = DVector2(0, 0);
int j = ud.coop; int j = ud.coop;
@ -302,10 +302,10 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, STAT_PLAYER); ChangeActorStat(act, STAT_PLAYER);
break; break;
} }
case WATERBUBBLE: case DTILE_WATERBUBBLE:
if (actj && actj->isPlayer()) if (actj && actj->isPlayer())
act->spr.pos.Z -= 16; act->spr.pos.Z -= 16;
if (act->spr.picnum == WATERBUBBLE) if (act->spr.picnum == DTILE_WATERBUBBLE)
{ {
if (actj) if (actj)
act->spr.Angles.Yaw = actj->spr.Angles.Yaw; act->spr.Angles.Yaw = actj->spr.Angles.Yaw;
@ -316,65 +316,65 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, STAT_MISC); ChangeActorStat(act, STAT_MISC);
break; break;
case WATERDRIPSPLASH: // ok case DTILE_WATERDRIPSPLASH: // ok
act->spr.scale = DVector2(0.375, 0.375); act->spr.scale = DVector2(0.375, 0.375);
ChangeActorStat(act, STAT_STANDABLE); ChangeActorStat(act, STAT_STANDABLE);
break; break;
case WATERBUBBLEMAKER: case DTILE_WATERBUBBLEMAKER:
if (act->spr.hitag && act->spr.picnum == WATERBUBBLEMAKER) if (act->spr.hitag && act->spr.picnum == DTILE_WATERBUBBLEMAKER)
{ // JBF 20030913: Pisses off move(), eg. in bobsp2 { // JBF 20030913: Pisses off move(), eg. in bobsp2
Printf(TEXTCOLOR_YELLOW "WARNING: WATERBUBBLEMAKER %d @ %d,%d with hitag!=0. Applying fixup.\n", act->GetIndex(), int(act->spr.pos.X), int(act->spr.pos.Y)); Printf(TEXTCOLOR_YELLOW "WARNING: DTILE_WATERBUBBLEMAKER %d @ %d,%d with hitag!=0. Applying fixup.\n", act->GetIndex(), int(act->spr.pos.X), int(act->spr.pos.Y));
act->spr.hitag = 0; act->spr.hitag = 0;
} }
act->spr.cstat |= CSTAT_SPRITE_INVISIBLE; act->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
ChangeActorStat(act, STAT_STANDABLE); ChangeActorStat(act, STAT_STANDABLE);
break; break;
case OCTABRAINSTAYPUT: case DTILE_OCTABRAINSTAYPUT:
case LIZTROOPSTAYPUT: case DTILE_LIZTROOPSTAYPUT:
case PIGCOPSTAYPUT: case DTILE_PIGCOPSTAYPUT:
case LIZMANSTAYPUT: case DTILE_LIZMANSTAYPUT:
case BOSS1STAYPUT: case DTILE_BOSS1STAYPUT:
case PIGCOPDIVE: case DTILE_PIGCOPDIVE:
case COMMANDERSTAYPUT: case DTILE_COMMANDERSTAYPUT:
case BOSS4STAYPUT: case DTILE_BOSS4STAYPUT:
act->actorstayput = act->sector(); act->actorstayput = act->sector();
[[fallthrough]]; [[fallthrough]];
case BOSS1: case DTILE_BOSS1:
case BOSS2: case DTILE_BOSS2:
case BOSS3: case DTILE_BOSS3:
case BOSS4: case DTILE_BOSS4:
case ROTATEGUN: case DTILE_ROTATEGUN:
case DRONE: case DTILE_DRONE:
case LIZTROOPONTOILET: case DTILE_LIZTROOPONTOILET:
case LIZTROOPJUSTSIT: case DTILE_LIZTROOPJUSTSIT:
case LIZTROOPSHOOT: case DTILE_LIZTROOPSHOOT:
case LIZTROOPJETPACK: case DTILE_LIZTROOPJETPACK:
case LIZTROOPDUCKING: case DTILE_LIZTROOPDUCKING:
case LIZTROOPRUNNING: case DTILE_LIZTROOPRUNNING:
case LIZTROOP: case DTILE_LIZTROOP:
case OCTABRAIN: case DTILE_OCTABRAIN:
case COMMANDER: case DTILE_COMMANDER:
case PIGCOP: case DTILE_PIGCOP:
case LIZMAN: case DTILE_LIZMAN:
case LIZMANSPITTING: case DTILE_LIZMANSPITTING:
case LIZMANFEEDING: case DTILE_LIZMANFEEDING:
case LIZMANJUMP: case DTILE_LIZMANJUMP:
case ORGANTIC: case DTILE_ORGANTIC:
case SHARK: case DTILE_SHARK:
if (act->spr.pal == 0) if (act->spr.pal == 0)
{ {
switch (act->spr.picnum) switch (act->spr.picnum)
{ {
case LIZTROOPONTOILET: case DTILE_LIZTROOPONTOILET:
case LIZTROOPSHOOT: case DTILE_LIZTROOPSHOOT:
case LIZTROOPJETPACK: case DTILE_LIZTROOPJETPACK:
case LIZTROOPDUCKING: case DTILE_LIZTROOPDUCKING:
case LIZTROOPRUNNING: case DTILE_LIZTROOPRUNNING:
case LIZTROOPSTAYPUT: case DTILE_LIZTROOPSTAYPUT:
case LIZTROOPJUSTSIT: case DTILE_LIZTROOPJUSTSIT:
case LIZTROOP: case DTILE_LIZTROOP:
act->spr.pal = 22; act->spr.pal = 22;
break; break;
} }
@ -397,7 +397,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
} }
else else
{ {
if (act->spr.picnum != SHARK) if (act->spr.picnum != DTILE_SHARK)
{ {
act->spr.scale = DVector2(0.625, 0.625); act->spr.scale = DVector2(0.625, 0.625);
act->clipdist = 20; act->clipdist = 20;
@ -422,10 +422,10 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
makeitfall(act); makeitfall(act);
act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
if (act->spr.picnum != SHARK) if (act->spr.picnum != DTILE_SHARK)
ps[myconnectindex].max_actors_killed++; ps[myconnectindex].max_actors_killed++;
if (act->spr.picnum == ORGANTIC) act->spr.cstat |= CSTAT_SPRITE_YCENTER; if (act->spr.picnum == DTILE_ORGANTIC) act->spr.cstat |= CSTAT_SPRITE_YCENTER;
if (actj) if (actj)
{ {
@ -436,48 +436,48 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
else ChangeActorStat(act, STAT_ZOMBIEACTOR); else ChangeActorStat(act, STAT_ZOMBIEACTOR);
} }
if (act->spr.picnum == ROTATEGUN) if (act->spr.picnum == DTILE_ROTATEGUN)
act->vel.Z = 0; act->vel.Z = 0;
break; break;
case FLAMETHROWERSPRITE: case DTILE_FLAMETHROWERSPRITE:
case FLAMETHROWERAMMO: // Twentieth Anniversary World Tour case DTILE_FLAMETHROWERAMMO: // Twentieth Anniversary World Tour
if (!isWorldTour()) if (!isWorldTour())
break; break;
[[fallthrough]]; [[fallthrough]];
case ATOMICHEALTH: case DTILE_ATOMICHEALTH:
case STEROIDS: case DTILE_STEROIDS:
case HEATSENSOR: case DTILE_HEATSENSOR:
case SHIELD: case DTILE_SHIELD:
case AIRTANK: case DTILE_AIRTANK:
case TRIPBOMBSPRITE: case DTILE_TRIPBOMBSPRITE:
case JETPACK: case DTILE_JETPACK:
case HOLODUKE: case DTILE_HOLODUKE:
case FIRSTGUNSPRITE: case DTILE_FIRSTGUNSPRITE:
case CHAINGUNSPRITE: case DTILE_CHAINGUNSPRITE:
case SHOTGUNSPRITE: case DTILE_SHOTGUNSPRITE:
case RPGSPRITE: case DTILE_RPGSPRITE:
case SHRINKERSPRITE: case DTILE_SHRINKERSPRITE:
case FREEZESPRITE: case DTILE_FREEZESPRITE:
case DEVISTATORSPRITE: case DTILE_DEVISTATORSPRITE:
case SHOTGUNAMMO: case DTILE_SHOTGUNAMMO:
case FREEZEAMMO: case DTILE_FREEZEAMMO:
case HBOMBAMMO: case DTILE_HBOMBAMMO:
case CRYSTALAMMO: case DTILE_CRYSTALAMMO:
case GROWAMMO: case DTILE_GROWAMMO:
case BATTERYAMMO: case DTILE_BATTERYAMMO:
case DEVISTATORAMMO: case DTILE_DEVISTATORAMMO:
case RPGAMMO: case DTILE_RPGAMMO:
case BOOTS: case DTILE_BOOTS:
case AMMO: case DTILE_AMMO:
case AMMOLOTS: case DTILE_AMMOLOTS:
case COLA: case DTILE_COLA:
case FIRSTAID: case DTILE_FIRSTAID:
case SIXPAK: case DTILE_SIXPAK:
if (actj) if (actj)
{ {
act->spr.lotag = 0; act->spr.lotag = 0;
@ -502,12 +502,12 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.pal = 0; act->spr.pal = 0;
[[fallthrough]]; [[fallthrough]];
case ACCESSCARD: case DTILE_ACCESSCARD:
if (act->spr.picnum == ATOMICHEALTH) if (act->spr.picnum == DTILE_ATOMICHEALTH)
act->spr.cstat |= CSTAT_SPRITE_YCENTER; act->spr.cstat |= CSTAT_SPRITE_YCENTER;
if (ud.multimode > 1 && ud.coop != 1 && act->spr.picnum == ACCESSCARD) if (ud.multimode > 1 && ud.coop != 1 && act->spr.picnum == DTILE_ACCESSCARD)
{ {
act->spr.scale = DVector2(0, 0); act->spr.scale = DVector2(0, 0);
ChangeActorStat(act, STAT_MISC); ChangeActorStat(act, STAT_MISC);
@ -515,7 +515,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
} }
else else
{ {
if (act->spr.picnum == AMMO) if (act->spr.picnum == DTILE_AMMO)
act->spr.scale = DVector2(0.25, 0.25); act->spr.scale = DVector2(0.25, 0.25);
else act->spr.scale = DVector2(0.5, 0.5); else act->spr.scale = DVector2(0.5, 0.5);
} }
@ -530,12 +530,12 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
} }
break; break;
case FLOORFLAME: case DTILE_FLOORFLAME:
act->spr.shade = -127; act->spr.shade = -127;
ChangeActorStat(act, STAT_STANDABLE); ChangeActorStat(act, STAT_STANDABLE);
break; break;
case STEAM: case DTILE_STEAM:
if (actj) if (actj)
{ {
act->spr.Angles.Yaw = actj->spr.Angles.Yaw; act->spr.Angles.Yaw = actj->spr.Angles.Yaw;
@ -545,7 +545,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ssp(act, CLIPMASK0); ssp(act, CLIPMASK0);
} }
[[fallthrough]]; [[fallthrough]];
case CEILINGSTEAM: case DTILE_CEILINGSTEAM:
ChangeActorStat(act, STAT_STANDABLE); ChangeActorStat(act, STAT_STANDABLE);
break; break;
@ -553,17 +553,17 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
spawneffector(act, actors); spawneffector(act, actors);
break; break;
case RUBBERCAN: case DTILE_RUBBERCAN:
act->spr.extra = 0; act->spr.extra = 0;
[[fallthrough]]; [[fallthrough]];
case EXPLODINGBARREL: case DTILE_EXPLODINGBARREL:
case HORSEONSIDE: case DTILE_HORSEONSIDE:
case FIREBARREL: case DTILE_FIREBARREL:
case NUKEBARREL: case DTILE_NUKEBARREL:
case FIREVASE: case DTILE_FIREVASE:
case NUKEBARRELDENTED: case DTILE_NUKEBARRELDENTED:
case NUKEBARRELLEAKED: case DTILE_NUKEBARRELLEAKED:
case WOODENHORSE: case DTILE_WOODENHORSE:
if (actj) if (actj)
act->spr.scale = DVector2(0.5, 0.5); act->spr.scale = DVector2(0.5, 0.5);
@ -573,15 +573,15 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
else act->SetOwner(act); else act->SetOwner(act);
[[fallthrough]]; [[fallthrough]];
case EGG: case DTILE_EGG:
if (ud.monsters_off == 1 && act->spr.picnum == EGG) if (ud.monsters_off == 1 && act->spr.picnum == DTILE_EGG)
{ {
act->spr.scale = DVector2(0, 0); act->spr.scale = DVector2(0, 0);
ChangeActorStat(act, STAT_MISC); ChangeActorStat(act, STAT_MISC);
} }
else else
{ {
if (act->spr.picnum == EGG) if (act->spr.picnum == DTILE_EGG)
{ {
act->clipdist = 6; act->clipdist = 6;
ps[connecthead].max_actors_killed++; ps[connecthead].max_actors_killed++;
@ -590,7 +590,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
ChangeActorStat(act, STAT_ZOMBIEACTOR); ChangeActorStat(act, STAT_ZOMBIEACTOR);
} }
break; break;
case TOILETWATER: case DTILE_TOILETWATER:
act->spr.shade = -16; act->spr.shade = -16;
ChangeActorStat(act, STAT_STANDABLE); ChangeActorStat(act, STAT_STANDABLE);
break; break;