From fe292fce0d60f7020bd22ceb0e13c50bb59b238d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 27 Dec 2021 17:43:00 +0100 Subject: [PATCH] - yet more SET flag replacements 90% done. --- source/games/sw/src/_polymost.cpp | 4 +-- source/games/sw/src/actor.cpp | 2 +- source/games/sw/src/break.cpp | 8 ++--- source/games/sw/src/coolg.cpp | 2 +- source/games/sw/src/coolie.cpp | 4 +-- source/games/sw/src/draw.cpp | 22 ++++++------ source/games/sw/src/inv.cpp | 2 +- source/games/sw/src/jweapon.cpp | 4 +-- source/games/sw/src/ninja.cpp | 8 ++--- source/games/sw/src/panel.cpp | 26 +++++++------- source/games/sw/src/player.cpp | 20 +++++------ source/games/sw/src/rooms.cpp | 4 +-- source/games/sw/src/sector.cpp | 14 ++++---- source/games/sw/src/sprite.cpp | 58 +++++++++++++++---------------- source/games/sw/src/track.cpp | 12 +++---- source/games/sw/src/weapon.cpp | 44 +++++++++++------------ source/games/sw/src/zombie.cpp | 4 +-- 17 files changed, 119 insertions(+), 119 deletions(-) diff --git a/source/games/sw/src/_polymost.cpp b/source/games/sw/src/_polymost.cpp index 6e5ddf435..d7a6f7f72 100644 --- a/source/games/sw/src/_polymost.cpp +++ b/source/games/sw/src/_polymost.cpp @@ -100,7 +100,7 @@ void FAF_DrawRooms(int x, int y, int z, fixed_t q16ang, fixed_t q16horiz, int se SP_TAG5(actor) = actor->spr.sector()->ceilingpicnum; actor->spr.sector()->ceilingpicnum = SP_TAG2(actor); SP_TAG4(actor) = actor->spr.sector()->ceilingstat; - SET(actor->spr.sector()->ceilingstat, ESectorFlags::FromInt(SP_TAG6(actor))); + actor->spr.sector()->ceilingstat |= (ESectorFlags::FromInt(SP_TAG6(actor))); RESET(actor->spr.sector()->ceilingstat, CSTAT_SECTOR_SKY); } else if (SP_TAG3(actor) == 1) @@ -108,7 +108,7 @@ void FAF_DrawRooms(int x, int y, int z, fixed_t q16ang, fixed_t q16horiz, int se SP_TAG5(actor) = actor->spr.sector()->floorpicnum; actor->spr.sector()->floorpicnum = SP_TAG2(actor); SP_TAG4(actor) = actor->spr.sector()->floorstat; - SET(actor->spr.sector()->floorstat, ESectorFlags::FromInt(SP_TAG6(actor))); + actor->spr.sector()->floorstat |= (ESectorFlags::FromInt(SP_TAG6(actor))); RESET(actor->spr.sector()->floorstat, CSTAT_SECTOR_SKY); } } diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp index 82719409a..6b29ad0fc 100644 --- a/source/games/sw/src/actor.cpp +++ b/source/games/sw/src/actor.cpp @@ -93,7 +93,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) actor->user.floor_dist = Z(40); // test for gibable dead bodies - SET(actor->spr.extra, SPRX_BREAKABLE); + actor->spr.extra |= (SPRX_BREAKABLE); actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); if (weapActor == nullptr) diff --git a/source/games/sw/src/break.cpp b/source/games/sw/src/break.cpp index b3353eb92..de7e71673 100644 --- a/source/games/sw/src/break.cpp +++ b/source/games/sw/src/break.cpp @@ -474,7 +474,7 @@ BREAK_INFOp SetupWallForBreak(WALLp wallp) if (break_info) { wallp->lotag = TAG_WALL_BREAK; - SET(wallp->extra, WALLFX_DONT_STICK); + wallp->extra |= (WALLFX_DONT_STICK); } if (wallp->overpicnum > 0 && TEST(wallp->cstat, CSTAT_WALL_MASKED)) @@ -483,7 +483,7 @@ BREAK_INFOp SetupWallForBreak(WALLp wallp) if (break_info) { wallp->lotag = TAG_WALL_BREAK; - SET(wallp->extra, WALLFX_DONT_STICK); + wallp->extra |= (WALLFX_DONT_STICK); } } @@ -514,9 +514,9 @@ BREAK_INFOp SetupSpriteForBreak(DSWActor* actor) } if (TEST(break_info->flags, BF_BURN)) - SET(actor->spr.extra, SPRX_BURNABLE); + actor->spr.extra |= (SPRX_BURNABLE); else - SET(actor->spr.extra, SPRX_BREAKABLE); + actor->spr.extra |= (SPRX_BREAKABLE); actor->spr.clipdist = ActorSizeX(actor); diff --git a/source/games/sw/src/coolg.cpp b/source/games/sw/src/coolg.cpp index edba6e6fa..5adec0d1d 100644 --- a/source/games/sw/src/coolg.cpp +++ b/source/games/sw/src/coolg.cpp @@ -509,7 +509,7 @@ void CoolgCommon(DSWActor* actor) actor->spr.xrepeat = 42; actor->spr.yrepeat = 42; - SET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY); + actor->spr.extra |= (SPRX_PLAYER_OR_ENEMY); } int SetupCoolg(DSWActor* actor) diff --git a/source/games/sw/src/coolie.cpp b/source/games/sw/src/coolie.cpp index 97ae1a2be..6047c7c76 100644 --- a/source/games/sw/src/coolie.cpp +++ b/source/games/sw/src/coolie.cpp @@ -419,8 +419,8 @@ void EnemyDefaults(DSWActor* actor, ACTOR_ACTION_SETp action, PERSONALITYp perso actor->user.PainThreshold = (actor->user.Health >> 4) - 1; - SET(actor->spr.cstat,CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actor->spr.extra,SPRX_PLAYER_OR_ENEMY); + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actor->spr.extra |= (SPRX_PLAYER_OR_ENEMY); actor->spr.picnum = actor->user.State->Pic; change_actor_stat(actor, STAT_ENEMY); diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 5290f390c..8c1b0f022 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -130,7 +130,7 @@ int GetRotation(tspritetype* tsprite, int& spritesortcnt, int tSpriteNum, int vi else { rotation = (8 - rotation); - SET(tsp->cstat, CSTAT_SPRITE_XFLIP); // clear x-flipping bit + tsp->cstat |= (CSTAT_SPRITE_XFLIP); // clear x-flipping bit } } else @@ -143,7 +143,7 @@ int GetRotation(tspritetype* tsprite, int& spritesortcnt, int tSpriteNum, int vi else { rotation = (8 - rotation); - SET(tsp->cstat, CSTAT_SPRITE_XFLIP); // set + tsp->cstat |= (CSTAT_SPRITE_XFLIP); // set } } @@ -517,12 +517,12 @@ void DoStarView(tspriteptr_t tsp, DSWActor* tActor, int viewz) tsp->picnum = s_StarDown[tActor->user.State - s_Star].Pic; if (zdiff > 0) - SET(tsp->cstat, CSTAT_SPRITE_YFLIP); + tsp->cstat |= (CSTAT_SPRITE_YFLIP); } else { if (zdiff > 0) - SET(tsp->cstat, CSTAT_SPRITE_YFLIP); + tsp->cstat |= (CSTAT_SPRITE_YFLIP); } } @@ -685,7 +685,7 @@ void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int viewx, int vie tsp->picnum = DART_PIC; tsp->ang = NORM_ANGLE(tsp->ang - 512 - 24); tsp->xrepeat = tsp->yrepeat = DART_REPEAT; - SET(tsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); + tsp->cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL); } else DoStarView(tsp, tActor, viewz); @@ -749,7 +749,7 @@ void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int viewx, int vie tsp->picnum = DART_PIC; tsp->ang = NORM_ANGLE(tsp->ang - 512); tsp->xrepeat = tsp->yrepeat = DART_REPEAT; - SET(tsp->cstat, CSTAT_SPRITE_ALIGNMENT_WALL); + tsp->cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL); } // Call my sprite handler @@ -771,7 +771,7 @@ void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int viewx, int vie if (display_mirror || TEST(pp->Flags, PF_VIEW_FROM_OUTSIDE|PF_VIEW_FROM_CAMERA)) { if (TEST(pp->Flags, PF_VIEW_FROM_OUTSIDE)) - SET(tsp->cstat, CSTAT_SPRITE_TRANSLUCENT); + tsp->cstat |= (CSTAT_SPRITE_TRANSLUCENT); if (TEST(pp->Flags, PF_CLIMBING)) { @@ -794,7 +794,7 @@ void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int viewx, int vie { // dont draw your sprite tsp->ownerActor = nullptr; - //SET(tsp->cstat, CSTAT_SPRITE_INVISIBLE); + //tsp->cstat |= (CSTAT_SPRITE_INVISIBLE); } } else // Otherwise just interpolate the player sprite @@ -1230,7 +1230,7 @@ void PostDraw(void) SWStatIterator it(STAT_FLOOR_SLOPE_DONT_DRAW); while (auto actor = it.Next()) { - SET(actor->spr.sector()->floorstat, CSTAT_SECTOR_SLOPE); + actor->spr.sector()->floorstat |= (CSTAT_SECTOR_SLOPE); } it.Reset(STAT_FAF_COPY); @@ -1342,7 +1342,7 @@ void UpdateWallPortalState() SP_TAG5(actor) = actor->spr.sector()->ceilingpicnum; actor->spr.sector()->ceilingpicnum = SP_TAG2(actor); SP_TAG4(actor) = actor->spr.sector()->ceilingstat; - SET(actor->spr.sector()->ceilingstat, ESectorFlags::FromInt(SP_TAG6(actor))); + actor->spr.sector()->ceilingstat |= (ESectorFlags::FromInt(SP_TAG6(actor))); RESET(actor->spr.sector()->ceilingstat, CSTAT_SECTOR_SKY); } else if (SP_TAG3(actor) == 1) @@ -1350,7 +1350,7 @@ void UpdateWallPortalState() SP_TAG5(actor) = actor->spr.sector()->floorpicnum; actor->spr.sector()->floorpicnum = SP_TAG2(actor); SP_TAG4(actor) = actor->spr.sector()->floorstat; - SET(actor->spr.sector()->floorstat, ESectorFlags::FromInt(SP_TAG6(actor))); + actor->spr.sector()->floorstat |= (ESectorFlags::FromInt(SP_TAG6(actor))); RESET(actor->spr.sector()->floorstat, CSTAT_SECTOR_SKY); } } diff --git a/source/games/sw/src/inv.cpp b/source/games/sw/src/inv.cpp index 14d1fc4d1..dd7000155 100644 --- a/source/games/sw/src/inv.cpp +++ b/source/games/sw/src/inv.cpp @@ -299,7 +299,7 @@ void UseInventoryCloak(PLAYERp pp) // on/off PlayerUpdateInventory(pp, pp->InventoryNum); - SET(plActor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT); + plActor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT); plActor->spr.shade = 100; PlaySound(DIGI_GASPOP, pp, v3df_none); diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index 548a323a7..d68606c84 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -1079,7 +1079,7 @@ int DoCaltrops(DSWActor* actor) else { actor->user.xchange = actor->user.ychange = 0; - SET(actor->spr.extra, SPRX_BREAKABLE); + actor->spr.extra |= (SPRX_BREAKABLE); SET(actor->spr.cstat,CSTAT_SPRITE_BREAKABLE); ChangeState(actor, s_CaltropsStick); return true; @@ -1117,7 +1117,7 @@ int DoCaltrops(DSWActor* actor) else { actor->user.xchange = actor->user.ychange = 0; - SET(actor->spr.extra, SPRX_BREAKABLE); + actor->spr.extra |= (SPRX_BREAKABLE); SET(actor->spr.cstat,CSTAT_SPRITE_BREAKABLE); ChangeState(actor, s_CaltropsStick); return true; diff --git a/source/games/sw/src/ninja.cpp b/source/games/sw/src/ninja.cpp index 1ea79fb00..853e47f3a 100644 --- a/source/games/sw/src/ninja.cpp +++ b/source/games/sw/src/ninja.cpp @@ -1940,7 +1940,7 @@ int DoNinjaHariKari(DSWActor* actor) actor->user.RotNum = 0; actor->user.ActorActionFunc = nullptr; - SET(actor->spr.extra, SPRX_BREAKABLE); + actor->spr.extra |= (SPRX_BREAKABLE); actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); PlaySound(DIGI_NINJAUZIATTACK, actor, v3df_follow); @@ -1969,7 +1969,7 @@ int DoNinjaGrabThroat(DSWActor* actor) actor->user.RotNum = 0; actor->user.ActorActionFunc = nullptr; - SET(actor->spr.extra, SPRX_BREAKABLE); + actor->spr.extra |= (SPRX_BREAKABLE); actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); @@ -2333,7 +2333,7 @@ void InitPlayerSprite(PLAYERp pp) pp->pnum = pnum; actor->spr.cstat |= (CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY); + actor->spr.extra |= (SPRX_PLAYER_OR_ENEMY); RESET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT); // Grouping items that need to be reset after a LoadLevel @@ -2400,7 +2400,7 @@ void SpawnPlayerUnderSprite(PLAYERp pp) DSWActor* actor = pp->PlayerUnderActor; actor->spr.cstat |= (CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY); + actor->spr.extra |= (SPRX_PLAYER_OR_ENEMY); actor->user.Rot = sg_NinjaRun; actor->user.RotNum = plActor->user.RotNum; diff --git a/source/games/sw/src/panel.cpp b/source/games/sw/src/panel.cpp index 91a40033e..c0cb351b7 100644 --- a/source/games/sw/src/panel.cpp +++ b/source/games/sw/src/panel.cpp @@ -1750,7 +1750,7 @@ void pSpawnUziClip(PANEL_SPRITEp gun) if (TEST(gun->flags, PANF_XFLIP)) { New = pSpawnSprite(gun->PlayerP, ps_UziClip, PRI_BACK, gun->x - UZI_CLIP_XOFF, gun->y + UZI_CLIP_YOFF); - SET(New->flags, PANF_XFLIP); + New->flags |= (PANF_XFLIP); New->ang = NORM_ANGLE(1024 + 256 + 22); New->ang = NORM_ANGLE(New->ang + 512); } @@ -1761,7 +1761,7 @@ void pSpawnUziClip(PANEL_SPRITEp gun) } New->vel = 1050; - SET(New->flags, PANF_WEAPON_SPRITE); + New->flags |= (PANF_WEAPON_SPRITE); // carry Eject sprite with clip @@ -2042,7 +2042,7 @@ PANEL_SPRITEp InitWeaponUzi2(PANEL_SPRITEp uzi_orig) uzi_orig->sibling = New; // Set up the New weapon variables - SET(New->flags, PANF_WEAPON_SPRITE); + New->flags |= (PANF_WEAPON_SPRITE); New->ActionState = &ps_FireUzi2[1]; New->RetractState = ps_RetractUzi2; New->PresentState = ps_PresentUzi2; @@ -2050,7 +2050,7 @@ PANEL_SPRITEp InitWeaponUzi2(PANEL_SPRITEp uzi_orig) pSetState(New, New->PresentState); New->sibling = uzi_orig; - SET(New->flags, PANF_SECONDARY); + New->flags |= (PANF_SECONDARY); pUziOverlays(New, CHAMBER_REST); return New; @@ -2065,10 +2065,10 @@ PANEL_SPRITEp InitWeaponUziSecondaryReload(PANEL_SPRITEp uzi_orig) New->y += tileHeight(New->picndx); New->oy = New->y; - SET(New->flags, PANF_XFLIP); + New->flags |= (PANF_XFLIP); // Set up the New weapon variables - SET(New->flags, PANF_WEAPON_SPRITE); + New->flags |= (PANF_WEAPON_SPRITE); New->ActionState = ps_UziEject; New->RetractState = ps_RetractUzi; New->PresentState = ps_PresentUzi; @@ -2077,7 +2077,7 @@ PANEL_SPRITEp InitWeaponUziSecondaryReload(PANEL_SPRITEp uzi_orig) pSetState(New, ps_PresentUziReload); New->sibling = uzi_orig; - SET(New->flags, PANF_SECONDARY|PANF_RELOAD); + New->flags |= (PANF_SECONDARY|PANF_RELOAD); return New; } @@ -4115,7 +4115,7 @@ bool pMicroOverlays(PANEL_SPRITEp psp) psp->over[MICRO_SHOT_NUM].pic = MICRO_SHOT_20; SET(psp->over[MICRO_SHOT_NUM].flags, psf_ShadeNone); - SET(psp->over[MICRO_HEAT_NUM].flags, psf_ShadeNone); + psp->over[MICRO_HEAT_NUM].flags |= (psf_ShadeNone); return true; } return false; @@ -6552,7 +6552,7 @@ void pDisplaySprites(PLAYERp pp, double smoothratio) if (pp->InventoryActive[INVENTORY_CLOAK]) { - SET(flags, RS_TRANS1); + flags |= (RS_TRANS1); } //shade = overlay_shade = DIV2(pp->cursector->floorshade + pp->cursector->ceilingshade); @@ -6574,16 +6574,16 @@ void pDisplaySprites(PLAYERp pp, double smoothratio) } if (TEST(psp->flags, PANF_TRANSLUCENT)) - SET(flags, RS_TRANS1); + flags |= (RS_TRANS1); - SET(flags, TEST(psp->flags, PANF_TRANS_FLIP)); + flags |= (TEST(psp->flags, PANF_TRANS_FLIP)); if (TEST(psp->flags, PANF_CORNER)) - SET(flags, RS_TOPLEFT); + flags |= (RS_TOPLEFT); if ((psp->State && TEST(psp->State->flags, psf_Xflip)) || TEST(psp->flags, PANF_XFLIP)) { - SET(flags, RS_XFLIPHUD); + flags |= (RS_XFLIPHUD); } // shading diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 66e57992a..83c8db2b2 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -1312,10 +1312,10 @@ void DoSpawnTeleporterEffect(DSWActor* actor) effectActor->spr.shade = -40; effectActor->spr.xrepeat = effectActor->spr.yrepeat = 42; - SET(effectActor->spr.cstat, CSTAT_SPRITE_YCENTER); + effectActor->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(effectActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(effectActor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_WALL); + effectActor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL); } void DoSpawnTeleporterEffectPlace(DSWActor* actor) @@ -1330,10 +1330,10 @@ void DoSpawnTeleporterEffectPlace(DSWActor* actor) effectActor->spr.shade = -40; effectActor->spr.xrepeat = effectActor->spr.yrepeat = 42; - SET(effectActor->spr.cstat, CSTAT_SPRITE_YCENTER); + effectActor->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(effectActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(effectActor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_WALL); + effectActor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL); } void DoPlayerWarpTeleporter(PLAYERp pp) @@ -4184,7 +4184,7 @@ void DoPlayerBeginDive(PLAYERp pp) pp->friction = PLAYER_DIVE_FRICTION; pp->ceiling_dist = PLAYER_DIVE_CEILING_DIST; pp->floor_dist = PLAYER_DIVE_FLOOR_DIST; - SET(plActor->spr.cstat, CSTAT_SPRITE_YCENTER); + plActor->spr.cstat |= (CSTAT_SPRITE_YCENTER); pp->DoPlayerAction = DoPlayerDive; //pp->z_speed = 0; @@ -4235,7 +4235,7 @@ void DoPlayerBeginDiveNoWarp(PLAYERp pp) pp->friction = PLAYER_DIVE_FRICTION; pp->ceiling_dist = PLAYER_DIVE_CEILING_DIST; pp->floor_dist = PLAYER_DIVE_FLOOR_DIST; - SET(plActor->spr.cstat, CSTAT_SPRITE_YCENTER); + plActor->spr.cstat |= (CSTAT_SPRITE_YCENTER); pp->DoPlayerAction = DoPlayerDive; pp->z_speed = 0; pp->DiveTics = PLAYER_DIVE_TIME; @@ -5566,7 +5566,7 @@ void DoPlayerBeginDie(PLAYERp pp) pp->jump_speed = -300; plActor->user.slide_vel = 0; SpawnShrap(pp->actor, nullptr); - SET(plActor->spr.cstat, CSTAT_SPRITE_YCENTER); + plActor->spr.cstat |= (CSTAT_SPRITE_YCENTER); NewStateGroup(pp->actor, sg_PlayerHeadFly); plActor->user.ID = NINJA_Head_R0; plActor->spr.xrepeat = 48; @@ -5581,7 +5581,7 @@ void DoPlayerBeginDie(PLAYERp pp) pp->Flags |= (PF_DEAD_HEAD | PF_JUMPING); pp->jump_speed = -650; SpawnShrap(pp->actor, nullptr); - SET(plActor->spr.cstat, CSTAT_SPRITE_YCENTER); + plActor->spr.cstat |= (CSTAT_SPRITE_YCENTER); NewStateGroup(pp->actor, sg_PlayerHeadFly); plActor->user.ID = NINJA_Head_R0; plActor->spr.xrepeat = 48; @@ -5599,7 +5599,7 @@ void DoPlayerBeginDie(PLAYERp pp) pp->jump_speed = 200; plActor->user.slide_vel = 800; SpawnShrap(pp->actor, nullptr); - SET(plActor->spr.cstat, CSTAT_SPRITE_YCENTER); + plActor->spr.cstat |= (CSTAT_SPRITE_YCENTER); NewStateGroup(pp->actor, sg_PlayerHeadFly); plActor->user.ID = NINJA_Head_R0; plActor->spr.xrepeat = 48; @@ -5766,7 +5766,7 @@ void DoPlayerDeathCheckKeys(PLAYERp pp) RESET(pp->Flags, PF_WEAPON_DOWN|PF_WEAPON_RETRACT); RESET(pp->Flags, PF_DEAD); RESET(plActor->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(plActor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + plActor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); pp->input.actions |= SB_CENTERVIEW; plActor->spr.xrepeat = PLAYER_NINJA_XREPEAT; plActor->spr.yrepeat = PLAYER_NINJA_YREPEAT; diff --git a/source/games/sw/src/rooms.cpp b/source/games/sw/src/rooms.cpp index 471728f6e..c8bc8ebc5 100644 --- a/source/games/sw/src/rooms.cpp +++ b/source/games/sw/src/rooms.cpp @@ -567,13 +567,13 @@ void SetupMirrorTiles(void) if (actor->spr.sector()->ceilingpicnum == FAF_PLACE_MIRROR_PIC) { actor->spr.sector()->ceilingpicnum = FAF_MIRROR_PIC; - SET(actor->spr.sector()->ceilingstat, CSTAT_SECTOR_SKY); + actor->spr.sector()->ceilingstat |= (CSTAT_SECTOR_SKY); } if (actor->spr.sector()->floorpicnum == FAF_PLACE_MIRROR_PIC) { actor->spr.sector()->floorpicnum = FAF_MIRROR_PIC; - SET(actor->spr.sector()->floorstat, CSTAT_SECTOR_SKY); + actor->spr.sector()->floorstat |= (CSTAT_SECTOR_SKY); } if (actor->spr.sector()->ceilingpicnum == FAF_PLACE_MIRROR_PIC+1) diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 31f0e1da7..24190b298 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -330,27 +330,27 @@ void SectorLiquidSet(sectortype* sectp) if (sectp->floorpicnum >= 300 && sectp->floorpicnum <= 307) { sectp->u_defined = true; - SET(sectp->extra, SECTFX_LIQUID_WATER); + sectp->extra |= (SECTFX_LIQUID_WATER); } else if (sectp->floorpicnum >= 320 && sectp->floorpicnum <= 343) { sectp->u_defined = true; - SET(sectp->extra, SECTFX_LIQUID_WATER); + sectp->extra |= (SECTFX_LIQUID_WATER); } else if (sectp->floorpicnum >= 780 && sectp->floorpicnum <= 794) { sectp->u_defined = true; - SET(sectp->extra, SECTFX_LIQUID_WATER); + sectp->extra |= (SECTFX_LIQUID_WATER); } else if (sectp->floorpicnum >= 890 && sectp->floorpicnum <= 897) { sectp->u_defined = true; - SET(sectp->extra, SECTFX_LIQUID_WATER); + sectp->extra |= (SECTFX_LIQUID_WATER); } else if (sectp->floorpicnum >= 175 && sectp->floorpicnum <= 182) { sectp->u_defined = true; - SET(sectp->extra, SECTFX_LIQUID_LAVA); + sectp->extra |= (SECTFX_LIQUID_LAVA); if (!sectp->damage) sectp->damage = 40; } @@ -414,7 +414,7 @@ void SectorSetup(void) // don't do a z adjust for FAF area if (sectp->floorpicnum != FAF_PLACE_MIRROR_PIC) { - SET(sectp->extra, SECTFX_Z_ADJUST); + sectp->extra |= (SECTFX_Z_ADJUST); } } @@ -423,7 +423,7 @@ void SectorSetup(void) // don't do a z adjust for FAF area if (sectp->ceilingpicnum != FAF_PLACE_MIRROR_PIC) { - SET(sectp->extra, SECTFX_Z_ADJUST); + sectp->extra |= (SECTFX_Z_ADJUST); } } diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index 6700daca9..94b62768b 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -1604,7 +1604,7 @@ void SpriteSetup(void) // need something that tells missiles to hit them // but allows actors to move through them actor->spr.clipdist = ActorSizeX(actor); - SET(actor->spr.extra, SPRX_BREAKABLE); + actor->spr.extra |= (SPRX_BREAKABLE); actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); break; } @@ -1765,7 +1765,7 @@ void SpriteSetup(void) sectp->u_defined = true; sectp->number = actor->spr.lotag; if (actor->spr.clipdist == 1) - SET(sectp->flags, SECTFU_CANT_SURFACE); + sectp->flags |= (SECTFU_CANT_SURFACE); change_actor_stat(actor, STAT_UNDERWATER2); } } @@ -1791,7 +1791,7 @@ void SpriteSetup(void) case SLIDE_SECTOR: sectp->u_defined = true; - SET(sectp->flags, SECTFU_SLIDE_SECTOR); + sectp->flags |= (SECTFU_SLIDE_SECTOR); sectp->speed = SP_TAG2(actor); KillActor(actor); break; @@ -1800,7 +1800,7 @@ void SpriteSetup(void) { sectp->u_defined = true; if (TEST_BOOL1(actor)) - SET(sectp->flags, SECTFU_DAMAGE_ABOVE_SECTOR); + sectp->flags |= (SECTFU_DAMAGE_ABOVE_SECTOR); sectp->damage = actor->spr.lotag; KillActor(actor); break; @@ -1824,7 +1824,7 @@ void SpriteSetup(void) case SECT_DONT_COPY_PALETTE: { sectp->u_defined = true; - SET(sectp->flags, SECTFU_DONT_COPY_PALETTE); + sectp->flags |= (SECTFU_DONT_COPY_PALETTE); KillActor(actor); break; } @@ -1939,16 +1939,16 @@ void SpriteSetup(void) if (SP_TAG7(actor) == 0 || SP_TAG7(actor) == 1) { if (SP_TAG3(actor) == 0) - SET(actor->spr.sector()->ceilingstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN); + actor->spr.sector()->ceilingstat |= (CSTAT_SECTOR_FAF_BLOCK_HITSCAN); else - SET(actor->spr.sector()->floorstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN); + actor->spr.sector()->floorstat |= (CSTAT_SECTOR_FAF_BLOCK_HITSCAN); } else if (TEST_BOOL1(actor)) { if (SP_TAG3(actor) == 0) - SET(actor->spr.sector()->ceilingstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN); + actor->spr.sector()->ceilingstat |= (CSTAT_SECTOR_FAF_BLOCK_HITSCAN); else - SET(actor->spr.sector()->floorstat, CSTAT_SECTOR_FAF_BLOCK_HITSCAN); + actor->spr.sector()->floorstat |= (CSTAT_SECTOR_FAF_BLOCK_HITSCAN); } // copy tag 7 to tag 6 and pre-shift it @@ -1998,9 +1998,9 @@ void SpriteSetup(void) if (TEST(sectp->extra, SECTFX_VATOR)) { sectp->u_defined = true; - SET(sectp->flags, SECTFU_VATOR_BOTH); + sectp->flags |= (SECTFU_VATOR_BOTH); } - SET(sectp->extra, SECTFX_VATOR); + sectp->extra |= (SECTFX_VATOR); SetSectorWallBits(actor->spr.sector(), WALLFX_DONT_STICK, true, true); actor->spr.sector()->extra |= (SECTFX_DYNAMIC_AREA); @@ -2686,7 +2686,7 @@ void SpriteSetup(void) case SECT_SO_DONT_BOB: { sectp->u_defined = true; - SET(sectp->flags, SECTFU_SO_DONT_BOB); + sectp->flags |= (SECTFU_SO_DONT_BOB); KillActor(actor); break; } @@ -2703,7 +2703,7 @@ void SpriteSetup(void) case SECT_SO_SINK_DEST: { sectp->u_defined = true; - SET(sectp->flags, SECTFU_SO_SINK_DEST); + sectp->flags |= (SECTFU_SO_SINK_DEST); sectp->number = actor->spr.lotag; // acually the offset Z // value KillActor(actor); @@ -2713,7 +2713,7 @@ void SpriteSetup(void) case SECT_SO_DONT_SINK: { sectp->u_defined = true; - SET(sectp->flags, SECTFU_SO_DONT_SINK); + sectp->flags |= (SECTFU_SO_DONT_SINK); KillActor(actor); break; } @@ -2721,8 +2721,8 @@ void SpriteSetup(void) case SO_SLOPE_FLOOR_TO_POINT: { sectp->u_defined = true; - SET(sectp->flags, SECTFU_SO_SLOPE_FLOOR_TO_POINT); - SET(sectp->extra, SECTFX_DYNAMIC_AREA); + sectp->flags |= (SECTFU_SO_SLOPE_FLOOR_TO_POINT); + sectp->extra |= (SECTFX_DYNAMIC_AREA); KillActor(actor); break; } @@ -2730,8 +2730,8 @@ void SpriteSetup(void) case SO_SLOPE_CEILING_TO_POINT: { sectp->u_defined = true; - SET(sectp->flags, SECTFU_SO_SLOPE_CEILING_TO_POINT); - SET(sectp->extra, SECTFX_DYNAMIC_AREA); + sectp->flags |= (SECTFU_SO_SLOPE_CEILING_TO_POINT); + sectp->extra |= (SECTFX_DYNAMIC_AREA); KillActor(actor); break; } @@ -3392,7 +3392,7 @@ NUKE_REPLACEMENT: RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK); actor->spr.cstat |= (CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actor->spr.extra, SPRX_BLADE); + actor->spr.extra |= (SPRX_BLADE); break; } @@ -3411,7 +3411,7 @@ NUKE_REPLACEMENT: actor->spr.clipdist = ActorSizeX(actor); actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); - SET(actor->spr.extra, SPRX_BREAKABLE); + actor->spr.extra |= (SPRX_BREAKABLE); break; // switches @@ -5356,7 +5356,7 @@ KeyMain: if (!CanGetWeapon(pp, actor, WPN_STAR)) break; - SET(pp->WpnGotOnceFlags, BIT(WPN_STAR)); + pp->WpnGotOnceFlags |= (BIT(WPN_STAR)); if (pp->WpnAmmo[WPN_STAR] >= DamageData[WPN_STAR].max_ammo) break; @@ -5383,7 +5383,7 @@ KeyMain: if (!CanGetWeapon(pp, actor, WPN_MINE)) break; - SET(pp->WpnGotOnceFlags, BIT(WPN_MINE)); + pp->WpnGotOnceFlags |= (BIT(WPN_MINE)); if (pp->WpnAmmo[WPN_MINE] >= DamageData[WPN_MINE].max_ammo) break; @@ -5412,7 +5412,7 @@ KeyMain: if (!CanGetWeapon(pp, actor, WPN_UZI)) break; - SET(pp->WpnGotOnceFlags, BIT(WPN_UZI)); + pp->WpnGotOnceFlags |= (BIT(WPN_UZI)); if (TEST(pp->Flags, PF_TWO_UZI) && pp->WpnAmmo[WPN_UZI] >= DamageData[WPN_UZI].max_ammo) break; @@ -5468,7 +5468,7 @@ KeyMain: if (!CanGetWeapon(pp, actor, WPN_MICRO)) break; - SET(pp->WpnGotOnceFlags, BIT(WPN_MICRO)); + pp->WpnGotOnceFlags |= (BIT(WPN_MICRO)); if (TEST(pp->WpnFlags, BIT(WPN_MICRO)) && pp->WpnAmmo[WPN_MICRO] >= DamageData[WPN_MICRO].max_ammo) break; @@ -5535,7 +5535,7 @@ KeyMain: if (!CanGetWeapon(pp, actor, WPN_GRENADE)) break; - SET(pp->WpnGotOnceFlags, BIT(WPN_GRENADE)); + pp->WpnGotOnceFlags |= (BIT(WPN_GRENADE)); if (TEST(pp->WpnFlags, BIT(WPN_GRENADE)) && pp->WpnAmmo[WPN_GRENADE] >= DamageData[WPN_GRENADE].max_ammo) break; @@ -5605,7 +5605,7 @@ KeyMain: if (!CanGetWeapon(pp, actor, WPN_RAIL)) break; - SET(pp->WpnGotOnceFlags, BIT(WPN_RAIL)); + pp->WpnGotOnceFlags |= (BIT(WPN_RAIL)); if (TEST(pp->WpnFlags, BIT(WPN_RAIL)) && pp->WpnAmmo[WPN_RAIL] >= DamageData[WPN_RAIL].max_ammo) break; @@ -5653,7 +5653,7 @@ KeyMain: if (!CanGetWeapon(pp, actor, WPN_SHOTGUN)) break; - SET(pp->WpnGotOnceFlags, BIT(WPN_SHOTGUN)); + pp->WpnGotOnceFlags |= (BIT(WPN_SHOTGUN)); if (TEST(pp->WpnFlags, BIT(WPN_SHOTGUN)) && pp->WpnAmmo[WPN_SHOTGUN] >= DamageData[WPN_SHOTGUN].max_ammo) break; @@ -5720,7 +5720,7 @@ KeyMain: if (!CanGetWeapon(pp, actor, WPN_HOTHEAD)) break; - SET(pp->WpnGotOnceFlags, BIT(WPN_HOTHEAD)); + pp->WpnGotOnceFlags |= (BIT(WPN_HOTHEAD)); if (TEST(pp->WpnFlags, BIT(WPN_HOTHEAD)) && pp->WpnAmmo[WPN_HOTHEAD] >= DamageData[WPN_HOTHEAD].max_ammo) break; @@ -5765,7 +5765,7 @@ KeyMain: if (!CanGetWeapon(pp, actor, WPN_HEART)) break; - SET(pp->WpnGotOnceFlags, BIT(WPN_HEART)); + pp->WpnGotOnceFlags |= (BIT(WPN_HEART)); if (TEST(pp->WpnFlags, BIT(WPN_HEART)) && pp->WpnAmmo[WPN_HEART] >= DamageData[WPN_HEART].max_ammo) break; diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index 018713cf3..bf13ca0e7 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -341,7 +341,7 @@ void QuickJumpSetup(short stat, short lotag, short type) t = &Track[ndx]; // set track type - SET(t->ttflags, BIT(type)); + t->ttflags |= (BIT(type)); t->flags = 0; // clone point @@ -399,7 +399,7 @@ void QuickScanSetup(short stat, short lotag, short type) t = &Track[ndx]; // set track type - SET(t->ttflags, BIT(type)); + t->ttflags |= (BIT(type)); t->flags = 0; // clone point @@ -454,7 +454,7 @@ void QuickExitSetup(short stat, short type) t = &Track[ndx]; // set track type - SET(t->ttflags, BIT(type)); + t->ttflags |= (BIT(type)); t->flags = 0; // clone point @@ -505,7 +505,7 @@ void QuickLadderSetup(short stat, short lotag, short type) t = &Track[ndx]; // set track type - SET(t->ttflags, BIT(type)); + t->ttflags |= (BIT(type)); t->flags = 0; // clone point @@ -596,7 +596,7 @@ void TrackSetup(void) // set up flags for track types if (tp->tag_low == TRACK_START && tp->tag_high) - SET(t->ttflags, BIT(tp->tag_high)); + t->ttflags |= (BIT(tp->tag_high)); // while there are still sprites on this status list @@ -1051,7 +1051,7 @@ void SetupSectorObject(sectortype* sectp, short tag) sop->xmid, sop->ymid, sop->zmid, 0, 0); sop->sp_child = actorNew; actorNew->user.sop_parent = sop; - SET(actorNew->user.Flags2, SPR2_SPRITE_FAKE_BLOCK); // for damage test + actorNew->user.Flags2 |= (SPR2_SPRITE_FAKE_BLOCK); // for damage test // check for any ST1 sprites laying on the center sector SWSectIterator it(sectp); diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 36ee77c6a..17bac2958 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -5041,7 +5041,7 @@ int ActorHealth(DSWActor* actor, short amt) rnd = RANDOM_P2(1024<<4)>>4; if (rnd < 950) return true; - SET(actor->user.Flags2, SPR2_DYING); // Only let it check this once! + actor->user.Flags2 |= (SPR2_DYING); // Only let it check this once! actor->user.WaitTics = SEC(1) + SEC(RandomRange(2)); actor->user.Health = 60; PlaySound(DIGI_NINJACHOKE, actor, v3df_follow); @@ -8856,15 +8856,15 @@ int DoMine(DSWActor* actor) { if (TEST(hitActor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_WALL)) { - SET(actor->user.Flags2, SPR2_ATTACH_WALL); + actor->user.Flags2 |= (SPR2_ATTACH_WALL); } else if (TEST(hitActor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR)) { // hit floor if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1)) - SET(actor->user.Flags2, SPR2_ATTACH_FLOOR); + actor->user.Flags2 |= (SPR2_ATTACH_FLOOR); else - SET(actor->user.Flags2, SPR2_ATTACH_CEILING); + actor->user.Flags2 |= (SPR2_ATTACH_CEILING); } else { @@ -8890,7 +8890,7 @@ int DoMine(DSWActor* actor) SetMineStuck(actor); - SET(actor->user.Flags2, SPR2_ATTACH_WALL); + actor->user.Flags2 |= (SPR2_ATTACH_WALL); if (TEST(hit_wall->extra, WALLFX_SECTOR_OBJECT)) { @@ -8914,9 +8914,9 @@ int DoMine(DSWActor* actor) // hit floor if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1)) - SET(actor->user.Flags2, SPR2_ATTACH_FLOOR); + actor->user.Flags2 |= (SPR2_ATTACH_FLOOR); else - SET(actor->user.Flags2, SPR2_ATTACH_CEILING); + actor->user.Flags2 |= (SPR2_ATTACH_CEILING); if (TEST(hit_sect->extra, SECTFX_SECTOR_OBJECT)) @@ -11632,7 +11632,7 @@ void InitSpellNapalm(PLAYERp pp) actor->spr.zvel = -pp->horizon.horiz.asq16() >> 9; actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actor->user.Flags2, SPR2_BLUR_TAPER_FAST); + actor->user.Flags2 |= (SPR2_BLUR_TAPER_FAST); actor->user.floor_dist = Z(1); actor->user.ceiling_dist = Z(1); @@ -11711,7 +11711,7 @@ int InitEnemyNapalm(DSWActor* actor) actorNew->spr.clipdist = 0; actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actorNew->user.Flags2, SPR2_BLUR_TAPER_FAST); + actorNew->user.Flags2 |= (SPR2_BLUR_TAPER_FAST); actorNew->user.floor_dist = Z(1); actorNew->user.ceiling_dist = Z(1); @@ -12237,7 +12237,7 @@ int InitSumoNapalm(DSWActor* actor) actorNew->spr.clipdist = 0; actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actorNew->user.Flags2, SPR2_BLUR_TAPER_FAST); + actorNew->user.Flags2 |= (SPR2_BLUR_TAPER_FAST); actorNew->user.floor_dist = Z(1); actorNew->user.ceiling_dist = Z(1); @@ -12764,7 +12764,7 @@ void InitHeartAttack(PLAYERp pp) actorNew->spr.clipdist = 0; actorNew->spr.zvel = -pp->horizon.horiz.asq16() >> 9; RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actorNew->user.Flags2, SPR2_DONT_TARGET_OWNER); + actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER); actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); actorNew->user.floor_dist = Z(1); @@ -12937,7 +12937,7 @@ int InitShotgun(PLAYERp pp) if (labs(hit.hitpos.Z - hit.hitSector->ceilingz) <= Z(1)) { hit.hitpos.Z += Z(16); - SET(cstat, CSTAT_SPRITE_YFLIP); + cstat |= (CSTAT_SPRITE_YFLIP); if (TEST(hit.hitSector->ceilingstat, CSTAT_SECTOR_SKY)) continue; @@ -14387,7 +14387,7 @@ int InitEnemyRail(DSWActor* actor) actorNew->user.Radius = 200; actorNew->user.ceiling_dist = Z(1); actorNew->user.floor_dist = Z(1); - SET(actorNew->user.Flags2, SPR2_SO_MISSILE); + actorNew->user.Flags2 |= (SPR2_SO_MISSILE); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_INVISIBLE); actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); @@ -15275,7 +15275,7 @@ int InitUzi(PLAYERp pp) if (labs(hit.hitpos.Z - hit.hitSector->ceilingz) <= Z(1)) { hit.hitpos.Z += Z(16); - SET(cstat, CSTAT_SPRITE_YFLIP); + cstat |= (CSTAT_SPRITE_YFLIP); if (TEST(hit.hitSector->ceilingstat, CSTAT_SECTOR_SKY)) return 0; @@ -15421,7 +15421,7 @@ int InitTankShell(DSWActor* actor, PLAYERp pp) actorNew->user.Radius = 50; actorNew->user.ceiling_dist = Z(4); actorNew->user.floor_dist = Z(4); - SET(actorNew->user.Flags2, SPR2_SO_MISSILE); + actorNew->user.Flags2 |= (SPR2_SO_MISSILE); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); @@ -15560,7 +15560,7 @@ int InitTurretRocket(DSWActor* actor, PLAYERp pp) actorNew->user.Radius = 50; actorNew->user.ceiling_dist = Z(4); actorNew->user.floor_dist = Z(4); - SET(actorNew->user.Flags2, SPR2_SO_MISSILE); + actorNew->user.Flags2 |= (SPR2_SO_MISSILE); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.zvel = xs_CRoundToInt(-MulScaleF(pp->horizon.horiz.asq16(), actorNew->spr.xvel / 8., 16)); @@ -15597,7 +15597,7 @@ int InitTurretFireball(DSWActor* actor, PLAYERp pp) actorNew->user.Radius = 50; actorNew->user.ceiling_dist = Z(4); actorNew->user.floor_dist = Z(4); - SET(actorNew->user.Flags2, SPR2_SO_MISSILE); + actorNew->user.Flags2 |= (SPR2_SO_MISSILE); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.zvel = xs_CRoundToInt(-MulScaleF(pp->horizon.horiz.asq16(), actorNew->spr.xvel / 8., 16)); @@ -15648,7 +15648,7 @@ int InitTurretRail(DSWActor* actor, PLAYERp pp) actorNew->user.Radius = 200; actorNew->user.ceiling_dist = Z(1); actorNew->user.floor_dist = Z(1); - SET(actorNew->user.Flags2, SPR2_SO_MISSILE); + actorNew->user.Flags2 |= (SPR2_SO_MISSILE); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_INVISIBLE); actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); @@ -15696,7 +15696,7 @@ int InitTurretLaser(DSWActor* actor, PLAYERp pp) actorNew->user.Radius = 200; actorNew->user.ceiling_dist = Z(1); actorNew->user.floor_dist = Z(1); - SET(actorNew->user.Flags2, SPR2_SO_MISSILE); + actorNew->user.Flags2 |= (SPR2_SO_MISSILE); actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->spr.clipdist = 64L>>2; @@ -15764,7 +15764,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYERp pp) if (labs(hit.hitpos.Z - hit.hitSector->ceilingz) <= Z(1)) { hit.hitpos.Z += Z(16); - SET(cstat, CSTAT_SPRITE_YFLIP); + cstat |= (CSTAT_SPRITE_YFLIP); if (TEST(hit.hitSector->ceilingstat, CSTAT_SECTOR_SKY)) return 0; @@ -16145,7 +16145,7 @@ int InitTurretMgun(SECTOR_OBJECTp sop) if (labs(hit.hitpos.Z - hit.hitSector->ceilingz) <= Z(1)) { hit.hitpos.Z += Z(16); - SET(cstat, CSTAT_SPRITE_YFLIP); + cstat |= (CSTAT_SPRITE_YFLIP); if (TEST(hit.hitSector->ceilingstat, CSTAT_SECTOR_SKY)) continue; @@ -17967,7 +17967,7 @@ void QueueGeneric(DSWActor* actor, short pic) case GORE_Head: change_actor_stat(actor,STAT_DEFAULT); // Breakable actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); - SET(actor->spr.extra, SPRX_BREAKABLE); + actor->spr.extra |= (SPRX_BREAKABLE); break; default: RESET(actor->spr.cstat, CSTAT_SPRITE_BREAKABLE); diff --git a/source/games/sw/src/zombie.cpp b/source/games/sw/src/zombie.cpp index a8f7f78aa..6364c3e30 100644 --- a/source/games/sw/src/zombie.cpp +++ b/source/games/sw/src/zombie.cpp @@ -783,7 +783,7 @@ void SpawnZombie(PLAYERp pp, DSWActor* weaponActor) actorNew->spr.ang = RANDOM_P2(2048); SetupZombie(actorNew); actorNew->spr.shade = -10; - SET(actorNew->user.Flags2, SPR2_DONT_TARGET_OWNER); + actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER); actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT); DoActorPickClosePlayer(actorNew); @@ -830,7 +830,7 @@ void SpawnZombie2(DSWActor* actor) actorNew->spr.ang = RANDOM_P2(2048); SetupZombie(actorNew); actorNew->spr.shade = -10; - SET(actorNew->user.Flags2, SPR2_DONT_TARGET_OWNER); + actorNew->user.Flags2 |= (SPR2_DONT_TARGET_OWNER); actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT); DoActorPickClosePlayer(actorNew);