diff --git a/source/games/sw/src/actor.cpp b/source/games/sw/src/actor.cpp index 68257f91d..82719409a 100644 --- a/source/games/sw/src/actor.cpp +++ b/source/games/sw/src/actor.cpp @@ -88,13 +88,13 @@ int DoScaleSprite(DSWActor* actor) int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) { change_actor_stat(actor, STAT_DEAD_ACTOR); - SET(actor->user.Flags, SPR_DEAD); + actor->user.Flags |= (SPR_DEAD); RESET(actor->user.Flags, SPR_FALLING | SPR_JUMPING); actor->user.floor_dist = Z(40); // test for gibable dead bodies SET(actor->spr.extra, SPRX_BREAKABLE); - SET(actor->spr.cstat, CSTAT_SPRITE_BREAKABLE); + actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); if (weapActor == nullptr) { @@ -165,7 +165,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) { // test for gibable dead bodies if (RandomRange(1000) > 500) - SET(actor->spr.cstat, CSTAT_SPRITE_YFLIP); + actor->spr.cstat |= (CSTAT_SPRITE_YFLIP); ChangeState(actor, actor->user.StateEnd); actor->spr.xvel = 0; actor->user.jump_speed = 0; @@ -193,7 +193,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) case UZI_SMOKE: if (RandomRange(1000) > 500) - SET(actor->spr.cstat, CSTAT_SPRITE_YFLIP); + actor->spr.cstat |= (CSTAT_SPRITE_YFLIP); ChangeState(actor, actor->user.StateEnd); actor->user.RotNum = 0; // Rippers still gotta jump or they fall off walls weird @@ -216,7 +216,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) case UZI_SMOKE+1: // Shotgun if (RandomRange(1000) > 500) - SET(actor->spr.cstat, CSTAT_SPRITE_YFLIP); + actor->spr.cstat |= (CSTAT_SPRITE_YFLIP); ChangeState(actor, actor->user.StateEnd); actor->user.RotNum = 0; @@ -252,7 +252,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath) } if (RandomRange(1000) > 500) - SET(actor->spr.cstat, CSTAT_SPRITE_YFLIP); + actor->spr.cstat |= (CSTAT_SPRITE_YFLIP); ChangeState(actor, actor->user.StateEnd); actor->user.RotNum = 0; actor->user.ActorActionFunc = nullptr; @@ -536,8 +536,8 @@ void KeepActorOnFloor(DSWActor* actor) NewStateGroup(actor, actor->user.ActorActionSet->Swim); actor->user.oz = actor->spr.pos.Z = actor->user.loz - Z(depth); actor->spr.backupz(); - SET(actor->user.Flags, SPR_SWIMMING); - SET(actor->spr.cstat, CSTAT_SPRITE_YCENTER); + actor->user.Flags |= (SPR_SWIMMING); + actor->spr.cstat |= (CSTAT_SPRITE_YCENTER); } else { @@ -578,7 +578,7 @@ void KeepActorOnFloor(DSWActor* actor) int DoActorBeginSlide(DSWActor* actor, int ang, int vel, int dec) { - SET(actor->user.Flags, SPR_SLIDING); + actor->user.Flags |= (SPR_SLIDING); actor->user.slide_ang = ang; actor->user.slide_vel = vel; @@ -619,7 +619,7 @@ int DoActorSlide(DSWActor* actor) int DoActorBeginJump(DSWActor* actor) { - SET(actor->user.Flags, SPR_JUMPING); + actor->user.Flags |= (SPR_JUMPING); RESET(actor->user.Flags, SPR_FALLING); // actor->user.jump_speed = should be set before calling @@ -682,7 +682,7 @@ int DoActorJump(DSWActor* actor) int DoActorBeginFall(DSWActor* actor) { - SET(actor->user.Flags, SPR_FALLING); + actor->user.Flags |= (SPR_FALLING); RESET(actor->user.Flags, SPR_JUMPING); actor->user.jump_grav = ACTOR_GRAVITY; @@ -798,7 +798,7 @@ int DoActorDeathMove(DSWActor* actor) int DoBeginJump(DSWActor* actor) { - SET(actor->user.Flags, SPR_JUMPING); + actor->user.Flags |= (SPR_JUMPING); RESET(actor->user.Flags, SPR_FALLING); // set up individual actor jump gravity @@ -848,7 +848,7 @@ int DoJump(DSWActor* actor) int DoBeginFall(DSWActor* actor) { - SET(actor->user.Flags, SPR_FALLING); + actor->user.Flags |= (SPR_FALLING); RESET(actor->user.Flags, SPR_JUMPING); actor->user.jump_grav = ACTOR_GRAVITY; diff --git a/source/games/sw/src/ai.cpp b/source/games/sw/src/ai.cpp index 222b2afa5..ed0a0821a 100644 --- a/source/games/sw/src/ai.cpp +++ b/source/games/sw/src/ai.cpp @@ -819,7 +819,7 @@ int DoActorCantMoveCloser(DSWActor* actor) actor->spr.ang = getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->spr.pos.X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->spr.pos.Y); DoActorSetSpeed(actor, MID_SPEED); - SET(actor->user.Flags, SPR_FIND_PLAYER); + actor->user.Flags |= (SPR_FIND_PLAYER); actor->user.ActorActionFunc = DoActorDecide; NewStateGroup(actor, actor->user.ActorActionSet->Run); @@ -1055,11 +1055,11 @@ int InitActorRunAway(DSWActor* actor) { actor->spr.ang = NORM_ANGLE(getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->spr.pos.X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->spr.pos.Y)); DoActorSetSpeed(actor, FAST_SPEED); - SET(actor->user.Flags, SPR_RUN_AWAY); + actor->user.Flags |= (SPR_RUN_AWAY); } else { - SET(actor->user.Flags, SPR_RUN_AWAY); + actor->user.Flags |= (SPR_RUN_AWAY); InitActorReposition(actor); } @@ -1251,7 +1251,7 @@ int InitActorFindPlayer(DSWActor* actor) { actor->spr.ang = getangle((Track[actor->user.track].TrackPoint + actor->user.point)->x - actor->spr.pos.X, (Track[actor->user.track].TrackPoint + actor->user.point)->y - actor->spr.pos.Y); DoActorSetSpeed(actor, MID_SPEED); - SET(actor->user.Flags, SPR_FIND_PLAYER); + actor->user.Flags |= (SPR_FIND_PLAYER); actor->user.ActorActionFunc = DoActorDecide; NewStateGroup(actor, actor->user.ActorActionSet->Run); diff --git a/source/games/sw/src/break.cpp b/source/games/sw/src/break.cpp index c3d070b51..b3353eb92 100644 --- a/source/games/sw/src/break.cpp +++ b/source/games/sw/src/break.cpp @@ -520,7 +520,7 @@ BREAK_INFOp SetupSpriteForBreak(DSWActor* actor) actor->spr.clipdist = ActorSizeX(actor); - SET(actor->spr.cstat, CSTAT_SPRITE_BREAKABLE); + actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); } return break_info; diff --git a/source/games/sw/src/bunny.cpp b/source/games/sw/src/bunny.cpp index 9e3e71cd2..54fa62f7f 100644 --- a/source/games/sw/src/bunny.cpp +++ b/source/games/sw/src/bunny.cpp @@ -778,7 +778,7 @@ int SetupBunny(DSWActor* actor) DoActorSetSpeed(actor, FAST_SPEED); - SET(actor->user.Flags, SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_XFLIP_TOGGLE); actor->user.zclip = Z(16); @@ -847,7 +847,7 @@ int DoBunnyBeginJumpAttack(DSWActor* actor) //actor->user.jump_speed = -800; PickJumpMaxSpeed(actor, -400); // was -800 - SET(actor->user.Flags, SPR_JUMPING); + actor->user.Flags |= (SPR_JUMPING); RESET(actor->user.Flags, SPR_FALLING); // set up individual actor jump gravity @@ -1123,7 +1123,7 @@ void BunnyHatch(DSWActor* actor) actorNew->spr.shade = actor->spr.shade; // make immediately active - SET(actorNew->user.Flags, SPR_ACTIVE); + actorNew->user.Flags |= (SPR_ACTIVE); if (RandomRange(1000) > 500) // Boy or Girl? actorNew->user.spal = actorNew->spr.pal = PALETTE_PLAYER0; // Girl else @@ -1154,7 +1154,7 @@ void BunnyHatch(DSWActor* actor) DoActorSetSpeed(actorNew, FAST_SPEED); PickJumpMaxSpeed(actorNew, -600); - SET(actorNew->user.Flags, SPR_JUMPING); + actorNew->user.Flags |= (SPR_JUMPING); RESET(actorNew->user.Flags, SPR_FALLING); actorNew->user.jump_grav = 8; @@ -1182,7 +1182,7 @@ DSWActor* BunnyHatch2(DSWActor* actor) actorNew->spr.shade = actor->spr.shade; // make immediately active - SET(actorNew->user.Flags, SPR_ACTIVE); + actorNew->user.Flags |= (SPR_ACTIVE); if (RandomRange(1000) > 500) // Boy or Girl? { actorNew->user.spal = actorNew->spr.pal = PALETTE_PLAYER0; // Girl @@ -1211,7 +1211,7 @@ DSWActor* BunnyHatch2(DSWActor* actor) else PickJumpMaxSpeed(actorNew, -600); - SET(actorNew->user.Flags, SPR_JUMPING); + actorNew->user.Flags |= (SPR_JUMPING); RESET(actorNew->user.Flags, SPR_FALLING); actorNew->user.jump_grav = 8; diff --git a/source/games/sw/src/coolg.cpp b/source/games/sw/src/coolg.cpp index bcf5ba0f0..edba6e6fa 100644 --- a/source/games/sw/src/coolg.cpp +++ b/source/games/sw/src/coolg.cpp @@ -530,7 +530,7 @@ int SetupCoolg(DSWActor* actor) EnemyDefaults(actor, &CoolgActionSet, &CoolgPersonality); - SET(actor->user.Flags, SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE); CoolgCommon(actor); @@ -578,7 +578,7 @@ int DoCoolgBirth(DSWActor* actor) // special case TotalKillable--; - SET(actor->user.Flags, SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE); CoolgCommon(actor); return 0; @@ -792,17 +792,17 @@ int DoCoolgMove(DSWActor* actor) switch (actor->user.FlagOwner) { case 0: - SET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT); + actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT); actor->user.ShellNum = SEC(2); break; case 1: PlaySound(DIGI_VOID3, actor, v3df_follow); RESET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT); - SET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); actor->user.ShellNum = SEC(1) + SEC(RandomRange(2)); break; case 2: - SET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT); + actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT); RESET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); actor->user.ShellNum = SEC(2); break; diff --git a/source/games/sw/src/coolie.cpp b/source/games/sw/src/coolie.cpp index d810035ac..97ae1a2be 100644 --- a/source/games/sw/src/coolie.cpp +++ b/source/games/sw/src/coolie.cpp @@ -502,7 +502,7 @@ int SetupCoolie(DSWActor* actor) actor->spr.xrepeat = 42; actor->spr.yrepeat = 42; - SET(actor->user.Flags, SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_XFLIP_TOGGLE); return 0; } diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 9a4fbfb94..40a093b0b 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -1561,7 +1561,7 @@ void drawscreen(PLAYERp pp, double smoothratio) // Don't show sprites tagged with 257 if (actor->spr.lotag == 257 && actor->spr.owner == -2) { - SET(actor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_FLOOR); + actor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_FLOOR); actor->spr.owner = -1; } } diff --git a/source/games/sw/src/eel.cpp b/source/games/sw/src/eel.cpp index 963795995..ad7505dc7 100644 --- a/source/games/sw/src/eel.cpp +++ b/source/games/sw/src/eel.cpp @@ -389,7 +389,7 @@ int SetupEel(DSWActor* actor) EnemyDefaults(actor, &EelActionSet, &EelPersonality); - SET(actor->user.Flags, SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE); EelCommon(actor); @@ -538,9 +538,9 @@ int DoEelDeath(DSWActor* actor) { RESET(actor->user.Flags, SPR_FALLING|SPR_SLIDING); if (RandomRange(1000) > 500) - SET(actor->spr.cstat, CSTAT_SPRITE_XFLIP); + actor->spr.cstat |= (CSTAT_SPRITE_XFLIP); if (RandomRange(1000) > 500) - SET(actor->spr.cstat, CSTAT_SPRITE_YFLIP); + actor->spr.cstat |= (CSTAT_SPRITE_YFLIP); NewStateGroup(actor, actor->user.ActorActionSet->Dead); return 0; } diff --git a/source/games/sw/src/goro.cpp b/source/games/sw/src/goro.cpp index c57b74cc7..314c50af2 100644 --- a/source/games/sw/src/goro.cpp +++ b/source/games/sw/src/goro.cpp @@ -500,7 +500,7 @@ int SetupGoro(DSWActor* actor) EnemyDefaults(actor, &GoroActionSet, &GoroPersonality); actor->spr.clipdist = 512 >> 2; - SET(actor->user.Flags, SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_XFLIP_TOGGLE); return 0; } diff --git a/source/games/sw/src/hornet.cpp b/source/games/sw/src/hornet.cpp index a0bd43cbb..ba1453080 100644 --- a/source/games/sw/src/hornet.cpp +++ b/source/games/sw/src/hornet.cpp @@ -305,8 +305,8 @@ int SetupHornet(DSWActor* actor) EnemyDefaults(actor, &HornetActionSet, &HornetPersonality); - SET(actor->user.Flags, SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE); - SET(actor->spr.cstat, CSTAT_SPRITE_YCENTER); + actor->user.Flags |= (SPR_NO_SCAREDZ|SPR_XFLIP_TOGGLE); + actor->spr.cstat |= (CSTAT_SPRITE_YCENTER); actor->spr.clipdist = (100) >> 2; actor->user.floor_dist = Z(16); diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index a03db35d6..452faa97a 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -299,18 +299,18 @@ void SpawnMidSplash(DSWActor* actor) actorNew->spr.xrepeat = 70-RandomRange(20); actorNew->spr.yrepeat = 70-RandomRange(20); actorNew->spr.opos = actor->spr.opos; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); if (RANDOM_P2(1024) < 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_XFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP); actorNew->user.xchange = 0; actorNew->user.ychange = 0; actorNew->user.zchange = 0; if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); } void SpawnFloorSplash(DSWActor* actor) @@ -322,18 +322,18 @@ void SpawnFloorSplash(DSWActor* actor) actorNew->spr.xrepeat = 70-RandomRange(20); actorNew->spr.yrepeat = 70-RandomRange(20); actorNew->spr.opos = actor->spr.opos; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); if (RANDOM_P2(1024) < 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_XFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP); actorNew->user.xchange = 0; actorNew->user.ychange = 0; actorNew->user.zchange = 0; if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); } @@ -472,18 +472,18 @@ int DoBloodSpray(DSWActor* actor) if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1)) { if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actor->user.Flags, SPR_BOUNCE); // no bouncing + actor->user.Flags |= (SPR_BOUNCE); // no bouncing // underwater if (actor->user.lo_sectp && actor->spr.sector()->hasU() && FixedToInt(actor->spr.sector()->depth_fixed)) - SET(actor->user.Flags, SPR_BOUNCE); // no bouncing on + actor->user.Flags |= (SPR_BOUNCE); // no bouncing on // shallow water #if 0 if (!TEST(actor->user.Flags, SPR_BOUNCE)) { SpawnFloorSplash(actor); - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); actor->user.coll.setNone(); actor->user.Counter = 0; actor->user.zchange = -actor->user.zchange; @@ -524,13 +524,13 @@ int DoBloodSpray(DSWActor* actor) actorNew->spr.xrepeat = 40-RandomRange(30); actorNew->spr.yrepeat = 40-RandomRange(30); actorNew->spr.opos = actor->spr.opos; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); if (RANDOM_P2(1024) < 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_XFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP); if (RANDOM_P2(1024) < 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_YFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP); actorNew->user.xchange = actor->user.xchange; actorNew->user.ychange = actor->user.ychange; @@ -539,7 +539,7 @@ int DoBloodSpray(DSWActor* actor) ScaleSpriteVector(actorNew, 20000); if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); } return false; @@ -649,7 +649,7 @@ int DoPhosphorus(DSWActor* actor) // hit a floor if (!TEST(actor->user.Flags, SPR_BOUNCE)) { - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); ScaleSpriteVector(actor, 32000); // was 18000 actor->user.zchange /= 6; actor->user.coll.setNone(); @@ -676,16 +676,16 @@ int DoPhosphorus(DSWActor* actor) if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1)) { if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actor->user.Flags, SPR_BOUNCE); // no bouncing + actor->user.Flags |= (SPR_BOUNCE); // no bouncing // underwater if (actor->user.lo_sectp && actor->spr.sector()->hasU() && FixedToInt(actor->spr.sector()->depth_fixed)) - SET(actor->user.Flags, SPR_BOUNCE); // no bouncing on + actor->user.Flags |= (SPR_BOUNCE); // no bouncing on // shallow water if (!TEST(actor->user.Flags, SPR_BOUNCE)) { - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); actor->user.coll.setNone(); actor->user.Counter = 0; actor->user.zchange = -actor->user.zchange; @@ -727,13 +727,13 @@ int DoPhosphorus(DSWActor* actor) actorNew->spr.xrepeat = 12 + RandomRange(10); actorNew->spr.yrepeat = 12 + RandomRange(10); actorNew->spr.opos = actor->spr.opos; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); if (RANDOM_P2(1024) < 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_XFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP); if (RANDOM_P2(1024) < 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_YFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP); actorNew->user.xchange = actor->user.xchange; actorNew->user.ychange = actor->user.ychange; @@ -744,7 +744,7 @@ int DoPhosphorus(DSWActor* actor) ScaleSpriteVector(actorNew, 20000); if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); } return false; @@ -857,7 +857,7 @@ int DoChemBomb(DSWActor* actor) { if (!TEST(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE)) PlaySound(DIGI_CHEMBOUNCE, actor, v3df_dontpan); - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); ScaleSpriteVector(actor, 32000); // was 18000 actor->user.zchange /= 6; actor->user.coll.setNone(); @@ -892,18 +892,18 @@ int DoChemBomb(DSWActor* actor) if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1)) { if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actor->user.Flags, SPR_BOUNCE); // no bouncing + actor->user.Flags |= (SPR_BOUNCE); // no bouncing // underwater if (actor->user.lo_sectp && actor->spr.sector()->hasU() && FixedToInt(actor->spr.sector()->depth_fixed)) - SET(actor->user.Flags, SPR_BOUNCE); // no bouncing on + actor->user.Flags |= (SPR_BOUNCE); // no bouncing on // shallow water if (!TEST(actor->user.Flags, SPR_BOUNCE)) { if (!TEST(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE)) PlaySound(DIGI_CHEMBOUNCE, actor, v3df_dontpan); - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); actor->user.coll.setNone(); actor->user.Counter = 0; actor->user.zchange = -actor->user.zchange; @@ -950,8 +950,8 @@ int DoChemBomb(DSWActor* actor) actorNew->spr.yrepeat = 40; actorNew->spr.opos = actor->spr.opos; // !Frank - dont do translucent - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - // SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_TRANSLUCENT); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + // actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_TRANSLUCENT); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.xchange = actor->user.xchange; @@ -963,7 +963,7 @@ int DoChemBomb(DSWActor* actor) ScaleSpriteVector(actorNew, 20000); if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); } return false; @@ -1071,7 +1071,7 @@ int DoCaltrops(DSWActor* actor) if (!TEST(actor->user.Flags, SPR_BOUNCE)) { PlaySound(DIGI_CALTROPS, actor, v3df_dontpan); - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); ScaleSpriteVector(actor, 1000); // was 18000 actor->user.coll.setNone(); actor->user.Counter = 0; @@ -1098,17 +1098,17 @@ int DoCaltrops(DSWActor* actor) if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1)) { if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actor->user.Flags, SPR_BOUNCE); // no bouncing + actor->user.Flags |= (SPR_BOUNCE); // no bouncing // underwater if (actor->user.lo_sectp && actor->spr.sector()->hasU() && FixedToInt(actor->spr.sector()->depth_fixed)) - SET(actor->user.Flags, SPR_BOUNCE); // no bouncing on + actor->user.Flags |= (SPR_BOUNCE); // no bouncing on // shallow water if (!TEST(actor->user.Flags, SPR_BOUNCE)) { PlaySound(DIGI_CALTROPS, actor, v3df_dontpan); - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); actor->user.coll.setNone(); actor->user.Counter = 0; actor->user.zchange = -actor->user.zchange; @@ -1179,16 +1179,16 @@ int SpawnRadiationCloud(DSWActor* actor) actorNew->spr.xrepeat = 32; actorNew->spr.yrepeat = 32; actorNew->spr.clipdist = actor->spr.clipdist; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.spal = actorNew->spr.pal = PALETTE_PLAYER6; // Won't take floor palettes actorNew->spr.hitag = SECTFU_DONT_COPY_PALETTE; if (RANDOM_P2(1024) < 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_XFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP); //if (RANDOM_P2(1024) < 512) - //SET(actorNew->spr.cstat, CSTAT_SPRITE_YFLIP); + //actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP); actorNew->spr.ang = RANDOM_P2(2048); actorNew->spr.xvel = RANDOM_P2(32); @@ -1262,7 +1262,7 @@ int PlayerInitChemBomb(PLAYERp pp) } // actorNew->user.RotNum = 5; - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); SetOwner(pp->actor, actorNew); actorNew->spr.yrepeat = 32; @@ -1273,11 +1273,11 @@ int PlayerInitChemBomb(PLAYERp pp) actorNew->user.ceiling_dist = Z(3); actorNew->user.floor_dist = Z(3); actorNew->user.Counter = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK); if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->spr.zvel = -pp->horizon.horiz.asq16() >> 9; @@ -1319,7 +1319,7 @@ int InitSpriteChemBomb(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, CHEMBOMB, s_ChemBomb, actor->spr.sector(), nx, ny, nz, actor->spr.ang, CHEMBOMB_VELOCITY); - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); SetOwner(actor, actorNew); actorNew->spr.yrepeat = 32; @@ -1330,8 +1330,8 @@ int InitSpriteChemBomb(DSWActor* actor) actorNew->user.ceiling_dist = Z(3); actorNew->user.floor_dist = Z(3); actorNew->user.Counter = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK); actorNew->spr.zvel = short(-RandomRange(100) * HORIZ_MULT); @@ -1361,7 +1361,7 @@ int InitChemBomb(DSWActor* actor) auto actorNew = SpawnActor(STAT_MISSILE, MUSHROOM_CLOUD, s_ChemBomb, actor->spr.sector(), nx, ny, nz, actor->spr.ang, CHEMBOMB_VELOCITY); - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); SetOwner(GetOwner(actor), actorNew); actorNew->spr.yrepeat = 32; @@ -1371,12 +1371,12 @@ int InitChemBomb(DSWActor* actor) actorNew->user.ceiling_dist = Z(3); actorNew->user.floor_dist = Z(3); actorNew->user.Counter = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_INVISIBLE); // Make nuke radiation + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_INVISIBLE); // Make nuke radiation // invis. RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK); if (SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->spr.zvel = short(-RandomRange(100) * HORIZ_MULT); actorNew->spr.clipdist = 0; @@ -1589,7 +1589,7 @@ void SpawnFlashBombOnActor(DSWActor* actor) actorNew->user.Counter = 0; // max flame size actorNew->spr.shade = -40; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_INVISIBLE); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.Radius = 200; @@ -1632,7 +1632,7 @@ int PlayerInitCaltrops(PLAYERp pp) actorNew->spr.xvel -= (actorNew->spr.xvel >> 2); } - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); SetOwner(pp->actor, actorNew); actorNew->spr.yrepeat = 64; @@ -1646,7 +1646,7 @@ int PlayerInitCaltrops(PLAYERp pp) // SET(spawnedActor->spr.cstat, CSTAT_SPRITE_BLOCK); if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); // They go out at different angles // spawnedActor->spr.ang = NORM_ANGLE(pp->angle.ang.asbuild() + (RandomRange(50) - 25)); @@ -1689,7 +1689,7 @@ int InitCaltrops(DSWActor* actor) auto actorNew = SpawnActor(STAT_DEAD_ACTOR, CALTROPS, s_Caltrops, actor->spr.sector(), nx, ny, nz, actor->spr.ang, CHEMBOMB_VELOCITY / 2); - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); SetOwner(actor, actorNew); actorNew->spr.yrepeat = 64; @@ -1734,10 +1734,10 @@ int InitPhosphorus(DSWActor* actor) nx, ny, nz, daang, CHEMBOMB_VELOCITY/3); actorNew->spr.hitag = LUMINOUS; // Always full brightness - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); // !Frank - don't do translucent - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - // SET(actorNew->spr.cstat, CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + // actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_YCENTER); actorNew->spr.shade = -128; actorNew->spr.yrepeat = 64; @@ -1809,11 +1809,11 @@ int InitBloodSpray(DSWActor* actor, bool dogib, short velocity) auto actorNew = SpawnActor(STAT_MISSILE, GOREDrip, s_BloodSprayChunk, actor->spr.sector(), nx, ny, nz, ang, vel*2); - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); if (dogib) - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); else - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_INVISIBLE); actorNew->spr.shade = -12; SetOwner(actor, actorNew); @@ -1937,7 +1937,7 @@ int DoCarryFlag(DSWActor* actor) actor->user.WaitTics = SEC(30); // You have 30 seconds to get it to // scorebox actor->user.Counter2 = 0; - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); } // limit the number of times DoFlagRangeTest is called @@ -2119,10 +2119,10 @@ int DoCarryFlagNoDet(DSWActor* actor) int SetCarryFlag(DSWActor* actor) { // stuck - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); // not yet active for 1 sec - SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); actor->user.Counter = 0; change_actor_stat(actor, STAT_ITEM); if (actor->spr.hitag == 1) @@ -2241,7 +2241,7 @@ int SpawnShell(DSWActor* actor, int ShellNum) actorNew->user.ceiling_dist = Z(1); actorNew->user.floor_dist = Z(1); actorNew->user.Counter = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); RESET(actorNew->user.Flags, SPR_BOUNCE|SPR_UNDERWATER); // Make em' bounce diff --git a/source/games/sw/src/lava.cpp b/source/games/sw/src/lava.cpp index d120ebe8f..423ff2af6 100644 --- a/source/games/sw/src/lava.cpp +++ b/source/games/sw/src/lava.cpp @@ -470,7 +470,7 @@ int SetupLava(DSWActor* actor) EnemyDefaults(actor, &LavaActionSet, &LavaPersonality); actor->spr.xrepeat = actor->spr.yrepeat = 110; actor->spr.clipdist = (512) >> 2; - SET(actor->user.Flags, SPR_XFLIP_TOGGLE|SPR_ELECTRO_TOLERANT); + actor->user.Flags |= (SPR_XFLIP_TOGGLE|SPR_ELECTRO_TOLERANT); actor->user.loz = actor->spr.pos.Z; diff --git a/source/games/sw/src/miscactr.cpp b/source/games/sw/src/miscactr.cpp index 9ef2a709d..a07bd52ba 100644 --- a/source/games/sw/src/miscactr.cpp +++ b/source/games/sw/src/miscactr.cpp @@ -1144,7 +1144,7 @@ int SetupCarGirl(DSWActor* actor) actor->user.ID = CARGIRL_R0; RESET(actor->user.Flags, SPR_XFLIP_TOGGLE); - SET(actor->spr.cstat, CSTAT_SPRITE_XFLIP); + actor->spr.cstat |= (CSTAT_SPRITE_XFLIP); return 0; } diff --git a/source/games/sw/src/ninja.cpp b/source/games/sw/src/ninja.cpp index 766cb6690..65074d449 100644 --- a/source/games/sw/src/ninja.cpp +++ b/source/games/sw/src/ninja.cpp @@ -1841,7 +1841,7 @@ int SetupNinja(DSWActor* actor) EnemyDefaults(actor, &NinjaGreenActionSet, &NinjaPersonality); if (!TEST(actor->spr.cstat, CSTAT_SPRITE_RESTORE)) actor->user.Health = RedNinjaHealth; - SET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT); + actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT); actor->spr.shade = 127; actor->spr.pal = actor->user.spal = PALETTE_PLAYER5; actor->spr.hitag = 9998; @@ -1924,7 +1924,7 @@ int SetupNinja(DSWActor* actor) DoActorSetSpeed(actor, NORM_SPEED); actor->user.Radius = 280; - SET(actor->user.Flags, SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_XFLIP_TOGGLE); return 0; } @@ -1934,14 +1934,14 @@ int DoNinjaHariKari(DSWActor* actor) UpdateSinglePlayKills(actor); change_actor_stat(actor, STAT_DEAD_ACTOR); RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actor->user.Flags, SPR_DEAD); + actor->user.Flags |= (SPR_DEAD); RESET(actor->user.Flags, SPR_FALLING | SPR_JUMPING); actor->user.floor_dist = Z(40); actor->user.RotNum = 0; actor->user.ActorActionFunc = nullptr; SET(actor->spr.extra, SPRX_BREAKABLE); - SET(actor->spr.cstat, CSTAT_SPRITE_BREAKABLE); + actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); PlaySound(DIGI_NINJAUZIATTACK, actor, v3df_follow); @@ -1963,14 +1963,14 @@ int DoNinjaGrabThroat(DSWActor* actor) RESET(actor->spr.cstat, CSTAT_SPRITE_YFLIP); change_actor_stat(actor, STAT_DEAD_ACTOR); RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actor->user.Flags, SPR_DEAD); + actor->user.Flags |= (SPR_DEAD); RESET(actor->user.Flags, SPR_FALLING | SPR_JUMPING); actor->user.floor_dist = Z(40); actor->user.RotNum = 0; actor->user.ActorActionFunc = nullptr; SET(actor->spr.extra, SPRX_BREAKABLE); - SET(actor->spr.cstat, CSTAT_SPRITE_BREAKABLE); + actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); ChangeState(actor, actor->user.StateEnd); @@ -2332,7 +2332,7 @@ void InitPlayerSprite(PLAYERp pp) pp->actor = actor; pp->pnum = pnum; - SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); SET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY); RESET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT); @@ -2346,7 +2346,7 @@ void InitPlayerSprite(PLAYERp pp) actor->user.Radius = 400; actor->user.PlayerP = pp; //actor->user.Health = pp->MaxHealth; - SET(actor->user.Flags, SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_XFLIP_TOGGLE); actor->spr.picnum = actor->user.State->Pic; @@ -2399,7 +2399,7 @@ void SpawnPlayerUnderSprite(PLAYERp pp) DSWActor* actor = pp->PlayerUnderActor; - SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); SET(actor->spr.extra, SPRX_PLAYER_OR_ENEMY); actor->user.Rot = sg_NinjaRun; @@ -2409,7 +2409,7 @@ void SpawnPlayerUnderSprite(PLAYERp pp) actor->user.Radius = plActor->user.Radius; actor->user.PlayerP = pp; actor->user.Health = pp->MaxHealth; - SET(actor->user.Flags, SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_XFLIP_TOGGLE); actor->user.ActorActionSet = plActor->user.ActorActionSet; diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 7ac3ced89..7a46e7000 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -3121,7 +3121,7 @@ void DoPlayerBeginClimb(PLAYERp pp) pp->DoPlayerAction = DoPlayerClimb; SET(pp->Flags, PF_CLIMBING|PF_WEAPON_DOWN); - SET(actor->spr.cstat, CSTAT_SPRITE_YCENTER); + actor->spr.cstat |= (CSTAT_SPRITE_YCENTER); //DamageData[plActor->user.WeaponNum].Init(pp); diff --git a/source/games/sw/src/ripper.cpp b/source/games/sw/src/ripper.cpp index e827d8bd1..d447f1aeb 100644 --- a/source/games/sw/src/ripper.cpp +++ b/source/games/sw/src/ripper.cpp @@ -848,7 +848,7 @@ int SetupRipper(DSWActor* actor) EnemyDefaults(actor, &RipperActionSet, &RipperPersonality); } - SET(actor->user.Flags, SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_XFLIP_TOGGLE); return 0; } @@ -963,7 +963,7 @@ int InitRipperHang(DSWActor* actor) //actor->user.jump_speed = -800; PickJumpMaxSpeed(actor, -800); - SET(actor->user.Flags, SPR_JUMPING); + actor->user.Flags |= (SPR_JUMPING); RESET(actor->user.Flags, SPR_FALLING); // set up individual actor jump gravity @@ -1060,7 +1060,7 @@ int DoRipperBeginJumpAttack(DSWActor* actor) //actor->user.jump_speed = -800; PickJumpMaxSpeed(actor, -400); // was -800 - SET(actor->user.Flags, SPR_JUMPING); + actor->user.Flags |= (SPR_JUMPING); RESET(actor->user.Flags, SPR_FALLING); // set up individual actor jump gravity @@ -1184,14 +1184,14 @@ void RipperHatch(DSWActor* actor) SetupRipper(actorNew); // make immediately active - SET(actorNew->user.Flags, SPR_ACTIVE); + actorNew->user.Flags |= (SPR_ACTIVE); NewStateGroup(actorNew, actorNew->user.ActorActionSet->Jump); actorNew->user.ActorActionFunc = DoActorMoveJump; DoActorSetSpeed(actorNew, FAST_SPEED); PickJumpMaxSpeed(actorNew, -600); - SET(actorNew->user.Flags, SPR_JUMPING); + actorNew->user.Flags |= (SPR_JUMPING); RESET(actorNew->user.Flags, SPR_FALLING); actorNew->user.jump_grav = 8; diff --git a/source/games/sw/src/ripper2.cpp b/source/games/sw/src/ripper2.cpp index ec0e63ccd..70bffdb33 100644 --- a/source/games/sw/src/ripper2.cpp +++ b/source/games/sw/src/ripper2.cpp @@ -916,7 +916,7 @@ int SetupRipper2(DSWActor* actor) EnemyDefaults(actor, &Ripper2ActionSet, &Ripper2Personality); } - SET(actor->user.Flags, SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_XFLIP_TOGGLE); return 0; } @@ -972,7 +972,7 @@ int InitRipper2Hang(DSWActor* actor) //actor->user.jump_speed = -800; PickJumpMaxSpeed(actor, -(RandomRange(400)+100)); - SET(actor->user.Flags, SPR_JUMPING); + actor->user.Flags |= (SPR_JUMPING); RESET(actor->user.Flags, SPR_FALLING); // set up individual actor jump gravity @@ -1082,7 +1082,7 @@ int DoRipper2BeginJumpAttack(DSWActor* actor) //actor->user.jump_speed = -800; PickJumpMaxSpeed(actor, -(RandomRange(400)+100)); - SET(actor->user.Flags, SPR_JUMPING); + actor->user.Flags |= (SPR_JUMPING); RESET(actor->user.Flags, SPR_FALLING); // set up individual actor jump gravity @@ -1209,14 +1209,14 @@ void Ripper2Hatch(DSWActor* actor) SetupRipper2(actorNew); // make immediately active - SET(actorNew->user.Flags, SPR_ACTIVE); + actorNew->user.Flags |= (SPR_ACTIVE); NewStateGroup(actorNew, actorNew->user.ActorActionSet->Jump); actorNew->user.ActorActionFunc = DoActorMoveJump; DoActorSetSpeed(actorNew, FAST_SPEED); PickJumpMaxSpeed(actorNew, -600); - SET(actorNew->user.Flags, SPR_JUMPING); + actorNew->user.Flags |= (SPR_JUMPING); RESET(actorNew->user.Flags, SPR_FALLING); actorNew->user.jump_grav = 8; diff --git a/source/games/sw/src/rotator.cpp b/source/games/sw/src/rotator.cpp index 93e2e0a0b..fa75d1c39 100644 --- a/source/games/sw/src/rotator.cpp +++ b/source/games/sw/src/rotator.cpp @@ -99,7 +99,7 @@ void SetRotatorActive(DSWActor* actor) // play activate sound DoSoundSpotMatch(SP_TAG2(actor), 1, SOUND_OBJECT_TYPE); - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); actor->user.Tics = 0; // moving to the OFF position diff --git a/source/games/sw/src/serp.cpp b/source/games/sw/src/serp.cpp index 84a296a64..8a6c54a8d 100644 --- a/source/games/sw/src/serp.cpp +++ b/source/games/sw/src/serp.cpp @@ -728,7 +728,7 @@ int SetupSerp(DSWActor* actor) } actor->spr.clipdist = (512) >> 2; - SET(actor->user.Flags, SPR_XFLIP_TOGGLE|SPR_ELECTRO_TOLERANT); + actor->user.Flags |= (SPR_XFLIP_TOGGLE|SPR_ELECTRO_TOLERANT); actor->user.loz = actor->spr.pos.Z; diff --git a/source/games/sw/src/skel.cpp b/source/games/sw/src/skel.cpp index 6fa3cb6a8..a7adc9a25 100644 --- a/source/games/sw/src/skel.cpp +++ b/source/games/sw/src/skel.cpp @@ -520,7 +520,7 @@ int SetupSkel(DSWActor* actor) // 256 is default //actor->spr.clipdist = 256 >> 2; - SET(actor->user.Flags, SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_XFLIP_TOGGLE); return 0; } @@ -565,7 +565,7 @@ int DoSkelTeleport(DSWActor* actor) int DoSkelTermTeleport(DSWActor* actor) { - SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); return 0; } diff --git a/source/games/sw/src/skull.cpp b/source/games/sw/src/skull.cpp index df0b57810..57248153c 100644 --- a/source/games/sw/src/skull.cpp +++ b/source/games/sw/src/skull.cpp @@ -227,8 +227,8 @@ int SetupSkull(DSWActor* actor) EnemyDefaults(actor, nullptr, nullptr); actor->spr.clipdist = (128+64) >> 2; - SET(actor->user.Flags, SPR_XFLIP_TOGGLE); - SET(actor->spr.cstat, CSTAT_SPRITE_YCENTER); + actor->user.Flags |= (SPR_XFLIP_TOGGLE); + actor->spr.cstat |= (CSTAT_SPRITE_YCENTER); actor->user.Radius = 400; @@ -612,8 +612,8 @@ int SetupBetty(DSWActor* actor) EnemyDefaults(actor, nullptr, nullptr); actor->spr.clipdist = (128+64) >> 2; - SET(actor->user.Flags, SPR_XFLIP_TOGGLE); - SET(actor->spr.cstat, CSTAT_SPRITE_YCENTER); + actor->user.Flags |= (SPR_XFLIP_TOGGLE); + actor->spr.cstat |= (CSTAT_SPRITE_YCENTER); actor->user.Radius = 400; diff --git a/source/games/sw/src/slidor.cpp b/source/games/sw/src/slidor.cpp index 5fd97fe7a..9a016b918 100644 --- a/source/games/sw/src/slidor.cpp +++ b/source/games/sw/src/slidor.cpp @@ -95,7 +95,7 @@ void SetSlidorActive(DSWActor* actor) // play activate sound DoSoundSpotMatch(SP_TAG2(actor), 1, SOUND_OBJECT_TYPE); - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); actor->user.Tics = 0; // moving to the OFF position diff --git a/source/games/sw/src/spike.cpp b/source/games/sw/src/spike.cpp index e23cfee81..00b8ef3c0 100644 --- a/source/games/sw/src/spike.cpp +++ b/source/games/sw/src/spike.cpp @@ -98,7 +98,7 @@ void SetSpikeActive(DSWActor* actor) // play activate sound DoSoundSpotMatch(SP_TAG2(actor), 1, SOUND_OBJECT_TYPE); - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); actor->user.Tics = 0; // moving to the ON position diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index fe4669e24..7938f93cb 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -785,10 +785,10 @@ void change_actor_stat(DSWActor* actor, int stat, bool quick) RESET(actor->user.Flags, SPR_SKIP2|SPR_SKIP4); if (stat >= STAT_SKIP4_START && stat <= STAT_SKIP4_END) - SET(actor->user.Flags, SPR_SKIP4); + actor->user.Flags |= (SPR_SKIP4); if (stat >= STAT_SKIP2_START && stat <= STAT_SKIP2_END) - SET(actor->user.Flags, SPR_SKIP2); + actor->user.Flags |= (SPR_SKIP2); switch (stat) { @@ -813,7 +813,7 @@ void change_actor_stat(DSWActor* actor, int stat, bool quick) wait_active_check_offset = 0; actor->user.wait_active_check = wait_active_check_offset; // don't do a break here - SET(actor->user.Flags, SPR_SHADOW); + actor->user.Flags |= (SPR_SHADOW); break; } @@ -1567,7 +1567,7 @@ void SpriteSetup(void) if (actor->spr.pos.Z > DIV2(cz + fz)) { // closer to a floor - SET(actor->spr.cstat, CSTAT_SPRITE_CLOSE_FLOOR); + actor->spr.cstat |= (CSTAT_SPRITE_CLOSE_FLOOR); } // CSTAT_SPIN is insupported - get rid of it @@ -1577,7 +1577,7 @@ void SpriteSetup(void) // if BLOCK is set set BLOCK_HITSCAN // Hope this doesn't screw up anything if (TEST(actor->spr.cstat, CSTAT_SPRITE_BLOCK)) - SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK_HITSCAN); + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK_HITSCAN); //////////////////////////////////////////// // @@ -1605,7 +1605,7 @@ void SpriteSetup(void) // but allows actors to move through them actor->spr.clipdist = ActorSizeX(actor); SET(actor->spr.extra, SPRX_BREAKABLE); - SET(actor->spr.cstat, CSTAT_SPRITE_BREAKABLE); + actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); break; } } @@ -1632,17 +1632,17 @@ void SpriteSetup(void) if (actor->spr.picnum == 80) { RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK); - SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK_HITSCAN|CSTAT_SPRITE_BLOCK_MISSILE);; + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK_HITSCAN|CSTAT_SPRITE_BLOCK_MISSILE);; } else { RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK); - SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK_HITSCAN|CSTAT_SPRITE_BLOCK_MISSILE);; - SET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE);; + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK_HITSCAN|CSTAT_SPRITE_BLOCK_MISSILE);; + actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE);; } if (TEST(SP_TAG8(actor), BIT(0))) - SET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); ; + actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); ; if (TEST(SP_TAG8(actor), BIT(1))) RESET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); @@ -1710,7 +1710,7 @@ void SpriteSetup(void) tag = actor->spr.hitag; RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); // for bounding sector objects if ((tag >= 500 && tag < 600) || tag == SECT_SO_CENTER) @@ -2022,7 +2022,7 @@ void SpriteSetup(void) actor->user.WaitTics = time*15; // 1/8 of a sec actor->user.Tics = 0; - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); switch (type) { @@ -2133,7 +2133,7 @@ void SpriteSetup(void) wallcount++; } - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); switch (type) { @@ -2178,7 +2178,7 @@ void SpriteSetup(void) actor->user.rotator->ClearWalls(); actor->user.rotator->orig_speed = actor->user.rotator->speed; - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); switch (type) { @@ -2226,7 +2226,7 @@ void SpriteSetup(void) actor->user.WaitTics = time*15; // 1/8 of a sec actor->user.Tics = 0; - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); switch (type) { @@ -2624,7 +2624,7 @@ void SpriteSetup(void) case WARP_TELEPORTER: { - SET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); SET(actor->spr.sector()->extra, SECTFX_WARP_SECTOR); change_actor_stat(actor, STAT_WARP); @@ -2656,19 +2656,19 @@ void SpriteSetup(void) case WARP_CEILING_PLANE: case WARP_FLOOR_PLANE: { - SET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); SET(actor->spr.sector()->extra, SECTFX_WARP_SECTOR); change_actor_stat(actor, STAT_WARP); break; } case WARP_COPY_SPRITE1: - SET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); SET(actor->spr.sector()->extra, SECTFX_WARP_SECTOR); change_actor_stat(actor, STAT_WARP_COPY_SPRITE1); break; case WARP_COPY_SPRITE2: - SET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); SET(actor->spr.sector()->extra, SECTFX_WARP_SECTOR); change_actor_stat(actor, STAT_WARP_COPY_SPRITE2); break; @@ -2818,7 +2818,7 @@ KeyMain: actor->user.spal = actor->spr.pal; // Set the palette from build - //SET(actor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_WALL); + //actor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL); ChangeState(actor, s_Key[num]); @@ -3391,7 +3391,7 @@ NUKE_REPLACEMENT: change_actor_stat(actor, STAT_DEFAULT); RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK); - SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK_HITSCAN); + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK_HITSCAN); SET(actor->spr.extra, SPRX_BLADE); break; @@ -3410,7 +3410,7 @@ NUKE_REPLACEMENT: SpawnUser(actor, actor->spr.picnum, nullptr); actor->spr.clipdist = ActorSizeX(actor); - SET(actor->spr.cstat, CSTAT_SPRITE_BREAKABLE); + actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); SET(actor->spr.extra, SPRX_BREAKABLE); break; @@ -3459,7 +3459,7 @@ NUKE_REPLACEMENT: } - SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); break; } @@ -3822,7 +3822,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_REPAIR_KIT, s_RepairKit, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3833,7 +3833,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_STAR, s_IconStar, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3844,7 +3844,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_MINE, s_IconLgMine, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3855,7 +3855,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_MICRO_GUN, s_IconMicroGun, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3866,7 +3866,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_MICRO_BATTERY, s_IconMicroBattery, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3877,7 +3877,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_GRENADE_LAUNCHER, s_IconGrenadeLauncher, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3888,7 +3888,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_GRENADE, s_IconLgGrenade, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3899,7 +3899,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_RAIL_GUN, s_IconRailGun, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3910,7 +3910,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_RAIL_AMMO, s_IconRailAmmo, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3921,7 +3921,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_ROCKET, s_IconRocket, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3932,7 +3932,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_SHOTGUN, s_IconShotgun, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3943,7 +3943,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_SHOTSHELL, s_IconLgShotshell, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3954,7 +3954,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_GUARD_HEAD, s_IconGuardHead, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3965,7 +3965,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_FIREBALL_LG_AMMO, s_IconFireballLgAmmo, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3976,7 +3976,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_HEART, s_IconHeart, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3987,7 +3987,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_HEART_LG_AMMO, s_IconHeartLgAmmo, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -3999,7 +3999,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_ARMOR, s_IconArmor, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4016,7 +4016,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_MEDKIT, s_IconMedkit, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4027,7 +4027,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_SM_MEDKIT, s_IconSmMedkit, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4038,7 +4038,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_CHEMBOMB, s_IconChemBomb, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4049,7 +4049,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_FLASHBOMB, s_IconFlashBomb, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4060,7 +4060,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_NUKE, s_IconNuke, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4071,7 +4071,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_CALTROPS, s_IconCaltrops, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4082,7 +4082,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_BOOSTER, s_IconBooster, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4093,7 +4093,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_HEAT_CARD, s_IconHeatCard, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4104,7 +4104,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_CLOAK, s_IconCloak, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4115,7 +4115,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_NIGHT_VISION, s_IconNightVision, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4127,7 +4127,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_UZI_AMMO, s_IconLgUziAmmo, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4138,7 +4138,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_GUARD_HEAD, s_IconGuardHead, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4149,7 +4149,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_HEART, s_IconHeart, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4161,7 +4161,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_UZIFLOOR, s_IconUziFloor, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4175,7 +4175,7 @@ int SpawnItemsMatch(short match) break; spawnedActor = SpawnActor(STAT_ITEM, ICON_UZI, s_IconUzi, itActor->spr.sector(), itActor->spr.pos.X, itActor->spr.pos.Y, itActor->spr.pos.Z, itActor->spr.ang, 0); - SET(spawnedActor->user.Flags2, SPR2_NEVER_RESPAWN); + spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN; IconDefault(spawnedActor); SetupItemForJump(itActor, spawnedActor); @@ -4542,7 +4542,7 @@ bool ActorDrop(DSWActor* actor, int x, int y, int z, sectortype* new_sector, sho auto save_cstat = TEST(actor->spr.cstat, CSTAT_SPRITE_BLOCK); RESET(actor->spr.cstat, CSTAT_SPRITE_BLOCK); FAFgetzrangepoint(x, y, z - (ActorSizeZ(actor) >> 1), new_sector, &hiz, &ceilhit, &loz, &florhit); - SET(actor->spr.cstat, save_cstat); + actor->spr.cstat |= (save_cstat); if (florhit.type < 0 || ceilhit.type < 0) { @@ -4687,7 +4687,7 @@ int move_actor(DSWActor* actor, int xchange, int ychange, int zchange) } } - SET(actor->user.Flags, SPR_MOVED); + actor->user.Flags |= (SPR_MOVED); if (actor->user.coll.type == kHitNone) { @@ -4809,7 +4809,7 @@ int KillGet(DSWActor* actor) } actor->user.WaitTics = 30*120; - SET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); // respawn markers if (!gNet.SpawnMarkers || actor->spr.hitag == TAG_NORESPAWN_FLAG) // No coin if it's a special flag @@ -4852,7 +4852,7 @@ int KillGetAmmo(DSWActor* actor) } actor->user.WaitTics = 30*120; - SET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); // respawn markers if (!gNet.SpawnMarkers) @@ -4903,7 +4903,7 @@ int KillGetWeapon(DSWActor* actor) break; actor->user.WaitTics = 30*120; - SET(actor->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actor->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); // respawn markers if (!gNet.SpawnMarkers) @@ -5052,7 +5052,7 @@ int DoGet(DSWActor* actor) } auto cstat_bak = actor->spr.cstat; - SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); can_see = FAFcansee(actor->spr.pos.X, actor->spr.pos.Y, actor->spr.pos.Z, actor->spr.sector(), pp->pos.X, pp->pos.Y, pp->pos.Z, pp->cursector); actor->spr.cstat = cstat_bak; @@ -5853,7 +5853,7 @@ KeyMain: // Attach flag to player actorNew->user.Counter = 0; RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actorNew->spr.cstat, CSTAT_SPRITE_ALIGNMENT_WALL); + actorNew->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL); SetAttach(pp->actor, actorNew); actorNew->user.sz = ActorZOfMiddle(pp->actor); // Set mid way up who it hit actorNew->user.spal = actorNew->spr.pal = actor->spr.pal; // Set the palette of the flag @@ -5928,7 +5928,7 @@ void AdjustActiveRange(PLAYERp pp, DSWActor* actor, int dist) // some huge distance actor->user.active_range = 75000; // sprite is AWARE - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); actor->user.inactive_time = 0; } } diff --git a/source/games/sw/src/sumo.cpp b/source/games/sw/src/sumo.cpp index 442a59165..a93a2126f 100644 --- a/source/games/sw/src/sumo.cpp +++ b/source/games/sw/src/sumo.cpp @@ -668,7 +668,7 @@ int SetupSumo(DSWActor* actor) actor->spr.yrepeat = 75; } - //SET(actor->user.Flags, SPR_XFLIP_TOGGLE); + //actor->user.Flags |= (SPR_XFLIP_TOGGLE); return 0; } diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index 34df426bc..1209afc52 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -2940,14 +2940,14 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor) case TRACK_ACTOR_WAIT_FOR_PLAYER: { - SET(actor->user.Flags, SPR_WAIT_FOR_PLAYER); + actor->user.Flags |= (SPR_WAIT_FOR_PLAYER); actor->user.Dist = tpoint->tag_high; break; } case TRACK_ACTOR_WAIT_FOR_TRIGGER: { - SET(actor->user.Flags, SPR_WAIT_FOR_TRIGGER); + actor->user.Flags |= (SPR_WAIT_FOR_TRIGGER); actor->user.Dist = tpoint->tag_high; break; } @@ -2965,12 +2965,12 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor) { // set target to new slower target actor->user.vel_tgt = actor->user.vel_tgt - (tpoint->tag_high * 256); - SET(actor->user.Flags, SPR_SLOW_DOWN); + actor->user.Flags |= (SPR_SLOW_DOWN); } else { actor->user.vel_tgt = actor->user.vel_tgt + (tpoint->tag_high * 256); - SET(actor->user.Flags, SPR_SPEED_UP); + actor->user.Flags |= (SPR_SPEED_UP); } break; @@ -2980,12 +2980,12 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor) if (actor->user.track_dir > 0) { actor->user.vel_tgt = actor->user.vel_tgt - (tpoint->tag_high * 256); - SET(actor->user.Flags, SPR_SLOW_DOWN); + actor->user.Flags |= (SPR_SLOW_DOWN); } else { actor->user.vel_tgt = actor->user.vel_tgt + (tpoint->tag_high * 256); - SET(actor->user.Flags, SPR_SPEED_UP); + actor->user.Flags |= (SPR_SPEED_UP); } break; @@ -3040,7 +3040,7 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor) 0, // Z vector of 3D ang hit, CLIPMASK_MISSILE); - SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK); + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK); ASSERT(hit.hitSector != nullptr); @@ -3249,7 +3249,7 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor) if (actor->user.ActorActionSet->DeathJump) { - SET(actor->user.Flags, SPR_DEAD); + actor->user.Flags |= (SPR_DEAD); actor->spr.xvel <<= 1; actor->user.jump_speed = -495; DoActorBeginJump(actor); @@ -3318,7 +3318,7 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor) } else { - SET(actor->user.Flags, SPR_ZDIFF_MODE); + actor->user.Flags |= (SPR_ZDIFF_MODE); } break; @@ -3382,7 +3382,7 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor) // Adjust for YCENTERING // - SET(actor->spr.cstat, CSTAT_SPRITE_YCENTER); + actor->spr.cstat |= (CSTAT_SPRITE_YCENTER); bos_z = ActorZOfBottom(actor); if (bos_z > actor->user.loz) { @@ -3394,7 +3394,7 @@ bool ActorTrackDecide(TRACK_POINTp tpoint, DSWActor* actor) // Misc climb setup // - SET(actor->user.Flags, SPR_CLIMBING); + actor->user.Flags |= (SPR_CLIMBING); NewStateGroup(actor, actor->user.ActorActionSet->Climb); actor->spr.zvel = -Z(1); diff --git a/source/games/sw/src/vator.cpp b/source/games/sw/src/vator.cpp index 7122e70ee..8bd34d2a7 100644 --- a/source/games/sw/src/vator.cpp +++ b/source/games/sw/src/vator.cpp @@ -103,7 +103,7 @@ void SetVatorActive(DSWActor* actor) // play activate sound DoSoundSpotMatch(SP_TAG2(actor), 1, SOUND_OBJECT_TYPE); - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); actor->user.Tics = 0; // moving to the ON position diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 43b52c69f..841a425c6 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -2778,7 +2778,7 @@ int DoLavaErupt(DSWActor* actor) // inactive if ((actor->user.WaitTics -= synctics) <= 0) { - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); actor->user.Counter = 0; actor->user.WaitTics = SP_TAG9(actor) * 120L; } @@ -3757,7 +3757,7 @@ AutoShrap: actor->user.ychange = MOVEy(actor->spr.xvel, actor->spr.ang); if (!shrap_bounce) - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); } } @@ -3888,7 +3888,7 @@ int DoShrapDamage(DSWActor* actor) { if (!TEST(actor->user.Flags, SPR_BOUNCE)) { - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); actor->user.jump_speed = -300; actor->spr.xvel >>= 2; DoBeginJump(actor); @@ -4087,7 +4087,7 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, i actorNew->spr.xrepeat = actorNew->spr.yrepeat = 0; } if (RANDOM_P2(1024) < 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_XFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP); //shrap_xsize = 96; //shrap_ysize = 75; //shrap_xsize = 10; @@ -4106,7 +4106,7 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, i actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang); } - SET(actorNew->user.Flags, SPR_BOUNCE); + actorNew->user.Flags |= (SPR_BOUNCE); actorNew->spr.shade = int8_t(shrap_shade); actorNew->spr.xrepeat = uint8_t(shrap_xsize); @@ -4135,7 +4135,7 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, i actorNew->user.zchange = labs(actorNew->user.jump_speed*4) - RandomRange(labs(actorNew->user.jump_speed)*8); actorNew->user.WaitTics = 64 + RANDOM_P2(32); - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); DoBeginJump(actorNew); } @@ -4639,7 +4639,7 @@ int SetSuicide(DSWActor* actor) { if (actor->hasU()) { - SET(actor->user.Flags, SPR_SUICIDE); + actor->user.Flags |= (SPR_SUICIDE); actor->user.RotNum = 0; } ChangeState(actor, s_Suicide); @@ -4970,7 +4970,7 @@ int ActorHealth(DSWActor* actor, short amt) return true; } - SET(actor->user.Flags, SPR_ATTACKED); + actor->user.Flags |= (SPR_ATTACKED); actor->user.Health += amt; @@ -7470,7 +7470,7 @@ int DoStar(DSWActor* actor) WallBounce(actor, wall_ang); ScaleSpriteVector(actor, 36000); - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); actor->user.motion_blur_num = 0; actor->user.coll.setNone(); break; @@ -7528,7 +7528,7 @@ int DoStar(DSWActor* actor) if (RANDOM_P2(1024) < STAR_BOUNCE_RNUM) break; - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); actor->user.motion_blur_num = 0; actor->user.coll.setNone(); @@ -7536,7 +7536,7 @@ int DoStar(DSWActor* actor) else { // hit a sloped sector < 45 degrees - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); actor->user.motion_blur_num = 0; actor->user.coll.setNone(); } @@ -7545,7 +7545,7 @@ int DoStar(DSWActor* actor) break; // hit a slope } - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); actor->user.motion_blur_num = 0; actor->user.coll.setNone(); actor->user.zchange = -actor->user.zchange; @@ -8314,7 +8314,7 @@ int DoGrenade(DSWActor* actor) // hit a floor if (!TEST(actor->user.Flags, SPR_BOUNCE)) { - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); ScaleSpriteVector(actor, 40000); // 18000 actor->user.coll.setNone(); actor->user.zchange /= 4; @@ -8348,14 +8348,14 @@ int DoGrenade(DSWActor* actor) if (actor->spr.pos.Z > ((actor->user.hiz + actor->user.loz) >> 1)) { if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actor->user.Flags, SPR_BOUNCE); // no bouncing underwater + actor->user.Flags |= (SPR_BOUNCE); // no bouncing underwater if (actor->user.lo_sectp && actor->spr.sector()->hasU() && FixedToInt(actor->spr.sector()->depth_fixed)) - SET(actor->user.Flags, SPR_BOUNCE); // no bouncing on shallow water + actor->user.Flags |= (SPR_BOUNCE); // no bouncing on shallow water if (!TEST(actor->user.Flags, SPR_BOUNCE)) { - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); actor->user.coll.setNone(); actor->user.Counter = 0; actor->user.zchange = -actor->user.zchange; @@ -8409,7 +8409,7 @@ int DoGrenade(DSWActor* actor) actorNew->spr.xrepeat = 40; actorNew->spr.yrepeat = 40; actorNew->spr.opos = actor->spr.opos; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.xchange = actor->user.xchange; @@ -8419,7 +8419,7 @@ int DoGrenade(DSWActor* actor) ScaleSpriteVector(actorNew, 22000); if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); } return false; @@ -8648,7 +8648,7 @@ int DoMineStuck(DSWActor* actor) //actor->user.WaitTics = 65536; actor->user.WaitTics = 32767; actor->user.Counter2 = 0; - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); } // limit the number of times DoMineRangeTest is called @@ -8770,12 +8770,12 @@ int DoMineStuck(DSWActor* actor) void SetMineStuck(DSWActor* actor) { // stuck - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); // not yet active for 1 sec RESET(actor->user.Flags, SPR_ACTIVE); actor->user.WaitTics = SEC(3); - //SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actor->spr.cstat, CSTAT_SPRITE_BLOCK_HITSCAN); + //actor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actor->spr.cstat |= (CSTAT_SPRITE_BLOCK_HITSCAN); actor->user.Counter = 0; change_actor_stat(actor, STAT_MINE_STUCK); ChangeState(actor, s_MineStuck); @@ -9058,7 +9058,7 @@ int DoEMPBurst(DSWActor* actor) { // activate it actor->user.WaitTics = SEC(7); - SET(actor->user.Flags, SPR_ACTIVE); + actor->user.Flags |= (SPR_ACTIVE); } if (RandomRange(1000) > 500) @@ -9165,7 +9165,7 @@ int DoLaser(DSWActor* actor) actorNew->spr.yrepeat = 16; actorNew->spr.pal = actorNew->user.spal = PALETTE_RED_LIGHTING; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.xchange = actorNew->user.ychange = actorNew->user.zchange = 0; @@ -9258,7 +9258,7 @@ int DoRail(DSWActor* actor) actorNew->spr.xrepeat = 10; actorNew->spr.yrepeat = 10; actorNew->spr.opos = actor->spr.opos; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.xchange = actor->user.xchange; @@ -9268,7 +9268,7 @@ int DoRail(DSWActor* actor) ScaleSpriteVector(actorNew, 1500); if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); } } } @@ -9351,7 +9351,7 @@ int DoRocket(DSWActor* actor) actorNew->spr.xrepeat = 40; actorNew->spr.yrepeat = 40; actorNew->spr.opos = actor->spr.opos; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.xchange = actor->user.xchange; @@ -9361,7 +9361,7 @@ int DoRocket(DSWActor* actor) ScaleSpriteVector(actorNew, 20000); if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); } return false; } @@ -9441,7 +9441,7 @@ int DoMicro(DSWActor* actor) actorNew->spr.yrepeat = 20; actorNew->spr.opos = actor->spr.opos; actorNew->spr.zvel = actor->spr.zvel; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.xchange = actor->user.xchange; @@ -9451,7 +9451,7 @@ int DoMicro(DSWActor* actor) ScaleSpriteVector(actorNew, 20000); if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); // last smoke if ((actor->user.WaitTics -= MISSILEMOVETICS) <= 0) @@ -9515,7 +9515,7 @@ int DoUziBullet(DSWActor* actor) SetOwner(GetOwner(actor), actorNew); actorNew->spr.ang = actor->spr.ang; actorNew->spr.clipdist = 128 >> 2; - SET(actorNew->spr.cstat, CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); if (!TEST(actor->user.Flags, SPR_UNDERWATER)) { @@ -9525,7 +9525,7 @@ int DoUziBullet(DSWActor* actor) actorNew->spr.yrepeat = UZI_SPARK_REPEAT; SetOwner(GetOwner(actor), actorNew); actorNew->spr.ang = actor->spr.ang; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); } KillActor(actor); @@ -9701,7 +9701,7 @@ int SpawnCoolieExp(DSWActor* actor) SetOwner(actor, actorNew); actorNew->spr.shade = -40; actorNew->spr.pal = actorNew->user.spal = actor->user.spal; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.Radius = DamageData[DMG_BOLT_EXP].radius; @@ -9790,7 +9790,7 @@ void SpawnFireballFlames(DSWActor* actor, DSWActor* enemyActor) SetOwner(GetOwner(actor), actorNew); actorNew->spr.shade = -40; actorNew->spr.pal = actorNew->user.spal = actor->user.spal; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); //actorNew->user.Radius = DamageData[DMG_FIREBALL_FLAMES].radius; @@ -9832,7 +9832,7 @@ int SpawnBreakFlames(DSWActor* actor) actorNew->spr.shade = -40; if (actor->hasU()) actorNew->spr.pal = actorNew->user.spal = actor->user.spal; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.Radius = 200; @@ -9893,8 +9893,8 @@ void SpawnFireballExp(DSWActor* actor) SetOwner(GetOwner(actor), actorNew); actorNew->spr.shade = -40; actorNew->spr.pal = actorNew->user.spal = actor->user.spal; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->user.Flags, TEST(actor->user.Flags,SPR_UNDERWATER)); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->user.Flags |= (TEST(actor->user.Flags,SPR_UNDERWATER)); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); // @@ -9926,7 +9926,7 @@ void SpawnGoroFireballExp(DSWActor* actor) SetOwner(GetOwner(actor), actorNew); actorNew->spr.shade = -40; actorNew->spr.pal = actorNew->user.spal = actor->user.spal; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); // @@ -10216,7 +10216,7 @@ void AddSpriteToSectorObject(DSWActor* actor, SECTOR_OBJECTp sop) sop->so_actors[sn] = actor; so_setspriteinterpolation(sop, actor); - SET(actor->user.Flags, SPR_ON_SO_SECTOR|SPR_SO_ATTACHED); + actor->user.Flags |= (SPR_ON_SO_SECTOR|SPR_SO_ATTACHED); actor->user.sx = sop->xmid - actor->spr.pos.X; actor->user.sy = sop->ymid - actor->spr.pos.Y; @@ -11036,7 +11036,7 @@ int DoMirv(DSWActor* actor) actorNew->spr.yrepeat = 40; actorNew->spr.clipdist = 32L >> 2; actorNew->spr.zvel = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->user.ceiling_dist = Z(16); actorNew->user.floor_dist = Z(16); @@ -11048,7 +11048,7 @@ int DoMirv(DSWActor* actor) actorNew->user.zchange = actorNew->spr.zvel; if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); } } @@ -11086,7 +11086,7 @@ bool MissileSetPos(DSWActor* actor, ANIMATORp DoWeapon, int dist) actor->user.ychange = MOVEy(actor->spr.xvel, actor->spr.ang); actor->user.zchange = actor->spr.zvel; - SET(actor->user.Flags, SPR_SET_POS_DONT_KILL); + actor->user.Flags |= (SPR_SET_POS_DONT_KILL); if ((*DoWeapon)(actor)) retval = true; RESET(actor->user.Flags, SPR_SET_POS_DONT_KILL); @@ -11127,7 +11127,7 @@ bool TestMissileSetPos(DSWActor* actor, ANIMATORp DoWeapon, int dist, int zvel) actor->user.ychange = MOVEy(actor->spr.xvel, actor->spr.ang); actor->user.zchange = zvel; - SET(actor->user.Flags, SPR_SET_POS_DONT_KILL); + actor->user.Flags |= (SPR_SET_POS_DONT_KILL); if ((*DoWeapon)(actor)) retval = true; RESET(actor->user.Flags, SPR_SET_POS_DONT_KILL); @@ -11287,7 +11287,7 @@ void InitSpellRing(PLAYERp pp) actorNew->spr.backuppos(); if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); } } @@ -11423,12 +11423,12 @@ int InitLavaThrow(DSWActor* actor) actorNew->spr.ang = nang; if (RANDOM_P2(1024) > 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_XFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP); if (RANDOM_P2(1024) > 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_YFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP); actorNew->user.Radius = 200; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.clipdist = 256>>2; actorNew->user.ceiling_dist = Z(14); actorNew->user.floor_dist = Z(14); @@ -11489,14 +11489,14 @@ void InitVulcanBoulder(DSWActor* actor) zsize = ActorSizeZ(actorNew); actorNew->user.Radius = 200; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.clipdist = 256>>2; actorNew->user.ceiling_dist = zsize/2; actorNew->user.floor_dist = zsize/2; if (RANDOM_P2(1024) > 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_XFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP); if (RANDOM_P2(1024) > 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_YFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP); if (SP_TAG7(actor)) { @@ -11558,7 +11558,7 @@ int InitSerpRing(DSWActor* actor) // control direction of spinning FLIP(actor->user.Flags, SPR_BOUNCE); - SET(actorNew->user.Flags, TEST(actor->user.Flags, SPR_BOUNCE)); + actorNew->user.Flags |= (TEST(actor->user.Flags, SPR_BOUNCE)); actorNew->user.Dist = 600; actorNew->user.TargetDist = SERP_RING_DIST; @@ -11573,8 +11573,8 @@ int InitSerpRing(DSWActor* actor) RESET(actorNew->spr.extra, SPRX_PLAYER_OR_ENEMY); actorNew->spr.clipdist = (128+64) >> 2; - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->user.Radius = 400; } @@ -11630,7 +11630,7 @@ void InitSpellNapalm(PLAYERp pp) actor->spr.yrepeat = 32; actor->spr.clipdist = 0; actor->spr.zvel = -pp->horizon.horiz.asq16() >> 9; - SET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); + 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); @@ -11660,7 +11660,7 @@ void InitSpellNapalm(PLAYERp pp) } if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actor)) - SET(actor->user.Flags, SPR_UNDERWATER); + actor->user.Flags |= (SPR_UNDERWATER); plActor->spr.clipdist = oclipdist; @@ -11709,7 +11709,7 @@ int InitEnemyNapalm(DSWActor* actor) actorNew->spr.xrepeat = 32; actorNew->spr.yrepeat = 32; actorNew->spr.clipdist = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); + 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); @@ -11765,7 +11765,7 @@ int InitSpellMirv(PLAYERp pp) actorNew->spr.yrepeat = 72; actorNew->spr.clipdist = 32 >> 2; actorNew->spr.zvel = -pp->horizon.horiz.asq16() >> 9; - SET(actorNew->spr.cstat, CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.floor_dist = Z(16); @@ -11804,7 +11804,7 @@ int InitEnemyMirv(DSWActor* actor) actorNew->spr.yrepeat = 72; actorNew->spr.clipdist = 32L >> 2; - SET(actorNew->spr.cstat, CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.floor_dist = Z(16); @@ -12235,7 +12235,7 @@ int InitSumoNapalm(DSWActor* actor) actorNew->spr.xrepeat = 32; actorNew->spr.yrepeat = 32; actorNew->spr.clipdist = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); + 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); @@ -12299,7 +12299,7 @@ int InitSumoSkull(DSWActor* actor) // control direction of spinning FLIP(actor->user.Flags, SPR_BOUNCE); - SET(actorNew->user.Flags, TEST(actor->user.Flags, SPR_BOUNCE)); + actorNew->user.Flags |= (TEST(actor->user.Flags, SPR_BOUNCE)); actorNew->user.StateEnd = s_SkullExplode; actorNew->user.Rot = sg_SkullWait; @@ -12315,8 +12315,8 @@ int InitSumoSkull(DSWActor* actor) SET(actorNew->spr.extra, SPRX_PLAYER_OR_ENEMY); actorNew->spr.clipdist = (128+64) >> 2; - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->user.Radius = 400; return 0; @@ -12664,7 +12664,7 @@ int InitStar(PLAYERp pp) actorNew->user.WeaponNum = plActor->user.WeaponNum; actorNew->user.Radius = 100; actorNew->user.Counter = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); // zvel had to be tweaked alot for this weapon // MissileSetPos seemed to be pushing the sprite too far up or down when @@ -12686,7 +12686,7 @@ int InitStar(PLAYERp pp) actorNew->user.zchange = zvel; if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->spr.backuppos(); @@ -12765,7 +12765,7 @@ void InitHeartAttack(PLAYERp pp) 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); - SET(actorNew->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); actorNew->user.floor_dist = Z(1); actorNew->user.ceiling_dist = Z(1); @@ -13072,8 +13072,8 @@ int InitLaser(PLAYERp pp) actorNew->user.Radius = 200; actorNew->user.ceiling_dist = Z(1); actorNew->user.floor_dist = Z(1); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); // at certain angles the clipping box was big enough to block the // initial positioning of the fireball. @@ -13085,7 +13085,7 @@ int InitLaser(PLAYERp pp) actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang - 512); if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); // the slower the missile travels the less of a zvel it needs // move it 1200 dist in increments - works better @@ -13175,8 +13175,8 @@ int InitRail(PLAYERp pp) actorNew->user.Radius = RAIL_RADIUS; actorNew->user.ceiling_dist = Z(1); actorNew->user.floor_dist = Z(1); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_INVISIBLE); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); // at certain angles the clipping box was big enough to block the // initial positioning @@ -13189,7 +13189,7 @@ int InitRail(PLAYERp pp) actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang - 512); if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); if (TestMissileSetPos(actorNew, DoRailStart, 1200, zvel)) { @@ -13251,8 +13251,8 @@ int InitZillaRail(DSWActor* actor) actorNew->user.Radius = RAIL_RADIUS; actorNew->user.ceiling_dist = Z(1); actorNew->user.floor_dist = Z(1); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_INVISIBLE); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); // at certain angles the clipping box was big enough to block the // initial positioning @@ -13265,7 +13265,7 @@ int InitZillaRail(DSWActor* actor) actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang - 512); if (SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); if (TestMissileSetPos(actorNew, DoRailStart, 1200, zvel)) { @@ -13344,8 +13344,8 @@ int InitRocket(PLAYERp pp) actorNew->user.Radius = 2000; actorNew->user.ceiling_dist = Z(3); actorNew->user.floor_dist = Z(3); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); // Set default palette actorNew->spr.pal = actorNew->user.spal = 17; // White @@ -13355,7 +13355,7 @@ int InitRocket(PLAYERp pp) switch (pp->WpnRocketType) { case 1: - SET(actorNew->user.Flags, SPR_FIND_PLAYER); + actorNew->user.Flags |= (SPR_FIND_PLAYER); actorNew->spr.pal = actorNew->user.spal = 20; // Yellow break; } @@ -13371,7 +13371,7 @@ int InitRocket(PLAYERp pp) actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang - 512); if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); // cancel smoke trail actorNew->user.Counter = 1; @@ -13452,16 +13452,16 @@ int InitBunnyRocket(PLAYERp pp) actorNew->user.Radius = 2000; actorNew->user.ceiling_dist = Z(3); actorNew->user.floor_dist = Z(3); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); if (WpnRocketHeat) { switch (pp->WpnRocketType) { case 1: - SET(actorNew->user.Flags, SPR_FIND_PLAYER); + actorNew->user.Flags |= (SPR_FIND_PLAYER); break; } } @@ -13476,7 +13476,7 @@ int InitBunnyRocket(PLAYERp pp) actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang - 512); if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); // cancel smoke trail actorNew->user.Counter = 1; @@ -13556,8 +13556,8 @@ int InitNuke(PLAYERp pp) actorNew->user.Radius = NUKE_RADIUS; actorNew->user.ceiling_dist = Z(3); actorNew->user.floor_dist = Z(3); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); // at certain angles the clipping box was big enough to block the // initial positioning of the fireball. @@ -13569,7 +13569,7 @@ int InitNuke(PLAYERp pp) actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang - 512); if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); // cancel smoke trail actorNew->user.Counter = 1; @@ -13640,15 +13640,15 @@ int InitEnemyNuke(DSWActor* actor) actorNew->user.Radius = NUKE_RADIUS; actorNew->user.ceiling_dist = Z(3); actorNew->user.floor_dist = Z(3); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang + 512); HelpMissileLateral(actorNew, 500); actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang - 512); if (SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); // cancel smoke trail actorNew->user.Counter = 1; @@ -13740,8 +13740,8 @@ int InitMicro(PLAYERp pp) actorNew->user.ceiling_dist = Z(2); actorNew->user.floor_dist = Z(2); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); actorNew->user.WaitTics = 10 + RandomRange(40); @@ -13756,7 +13756,7 @@ int InitMicro(PLAYERp pp) actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang - 512); if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); // cancel smoke trail actorNew->user.Counter = 1; @@ -14132,7 +14132,7 @@ int InitSerpSpell(DSWActor* actor) actorNew->spr.yrepeat = 64; actorNew->spr.clipdist = 32L >> 2; actorNew->spr.zvel = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->user.ceiling_dist = Z(16); actorNew->user.floor_dist = Z(16); @@ -14160,7 +14160,7 @@ int InitSerpSpell(DSWActor* actor) actor->spr.clipdist = oclipdist; if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); } return 0; @@ -14229,7 +14229,7 @@ int InitSerpMonstSpell(DSWActor* actor) actorNew->spr.yrepeat = 116; actorNew->spr.clipdist = 32L >> 2; actorNew->spr.zvel = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->user.ceiling_dist = Z(16); actorNew->user.floor_dist = Z(16); @@ -14258,7 +14258,7 @@ int InitSerpMonstSpell(DSWActor* actor) actor->spr.clipdist = oclipdist; if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); } return 0; @@ -14308,7 +14308,7 @@ int InitEnemyRocket(DSWActor* actor) actorNew->user.RotNum = 5; NewStateGroup(actorNew, &sg_Rocket[0]); actorNew->user.Radius = 200; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->user.xchange = MOVEx(actorNew->spr.xvel, actorNew->spr.ang); actorNew->user.ychange = MOVEy(actorNew->spr.xvel, actorNew->spr.ang); @@ -14316,7 +14316,7 @@ int InitEnemyRocket(DSWActor* actor) if (actor->user.spal == PAL_XLAT_LT_TAN) { - SET(actorNew->user.Flags, SPR_FIND_PLAYER); + actorNew->user.Flags |= (SPR_FIND_PLAYER); actorNew->spr.pal = actorNew->user.spal = 20; // Yellow } @@ -14388,8 +14388,8 @@ int InitEnemyRail(DSWActor* actor) actorNew->user.ceiling_dist = Z(1); actorNew->user.floor_dist = Z(1); SET(actorNew->user.Flags2, SPR2_SO_MISSILE); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_INVISIBLE); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->spr.clipdist = 64 >> 2; @@ -14460,7 +14460,7 @@ int InitZillaRocket(DSWActor* actor) actorNew->user.RotNum = 5; NewStateGroup(actorNew, &sg_Rocket[0]); actorNew->user.Radius = 200; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->user.xchange = MOVEx(actorNew->spr.xvel, actorNew->spr.ang); actorNew->user.ychange = MOVEy(actorNew->spr.xvel, actorNew->spr.ang); @@ -14471,7 +14471,7 @@ int InitZillaRocket(DSWActor* actor) actorNew->spr.pal = actorNew->user.spal = 17; // White else { - SET(actorNew->user.Flags, SPR_FIND_PLAYER); + actorNew->user.Flags |= (SPR_FIND_PLAYER); actorNew->spr.pal = actorNew->user.spal = 20; // Yellow } @@ -14563,7 +14563,7 @@ int InitEnemyCrossbow(DSWActor* actor) actorNew->user.ychange = MOVEy(actorNew->spr.xvel, actorNew->spr.ang); actorNew->user.zchange = actorNew->spr.zvel; - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); MissileSetPos(actorNew, DoStar, 400); @@ -14603,7 +14603,7 @@ int InitSkelSpell(DSWActor* actor) actorNew->spr.zvel = 0; actorNew->spr.ang = nang; actorNew->spr.clipdist = 64L>>2; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); // find the distance to the target (player) dist = Distance(nx, ny, actor->user.targetActor->spr.pos.X, actor->user.targetActor->spr.pos.Y); @@ -14713,7 +14713,7 @@ int InitCoolgDrip(DSWActor* actor) actorNew->spr.clipdist = 16L>>2; actorNew->user.ceiling_dist = Z(4); actorNew->user.floor_dist = Z(4); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); DoFindGroundPoint(actor); @@ -14752,7 +14752,7 @@ int GenerateDrips(DSWActor* actor) actorNew->spr.clipdist = 16L>>2; actorNew->user.ceiling_dist = Z(4); actorNew->user.floor_dist = Z(4); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); if (TEST_BOOL1(actor)) actorNew->user.spal = actorNew->spr.pal = PALETTE_BLUE_LIGHTING; @@ -14817,7 +14817,7 @@ void InitFireballTrap(DSWActor* actor) actorNew->spr.shade = -40; actorNew->spr.clipdist = 32>>2; actorNew->spr.zvel = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->user.WeaponNum = WPN_HOTHEAD; actorNew->user.xchange = MOVEx(actorNew->spr.xvel, actorNew->spr.ang); @@ -14845,7 +14845,7 @@ void InitBoltTrap(DSWActor* actor) actorNew->spr.xrepeat = 32; actorNew->spr.shade = -15; actorNew->spr.zvel = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->user.RotNum = 5; NewStateGroup(actorNew, &sg_Rocket[0]); @@ -14881,7 +14881,7 @@ void InitSpearTrap(DSWActor* actor) actorNew->user.ychange = MOVEy(actorNew->spr.xvel, actorNew->spr.ang); actorNew->user.zchange = actorNew->spr.zvel; - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); PlaySound(DIGI_STAR, actor, v3df_none); } @@ -14934,8 +14934,8 @@ int InitTracerUzi(PLAYERp pp) actorNew->user.Radius = 50; actorNew->user.ceiling_dist = Z(3); actorNew->user.floor_dist = Z(3); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); DSWActor* plActor = pp->actor; oclipdist = plActor->spr.clipdist; @@ -14969,7 +14969,7 @@ int InitTracerUzi(PLAYERp pp) actorNew->user.zchange = actorNew->spr.zvel; if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); return 0; } @@ -15001,8 +15001,8 @@ int InitTracerTurret(DSWActor* actor, DSWActor* Operator, fixed_t q16horiz) actorNew->user.Radius = 50; actorNew->user.ceiling_dist = Z(1); actorNew->user.floor_dist = Z(1); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); actorNew->spr.zvel = xs_CRoundToInt(-MulScaleF(q16horiz, actorNew->spr.xvel / 8., 16)); @@ -15016,7 +15016,7 @@ int InitTracerTurret(DSWActor* actor, DSWActor* Operator, fixed_t q16horiz) actorNew->user.zchange = actorNew->spr.zvel; if (SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); return 0; } @@ -15046,15 +15046,15 @@ int InitTracerAutoTurret(DSWActor* actor, int xchange, int ychange, int zchange) actorNew->user.Radius = 50; actorNew->user.ceiling_dist = Z(1); actorNew->user.floor_dist = Z(1); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); actorNew->user.xchange = xchange; actorNew->user.ychange = ychange; actorNew->user.zchange = zchange; if (SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); return 0; } @@ -15083,7 +15083,7 @@ int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, int hit_x, int hit_y, i actorNew->spr.shade = -40; if (hitActor->user.PlayerP) - SET(actorNew->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); switch (hitActor->user.ID) { @@ -15102,7 +15102,7 @@ int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, int hit_x, int hit_y, i default: actorNew->spr.xrepeat = UZI_SMOKE_REPEAT/3; actorNew->spr.yrepeat = UZI_SMOKE_REPEAT/3; - SET(actorNew->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); //actorNew->user.spal = actorNew->spr.pal = PALETTE_RED_LIGHTING; break; } @@ -15111,7 +15111,7 @@ int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, int hit_x, int hit_y, i actorNew->spr.ang = actor->spr.ang; SetActorZ(actorNew, &hit_pos); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN); if ((RANDOM_P2(1024<<5)>>5) < 512+128) @@ -15157,9 +15157,9 @@ DSWActor* SpawnWallHole(sectortype* hit_sect, walltype* hit_wall, int hit_x, int actor->spr.pos.Z = hit_z; actor->spr.picnum = 2151; - //SET(actor->spr.cstat, CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_ALIGNMENT_WALL); - SET(actor->spr.cstat, CSTAT_SPRITE_ALIGNMENT_WALL); - SET(actor->spr.cstat, CSTAT_SPRITE_ONE_SIDE); + //actor->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT|CSTAT_SPRITE_ALIGNMENT_WALL); + actor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL); + actor->spr.cstat |= (CSTAT_SPRITE_ONE_SIDE); wall_ang = NORM_ANGLE(getangle(hit_wall->delta())-512); @@ -15373,7 +15373,7 @@ int InitUzi(PLAYERp pp) actorNew->spr.xrepeat = UZI_SMOKE_REPEAT; actorNew->spr.yrepeat = UZI_SMOKE_REPEAT; SetOwner(pp->actor, actorNew); - SET(actorNew->spr.cstat, cstat | CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (cstat | CSTAT_SPRITE_YCENTER); actorNew->spr.clipdist = 8 >> 2; HitscanSpriteAdjust(actorNew, hit.hitWall); @@ -15386,7 +15386,7 @@ int InitUzi(PLAYERp pp) actorNew->spr.yrepeat = UZI_SPARK_REPEAT; SetOwner(pp->actor, actorNew); actorNew->user.spal = actorNew->spr.pal = pal; - SET(actorNew->spr.cstat, cstat | CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (cstat | CSTAT_SPRITE_YCENTER); actorNew->spr.clipdist = 8 >> 2; HitscanSpriteAdjust(actorNew, hit.hitWall); @@ -15422,8 +15422,8 @@ int InitTankShell(DSWActor* actor, PLAYERp pp) actorNew->user.ceiling_dist = Z(4); actorNew->user.floor_dist = Z(4); SET(actorNew->user.Flags2, SPR2_SO_MISSILE); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); actorNew->spr.zvel = xs_CRoundToInt(-MulScaleF(pp->horizon.horiz.asq16(), actorNew->spr.xvel / 8., 16)); @@ -15437,7 +15437,7 @@ int InitTankShell(DSWActor* actor, PLAYERp pp) actorNew->user.zchange = actorNew->spr.zvel; if (SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); return 0; @@ -15507,8 +15507,8 @@ int InitTurretMicro(DSWActor* actor, PLAYERp pp) actorNew->user.ceiling_dist = Z(2); actorNew->user.floor_dist = Z(2); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); actorNew->user.WaitTics = 10 + RandomRange(40); @@ -15561,7 +15561,7 @@ int InitTurretRocket(DSWActor* actor, PLAYERp pp) actorNew->user.ceiling_dist = Z(4); actorNew->user.floor_dist = Z(4); SET(actorNew->user.Flags2, SPR2_SO_MISSILE); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.zvel = xs_CRoundToInt(-MulScaleF(pp->horizon.horiz.asq16(), actorNew->spr.xvel / 8., 16)); @@ -15574,7 +15574,7 @@ int InitTurretRocket(DSWActor* actor, PLAYERp pp) actorNew->user.zchange = actorNew->spr.zvel; if (SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); return 0; } @@ -15598,7 +15598,7 @@ int InitTurretFireball(DSWActor* actor, PLAYERp pp) actorNew->user.ceiling_dist = Z(4); actorNew->user.floor_dist = Z(4); SET(actorNew->user.Flags2, SPR2_SO_MISSILE); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.zvel = xs_CRoundToInt(-MulScaleF(pp->horizon.horiz.asq16(), actorNew->spr.xvel / 8., 16)); @@ -15612,7 +15612,7 @@ int InitTurretFireball(DSWActor* actor, PLAYERp pp) actorNew->user.zchange = actorNew->spr.zvel; if (SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); return 0; } @@ -15649,8 +15649,8 @@ int InitTurretRail(DSWActor* actor, PLAYERp pp) actorNew->user.ceiling_dist = Z(1); actorNew->user.floor_dist = Z(1); SET(actorNew->user.Flags2, SPR2_SO_MISSILE); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_INVISIBLE); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER|CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->spr.clipdist = 64L>>2; @@ -15697,8 +15697,8 @@ int InitTurretLaser(DSWActor* actor, PLAYERp pp) actorNew->user.ceiling_dist = Z(1); actorNew->user.floor_dist = Z(1); SET(actorNew->user.Flags2, SPR2_SO_MISSILE); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->spr.clipdist = 64L>>2; if (WeaponAutoAim(actor, actorNew, 32, false) == -1) @@ -15929,7 +15929,7 @@ DSWActor* SpawnBoatSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wall, actorNew->spr.xrepeat = UZI_SMOKE_REPEAT + 12; actorNew->spr.yrepeat = UZI_SMOKE_REPEAT + 12; SetOwner(pp->actor, actorNew); - SET(actorNew->spr.cstat, CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); actorNew->spr.hitag = LUMINOUS; //Always full brightness // Sprite starts out with center exactly on wall. @@ -15946,7 +15946,7 @@ DSWActor* SpawnBoatSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wall, actorNew->spr.yrepeat = UZI_SPARK_REPEAT + 10; SetOwner(pp->actor, actorNew); actorNew->user.spal = actorNew->spr.pal = PALETTE_DEFAULT; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.clipdist = 32 >> 2; @@ -15966,7 +15966,7 @@ int SpawnSwordSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wall, int h actorNew->spr.shade = -40; actorNew->spr.xrepeat = actorNew->spr.yrepeat = 20; SetOwner(pp->actor, actorNew); - SET(actorNew->spr.cstat, CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); actorNew->spr.hitag = LUMINOUS; //Always full brightness // Sprite starts out with center exactly on wall. @@ -15982,9 +15982,9 @@ int SpawnSwordSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wall, int h actorNew->spr.xrepeat = actorNew->spr.yrepeat = 20; SetOwner(pp->actor, actorNew); actorNew->user.spal = actorNew->spr.pal = PALETTE_DEFAULT; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); if (actor->user.WeaponNum == WPN_FIST) - SET(actorNew->spr.cstat, CSTAT_SPRITE_INVISIBLE); + actorNew->spr.cstat |= (CSTAT_SPRITE_INVISIBLE); actorNew->spr.clipdist = 32 >> 2; @@ -16000,7 +16000,7 @@ DSWActor* SpawnTurretSparks(sectortype* hit_sect, walltype* hit_wall, int hit_x, actorNew->spr.shade = -40; actorNew->spr.xrepeat = UZI_SMOKE_REPEAT + 12; actorNew->spr.yrepeat = UZI_SMOKE_REPEAT + 12; - SET(actorNew->spr.cstat, CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); actorNew->spr.hitag = LUMINOUS; //Always full brightness // Sprite starts out with center exactly on wall. @@ -16015,7 +16015,7 @@ DSWActor* SpawnTurretSparks(sectortype* hit_sect, walltype* hit_wall, int hit_x, actorNew->spr.xrepeat = UZI_SPARK_REPEAT + 10; actorNew->spr.yrepeat = UZI_SPARK_REPEAT + 10; actorNew->user.spal = actorNew->spr.pal = PALETTE_DEFAULT; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.clipdist = 32 >> 2; HitscanSpriteAdjust(actorNew, hit_wall); @@ -16035,7 +16035,7 @@ DSWActor* SpawnShotgunSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wal actorNew->spr.yrepeat = UZI_SPARK_REPEAT; SetOwner(pp->actor, actorNew); actorNew->user.spal = actorNew->spr.pal = PALETTE_DEFAULT; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.clipdist = 32 >> 2; @@ -16045,7 +16045,7 @@ DSWActor* SpawnShotgunSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wal actorNew->spr.xrepeat = SHOTGUN_SMOKE_REPEAT; actorNew->spr.yrepeat = SHOTGUN_SMOKE_REPEAT; SetOwner(pp->actor, actorNew); - SET(actorNew->spr.cstat, CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER); actorNew->spr.hitag = LUMINOUS; //Always full brightness // Sprite starts out with center exactly on wall. @@ -16334,7 +16334,7 @@ int InitEnemyUzi(DSWActor* actor) SetOwner(actor, actorNew); actorNew->user.WaitTics = 63; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.clipdist = 32L >> 2; @@ -16343,7 +16343,7 @@ int InitEnemyUzi(DSWActor* actor) actorNew->spr.xrepeat = UZI_SMOKE_REPEAT; actorNew->spr.yrepeat = UZI_SMOKE_REPEAT; SetOwner(actor, actorNew); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.clipdist = 8 >> 2; HitscanSpriteAdjust(actorNew, hit.hitWall); @@ -16356,7 +16356,7 @@ int InitEnemyUzi(DSWActor* actor) actorNew->spr.yrepeat = UZI_SPARK_REPEAT; SetOwner(actor, actorNew); actorNew->user.spal = actorNew->spr.pal; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->spr.clipdist = 8 >> 2; HitscanSpriteAdjust(actorNew, hit.hitWall); @@ -16409,7 +16409,7 @@ int InitGrenade(PLAYERp pp) actorNew->user.RotNum = 5; NewStateGroup(actorNew, &sg_Grenade[0]); - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); SetOwner(pp->actor, actorNew); actorNew->spr.yrepeat = 32; @@ -16422,11 +16422,11 @@ int InitGrenade(PLAYERp pp) actorNew->user.ceiling_dist = Z(3); actorNew->user.floor_dist = Z(3); actorNew->user.Counter = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK); if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->spr.zvel = -pp->horizon.horiz.asq16() >> 9; @@ -16438,7 +16438,7 @@ int InitGrenade(PLAYERp pp) actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang - 512); // don't do smoke for this movement - SET(actorNew->user.Flags, SPR_BOUNCE); + actorNew->user.Flags |= (SPR_BOUNCE); MissileSetPos(actorNew, DoGrenade, 1000); RESET(actorNew->user.Flags, SPR_BOUNCE); @@ -16484,7 +16484,7 @@ int InitSpriteGrenade(DSWActor* actor) actorNew->user.RotNum = 5; NewStateGroup(actorNew, &sg_Grenade[0]); - SET(actorNew->user.Flags, SPR_XFLIP_TOGGLE); + actorNew->user.Flags |= (SPR_XFLIP_TOGGLE); if (actor->user.ID == ZOMBIE_RUN_R0) SetOwner(GetOwner(actor), actorNew); @@ -16500,8 +16500,8 @@ int InitSpriteGrenade(DSWActor* actor) actorNew->user.ceiling_dist = Z(3); actorNew->user.floor_dist = Z(3); actorNew->user.Counter = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_BLOCK); //actorNew->spr.zvel = (-RandomRange(100) * HORIZ_MULT); @@ -16516,7 +16516,7 @@ int InitSpriteGrenade(DSWActor* actor) actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang - 512); // don't do smoke for this movement - SET(actorNew->user.Flags, SPR_BOUNCE); + actorNew->user.Flags |= (SPR_BOUNCE); MissileSetPos(actorNew, DoGrenade, 400); RESET(actorNew->user.Flags, SPR_BOUNCE); @@ -16557,12 +16557,12 @@ int InitMine(PLAYERp pp) actorNew->user.ceiling_dist = Z(5); actorNew->user.floor_dist = Z(5); actorNew->user.Counter = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.spal = actorNew->spr.pal = actor->user.spal; // Set sticky color if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); MissileSetPos(actorNew, DoMine, 800); @@ -16609,12 +16609,12 @@ int InitEnemyMine(DSWActor* actor) actorNew->user.ceiling_dist = Z(5); actorNew->user.floor_dist = Z(5); actorNew->user.Counter = 0; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); actorNew->user.spal = actorNew->spr.pal = actor->user.spal; // Set sticky color if (SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); MissileSetPos(actorNew, DoMine, 300); actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang-512); @@ -16680,7 +16680,7 @@ int InitFireball(PLAYERp pp) actorNew->spr.shade = -40; actorNew->spr.clipdist = 32>>2; SetOwner(pp->actor, actorNew); - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); actorNew->user.Radius = 100; actorNew->user.ceiling_dist = Z(6); @@ -16697,7 +16697,7 @@ int InitFireball(PLAYERp pp) actorNew->spr.ang = NORM_ANGLE(actorNew->spr.ang - 512); if (TEST(pp->Flags, PF_DIVING) || SpriteInUnderwaterArea(actorNew)) - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->user.Flags |= (SPR_UNDERWATER); if (TestMissileSetPos(actorNew, DoFireball, 1200, MulScale(zvel,44000, 16))) { @@ -17144,7 +17144,7 @@ bool MissileHitDiveArea(DSWActor* actor) if (FAF_ConnectArea(actor->spr.sector())) { if (SectorIsUnderwaterArea(actor->spr.sector())) - SET(actor->user.Flags, SPR_UNDERWATER); + actor->user.Flags |= (SPR_UNDERWATER); else RESET(actor->user.Flags, SPR_UNDERWATER); } @@ -17163,7 +17163,7 @@ bool MissileHitDiveArea(DSWActor* actor) if (actor->spr.pos.Z < (hit_sect->floorz-Z(20))) return false; - SET(actor->user.Flags, SPR_UNDERWATER); + actor->user.Flags |= (SPR_UNDERWATER); SpawnSplash(actor); SpriteWarpToUnderwater(actor); actor->user.coll.setNone(); @@ -17206,8 +17206,8 @@ DSWActor* SpawnBubble(DSWActor* actor) actorNew->user.WaitTics = 120 * 120; actorNew->spr.zvel = 512; actorNew->spr.clipdist = 12 >> 2; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); - SET(actorNew->user.Flags, SPR_UNDERWATER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); + actorNew->user.Flags |= (SPR_UNDERWATER); actorNew->spr.shade = -60; // Make em brighter return actorNew; @@ -17241,13 +17241,13 @@ int SpawnVehicleSmoke(DSWActor* actor) actorNew->spr.shade = -40; actorNew->spr.xrepeat = 64; actorNew->spr.yrepeat = 64; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); if (RANDOM_P2(1024) < 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_XFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP); if (RANDOM_P2(1024) < 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_YFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP); actorNew->spr.ang = RANDOM_P2(2048); actorNew->spr.xvel = RANDOM_P2(32); @@ -17267,13 +17267,13 @@ int SpawnSmokePuff(DSWActor* actor) actorNew->spr.shade = -40; actorNew->spr.xrepeat = 64; actorNew->spr.yrepeat = 64; - SET(actorNew->spr.cstat, CSTAT_SPRITE_YCENTER); + actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER); RESET(actorNew->spr.cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN); if (RANDOM_P2(1024) < 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_XFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_XFLIP); if (RANDOM_P2(1024) < 512) - SET(actorNew->spr.cstat, CSTAT_SPRITE_YFLIP); + actorNew->spr.cstat |= (CSTAT_SPRITE_YFLIP); actorNew->spr.ang = RANDOM_P2(2048); actorNew->spr.xvel = RANDOM_P2(32); @@ -17966,7 +17966,7 @@ void QueueGeneric(DSWActor* actor, short pic) case 932: case GORE_Head: change_actor_stat(actor,STAT_DEFAULT); // Breakable - SET(actor->spr.cstat, CSTAT_SPRITE_BREAKABLE); + actor->spr.cstat |= (CSTAT_SPRITE_BREAKABLE); SET(actor->spr.extra, SPRX_BREAKABLE); break; default: @@ -18074,7 +18074,7 @@ int DoShrapVelocity(DSWActor* actor) // hit a floor if (!TEST(actor->user.Flags, SPR_BOUNCE)) { - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); ScaleSpriteVector(actor, 18000); actor->user.coll.setNone(); actor->user.Counter = 0; @@ -18102,14 +18102,14 @@ int DoShrapVelocity(DSWActor* actor) { actor->spr.pos.Z = actor->user.loz; if (TEST(actor->user.Flags, SPR_UNDERWATER)) - SET(actor->user.Flags, SPR_BOUNCE); // no bouncing underwater + actor->user.Flags |= (SPR_BOUNCE); // no bouncing underwater if (actor->user.lo_sectp && actor->spr.sector()->hasU() && FixedToInt(actor->spr.sector()->depth_fixed)) - SET(actor->user.Flags, SPR_BOUNCE); // no bouncing on shallow water + actor->user.Flags |= (SPR_BOUNCE); // no bouncing on shallow water if (!TEST(actor->user.Flags, SPR_BOUNCE)) { - SET(actor->user.Flags, SPR_BOUNCE); + actor->user.Flags |= (SPR_BOUNCE); actor->user.coll.setNone(); actor->user.Counter = 0; actor->user.zchange = -actor->user.zchange; diff --git a/source/games/sw/src/zombie.cpp b/source/games/sw/src/zombie.cpp index c4d68fe64..a8f7f78aa 100644 --- a/source/games/sw/src/zombie.cpp +++ b/source/games/sw/src/zombie.cpp @@ -764,7 +764,7 @@ int SetupZombie(DSWActor* actor) DoActorSetSpeed(actor, NORM_SPEED); actor->user.Radius = 280; - SET(actor->user.Flags, SPR_XFLIP_TOGGLE); + actor->user.Flags |= (SPR_XFLIP_TOGGLE); return 0; } @@ -784,12 +784,12 @@ void SpawnZombie(PLAYERp pp, DSWActor* weaponActor) SetupZombie(actorNew); actorNew->spr.shade = -10; SET(actorNew->user.Flags2, SPR2_DONT_TARGET_OWNER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_TRANSLUCENT); + actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT); DoActorPickClosePlayer(actorNew); // make immediately active - SET(actorNew->user.Flags, SPR_ACTIVE); + actorNew->user.Flags |= (SPR_ACTIVE); RESET(actorNew->user.Flags, SPR_JUMPING); RESET(actorNew->user.Flags, SPR_FALLING); @@ -831,12 +831,12 @@ void SpawnZombie2(DSWActor* actor) SetupZombie(actorNew); actorNew->spr.shade = -10; SET(actorNew->user.Flags2, SPR2_DONT_TARGET_OWNER); - SET(actorNew->spr.cstat, CSTAT_SPRITE_TRANSLUCENT); + actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT); DoActorPickClosePlayer(actorNew); // make immediately active - SET(actorNew->user.Flags, SPR_ACTIVE); + actorNew->user.Flags |= (SPR_ACTIVE); RESET(actorNew->user.Flags, SPR_JUMPING); RESET(actorNew->user.Flags, SPR_FALLING);