diff --git a/source/games/sw/src/panel.cpp b/source/games/sw/src/panel.cpp index 1b9e5f7d7..c9459e37c 100644 --- a/source/games/sw/src/panel.cpp +++ b/source/games/sw/src/panel.cpp @@ -349,8 +349,8 @@ void PlayerUpdateAmmo(PLAYERp pp, short UpdateWeaponNum, short value) if (pp->WpnAmmo[WeaponNum] <= 0) { // star and mine - if (WeaponIsAmmo & (1 << WeaponNum)) - pp->WpnFlags &= ~(1 << WeaponNum); + if (WeaponIsAmmo & BIT(WeaponNum)) + pp->WpnFlags &= ~BIT(WeaponNum); pp->WpnAmmo[WeaponNum] = 0; } diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 9cf56bcec..b4edc5a80 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -1121,7 +1121,7 @@ void KillMatchingCrackSprites(short match) { if (actor->spr.hitag == match) { - if (SP_TAG8(actor) & (1 << 2)) + if (SP_TAG8(actor) & BIT(2)) continue; KillActor(actor); diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index a27630988..b1400e08e 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -1641,10 +1641,10 @@ void SpriteSetup(void) actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);; } - if (SP_TAG8(actor) & (1 << 0)) + if (SP_TAG8(actor) & BIT(0)) actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); - if (SP_TAG8(actor) & (1 << 1)) + if (SP_TAG8(actor) & BIT(1)) actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE); change_actor_stat(actor, STAT_SPRITE_HIT_MATCH); @@ -4955,7 +4955,7 @@ bool CanGetWeapon(PLAYERp pp, DSWActor* actor, int WPN) if (actor->user.Flags2 & (SPR2_NEVER_RESPAWN)) return true; - if (pp->WpnGotOnceFlags & (1 << WPN)) + if (pp->WpnGotOnceFlags & BIT(WPN)) return false; return true; @@ -4967,7 +4967,7 @@ bool CanGetWeapon(PLAYERp pp, DSWActor* actor, int WPN) return true; // No Respawn - can't get a weapon again if you already got it - if (gNet.NoRespawn && (pp->WpnGotOnceFlags & (1 << WPN))) + if (gNet.NoRespawn && (pp->WpnGotOnceFlags & BIT(WPN))) return false; return true; diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index a01ee397a..95eca2f32 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -8230,7 +8230,7 @@ int DoGrenade(DSWActor* actor) // special case so grenade can ring gong if (hitActor->spr.lotag == TAG_SPRITE_HIT_MATCH) { - if (SP_TAG8(hitActor) & (1 << 3)) + if (SP_TAG8(hitActor) & BIT(3)) DoMatchEverything(nullptr, hitActor->spr.hitag, -1); }