From a2cf961591cd6f7fbf9c75f62b955f170e721295 Mon Sep 17 00:00:00 2001 From: pogokeen Date: Fri, 16 Feb 2018 06:38:31 +0000 Subject: [PATCH] Moved BUILD engine defined CSTAT enums into the BUILD engine side of the code base. git-svn-id: https://svn.eduke32.com/eduke32@6657 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/include/buildtypes.h | 31 ++++++++++++++ source/duke3d/src/game.h | 2 +- source/duke3d/src/macros.h | 15 ------- source/sw/src/actor.cpp | 2 +- source/sw/src/draw.cpp | 24 +++++------ source/sw/src/game.h | 20 ++------- source/sw/src/jweapon.cpp | 8 ++-- source/sw/src/player.cpp | 8 ++-- source/sw/src/sector.cpp | 2 +- source/sw/src/sprite.cpp | 16 ++++---- source/sw/src/weapon.cpp | 68 +++++++++++++++---------------- 11 files changed, 99 insertions(+), 97 deletions(-) diff --git a/source/build/include/buildtypes.h b/source/build/include/buildtypes.h index 351589e97..f1d3a4afc 100644 --- a/source/build/include/buildtypes.h +++ b/source/build/include/buildtypes.h @@ -101,6 +101,33 @@ typedef struct // bit 13: 1 = does not cast shadow // bit 14: 1 = invisible but casts shadow // bit 15: 1 = Invisible sprite, 0 = not invisible +#ifndef buildtypes_h__enums +enum +{ + CSTAT_SPRITE_BLOCK = 1u, + CSTAT_SPRITE_TRANSLUCENT = 1u<<1u, + CSTAT_SPRITE_XFLIP = 1u<<2u, + CSTAT_SPRITE_YFLIP = 1u<<3u, + CSTAT_SPRITE_ALIGNMENT = 1u<<4u | 1u<<5u, // (cstat & CSTAT_SPRITE_ALIGNMENT) == CSTAT_SPRITE_ALIGNMENT_xxxxxx can be used to check sprite alignment + CSTAT_SPRITE_ONE_SIDED = 1u<<6u, + CSTAT_SPRITE_YCENTER = 1u<<7u, + CSTAT_SPRITE_BLOCK_HITSCAN = 1u<<8u, + CSTAT_SPRITE_TRANSLUCENT_INVERT = 1u<<9u, + CSTAT_SPRITE_RESERVED1 = 1u<<10u, // game-side + CSTAT_SPRITE_RESERVED2 = 1u<<11u, // game-side + CSTAT_SPRITE_RESERVED3 = 1u<<12u, + CSTAT_SPRITE_NO_SHADOW = 1u<<13u, // re-defined in Shadow Warrior + CSTAT_SPRITE_INVISIBLE_WITH_SHADOW = 1u<<14u, // re-defined in Shadow Warrior + CSTAT_SPRITE_INVISIBLE = 1u<<15u, +}; +enum +{ + CSTAT_SPRITE_ALIGNMENT_FACING = 0, + CSTAT_SPRITE_ALIGNMENT_WALL = 1u<<4u, + CSTAT_SPRITE_ALIGNMENT_FLOOR = 1u<<5u, + CSTAT_SPRITE_ALIGNMENT_SLAB = 1u<<4u | 1u<<5u, +}; +#endif //44 bytes typedef struct @@ -166,4 +193,8 @@ typedef struct #undef StructTracker #undef StructName +#ifndef buildtypes_h__enums +#define buildtypes_h__enums +#endif + #endif // buildtypes_h__ diff --git a/source/duke3d/src/game.h b/source/duke3d/src/game.h index 8c5040422..19cafc910 100644 --- a/source/duke3d/src/game.h +++ b/source/duke3d/src/game.h @@ -390,7 +390,7 @@ void P_SetGamePalette(DukePlayer_t *player, uint32_t palid, int32_t set); // Cstat protection mask for (currently) spawned MASKWALL* sprites. // TODO: look at more cases of cstat=(cstat&PROTECTED)|ADDED in A_Spawn()? // 2048+(32+16)+8+4 -#define SPAWN_PROTECT_CSTAT_MASK (CSTAT_SPRITE_NOSHADE|CSTAT_SPRITE_SLAB|CSTAT_SPRITE_XFLIP|CSTAT_SPRITE_YFLIP); +#define SPAWN_PROTECT_CSTAT_MASK (CSTAT_SPRITE_NOSHADE|CSTAT_SPRITE_ALIGNMENT_SLAB|CSTAT_SPRITE_XFLIP|CSTAT_SPRITE_YFLIP); void fadepal(int32_t r,int32_t g,int32_t b,int32_t start,int32_t end,int32_t step); //void fadepaltile(int32_t r,int32_t g,int32_t b,int32_t start,int32_t end,int32_t step,int32_t tile); diff --git a/source/duke3d/src/macros.h b/source/duke3d/src/macros.h index 1f1ddb822..b552c1f21 100644 --- a/source/duke3d/src/macros.h +++ b/source/duke3d/src/macros.h @@ -164,22 +164,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // bit 13: reserved // bit 14: reserved // bit 15: 1 = Invisible sprite, 0 = not invisible - -#define CSTAT_SPRITE_BLOCK BIT(0) -#define CSTAT_SPRITE_TRANSLUCENT BIT(1) -#define CSTAT_SPRITE_XFLIP BIT(2) -#define CSTAT_SPRITE_YFLIP BIT(3) -#define CSTAT_SPRITE_WALL BIT(4) -#define CSTAT_SPRITE_FLOOR BIT(5) -#define CSTAT_SPRITE_SLAB (BIT(4)|BIT(5)) -#define CSTAT_SPRITE_ONE_SIDE BIT(6) -#define CSTAT_SPRITE_YCENTER BIT(7) -#define CSTAT_SPRITE_BLOCK_HITSCAN BIT(8) -#define CSTAT_SPRITE_TRANS_FLIP BIT(9) #define CSTAT_SPRITE_NOSHADE BIT(11) - -#define CSTAT_SPRITE_INVISIBLE BIT(15) - #define CSTAT_SPRITE_BREAKABLE (CSTAT_SPRITE_BLOCK_HITSCAN) #define SP(i) sprite[i].yvel diff --git a/source/sw/src/actor.cpp b/source/sw/src/actor.cpp index a7d38f98f..c93ac35bb 100644 --- a/source/sw/src/actor.cpp +++ b/source/sw/src/actor.cpp @@ -792,7 +792,7 @@ DoActorStopFall(short SpriteNum) // don't stand on face or wall sprites - jump again - if (u->lo_sp && !TEST(u->lo_sp->cstat, CSTAT_SPRITE_FLOOR)) + if (u->lo_sp && !TEST(u->lo_sp->cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR)) { USERp tu = User[u->lo_sp - sprite]; diff --git a/source/sw/src/draw.cpp b/source/sw/src/draw.cpp index eb2816b66..21f60f4f5 100644 --- a/source/sw/src/draw.cpp +++ b/source/sw/src/draw.cpp @@ -258,7 +258,7 @@ DoShadowFindGroundPoint(uspritetype * sp) { hsp = &sprite[NORM_SPRITE(florhit)]; - if (TEST(hsp->cstat, CSTAT_SPRITE_FLOOR)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR)) { // found a sprite floor return loz; @@ -415,7 +415,7 @@ DoShadows(uspritetype * tsp, int viewz) loz = tu->loz; if (tu->lo_sp) { - if (!TEST(tu->lo_sp->cstat, CSTAT_SPRITE_WALL | CSTAT_SPRITE_FLOOR)) + if (!TEST(tu->lo_sp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_ALIGNMENT_FLOOR)) { loz = DoShadowFindGroundPoint(tsp); } @@ -536,7 +536,7 @@ DoMotionBlur(uspritetype const * tsp) { New = &tsprite[spritesortcnt]; memcpy(New, tsp, sizeof(SPRITE)); - SET(New->cstat, CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_TRANS_FLIP); + SET(New->cstat, CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_TRANSLUCENT_INVERT); New->x += dx; New->y += dy; @@ -559,7 +559,7 @@ DoMotionBlur(uspritetype const * tsp) void SetVoxelSprite(SPRITEp sp, short pic) { - SET(sp->cstat, CSTAT_SPRITE_SLAB); + SET(sp->cstat, CSTAT_SPRITE_ALIGNMENT_SLAB); sp->picnum = pic; } @@ -780,7 +780,7 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror) tsp->picnum = DART_PIC; tsp->ang = NORM_ANGLE(tsp->ang - 512 - 24); tsp->xrepeat = tsp->yrepeat = DART_REPEAT; - SET(tsp->cstat, CSTAT_SPRITE_WALL); + SET(tsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); } else DoStarView(tsp, tu, viewz); @@ -845,7 +845,7 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror) tsp->picnum = DART_PIC; tsp->ang = NORM_ANGLE(tsp->ang - 512); tsp->xrepeat = tsp->yrepeat = DART_REPEAT; - SET(tsp->cstat, CSTAT_SPRITE_WALL); + SET(tsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); } // Call my sprite handler @@ -1116,7 +1116,7 @@ ViewOutsidePlayerRecurse(PLAYERp pp, int32_t* vx, int32_t* vy, int32_t* vz, int1 sp = &sprite[hit_sprite]; // if you hit a sprite that's not a wall sprite - try again - if (!TEST(sp->cstat, CSTAT_SPRITE_WALL)) + if (!TEST(sp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { FLIP(sp->cstat, CSTAT_SPRITE_BLOCK); ViewOutsidePlayerRecurse(pp, vx, vy, vz, ang, vsectnum); @@ -1215,7 +1215,7 @@ BackView(int *nx, int *ny, int *nz, short *vsect, short *nang, short horiz) int flag_backup; // if you hit a sprite that's not a wall sprite - try again - if (!TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (!TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { flag_backup = hsp->cstat; RESET(hsp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); @@ -1336,7 +1336,7 @@ CircleCamera(int *nx, int *ny, int *nz, short *vsect, short *nang, short horiz) int flag_backup; // if you hit a sprite that's not a wall sprite - try again - if (!TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (!TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { flag_backup = hsp->cstat; RESET(hsp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); @@ -2493,9 +2493,9 @@ drawscreen(PLAYERp pp) // Don't show sprites tagged with 257 if (sprite[j].lotag == 257) { - if (TEST(sprite[j].cstat, CSTAT_SPRITE_FLOOR)) + if (TEST(sprite[j].cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR)) { - RESET(sprite[j].cstat, CSTAT_SPRITE_FLOOR); + RESET(sprite[j].cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR); sprite[j].owner = -2; } } @@ -2515,7 +2515,7 @@ drawscreen(PLAYERp pp) { // Don't show sprites tagged with 257 if (sprite[j].lotag == 257 && sprite[j].owner == -2) - SET(sprite[j].cstat, CSTAT_SPRITE_FLOOR); + SET(sprite[j].cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR); } // if doing a screen save don't need to process the rest diff --git a/source/sw/src/game.h b/source/sw/src/game.h index f2d0b7f18..2dd48d7da 100644 --- a/source/sw/src/game.h +++ b/source/sw/src/game.h @@ -464,7 +464,7 @@ int StdRandomRange(int range); #define SPRITEp_SIZE_TOS(sp) (DIV2(SPRITEp_SIZE_Z(sp)) + Z(SPRITEp_YOFF(sp))) #define SPRITEp_SIZE_BOS(sp) (DIV2(SPRITEp_SIZE_Z(sp)) - Z(SPRITEp_YOFF(sp))) -// acual Z for TOS and BOS - handles both WYSIWYG and old style +// actual Z for TOS and BOS - handles both WYSIWYG and old style #define SPRITEp_TOS(sp) (TEST((sp)->cstat, CSTAT_SPRITE_YCENTER) ? \ ((sp)->z - SPRITEp_SIZE_TOS(sp)) : \ ((sp)->z - SPRITEp_SIZE_Z(sp))) @@ -473,7 +473,7 @@ int StdRandomRange(int range); ((sp)->z + SPRITEp_SIZE_BOS(sp)) : \ (sp)->z) -// mid and upper/lower sprite caluculations +// mid and upper/lower sprite calculations #define SPRITEp_MID(sp) (DIV2(SPRITEp_TOS(sp) + SPRITEp_BOS(sp))) #define SPRITEp_UPPER(sp) (SPRITEp_TOS(sp) + DIV4(SPRITEp_SIZE_Z(sp))) #define SPRITEp_LOWER(sp) (SPRITEp_BOS(sp) - DIV4(SPRITEp_SIZE_Z(sp))) @@ -626,24 +626,10 @@ int StdRandomRange(int range); // bit 13: reserved // bit 14: reserved // bit 15: 1 = Invisible sprite, 0 = not invisible - -#define CSTAT_SPRITE_BLOCK BIT(0) -#define CSTAT_SPRITE_TRANSLUCENT BIT(1) -#define CSTAT_SPRITE_XFLIP BIT(2) -#define CSTAT_SPRITE_YFLIP BIT(3) -#define CSTAT_SPRITE_WALL BIT(4) -#define CSTAT_SPRITE_FLOOR BIT(5) -#define CSTAT_SPRITE_SLAB (BIT(4)|BIT(5)) -#define CSTAT_SPRITE_ONE_SIDE BIT(6) -#define CSTAT_SPRITE_YCENTER BIT(7) -#define CSTAT_SPRITE_BLOCK_HITSCAN BIT(8) -#define CSTAT_SPRITE_TRANS_FLIP BIT(9) - #define CSTAT_SPRITE_RESTORE BIT(12) // my def #define CSTAT_SPRITE_CLOSE_FLOOR BIT(13) // my def - tells whether a sprite // started out close to a ceiling or floor #define CSTAT_SPRITE_BLOCK_MISSILE BIT(14) // my def -#define CSTAT_SPRITE_INVISIBLE BIT(15) #define CSTAT_SPRITE_BREAKABLE (CSTAT_SPRITE_BLOCK_HITSCAN|CSTAT_SPRITE_BLOCK_MISSILE) @@ -661,7 +647,7 @@ int StdRandomRange(int range); // for actors to clip against walls #define CLIPMASK_ACTOR \ ( \ - CS(CSTAT_SPRITE_BLOCK) | \ + CS(CSTAT_SPRITE_BLOCK) | \ CSTAT_WALL_BLOCK | \ CSTAT_WALL_BLOCK_ACTOR \ ) diff --git a/source/sw/src/jweapon.cpp b/source/sw/src/jweapon.cpp index f3966981c..96254800b 100644 --- a/source/sw/src/jweapon.cpp +++ b/source/sw/src/jweapon.cpp @@ -429,7 +429,7 @@ DoBloodSpray(int16_t Weapon) SPRITEp hsp = &sprite[hit_sprite]; USERp hu = User[hit_sprite]; - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { wall_ang = NORM_ANGLE(hsp->ang); SpawnMidSplash(Weapon); @@ -648,7 +648,7 @@ DoPhosphorus(int16_t Weapon) hsp = &sprite[hit_sprite]; hu = User[hit_sprite]; - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { wall_ang = NORM_ANGLE(hsp->ang); WallBounce(Weapon, wall_ang); @@ -875,7 +875,7 @@ DoChemBomb(int16_t Weapon) hit_sprite = NORM_SPRITE(u->ret); hsp = &sprite[hit_sprite]; - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { wall_ang = NORM_ANGLE(hsp->ang); WallBounce(Weapon, wall_ang); @@ -1133,7 +1133,7 @@ DoCaltrops(int16_t Weapon) hit_sprite = NORM_SPRITE(u->ret); hsp = &sprite[hit_sprite]; - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { wall_ang = NORM_ANGLE(hsp->ang); WallBounce(Weapon, wall_ang); diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index 41f3ed8d5..74e833da9 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -1397,7 +1397,7 @@ DoSpawnTeleporterEffect(SPRITEp sp) SET(ep->cstat, CSTAT_SPRITE_YCENTER); RESET(ep->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(ep->cstat, CSTAT_SPRITE_WALL); + SET(ep->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); //ep->ang = NORM_ANGLE(ep->ang + 512); } @@ -1424,7 +1424,7 @@ DoSpawnTeleporterEffectPlace(SPRITEp sp) SET(ep->cstat, CSTAT_SPRITE_YCENTER); RESET(ep->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(ep->cstat, CSTAT_SPRITE_WALL); + SET(ep->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); } void @@ -4587,7 +4587,7 @@ PlayerOnLadder(PLAYERp pp) // if the sprite blocking you hit is not a wall sprite there is something between // you and the ladder if (TEST(sprite[hitinfo.sprite].cstat, CSTAT_SPRITE_BLOCK) && - !TEST(sprite[hitinfo.sprite].cstat, CSTAT_SPRITE_WALL)) + !TEST(sprite[hitinfo.sprite].cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { return FALSE; } @@ -7069,7 +7069,7 @@ void DoPlayerDeathMoveHead(PLAYERp pp) hit_sprite = NORM_SPRITE(u->ret); hsp = &sprite[hit_sprite]; - if (!TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (!TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) break; diff --git a/source/sw/src/sector.cpp b/source/sw/src/sector.cpp index 68c481ac3..3199b0949 100644 --- a/source/sw/src/sector.cpp +++ b/source/sw/src/sector.cpp @@ -1133,7 +1133,7 @@ SectorExp(short SpriteNum, short sectnum, short orig_ang, int zh) USERp eu; int x,y,z; - RESET(sp->cstat, CSTAT_SPRITE_WALL|CSTAT_SPRITE_FLOOR); + RESET(sp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL|CSTAT_SPRITE_ALIGNMENT_FLOOR); SectorMidPoint(sectnum, &x, &y, &z); sp->ang = orig_ang; sp->x = x; diff --git a/source/sw/src/sprite.cpp b/source/sw/src/sprite.cpp index a271f1638..37757a808 100644 --- a/source/sw/src/sprite.cpp +++ b/source/sw/src/sprite.cpp @@ -1750,7 +1750,7 @@ SpriteSetupPost(void) if (ds->picnum == ST1) continue; - if (TEST(ds->cstat, CSTAT_SPRITE_WALL|CSTAT_SPRITE_FLOOR)) + if (TEST(ds->cstat, CSTAT_SPRITE_ALIGNMENT_WALL|CSTAT_SPRITE_ALIGNMENT_FLOOR)) continue; if (User[i]) @@ -1818,8 +1818,8 @@ SpriteSetup(void) } // CSTAT_SPIN is insupported - get rid of it - if (TEST(sp->cstat, CSTAT_SPRITE_SLAB) == CSTAT_SPRITE_SLAB) - RESET(sp->cstat, CSTAT_SPRITE_SLAB); + if (TEST(sp->cstat, CSTAT_SPRITE_ALIGNMENT) == CSTAT_SPRITE_ALIGNMENT_SLAB) + RESET(sp->cstat, CSTAT_SPRITE_ALIGNMENT_SLAB); // if BLOCK is set set BLOCK_HITSCAN // Hope this doesn't screw up anything @@ -1904,7 +1904,7 @@ SpriteSetup(void) short track_num; // skip this sprite, just for numbering walls/sectors - if (TEST(sprite[SpriteNum].cstat, CSTAT_SPRITE_WALL)) + if (TEST(sprite[SpriteNum].cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) continue; track_num = sprite[SpriteNum].picnum - TRACK_SPRITE + 0; @@ -3127,7 +3127,7 @@ KeyMain: u->spal = sprite[SpriteNum].pal; // Set the palette from build - //SET(sp->cstat, CSTAT_SPRITE_WALL); + //SET(sp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); ChangeState(SpriteNum, s_Key[num]); @@ -4595,7 +4595,7 @@ int SpawnItemsMatch(short match) // need to set the palette here - suggest table lookup u->spal = sprite[SpriteNum].pal = KeyPal[num]; - //SET(sp->cstat, CSTAT_SPRITE_WALL); + //SET(sp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); ChangeState(SpriteNum, s_Key[num]); @@ -4973,7 +4973,7 @@ ActorDrop(short SpriteNum, int x, int y, int z, short new_sector, short min_heig SPRITEp hsp = &sprite[florhit & 4095]; // if its a floor sprite and not too far down - if (TEST(hsp->cstat, CSTAT_SPRITE_FLOOR) && + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR) && (labs(loz - z) <= min_height)) { return FALSE; @@ -6452,7 +6452,7 @@ KeyMain: // Attach flag to player nu->Counter = 0; RESET(np->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(np->cstat, CSTAT_SPRITE_WALL); + SET(np->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); SetAttach(pp->PlayerSprite, New); nu->sz = SPRITEp_MID(&sprite[pp->PlayerSprite]); // Set mid way up who it hit nu->spal = np->pal = sp->pal; // Set the palette of the flag diff --git a/source/sw/src/weapon.cpp b/source/sw/src/weapon.cpp index e87004ca4..a3ce50e66 100644 --- a/source/sw/src/weapon.cpp +++ b/source/sw/src/weapon.cpp @@ -4633,7 +4633,7 @@ WeaponMoveHit(short SpriteNum) //return(TRUE); } - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { if (hsp->lotag || hsp->hitag) { @@ -4694,7 +4694,7 @@ WeaponMoveHit(short SpriteNum) return TRUE; } - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { if (hsp->lotag || hsp->hitag) { @@ -8759,7 +8759,7 @@ DoPlasma(int16_t Weapon) SPRITEp hsp = &sprite[hit_sprite]; USERp hu = User[hit_sprite]; - if (TEST(hsp->cstat, CSTAT_SPRITE_BLOCK) && !TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_BLOCK) && !TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { short hcstat = hsp->cstat; @@ -9033,7 +9033,7 @@ DoGrenade(int16_t Weapon) DoMatchEverything(NULL, hsp->hitag, -1); } - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { wall_ang = NORM_ANGLE(hsp->ang); WallBounce(Weapon, wall_ang); @@ -9266,7 +9266,7 @@ DoVulcanBoulder(int16_t Weapon) hit_sprite = NORM_SPRITE(u->ret); hsp = &sprite[hit_sprite]; - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { wall_ang = NORM_ANGLE(hsp->ang); WallBounce(Weapon, wall_ang); @@ -9716,11 +9716,11 @@ DoMine(int16_t Weapon) } else { - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { SET(u->Flags2, SPR2_ATTACH_WALL); } - else if (TEST(hsp->cstat, CSTAT_SPRITE_FLOOR)) + else if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR)) { // hit floor if (sp->z > DIV2(u->hiz + u->loz)) @@ -12159,7 +12159,7 @@ DoFindGround(int16_t SpriteNum) { hsp = &sprite[NORM_SPRITE(florhit)]; - if (TEST(hsp->cstat, CSTAT_SPRITE_FLOOR)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR)) { // found a sprite floor u->lo_sp = hsp; @@ -12219,7 +12219,7 @@ DoFindGroundPoint(int16_t SpriteNum) { hsp = &sprite[NORM_SPRITE(florhit)]; - if (TEST(hsp->cstat, CSTAT_SPRITE_FLOOR)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR)) { // found a sprite floor u->lo_sp = hsp; @@ -12296,7 +12296,7 @@ DoNapalm(int16_t Weapon) { SPRITEp hsp = &sprite[NORM_SPRITE(u->ret)]; - if (TEST(hsp->cstat, CSTAT_SPRITE_BLOCK) && !TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_BLOCK) && !TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { short hcstat = hsp->cstat; @@ -12728,7 +12728,7 @@ DoMirv(int16_t Weapon) { SPRITEp hsp = &sprite[NORM_SPRITE(u->ret)]; - if (TEST(hsp->cstat, CSTAT_SPRITE_BLOCK) && !TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_BLOCK) && !TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { short hcstat = hsp->cstat; @@ -13953,7 +13953,7 @@ InitSwordAttack(PLAYERp pp) } // hit a switch? - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL) && (hsp->lotag || hsp->hitag)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL) && (hsp->lotag || hsp->hitag)) { ShootableSwitch(hitinfo.sprite,-1); } @@ -14145,7 +14145,7 @@ InitFistAttack(PLAYERp pp) } // hit a switch? - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL) && (hsp->lotag || hsp->hitag)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL) && (hsp->lotag || hsp->hitag)) { ShootableSwitch(hitinfo.sprite,-1); } @@ -14753,7 +14753,7 @@ InitStar(PLAYERp pp) // PlaySound(DIGI_STARWIZ, &wp->x, &wp->y, &wp->z, v3df_follow); // Set3DSoundOwner(w); - //SET(wp->cstat, CSTAT_SPRITE_WALL); + //SET(wp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); SetOwner(pp->PlayerSprite, w); wp->yrepeat = wp->xrepeat = STAR_REPEAT; wp->shade = -25; @@ -15048,7 +15048,7 @@ int ContinueHitscan(PLAYERp pp, short sectnum, int x, int y, int z, short ang, i return 0; // hit a switch? - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL) && (hsp->lotag || hsp->hitag)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL) && (hsp->lotag || hsp->hitag)) { ShootableSwitch(hitinfo.sprite,-1); } @@ -15224,7 +15224,7 @@ InitShotgun(PLAYERp pp) continue; // hit a switch? - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL) && (hsp->lotag || hsp->hitag)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL) && (hsp->lotag || hsp->hitag)) { ShootableSwitch(hitinfo.sprite,-1); } @@ -17816,9 +17816,9 @@ int SpawnWallHole(short hit_sect, short hit_wall, int hit_x, int hit_y, int hit_ sp->z = hit_z; sp->picnum = 2151; - //SET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_WALL); - SET(sp->cstat, CSTAT_SPRITE_WALL); - SET(sp->cstat, CSTAT_SPRITE_ONE_SIDE); + //SET(sp->cstat, CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_ALIGNMENT_WALL); + SET(sp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); + SET(sp->cstat, CSTAT_SPRITE_ONE_SIDED); w = hit_wall; nw = wall[w].point2; @@ -18046,7 +18046,7 @@ InitUzi(PLAYERp pp) return 0; // hit a switch? - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL) && (hsp->lotag || hsp->hitag)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL) && (hsp->lotag || hsp->hitag)) { ShootableSwitch(hitinfo.sprite,-1); } @@ -18225,7 +18225,7 @@ InitEMP(PLAYERp pp) //return(0); // hit a switch? - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL) && (hsp->lotag || hsp->hitag)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL) && (hsp->lotag || hsp->hitag)) { ShootableSwitch(hitinfo.sprite,-1); } @@ -18240,11 +18240,11 @@ InitEMP(PLAYERp pp) } else { - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { SET(wu->Flags2, SPR2_ATTACH_WALL); } - else if (TEST(hsp->cstat, CSTAT_SPRITE_FLOOR)) + else if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR)) { // hit floor if (wp->z > DIV2(wu->hiz + wu->loz)) @@ -18740,7 +18740,7 @@ InitSobjMachineGun(short SpriteNum, PLAYERp pp) return 0; // hit a switch? - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL) && (hsp->lotag || hsp->hitag)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL) && (hsp->lotag || hsp->hitag)) { ShootableSwitch(hitinfo.sprite,-1); } @@ -19183,7 +19183,7 @@ InitTurretMgun(SECTOR_OBJECTp sop) continue; // hit a switch? - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL) && (hsp->lotag || hsp->hitag)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL) && (hsp->lotag || hsp->hitag)) { ShootableSwitch(hitinfo.sprite,-1); } @@ -20736,8 +20736,8 @@ int QueueHole(short ang, short hit_sect, short hit_wall, int hit_x, int hit_y, i ASSERT(sp->statnum != MAXSTATUS); - SET(sp->cstat, CSTAT_SPRITE_WALL); - SET(sp->cstat, CSTAT_SPRITE_ONE_SIDE); + SET(sp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); + SET(sp->cstat, CSTAT_SPRITE_ONE_SIDED); RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); w = hit_wall; @@ -20822,8 +20822,8 @@ int QueueFloorBlood(short hit_sprite) sp->ang = RANDOM_P2(2048); // Just make it any old angle sp->shade -= 5; // Brighten it up just a bit - SET(sp->cstat, CSTAT_SPRITE_FLOOR); - SET(sp->cstat, CSTAT_SPRITE_ONE_SIDE); + SET(sp->cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR); + SET(sp->cstat, CSTAT_SPRITE_ONE_SIDED); RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); RESET(u->Flags, SPR_SHADOW); @@ -20943,8 +20943,8 @@ int QueueFootPrint(short hit_sprite) left_foot = !left_foot; if (left_foot) SET(sp->cstat, CSTAT_SPRITE_XFLIP); - SET(sp->cstat, CSTAT_SPRITE_FLOOR); - SET(sp->cstat, CSTAT_SPRITE_ONE_SIDE); + SET(sp->cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR); + SET(sp->cstat, CSTAT_SPRITE_ONE_SIDED); RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); return SpriteNum; @@ -21064,8 +21064,8 @@ int QueueWallBlood(short hit_sprite, short ang) sp->shade -= 5; // Brighten it up just a bit sp->yvel = hitinfo.wall; // pass hitinfo.wall in yvel - SET(sp->cstat, CSTAT_SPRITE_WALL); - SET(sp->cstat, CSTAT_SPRITE_ONE_SIDE); + SET(sp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); + SET(sp->cstat, CSTAT_SPRITE_ONE_SIDED); SET(sp->cstat, CSTAT_SPRITE_YCENTER); RESET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); @@ -21689,7 +21689,7 @@ DoItemFly(int16_t SpriteNum) hit_sprite = NORM_SPRITE(u->ret); hsp = &sprite[hit_sprite]; - if (TEST(hsp->cstat, CSTAT_SPRITE_WALL)) + if (TEST(hsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { wall_ang = NORM_ANGLE(hsp->ang); WallBounce(SpriteNum, wall_ang);