diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-09-28 16:11:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-28 13:11:07 -0700 |
| commit | 9eea9289b1c4316d5856d1cb9602ee463d7de989 (patch) | |
| tree | dde3385855941d12a306de3ca8fb316338be288b /src/d/actor/d_a_door_shutter.cpp | |
| parent | c9a710a939c7bccee7eb16e90ed70c9d3f6c78ad (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_door_shutter.cpp')
| -rw-r--r-- | src/d/actor/d_a_door_shutter.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/d/actor/d_a_door_shutter.cpp b/src/d/actor/d_a_door_shutter.cpp index a843a2330c..16b54cd45e 100644 --- a/src/d/actor/d_a_door_shutter.cpp +++ b/src/d/actor/d_a_door_shutter.cpp @@ -2,7 +2,7 @@ // Door Shutter // -#include "d/dolzel_rel.h" +#include "d/dolzel_rel.h" // IWYU pragma: keep #include "d/actor/d_a_door_shutter.h" #include "d/actor/d_a_obj_Lv5Key.h" @@ -114,7 +114,7 @@ static int CheckCreateHeap(fopAc_ac_c* i_this) { int daDoor20_c::CreateHeap() { int kind = door_param2_c::getKind(this); J3DModelData* modelData = getModelData(); - JUT_ASSERT(355, modelData != 0); + JUT_ASSERT(355, modelData != NULL); int dListFlag = 0x11000084; if (kind == 2) { dListFlag |= 0x200; @@ -136,7 +136,7 @@ int daDoor20_c::CreateHeap() { return 0; } J3DAnmTransform* anm = (J3DAnmTransform*)dComIfG_getObjectRes(getAlwaysArcName(), "FDoorA.bck"); - JUT_ASSERT(394, anm != 0); + JUT_ASSERT(394, anm != NULL); if (!field_0x5a0.init(anm, 1, 0, 1.0f, 0, -1, false)) { return 0; } @@ -159,7 +159,7 @@ int daDoor20_c::CreateHeap() { break; case 2: J3DAnmTextureSRTKey* pbtk = (J3DAnmTextureSRTKey*)dComIfG_getStageRes(getBtk()); - JUT_ASSERT(421, pbtk != 0); + JUT_ASSERT(421, pbtk != NULL); field_0x5c0 = new mDoExt_btkAnm(); if (field_0x5c0 == NULL || !field_0x5c0->init(mModel1->getModelData(), pbtk, 1, 0, 1.0f, 0, -1)) { return 0; @@ -170,7 +170,7 @@ int daDoor20_c::CreateHeap() { anm = (J3DAnmTransform*)dComIfG_getObjectRes(getArcName(), "oj_DoorOpF.bck"); break; } - JUT_ASSERT(375, anm != 0); + JUT_ASSERT(375, anm != NULL); if (field_0x584.init(anm, 1, 0, 1.0f, 0, -1, false) == 0) { return 0; } @@ -419,7 +419,7 @@ void daDoor20_c::openInit_0() { anm = (J3DAnmTransform*)dComIfG_getObjectRes(getArcName(), "oj_DoorOpD.bck"); } } - JUT_ASSERT(832, anm != 0); + JUT_ASSERT(832, anm != NULL); int rt = field_0x584.init(anm, 1, 0, 1.0f, 0, -1, true); JUT_ASSERT(835, rt == 0); daPy_py_c* player = daPy_getPlayerActorClass(); @@ -451,7 +451,7 @@ void daDoor20_c::openInit_1() { } else { anm = (J3DAnmTransform*)dComIfG_getObjectRes(getArcName(), "oj_DoorOpC.bck"); } - JUT_ASSERT(915, anm != 0); + JUT_ASSERT(915, anm != NULL); int rt = field_0x584.init(anm, 1, 0, 1.0f, 0, -1, true); JUT_ASSERT(918, rt == 0); u8 bVar5 = door_param2_c::getSwbit3(this); @@ -600,7 +600,7 @@ void daDoor20_c::closeInit_0() { } else { anm = (J3DAnmTransform*)dComIfG_getObjectRes(getArcName(), "oj_DoorCloseD.bck"); } - JUT_ASSERT(1178, anm != 0); + JUT_ASSERT(1178, anm != NULL); int rt = field_0x584.init(anm, 1, 0, 1.0f, 0, -1, true); JUT_ASSERT(1181, rt == 0); cXyz acStack_40(home.pos.x, home.pos.y + 200.0f, home.pos.z); @@ -629,7 +629,7 @@ void daDoor20_c::closeInit_0() { void daDoor20_c::closeInit_1() { J3DAnmTransform* anm = (J3DAnmTransform*)dComIfG_getObjectRes(getArcName(), "oj_DoorCloseC.bck"); - JUT_ASSERT(1236, anm != 0); + JUT_ASSERT(1236, anm != NULL); int rt = field_0x584.init(anm, 1, 0, 1.0f, 0, -1, true); JUT_ASSERT(1239, rt == 0); mDoAud_seStart(Z2SE_OBJ_WOOD_DOOR_ROLLCLOSE, ¤t.pos, 0, @@ -929,7 +929,7 @@ int daDoor20_c::demoProc() { case 13: J3DAnmTransform* anm = (J3DAnmTransform*)dComIfG_getObjectRes( getAlwaysArcName(), "FDoorB.bck"); - JUT_ASSERT(1796, anm != 0); + JUT_ASSERT(1796, anm != NULL); if (!field_0x584.init(anm, 1, 0, 1.0f, 0, -1, true) || !field_0x5a0.init(anm, 1, 0, 1.0f, 0, -1, true)) { @@ -941,7 +941,7 @@ int daDoor20_c::demoProc() { case 12: anm = (J3DAnmTransform*)dComIfG_getObjectRes(getAlwaysArcName(), "FDoorA.bck"); - JUT_ASSERT(1809, anm != 0); + JUT_ASSERT(1809, anm != NULL); if (!field_0x584.init(anm, 1, 0, 1.0f, 0, -1, true) || !field_0x5a0.init(anm, 1, 0, 1.0f, 0, -1, true)) { @@ -2201,7 +2201,7 @@ int dDoor_stop_c::openProc(daDoor20_c* i_this) { /* 804664E8-80466538 005A28 0050+00 1/1 0/0 0/0 .text create__12dDoor_stop_cFP10daDoor20_c */ int dDoor_stop_c::create(daDoor20_c* i_this) { J3DModelData* stopModelData = i_this->getStopModelData(); - JUT_ASSERT(3923, stopModelData != 0); + JUT_ASSERT(3923, stopModelData != NULL); field_0x0 = mDoExt_J3DModel__create(stopModelData, 0x80000, 0x11000084); return field_0x0 != NULL ? 1 : 0; } |
