diff options
| author | Luke Street <luke@street.dev> | 2026-02-28 21:19:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-28 20:19:17 -0800 |
| commit | 6a48380461bc9baabe1706ba57ca0cedfa2d0c51 (patch) | |
| tree | 593e054cfcb0250e63917c58b445a7e1f025a023 /src/d/actor | |
| parent | b5d3b8c059c10711370437f7db7539cd90f1cb29 (diff) | |
More GCC compatibility/warning fixes (#3118)
* Wrap >4-char literals in a MULTI_CHAR macro
Modern compilers do not support CW's non-standard behavior with
>4 char literals. We can, however, use a constexpr function to
compute the u64 values directly. This leaves <=4 char literals
unchanged.
* Replace non-pointer usages of NULL with 0
* Define NULL to nullptr on C++11 and above
* Fix more -Wpointer-arith and -Woverflow warnings
* Replace u32/s32 with uintptr_t/intptr_t where appropriate
* JSUOutputStream: Overload all standard int types
Diffstat (limited to 'src/d/actor')
65 files changed, 169 insertions, 169 deletions
diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index a2b5a11f6d..5f6bd7ca17 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -3082,7 +3082,7 @@ cXyz* daAlink_c::getNeckAimPos(cXyz* param_0, int* param_1, int param_2) { } } else if (field_0x35c4.abs2XZ() > 1.0f && checkModeFlg(1)) { f32 var_f31; - if (checkWolf() != NULL) { + if (checkWolf() != 0) { var_f31 = 80.0f; } else { var_f31 = 150.0f; @@ -12223,7 +12223,7 @@ BOOL daAlink_c::checkGroundSpecialMode() { return procScreamWaitInit(); } - return NULL; + return 0; } int daAlink_c::commonCheckNextAction(int param_0) { diff --git a/src/d/actor/d_a_alink_horse.inc b/src/d/actor/d_a_alink_horse.inc index a637ef42cb..e9ce673c98 100644 --- a/src/d/actor/d_a_alink_horse.inc +++ b/src/d/actor/d_a_alink_horse.inc @@ -339,7 +339,7 @@ void daAlink_c::setHorseStirrup() { if (field_0x2fab & 1) { mDoMtx_stack_c::copy(mpLinkModel->getAnmMtx(field_0x30bc)); mDoMtx_stack_c::transM(-2.0f, -11.0f, 1.5f); - mDoMtx_stack_c::ZXYrotM(NULL, -0x8000, 0x4000); + mDoMtx_stack_c::ZXYrotM(0, -0x8000, 0x4000); mDoMtx_copy(mDoMtx_stack_c::get(), horse->getLeftStirrupMtx()); } diff --git a/src/d/actor/d_a_alink_swim.inc b/src/d/actor/d_a_alink_swim.inc index 857a3693f6..aa7cd98350 100644 --- a/src/d/actor/d_a_alink_swim.inc +++ b/src/d/actor/d_a_alink_swim.inc @@ -346,7 +346,7 @@ int daAlink_c::checkNextActionSwim() { int daAlink_c::checkSwimAction(int param_0) { f32 var_f31; if (checkWolf()) { - if (getMoveBGActorName(mLinkAcch.m_gnd, NULL) == PROC_Obj_ITA) { + if (getMoveBGActorName(mLinkAcch.m_gnd, 0) == PROC_Obj_ITA) { var_f31 = 200.0f; } else { var_f31 = mpHIO->mWolf.mWlSwim.m.mStartHeight; diff --git a/src/d/actor/d_a_b_dr.cpp b/src/d/actor/d_a_b_dr.cpp index 609ba1e94d..0a9d6c7a9a 100644 --- a/src/d/actor/d_a_b_dr.cpp +++ b/src/d/actor/d_a_b_dr.cpp @@ -4083,7 +4083,7 @@ int daB_DR_c::create() { gravity = -3.0f; mSound.init(¤t.pos, &eyePos, 3, 1); - mColliderStts.Init(0x19, NULL, this); + mColliderStts.Init(0x19, 0, this); fopAcM_OnStatus(this, 0x4000); diff --git a/src/d/actor/d_a_balloon_2D.cpp b/src/d/actor/d_a_balloon_2D.cpp index d7df1327ed..76b9ce8b3f 100644 --- a/src/d/actor/d_a_balloon_2D.cpp +++ b/src/d/actor/d_a_balloon_2D.cpp @@ -165,18 +165,18 @@ int daBalloon2D_c::createHeap() { JKRArchive* arc = resInfo->getArchive(); mScreen->setPriority("zelda_balloon_game.blo", 0x20000, arc); dPaneClass_showNullPane(mScreen); - field_0x578 = new CPaneMgr(mScreen, 'n_all', 2, NULL); - field_0x57c = new CPaneMgr(mScreen, 'score_tn', 0, NULL); - field_0x580 = new CPaneMgr(mScreen, 'suji_n', 2, NULL); - field_0x584 = new CPaneMgr(mScreen, 's_set_n', 0, NULL); - field_0x588 = new CPaneMgr(mScreen, 'tas_n', 0, NULL); - field_0x58c = new CPaneMgr(mScreen, 'combo_tn', 0, NULL); - field_0x590 = new CPaneMgr(mScreen, 'num_n', 0, NULL); - field_0x594 = new CPaneMgr(mScreen, 'co_set_n', 2, NULL); - field_0x598 = new CPaneMgr(mScreen, 'bal_3_n', 2, NULL); - field_0x59c = new CPaneMgr(mScreen, 'bal_2_n', 2, NULL); - field_0x5a0 = new CPaneMgr(mScreen, 'bal_1_n', 2, NULL); - field_0x5a4 = new CPaneMgr(mScreen, 'ba_com_n', 2, NULL); + field_0x578 = new CPaneMgr(mScreen, MULTI_CHAR('n_all'), 2, NULL); + field_0x57c = new CPaneMgr(mScreen, MULTI_CHAR('score_tn'), 0, NULL); + field_0x580 = new CPaneMgr(mScreen, MULTI_CHAR('suji_n'), 2, NULL); + field_0x584 = new CPaneMgr(mScreen, MULTI_CHAR('s_set_n'), 0, NULL); + field_0x588 = new CPaneMgr(mScreen, MULTI_CHAR('tas_n'), 0, NULL); + field_0x58c = new CPaneMgr(mScreen, MULTI_CHAR('combo_tn'), 0, NULL); + field_0x590 = new CPaneMgr(mScreen, MULTI_CHAR('num_n'), 0, NULL); + field_0x594 = new CPaneMgr(mScreen, MULTI_CHAR('co_set_n'), 2, NULL); + field_0x598 = new CPaneMgr(mScreen, MULTI_CHAR('bal_3_n'), 2, NULL); + field_0x59c = new CPaneMgr(mScreen, MULTI_CHAR('bal_2_n'), 2, NULL); + field_0x5a0 = new CPaneMgr(mScreen, MULTI_CHAR('bal_1_n'), 2, NULL); + field_0x5a4 = new CPaneMgr(mScreen, MULTI_CHAR('ba_com_n'), 2, NULL); field_0x578->setAlphaRate(0.0f); field_0x5a4->setAlphaRate(0.0f); for (s32 i = 0; i < 10; i++) { @@ -197,17 +197,17 @@ int daBalloon2D_c::createHeap() { } J2DTextBox* combos[2]; J2DTextBox* scores[2]; - combos[0] = (J2DTextBox*)mScreen->search('combo_ts'); - combos[1] = (J2DTextBox*)mScreen->search('combo_t'); - scores[0] = (J2DTextBox*)mScreen->search('score_ts'); - scores[1] = (J2DTextBox*)mScreen->search('score_t'); - field_0x5a8[0] = (J2DPicture*)mScreen->search('suji_4'); - field_0x5a8[1] = (J2DPicture*)mScreen->search('suji_3'); - field_0x5a8[2] = (J2DPicture*)mScreen->search('suji_2'); - field_0x5a8[3] = (J2DPicture*)mScreen->search('suji_1'); - field_0x5a8[4] = (J2DPicture*)mScreen->search('suji_0'); - field_0x5a8[5] = (J2DPicture*)mScreen->search('num_1'); - field_0x5a8[6] = (J2DPicture*)mScreen->search('num_0'); + combos[0] = (J2DTextBox*)mScreen->search(MULTI_CHAR('combo_ts')); + combos[1] = (J2DTextBox*)mScreen->search(MULTI_CHAR('combo_t')); + scores[0] = (J2DTextBox*)mScreen->search(MULTI_CHAR('score_ts')); + scores[1] = (J2DTextBox*)mScreen->search(MULTI_CHAR('score_t')); + field_0x5a8[0] = (J2DPicture*)mScreen->search(MULTI_CHAR('suji_4')); + field_0x5a8[1] = (J2DPicture*)mScreen->search(MULTI_CHAR('suji_3')); + field_0x5a8[2] = (J2DPicture*)mScreen->search(MULTI_CHAR('suji_2')); + field_0x5a8[3] = (J2DPicture*)mScreen->search(MULTI_CHAR('suji_1')); + field_0x5a8[4] = (J2DPicture*)mScreen->search(MULTI_CHAR('suji_0')); + field_0x5a8[5] = (J2DPicture*)mScreen->search(MULTI_CHAR('num_1')); + field_0x5a8[6] = (J2DPicture*)mScreen->search(MULTI_CHAR('num_0')); for (int i = 0; i < 2; i++) { combos[i]->setString(32, ""); scores[i]->setString(32, ""); diff --git a/src/d/actor/d_a_boomerang.cpp b/src/d/actor/d_a_boomerang.cpp index c51a648a59..85e416298a 100644 --- a/src/d/actor/d_a_boomerang.cpp +++ b/src/d/actor/d_a_boomerang.cpp @@ -158,10 +158,10 @@ static const u32 l_lockSeFlg[BOOMERANG_LOCK_MAX] = { }; void daBoomerang_sight_c::initialize() { - m_cursorYellowAllPane = m_cursorYellowScrn->search('n_all'); - m_cursorYellow0Pane = m_cursorYellowScrn->search('cursor0'); - m_cursorYellow1Pane = m_cursorYellowScrn->search('cursor1'); - m_cursorYellow2Pane = m_cursorYellowScrn->search('cursor2'); + m_cursorYellowAllPane = m_cursorYellowScrn->search(MULTI_CHAR('n_all')); + m_cursorYellow0Pane = m_cursorYellowScrn->search(MULTI_CHAR('cursor0')); + m_cursorYellow1Pane = m_cursorYellowScrn->search(MULTI_CHAR('cursor1')); + m_cursorYellow2Pane = m_cursorYellowScrn->search(MULTI_CHAR('cursor2')); m_cursorYellowBck->searchUpdateMaterialID(m_cursorYellowScrn); m_cursorYellowAllPane->setAnimation(m_cursorYellowBck); @@ -174,7 +174,7 @@ void daBoomerang_sight_c::initialize() { m_cursorYellow0Pane->setAnimation(m_cursorYellowBpk); m_cursorYellow1Pane->setAnimation(m_cursorYellowBpk); m_cursorYellow2Pane->setAnimation(m_cursorYellowBpk); - m_cursorYellowScrn->search('flash')->setAnimation(m_cursorYellowBpk); + m_cursorYellowScrn->search(MULTI_CHAR('flash'))->setAnimation(m_cursorYellowBpk); m_cursorYellowBpk->setFrame(0.0f); m_cursorYellow2Brk->searchUpdateMaterialID(m_cursorYellowScrn); @@ -192,10 +192,10 @@ void daBoomerang_sight_c::initialize() { m_cursorYellowScrn->setUserInfo('n_43'); m_cursorYellowAllPane->setUserInfo(' '); - m_cursorRedAllPane = m_cursorRedScrn->search('n_all'); - m_cursorRed0Pane = m_cursorRedScrn->search('cursor0'); - m_cursorRed1Pane = m_cursorRedScrn->search('cursor1'); - m_cursorRed2Pane = m_cursorRedScrn->search('cursor2'); + m_cursorRedAllPane = m_cursorRedScrn->search(MULTI_CHAR('n_all')); + m_cursorRed0Pane = m_cursorRedScrn->search(MULTI_CHAR('cursor0')); + m_cursorRed1Pane = m_cursorRedScrn->search(MULTI_CHAR('cursor1')); + m_cursorRed2Pane = m_cursorRedScrn->search(MULTI_CHAR('cursor2')); m_cursorRedAllPane->setAnimation(m_cursorYellowBck); m_cursorRed0Pane->setAnimation(m_cursorYellowBck); @@ -204,7 +204,7 @@ void daBoomerang_sight_c::initialize() { m_cursorRed0Pane->setAnimation(m_cursorYellowBpk); m_cursorRed1Pane->setAnimation(m_cursorYellowBpk); m_cursorRed2Pane->setAnimation(m_cursorYellowBpk); - m_cursorRedScrn->search('flash')->setAnimation(m_cursorYellowBpk); + m_cursorRedScrn->search(MULTI_CHAR('flash'))->setAnimation(m_cursorYellowBpk); m_cursorRed2Brk->searchUpdateMaterialID(m_cursorRedScrn); m_cursorRedBrk->searchUpdateMaterialID(m_cursorRedScrn); @@ -221,10 +221,10 @@ void daBoomerang_sight_c::initialize() { m_cursorRedScrn->setUserInfo('n_43'); m_cursorRedAllPane->setUserInfo(' '); - m_cursorOrangeAllPane = m_cursorOrangeScrn->search('n_all'); - m_cursorOrange0Pane = m_cursorOrangeScrn->search('cursor0'); - m_cursorOrange1Pane = m_cursorOrangeScrn->search('cursor1'); - m_cursorOrange2Pane = m_cursorOrangeScrn->search('cursor2'); + m_cursorOrangeAllPane = m_cursorOrangeScrn->search(MULTI_CHAR('n_all')); + m_cursorOrange0Pane = m_cursorOrangeScrn->search(MULTI_CHAR('cursor0')); + m_cursorOrange1Pane = m_cursorOrangeScrn->search(MULTI_CHAR('cursor1')); + m_cursorOrange2Pane = m_cursorOrangeScrn->search(MULTI_CHAR('cursor2')); m_cursorOrangeAllPane->setAnimation(m_cursorYellowBck); m_cursorOrange0Pane->setAnimation(m_cursorYellowBck); @@ -233,7 +233,7 @@ void daBoomerang_sight_c::initialize() { m_cursorOrange0Pane->setAnimation(m_cursorYellowBpk); m_cursorOrange1Pane->setAnimation(m_cursorYellowBpk); m_cursorOrange2Pane->setAnimation(m_cursorYellowBpk); - m_cursorOrangeScrn->search('flash')->setAnimation(m_cursorYellowBpk); + m_cursorOrangeScrn->search(MULTI_CHAR('flash'))->setAnimation(m_cursorYellowBpk); m_cursorOrange2Brk->searchUpdateMaterialID(m_cursorOrangeScrn); m_cursorOrangeBrk->searchUpdateMaterialID(m_cursorOrangeScrn); diff --git a/src/d/actor/d_a_coach_2D.cpp b/src/d/actor/d_a_coach_2D.cpp index 660d279218..2a457132c9 100644 --- a/src/d/actor/d_a_coach_2D.cpp +++ b/src/d/actor/d_a_coach_2D.cpp @@ -125,13 +125,13 @@ int daCoach2D_c::createHeap() { mpFireIconBrk->searchUpdateMaterialID(mpScrn); setBrkAnime(true); - mpPaneAll = new CPaneMgr(mpScrn, 'n_all', 2, NULL); - mpPaneBasha = new CPaneMgr(mpScrn, 'basha_n', 2, NULL); - mpPaneFire = new CPaneMgr(mpScrn, 'fire_n', 2, NULL); + mpPaneAll = new CPaneMgr(mpScrn, MULTI_CHAR('n_all'), 2, NULL); + mpPaneBasha = new CPaneMgr(mpScrn, MULTI_CHAR('basha_n'), 2, NULL); + mpPaneFire = new CPaneMgr(mpScrn, MULTI_CHAR('fire_n'), 2, NULL); - mpScrn->search('fire_b_n')->move(mpPaneFire->getPosX(), mpPaneFire->getPosY()); + mpScrn->search(MULTI_CHAR('fire_b_n'))->move(mpPaneFire->getPosX(), mpPaneFire->getPosY()); - mpPaneFireB = new CPaneMgr(mpScrn, 'fire_b_n', 2, NULL); + mpPaneFireB = new CPaneMgr(mpScrn, MULTI_CHAR('fire_b_n'), 2, NULL); mMsgLight = new dMsgScrnLight_c(6, 0xFF); @@ -288,7 +288,7 @@ void daCoach2D_c::update() { icon_pos_x -= var_f29; } - f32 var_f30 = 4.0f * ((J2DPicture*)mpScrn->search('basha_p0'))->getWhite().r; + f32 var_f30 = 4.0f * ((J2DPicture*)mpScrn->search(MULTI_CHAR('basha_p0')))->getWhite().r; if (var_f30 > 255.0f) { var_f30 = 255.0f; } @@ -320,14 +320,14 @@ void daCoach2D_c::setBrkAnime(bool param_0) { if (mBrkFrame >= mpFireIconBrk->getFrameMax()) { mBrkFrame -= mpFireIconBrk->getFrameMax(); } - mpScrn->search('basha_f0')->show(); + mpScrn->search(MULTI_CHAR('basha_f0'))->show(); } else { - mpScrn->search('basha_f0')->hide(); + mpScrn->search(MULTI_CHAR('basha_f0'))->hide(); mBrkFrame = 0.0f; } mpFireIconBrk->setFrame(mBrkFrame); - mpScrn->search('basha_p0')->setAnimation(mpFireIconBrk); + mpScrn->search(MULTI_CHAR('basha_p0'))->setAnimation(mpFireIconBrk); } static int daCoach2D_create(daCoach2D_c* i_this) { diff --git a/src/d/actor/d_a_coach_fire.cpp b/src/d/actor/d_a_coach_fire.cpp index 80433c573e..f2f46b9eab 100644 --- a/src/d/actor/d_a_coach_fire.cpp +++ b/src/d/actor/d_a_coach_fire.cpp @@ -113,11 +113,11 @@ int daCoachFire_c::execute() { dAttention_c* attn = dComIfGp_getAttention(); if (attn->LockonTruth()) { if (attn->LockonTarget(0) != this) { - if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != NULL) { + if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != false) { fopAcM_delete(this); } } - } else if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != NULL) { + } else if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != false) { fopAcM_delete(this); } } diff --git a/src/d/actor/d_a_door_shutter.cpp b/src/d/actor/d_a_door_shutter.cpp index 60bde824e6..59ef62eea2 100644 --- a/src/d/actor/d_a_door_shutter.cpp +++ b/src/d/actor/d_a_door_shutter.cpp @@ -306,7 +306,7 @@ int daDoor20_c::checkOpenMsgDoor(int* param_1) { *param_1 = 0; return 1; } - field_0x624.init(NULL, msgNo, NULL, NULL); + field_0x624.init(0, msgNo, NULL, NULL); int rv = field_0x624.checkOpenDoor(this, param_1); dMsgObject_endFlowGroup(); return rv; @@ -1380,7 +1380,7 @@ int daDoor20_c::createKey() { } field_0x5ec = fopAcM_createChildFromOffset(PROC_Obj_Lv5Key, fopAcM_GetID(this), 0xffffffff, - &cStack_28, roomNo, &cStack_30, &scale, 0xffffffff, 0); + &cStack_28, roomNo, &cStack_30, &scale, -1, 0); break; default: OSReport_Error("シャッタードア:鍵タイプが不明です\n"); // Shutter door: key type unknown @@ -1399,7 +1399,7 @@ int daDoor20_c::createKey() { } field_0x5ec = fopAcM_createChildFromOffset(PROC_OBJ_KEYHOLE, fopAcM_GetID(this), 0xffffffff, - &cStack_28, roomNo, &cStack_30, &scale, 0xffffffff, 0); + &cStack_28, roomNo, &cStack_30, &scale, -1, 0); } current.pos = prevPos; diff --git a/src/d/actor/d_a_e_arrow.cpp b/src/d/actor/d_a_e_arrow.cpp index dc5a0c4d31..a972d17232 100644 --- a/src/d/actor/d_a_e_arrow.cpp +++ b/src/d/actor/d_a_e_arrow.cpp @@ -330,7 +330,7 @@ static void e_arrow_spin(e_arrow_class* i_this) { } static void* s_limit_sub(void* i_actor, void* i_data) { - if (fopAcM_IsActor(i_actor) != NULL && i_actor != i_data && + if (fopAcM_IsActor(i_actor) != FALSE && i_actor != i_data && fopAcM_GetName(i_actor) == PROC_E_ARROW && static_cast<e_arrow_class*>(i_actor)->mAction == ACTION_ARROW_FIRE && fabsf(static_cast<e_arrow_class*>(i_actor)->field_0xa00.z - diff --git a/src/d/actor/d_a_e_bg.cpp b/src/d/actor/d_a_e_bg.cpp index be19dfcae2..9c8320c188 100644 --- a/src/d/actor/d_a_e_bg.cpp +++ b/src/d/actor/d_a_e_bg.cpp @@ -93,7 +93,7 @@ int daE_BG_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) { } int daE_BG_c::JointCallBack(J3DJoint* i_joint, int param_1) { - if (param_1 == NULL) { + if (param_1 == 0) { J3DModel* model = j3dSys.getModel(); daE_BG_c* bg = (daE_BG_c*)model->getUserArea(); if (bg != NULL) { diff --git a/src/d/actor/d_a_e_df.cpp b/src/d/actor/d_a_e_df.cpp index cd1fd1b187..9ae161b968 100644 --- a/src/d/actor/d_a_e_df.cpp +++ b/src/d/actor/d_a_e_df.cpp @@ -659,7 +659,7 @@ int daE_DF_c::Create() { return cPhs_ERROR_e; } - if (fopAcM_entrySolidHeap(this, useHeapInit, 0x1a40) == NULL) { + if (fopAcM_entrySolidHeap(this, useHeapInit, 0x1a40) == false) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_e_gi.cpp b/src/d/actor/d_a_e_gi.cpp index 4dac5344b4..cfdcd94442 100644 --- a/src/d/actor/d_a_e_gi.cpp +++ b/src/d/actor/d_a_e_gi.cpp @@ -93,7 +93,7 @@ int daE_GI_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) { } int daE_GI_c::JointCallBack(J3DJoint* i_joint, int param_1) { - if (param_1 == NULL) { + if (param_1 == 0) { J3DModel* model = j3dSys.getModel(); daE_GI_c* a_this = (daE_GI_c*)model->getUserArea(); diff --git a/src/d/actor/d_a_e_hp.cpp b/src/d/actor/d_a_e_hp.cpp index a1f202489a..114ca27387 100644 --- a/src/d/actor/d_a_e_hp.cpp +++ b/src/d/actor/d_a_e_hp.cpp @@ -119,7 +119,7 @@ int daE_HP_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) { } int daE_HP_c::JointCallBack(J3DJoint* i_joint, int param_1) { - if (param_1 == NULL) { + if (param_1 == 0) { J3DModel* model = j3dSys.getModel(); daE_HP_c* poe = (daE_HP_c*)model->getUserArea(); if (poe != NULL) { @@ -155,7 +155,7 @@ int daE_HP_c::LampCtrlJoint(J3DJoint* i_joint, J3DModel* i_model) { } int daE_HP_c::LampJointCallBack(J3DJoint* i_joint, int param_1) { - if (param_1 == NULL) { + if (param_1 == 0) { J3DModel* model = j3dSys.getModel(); daE_HP_c* poe = (daE_HP_c*)model->getUserArea(); if (poe != NULL) { diff --git a/src/d/actor/d_a_e_yh.cpp b/src/d/actor/d_a_e_yh.cpp index 871708c0f9..369b19b216 100644 --- a/src/d/actor/d_a_e_yh.cpp +++ b/src/d/actor/d_a_e_yh.cpp @@ -2008,7 +2008,7 @@ static int daE_YH_Execute(e_yh_class* i_this) { J3DModel* model = i_this->mpMorf->getModel(); model->setBaseTRMtx(mDoMtx_stack_c::get()); - i_this->mpMorf->play(NULL, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this))); + i_this->mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this))); i_this->mBrk->play(); i_this->mpMorf->modelCalc(); diff --git a/src/d/actor/d_a_e_ym.cpp b/src/d/actor/d_a_e_ym.cpp index 1bcc56551d..38e63b4fa4 100644 --- a/src/d/actor/d_a_e_ym.cpp +++ b/src/d/actor/d_a_e_ym.cpp @@ -3147,7 +3147,7 @@ void daE_YM_c::action() { cXyz unused_vec(field_0x68c, field_0x68c, field_0x68c); cXyz my_pos = current.pos; setMidnaBindEffect(this, &mSound, &my_pos, &scale); - mpMorf->play(NULL, dComIfGp_getReverb(fopAcM_GetRoomNo(this))); + mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this))); mpBrk->play(); } diff --git a/src/d/actor/d_a_formation_mng.cpp b/src/d/actor/d_a_formation_mng.cpp index 531172731b..70535c25ff 100644 --- a/src/d/actor/d_a_formation_mng.cpp +++ b/src/d/actor/d_a_formation_mng.cpp @@ -382,7 +382,7 @@ void daFmtMng_c::create_init() { for (int i = 0; i < mFormationLine * mFormationRow; i++, member++) { member->mNpcId = fopAcM_createChild(0x294, fopAcM_GetID(this), (inTime << 0x10) | 0x200, &member->field_0x04, fopAcM_GetRoomNo(this), - &home.angle, NULL, 0xffffffff, NULL); + &home.angle, NULL, -1, NULL); } } diff --git a/src/d/actor/d_a_kago.cpp b/src/d/actor/d_a_kago.cpp index 6eb85ad6f7..9f4dd6e463 100644 --- a/src/d/actor/d_a_kago.cpp +++ b/src/d/actor/d_a_kago.cpp @@ -188,7 +188,7 @@ bool daKago_c::checkBck(int param_0) { } int daKago_c::draw() { - if (field_0x6de == NULL) { + if (field_0x6de == 0) { return 1; } @@ -511,7 +511,7 @@ void daKago_c::demo_skip(int param_0) { switch (param_0) { case 0: field_0x748 = 2; - field_0x74c = NULL; + field_0x74c = 0; break; case 1: field_0x728 = 0; @@ -525,7 +525,7 @@ void daKago_c::demo_skip(int param_0) { /* dSv_event_flag_c::M_051 - Main Event - Shadow Kargorok (?) (Large) event complete (Horse grass appears in various places) */ dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[84]); field_0x748 = 7; - field_0x74c = NULL; + field_0x74c = 0; break; case 4: setSceneChange(0); @@ -692,7 +692,7 @@ int daKago_c::setSceneChange(int param_0) { void daKago_c::createBalloonScore() { if (field_0x6e7 != 0 && mBalloon2DId == fpcM_ERROR_PROCESS_ID_e) { - mBalloon2DId = fopAcM_create(PROC_BALLOON2D, 0, 0, 0xffffffff, 0, 0, 0xffffffff); + mBalloon2DId = fopAcM_create(PROC_BALLOON2D, 0, 0, 0xffffffff, 0, 0, -1); field_0x6e9 = 1; } } @@ -1199,7 +1199,7 @@ void daKago_c::executeFly() { } if (field_0x744 == 3) { cLib_chaseUC(&field_0x6de, 0, 4); - cLib_addCalcAngleS(¤t.angle.x, 0xffffe000, 8, 0x100, 0x10); + cLib_addCalcAngleS(¤t.angle.x, -8192, 8, 0x100, 0x10); } else { cLib_addCalcAngleS(¤t.angle.x, unkInt2, 8, 0x100, 0x10); } @@ -2230,7 +2230,7 @@ bool daKago_c::PerchDemoAwayForward() { if (field_0x728 < 30) { cLib_addCalcAngleS(¤t.angle.x, 0, 8, 0x100, 0x40); } else { - cLib_addCalcAngleS(¤t.angle.x, 0xffffe000, 8, 0x100, 0x40); + cLib_addCalcAngleS(¤t.angle.x, -8192, 8, 0x100, 0x40); } shape_angle.x = current.angle.x; @@ -2277,7 +2277,7 @@ bool daKago_c::PerchDemoAwayForward() { cLib_chaseF(&field_0x6f8, 30.0f, 1.0f); - cLib_addCalcAngleS(¤t.angle.x, 0xffffe000, 8, 0x100, 0x40); + cLib_addCalcAngleS(¤t.angle.x, -8192, 8, 0x100, 0x40); shape_angle.x = current.angle.x; shape_angle.y = current.angle.y; @@ -2547,7 +2547,7 @@ bool daKago_c::executeFirstDemo() { if (field_0x728 > 30) { cLib_chaseF(&field_0x6cc, 350.0f, 4.0f); - cLib_addCalcAngleS(&field_0x718, 0xfffff800, 8, 0x100, 0x10); + cLib_addCalcAngleS(&field_0x718, -2048, 8, 0x100, 0x10); } else { cLib_chaseF(&field_0x6cc, 350.0f, 6.0f); cLib_addCalcAngleS(&field_0x718, 0x400, 8, 0x200, 0x10); @@ -2699,7 +2699,7 @@ bool daKago_c::executeFirstDemo() { case 6: dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 2); - cLib_addCalcAngleS(¤t.angle.x, 0xffffe000, 8, 0x100, 0x40); + cLib_addCalcAngleS(¤t.angle.x, -8192, 8, 0x100, 0x40); shape_angle.x = current.angle.x; shape_angle.y = current.angle.y; @@ -2944,7 +2944,7 @@ void daKago_c::executeLandingLakeHairia() { speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); speed.y = -field_0x6f8 * cM_ssin(current.angle.x); - cLib_chaseAngleS(&shape_angle.x, 0xffffe000, 0x100); + cLib_chaseAngleS(&shape_angle.x, -8192, 0x100); current.angle.x = shape_angle.x; if (field_0x728 == 90) { @@ -3078,7 +3078,7 @@ void daKago_c::executeLandingBoartHouse() { speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x)); speed.y = -field_0x6f8 * cM_ssin(current.angle.x); - cLib_chaseAngleS(&shape_angle.x, 0xffffe000, 0x100); + cLib_chaseAngleS(&shape_angle.x, -8192, 0x100); current.angle.x = shape_angle.x; if (field_0x728 == 0x50) { @@ -3391,7 +3391,7 @@ void daKago_c::setDashBlurEffect(int param_0) { field_0x6be.y = shape_angle.y; field_0x6be.z = 0; } - field_0xb40 = dComIfGp_particle_set(field_0xb40, 0x860f, &cameraEyeOffset, &tevStr, &field_0x6be, 0, 0xff, 0, 0xffffffff, 0, 0, 0); + field_0xb40 = dComIfGp_particle_set(field_0xb40, 0x860f, &cameraEyeOffset, &tevStr, &field_0x6be, 0, 0xff, 0, -1, 0, 0, 0); } void daKago_c::setWallHitEffect(cXyz param_0, int param_1) { @@ -3422,7 +3422,7 @@ void daKago_c::setSibukiEffect() { for (int i = 0; i < 3; i++) { field_0xb44[i] = dComIfGp_particle_set(field_0xb44[i], kago_wave_id[i], &acStack_28, &tevStr, &cStack_30, - 0, 0xff, 0, 0xffffffff, 0, 0, 0); + 0, 0xff, 0, -1, 0, 0, 0); } if (field_0x6e7 == 0) { @@ -3436,7 +3436,7 @@ void daKago_c::setDashSibukiEffect() { cXyz acStack_20(current.pos.x, field_0x70c + l_HIO.mYOffsetFromWaterSurface, current.pos.z); csXyz cStack_28(0, shape_angle.y, 0); field_0xb50 = dComIfGp_particle_set(field_0xb50, 0x86fe, &acStack_20, &tevStr, &cStack_28, 0, - 0xff, 0, 0xffffffff, 0, 0, 0); + 0xff, 0, -1, 0, 0, 0); } void daKago_c::setWaterFallEffect() { @@ -3450,7 +3450,7 @@ void daKago_c::setWaterFallEffect() { for (int i = 0; i < 2; i++) { field_0xb44[i] = dComIfGp_particle_set(field_0xb44[i], kago_wave_id[i], &acStack_28, &tevStr, &cStack_30, - 0, 0xff, 0, 0xffffffff, 0, 0, 0); + 0, 0xff, 0, -1, 0, 0, 0); } if (field_0x6e7 == 0) { mSound.startCreatureSoundLevel(Z2SE_EN_YC_SPLASH, 0, -1); @@ -3734,7 +3734,7 @@ int daKago_c::ctrlJoint(J3DJoint* param_0, J3DModel* param_1) { } int daKago_c::JointCallBack(J3DJoint* param_0, int param_1) { - if (param_1 == NULL) { + if (param_1 == 0) { J3DModel* model = j3dSys.getModel(); daKago_c* kago = (daKago_c*)model->getUserArea(); if (kago != NULL) { diff --git a/src/d/actor/d_a_movie_player.cpp b/src/d/actor/d_a_movie_player.cpp index 94cdc99ce5..8b90726ad1 100644 --- a/src/d/actor/d_a_movie_player.cpp +++ b/src/d/actor/d_a_movie_player.cpp @@ -3719,7 +3719,7 @@ BOOL daMP_WaitUntilPrepare() { } void daMP_PrepareReady(BOOL msg) { - OSSendMessage(&daMP_PrepareReadyQueue, (OSMessage)msg, 1); + OSSendMessage(&daMP_PrepareReadyQueue, (OSMessage)(uintptr_t)msg, 1); } static BOOL daMP_THPPlayerPrepare(s32 frame, s32 flag, s32 audioTrack) { diff --git a/src/d/actor/d_a_nbomb.cpp b/src/d/actor/d_a_nbomb.cpp index 5090950574..48d785a7ce 100644 --- a/src/d/actor/d_a_nbomb.cpp +++ b/src/d/actor/d_a_nbomb.cpp @@ -97,7 +97,7 @@ int daNbomb_c::searchEnemy(fopAc_ac_c* i_enemy) { static void* daNbomb_searchEnemy(fopAc_ac_c* i_actor, void* i_data) { if (fopAcM_GetGroup(i_actor) == fopAc_ENEMY_e && - ((daNbomb_c*)i_data)->searchEnemy(i_actor) != NULL) + ((daNbomb_c*)i_data)->searchEnemy(i_actor) != 0) { return i_actor; } diff --git a/src/d/actor/d_a_npc_blue_ns.cpp b/src/d/actor/d_a_npc_blue_ns.cpp index 7492657fd4..220c64af3f 100644 --- a/src/d/actor/d_a_npc_blue_ns.cpp +++ b/src/d/actor/d_a_npc_blue_ns.cpp @@ -736,14 +736,14 @@ void daNpcBlueNS_c::playMotion() { int daNpcBlueNS_c::setAction(int (daNpcBlueNS_c::*i_action)(int)) { field_0xdc0 = 3; if (mAction != NULL) { - (this->*mAction)(NULL); + (this->*mAction)(0); } field_0xdc0 = 0; mAction = i_action; if (mAction != NULL) { - (this->*mAction)(NULL); + (this->*mAction)(0); } return 1; diff --git a/src/d/actor/d_a_npc_chin.cpp b/src/d/actor/d_a_npc_chin.cpp index 500ff60eaa..6fc9002f1a 100644 --- a/src/d/actor/d_a_npc_chin.cpp +++ b/src/d/actor/d_a_npc_chin.cpp @@ -362,7 +362,7 @@ int daNpcChin_c::CreateHeap() { setMotionAnm(motionAnmParam, 0.0f); - if (field_0xe24 != 0 && mSpotLight.loadModel() == NULL) { + if (field_0xe24 != 0 && mSpotLight.loadModel() == 0) { return 0; } @@ -439,7 +439,7 @@ int daNpcChin_c::createHeapCallBack(fopAc_ac_c* i_this) { } int daNpcChin_c::ctrlJointCallBack(J3DJoint* i_joint, int param_1) { - if (param_1 == NULL) { + if (param_1 == 0) { J3DModel* model = j3dSys.getModel(); daNpcChin_c* chin = (daNpcChin_c*)model->getUserArea(); if (chin != NULL) { diff --git a/src/d/actor/d_a_npc_fairy.cpp b/src/d/actor/d_a_npc_fairy.cpp index 850c5baa7b..f579985d22 100644 --- a/src/d/actor/d_a_npc_fairy.cpp +++ b/src/d/actor/d_a_npc_fairy.cpp @@ -883,7 +883,7 @@ void daNpc_Fairy_c::srchActors() { BOOL daNpc_Fairy_c::evtTalk() { if (chkAction(&daNpc_Fairy_c::talk)) { - (this->*mAction)(NULL); + (this->*mAction)(0); } else { mPreItemNo = 0; @@ -952,7 +952,7 @@ void daNpc_Fairy_c::action() { } if (mAction) { - (this->*mAction)(NULL); + (this->*mAction)(0); } } @@ -1124,7 +1124,7 @@ BOOL daNpc_Fairy_c::setAction(actionFunc action, int param_2) { mMode = 0xFFFF; if (mAction) { - (this->*mAction)(NULL); + (this->*mAction)(0); } mMode = 0; diff --git a/src/d/actor/d_a_npc_grm.cpp b/src/d/actor/d_a_npc_grm.cpp index 819b40db8c..c530f869f9 100644 --- a/src/d/actor/d_a_npc_grm.cpp +++ b/src/d/actor/d_a_npc_grm.cpp @@ -448,8 +448,8 @@ BOOL daNpc_grM_c::evtProc() { int face_motion, motion; if (ctrlMsgAnm(&face_motion, &motion, this, field_0xe2d)) { if (field_0xe26) { - mFaceMotionSeqMngr.setNo(face_motion, -1.0f, TRUE, NULL); - mMotionSeqMngr.setNo(motion, -1.0f, TRUE, NULL); + mFaceMotionSeqMngr.setNo(face_motion, -1.0f, TRUE, 0); + mMotionSeqMngr.setNo(motion, -1.0f, TRUE, 0); } } else if (tmp != 0 && field_0xe26) { setAfterTalkMotion(); diff --git a/src/d/actor/d_a_npc_hanjo.cpp b/src/d/actor/d_a_npc_hanjo.cpp index 06dc3c57a7..e80428e355 100644 --- a/src/d/actor/d_a_npc_hanjo.cpp +++ b/src/d/actor/d_a_npc_hanjo.cpp @@ -1791,7 +1791,7 @@ int daNpc_Hanjo_c::takayose(void* param_0) { } } } - if (daPy_py_c::checkNowWolf() && mCyl2.ChkCoHit() != NULL) { + if (daPy_py_c::checkNowWolf() && mCyl2.ChkCoHit() != 0) { if (!daPy_getPlayerActorClass()->checkPlayerFly() || daPy_getPlayerActorClass()->checkAutoJump() || daPy_getPlayerActorClass()->checkWolfTriggerJump()) diff --git a/src/d/actor/d_a_npc_henna.cpp b/src/d/actor/d_a_npc_henna.cpp index 53eb4bb2d8..0b41cad2b4 100644 --- a/src/d/actor/d_a_npc_henna.cpp +++ b/src/d/actor/d_a_npc_henna.cpp @@ -277,7 +277,7 @@ static void message_shop(npc_henna_class* i_this) { i_this->field_0x750 = 1; } if (i_this->field_0x750 != 0) { - fopAcM_OffStatus(actor, NULL); + fopAcM_OffStatus(actor, 0); cLib_offBit<u32>(actor->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e); } else { fopAcM_OnStatus(actor, 0); @@ -2498,7 +2498,7 @@ static int daNpc_Henna_Execute(npc_henna_class* i_this) { mDoMtx_stack_c::transS(-460.0f + AREG_F(0), 51.0f + AREG_F(1), -240.0f + AREG_F(2)); mDoMtx_stack_c::YrotM(-17729 + AREG_S(0)); - mDoMtx_stack_c::XrotM(AREG_S(1) - 0x8107); + mDoMtx_stack_c::XrotM((s16)(AREG_S(1) - 0x8107)); mDoMtx_stack_c::ZrotM(AREG_S(2) + 2000 + sp_0xe); } else { mDoMtx_stack_c::transS(-790.0f + AREG_F(0), 153.0f + AREG_F(1), diff --git a/src/d/actor/d_a_npc_kasi_hana.cpp b/src/d/actor/d_a_npc_kasi_hana.cpp index 2d592ec85e..e9544a9a52 100644 --- a/src/d/actor/d_a_npc_kasi_hana.cpp +++ b/src/d/actor/d_a_npc_kasi_hana.cpp @@ -853,7 +853,7 @@ BOOL daNpcKasiHana_c::main() { } if (mAction) { - (this->*mAction)(NULL); + (this->*mAction)(0); } mKasiMng.sendInfo(); @@ -1072,14 +1072,14 @@ BOOL daNpcKasiHana_c::setAction(actionFunc action) { mMode = -1; if (mAction) { - (this->*mAction)(NULL); + (this->*mAction)(0); } mMode = 0; mAction = action; if (mAction) { - (this->*mAction)(NULL); + (this->*mAction)(0); } return TRUE; diff --git a/src/d/actor/d_a_npc_kasi_kyu.cpp b/src/d/actor/d_a_npc_kasi_kyu.cpp index 27c4a0b6ba..8f3f9464cf 100644 --- a/src/d/actor/d_a_npc_kasi_kyu.cpp +++ b/src/d/actor/d_a_npc_kasi_kyu.cpp @@ -400,7 +400,7 @@ BOOL daNpcKasiKyu_c::main() { } if (mAction) { - (this->*mAction)(NULL); + (this->*mAction)(0); } playMotion(); @@ -621,14 +621,14 @@ BOOL daNpcKasiKyu_c::setAction(actionFunc action) { mMode = -1; if (mAction) { - (this->*mAction)(NULL); + (this->*mAction)(0); } mMode = 0; mAction = action; if (mAction) { - (this->*mAction)(NULL); + (this->*mAction)(0); } return TRUE; diff --git a/src/d/actor/d_a_npc_kasi_mich.cpp b/src/d/actor/d_a_npc_kasi_mich.cpp index e76b9b9823..791cecafb0 100644 --- a/src/d/actor/d_a_npc_kasi_mich.cpp +++ b/src/d/actor/d_a_npc_kasi_mich.cpp @@ -400,7 +400,7 @@ BOOL daNpcKasiMich_c::main() { } if (mAction) { - (this->*mAction)(NULL); + (this->*mAction)(0); } playMotion(); @@ -621,14 +621,14 @@ BOOL daNpcKasiMich_c::setAction(actionFunc action) { mMode = -1; if (mAction) { - (this->*mAction)(NULL); + (this->*mAction)(0); } mMode = 0; mAction = action; if (mAction) { - (this->*mAction)(NULL); + (this->*mAction)(0); } return TRUE; diff --git a/src/d/actor/d_a_npc_kn.cpp b/src/d/actor/d_a_npc_kn.cpp index 6a6568f9d5..1197e744ce 100644 --- a/src/d/actor/d_a_npc_kn.cpp +++ b/src/d/actor/d_a_npc_kn.cpp @@ -4965,7 +4965,7 @@ int daNpc_Kn_c::setPrtcl() { mParticleMngr[i].mpModel == true ? &mParticleMngr[i].mAngle : NULL, 0, fopAcM_GetRoomNo(this), 0.0f, speedF); - if (mParticleMngr[i].mpModel != NULL) { + if (mParticleMngr[i].mpModel != false) { emitter = mParticleMngr[i].mManager.getCenterEmitter(0, 0); if (emitter != NULL) { switch (i) { diff --git a/src/d/actor/d_a_npc_maro.cpp b/src/d/actor/d_a_npc_maro.cpp index 2301e4fc8a..fbb6ebcad9 100644 --- a/src/d/actor/d_a_npc_maro.cpp +++ b/src/d/actor/d_a_npc_maro.cpp @@ -386,7 +386,7 @@ int daNpc_Maro_c::Execute() { setSellItemMax(getMaxNumItem()); field_0xf60 = -1; setMasterType(2); - mShopCamAction.setCamDataIdx(NULL); + mShopCamAction.setCamDataIdx(0); mShopCamAction.setCamAction(NULL); field_0x1131 = 1; } diff --git a/src/d/actor/d_a_npc_rafrel.cpp b/src/d/actor/d_a_npc_rafrel.cpp index 1b897adfaa..cc9b2382d9 100644 --- a/src/d/actor/d_a_npc_rafrel.cpp +++ b/src/d/actor/d_a_npc_rafrel.cpp @@ -421,7 +421,7 @@ int daNpcRafrel_c::createHeapCallBack(fopAc_ac_c* i_this) { } int daNpcRafrel_c::ctrlJointCallBack(J3DJoint* i_joint, int param_1) { - if (param_1 == NULL) { + if (param_1 == 0) { J3DModel* mdl_p = j3dSys.getModel(); daNpcRafrel_c* i_this = (daNpcRafrel_c*)mdl_p->getUserArea(); diff --git a/src/d/actor/d_a_npc_shad.cpp b/src/d/actor/d_a_npc_shad.cpp index 395d5a0f87..15f99d924c 100644 --- a/src/d/actor/d_a_npc_shad.cpp +++ b/src/d/actor/d_a_npc_shad.cpp @@ -1485,7 +1485,7 @@ bool daNpcShad_c::talk(void* param_1) { if (strcmp(dComIfGp_getStartStageName(), "R_SP116") == 0 || mCurAngle.y == fopAcM_searchPlayerAngleY(this)) { if (talkProc(NULL, TRUE, NULL)) { mActorMngr[0].entry(daPy_getPlayerActorClass()); - itemNo = NULL; + itemNo = 0; eventID = mFlow.getEventId(&itemNo); OS_REPORT("会話終了時 イベントID=%d アイテムNo=%d\n", eventID, itemNo); // At the end of the conversation, Event ID=%d Item No=%d diff --git a/src/d/actor/d_a_npc_tk.cpp b/src/d/actor/d_a_npc_tk.cpp index 09e5a64514..8b83afb997 100644 --- a/src/d/actor/d_a_npc_tk.cpp +++ b/src/d/actor/d_a_npc_tk.cpp @@ -1340,7 +1340,7 @@ void daNPC_TK_c::executeBack() { if (current.pos.y > unkXyz1.y) { cLib_chaseAngleS(&shape_angle.x, 0x2000, 0x400); } else { - cLib_chaseAngleS(&shape_angle.x, 0xffffe000, 0x400); + cLib_chaseAngleS(&shape_angle.x, -8192, 0x400); } } else { cLib_chaseAngleS(&field_0x69c, 0x200, 0x10); @@ -1379,7 +1379,7 @@ void daNPC_TK_c::executeBack() { if (current.pos.y > unkXyz1.y) { cLib_chaseAngleS(&shape_angle.x, 0x2000, 0x400); } else { - cLib_chaseAngleS(&shape_angle.x, 0xffffe000, 0x400); + cLib_chaseAngleS(&shape_angle.x, -8192, 0x400); } } else { cLib_chaseAngleS(&field_0x69c, 0x200, 0x10); @@ -2456,7 +2456,7 @@ void daNPC_TK_c::executeWolfPerch() { void daNPC_TK_c::executeResistanceDemo() { daNpcMoiR_c* npcMoiR; - if (fopAcM_SearchByName(PROC_NPC_MOIR, (fopAc_ac_c**)&npcMoiR) == NULL || npcMoiR == NULL) { + if (fopAcM_SearchByName(PROC_NPC_MOIR, (fopAc_ac_c**)&npcMoiR) == 0 || npcMoiR == NULL) { return; } @@ -2623,7 +2623,7 @@ void daNPC_TK_c::executeResistanceDemo() { // fallthrough case 8: { - cLib_addCalcAngleS2(&field_0x6a2, 0xffffdc00, 8, 0x200); + cLib_addCalcAngleS2(&field_0x6a2, -9216, 8, 0x200); cLib_addCalcAngleS2(&field_0x6a0, 0x1000, 8, 0x200); cLib_addCalcAngleS2(&field_0x6aa, 0x2000, 8, 0x200); diff --git a/src/d/actor/d_a_npc_tkj2.cpp b/src/d/actor/d_a_npc_tkj2.cpp index 103a9d57f2..d364c06cc1 100644 --- a/src/d/actor/d_a_npc_tkj2.cpp +++ b/src/d/actor/d_a_npc_tkj2.cpp @@ -176,7 +176,7 @@ static void Wind_effect(npc_tkj2_class* i_this) { if ((s16)(sVar1 - i_this->field_0x5c4) < 0) { cLib_addCalcAngleS(&a_this->shape_angle.z, 0x2000, 0x10, 0x1000, 0); } else { - cLib_addCalcAngleS(&a_this->shape_angle.z, 0xFFFFE000, 2, 0x1000, 0); + cLib_addCalcAngleS(&a_this->shape_angle.z, -8192, 2, 0x1000, 0); } } diff --git a/src/d/actor/d_a_npc_uri.cpp b/src/d/actor/d_a_npc_uri.cpp index 2d0db6e9b8..093423cc66 100644 --- a/src/d/actor/d_a_npc_uri.cpp +++ b/src/d/actor/d_a_npc_uri.cpp @@ -904,12 +904,12 @@ int daNpc_Uri_c::selectAction() { switch (mType) { case TYPE_1: - if (field_0x100d != NULL) { + if (field_0x100d != 0) { field_0xfc0[0] = &daNpc_Uri_c::sitWait; } else { - if (field_0x100e != NULL) { + if (field_0x100e != 0) { /* T_0007 - Ordon Village - During Uli's pick-up tutorial */ - if (daNpcT_chkTmpBit(7) && field_0x100f == NULL) { + if (daNpcT_chkTmpBit(7) && field_0x100f == 0) { field_0xfc0[0] = &daNpc_Uri_c::walk; } else { field_0xfc0[0] = &daNpc_Uri_c::wait; @@ -981,7 +981,7 @@ int daNpc_Uri_c::getTutorialCond(cXyz param_1) { field_0x1000 = mpHIO->m.field_0xa8 - 100.0f; return 5; } - if (field_0x1009 != NULL) { + if (field_0x1009 != 0) { return 8; } } diff --git a/src/d/actor/d_a_npc_ykw.cpp b/src/d/actor/d_a_npc_ykw.cpp index 7aac0c1340..25b3df0e8f 100644 --- a/src/d/actor/d_a_npc_ykw.cpp +++ b/src/d/actor/d_a_npc_ykw.cpp @@ -462,7 +462,7 @@ int daNpc_ykW_c::createHeapCallBack(fopAc_ac_c* i_this) { } int daNpc_ykW_c::ctrlJointCallBack(J3DJoint* i_joint, int param_1) { - if (param_1 == NULL) { + if (param_1 == 0) { J3DModel* model = j3dSys.getModel(); daNpc_ykW_c* ykw = (daNpc_ykW_c*)model->getUserArea(); if (ykw != 0) { @@ -1822,7 +1822,7 @@ BOOL daNpc_ykW_c::cutLv5DungeonClear(int param_0) { itemPos.y += 50.0f; unkActor1 = fopAcM_fastCreateItem(&itemPos, 0, fopAcM_GetRoomNo(this), &unkSxyz, - &unkXyz1, &unkFloat2, &unkFloat3, -1, NULL, NULL); + &unkXyz1, &unkFloat2, &unkFloat3, -1, 0, NULL); if (unkActor1 != NULL) { mDoAud_seStart(Z2SE_OBJ_YO_HEART_S, &itemPos, 0, 0); fopAcM_OnStatus(unkActor1, fopAcM_STATUS_UNK_0x4000); diff --git a/src/d/actor/d_a_obj_avalanche.cpp b/src/d/actor/d_a_obj_avalanche.cpp index 23b4daf8fa..795b9ff45f 100644 --- a/src/d/actor/d_a_obj_avalanche.cpp +++ b/src/d/actor/d_a_obj_avalanche.cpp @@ -253,7 +253,7 @@ int daObjAvalanche_c::demoProc() { void daObjAvalanche_c::setEffect() { cXyz acStack_18(0.0f, 0.0f, 0.0f); csXyz cStack_20(0, 0, 0); - dComIfGp_particle_set(0x8c51, &acStack_18, &cStack_20, NULL, 0xff, NULL, 0xffffffff, NULL, NULL, + dComIfGp_particle_set(0x8c51, &acStack_18, &cStack_20, NULL, 0xff, NULL, -1, NULL, NULL, NULL); } diff --git a/src/d/actor/d_a_obj_batta.cpp b/src/d/actor/d_a_obj_batta.cpp index 23ce104482..eb187f1ac0 100644 --- a/src/d/actor/d_a_obj_batta.cpp +++ b/src/d/actor/d_a_obj_batta.cpp @@ -509,7 +509,7 @@ int daObjBATTA_c::execute() { action(); mBrk->play(); mBtk->play(); - mpMorf->play(NULL, dComIfGp_getReverb(fopAcM_GetRoomNo(this))); + mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this))); mtx_set(); if (field_0x9f0 == 0) { mSph.SetC(current.pos); diff --git a/src/d/actor/d_a_obj_bed.cpp b/src/d/actor/d_a_obj_bed.cpp index 37de863ca6..06c2eb71da 100644 --- a/src/d/actor/d_a_obj_bed.cpp +++ b/src/d/actor/d_a_obj_bed.cpp @@ -30,7 +30,7 @@ void daObj_Bed_HIO_c::genMessage(JORMContext* ctx) { } #endif -daObj_Bed_HIOParam const daObj_Bed_Param_c::m = {NULL, -3.0f, 1.0f, 600.0f}; +daObj_Bed_HIOParam const daObj_Bed_Param_c::m = {0, -3.0f, 1.0f, 600.0f}; daObj_Bed_c::~daObj_Bed_c() { if (mpCollider != NULL) { diff --git a/src/d/actor/d_a_obj_bky_rock.cpp b/src/d/actor/d_a_obj_bky_rock.cpp index d2918eeaeb..08fc622c8c 100644 --- a/src/d/actor/d_a_obj_bky_rock.cpp +++ b/src/d/actor/d_a_obj_bky_rock.cpp @@ -68,7 +68,7 @@ int daBkyRock_c::draw() { mModels[mMode], &tevStr); if (field_0x57a) { - dMdl_c* dMdl = dMdl_mng_c::entry(mModels[2]->getModelData(), NULL, current.roomNo); + dMdl_c* dMdl = dMdl_mng_c::entry(mModels[2]->getModelData(), 0, current.roomNo); if (dMdl != NULL) { _pieceData* piece = mPieces; for (int i = 0; i < 20; i++, piece++) { diff --git a/src/d/actor/d_a_obj_bmWindow.cpp b/src/d/actor/d_a_obj_bmWindow.cpp index eadbca6baa..e16f6a753a 100644 --- a/src/d/actor/d_a_obj_bmWindow.cpp +++ b/src/d/actor/d_a_obj_bmWindow.cpp @@ -288,7 +288,7 @@ void daBmWindow_c::setBreakEffect(int param_1) { } int temp = param_1 * 3; for (int i = temp; i < temp + 3; i++) { - dComIfGp_particle_set(particle_id[i], &cStack_2c, &cStack_40, &scale, 0xff, 0, 0xffffffff, + dComIfGp_particle_set(particle_id[i], &cStack_2c, &cStack_40, &scale, 0xff, 0, -1, NULL, NULL, NULL); } } diff --git a/src/d/actor/d_a_obj_digholl.cpp b/src/d/actor/d_a_obj_digholl.cpp index 0e9aca1f7c..d9fa7f3528 100644 --- a/src/d/actor/d_a_obj_digholl.cpp +++ b/src/d/actor/d_a_obj_digholl.cpp @@ -74,9 +74,9 @@ int daObjDigholl_c::execute() { } if (player->current.pos.abs(current.pos) < 1000.0f) { - dComIfGp_particle_setSimple(0x70f, ¤t.pos, 0xff, g_whiteColor, g_whiteColor, NULL, + dComIfGp_particle_setSimple(0x70f, ¤t.pos, 0xff, g_whiteColor, g_whiteColor, 0, 0.0f); - dComIfGp_particle_setSimple(0x73d, ¤t.pos, 0xff, g_whiteColor, g_whiteColor, NULL, + dComIfGp_particle_setSimple(0x73d, ¤t.pos, 0xff, g_whiteColor, g_whiteColor, 0, 0.0f); } diff --git a/src/d/actor/d_a_obj_flag.cpp b/src/d/actor/d_a_obj_flag.cpp index 7443e8fa3f..9e2e11bdaf 100644 --- a/src/d/actor/d_a_obj_flag.cpp +++ b/src/d/actor/d_a_obj_flag.cpp @@ -80,7 +80,7 @@ void daObjFlag_c::calcJointAngle() { joint->mJoint3 = joint->mJoint1 - joint->mJoint2; } - if(attr().field_0x25 != NULL) { + if(attr().field_0x25 != 0) { if(i == 1) { calcAngleSwingX(joint, power); } diff --git a/src/d/actor/d_a_obj_kbox.cpp b/src/d/actor/d_a_obj_kbox.cpp index 655f625720..8f85615ea9 100644 --- a/src/d/actor/d_a_obj_kbox.cpp +++ b/src/d/actor/d_a_obj_kbox.cpp @@ -62,7 +62,7 @@ static void break_eff(obj_kbox_class* i_this) { fopAcM_GetRoomNo(&i_this->mActor), NULL, NULL, &particleScale); dPa_modelEcallBack::setModel(pEmitter, kibako_bmd, i_this->mActor.tevStr, 3, NULL, 0, 0); for (int i = 0; i < 3; i++) { - dComIfGp_particle_set(particle_id[i], &emitterPos, 0, &particleScale, 0xff, 0, 0xffffffff, + dComIfGp_particle_set(particle_id[i], &emitterPos, 0, &particleScale, 0xff, 0, -1, 0, 0, 0); } } @@ -213,7 +213,7 @@ static void kbox_float(obj_kbox_class* i_this) { i_this->field_0x5a4 + i_this->field_0x590 + i_this->field_0x58c + i_this->field_0x5ac; i_this->field_0x9e8 = dComIfGp_particle_set(i_this->field_0x9e8, 0x86c3, &cStack_88, &a_this->tevStr, &a_this->shape_angle, - &cStack_7c, 0xff, 0, 0xffffffff, 0, 0, 0); + &cStack_7c, 0xff, 0, -1, 0, 0, 0); if (i_this->field_0x5ac <= -50.0f) { fopAcM_delete(a_this); dComIfGp_particle_set(0x86c4, &cStack_88, &a_this->tevStr, &a_this->shape_angle, diff --git a/src/d/actor/d_a_obj_laundry_rope.cpp b/src/d/actor/d_a_obj_laundry_rope.cpp index f23271db21..080f45915b 100644 --- a/src/d/actor/d_a_obj_laundry_rope.cpp +++ b/src/d/actor/d_a_obj_laundry_rope.cpp @@ -113,7 +113,7 @@ cXyz* daObjLndRope_c::getRopeStartPos() { } f32 daObjLndRope_c::getStartRate(cXyz* i_ropeSegmentPos) { - if (mFlag != NULL) { + if (mFlag != 0) { return mScale * (i_ropeSegmentPos->x - getRopeStartPos()->x); } else { return mScale * (i_ropeSegmentPos->z - getRopeStartPos()->z); diff --git a/src/d/actor/d_a_obj_lp.cpp b/src/d/actor/d_a_obj_lp.cpp index 4d75aacb08..77011548d5 100644 --- a/src/d/actor/d_a_obj_lp.cpp +++ b/src/d/actor/d_a_obj_lp.cpp @@ -53,14 +53,14 @@ static int tandem; static int demo_f; -static int target_info[10]; +static void* target_info[10]; static int target_info_count; static void* s_ks_sub(void* param_1, void* param_2) { if (fopAcM_IsActor(param_1) && fopAcM_GetName(param_1) == 0x60) { if (target_info_count < 10) { - target_info[target_info_count] = (intptr_t)param_1; + target_info[target_info_count] = param_1; target_info_count++; } return param_1; @@ -77,7 +77,7 @@ static int hit_check(obj_lp_class* i_this, wd_ss* WdSs) { fVar1 = 50.0f; for (int i = 0; i < target_info_count; i++) { - sp6c = WdSs->field_0x10 - *(cXyz *)(target_info[i] + 0x4d0); + sp6c = WdSs->field_0x10 - *(cXyz *)((u8 *)target_info[i] + 0x4d0); if (sp6c.y >= -3.0f) { f32 dist = JMAFastSqrt(sp6c.x * sp6c.x + sp6c.z * sp6c.z); if (dist <= fVar1 * WdSs->field_0x3c) { @@ -126,7 +126,7 @@ static int hit_check(obj_lp_class* i_this, wd_ss* WdSs) { cLib_addCalc2(&WdSs->field_0x10.y, WdSs->field_0x4.y + fVar8 * -0.5f, 0.5f, 3.0f); cLib_addCalc2(&WdSs->field_0x28.x, fVar8, 0.1f, fVar8 * 0.5f); cLib_addCalcAngleS2(&WdSs->field_0x34, cM_atan2s(sp6c.x, sp6c.z), 0x20, 0x400); - cLib_addCalcAngleS2(&WdSs->field_0x36, 0xfffff060, 0x20, 0x400); + cLib_addCalcAngleS2(&WdSs->field_0x36, -4000, 0x20, 0x400); rv = 1; } } @@ -221,7 +221,7 @@ static int daObj_Lp_Execute(obj_lp_class* i_this) { target_info[i] = 0; } - target_info[0] = (intptr_t)dComIfGp_getPlayer(0); + target_info[0] = dComIfGp_getPlayer(0); target_info_count = 1; if (strcmp(dComIfGp_getStartStageName(), "D_MN05") == 0) { diff --git a/src/d/actor/d_a_obj_lv3Water.cpp b/src/d/actor/d_a_obj_lv3Water.cpp index 704f35dcf5..e9b17c3ad6 100644 --- a/src/d/actor/d_a_obj_lv3Water.cpp +++ b/src/d/actor/d_a_obj_lv3Water.cpp @@ -31,7 +31,7 @@ public: }; daLv3Water_HIO_c::daLv3Water_HIO_c() { - mLevelControlWaitFrames = NULL; + mLevelControlWaitFrames = 0; } #if DEBUG diff --git a/src/d/actor/d_a_obj_lv6ChangeGate.cpp b/src/d/actor/d_a_obj_lv6ChangeGate.cpp index a28b3dca48..da9f2efe23 100644 --- a/src/d/actor/d_a_obj_lv6ChangeGate.cpp +++ b/src/d/actor/d_a_obj_lv6ChangeGate.cpp @@ -127,7 +127,7 @@ int daLv6ChangeGate_c::Execute(Mtx** param_0) { for (int i = 0; i < 12; i++) { cXyz spC(cyl_x_offset + mMoveTransX, 0.0f, 0.0f); - mDoMtx_stack_c::ZXYrotS(NULL, shape_angle.y, shape_angle.z); + mDoMtx_stack_c::ZXYrotS(0, shape_angle.y, shape_angle.z); mDoMtx_stack_c::multVec(&spC, &spC); spC += current.pos; @@ -251,7 +251,7 @@ void daLv6ChangeGate_c::init_modeBreak() { void daLv6ChangeGate_c::modeBreak() { cXyz effpos(mMoveTransX, 0.0f, 0.0f); - mDoMtx_stack_c::ZXYrotS(NULL, shape_angle.y, shape_angle.z); + mDoMtx_stack_c::ZXYrotS(0, shape_angle.y, shape_angle.z); mDoMtx_stack_c::multVec(&effpos, &effpos); effpos += current.pos; diff --git a/src/d/actor/d_a_obj_lv6TogeRoll.cpp b/src/d/actor/d_a_obj_lv6TogeRoll.cpp index 9fe1438399..2ee3dbd334 100644 --- a/src/d/actor/d_a_obj_lv6TogeRoll.cpp +++ b/src/d/actor/d_a_obj_lv6TogeRoll.cpp @@ -206,7 +206,7 @@ void daTogeRoll_c::moveTogeRoll() { &daTogeRoll_c::modeBound, &daTogeRoll_c::modeBound2, &daTogeRoll_c::modeBoundWait, }; - if (field_0x5dc == NULL) { + if (field_0x5dc == 0) { for (int i = 0; i < 8; i++) { if (mSph[i].ChkCoHit()) { fopAc_ac_c* hit_actor = dCc_GetAc(mSph[i].GetCoHitObj()->GetAc()); @@ -264,7 +264,7 @@ void daTogeRoll_c::init_modeBoundWait() { } void daTogeRoll_c::modeBoundWait() { - if (field_0x5db != NULL) { + if (field_0x5db != 0) { field_0x5db -= 1; } else { field_0x5dc = 0; diff --git a/src/d/actor/d_a_obj_lv6bemos2.cpp b/src/d/actor/d_a_obj_lv6bemos2.cpp index c7e58cc22a..134c3fa042 100644 --- a/src/d/actor/d_a_obj_lv6bemos2.cpp +++ b/src/d/actor/d_a_obj_lv6bemos2.cpp @@ -494,7 +494,7 @@ void daObjLv6Bm_c::calcBeam() { if (field_0xa19 > 0) { cXyz sp84(field_0x9f8); - if (fopAcM_lc_c::lineCheck(&field_0x9e4, &field_0x9f8, this) != NULL && fopAcM_lc_c::checkGroundHit()) { + if (fopAcM_lc_c::lineCheck(&field_0x9e4, &field_0x9f8, this) != false && fopAcM_lc_c::checkGroundHit()) { sp84 = fopAcM_lc_c::getCross(); } diff --git a/src/d/actor/d_a_obj_magne_arm.cpp b/src/d/actor/d_a_obj_magne_arm.cpp index e2531f8d34..049323dace 100644 --- a/src/d/actor/d_a_obj_magne_arm.cpp +++ b/src/d/actor/d_a_obj_magne_arm.cpp @@ -186,8 +186,8 @@ int daObjMarm_c::Create() { mIsYRotForward = 0; } - if (dComIfG_Bgsp().Regist((dBgW_Base*)mpBgW1, this) != NULL || - dComIfG_Bgsp().Regist((dBgW_Base*)mpBgW2, this) != NULL) + if (dComIfG_Bgsp().Regist((dBgW_Base*)mpBgW1, this) != false || + dComIfG_Bgsp().Regist((dBgW_Base*)mpBgW2, this) != false) { return FALSE; } @@ -1060,11 +1060,11 @@ void daObjMarm_c::debugDraw() { } int daObjMarm_c::Delete() { - if (mpBgW1 != NULL && mpBgW1->ChkUsed() != NULL) { + if (mpBgW1 != NULL && mpBgW1->ChkUsed() != false) { dComIfG_Bgsp().Release(mpBgW1); } - if (mpBgW2 != NULL && mpBgW2->ChkUsed() != NULL) { + if (mpBgW2 != NULL && mpBgW2->ChkUsed() != false) { dComIfG_Bgsp().Release(mpBgW2); } endMagneHoleEffect(); diff --git a/src/d/actor/d_a_obj_maki.cpp b/src/d/actor/d_a_obj_maki.cpp index 9d79d4847c..131ccf39e1 100644 --- a/src/d/actor/d_a_obj_maki.cpp +++ b/src/d/actor/d_a_obj_maki.cpp @@ -114,7 +114,7 @@ int daObj_Maki_Execute(obj_maki_class* i_this) { cxyz.y += 20000.0f; i_this->field_0x6f8[0] = dComIfGp_particle_set( i_this->field_0x6f8[0], 0x820b, &i_this->current.pos, &i_this->tevStr, - &i_this->shape_angle, 0, 0xff, 0, 0xffffffff, 0, 0, 0); + &i_this->shape_angle, 0, 0xff, 0, -1, 0, 0, 0); fopAcM_seStartLevel(i_this, 0x800a6, 0); } } diff --git a/src/d/actor/d_a_obj_prop.cpp b/src/d/actor/d_a_obj_prop.cpp index fc2b773538..273e03b5f1 100644 --- a/src/d/actor/d_a_obj_prop.cpp +++ b/src/d/actor/d_a_obj_prop.cpp @@ -53,7 +53,7 @@ int daObjProp_c::Delete() { } int daObjProp_c::draw() { - g_env_light.settingTevStruct(NULL, ¤t.pos, &tevStr); + g_env_light.settingTevStruct(0, ¤t.pos, &tevStr); g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr); mDoExt_modelUpdate(mpModel); return 1; diff --git a/src/d/actor/d_a_obj_rfHole.cpp b/src/d/actor/d_a_obj_rfHole.cpp index 02d1883cd1..6433549b88 100644 --- a/src/d/actor/d_a_obj_rfHole.cpp +++ b/src/d/actor/d_a_obj_rfHole.cpp @@ -157,7 +157,7 @@ void daRfHole_c::setBreakEffect() { mDoMtx_stack_c::multVec(&acStack_24, &acStack_24); cXyz cStack_30 = current.pos + acStack_24; for (int i = 0; i < 5; i++) { - dComIfGp_particle_set(particle_id[i], &cStack_30, NULL, &scale, 0xff, 0, 0xffffffff, NULL, + dComIfGp_particle_set(particle_id[i], &cStack_30, NULL, &scale, 0xff, 0, -1, NULL, NULL, NULL); } } diff --git a/src/d/actor/d_a_obj_rope_bridge.cpp b/src/d/actor/d_a_obj_rope_bridge.cpp index 9c0874ccab..402ca74b46 100644 --- a/src/d/actor/d_a_obj_rope_bridge.cpp +++ b/src/d/actor/d_a_obj_rope_bridge.cpp @@ -16,7 +16,7 @@ static char* l_ropeArcName = "L_Ropest"; void daObjRBridge_c::initBaseMtx() { mDoMtx_stack_c::transS(current.pos); - mDoMtx_stack_c::ZXYrotM(NULL, current.angle.y, 0); + mDoMtx_stack_c::ZXYrotM(0, current.angle.y, 0); MTXCopy(mDoMtx_stack_c::get(), mMtx); mpBrgModel->setBaseScale(scale); diff --git a/src/d/actor/d_a_obj_sekizoa.cpp b/src/d/actor/d_a_obj_sekizoa.cpp index 1e2ff2ccbd..fcf5bf8107 100644 --- a/src/d/actor/d_a_obj_sekizoa.cpp +++ b/src/d/actor/d_a_obj_sekizoa.cpp @@ -255,7 +255,7 @@ int daObj_Sekizoa_c::CreateHeap() { } if (mType == TYPE_6) { int success_create = mInvModel.create(mpMorf[0]->getModel(), 1); - if (success_create == NULL) { + if (success_create == 0) { return 0; } @@ -736,7 +736,7 @@ void daObj_Sekizoa_c::setAttnPos() { mpMorf[1]->modelCalc(); } if (mpMcaMorf != NULL) { - ((mDoExt_McaMorfSO*)mpMcaMorf)->play(NULL, 0); + ((mDoExt_McaMorfSO*)mpMcaMorf)->play(0, 0); if (mType == TYPE_1 || mType == TYPE_3 || mType == TYPE_5) { mDoMtx_stack_c::copy(mpMorf[0]->getModel()->getAnmMtx(7)); } else { diff --git a/src/d/actor/d_a_obj_so.cpp b/src/d/actor/d_a_obj_so.cpp index 0431d31851..47ffa2a36c 100644 --- a/src/d/actor/d_a_obj_so.cpp +++ b/src/d/actor/d_a_obj_so.cpp @@ -831,7 +831,7 @@ static void demo_camera(obj_so_class* i_this) { // fallthrough case 2: sp3c.set(12459.0f, 3152.0f, 4628.0f); - daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp3c, 0xfffffaee, 0); + daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp3c, -1298, 0); i_this->mDemoCamCenter.x = a_this->current.pos.x; i_this->mDemoCamCenter.z = a_this->current.pos.z; sp3c.y = (a_this->current.pos.y + 150.0f) - 50.0f; diff --git a/src/d/actor/d_a_obj_stone.cpp b/src/d/actor/d_a_obj_stone.cpp index c5ddc061b9..1d7c35e86d 100644 --- a/src/d/actor/d_a_obj_stone.cpp +++ b/src/d/actor/d_a_obj_stone.cpp @@ -807,7 +807,7 @@ void daObjStone_c::init_modeBreak() { JPABaseEmitter* emitter = dComIfGp_particle_set( 0x15c, ¤t.pos, 0, &acStack_40, 0xff, &dPa_modelEcallBack::getEcallback(), fopAcM_GetRoomNo(this), 0, 0, 0); dPa_modelEcallBack::setModel(emitter, stone_bmd, tevStr, - 3, 0, NULL, 0); + 3, 0, 0, 0); for (int i = 0; i < 3; i = i + 1) { dComIfGp_particle_set( l_eff_id[i], @@ -947,7 +947,7 @@ void daObjStone_c::set_carry_eff() { if (field_0x0950 == 3) { for (int i = 0; i < 3; i++) { field_0x0964[i] = - dComIfGp_particle_set(l_carry_eff_id[i], ¤t.pos, 0, &pos, 0xFF, 0, 0xFFFFFFFF, + dComIfGp_particle_set(l_carry_eff_id[i], ¤t.pos, 0, &pos, 0xFF, 0, -1, 0, 0, 0); // float literal inline if (field_0x0964[i] != 0) { field_0x0964[i]->becomeImmortalEmitter(); diff --git a/src/d/actor/d_a_obj_tks.cpp b/src/d/actor/d_a_obj_tks.cpp index f01ec869f7..f769340976 100644 --- a/src/d/actor/d_a_obj_tks.cpp +++ b/src/d/actor/d_a_obj_tks.cpp @@ -279,7 +279,7 @@ int daObjTks_c::createHeapCallBack(fopAc_ac_c* i_this) { } int daObjTks_c::ctrlJointCallBack(J3DJoint* i_joint, int param_1) { - if (param_1 == NULL) { + if (param_1 == 0) { J3DModel* mdl_p = j3dSys.getModel(); daObjTks_c* a_this = (daObjTks_c*)mdl_p->getUserArea(); diff --git a/src/d/actor/d_a_obj_vground.cpp b/src/d/actor/d_a_obj_vground.cpp index 47dae42331..3af6e0c5e7 100644 --- a/src/d/actor/d_a_obj_vground.cpp +++ b/src/d/actor/d_a_obj_vground.cpp @@ -47,7 +47,7 @@ int daObjVGnd_c::CreateHeap() { J3DAnmTextureSRTKey* pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, 0xb); JUT_ASSERT(198, pbtk != NULL); mpBtk = new mDoExt_btkAnm(); - if ((!mpBtk) || (!mpBtk->init(modelData, pbtk, 1, NULL, 1.0f, NULL, -1))) { + if ((!mpBtk) || (!mpBtk->init(modelData, pbtk, 1, 0, 1.0f, 0, -1))) { return 0; } } @@ -56,7 +56,7 @@ int daObjVGnd_c::CreateHeap() { J3DAnmTevRegKey* pbrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes(l_arcName, 0x8); JUT_ASSERT(212, pbrk != NULL); mpBrk = new mDoExt_brkAnm(); - if ((!mpBrk) || (!mpBrk->init(modelData, pbrk, 1, NULL, 1.0f, NULL, -1))) { + if ((!mpBrk) || (!mpBrk->init(modelData, pbrk, 1, 0, 1.0f, 0, -1))) { return 0; } } diff --git a/src/d/actor/d_a_passer_mng.cpp b/src/d/actor/d_a_passer_mng.cpp index c48a9e76ad..ea584d9158 100644 --- a/src/d/actor/d_a_passer_mng.cpp +++ b/src/d/actor/d_a_passer_mng.cpp @@ -23,7 +23,7 @@ int daPasserMng_c::execute() { csXyz cStack_20(field_0x596 != 0 ? 0xff : endTime, current.angle.y, 0); childProcIds[currentChildIndex] = fopAcM_createChild(npcId, fopAcM_GetID(this), getPasserParam(), ¤t.pos, - fopAcM_GetRoomNo(this), &cStack_20, 0, 0xffffffff, 0); + fopAcM_GetRoomNo(this), &cStack_20, 0, -1, 0); currentChildIndex = (currentChildIndex + 1) % getMaxNum(); } mTime = time + intervalTime; diff --git a/src/d/actor/d_a_shop_item.cpp b/src/d/actor/d_a_shop_item.cpp index 136d429b9a..09ef16cb70 100644 --- a/src/d/actor/d_a_shop_item.cpp +++ b/src/d/actor/d_a_shop_item.cpp @@ -128,7 +128,7 @@ void daShopItem_c::CreateInit() { home.pos = current.pos; set_mtx(); - mpModel->setUserArea(NULL); + mpModel->setUserArea(0); } void daShopItem_c::set_mtx() { diff --git a/src/d/actor/d_a_tag_allmato.cpp b/src/d/actor/d_a_tag_allmato.cpp index b1a4549e2c..2a2c94acfb 100644 --- a/src/d/actor/d_a_tag_allmato.cpp +++ b/src/d/actor/d_a_tag_allmato.cpp @@ -517,7 +517,7 @@ int daTag_AllMato_c::checkCrsMato2() { } fopAc_ac_c* sp18 = NULL; - int sp14 = NULL; + int sp14 = 0; for (int i = 0; i < 499; i++) { for (int j = 0; j < mBouMatoActorNum; j++) { diff --git a/src/d/actor/d_a_title.cpp b/src/d/actor/d_a_title.cpp index 3072d3c24c..55229336b8 100644 --- a/src/d/actor/d_a_title.cpp +++ b/src/d/actor/d_a_title.cpp @@ -182,12 +182,12 @@ void daTitle_c::loadWait_proc() { mTitle.Scr->setPriority("zelda_press_start.blo", 0x100000, mpMount->getArchive()); J2DTextBox* text[7]; - text[0] = (J2DTextBox*)mTitle.Scr->search('t_s_00'); - text[1] = (J2DTextBox*)mTitle.Scr->search('t_s_01'); - text[2] = (J2DTextBox*)mTitle.Scr->search('t_s_02'); - text[3] = (J2DTextBox*)mTitle.Scr->search('t_s_03'); - text[4] = (J2DTextBox*)mTitle.Scr->search('t_s_04'); - text[5] = (J2DTextBox*)mTitle.Scr->search('t_s_05'); + text[0] = (J2DTextBox*)mTitle.Scr->search(MULTI_CHAR('t_s_00')); + text[1] = (J2DTextBox*)mTitle.Scr->search(MULTI_CHAR('t_s_01')); + text[2] = (J2DTextBox*)mTitle.Scr->search(MULTI_CHAR('t_s_02')); + text[3] = (J2DTextBox*)mTitle.Scr->search(MULTI_CHAR('t_s_03')); + text[4] = (J2DTextBox*)mTitle.Scr->search(MULTI_CHAR('t_s_04')); + text[5] = (J2DTextBox*)mTitle.Scr->search(MULTI_CHAR('t_s_05')); text[6] = (J2DTextBox*)mTitle.Scr->search('t_o'); for (int i = 0; i < 7; i++) { @@ -196,9 +196,9 @@ void daTitle_c::loadWait_proc() { fopMsgM_messageGet(text[i]->getStringPtr(), 100); } - field_0x600 = new CPaneMgrAlpha(mTitle.Scr, 'n_all', 2, NULL); + field_0x600 = new CPaneMgrAlpha(mTitle.Scr, MULTI_CHAR('n_all'), 2, NULL); field_0x600->setAlpha(0); - J2DPane* pane = mTitle.Scr->search('n_all'); + J2DPane* pane = mTitle.Scr->search(MULTI_CHAR('n_all')); pane->translate(g_daTitHIO.mPSPosX, g_daTitHIO.mPSPosY); pane->scale(g_daTitHIO.mPSScaleX, g_daTitHIO.mPSScaleY); mpHeap->becomeCurrentHeap(); |
