diff --git a/src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp b/src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp index df8741a191..039137ff5d 100644 --- a/src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp +++ b/src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp @@ -114,7 +114,7 @@ bool JAUDynamicSeqDataBlocks::appendDynamicSeqDataBlock(JAUSeqDataBlock* seqData static void JAUDynamicSeqDataBlocks_receiveLoaded_(u32 param_0, u32 param_1) { JSULink* link = (JSULink*)param_1; JAUSeqDataBlock* seqDataBlock = link->getObject(); - if (param_0 != NULL) { + if (param_0 != 0) { seqDataBlock->field_0x1c = 2; } else { seqDataBlock->field_0x1c = 0; diff --git a/src/Z2AudioLib/Z2Audience.cpp b/src/Z2AudioLib/Z2Audience.cpp index 46b7107473..5e8522701b 100644 --- a/src/Z2AudioLib/Z2Audience.cpp +++ b/src/Z2AudioLib/Z2Audience.cpp @@ -454,7 +454,7 @@ f32 Z2SpotMic::calcMicVolume(f32 param_0, int camID, f32 param_2) { JUT_ASSERT(687, camID >= 0); JUT_ASSERT(688, camID < 1); - if (mMicOn == NULL) { + if (mMicOn == false) { return param_2; } diff --git a/src/Z2AudioLib/Z2Creature.cpp b/src/Z2AudioLib/Z2Creature.cpp index e02d1abcd5..14b0d31023 100644 --- a/src/Z2AudioLib/Z2Creature.cpp +++ b/src/Z2AudioLib/Z2Creature.cpp @@ -718,11 +718,11 @@ void Z2SoundObjBeeGroup::playBeeGroupSound(JAISoundID soundID, u8 param_1) { Z2SoundHandlePool* handle1 = startLevelSound((u32)soundID, 0, -1); Z2SoundHandlePool* handle2 = startLevelSound(sound_id2, 0, -1); - if (handle1 != NULL && *handle1 != NULL) { + if (handle1 != NULL && *handle1 != false) { f32 volume = Z2Calc::linearTransform(param_1, 1.0f, 5.0f, 0.5f, 1.0f, false); (*handle1)->getAuxiliary().moveVolume(volume, 0); } - if (handle2 != NULL && *handle2 != NULL) { + if (handle2 != NULL && *handle2 != false) { f32 volume = Z2Calc::linearTransform(param_1, 1.0f, 20.0f, 0.1f, 1.0f, false); (*handle2)->getAuxiliary().moveVolume(volume, 0); } @@ -924,28 +924,28 @@ Z2SoundHandlePool* Z2CreatureOI::startCreatureSoundLevel(JAISoundID soundID, u32 f32 pitch = Z2Calc::getParamByExp(mapinfo, 0.0f, 42.0f, 0.4f, 0.9f, 1.1f, Z2Calc::CURVE_POSITIVE); - if (handle1 != NULL && *handle1 != NULL) { + if (handle1 != NULL && *handle1 != false) { (*handle1)->getAuxiliary().moveVolume(volume, 0); (*handle1)->getAuxiliary().movePitch(pitch, 0); } else { return NULL; } - if (handle2 != NULL && *handle2 != NULL) { + if (handle2 != NULL && *handle2 != false) { (*handle2)->getAuxiliary().moveVolume(volume, 0); (*handle2)->getAuxiliary().movePitch(pitch, 0); } else { return NULL; } - if (handle3 != NULL && *handle3 != NULL) { + if (handle3 != NULL && *handle3 != false) { (*handle3)->getAuxiliary().moveVolume(volume, 0); (*handle3)->getAuxiliary().movePitch(pitch, 0); } else { return NULL; } - if (handle4 != NULL && *handle4 != NULL) { + if (handle4 != NULL && *handle4 != false) { (*handle4)->getAuxiliary().moveVolume(volume, 0); (*handle4)->getAuxiliary().movePitch(pitch, 0); return handle4; @@ -979,7 +979,7 @@ Z2SoundHandlePool* Z2CreatureOI::startTentacleSoundLevel(JAISoundID soundID, u8 } static void Z2_E_sw_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) { - if (handle != NULL && *handle != NULL) { + if (handle != NULL && *handle != false) { f32 pitch = 1.0f; switch (mapinfo) { case 1: @@ -994,7 +994,7 @@ static void Z2_E_sw_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) { } static void Z2_E_ms_modVol(Z2SoundHandlePool* handle, u32 mapinfo) { - if (handle != NULL && *handle != NULL) { + if (handle != NULL && *handle != false) { f32 var_f31 = 0.2f; if (mapinfo == 1) { (*handle)->getAuxiliary().moveVolume(var_f31, 0); @@ -1003,7 +1003,7 @@ static void Z2_E_ms_modVol(Z2SoundHandlePool* handle, u32 mapinfo) { } static void Z2_E_mm_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) { - if (handle != NULL && *handle != NULL) { + if (handle != NULL && *handle != false) { f32 var_f31 = 0.7f; if (mapinfo == 3) { (*handle)->getAuxiliary().movePitch(var_f31, 0); @@ -1012,7 +1012,7 @@ static void Z2_E_mm_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) { } static void Z2_B_zan_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) { - if (handle != NULL && *handle != NULL) { + if (handle != NULL && *handle != false) { f32 pitch = 1.0f; f32 volume = 1.0f; if (mapinfo > 400) { diff --git a/src/Z2AudioLib/Z2SoundObject.cpp b/src/Z2AudioLib/Z2SoundObject.cpp index a3b8b4c88a..69b0dc3bad 100644 --- a/src/Z2AudioLib/Z2SoundObject.cpp +++ b/src/Z2AudioLib/Z2SoundObject.cpp @@ -164,7 +164,7 @@ Z2SoundHandlePool* Z2SoundObjBase::startLevelSound(JAISoundID soundID, u32 mapin if (handle != NULL) { soundStarter_->startSound(soundID, handle, pos_, mapinfo, fxMix, 1.0f, 1.0f, -1.0f, -1.0f, 0); - if (handle != NULL && (*handle) != NULL) { + if (handle != NULL && (*handle) != false) { (*handle)->setLifeTime(1, false); #if PLATFORM_WII || PLATFORM_SHIELD @@ -210,7 +210,7 @@ Z2SoundHandlePool* Z2SoundObjBase::startCollisionSE(u32 hitID, u32 mapinfo, Z2So } Z2SoundHandlePool* handle = Z2SoundObjBase::startSound(JAISoundID(hitID), mapinfo, -1); - if (handle != NULL && (*handle) != NULL) { + if (handle != NULL && (*handle) != false) { (*handle)->setUserData(mapinfo); if (30 <= mapinfo && mapinfo <= 52) { Z2Audible* audible = (Z2Audible*)(*handle)->getAudible(); @@ -251,7 +251,7 @@ Z2SoundHandlePool* Z2DopplerSoundObjBase::startSound(JAISoundID soundID, u32 map pos_ = NULL; Z2SoundHandlePool* handle = Z2SoundObjBase::startSound(soundID, mapinfo, reverb); - if (pos != NULL && handle != NULL && (*handle) != NULL) { + if (pos != NULL && handle != NULL && (*handle) != false) { if ((*handle)->acceptsNewAudible()) { (*handle)->newAudible(*pos, &field_0x20, 0, NULL); } @@ -266,7 +266,7 @@ Z2SoundHandlePool* Z2DopplerSoundObjBase::startLevelSound(JAISoundID soundID, u3 pos_ = NULL; Z2SoundHandlePool* handle = Z2SoundObjBase::startLevelSound(soundID, mapinfo, reverb); - if (pos != NULL && handle != NULL && (*handle) != NULL) { + if (pos != NULL && handle != NULL && (*handle) != false) { if ((*handle)->acceptsNewAudible()) { (*handle)->newAudible(*pos, &field_0x20, 0, NULL); } @@ -285,7 +285,7 @@ void Z2SoundObjSimple::init(Vec* posPtr, u8 handleNum) { Z2SoundHandlePool* Z2SoundObjSimple::startSound(JAISoundID soundID, u32 mapinfo, s8 reverb) { Z2SoundHandlePool* handle = Z2SoundObjBase::startSound(soundID, mapinfo, reverb); - if (soundID == Z2SE_AL_UKI_POKOPOKO && handle != NULL && (*handle) != NULL) { + if (soundID == Z2SE_AL_UKI_POKOPOKO && handle != NULL && (*handle) != false) { f32 volume = Z2Calc::getParamByExp((f32)mapinfo, 0.0f, 127.0f, 0.2f, 0.4f, 1.0f, Z2Calc::CURVE_POSITIVE); f32 pitch = Z2Calc::getParamByExp((f32)mapinfo, 0.0f, 127.0f, 0.2f, 0.6f, 1.2f, Z2Calc::CURVE_POSITIVE); (*handle)->getAuxiliary().movePitch(pitch, 0); @@ -298,7 +298,7 @@ Z2SoundHandlePool* Z2SoundObjSimple::startSound(JAISoundID soundID, u32 mapinfo, Z2SoundHandlePool* Z2SoundObjSimple::startLevelSound(JAISoundID soundID, u32 mapinfo, s8 reverb) { Z2SoundHandlePool* handle = Z2SoundObjBase::startLevelSound(soundID, mapinfo, reverb); - if (handle != NULL && (*handle) != NULL) { + if (handle != NULL && (*handle) != false) { f32 pitch = 1.0f; f32 volume = 1.0f; switch (soundID) { @@ -502,7 +502,7 @@ void Z2SoundObjAnime::startSoundInner(const JGeometry::TVec3& pos, f32 para u32 id = getSoundID(animationSound, pos, param_1); if (!Z2GetSeMgr()->isSoundCulling(id)) { JAISoundHandle* handle = getHandleUserData(user_data); - if (handle != NULL && (*handle) != NULL && (*handle)->getAnimationState() != 1) { + if (handle != NULL && (*handle) != false && (*handle)->getAnimationState() != 1) { handle = NULL; } @@ -514,7 +514,7 @@ void Z2SoundObjAnime::startSoundInner(const JGeometry::TVec3& pos, f32 para bool result = soundStarter->startSound(id, handle, &pos, mapinfo, (f32)reverb / 127.0f, animationSound->field_0x0c, (f32)animationSound->field_0x14 / 127.0f, -1.0f, -1.0f, 0); - if ((*handle) != NULL) { + if ((*handle) != false) { (*handle)->setAnimationState(1); (*handle)->setUserData(user_data); if (animationSound->setsLifeTime()) { diff --git a/src/c/c_dylink.cpp b/src/c/c_dylink.cpp index a9e023318b..2d47e2df7a 100644 --- a/src/c/c_dylink.cpp +++ b/src/c/c_dylink.cpp @@ -916,7 +916,7 @@ BOOL cCc_Check() { BOOL rt = TRUE; for (int i = 0; i < ARRAY_SIZEU(DynamicNameTable); i++) { uintptr_t ptr = (uintptr_t)DMC[i]; - if (ptr != NULL) { + if (ptr != 0) { u32 ptr_hi_byte = ptr >> 0x18; if (ptr_hi_byte < 0x80 || ptr_hi_byte > 0x83) { // "cCc_Check invalid pointer detected" diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index aed6026b10..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; 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 66441fb197..d47c4c9c3c 100644 --- a/src/d/actor/d_a_door_shutter.cpp +++ b/src/d/actor/d_a_door_shutter.cpp @@ -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 a62958bca3..b3d1a7b26e 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(i_actor)->mAction == ACTION_ARROW_FIRE && fabsf(static_cast(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_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 c2d2d8b489..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; } @@ -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_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_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_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 0eef1094f7..2991eaa6e6 100644 --- a/src/d/actor/d_a_npc_henna.cpp +++ b/src/d/actor/d_a_npc_henna.cpp @@ -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_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_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_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 ba04932225..c1fe5f439b 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 9c2c816d37..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) { 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_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/d_bg_s.cpp b/src/d/d_bg_s.cpp index 190e2badc9..7295126a6b 100644 --- a/src/d/d_bg_s.cpp +++ b/src/d/d_bg_s.cpp @@ -712,7 +712,7 @@ void dBgS::MoveBgMatrixCrrPos(cBgS_PolyInfo const& i_poly, bool param_1, cXyz* i void dBgS_MoveBGProc_Typical(dBgW* i_bgw, void* i_actor_ptr, cBgS_PolyInfo const& i_poly, bool param_3, cXyz* i_pos, csXyz* i_angle, csXyz* i_shapeAngle) { Mtx m; - if (i_bgw->GetOldInvMtx(m) != NULL) { + if (i_bgw->GetOldInvMtx(m) != 0) { cXyz move_old; MTXMultVec(m, i_pos, &move_old); diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp index 8ce17ecc83..d724fb65ed 100644 --- a/src/d/d_camera.cpp +++ b/src/d/d_camera.cpp @@ -10131,7 +10131,7 @@ bool dCamera_c::eventCamera(s32 param_0) { } int* sp90_i; - if (getEvStringData(sp90, "Trim", "DEFAULT") != NULL) { + if (getEvStringData(sp90, "Trim", "DEFAULT") != false) { sp90_i = (int*)sp90; if (*sp90_i == 'STAN') { mEventData.field_0x1c = 0; diff --git a/src/d/d_ev_camera.cpp b/src/d/d_ev_camera.cpp index aef250cae0..444a9be213 100644 --- a/src/d/d_ev_camera.cpp +++ b/src/d/d_ev_camera.cpp @@ -3134,7 +3134,7 @@ bool dCamera_c::useItem1EvCamera() { if (item_p->field_0x20 < item_p->field_0x4) break; - if (data_list[item_p->mType][1].field_0x08 != NULL && item_p->field_0x1c == 0) { + if (data_list[item_p->mType][1].field_0x08 != 0 && item_p->field_0x1c == 0) { item_p->field_0x1c = 1; item_p->field_0x0 = 1; break; diff --git a/src/d/d_kankyo_rain.cpp b/src/d/d_kankyo_rain.cpp index 73e9af07cc..fce7f79a71 100644 --- a/src/d/d_kankyo_rain.cpp +++ b/src/d/d_kankyo_rain.cpp @@ -2540,9 +2540,9 @@ void dKyr_drawSun(Mtx drawMtx, cXyz* ppos, GXColor& unused, u8** tex) { color_reg0.b = 0; f32 size = 8000.0f; - if (strcmp(dComIfGp_getStartStageName(), "F_SP127") == NULL) { + if (strcmp(dComIfGp_getStartStageName(), "F_SP127") == 0) { size = 11000.0f; - } else if (strcmp(dComIfGp_getStartStageName(), "F_SP200") == NULL) { + } else if (strcmp(dComIfGp_getStartStageName(), "F_SP200") == 0) { size = 10000.0f; } diff --git a/src/d/d_menu_item_explain.cpp b/src/d/d_menu_item_explain.cpp index a6cb9a456a..7119ef3e03 100644 --- a/src/d/d_menu_item_explain.cpp +++ b/src/d/d_menu_item_explain.cpp @@ -290,7 +290,7 @@ void dMenu_ItemExplain_c::move() { if (status != mStatus) { (this->*init_process[mStatus])(); } - if (mStatus != NULL) { + if (mStatus != 0) { mpInfoScreen->animation(); } if (g_ringHIO.mItemDescAlpha != mDescAlpha) { diff --git a/src/d/d_menu_option.cpp b/src/d/d_menu_option.cpp index ac3dbd949b..cc34f26938 100644 --- a/src/d/d_menu_option.cpp +++ b/src/d/d_menu_option.cpp @@ -1484,12 +1484,12 @@ void dMenu_Option_c::screenSet() { } } for (int i = 0; i < 6; i++) { - if (let2_n[i] != NULL) { + if (let2_n[i] != 0) { mpMenuPane3[i] = new CPaneMgr(mpClipScreen, let2_n[i], 0, NULL); } else { mpMenuPane3[i] = NULL; } - if (menu3_n[i] != NULL) { + if (menu3_n[i] != 0) { mpMenuPane32[i] = new CPaneMgr(mpClipScreen, menu3_n[i], 0, NULL); } else { mpMenuPane32[i] = NULL; @@ -1720,7 +1720,7 @@ void dMenu_Option_c::screenSet() { field_0x1c0[i] = 0; } for (int i = 0; i < 3; i++) { - if (z_tx[i] != NULL) { + if (z_tx[i] != 0) { mpZButtonText[i] = new CPaneMgr(mpBackScreen, z_tx[i], 2, NULL); } else { mpZButtonText[i] = NULL; diff --git a/src/d/d_particle.cpp b/src/d/d_particle.cpp index 002323e476..0a169d2546 100644 --- a/src/d/d_particle.cpp +++ b/src/d/d_particle.cpp @@ -1602,7 +1602,7 @@ s32 dPa_control_c::getPolyColor(cBgS_PolyInfo& param_0, int param_1, _GXColor* p return 0; } - if (param_1 == NULL) { + if (param_1 == 0) { dKy_pol_eff_prim_get(¶m_0, param_2); dKy_pol_eff_env_get(¶m_0, param_3); *param_4 = dKy_pol_eff_alpha_get(¶m_0); diff --git a/src/d/d_resorce.cpp b/src/d/d_resorce.cpp index fe2b2e37ef..40c94e7e51 100644 --- a/src/d/d_resorce.cpp +++ b/src/d/d_resorce.cpp @@ -54,7 +54,7 @@ int dRes_info_c::set(char const* i_arcName, char const* i_path, u8 i_mountDirect JUT_ASSERT(120, strlen(i_arcName) <= NAME_MAX); #endif - if (*i_path != NULL) { + if (*i_path != '\0') { char path[40]; snprintf(path, sizeof(path), "%s%s.arc", i_path, i_arcName); mDMCommand = mDoDvdThd_mountArchive_c::create(path, i_mountDirection, i_heap); diff --git a/src/d/d_s_play.cpp b/src/d/d_s_play.cpp index 69512ffea2..1e4636c457 100644 --- a/src/d/d_s_play.cpp +++ b/src/d/d_s_play.cpp @@ -554,7 +554,7 @@ static int phase_3(dScnPly_c* i_this) { return cPhs_INIT_e; } - if (!i_this->field_0x1d0 == NULL && !i_this->field_0x1d0->sync()) { + if (i_this->field_0x1d0 != NULL && !i_this->field_0x1d0->sync()) { return cPhs_INIT_e; } diff --git a/src/d/d_s_room.cpp b/src/d/d_s_room.cpp index 1adb5a43f1..cf3bb7c93b 100644 --- a/src/d/d_s_room.cpp +++ b/src/d/d_s_room.cpp @@ -329,7 +329,7 @@ static int phase_1(room_of_scene_class* i_this) { } else { stage_stag_info_class* stagInfo = dComIfGp_getStage()->getStagInfo(); - if (dStage_staginfo_GetArchiveHeap(stagInfo) != NULL) { + if (dStage_staginfo_GetArchiveHeap(stagInfo) != FALSE) { heap = mDoExt_getArchiveHeap(); } } diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp index 4fdbd71a44..cd0fcd0958 100644 --- a/src/d/d_stage.cpp +++ b/src/d/d_stage.cpp @@ -2725,7 +2725,7 @@ void dStage_Delete() { OS_REPORT("dStage_Delete\n"); char* demoArcName = dStage_roomControl_c::getDemoArcName(); - if (*demoArcName != NULL) { + if (*demoArcName != '\0') { dComIfG_deleteObjectResMain(demoArcName); } diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp index a71ed9a42c..cb9dc7fb80 100644 --- a/src/m_Do/m_Do_ext.cpp +++ b/src/m_Do/m_Do_ext.cpp @@ -3713,7 +3713,7 @@ J3DModel* mDoExt_J3DModel__create(J3DModelData* i_modelData, u32 i_modelFlag, u3 bool hasSharedDlistObj = i_modelData->getMaterialNodePointer(0)->getSharedDisplayListObj() != NULL; // Update the modelFlag if the model data passed in has a shared dlist object - if (hasSharedDlistObj != NULL) { + if (hasSharedDlistObj != false) { if (i_modelData->isLocked()) { i_modelFlag = J3DMdlFlag_UseSharedDL; } else if (i_modelFlag == J3DMdlFlag_UseSharedDL) {