mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-29 07:21:54 +00:00
- SW: Use BIT()
inline in a few places that were changed in "- SW: Replace the last few remaining TEST()
macro uses and remove from mytypes.h
."
Originally, `BIT()` was going to be dropped in a subsequent commit but we've elected not to.
This commit is contained in:
parent
c61d82cead
commit
1b077251e3
4 changed files with 8 additions and 8 deletions
|
@ -349,8 +349,8 @@ void PlayerUpdateAmmo(PLAYERp pp, short UpdateWeaponNum, short value)
|
||||||
if (pp->WpnAmmo[WeaponNum] <= 0)
|
if (pp->WpnAmmo[WeaponNum] <= 0)
|
||||||
{
|
{
|
||||||
// star and mine
|
// star and mine
|
||||||
if (WeaponIsAmmo & (1 << WeaponNum))
|
if (WeaponIsAmmo & BIT(WeaponNum))
|
||||||
pp->WpnFlags &= ~(1 << WeaponNum);
|
pp->WpnFlags &= ~BIT(WeaponNum);
|
||||||
|
|
||||||
pp->WpnAmmo[WeaponNum] = 0;
|
pp->WpnAmmo[WeaponNum] = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1121,7 +1121,7 @@ void KillMatchingCrackSprites(short match)
|
||||||
{
|
{
|
||||||
if (actor->spr.hitag == match)
|
if (actor->spr.hitag == match)
|
||||||
{
|
{
|
||||||
if (SP_TAG8(actor) & (1 << 2))
|
if (SP_TAG8(actor) & BIT(2))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
KillActor(actor);
|
KillActor(actor);
|
||||||
|
|
|
@ -1641,10 +1641,10 @@ void SpriteSetup(void)
|
||||||
actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);;
|
actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SP_TAG8(actor) & (1 << 0))
|
if (SP_TAG8(actor) & BIT(0))
|
||||||
actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
|
actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);
|
||||||
|
|
||||||
if (SP_TAG8(actor) & (1 << 1))
|
if (SP_TAG8(actor) & BIT(1))
|
||||||
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE);
|
actor->spr.cstat &= ~(CSTAT_SPRITE_INVISIBLE);
|
||||||
|
|
||||||
change_actor_stat(actor, STAT_SPRITE_HIT_MATCH);
|
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))
|
if (actor->user.Flags2 & (SPR2_NEVER_RESPAWN))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (pp->WpnGotOnceFlags & (1 << WPN))
|
if (pp->WpnGotOnceFlags & BIT(WPN))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -4967,7 +4967,7 @@ bool CanGetWeapon(PLAYERp pp, DSWActor* actor, int WPN)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// No Respawn - can't get a weapon again if you already got it
|
// 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 false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -8230,7 +8230,7 @@ int DoGrenade(DSWActor* actor)
|
||||||
// special case so grenade can ring gong
|
// special case so grenade can ring gong
|
||||||
if (hitActor->spr.lotag == TAG_SPRITE_HIT_MATCH)
|
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);
|
DoMatchEverything(nullptr, hitActor->spr.hitag, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue