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
This commit is contained in:
LagoLunatic
2025-09-28 16:11:07 -04:00
committed by GitHub
parent 737250d7f5
commit 6ec6fce8cb
1008 changed files with 3172 additions and 3237 deletions
+3 -3
View File
@@ -78,7 +78,7 @@ struct daFmtMng_Path_c {
} else {
field_0x4 = decIndex(field_0x4);
}
field_0x8 = 1000000000.0f;
field_0x8 = G_CM3D_F_INF;
}
void setNextPoint(cXyz *param_1) {
@@ -175,7 +175,7 @@ struct daFmtMng_c : public fopAc_ac_c {
int getEndTime() { return (fopAcM_GetParam(this) >> 24) & 0xff; }
void callExecute() {
JUT_ASSERT(680, mAction != 0);
JUT_ASSERT(680, mAction != NULL);
(this->*(mAction[1]))();
}
@@ -203,7 +203,7 @@ struct daFmtMng_c : public fopAc_ac_c {
}
void callInit() {
JUT_ASSERT(667, mAction != 0)
JUT_ASSERT(667, mAction != NULL)
(this->*(*mAction))();
}
+1 -1
View File
@@ -66,7 +66,7 @@ public:
cXyz sp2C;
cXyz sp20;
JUT_ASSERT(164, 0 != arrow_p);
JUT_ASSERT(164, NULL != arrow_p);
if (field_0xa38 != 0) {
return 0;
+1 -1
View File
@@ -36,7 +36,7 @@ public:
cXyz sp2C;
cXyz sp20;
JUT_ASSERT(170, 0 != arrow_p);
JUT_ASSERT(170, NULL != arrow_p);
if (field_0xa16 != 0 || health == 0) {
return 0;
+1 -1
View File
@@ -132,7 +132,7 @@ public:
void setWolfHowling() {
if (mType != 0) {
fopAc_ac_c* actor_p = mActorMngrs[3].getActorP();
JUT_ASSERT(0x1A3, 0 != actor_p);
JUT_ASSERT(0x1A3, NULL != actor_p);
((daObj_Sekizoa_c*)actor_p)->setWolfHowling();
} else {
+1 -1
View File
@@ -90,7 +90,7 @@ public:
f32 getAttnPosOffset() {
u32 attnPosOffset = (fopAcM_GetParam(this) & 0xff0000) >> 0x10;
if (attnPosOffset == 0xff) {
return 1000000000.0f;
return G_CM3D_F_INF;
} else {
return attnPosOffset;
}