mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-01 02:11:44 -04:00
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:
@@ -3,7 +3,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "d/dolzel_rel.h"
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
@@ -506,7 +506,7 @@ int daNpc_Kn_c::CreateHeap() {
|
||||
int res_idx = l_bmdData[bmd_offset][0];
|
||||
|
||||
mdlData_p = (J3DModelData*)dComIfG_getObjectRes(l_resNameList[arc_idx], res_idx);
|
||||
JUT_ASSERT(1259, 0 != mdlData_p);
|
||||
JUT_ASSERT(1259, NULL != mdlData_p);
|
||||
|
||||
u32 sp2C = 0x11020284;
|
||||
mpModelMorf[0] = new mDoExt_McaMorfSO(mdlData_p, NULL, NULL, NULL, -1, 1.0f, 0, -1, &mSound, 0x80000, sp2C);
|
||||
@@ -535,7 +535,7 @@ int daNpc_Kn_c::CreateHeap() {
|
||||
arc_idx = l_bmdData[bmd_offset][1];
|
||||
res_idx = l_bmdData[bmd_offset][0];
|
||||
mdlData_p = (J3DModelData*)dComIfG_getObjectRes(l_resNameList[arc_idx], res_idx);
|
||||
JUT_ASSERT(1310, 0 != mdlData_p);
|
||||
JUT_ASSERT(1310, NULL != mdlData_p);
|
||||
|
||||
sp2C = 0x11020284;
|
||||
mpModelMorf[1] = new mDoExt_McaMorfSO(mdlData_p, NULL, NULL, NULL, -1, 1.0f, 0, -1, &mSound, 0x80000, sp2C);
|
||||
@@ -1039,7 +1039,7 @@ void daNpc_Kn_c::beforeMove() {
|
||||
|
||||
/* 80A2C4FC-80A2C56C 001BDC 0070+00 1/1 0/0 0/0 .text afterMoved__10daNpc_Kn_cFv */
|
||||
void daNpc_Kn_c::afterMoved() {
|
||||
if (mGroundHeight != -1000000000.0f) {
|
||||
if (mGroundHeight != -G_CM3D_F_INF) {
|
||||
mTevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(mGndChk);
|
||||
mTevStr.room_no = dComIfG_Bgsp().GetRoomId(mGndChk);
|
||||
}
|
||||
@@ -2018,7 +2018,7 @@ int daNpc_Kn_c::teach04_attackWait(void* param_0) {
|
||||
u8 cut_type = daPy_getPlayerActorClass()->getCutType();
|
||||
if (cut_type == daPy_py_c::CUT_TYPE_GUARD_ATTACK) {
|
||||
fopAc_ac_c* aTgHitActor_p = mCylCc.GetTgHitAc();
|
||||
JUT_ASSERT(3715, 0 != aTgHitActor_p);
|
||||
JUT_ASSERT(3715, NULL != aTgHitActor_p);
|
||||
|
||||
s16 angle = cLib_targetAngleY(&aTgHitActor_p->current.pos, ¤t.pos);
|
||||
cXyz offset(0.0f, 0.0f, daNpc_Kn_Param_c::m.small_slide_distance);
|
||||
@@ -2401,7 +2401,7 @@ int daNpc_Kn_c::teach06_superJumpWait(void* param_0) {
|
||||
mSound.startCollisionSE(Z2SE_HIT_SWORD, 0x1f);
|
||||
} else if (cut_type == daPy_py_c::CUT_TYPE_LARGE_JUMP_INIT) {
|
||||
fopAc_ac_c* aTgHitActor_p = mCylCc.GetTgHitAc();
|
||||
JUT_ASSERT(4286, 0 != aTgHitActor_p);
|
||||
JUT_ASSERT(4286, NULL != aTgHitActor_p);
|
||||
|
||||
s16 angle = cLib_targetAngleY(&aTgHitActor_p->current.pos, ¤t.pos);
|
||||
cXyz offset(0.0f, 0.0f, daNpc_Kn_Param_c::m.small_slide_distance);
|
||||
@@ -2617,7 +2617,7 @@ int daNpc_Kn_c::teach06_superJumpWaitDivide(void* param_0) {
|
||||
mSound.startCollisionSE(Z2SE_HIT_SWORD, 0x1F);
|
||||
} else if (cut_type == daPy_py_c::CUT_TYPE_LARGE_JUMP_INIT) {
|
||||
fopAc_ac_c* aTgHitActor_p = mCylCc.GetTgHitAc();
|
||||
JUT_ASSERT(4619, 0 != aTgHitActor_p);
|
||||
JUT_ASSERT(4619, NULL != aTgHitActor_p);
|
||||
|
||||
s16 angle = cLib_targetAngleY(&aTgHitActor_p->current.pos, ¤t.pos);
|
||||
cXyz offset(0.0f, 0.0f, daNpc_Kn_Param_c::m.small_slide_distance);
|
||||
|
||||
Reference in New Issue
Block a user