summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMax Roncace <me@caseif.net>2025-07-14 02:40:04 +0000
committerGitHub <noreply@github.com>2025-07-13 19:40:04 -0700
commit339c00f4f2caaba0354484bb17048ad00b98cdb9 (patch)
tree873638a955f148687785c274712e637fdf05f593 /include
parentcd99fa788cd1b98f0daaeafe7966279476edf38b (diff)
Use explicit zero-comparison in dBgS_Acch::Chk* functions (#2533)
Diffstat (limited to 'include')
-rw-r--r--include/d/d_bg_s_acch.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/d/d_bg_s_acch.h b/include/d/d_bg_s_acch.h
index 7ab3699348..f2326b22f4 100644
--- a/include/d/d_bg_s_acch.h
+++ b/include/d/d_bg_s_acch.h
@@ -46,9 +46,9 @@ public:
f32 GetWallR() { return m_wall_r; }
void SetWallH(f32 h) { m_wall_h = h; }
void ClrWallHDirect() { m_flags &= ~WALL_H_DIRECT; }
- bool ChkWallHit() { return m_flags & WALL_HIT; }
+ bool ChkWallHit() { return (m_flags & WALL_HIT) != 0; }
s16 GetWallAngleY() { return m_wall_angle_y; }
- bool ChkWallHDirect() { return m_flags & WALL_H_DIRECT; }
+ bool ChkWallHDirect() { return (m_flags & WALL_H_DIRECT) != 0; }
f32 GetWallHDirect() { return m_wall_h_direct; }
f32 GetWallRR() { return m_wall_rr; }
void SetWallHit() { m_flags |= WALL_HIT; }
@@ -124,9 +124,9 @@ public:
f32 GetRoofHeight() const { return m_roof_height; }
int GetTblSize() { return m_tbl_size; }
void SetLin() { m_lin.SetStartEnd(*pm_old_pos, *pm_pos); }
- bool ChkGroundFind() { return m_flags & GROUND_FIND; }
- bool ChkGroundHit() const { return m_flags & GROUND_HIT; }
- bool ChkGroundLanding() const { return m_flags & GROUND_LANDING; }
+ bool ChkGroundFind() { return (m_flags & GROUND_FIND) != 0; }
+ bool ChkGroundHit() const { return (m_flags & GROUND_HIT) != 0; }
+ bool ChkGroundLanding() const { return (m_flags & GROUND_LANDING) != 0; }
void ClrGroundLanding() { m_flags &= ~GROUND_LANDING; }
void ClrGroundAway() { m_flags &= ~GROUND_AWAY; }
void ClrWallHit() { m_flags &= ~WALL_HIT; }
@@ -136,18 +136,18 @@ public:
u32 ChkWallHit() const { return m_flags & WALL_HIT; }
void OffLineCheckHit() { m_flags &= ~LINE_CHECK_HIT; }
void OffLineCheck() { m_flags &= ~LINE_CHECK; }
- u32 ChkLineCheckNone() const { return m_flags & LINE_CHECK_NONE; }
- u32 ChkLineCheck() const { return m_flags & LINE_CHECK; }
+ u32 ChkLineCheckNone() const { return (m_flags & LINE_CHECK_NONE) != 0; }
+ u32 ChkLineCheck() const { return (m_flags & LINE_CHECK) != 0; }
void ClrRoofHit() { m_flags &= ~ROOF_HIT; }
void ClrWaterHit() { m_flags &= ~WATER_HIT; }
void SetWaterHit() { m_flags |= WATER_HIT; }
void ClrWaterIn() { m_flags &= ~WATER_IN; }
void SetWaterIn() { m_flags |= WATER_IN; }
const u32 MaskWaterIn() const { return m_flags & WATER_IN; }
- const bool ChkWaterIn() const { return MaskWaterIn();}
+ const bool ChkWaterIn() const { return MaskWaterIn() != 0; }
void ClrGroundFind() { m_flags &= ~GROUND_FIND; }
u32 MaskRoofHit() const { return m_flags & ROOF_HIT; }
- bool ChkRoofHit() const { return MaskRoofHit(); }
+ bool ChkRoofHit() const { return MaskRoofHit() != 0; }
void OffClrSpeedY() { m_flags |= CLR_SPEED_Y; }
bool ChkClrSpeedY() const { return !(m_flags & CLR_SPEED_Y); }
void SetGroundFind() { m_flags |= GROUND_FIND; }
@@ -155,7 +155,7 @@ public:
void SetGroundLanding() { m_flags |= GROUND_LANDING; }
void SetGroundAway() { m_flags |= GROUND_AWAY; }
const u32 MaskWaterHit() const { return m_flags & WATER_HIT; }
- const bool ChkWaterHit() const { return MaskWaterHit(); }
+ const bool ChkWaterHit() const { return MaskWaterHit() != 0; }
void ClrWaterNone() { m_flags &= ~WATER_NONE; }
void SetWaterCheckOffset(f32 offset) { m_wtr_chk_offset = offset; }
void OnLineCheck() { m_flags |= LINE_CHECK; }
@@ -164,14 +164,14 @@ public:
void SetWtrChkMode(int mode) { m_wtr_mode = mode; }
void SetGrndNone() { m_flags |= GRND_NONE; }
void ClrGrndNone() { m_flags &= ~GRND_NONE; }
- bool ChkMoveBGOnly() const { return m_flags & MOVE_BG_ONLY; }
+ bool ChkMoveBGOnly() const { return (m_flags & MOVE_BG_ONLY) != 0; }
void SetWallHit() { m_flags |= WALL_HIT; }
void ClrWallNone() { m_flags &= ~WALL_NONE; }
void OnLineCheckNone() { m_flags |= LINE_CHECK_NONE; }
void OffLineCheckNone() { m_flags &= ~LINE_CHECK_NONE; }
void SetWallNone() { m_flags |= WALL_NONE; }
void OnLineCheckHit() { m_flags |= LINE_CHECK_HIT; }
- bool ChkGroundAway() const { return m_flags & GROUND_AWAY; }
+ bool ChkGroundAway() const { return (m_flags & GROUND_AWAY) != 0; }
void ClrGroundHit() { m_flags &= ~GROUND_HIT; }
cM3dGCyl* GetWallBmdCylP() { return &m_wall_cyl; }