mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-08 03:37:02 -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 "d/actor/d_a_e_mf.h"
|
||||
#include "d/d_cc_d.h"
|
||||
@@ -2692,14 +2692,14 @@ static void action(e_mf_class* i_this) {
|
||||
gnd_chk.SetPos(&sp264);
|
||||
sp264.y = dComIfG_Bgsp().GroundCross(&gnd_chk);
|
||||
|
||||
if (sp264.y != -1000000000.0f) {
|
||||
if (sp264.y != -G_CM3D_F_INF) {
|
||||
sp258.x = sp264.x;
|
||||
sp258.y = sp264.y + 100.0f;
|
||||
sp258.z = sp264.z + fVar1;
|
||||
gnd_chk.SetPos(&sp258);
|
||||
sp258.y = dComIfG_Bgsp().GroundCross(&gnd_chk);
|
||||
|
||||
if (sp258.y != -1000000000.0f) {
|
||||
if (sp258.y != -G_CM3D_F_INF) {
|
||||
sVar7 = -cM_atan2s(sp258.y - sp264.y, sp258.z - sp264.z);
|
||||
if (sVar7 > 0x3000 || sVar7 < -0x3000) {
|
||||
sVar7 = 0;
|
||||
@@ -2711,7 +2711,7 @@ static void action(e_mf_class* i_this) {
|
||||
sp258.z = sp264.z;
|
||||
gnd_chk.SetPos(&sp258);
|
||||
sp258.y = dComIfG_Bgsp().GroundCross(&gnd_chk);
|
||||
if (sp258.y != -1000000000.0f) {
|
||||
if (sp258.y != -G_CM3D_F_INF) {
|
||||
sVar6 = cM_atan2s(sp258.y - sp264.y, sp258.x - sp264.x);
|
||||
if (sVar6 > 0x3000 || sVar6 < -0x3000) {
|
||||
sVar6 = 0;
|
||||
@@ -3173,14 +3173,14 @@ static int useHeapInit(fopAc_ac_c* a_this) {
|
||||
}
|
||||
|
||||
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("E_mf", 39);
|
||||
JUT_ASSERT(5274, modelData != 0);
|
||||
JUT_ASSERT(5274, modelData != NULL);
|
||||
i_this->mpAxeModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
|
||||
if (i_this->mpAxeModel == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes("E_mf", 40);
|
||||
JUT_ASSERT(5286, modelData != 0);
|
||||
JUT_ASSERT(5286, modelData != NULL);
|
||||
i_this->mpShieldModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
|
||||
if (i_this->mpShieldModel == NULL) {
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user