summaryrefslogtreecommitdiff
path: root/src/d/actor/d_a_e_ph.cpp
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-09-28 16:11:07 -0400
committerGitHub <noreply@github.com>2025-09-28 13:11:07 -0700
commit9eea9289b1c4316d5856d1cb9602ee463d7de989 (patch)
treedde3385855941d12a306de3ca8fb316338be288b /src/d/actor/d_a_e_ph.cpp
parentc9a710a939c7bccee7eb16e90ed70c9d3f6c78ad (diff)
Fix JUT_ASSERT and several other macros (#2711)
* Fix JUT_ASSERT to be a nested define * Switch names that appear in asserts to be constants instead of defines * Replace `0` in asserts with `NULL` or `FALSE` * Fix fpclassify * Fix ARRAY_SIZE * Use G_CM3D_F_INF * More fixes for fpclassify * Remove FLOAT_LABEL * Remove incorrect FLAG_ON macro * Remove UNK_BSS macro * Silence clangd unused header warning for PCH
Diffstat (limited to 'src/d/actor/d_a_e_ph.cpp')
-rw-r--r--src/d/actor/d_a_e_ph.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/d/actor/d_a_e_ph.cpp b/src/d/actor/d_a_e_ph.cpp
index 29b1854f42..6795d0cfa5 100644
--- a/src/d/actor/d_a_e_ph.cpp
+++ b/src/d/actor/d_a_e_ph.cpp
@@ -3,7 +3,7 @@
* Peahat Enemy
*/
-#include "d/dolzel_rel.h"
+#include "d/dolzel_rel.h" // IWYU pragma: keep
#include "d/actor/d_a_e_ph.h"
#include "SSystem/SComponent/c_math.h"
@@ -167,7 +167,7 @@ void daE_PH_c::setCcSph() {
int daE_PH_c::CreateHeap() {
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("E_PH", PH_BMD);
- JUT_ASSERT(0, modelData != 0);
+ JUT_ASSERT(0, modelData != NULL);
mpMorf = new mDoExt_McaMorfSO(
modelData, NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("E_PH", ANM_WAIT),
@@ -206,7 +206,7 @@ void daE_PH_c::SetAnm(int i_anmID, int i_attr, f32 i_morf, f32 i_speed) {
/* 8073DBD4-8073DDF8 000874 0224+00 1/1 0/0 0/0 .text SearchNearP__8daE_PH_cFv */
void daE_PH_c::SearchNearP() {
- f32 nearest_dist = 1000000000.0f;
+ f32 nearest_dist = G_CM3D_F_INF;
for (int i = 0; i < mpPath->m_num; i++) {
f32 pnt_dist = current.pos.absXZ(dPath_GetPnt(mpPath, i)->m_position);
@@ -317,7 +317,7 @@ void daE_PH_c::GoTarget() {
cLib_chaseAngleS(&field_0x612, field_0x610 * mAnmSpeed, 0x10);
mpMorf->setPlaySpeed(mAnmSpeed);
- if (mAcch.GetGroundH() != -1000000000.0f && current.pos.y < mAcch.GetGroundH() + 100.0f) {
+ if (mAcch.GetGroundH() != -G_CM3D_F_INF && current.pos.y < mAcch.GetGroundH() + 100.0f) {
current.pos.y = mAcch.GetGroundH() + 100.0f;
}
}
@@ -512,7 +512,7 @@ void daE_PH_c::S_SetPlaySpeed() {
void daE_PH_c::S_GoTarget() {
cXyz unused(mCurrentPntPos.x, mCurrentPntPos.y, mCurrentPntPos.z);
- if (mAcch.GetGroundH() != -1000000000.0f && current.pos.y < mAcch.GetGroundH() + 100.0f) {
+ if (mAcch.GetGroundH() != -G_CM3D_F_INF && current.pos.y < mAcch.GetGroundH() + 100.0f) {
current.pos.y = mAcch.GetGroundH() + 100.0f;
}