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/d_msg_scrn_3select.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/d_msg_scrn_3select.cpp')
| -rw-r--r-- | src/d/d_msg_scrn_3select.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/d/d_msg_scrn_3select.cpp b/src/d/d_msg_scrn_3select.cpp index 12d64987b6..a19c96e4da 100644 --- a/src/d/d_msg_scrn_3select.cpp +++ b/src/d/d_msg_scrn_3select.cpp @@ -3,7 +3,7 @@ * 3-way Select Message Screen */ -#include "d/dolzel.h" +#include "d/dolzel.h" // IWYU pragma: keep #include "d/d_msg_scrn_3select.h" #include "JSystem/J2DGraph/J2DAnmLoader.h" @@ -40,7 +40,7 @@ dMsgScrn3Select_c::dMsgScrn3Select_c() { }; mpScreen = new J2DScreen(); - JUT_ASSERT(0, mpScreen != 0); + JUT_ASSERT(0, mpScreen != NULL); bool fg = mpScreen->setPriority("zelda_window_3menu.blo", 0x20000, dComIfGp_getMsgArchive(0)); JUT_ASSERT(0, fg != false); @@ -65,11 +65,11 @@ dMsgScrn3Select_c::dMsgScrn3Select_c() { mBtkFrame = 0.0f; mpSelectCursor = new dSelect_cursor_c(0, 1.0f, NULL); - JUT_ASSERT(0, mpSelectCursor != 0); + JUT_ASSERT(0, mpSelectCursor != NULL); mpSelectCursor->setAlphaRate(0.0f); mpParent = new CPaneMgr(mpScreen, 'abc_n', 0, NULL); - JUT_ASSERT(0, mpParent != 0); + JUT_ASSERT(0, mpParent != NULL); for (int i = 0; i < 3; i++) { mCursorPos[i].x = 0.0f; @@ -77,35 +77,35 @@ dMsgScrn3Select_c::dMsgScrn3Select_c() { mCursorPos[i].z = 0.0f; mpSel_c[i] = new CPaneMgr(mpScreen, tag_name[i][0], 0, NULL); - JUT_ASSERT(0, mpSel_c[i] != 0); + JUT_ASSERT(0, mpSel_c[i] != NULL); mpSel_c[i]->hide(); mpSelCld_c[i] = new CPaneMgr(mpScreen, tag_name[i][1], 0, NULL); - JUT_ASSERT(0, mpSelCld_c[i] != 0); + JUT_ASSERT(0, mpSelCld_c[i] != NULL); mpSelCld_c[i]->getPanePtr()->setAnimation(mpAnmBtk); mpSelCldr_c[i] = new CPaneMgr(mpScreen, tag_name[i][2], 0, NULL); - JUT_ASSERT(0, mpSelCldr_c[i] != 0); + JUT_ASSERT(0, mpSelCldr_c[i] != NULL); mpSelCldr_c[i]->getPanePtr()->setAnimation(mpAnmBtk); mpSelCldm_c[i] = new CPaneMgr(mpScreen, tag_name[i][3], 0, NULL); - JUT_ASSERT(0, mpSelCldm_c[i] != 0); + JUT_ASSERT(0, mpSelCldm_c[i] != NULL); mpSelCldm_c[i]->getPanePtr()->setAnimation(mpAnmBpk); for (int j = 0; j < 5; j++) { mpSelCldw_c[j][i] = new CPaneMgr(mpScreen, tag_name[i][4 + j], 0, NULL); - JUT_ASSERT(0, mpSelCldw_c[j][i] != 0); + JUT_ASSERT(0, mpSelCldw_c[j][i] != NULL); } mpSelPo_c[i] = new CPaneMgr(mpScreen, tag_name[i][9], 0, NULL); - JUT_ASSERT(0, mpSelPo_c[i] != 0); + JUT_ASSERT(0, mpSelPo_c[i] != NULL); mpSelPo_c[i]->hide(); mpKahen_c[i] = new CPaneMgr(mpScreen, tag_name[i][10], 0, NULL); - JUT_ASSERT(0, mpKahen_c[i] != 0); + JUT_ASSERT(0, mpKahen_c[i] != NULL); mpCursor_c[i] = new CPaneMgr(mpScreen, tag_name[i][11], 0, NULL); - JUT_ASSERT(0, mpCursor_c[i] != 0); + JUT_ASSERT(0, mpCursor_c[i] != NULL); mCursorPos[i] = mpCursor_c[i]->getGlobalVtxCenter(true, 0); } @@ -171,13 +171,13 @@ dMsgScrn3Select_c::dMsgScrn3Select_c() { } #else mpTmSel_c[0] = new CPaneMgr(mpScreen, 'a_t_e', 0, NULL); - JUT_ASSERT(0, mpTmSel_c[0] != 0); + JUT_ASSERT(0, mpTmSel_c[0] != NULL); mpTmSel_c[1] = new CPaneMgr(mpScreen, 'b_t_e', 0, NULL); - JUT_ASSERT(0, mpTmSel_c[1] != 0); + JUT_ASSERT(0, mpTmSel_c[1] != NULL); mpTmSel_c[2] = new CPaneMgr(mpScreen, 'c_t_e', 0, NULL); - JUT_ASSERT(0, mpTmSel_c[2] != 0); + JUT_ASSERT(0, mpTmSel_c[2] != NULL); for (int i = 0; i < 3; i++) { ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setString(64, ""); |
