diff --git a/source/games/sw/src/ai.cpp b/source/games/sw/src/ai.cpp index 56b31a0d8..91dddc34e 100644 --- a/source/games/sw/src/ai.cpp +++ b/source/games/sw/src/ai.cpp @@ -374,7 +374,7 @@ TARGETACTOR: if (itActor == actor || !itActor->hasU()) continue; - if (TEST(itActor->user.Flags, SPR_SUICIDE | SPR_DEAD)) + if ((itActor->user.Flags & (SPR_SUICIDE | SPR_DEAD))) continue; DISTANCE(actor->spr.pos.X, actor->spr.pos.Y, itActor->spr.pos.X, itActor->spr.pos.Y, dist, a, b, c); diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 48b97feaf..2cd29b156 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -768,7 +768,7 @@ void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int viewx, int vie if (Player[screenpeek].actor == tActor) { pp = Player + screenpeek; - if (display_mirror || TEST(pp->Flags, PF_VIEW_FROM_OUTSIDE|PF_VIEW_FROM_CAMERA)) + if (display_mirror || (pp->Flags & (PF_VIEW_FROM_OUTSIDE|PF_VIEW_FROM_CAMERA))) { if (pp->Flags & (PF_VIEW_FROM_OUTSIDE)) tsp->cstat |= (CSTAT_SPRITE_TRANSLUCENT); diff --git a/source/games/sw/src/panel.cpp b/source/games/sw/src/panel.cpp index 9cb054e42..a93fbe01b 100644 --- a/source/games/sw/src/panel.cpp +++ b/source/games/sw/src/panel.cpp @@ -6580,7 +6580,7 @@ void pDisplaySprites(PLAYERp pp, double smoothratio) } // shading - if (psp->State && TEST(psp->State->flags, psf_ShadeHalf|psf_ShadeNone)) + if (psp->State && (psp->State->flags & (psf_ShadeHalf|psf_ShadeNone))) { if ((psp->State->flags & psf_ShadeNone)) shade = 0; diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 3ce36e3ae..9b8bdbaee 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -2573,7 +2573,7 @@ void DoPlayerMoveVehicle(PLAYERp pp) { for(auto& wal : wallsofsector(*sectp)) { - if (wal.extra && TEST(wal.extra, WALLFX_LOOP_OUTER|WALLFX_LOOP_OUTER_SECONDARY) == WALLFX_LOOP_OUTER) + if (wal.extra && (wal.extra & (WALLFX_LOOP_OUTER|WALLFX_LOOP_OUTER_SECONDARY)) == WALLFX_LOOP_OUTER) { x[count] = wal.pos.X; y[count] = wal.pos.Y; @@ -5940,7 +5940,7 @@ void DoPlayerDeathFlip(PLAYERp pp) DoPlayerDeathZrange(pp); - if (TEST(pp->Flags,PF_JUMPING|PF_FALLING)) + if ((pp->Flags & (PF_JUMPING|PF_FALLING))) { if ((pp->Flags & PF_JUMPING)) { @@ -5977,7 +5977,7 @@ void DoPlayerDeathDrown(PLAYERp pp) DoPlayerDeathZrange(pp); - if (TEST(pp->Flags,PF_JUMPING|PF_FALLING)) + if ((pp->Flags & (PF_JUMPING|PF_FALLING))) { if ((pp->Flags & PF_JUMPING)) { @@ -6045,7 +6045,7 @@ void DoPlayerDeathCrumble(PLAYERp pp) DoPlayerDeathZrange(pp); - if (TEST(pp->Flags,PF_JUMPING|PF_FALLING)) + if ((pp->Flags & (PF_JUMPING|PF_FALLING))) { if ((pp->Flags & PF_JUMPING)) { @@ -6097,7 +6097,7 @@ void DoPlayerDeathExplode(PLAYERp pp) DoPlayerDeathZrange(pp); - if (TEST(pp->Flags,PF_JUMPING|PF_FALLING)) + if ((pp->Flags & (PF_JUMPING|PF_FALLING))) { if ((pp->Flags & PF_JUMPING)) { @@ -6439,7 +6439,7 @@ void ChopsCheck(PLAYERp pp) if (!M_Active() && !(pp->Flags & PF_DEAD) && !pp->sop_riding && numplayers <= 1) { if (pp->input.actions & ~SB_RUN || pp->input.fvel || pp->input.svel || pp->input.avel || pp->input.horz || - TEST(pp->Flags, PF_CLIMBING | PF_FALLING | PF_DIVING)) + (pp->Flags & (PF_CLIMBING | PF_FALLING | PF_DIVING))) { // Hit a input key or other reason to stop chops //if (pp->Chops && pp->Chops->State != pp->Chops->State->RetractState) diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 21f510ddf..327e7e2ef 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -2672,7 +2672,7 @@ void DoSector(void) } // force sync SOs to be updated regularly - if ((sync_flag = TEST(sop->flags, SOBJ_SYNC1|SOBJ_SYNC2)) != 0) + if ((sync_flag = (sop->flags & (SOBJ_SYNC1|SOBJ_SYNC2))) != 0) { if (sync_flag == SOBJ_SYNC1) MoveSectorObjects(sop, synctics); diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index 228c0689e..b439ff2ec 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -1508,7 +1508,7 @@ void SpriteSetupPost(void) if (jActor->spr.picnum == ST1) continue; - if (TEST(jActor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_WALL|CSTAT_SPRITE_ALIGNMENT_FLOOR)) + if ((jActor->spr.cstat & (CSTAT_SPRITE_ALIGNMENT_WALL|CSTAT_SPRITE_ALIGNMENT_FLOOR))) continue; if (jActor->hasU()) diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index 3a92d98d3..6ea812fca 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -1612,13 +1612,13 @@ void MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny) for (sectp = sop->sectp, j = 0; *sectp; sectp++, j++) { - if (TEST(sop->flags, SOBJ_SPRITE_OBJ | SOBJ_DONT_ROTATE)) + if ((sop->flags & (SOBJ_SPRITE_OBJ | SOBJ_DONT_ROTATE))) goto PlayerPart; // move all walls in sectors for(auto& wal : wallsofsector(*sectp)) { - if (TEST(wal.extra, WALLFX_LOOP_DONT_SPIN | WALLFX_DONT_MOVE)) + if ((wal.extra & (WALLFX_LOOP_DONT_SPIN | WALLFX_DONT_MOVE))) continue; if (wal.extra && (wal.extra & WALLFX_LOOP_OUTER)) @@ -2227,7 +2227,7 @@ void MoveSectorObjects(SECTOR_OBJECTp sop, short locktics) else { // Update the points so there will be no warping - if (TEST(sop->flags, SOBJ_UPDATE|SOBJ_UPDATE_ONCE) || + if ((sop->flags & (SOBJ_UPDATE|SOBJ_UPDATE_ONCE)) || sop->vel || (sop->ang != sop->ang_tgt) || GlobSpeedSO) diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index c1c587521..c7296e790 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -17423,7 +17423,7 @@ bool TestDontStick(DSWActor* actor, walltype* hit_wall) bool TestDontStickSector(sectortype* hit_sect) { - if (TEST(hit_sect->extra, SECTFX_DYNAMIC_AREA|SECTFX_SECTOR_OBJECT)) + if ((hit_sect->extra & (SECTFX_DYNAMIC_AREA|SECTFX_SECTOR_OBJECT))) return true; return false;