Rename SPRITE_* flag enum constants to SFLAG_*, for consistency with CON.

git-svn-id: https://svn.eduke32.com/eduke32@4351 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-02-22 19:38:52 +00:00
parent 6f34193bb6
commit b8bd2069ea
8 changed files with 95 additions and 95 deletions

View file

@ -242,7 +242,7 @@ SKIPWALLCHECK:
if (s->picnum == RPG && sj->extra > 0) if (s->picnum == RPG && sj->extra > 0)
actor[j].picnum = RPG; actor[j].picnum = RPG;
else if (A_CheckSpriteFlags(i,SPRITE_PROJECTILE) && SpriteProjectile[i].workslike & PROJECTILE_RADIUS_PICNUM && sj->extra > 0) else if (A_CheckSpriteFlags(i,SFLAG_PROJECTILE) && SpriteProjectile[i].workslike & PROJECTILE_RADIUS_PICNUM && sj->extra > 0)
actor[j].picnum = s->picnum; actor[j].picnum = s->picnum;
else else
{ {
@ -400,7 +400,7 @@ static int32_t A_CheckNeedZUpdate(int32_t spritenum, int32_t changez, int32_t *d
// SE7-induced projectile teleportation. It doesn't look good // SE7-induced projectile teleportation. It doesn't look good
// with TROR water. // with TROR water.
actor[spritenum].flags |= SPRITE_DIDNOSE7WATER; actor[spritenum].flags |= SFLAG_DIDNOSE7WATER;
return -othersect-1; return -othersect-1;
} }
} }
@ -443,7 +443,7 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype)
clipdist = 1024; clipdist = 1024;
else if (spr->picnum == LIZMAN) else if (spr->picnum == LIZMAN)
clipdist = 292; clipdist = 292;
else if (A_CheckSpriteTileFlags(spr->picnum, SPRITE_BADGUY)) else if (A_CheckSpriteTileFlags(spr->picnum, SFLAG_BADGUY))
clipdist = spr->clipdist<<2; clipdist = spr->clipdist<<2;
else else
clipdist = 192; clipdist = 192;
@ -520,7 +520,7 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype)
// later, code checks for (retval&49152)!=49152 // later, code checks for (retval&49152)!=49152
// [i.e. not "was ceiling or floor hit", but "was no sprite hit"] // [i.e. not "was ceiling or floor hit", but "was no sprite hit"]
// and calls G_WeaponHitCeilingOrFloor() then, so we need to set // and calls G_WeaponHitCeilingOrFloor() then, so we need to set
// actor[].flags |= SPRITE_DIDNOSE7WATER in A_CheckNeedZUpdate() // actor[].flags |= SFLAG_DIDNOSE7WATER in A_CheckNeedZUpdate()
// previously. // previously.
// XXX: Why is this contrived data flow necessary? (If at all.) // XXX: Why is this contrived data flow necessary? (If at all.)
changespritesect(spritenum, -dozupdate-1); changespritesect(spritenum, -dozupdate-1);
@ -755,7 +755,7 @@ static int32_t move_rotfixed_sprite(int32_t j, int32_t pivotspr, int32_t daang)
{ {
if ((ROTFIXSPR_STATNUMP(sprite[j].statnum) || if ((ROTFIXSPR_STATNUMP(sprite[j].statnum) ||
((sprite[j].statnum==STAT_ACTOR || sprite[j].statnum==STAT_ZOMBIEACTOR) && ((sprite[j].statnum==STAT_ACTOR || sprite[j].statnum==STAT_ZOMBIEACTOR) &&
A_CheckSpriteTileFlags(sprite[j].picnum, SPRITE_ROTFIXED))) A_CheckSpriteTileFlags(sprite[j].picnum, SFLAG_ROTFIXED)))
&& actor[j].t_data[7]==(ROTFIXSPR_MAGIC|pivotspr)) && actor[j].t_data[7]==(ROTFIXSPR_MAGIC|pivotspr))
{ {
rotatepoint(0,0, actor[j].t_data[8],actor[j].t_data[9], daang&2047, &sprite[j].x,&sprite[j].y); rotatepoint(0,0, actor[j].t_data[8],actor[j].t_data[9], daang&2047, &sprite[j].x,&sprite[j].y);
@ -947,7 +947,7 @@ ACTOR_STATIC void G_MoveZombieActors(void)
case NUKEBARRELLEAKED__STATIC: case NUKEBARRELLEAKED__STATIC:
case TRIPBOMB__STATIC: case TRIPBOMB__STATIC:
// XXX: j is result of cansee() call. // XXX: j is result of cansee() call.
if (sector[s->sectnum].ceilingstat&1 && A_CheckSpriteFlags(j,SPRITE_NOSHADE) == 0) if (sector[s->sectnum].ceilingstat&1 && A_CheckSpriteFlags(j,SFLAG_NOSHADE) == 0)
s->shade = sector[s->sectnum].ceilingshade; s->shade = sector[s->sectnum].ceilingshade;
else s->shade = sector[s->sectnum].floorshade; else s->shade = sector[s->sectnum].floorshade;
@ -959,7 +959,7 @@ ACTOR_STATIC void G_MoveZombieActors(void)
CS |= 257; CS |= 257;
// fall-through // fall-through
default: default:
if (A_CheckSpriteFlags(i, SPRITE_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384) if (A_CheckSpriteFlags(i, SFLAG_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384)
break; break;
actor[i].timetosleep = 0; actor[i].timetosleep = 0;
A_PlayAlertSound(i); A_PlayAlertSound(i);
@ -971,7 +971,7 @@ ACTOR_STATIC void G_MoveZombieActors(void)
} }
} }
if (A_CheckEnemySprite(s) && A_CheckSpriteFlags(i,SPRITE_NOSHADE) == 0) if (A_CheckEnemySprite(s) && A_CheckSpriteFlags(i,SFLAG_NOSHADE) == 0)
{ {
if (sector[s->sectnum].ceilingstat&1) if (sector[s->sectnum].ceilingstat&1)
s->shade = sector[s->sectnum].ceilingshade; s->shade = sector[s->sectnum].ceilingshade;
@ -1053,7 +1053,7 @@ int32_t A_IncurDamage(int32_t sn)
break; break;
default: default:
if (A_CheckSpriteTileFlags(dmg->picnum, SPRITE_PROJECTILE) && (SpriteProjectile[sn].workslike & PROJECTILE_RPG)) if (A_CheckSpriteTileFlags(dmg->picnum, SFLAG_PROJECTILE) && (SpriteProjectile[sn].workslike & PROJECTILE_RPG))
P_Nudge(p, sn, 2); P_Nudge(p, sn, 2);
else P_Nudge(p, sn, 1); else P_Nudge(p, sn, 1);
break; break;
@ -2633,9 +2633,9 @@ static void A_DoProjectileEffects(int32_t i, const vec3_t *davect, int32_t do_ra
static void G_WeaponHitCeilingOrFloor(int32_t i, spritetype *s, int32_t *j) static void G_WeaponHitCeilingOrFloor(int32_t i, spritetype *s, int32_t *j)
{ {
if (actor[i].flags & SPRITE_DIDNOSE7WATER) if (actor[i].flags & SFLAG_DIDNOSE7WATER)
{ {
actor[i].flags &= ~SPRITE_DIDNOSE7WATER; actor[i].flags &= ~SFLAG_DIDNOSE7WATER;
return; return;
} }
@ -2965,7 +2965,7 @@ ACTOR_STATIC void G_MoveWeapons(void)
Bmemcpy(&actor[i].bpos, s, sizeof(vec3_t)); Bmemcpy(&actor[i].bpos, s, sizeof(vec3_t));
/* Custom projectiles */ /* Custom projectiles */
if (A_CheckSpriteFlags(i, SPRITE_PROJECTILE)) if (A_CheckSpriteFlags(i, SFLAG_PROJECTILE))
{ {
Proj_MoveCustom(i); Proj_MoveCustom(i);
goto BOLT; goto BOLT;
@ -3379,7 +3379,7 @@ static int32_t A_CheckNonTeleporting(int32_t s)
{ {
int32_t pic = sprite[s].picnum; int32_t pic = sprite[s].picnum;
if (A_CheckSpriteFlags(s, SPRITE_NOTELEPORT)) return 1; if (A_CheckSpriteFlags(s, SFLAG_NOTELEPORT)) return 1;
return (pic == SHARK || pic == COMMANDER || pic == OCTABRAIN return (pic == SHARK || pic == COMMANDER || pic == OCTABRAIN
|| (pic >= GREENSLIME && pic <= GREENSLIME+7)); || (pic >= GREENSLIME && pic <= GREENSLIME+7));
@ -3546,7 +3546,7 @@ ACTOR_STATIC void G_MoveTransports(void)
if (warpspriteto) if (warpspriteto)
{ {
if (A_CheckSpriteFlags(j,SPRITE_DECAL)) if (A_CheckSpriteFlags(j,SFLAG_DECAL))
goto JBOLT; goto JBOLT;
switch (DYNAMICTILEMAP(sprite[j].picnum)) switch (DYNAMICTILEMAP(sprite[j].picnum))
@ -6397,7 +6397,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
for (SPRITES_OF_SECT(SECT, j)) for (SPRITES_OF_SECT(SECT, j))
{ {
if (sprite[j].cstat&16 && A_CheckSpriteFlags(j,SPRITE_NOSHADE) == 0) if (sprite[j].cstat&16 && A_CheckSpriteFlags(j,SFLAG_NOSHADE) == 0)
{ {
if (sc->ceilingstat&1) if (sc->ceilingstat&1)
sprite[j].shade = sc->ceilingshade; sprite[j].shade = sc->ceilingshade;
@ -6673,7 +6673,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
for (SPRITES_OF_SECT(SECT, j)) for (SPRITES_OF_SECT(SECT, j))
{ {
if (sprite[j].cstat&16 && A_CheckSpriteFlags(j,SPRITE_NOSHADE) == 0) if (sprite[j].cstat&16 && A_CheckSpriteFlags(j,SFLAG_NOSHADE) == 0)
{ {
if (sc->ceilingstat&1) if (sc->ceilingstat&1)
sprite[j].shade = sc->ceilingshade; sprite[j].shade = sc->ceilingshade;
@ -6708,7 +6708,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
{ {
if (sprite[j].cstat&16) if (sprite[j].cstat&16)
{ {
if (sc->ceilingstat&1 && A_CheckSpriteFlags(j,SPRITE_NOSHADE) == 0) if (sc->ceilingstat&1 && A_CheckSpriteFlags(j,SFLAG_NOSHADE) == 0)
sprite[j].shade = sc->ceilingshade; sprite[j].shade = sc->ceilingshade;
else sprite[j].shade = sc->floorshade; else sprite[j].shade = sc->floorshade;
} }
@ -7821,8 +7821,8 @@ static void G_DoEffectorLights(void) // STATNUM 14
#ifdef POLYMER #ifdef POLYMER
case SE_49_POINT_LIGHT: case SE_49_POINT_LIGHT:
{ {
if (!A_CheckSpriteFlags(i, SPRITE_NOLIGHT) && getrendermode() == REND_POLYMER && if (!A_CheckSpriteFlags(i, SFLAG_NOLIGHT) && getrendermode() == REND_POLYMER &&
!(A_CheckSpriteFlags(i, SPRITE_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384)) !(A_CheckSpriteFlags(i, SFLAG_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384))
{ {
if (actor[i].lightptr == NULL) if (actor[i].lightptr == NULL)
{ {
@ -7887,8 +7887,8 @@ static void G_DoEffectorLights(void) // STATNUM 14
} }
case SE_50_SPOT_LIGHT: case SE_50_SPOT_LIGHT:
{ {
if (!A_CheckSpriteFlags(i, SPRITE_NOLIGHT) && getrendermode() == REND_POLYMER && if (!A_CheckSpriteFlags(i, SFLAG_NOLIGHT) && getrendermode() == REND_POLYMER &&
!(A_CheckSpriteFlags(i, SPRITE_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384)) !(A_CheckSpriteFlags(i, SFLAG_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384))
{ {
if (actor[i].lightptr == NULL) if (actor[i].lightptr == NULL)
{ {
@ -7991,8 +7991,8 @@ static void A_DoLight(int32_t i)
spritetype *const s = &sprite[i]; spritetype *const s = &sprite[i];
int32_t numsavedfires = 0; int32_t numsavedfires = 0;
if ((sprite[i].picnum != SECTOREFFECTOR && ((s->cstat & 32768) || s->yrepeat < 4)) || A_CheckSpriteFlags(i, SPRITE_NOLIGHT) || if ((sprite[i].picnum != SECTOREFFECTOR && ((s->cstat & 32768) || s->yrepeat < 4)) || A_CheckSpriteFlags(i, SFLAG_NOLIGHT) ||
(A_CheckSpriteFlags(i, SPRITE_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384)) (A_CheckSpriteFlags(i, SFLAG_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384))
{ {
if (actor[i].lightptr != NULL) if (actor[i].lightptr != NULL)
A_DeleteLight(i); A_DeleteLight(i);
@ -8033,7 +8033,7 @@ static void A_DoLight(int32_t i)
int32_t dx = sintable[(s->ang+512)&2047]; int32_t dx = sintable[(s->ang+512)&2047];
int32_t dy = sintable[(s->ang)&2047]; int32_t dy = sintable[(s->ang)&2047];
if ((s->cstat & 32768) || A_CheckSpriteFlags(i, SPRITE_NOLIGHT)) if ((s->cstat & 32768) || A_CheckSpriteFlags(i, SFLAG_NOLIGHT))
{ {
if (actor[i].lightptr != NULL) if (actor[i].lightptr != NULL)
A_DeleteLight(i); A_DeleteLight(i);
@ -8264,7 +8264,7 @@ void A_PlayAlertSound(int32_t i)
int32_t A_CheckEnemyTile(int32_t pn) int32_t A_CheckEnemyTile(int32_t pn)
{ {
return ((g_tile[pn].flags & (SPRITE_HARDCODED_BADGUY|SPRITE_BADGUY)) != 0); return ((g_tile[pn].flags & (SFLAG_HARDCODED_BADGUY|SFLAG_BADGUY)) != 0);
} }
int32_t A_CheckSwitchTile(int32_t i) int32_t A_CheckSwitchTile(int32_t i)
@ -8326,7 +8326,7 @@ void G_MoveWorld(void)
{ {
const int32_t j = nextspritestat[i]; const int32_t j = nextspritestat[i];
if (!G_HaveEvent(EVENT_PREGAME) || A_CheckSpriteFlags(i, SPRITE_NOEVENTCODE)) if (!G_HaveEvent(EVENT_PREGAME) || A_CheckSpriteFlags(i, SFLAG_NOEVENTCODE))
{ {
i = j; i = j;
continue; continue;
@ -8380,7 +8380,7 @@ void G_MoveWorld(void)
if (getrendermode() == REND_POLYMER) if (getrendermode() == REND_POLYMER)
A_DoLight(i); A_DoLight(i);
#endif #endif
if (!G_HaveEvent(EVENT_GAME) || A_CheckSpriteFlags(i, SPRITE_NOEVENTCODE)) if (!G_HaveEvent(EVENT_GAME) || A_CheckSpriteFlags(i, SFLAG_NOEVENTCODE))
{ {
i = j; i = j;
continue; continue;

View file

@ -241,28 +241,28 @@ typedef struct {
// KEEPINSYNC lunatic/con_lang.lua // KEEPINSYNC lunatic/con_lang.lua
enum sflags_t { enum sflags_t {
SPRITE_SHADOW = 0x00000001, SFLAG_SHADOW = 0x00000001,
SPRITE_NVG = 0x00000002, SFLAG_NVG = 0x00000002,
SPRITE_NOSHADE = 0x00000004, SFLAG_NOSHADE = 0x00000004,
SPRITE_PROJECTILE = 0x00000008, SFLAG_PROJECTILE = 0x00000008,
SPRITE_DECAL = 0x00000010, SFLAG_DECAL = 0x00000010,
SPRITE_BADGUY = 0x00000020, SFLAG_BADGUY = 0x00000020,
SPRITE_NOPAL = 0x00000040, SFLAG_NOPAL = 0x00000040,
SPRITE_NOEVENTCODE = 0x00000080, SFLAG_NOEVENTCODE = 0x00000080,
SPRITE_NOLIGHT = 0x00000100, SFLAG_NOLIGHT = 0x00000100,
SPRITE_USEACTIVATOR = 0x00000200, SFLAG_USEACTIVATOR = 0x00000200,
SPRITE_NULL = 0x00000400, // null sprite in multiplayer SFLAG_NULL = 0x00000400, // null sprite in multiplayer
SPRITE_NOCLIP = 0x00000800, // clipmove it with cliptype 0 SFLAG_NOCLIP = 0x00000800, // clipmove it with cliptype 0
SPRITE_NOFLOORSHADOW = 0x00001000, // for temp. internal use, per-tile flag not checked SFLAG_NOFLOORSHADOW = 0x00001000, // for temp. internal use, per-tile flag not checked
SPRITE_SMOOTHMOVE = 0x00002000, SFLAG_SMOOTHMOVE = 0x00002000,
SPRITE_NOTELEPORT = 0x00004000, SFLAG_NOTELEPORT = 0x00004000,
SPRITE_BADGUYSTAYPUT = 0x00008000, SFLAG_BADGUYSTAYPUT = 0x00008000,
SPRITE_CACHE = 0x00010000, SFLAG_CACHE = 0x00010000,
// rotation-fixed wrt a pivot point to prevent position diverging due to // rotation-fixed wrt a pivot point to prevent position diverging due to
// roundoff error accumulation: // roundoff error accumulation:
SPRITE_ROTFIXED = 0x00020000, SFLAG_ROTFIXED = 0x00020000,
SPRITE_HARDCODED_BADGUY = 0x00040000, SFLAG_HARDCODED_BADGUY = 0x00040000,
SPRITE_DIDNOSE7WATER = 0x00080000, // used temporarily SFLAG_DIDNOSE7WATER = 0x00080000, // used temporarily
}; };
// Custom projectiles "workslike" flags. // Custom projectiles "workslike" flags.

View file

@ -5128,7 +5128,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
if (sp->xrepeat == 0 || sp->yrepeat == 0) if (sp->xrepeat == 0 || sp->yrepeat == 0)
sp->xrepeat = sp->yrepeat = 1; sp->xrepeat = sp->yrepeat = 1;
if (A_CheckSpriteTileFlags(sp->picnum, SPRITE_BADGUY)) if (A_CheckSpriteTileFlags(sp->picnum, SFLAG_BADGUY))
{ {
if (ud.monsters_off == 1) if (ud.monsters_off == 1)
{ {
@ -5139,7 +5139,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
A_Fall(i); A_Fall(i);
if (A_CheckSpriteTileFlags(sp->picnum, SPRITE_BADGUYSTAYPUT)) if (A_CheckSpriteTileFlags(sp->picnum, SFLAG_BADGUYSTAYPUT))
actor[i].actorstayput = sp->sectnum; actor[i].actorstayput = sp->sectnum;
g_player[myconnectindex].ps->max_actors_killed++; g_player[myconnectindex].ps->max_actors_killed++;
@ -6356,7 +6356,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
for (TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], j, nextj)) for (TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], j, nextj))
if (sprite[j].picnum == ACTIVATOR || sprite[j].picnum == ACTIVATORLOCKED) if (sprite[j].picnum == ACTIVATOR || sprite[j].picnum == ACTIVATORLOCKED)
actor[i].flags |= SPRITE_USEACTIVATOR; actor[i].flags |= SFLAG_USEACTIVATOR;
} }
changespritestat(i, sp->lotag==46 ? STAT_EFFECTOR : STAT_LIGHT); changespritestat(i, sp->lotag==46 ? STAT_EFFECTOR : STAT_LIGHT);
goto SPAWN_END; goto SPAWN_END;
@ -6988,7 +6988,7 @@ static int32_t G_MaybeTakeOnFloorPal(spritetype *datspr, int32_t sect)
if (dapal && g_firstFogPal && !(dapal >= g_firstFogPal && dapal <= g_firstFogPal+3) if (dapal && g_firstFogPal && !(dapal >= g_firstFogPal && dapal <= g_firstFogPal+3)
&& !g_noFloorPal[dapal] && !g_noFloorPal[dapal]
&& !A_CheckSpriteFlags(datspr->owner,SPRITE_NOPAL)) && !A_CheckSpriteFlags(datspr->owner,SFLAG_NOPAL))
{ {
datspr->pal = dapal; datspr->pal = dapal;
return 1; return 1;
@ -7161,7 +7161,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
const spritetype *const s = &sprite[i]; const spritetype *const s = &sprite[i];
/* /*
if (A_CheckSpriteFlags(i, SPRITE_NULL)) if (A_CheckSpriteFlags(i, SFLAG_NULL))
{ {
t->xrepeat = t->yrepeat = 0; t->xrepeat = t->yrepeat = 0;
continue; continue;
@ -7234,7 +7234,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
continue; continue;
} }
if (A_CheckSpriteFlags(t->owner, SPRITE_NOSHADE) || (t->cstat&CSTAT_SPRITE_NOSHADE)) if (A_CheckSpriteFlags(t->owner, SFLAG_NOSHADE) || (t->cstat&CSTAT_SPRITE_NOSHADE))
l = sprite[t->owner].shade; l = sprite[t->owner].shade;
else else
{ {
@ -7751,14 +7751,14 @@ skip:
// player has nightvision on. We should pass stuff like "from which player is this view // player has nightvision on. We should pass stuff like "from which player is this view
// supposed to be" as parameters ("drawing context") instead of relying on globals. // supposed to be" as parameters ("drawing context") instead of relying on globals.
if (g_player[screenpeek].ps->inv_amount[GET_HEATS] > 0 && g_player[screenpeek].ps->heat_on && if (g_player[screenpeek].ps->inv_amount[GET_HEATS] > 0 && g_player[screenpeek].ps->heat_on &&
(A_CheckEnemySprite(s) || A_CheckSpriteFlags(t->owner,SPRITE_NVG) || s->picnum == APLAYER || s->statnum == STAT_DUMMYPLAYER)) (A_CheckEnemySprite(s) || A_CheckSpriteFlags(t->owner,SFLAG_NVG) || s->picnum == APLAYER || s->statnum == STAT_DUMMYPLAYER))
{ {
t->pal = 6; t->pal = 6;
t->shade = 0; t->shade = 0;
} }
// Fake floor shadow, implemented by inserting a new tsprite. // Fake floor shadow, implemented by inserting a new tsprite.
if (s->statnum == STAT_DUMMYPLAYER || A_CheckEnemySprite(s) || A_CheckSpriteFlags(t->owner,SPRITE_SHADOW) || (s->picnum == APLAYER && s->owner >= 0)) if (s->statnum == STAT_DUMMYPLAYER || A_CheckEnemySprite(s) || A_CheckSpriteFlags(t->owner,SFLAG_SHADOW) || (s->picnum == APLAYER && s->owner >= 0))
if (t->statnum != TSPR_TEMP && s->picnum != EXPLOSION2 && s->picnum != HANGLIGHT && s->picnum != DOMELITE && s->picnum != HOTMEAT) if (t->statnum != TSPR_TEMP && s->picnum != EXPLOSION2 && s->picnum != HANGLIGHT && s->picnum != DOMELITE && s->picnum != HOTMEAT)
{ {
if (actor[i].dispicnum < 0) if (actor[i].dispicnum < 0)
@ -7772,7 +7772,7 @@ skip:
continue; continue;
} }
if (actor[i].flags & SPRITE_NOFLOORSHADOW) if (actor[i].flags & SFLAG_NOFLOORSHADOW)
continue; continue;
if (ud.shadows && spritesortcnt < (MAXSPRITESONSCREEN-2) && getrendermode() != REND_POLYMER) if (ud.shadows && spritesortcnt < (MAXSPRITESONSCREEN-2) && getrendermode() != REND_POLYMER)
@ -10653,7 +10653,7 @@ static void G_LoadExtraPalettes(void)
Bmemset(&slime_pal[255*3], 0, 3); Bmemset(&slime_pal[255*3], 0, 3);
} }
#define SETBGFLAG(Tilenum) g_tile[Tilenum].flags |= SPRITE_HARDCODED_BADGUY #define SETBGFLAG(Tilenum) g_tile[Tilenum].flags |= SFLAG_HARDCODED_BADGUY
// Has to be after setting the dynamic names (e.g. SHARK). // Has to be after setting the dynamic names (e.g. SHARK).
static void A_InitEnemyFlags(void) static void A_InitEnemyFlags(void)

View file

@ -2346,7 +2346,7 @@ LUNATIC_EXTERN void C_DefineProjectile(int32_t j, int32_t what, int32_t val)
default: break; default: break;
} }
g_tile[j].flags |= SPRITE_PROJECTILE; g_tile[j].flags |= SFLAG_PROJECTILE;
} }
int32_t C_AllocQuote(int32_t qnum) int32_t C_AllocQuote(int32_t qnum)
@ -3240,13 +3240,13 @@ static int32_t C_ParseCommand(int32_t loop)
if (tw == CON_USERACTOR) if (tw == CON_USERACTOR)
{ {
if (j & 1) if (j & 1)
g_tile[*g_scriptPtr].flags |= SPRITE_BADGUY; g_tile[*g_scriptPtr].flags |= SFLAG_BADGUY;
if (j & 2) if (j & 2)
g_tile[*g_scriptPtr].flags |= (SPRITE_BADGUY|SPRITE_BADGUYSTAYPUT); g_tile[*g_scriptPtr].flags |= (SFLAG_BADGUY|SFLAG_BADGUYSTAYPUT);
if (j & 4) if (j & 4)
g_tile[*g_scriptPtr].flags |= SPRITE_ROTFIXED; g_tile[*g_scriptPtr].flags |= SFLAG_ROTFIXED;
} }
for (j=0; j<4; j++) for (j=0; j<4; j++)
@ -4604,16 +4604,16 @@ static int32_t C_ParseCommand(int32_t loop)
switch (tw) switch (tw)
{ {
case CON_SPRITESHADOW: case CON_SPRITESHADOW:
g_tile[*g_scriptPtr].flags |= SPRITE_SHADOW; g_tile[*g_scriptPtr].flags |= SFLAG_SHADOW;
break; break;
case CON_SPRITENVG: case CON_SPRITENVG:
g_tile[*g_scriptPtr].flags |= SPRITE_NVG; g_tile[*g_scriptPtr].flags |= SFLAG_NVG;
break; break;
case CON_SPRITENOSHADE: case CON_SPRITENOSHADE:
g_tile[*g_scriptPtr].flags |= SPRITE_NOSHADE; g_tile[*g_scriptPtr].flags |= SFLAG_NOSHADE;
break; break;
case CON_SPRITENOPAL: case CON_SPRITENOPAL:
g_tile[*g_scriptPtr].flags |= SPRITE_NOPAL; g_tile[*g_scriptPtr].flags |= SFLAG_NOPAL;
break; break;
case CON_PRECACHE: case CON_PRECACHE:
C_GetNextValue(LABEL_DEFINE); C_GetNextValue(LABEL_DEFINE);
@ -4629,7 +4629,7 @@ static int32_t C_ParseCommand(int32_t loop)
C_GetNextValue(LABEL_DEFINE); C_GetNextValue(LABEL_DEFINE);
g_scriptPtr--; g_scriptPtr--;
if (*g_scriptPtr) if (*g_scriptPtr)
g_tile[j].flags |= SPRITE_CACHE; g_tile[j].flags |= SFLAG_CACHE;
break; break;
} }
@ -6159,17 +6159,17 @@ static void C_AddDefaultDefinitions(void)
C_AddDefinition("STAT_DUMMYPLAYER", STAT_DUMMYPLAYER, LABEL_DEFINE); C_AddDefinition("STAT_DUMMYPLAYER", STAT_DUMMYPLAYER, LABEL_DEFINE);
C_AddDefinition("STAT_LIGHT", STAT_LIGHT, LABEL_DEFINE); C_AddDefinition("STAT_LIGHT", STAT_LIGHT, LABEL_DEFINE);
C_AddDefinition("SFLAG_SHADOW", SPRITE_SHADOW, LABEL_DEFINE); C_AddDefinition("SFLAG_SHADOW", SFLAG_SHADOW, LABEL_DEFINE);
C_AddDefinition("SFLAG_NVG", SPRITE_NVG, LABEL_DEFINE); C_AddDefinition("SFLAG_NVG", SFLAG_NVG, LABEL_DEFINE);
C_AddDefinition("SFLAG_NOSHADE", SPRITE_NOSHADE, LABEL_DEFINE); C_AddDefinition("SFLAG_NOSHADE", SFLAG_NOSHADE, LABEL_DEFINE);
C_AddDefinition("SFLAG_BADGUY", SPRITE_BADGUY, LABEL_DEFINE); C_AddDefinition("SFLAG_BADGUY", SFLAG_BADGUY, LABEL_DEFINE);
C_AddDefinition("SFLAG_NOPAL", SPRITE_NOPAL, LABEL_DEFINE); C_AddDefinition("SFLAG_NOPAL", SFLAG_NOPAL, LABEL_DEFINE);
C_AddDefinition("SFLAG_NOEVENTS", SPRITE_NOEVENTCODE, LABEL_DEFINE); C_AddDefinition("SFLAG_NOEVENTS", SFLAG_NOEVENTCODE, LABEL_DEFINE);
C_AddDefinition("SFLAG_NOLIGHT", SPRITE_NOLIGHT, LABEL_DEFINE); C_AddDefinition("SFLAG_NOLIGHT", SFLAG_NOLIGHT, LABEL_DEFINE);
C_AddDefinition("SFLAG_USEACTIVATOR", SPRITE_USEACTIVATOR, LABEL_DEFINE); C_AddDefinition("SFLAG_USEACTIVATOR", SFLAG_USEACTIVATOR, LABEL_DEFINE);
C_AddDefinition("SFLAG_NOCLIP", SPRITE_NOCLIP, LABEL_DEFINE); C_AddDefinition("SFLAG_NOCLIP", SFLAG_NOCLIP, LABEL_DEFINE);
C_AddDefinition("SFLAG_SMOOTHMOVE", SPRITE_SMOOTHMOVE, LABEL_DEFINE); C_AddDefinition("SFLAG_SMOOTHMOVE", SFLAG_SMOOTHMOVE, LABEL_DEFINE);
C_AddDefinition("SFLAG_NOTELEPORT", SPRITE_NOTELEPORT, LABEL_DEFINE); C_AddDefinition("SFLAG_NOTELEPORT", SFLAG_NOTELEPORT, LABEL_DEFINE);
C_AddDefinition("STR_MAPNAME",STR_MAPNAME,LABEL_DEFINE); C_AddDefinition("STR_MAPNAME",STR_MAPNAME,LABEL_DEFINE);
C_AddDefinition("STR_MAPFILENAME",STR_MAPFILENAME,LABEL_DEFINE); C_AddDefinition("STR_MAPFILENAME",STR_MAPFILENAME,LABEL_DEFINE);

View file

@ -348,7 +348,7 @@ void A_GetZLimits(int32_t iActor)
s->cstat = cstat; s->cstat = cstat;
actor[iActor].flags &= ~SPRITE_NOFLOORSHADOW; actor[iActor].flags &= ~SFLAG_NOFLOORSHADOW;
if ((lz&49152) == 49152 && (sprite[lz&(MAXSPRITES-1)].cstat&48) == 0) if ((lz&49152) == 49152 && (sprite[lz&(MAXSPRITES-1)].cstat&48) == 0)
{ {
@ -359,7 +359,7 @@ void A_GetZLimits(int32_t iActor)
if ((A_CheckEnemySprite(hitspr) && hitspr->pal != 1 && s->statnum != STAT_PROJECTILE) if ((A_CheckEnemySprite(hitspr) && hitspr->pal != 1 && s->statnum != STAT_PROJECTILE)
|| (hitspr->picnum == APLAYER && A_CheckEnemySprite(s))) || (hitspr->picnum == APLAYER && A_CheckEnemySprite(s)))
{ {
actor[iActor].flags |= SPRITE_NOFLOORSHADOW; // No shadows on actors actor[iActor].flags |= SFLAG_NOFLOORSHADOW; // No shadows on actors
s->xvel = -256; s->xvel = -256;
A_SetSprite(iActor,CLIPMASK0); A_SetSprite(iActor,CLIPMASK0);
} }
@ -772,7 +772,7 @@ dead:
if (ps->actorsqu == vm.g_i) if (ps->actorsqu == vm.g_i)
return; return;
if (!A_CheckSpriteFlags(vm.g_i, SPRITE_SMOOTHMOVE)) if (!A_CheckSpriteFlags(vm.g_i, SFLAG_SMOOTHMOVE))
{ {
if (AC_COUNT(vm.g_t)&1) if (AC_COUNT(vm.g_t)&1)
return; return;
@ -788,7 +788,7 @@ dead:
}; };
actor[vm.g_i].movflag = A_MoveSprite( actor[vm.g_i].movflag = A_MoveSprite(
vm.g_i,&tmpvect, (A_CheckSpriteFlags(vm.g_i, SPRITE_NOCLIP) ? 0 : CLIPMASK0)); vm.g_i,&tmpvect, (A_CheckSpriteFlags(vm.g_i, SFLAG_NOCLIP) ? 0 : CLIPMASK0));
} }
} }
@ -5338,7 +5338,7 @@ void A_Execute(int32_t iActor, int32_t iPlayer, int32_t lDist)
}; };
/* /*
if (g_netClient && A_CheckSpriteFlags(iActor, SPRITE_NULL)) if (g_netClient && A_CheckSpriteFlags(iActor, SFLAG_NULL))
{ {
A_DeleteSprite(iActor); A_DeleteSprite(iActor);
return; return;
@ -5461,7 +5461,7 @@ void A_Execute(int32_t iActor, int32_t iPlayer, int32_t lDist)
} }
else if (ud.respawn_items == 1 && (vm.g_sp->cstat&32768)) return; else if (ud.respawn_items == 1 && (vm.g_sp->cstat&32768)) return;
if (A_CheckSpriteFlags(vm.g_i, SPRITE_USEACTIVATOR) && sector[vm.g_sp->sectnum].lotag & 16384) if (A_CheckSpriteFlags(vm.g_i, SFLAG_USEACTIVATOR) && sector[vm.g_sp->sectnum].lotag & 16384)
changespritestat(vm.g_i, STAT_ZOMBIEACTOR); changespritestat(vm.g_i, STAT_ZOMBIEACTOR);
else if (actor[vm.g_i].timetosleep > 1) else if (actor[vm.g_i].timetosleep > 1)
actor[vm.g_i].timetosleep--; actor[vm.g_i].timetosleep--;

View file

@ -208,7 +208,7 @@ static int32_t A_FindTargetSprite(const spritetype *s, int32_t aang, int32_t atw
if (g_player[snum].ps->auto_aim == 2) if (g_player[snum].ps->auto_aim == 2)
{ {
if (A_CheckSpriteTileFlags(atwith,SPRITE_PROJECTILE) && (ProjectileData[atwith].workslike & PROJECTILE_RPG)) if (A_CheckSpriteTileFlags(atwith,SFLAG_PROJECTILE) && (ProjectileData[atwith].workslike & PROJECTILE_RPG))
return -1; return -1;
switch (DYNAMICTILEMAP(atwith)) switch (DYNAMICTILEMAP(atwith))
@ -720,8 +720,8 @@ static int32_t P_PostFireHitscan(int32_t p, int32_t k, hitdata_t *hit, int32_t i
{ {
l = A_Spawn(k, decaltile); l = A_Spawn(k, decaltile);
if (!A_CheckSpriteFlags(l, SPRITE_DECAL)) if (!A_CheckSpriteFlags(l, SFLAG_DECAL))
actor[l].flags |= SPRITE_DECAL; actor[l].flags |= SFLAG_DECAL;
sprite[l].xvel = -1; sprite[l].xvel = -1;
sprite[l].ang = getangle(hitwal->x-wall[hitwal->point2].x, sprite[l].ang = getangle(hitwal->x-wall[hitwal->point2].x,
@ -1062,8 +1062,8 @@ static int32_t A_ShootCustom(const int32_t i, const int32_t atwith, int16_t sa,
{ {
k = A_Spawn(i, proj->decal); k = A_Spawn(i, proj->decal);
if (!A_CheckSpriteFlags(k, SPRITE_DECAL)) if (!A_CheckSpriteFlags(k, SFLAG_DECAL))
actor[k].flags |= SPRITE_DECAL; actor[k].flags |= SFLAG_DECAL;
sprite[k].xvel = -1; sprite[k].xvel = -1;
sprite[k].ang = getangle(hitwal->x - wall[hitwal->point2].x, sprite[k].ang = getangle(hitwal->x - wall[hitwal->point2].x,
@ -1169,7 +1169,7 @@ int32_t A_ShootWithZvel(int32_t i, int32_t atwith, int32_t override_zvel)
#endif // POLYMER #endif // POLYMER
} }
if (A_CheckSpriteTileFlags(atwith, SPRITE_PROJECTILE)) if (A_CheckSpriteTileFlags(atwith, SFLAG_PROJECTILE))
return A_ShootCustom(i, atwith, sa, &srcvect); return A_ShootCustom(i, atwith, sa, &srcvect);
else else
{ {

View file

@ -217,10 +217,10 @@ static void G_PrecacheSprites(void)
for (i=0; i<MAXTILES; i++) for (i=0; i<MAXTILES; i++)
{ {
if (g_tile[i].flags & SPRITE_PROJECTILE) if (g_tile[i].flags & SFLAG_PROJECTILE)
tloadtile(i,1); tloadtile(i,1);
if (A_CheckSpriteTileFlags(i, SPRITE_CACHE)) if (A_CheckSpriteTileFlags(i, SFLAG_CACHE))
for (j = i; j <= g_tile[i].cacherange; j++) for (j = i; j <= g_tile[i].cacherange; j++)
tloadtile(j,1); tloadtile(j,1);
} }
@ -977,7 +977,7 @@ static void G_SetupRotfixedSprites(void)
// too useful with moving sectors anyway // too useful with moving sectors anyway
if ((ROTFIXSPR_STATNUMP(sprite[j].statnum) && sprite[j].picnum!=TRIPBOMB) || if ((ROTFIXSPR_STATNUMP(sprite[j].statnum) && sprite[j].picnum!=TRIPBOMB) ||
((sprite[j].statnum==STAT_ACTOR || sprite[j].statnum==STAT_ZOMBIEACTOR) && ((sprite[j].statnum==STAT_ACTOR || sprite[j].statnum==STAT_ZOMBIEACTOR) &&
A_CheckSpriteTileFlags(sprite[j].picnum, SPRITE_ROTFIXED))) A_CheckSpriteTileFlags(sprite[j].picnum, SFLAG_ROTFIXED)))
{ {
int32_t pivot = i; int32_t pivot = i;

View file

@ -1497,7 +1497,7 @@ void A_DamageWall(int32_t spr, int32_t dawallnum, const vec3_t *pos, int32_t atw
walltype *wal = &wall[dawallnum]; walltype *wal = &wall[dawallnum];
if (wal->overpicnum == MIRROR && wal->pal != 4 && if (wal->overpicnum == MIRROR && wal->pal != 4 &&
A_CheckSpriteTileFlags(atwith,SPRITE_PROJECTILE) && A_CheckSpriteTileFlags(atwith,SFLAG_PROJECTILE) &&
(SpriteProjectile[spr].workslike & PROJECTILE_RPG)) (SpriteProjectile[spr].workslike & PROJECTILE_RPG))
{ {
if (wal->nextwall == -1 || wall[wal->nextwall].pal != 4) if (wal->nextwall == -1 || wall[wal->nextwall].pal != 4)
@ -1854,7 +1854,7 @@ void A_DamageObject(int32_t i,int32_t sn)
i &= (MAXSPRITES-1); i &= (MAXSPRITES-1);
if (A_CheckSpriteFlags(sn,SPRITE_PROJECTILE)) if (A_CheckSpriteFlags(sn,SFLAG_PROJECTILE))
if (SpriteProjectile[sn].workslike & PROJECTILE_RPG) if (SpriteProjectile[sn].workslike & PROJECTILE_RPG)
rpg = 1; rpg = 1;
@ -2243,7 +2243,7 @@ void A_DamageObject(int32_t i,int32_t sn)
if ((PN != DRONE) && (PN != ROTATEGUN) && (PN != COMMANDER) && (PN < GREENSLIME || PN > GREENSLIME+7)) if ((PN != DRONE) && (PN != ROTATEGUN) && (PN != COMMANDER) && (PN < GREENSLIME || PN > GREENSLIME+7))
if (sprite[sn].picnum != FREEZEBLAST) if (sprite[sn].picnum != FREEZEBLAST)
if (!A_CheckSpriteTileFlags(PN, SPRITE_BADGUY)) if (!A_CheckSpriteTileFlags(PN, SFLAG_BADGUY))
{ {
j = A_Spawn(sn,JIBS6); j = A_Spawn(sn,JIBS6);
if (sprite[sn].pal == 6) if (sprite[sn].pal == 6)