From b8bd2069ea0ee1b90d15f6d4b132b99b27c68743 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 22 Feb 2014 19:38:52 +0000 Subject: [PATCH] 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 --- polymer/eduke32/source/actors.c | 54 +++++++++++++++---------------- polymer/eduke32/source/actors.h | 40 +++++++++++------------ polymer/eduke32/source/game.c | 20 ++++++------ polymer/eduke32/source/gamedef.c | 40 +++++++++++------------ polymer/eduke32/source/gameexec.c | 12 +++---- polymer/eduke32/source/player.c | 12 +++---- polymer/eduke32/source/premap.c | 6 ++-- polymer/eduke32/source/sector.c | 6 ++-- 8 files changed, 95 insertions(+), 95 deletions(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 757f5ed4a..16f761a3d 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -242,7 +242,7 @@ SKIPWALLCHECK: if (s->picnum == RPG && sj->extra > 0) 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; 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 // with TROR water. - actor[spritenum].flags |= SPRITE_DIDNOSE7WATER; + actor[spritenum].flags |= SFLAG_DIDNOSE7WATER; return -othersect-1; } } @@ -443,7 +443,7 @@ int32_t A_MoveSprite(int32_t spritenum, const vec3_t *change, uint32_t cliptype) clipdist = 1024; else if (spr->picnum == LIZMAN) clipdist = 292; - else if (A_CheckSpriteTileFlags(spr->picnum, SPRITE_BADGUY)) + else if (A_CheckSpriteTileFlags(spr->picnum, SFLAG_BADGUY)) clipdist = spr->clipdist<<2; else 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 // [i.e. not "was ceiling or floor hit", but "was no sprite hit"] // 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. // XXX: Why is this contrived data flow necessary? (If at all.) 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) || ((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)) { 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 TRIPBOMB__STATIC: // 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; else s->shade = sector[s->sectnum].floorshade; @@ -959,7 +959,7 @@ ACTOR_STATIC void G_MoveZombieActors(void) CS |= 257; // fall-through 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; actor[i].timetosleep = 0; 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) s->shade = sector[s->sectnum].ceilingshade; @@ -1053,7 +1053,7 @@ int32_t A_IncurDamage(int32_t sn) break; 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); else P_Nudge(p, sn, 1); 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) { - if (actor[i].flags & SPRITE_DIDNOSE7WATER) + if (actor[i].flags & SFLAG_DIDNOSE7WATER) { - actor[i].flags &= ~SPRITE_DIDNOSE7WATER; + actor[i].flags &= ~SFLAG_DIDNOSE7WATER; return; } @@ -2965,7 +2965,7 @@ ACTOR_STATIC void G_MoveWeapons(void) Bmemcpy(&actor[i].bpos, s, sizeof(vec3_t)); /* Custom projectiles */ - if (A_CheckSpriteFlags(i, SPRITE_PROJECTILE)) + if (A_CheckSpriteFlags(i, SFLAG_PROJECTILE)) { Proj_MoveCustom(i); goto BOLT; @@ -3379,7 +3379,7 @@ static int32_t A_CheckNonTeleporting(int32_t s) { 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 || (pic >= GREENSLIME && pic <= GREENSLIME+7)); @@ -3546,7 +3546,7 @@ ACTOR_STATIC void G_MoveTransports(void) if (warpspriteto) { - if (A_CheckSpriteFlags(j,SPRITE_DECAL)) + if (A_CheckSpriteFlags(j,SFLAG_DECAL)) goto JBOLT; switch (DYNAMICTILEMAP(sprite[j].picnum)) @@ -6397,7 +6397,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 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) sprite[j].shade = sc->ceilingshade; @@ -6673,7 +6673,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 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) sprite[j].shade = sc->ceilingshade; @@ -6708,7 +6708,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3 { 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; else sprite[j].shade = sc->floorshade; } @@ -7821,8 +7821,8 @@ static void G_DoEffectorLights(void) // STATNUM 14 #ifdef POLYMER case SE_49_POINT_LIGHT: { - if (!A_CheckSpriteFlags(i, SPRITE_NOLIGHT) && getrendermode() == REND_POLYMER && - !(A_CheckSpriteFlags(i, SPRITE_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384)) + if (!A_CheckSpriteFlags(i, SFLAG_NOLIGHT) && getrendermode() == REND_POLYMER && + !(A_CheckSpriteFlags(i, SFLAG_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384)) { if (actor[i].lightptr == NULL) { @@ -7887,8 +7887,8 @@ static void G_DoEffectorLights(void) // STATNUM 14 } case SE_50_SPOT_LIGHT: { - if (!A_CheckSpriteFlags(i, SPRITE_NOLIGHT) && getrendermode() == REND_POLYMER && - !(A_CheckSpriteFlags(i, SPRITE_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384)) + if (!A_CheckSpriteFlags(i, SFLAG_NOLIGHT) && getrendermode() == REND_POLYMER && + !(A_CheckSpriteFlags(i, SFLAG_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384)) { if (actor[i].lightptr == NULL) { @@ -7991,8 +7991,8 @@ static void A_DoLight(int32_t i) spritetype *const s = &sprite[i]; int32_t numsavedfires = 0; - if ((sprite[i].picnum != SECTOREFFECTOR && ((s->cstat & 32768) || s->yrepeat < 4)) || A_CheckSpriteFlags(i, SPRITE_NOLIGHT) || - (A_CheckSpriteFlags(i, SPRITE_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384)) + if ((sprite[i].picnum != SECTOREFFECTOR && ((s->cstat & 32768) || s->yrepeat < 4)) || A_CheckSpriteFlags(i, SFLAG_NOLIGHT) || + (A_CheckSpriteFlags(i, SFLAG_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384)) { if (actor[i].lightptr != NULL) A_DeleteLight(i); @@ -8033,7 +8033,7 @@ static void A_DoLight(int32_t i) int32_t dx = sintable[(s->ang+512)&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) A_DeleteLight(i); @@ -8264,7 +8264,7 @@ void A_PlayAlertSound(int32_t i) 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) @@ -8326,7 +8326,7 @@ void G_MoveWorld(void) { 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; continue; @@ -8380,7 +8380,7 @@ void G_MoveWorld(void) if (getrendermode() == REND_POLYMER) A_DoLight(i); #endif - if (!G_HaveEvent(EVENT_GAME) || A_CheckSpriteFlags(i, SPRITE_NOEVENTCODE)) + if (!G_HaveEvent(EVENT_GAME) || A_CheckSpriteFlags(i, SFLAG_NOEVENTCODE)) { i = j; continue; diff --git a/polymer/eduke32/source/actors.h b/polymer/eduke32/source/actors.h index d5260dbbe..3bbaa6d2b 100644 --- a/polymer/eduke32/source/actors.h +++ b/polymer/eduke32/source/actors.h @@ -241,28 +241,28 @@ typedef struct { // KEEPINSYNC lunatic/con_lang.lua enum sflags_t { - SPRITE_SHADOW = 0x00000001, - SPRITE_NVG = 0x00000002, - SPRITE_NOSHADE = 0x00000004, - SPRITE_PROJECTILE = 0x00000008, - SPRITE_DECAL = 0x00000010, - SPRITE_BADGUY = 0x00000020, - SPRITE_NOPAL = 0x00000040, - SPRITE_NOEVENTCODE = 0x00000080, - SPRITE_NOLIGHT = 0x00000100, - SPRITE_USEACTIVATOR = 0x00000200, - SPRITE_NULL = 0x00000400, // null sprite in multiplayer - SPRITE_NOCLIP = 0x00000800, // clipmove it with cliptype 0 - SPRITE_NOFLOORSHADOW = 0x00001000, // for temp. internal use, per-tile flag not checked - SPRITE_SMOOTHMOVE = 0x00002000, - SPRITE_NOTELEPORT = 0x00004000, - SPRITE_BADGUYSTAYPUT = 0x00008000, - SPRITE_CACHE = 0x00010000, + SFLAG_SHADOW = 0x00000001, + SFLAG_NVG = 0x00000002, + SFLAG_NOSHADE = 0x00000004, + SFLAG_PROJECTILE = 0x00000008, + SFLAG_DECAL = 0x00000010, + SFLAG_BADGUY = 0x00000020, + SFLAG_NOPAL = 0x00000040, + SFLAG_NOEVENTCODE = 0x00000080, + SFLAG_NOLIGHT = 0x00000100, + SFLAG_USEACTIVATOR = 0x00000200, + SFLAG_NULL = 0x00000400, // null sprite in multiplayer + SFLAG_NOCLIP = 0x00000800, // clipmove it with cliptype 0 + SFLAG_NOFLOORSHADOW = 0x00001000, // for temp. internal use, per-tile flag not checked + SFLAG_SMOOTHMOVE = 0x00002000, + SFLAG_NOTELEPORT = 0x00004000, + SFLAG_BADGUYSTAYPUT = 0x00008000, + SFLAG_CACHE = 0x00010000, // rotation-fixed wrt a pivot point to prevent position diverging due to // roundoff error accumulation: - SPRITE_ROTFIXED = 0x00020000, - SPRITE_HARDCODED_BADGUY = 0x00040000, - SPRITE_DIDNOSE7WATER = 0x00080000, // used temporarily + SFLAG_ROTFIXED = 0x00020000, + SFLAG_HARDCODED_BADGUY = 0x00040000, + SFLAG_DIDNOSE7WATER = 0x00080000, // used temporarily }; // Custom projectiles "workslike" flags. diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 68593bbbd..bcca2b220 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -5128,7 +5128,7 @@ int32_t A_Spawn(int32_t j, int32_t pn) if (sp->xrepeat == 0 || sp->yrepeat == 0) sp->xrepeat = sp->yrepeat = 1; - if (A_CheckSpriteTileFlags(sp->picnum, SPRITE_BADGUY)) + if (A_CheckSpriteTileFlags(sp->picnum, SFLAG_BADGUY)) { if (ud.monsters_off == 1) { @@ -5139,7 +5139,7 @@ int32_t A_Spawn(int32_t j, int32_t pn) A_Fall(i); - if (A_CheckSpriteTileFlags(sp->picnum, SPRITE_BADGUYSTAYPUT)) + if (A_CheckSpriteTileFlags(sp->picnum, SFLAG_BADGUYSTAYPUT)) actor[i].actorstayput = sp->sectnum; 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)) 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); 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) && !g_noFloorPal[dapal] - && !A_CheckSpriteFlags(datspr->owner,SPRITE_NOPAL)) + && !A_CheckSpriteFlags(datspr->owner,SFLAG_NOPAL)) { datspr->pal = dapal; 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]; /* - if (A_CheckSpriteFlags(i, SPRITE_NULL)) + if (A_CheckSpriteFlags(i, SFLAG_NULL)) { t->xrepeat = t->yrepeat = 0; continue; @@ -7234,7 +7234,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo 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; else { @@ -7751,14 +7751,14 @@ skip: // 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. 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->shade = 0; } // 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 (actor[i].dispicnum < 0) @@ -7772,7 +7772,7 @@ skip: continue; } - if (actor[i].flags & SPRITE_NOFLOORSHADOW) + if (actor[i].flags & SFLAG_NOFLOORSHADOW) continue; 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); } -#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). static void A_InitEnemyFlags(void) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 5810f93cf..46b6e368d 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -2346,7 +2346,7 @@ LUNATIC_EXTERN void C_DefineProjectile(int32_t j, int32_t what, int32_t val) default: break; } - g_tile[j].flags |= SPRITE_PROJECTILE; + g_tile[j].flags |= SFLAG_PROJECTILE; } int32_t C_AllocQuote(int32_t qnum) @@ -3240,13 +3240,13 @@ static int32_t C_ParseCommand(int32_t loop) if (tw == CON_USERACTOR) { if (j & 1) - g_tile[*g_scriptPtr].flags |= SPRITE_BADGUY; + g_tile[*g_scriptPtr].flags |= SFLAG_BADGUY; if (j & 2) - g_tile[*g_scriptPtr].flags |= (SPRITE_BADGUY|SPRITE_BADGUYSTAYPUT); + g_tile[*g_scriptPtr].flags |= (SFLAG_BADGUY|SFLAG_BADGUYSTAYPUT); if (j & 4) - g_tile[*g_scriptPtr].flags |= SPRITE_ROTFIXED; + g_tile[*g_scriptPtr].flags |= SFLAG_ROTFIXED; } for (j=0; j<4; j++) @@ -4604,16 +4604,16 @@ static int32_t C_ParseCommand(int32_t loop) switch (tw) { case CON_SPRITESHADOW: - g_tile[*g_scriptPtr].flags |= SPRITE_SHADOW; + g_tile[*g_scriptPtr].flags |= SFLAG_SHADOW; break; case CON_SPRITENVG: - g_tile[*g_scriptPtr].flags |= SPRITE_NVG; + g_tile[*g_scriptPtr].flags |= SFLAG_NVG; break; case CON_SPRITENOSHADE: - g_tile[*g_scriptPtr].flags |= SPRITE_NOSHADE; + g_tile[*g_scriptPtr].flags |= SFLAG_NOSHADE; break; case CON_SPRITENOPAL: - g_tile[*g_scriptPtr].flags |= SPRITE_NOPAL; + g_tile[*g_scriptPtr].flags |= SFLAG_NOPAL; break; case CON_PRECACHE: C_GetNextValue(LABEL_DEFINE); @@ -4629,7 +4629,7 @@ static int32_t C_ParseCommand(int32_t loop) C_GetNextValue(LABEL_DEFINE); g_scriptPtr--; if (*g_scriptPtr) - g_tile[j].flags |= SPRITE_CACHE; + g_tile[j].flags |= SFLAG_CACHE; break; } @@ -6159,17 +6159,17 @@ static void C_AddDefaultDefinitions(void) C_AddDefinition("STAT_DUMMYPLAYER", STAT_DUMMYPLAYER, LABEL_DEFINE); C_AddDefinition("STAT_LIGHT", STAT_LIGHT, LABEL_DEFINE); - C_AddDefinition("SFLAG_SHADOW", SPRITE_SHADOW, LABEL_DEFINE); - C_AddDefinition("SFLAG_NVG", SPRITE_NVG, LABEL_DEFINE); - C_AddDefinition("SFLAG_NOSHADE", SPRITE_NOSHADE, LABEL_DEFINE); - C_AddDefinition("SFLAG_BADGUY", SPRITE_BADGUY, LABEL_DEFINE); - C_AddDefinition("SFLAG_NOPAL", SPRITE_NOPAL, LABEL_DEFINE); - C_AddDefinition("SFLAG_NOEVENTS", SPRITE_NOEVENTCODE, LABEL_DEFINE); - C_AddDefinition("SFLAG_NOLIGHT", SPRITE_NOLIGHT, LABEL_DEFINE); - C_AddDefinition("SFLAG_USEACTIVATOR", SPRITE_USEACTIVATOR, LABEL_DEFINE); - C_AddDefinition("SFLAG_NOCLIP", SPRITE_NOCLIP, LABEL_DEFINE); - C_AddDefinition("SFLAG_SMOOTHMOVE", SPRITE_SMOOTHMOVE, LABEL_DEFINE); - C_AddDefinition("SFLAG_NOTELEPORT", SPRITE_NOTELEPORT, LABEL_DEFINE); + C_AddDefinition("SFLAG_SHADOW", SFLAG_SHADOW, LABEL_DEFINE); + C_AddDefinition("SFLAG_NVG", SFLAG_NVG, LABEL_DEFINE); + C_AddDefinition("SFLAG_NOSHADE", SFLAG_NOSHADE, LABEL_DEFINE); + C_AddDefinition("SFLAG_BADGUY", SFLAG_BADGUY, LABEL_DEFINE); + C_AddDefinition("SFLAG_NOPAL", SFLAG_NOPAL, LABEL_DEFINE); + C_AddDefinition("SFLAG_NOEVENTS", SFLAG_NOEVENTCODE, LABEL_DEFINE); + C_AddDefinition("SFLAG_NOLIGHT", SFLAG_NOLIGHT, LABEL_DEFINE); + C_AddDefinition("SFLAG_USEACTIVATOR", SFLAG_USEACTIVATOR, LABEL_DEFINE); + C_AddDefinition("SFLAG_NOCLIP", SFLAG_NOCLIP, LABEL_DEFINE); + C_AddDefinition("SFLAG_SMOOTHMOVE", SFLAG_SMOOTHMOVE, LABEL_DEFINE); + C_AddDefinition("SFLAG_NOTELEPORT", SFLAG_NOTELEPORT, LABEL_DEFINE); C_AddDefinition("STR_MAPNAME",STR_MAPNAME,LABEL_DEFINE); C_AddDefinition("STR_MAPFILENAME",STR_MAPFILENAME,LABEL_DEFINE); diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index e54e57d4d..7937970d7 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -348,7 +348,7 @@ void A_GetZLimits(int32_t iActor) s->cstat = cstat; - actor[iActor].flags &= ~SPRITE_NOFLOORSHADOW; + actor[iActor].flags &= ~SFLAG_NOFLOORSHADOW; 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) || (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; A_SetSprite(iActor,CLIPMASK0); } @@ -772,7 +772,7 @@ dead: if (ps->actorsqu == vm.g_i) return; - if (!A_CheckSpriteFlags(vm.g_i, SPRITE_SMOOTHMOVE)) + if (!A_CheckSpriteFlags(vm.g_i, SFLAG_SMOOTHMOVE)) { if (AC_COUNT(vm.g_t)&1) return; @@ -788,7 +788,7 @@ dead: }; 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); 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; - 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); else if (actor[vm.g_i].timetosleep > 1) actor[vm.g_i].timetosleep--; diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 67d37d930..f82c80dfa 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -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 (A_CheckSpriteTileFlags(atwith,SPRITE_PROJECTILE) && (ProjectileData[atwith].workslike & PROJECTILE_RPG)) + if (A_CheckSpriteTileFlags(atwith,SFLAG_PROJECTILE) && (ProjectileData[atwith].workslike & PROJECTILE_RPG)) return -1; 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); - if (!A_CheckSpriteFlags(l, SPRITE_DECAL)) - actor[l].flags |= SPRITE_DECAL; + if (!A_CheckSpriteFlags(l, SFLAG_DECAL)) + actor[l].flags |= SFLAG_DECAL; sprite[l].xvel = -1; 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); - if (!A_CheckSpriteFlags(k, SPRITE_DECAL)) - actor[k].flags |= SPRITE_DECAL; + if (!A_CheckSpriteFlags(k, SFLAG_DECAL)) + actor[k].flags |= SFLAG_DECAL; sprite[k].xvel = -1; 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 } - if (A_CheckSpriteTileFlags(atwith, SPRITE_PROJECTILE)) + if (A_CheckSpriteTileFlags(atwith, SFLAG_PROJECTILE)) return A_ShootCustom(i, atwith, sa, &srcvect); else { diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 2f471ed6d..a18da3585 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -217,10 +217,10 @@ static void G_PrecacheSprites(void) for (i=0; ioverpicnum == MIRROR && wal->pal != 4 && - A_CheckSpriteTileFlags(atwith,SPRITE_PROJECTILE) && + A_CheckSpriteTileFlags(atwith,SFLAG_PROJECTILE) && (SpriteProjectile[spr].workslike & PROJECTILE_RPG)) { 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); - if (A_CheckSpriteFlags(sn,SPRITE_PROJECTILE)) + if (A_CheckSpriteFlags(sn,SFLAG_PROJECTILE)) if (SpriteProjectile[sn].workslike & PROJECTILE_RPG) 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 (sprite[sn].picnum != FREEZEBLAST) - if (!A_CheckSpriteTileFlags(PN, SPRITE_BADGUY)) + if (!A_CheckSpriteTileFlags(PN, SFLAG_BADGUY)) { j = A_Spawn(sn,JIBS6); if (sprite[sn].pal == 6)