diff options
| author | Max Roncace <me@caseif.net> | 2025-12-06 16:34:47 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-06 13:34:47 -0800 |
| commit | a30e617e5a9b8264053788429a587ee1763eae73 (patch) | |
| tree | d4f3dbf04e754e5741ba35b1ba1083851be87597 /src/d | |
| parent | 9f1a6488512209cc1acc612aa390e9a4686037ca (diff) | |
Various debug conditional compilation cleanup (#2915)
* Global: Define DEBUG as 0 if not already defined
* Clean up DEBUG-guarded code
Diffstat (limited to 'src/d')
168 files changed, 619 insertions, 689 deletions
diff --git a/src/d/actor/d_a_alink.cpp b/src/d/actor/d_a_alink.cpp index 55ee845a30..fe0f981f1c 100644 --- a/src/d/actor/d_a_alink.cpp +++ b/src/d/actor/d_a_alink.cpp @@ -1690,7 +1690,7 @@ daAlinkHIO_c::daAlinkHIO_c() {} daAlinkHIO_wolf_c::~daAlinkHIO_wolf_c() {} -#ifdef DEBUG +#if DEBUG daAlinkHIO_swim_c::~daAlinkHIO_swim_c() {} daAlinkHIO_grab_c::~daAlinkHIO_grab_c() {} @@ -6573,10 +6573,10 @@ void daAlink_c::commonDoubleAnime(J3DAnmTransform* param_0, J3DAnmTransform* par int daAlink_c::setDoubleAnime(f32 i_blendRate, f32 i_anmSpeedA, f32 i_anmSpeedB, daAlink_c::daAlink_ANM i_anmA, daAlink_c::daAlink_ANM i_anmB, int param_5, f32 i_morf) { -#ifdef DEBUG +#if DEBUG if (checkWolf()) { // "Player is Wolf, but setting Link animation\n" - OSReport("狼なのにリンクアニメ設定\n"); + OS_REPORT("狼なのにリンクアニメ設定\n"); JUT_ASSERT(8591, FALSE); } #endif @@ -10883,7 +10883,7 @@ int daAlink_c::orderZTalk() { dMeter2Info_onUseButton(0x800); if (midnaTalkTrigger() -#ifdef DEBUG +#if DEBUG && (!mDoCPd_c::getHoldL(PAD_1) || !mDoCPd_c::getHoldR(PAD_1)) #endif ) diff --git a/src/d/actor/d_a_alink_HIO.inc b/src/d/actor/d_a_alink_HIO.inc index 45a476364e..5174833128 100644 --- a/src/d/actor/d_a_alink_HIO.inc +++ b/src/d/actor/d_a_alink_HIO.inc @@ -7,7 +7,7 @@ #include "d/actor/d_a_alink.h" #include "d/d_com_inf_game.h" -#ifdef DEBUG +#if DEBUG static void daAlinkHIO_setAnmGenMessage(daAlinkHIO_anm_c* i_anmP, JORMContext* ctx, char* param_3, f32 param_4, int param_5) { diff --git a/src/d/actor/d_a_alink_demo.inc b/src/d/actor/d_a_alink_demo.inc index 8892cf5fd8..f524aada1d 100644 --- a/src/d/actor/d_a_alink_demo.inc +++ b/src/d/actor/d_a_alink_demo.inc @@ -2145,7 +2145,7 @@ int daAlink_c::procCoGetItem() { } daItemBase_c* item_partner_p = (daItemBase_c*)fopAcM_getItemEventPartner(this); -#ifdef DEBUG +#if DEBUG if (item_partner_p != NULL && fopAcM_GetName(item_partner_p) != PROC_ITEM && fopAcM_GetName(item_partner_p) != PROC_Demo_Item) { @@ -3603,7 +3603,7 @@ int daAlink_c::procNotUseItem() { if (mProcVar3.field_0x300e != 0) { daItemBase_c* item_partner_p = (daItemBase_c*)fopAcM_getItemEventPartner(this); -#ifdef DEBUG +#if DEBUG if (item_partner_p != NULL && fopAcM_GetName(item_partner_p) != PROC_ITEM && fopAcM_GetName(item_partner_p) != PROC_Demo_Item) { diff --git a/src/d/actor/d_a_andsw.cpp b/src/d/actor/d_a_andsw.cpp index 50bdb3455a..12d93d0b62 100644 --- a/src/d/actor/d_a_andsw.cpp +++ b/src/d/actor/d_a_andsw.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_andsw.h" #include "d/d_procname.h" -#ifdef DEBUG +#if DEBUG daAndsw_HIO_c l_HIO; daAndsw_HIO_c::daAndsw_HIO_c() { @@ -42,7 +42,7 @@ int daAndsw_c::create() { return cPhs_ERROR_e; } -#ifdef DEBUG +#if DEBUG l_HIO.entryHIO("SW監視"); #endif @@ -58,7 +58,7 @@ int daAndsw_c::execute() { if (mTimer == 0) { fopAcM_offSwitch(this,mSwNo); -#ifdef DEBUG +#if DEBUG if (l_HIO.field_0x6 != 0) { OS_REPORT("-- SW監視状態出力 --\n"); OS_REPORT("sw<%d>OFFしました\n", mSwNo); @@ -70,19 +70,20 @@ int daAndsw_c::execute() { OS_REPORT("SW監視:SWOFFしたので処理終わりますSW<%d>\n", mSwNo); } } - } -#ifdef DEBUG - else if (l_HIO.field_0x6 != 0) { - OS_REPORT("sw2<%d>を待っています\n", mSwNo2); - l_HIO.field_0x6 = 0; - } + } else { +#if DEBUG + if (l_HIO.field_0x6 != 0) { + OS_REPORT("sw2<%d>を待っています\n", mSwNo2); + l_HIO.field_0x6 = 0; + } #endif + } return 1; } int daAndsw_c::_delete() { -#ifdef DEBUG +#if DEBUG l_HIO.removeHIO(); #endif return 1; diff --git a/src/d/actor/d_a_b_bh.cpp b/src/d/actor/d_a_b_bh.cpp index 9a21a5755b..bc67ac8799 100644 --- a/src/d/actor/d_a_b_bh.cpp +++ b/src/d/actor/d_a_b_bh.cpp @@ -53,7 +53,7 @@ daB_BH_HIO_c::daB_BH_HIO_c() { down_revive_time = 250; } -#ifdef DEBUG +#if DEBUG void daB_BH_HIO_c::genMessage(JORMContext* ctx) { ctx->genLabel(" ボスデグババ手", 0x80000001, 0, NULL, 0xFFFF, 0xFFFF, 512, 24); ctx->genSlider("本体サイズ", &model_size, 0.0f, 5.0f, 0, NULL, 0xFFFF, 0xFFFF, 512, 24); @@ -962,17 +962,12 @@ static void damage_check(b_bh_class* i_this) { if (i_this->field_0xa24 != 0) { i_this->mCcSph.OffCoSetBit(); - if (fpcM_Search(s_b_sub, i_this) -#ifdef DEBUG - || mDoCPd_c::getTrigA(PAD_3) -#endif - ) - { + if (fpcM_Search(s_b_sub, i_this) || (DEBUG && mDoCPd_c::getTrigA(PAD_3))) { if (i_this->field_0xa25 != 0) { i_this->mAction = ACTION_B_BOMB_EAT; dComIfGs_onOneZoneSwitch(14, -1); } else { -#ifdef DEBUG +#if DEBUG if (mDoCPd_c::getTrigA(PAD_3)) { b_bq_class* var_r25 = (b_bq_class*)fopAcM_SearchByID(a_this->parentActorID); var_r25->field_0x6fd = 1; diff --git a/src/d/actor/d_a_b_bq.cpp b/src/d/actor/d_a_b_bq.cpp index f8737b9570..50ec729841 100644 --- a/src/d/actor/d_a_b_bq.cpp +++ b/src/d/actor/d_a_b_bq.cpp @@ -564,7 +564,7 @@ static void b_bq_wait(b_bq_class* i_this) { i_this->mSound.startCreatureVoice(Z2SE_EN_BQ_V_WAIT, -1); } -#ifdef DEBUG +#if DEBUG if (mDoCPd_c::getTrigRight(PAD_1)) { i_this->mAction = ACTION_END; i_this->mMode = 0; diff --git a/src/d/actor/d_a_b_dr.cpp b/src/d/actor/d_a_b_dr.cpp index b5dad17e5e..0a46a17e15 100644 --- a/src/d/actor/d_a_b_dr.cpp +++ b/src/d/actor/d_a_b_dr.cpp @@ -360,7 +360,7 @@ int daB_DR_c::draw() { return 1; } -#ifdef DEBUG +#if DEBUG if (WREG_S(0) != 0 || l_HIO.display_range) { cXyz sp24; cXyz sp18; @@ -1247,7 +1247,7 @@ void daB_DR_c::executeWait() { cXyz sp20; cXyz sp14; -#ifdef DEBUG +#if DEBUG dDbVw_Report(30, 100, "wait tyuu No Attack Timer:%d ", mTimer[2]); #endif @@ -1311,7 +1311,7 @@ void daB_DR_c::executeFlyWait() { fopAc_ac_c* player = dComIfGp_getPlayer(0); cXyz sp8; -#ifdef DEBUG +#if DEBUG if (mMoveMode > 1) { if (mTimer[2] != 0) { dDbVw_Report(30, 100, "wait tyuu No Attack Timer:%d ", mTimer[2]); @@ -1383,7 +1383,7 @@ void daB_DR_c::executeTailHit() { cXyz mae; cXyz ato; -#ifdef DEBUG +#if DEBUG if (mTimer[0] != 0) { if (mMoveMode < 13) { dDbVw_Report(30, 100, "Tail Hit chance Timer:%d ", mTimer[0]); @@ -1734,7 +1734,7 @@ void daB_DR_c::executeWeekHit() { daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); cXyz sp50; -#ifdef DEBUG +#if DEBUG if (mTimer[2] != 0) { dDbVw_Report(30, 100, "week HIT chance Timer:%d ", mTimer[2]); } @@ -2133,7 +2133,7 @@ void daB_DR_c::executeBreathAttack() { s16 spA = 0; bool sp8 = false; -#ifdef DEBUG +#if DEBUG if (mTimer[3] != 0) { if (mMoveMode < 100) { dDbVw_Report(30, 100, "Breath tyuu No Attack Timer:%d ", mTimer[3]); @@ -2366,7 +2366,7 @@ void daB_DR_c::executeWindAttack() { bool sp8 = 0; -#ifdef DEBUG +#if DEBUG dDbVw_Report(30, 100, "normal Timer:%d center Timer:%d ", mTimer[1], mTimer[2]); #endif @@ -2900,7 +2900,7 @@ void daB_DR_c::executePillarSearch() { } void daB_DR_c::executePillarWait() { -#ifdef DEBUG +#if DEBUG dDbVw_Report(30, 100, "Pole wait tyuu Timer:%d ", mTimer[0]); if (mTimer[1] != 0) { dDbVw_Report(30, 100, "sukosi zensin :%d ", mTimer[1]); diff --git a/src/d/actor/d_a_b_gm.cpp b/src/d/actor/d_a_b_gm.cpp index 274b17c1c5..c7b21c7e9e 100644 --- a/src/d/actor/d_a_b_gm.cpp +++ b/src/d/actor/d_a_b_gm.cpp @@ -171,8 +171,7 @@ static daB_GM_HIO_c l_HIO; static int daB_GM_Draw(b_gm_class* i_this) { fopAc_ac_c* a_this = (fopAc_ac_c*)i_this; - #ifdef DEBUG - # else + #if !DEBUG g_env_light.settingTevStruct(0, &a_this->current.pos, &a_this->tevStr); #endif @@ -187,7 +186,7 @@ static int daB_GM_Draw(b_gm_class* i_this) { } J3DModel* model = i_this->mpModelMorf->getModel(); - #ifdef DEBUG + #if DEBUG g_env_light.settingTevStruct(0, &a_this->current.pos, &a_this->tevStr); #endif g_env_light.setLightTevColorType_MAJI(model, &a_this->tevStr); @@ -1618,7 +1617,7 @@ static int daB_GM_Execute(b_gm_class* i_this) { fopAc_ac_c* player = dComIfGp_getPlayer(0); cXyz spD4, spC8; - #ifdef DEBUG + #if DEBUG if (mDoCPd_c::getTrigA(2) && i_this->mDemoMode == 0 && !i_this->mIsDisappear) { i_this->mAction = 0xB; i_this->mMode = 0x14; diff --git a/src/d/actor/d_a_b_gnd.cpp b/src/d/actor/d_a_b_gnd.cpp index 819bd88b85..0ada4dd212 100644 --- a/src/d/actor/d_a_b_gnd.cpp +++ b/src/d/actor/d_a_b_gnd.cpp @@ -2525,7 +2525,7 @@ static void action(b_gnd_class* i_this) { i_this->field_0xc7d = 0; } -#ifdef DEBUG +#if DEBUG if (mDoCPd_c::getTrigR(PAD_2)) { dScnKy_env_light_c* kankyo = dKy_getEnvlight(); kankyo->wether = 1; diff --git a/src/d/actor/d_a_b_ob.cpp b/src/d/actor/d_a_b_ob.cpp index 4c104b494d..32220b7988 100644 --- a/src/d/actor/d_a_b_ob.cpp +++ b/src/d/actor/d_a_b_ob.cpp @@ -416,7 +416,7 @@ static void core_start(b_ob_class* i_this) { } break; case 1: -#ifdef DEBUG +#if DEBUG if (mDoCPd_c::getTrigY(PAD_2)) { i_this->mMode = 2; i_this->mDemoAction = 30; diff --git a/src/d/actor/d_a_bd.cpp b/src/d/actor/d_a_bd.cpp index 430ddc32a4..92ad841bb3 100644 --- a/src/d/actor/d_a_bd.cpp +++ b/src/d/actor/d_a_bd.cpp @@ -68,7 +68,7 @@ daBd_HIO_c::daBd_HIO_c() { field_0x1E = 0; } -#ifdef DEBUG +#if DEBUG /* daBd_HIO_c::genMessage (JORMContext *) */ void daBd_HIO_c::genMessage(JORMContext* mctx) { mctx->genLabel("小鳥", 0x80000001, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); diff --git a/src/d/actor/d_a_bg.cpp b/src/d/actor/d_a_bg.cpp index 2df6dde570..d69d589785 100644 --- a/src/d/actor/d_a_bg.cpp +++ b/src/d/actor/d_a_bg.cpp @@ -399,7 +399,7 @@ int daBg_c::draw() { break; } -#ifdef DEBUG +#if DEBUG sp50.a = 0xFF; if (g_kankyoHIO.navy.fish_pond_colreg_adjust_ON) { sp50 = g_kankyoHIO.navy.fish_pond_colreg_c0; diff --git a/src/d/actor/d_a_canoe.cpp b/src/d/actor/d_a_canoe.cpp index 2847607a5d..93e8359fdb 100644 --- a/src/d/actor/d_a_canoe.cpp +++ b/src/d/actor/d_a_canoe.cpp @@ -15,7 +15,7 @@ #include "JSystem/JAudio2/JAUSectionHeap.h" #include "Z2AudioLib/Z2Instances.h" -#ifdef DEBUG +#if DEBUG static BOOL l_debugMode; #endif @@ -616,7 +616,7 @@ int daCanoe_c::execute() { mOldFrontPos = mFrontPos; mOldBackPos = mBackPos; -#ifdef DEBUG +#if DEBUG if (player->checkCanoeRideOwn(this) && daAlink_c::checkDebugMoveInput()) { if (l_debugMode) { l_debugMode = FALSE; diff --git a/src/d/actor/d_a_coach_2D.cpp b/src/d/actor/d_a_coach_2D.cpp index c6ca933a7c..2cf5d224a0 100644 --- a/src/d/actor/d_a_coach_2D.cpp +++ b/src/d/actor/d_a_coach_2D.cpp @@ -156,7 +156,7 @@ int daCoach2D_c::create() { return cPhs_ERROR_e; } -#ifdef DEBUG +#if DEBUG l_HOSTIO.entryHIO("馬車アイコン"); #endif } @@ -166,7 +166,7 @@ int daCoach2D_c::create() { int daCoach2D_c::destroy() { dComIfG_resDelete(this, l_arcName); -#ifdef DEBUG +#if DEBUG l_HOSTIO.removeHIO(); #endif @@ -186,7 +186,7 @@ int daCoach2D_c::draw() { } int daCoach2D_c::execute() { -#ifdef DEBUG +#if DEBUG s32 freeSize = mDoExt_getCurrentHeap()->getTotalFreeSize(); #endif diff --git a/src/d/actor/d_a_demo00.cpp b/src/d/actor/d_a_demo00.cpp index f5cab16b26..3b611f5bba 100644 --- a/src/d/actor/d_a_demo00.cpp +++ b/src/d/actor/d_a_demo00.cpp @@ -18,7 +18,7 @@ #include "Z2AudioLib/Z2Instances.h" #include "m_Do/m_Do_lib.h" #include "d/actor/d_a_movie_player.h" -#ifdef DEBUG +#if DEBUG #include "d/d_debug_viewer.h" #endif @@ -40,7 +40,7 @@ static UnknownLightData l_lightData = { 0x00000000, }; -#ifndef DEBUG +#if !DEBUG // TODO: what is this? static const u8 lit_3727[0xC] = {}; #endif @@ -113,7 +113,7 @@ void daDemo00_c::setBaseMtx() { if (tevStr.mInitTimer == 1) { field_0x574 = shape_angle; - #ifdef DEBUG + #if DEBUG debug_field_0x570 = current.pos; debug_field_0x57c = shape_angle; #endif @@ -388,7 +388,7 @@ int daDemo00_c::createHeap() { return 0; } - #ifdef DEBUG + #if DEBUG mModel.field_0x5d4->getBaseTRMtx()[0][0] = 1.0f; #endif mModel.field_0x5d4->calc(); @@ -1725,7 +1725,7 @@ int daDemo00_c::draw() { } } - #ifdef DEBUG + #if DEBUG if (field_0x6aa > -1) { dDbVw_Report(0x32, 0x91, "DEMOTOOL ERR : Model ga arunoni hisyakai sindo meirei!!!!"); OSReport_Error("\nDEMOTOOL ERR : Model ga arunoni hisyakai sindo meirei!!!!"); @@ -1754,7 +1754,7 @@ int daDemo00_c::draw() { g_env_light.mDemoAttentionPoint = -1.0f; } - #ifdef DEBUG + #if DEBUG dDbVw_Report(300, 0x19, "DEMO Depth %f", g_env_light.mDemoAttentionPoint); #endif } else { @@ -1769,7 +1769,7 @@ int daDemo00_c::draw() { g_env_light.field_0x1278 = 1.0f; } - #ifdef DEBUG + #if DEBUG dDbVw_Report(10, 0x17C, "\nbloom pat[%d] ratio[%f]", g_env_light.field_0x1278, field_0x6ab); #endif } diff --git a/src/d/actor/d_a_demo_item.cpp b/src/d/actor/d_a_demo_item.cpp index 25807e3dea..4e6b70d020 100644 --- a/src/d/actor/d_a_demo_item.cpp +++ b/src/d/actor/d_a_demo_item.cpp @@ -20,7 +20,7 @@ static cXyz l_wolf_offset = cXyz(13.0f, 135.0f, 57.0f); static cXyz l_horse_offset = cXyz(0.0f, 20.0f, 54.0f); -#ifdef DEBUG +#if DEBUG class DitemHIO_c : public mDoHIO_entry_c diff --git a/src/d/actor/d_a_e_df.cpp b/src/d/actor/d_a_e_df.cpp index ea86c9a9ff..b6623e996e 100644 --- a/src/d/actor/d_a_e_df.cpp +++ b/src/d/actor/d_a_e_df.cpp @@ -23,7 +23,7 @@ public: STATIC_ASSERT(sizeof(daE_DF_HIO_c) == 0xC); -#ifdef DEBUG +#if DEBUG inline void daE_DF_HIO_c::genMessage(JORMContext* i_ctx) { i_ctx->genLabel("デクレシア", 0x80000001, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); i_ctx->genSlider("速度", &field_0x8, 0.0f, 100.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); diff --git a/src/d/actor/d_a_e_fm.cpp b/src/d/actor/d_a_e_fm.cpp index 382e1dc932..12695a2e6c 100644 --- a/src/d/actor/d_a_e_fm.cpp +++ b/src/d/actor/d_a_e_fm.cpp @@ -2581,7 +2581,7 @@ static void action(e_fm_class* i_this) { i_this->mAngleToPlayer = fopAcM_searchPlayerAngleY(actor); -#ifdef DEBUG +#if DEBUG if (mDoCPd_c::getTrigStart(PAD_2) && i_this->mAction != ACTION_DOWN) { i_this->mAction = ACTION_DOWN; i_this->mMode = 0; diff --git a/src/d/actor/d_a_e_mb.cpp b/src/d/actor/d_a_e_mb.cpp index 3b016fceea..1e1ba54ce3 100644 --- a/src/d/actor/d_a_e_mb.cpp +++ b/src/d/actor/d_a_e_mb.cpp @@ -47,7 +47,7 @@ daE_MB_HIO_c::daE_MB_HIO_c() { reappear_time = 70; } -#ifdef DEBUG +#if DEBUG void daE_MB_HIO_c::genMessage(JORMContext* ctx) { ctx->genLabel(" ボス戦ブーメラン猿", 0x80000001, 0, NULL, 0xFFFF, 0xFFFF, 512, 24); ctx->genSlider("基本サイズ", &base_size, 0.0f, 5.0f, 0, NULL, 0xFFFF, 0xFFFF, 512, 24); diff --git a/src/d/actor/d_a_e_nz.cpp b/src/d/actor/d_a_e_nz.cpp index d1bc0f0533..123fe49ff4 100644 --- a/src/d/actor/d_a_e_nz.cpp +++ b/src/d/actor/d_a_e_nz.cpp @@ -68,7 +68,7 @@ daE_NZ_HIO_c::daE_NZ_HIO_c() { mVanishingAlphaSpeed = 30.0f; } -#ifdef DEBUG +#if DEBUG void daE_NZ_HIO_c::genMessage(JORMContext* ctx) { // Ghost Rat ctx->genLabel(" 幽霊ネズミ", 0x80000001, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); diff --git a/src/d/actor/d_a_e_pz.cpp b/src/d/actor/d_a_e_pz.cpp index d8876d0974..0a73eadb50 100644 --- a/src/d/actor/d_a_e_pz.cpp +++ b/src/d/actor/d_a_e_pz.cpp @@ -89,7 +89,6 @@ int daE_PZ_c::draw() { } if (arg0 == 10) { -#ifdef DEBUG if (WREG_S(0) != 0) { GXColor color; color.r = 0xFF; @@ -98,7 +97,6 @@ int daE_PZ_c::draw() { color.a = 0xFA; dDbVw_drawCircleXlu(home.pos, 100.0f, color, TRUE, 12); } -#endif return 1; } diff --git a/src/d/actor/d_a_e_wb.cpp b/src/d/actor/d_a_e_wb.cpp index 78d3e7d45a..2d3a5b6045 100644 --- a/src/d/actor/d_a_e_wb.cpp +++ b/src/d/actor/d_a_e_wb.cpp @@ -82,7 +82,7 @@ daE_WB_HIO_c::daE_WB_HIO_c() { mNoReins = 0; } -#ifdef DEBUG +#if DEBUG void daE_WB_HIO_c::genMessage(JORMContext* ctx) { ctx->genLabel(" イノシシ", 0x80000001, 0, NULL, 0xFFFF, 0xFFFF, 512, 24); ctx->genSlider("基本サイズ", &base_size, 0.0f, 5.0f, 0, NULL, 0xFFFF, 0xFFFF, 512, 24); diff --git a/src/d/actor/d_a_e_ww.cpp b/src/d/actor/d_a_e_ww.cpp index 107fcb863f..fb53e66cfa 100644 --- a/src/d/actor/d_a_e_ww.cpp +++ b/src/d/actor/d_a_e_ww.cpp @@ -163,7 +163,7 @@ daE_WW_HIO_c::daE_WW_HIO_c() { move_range_debug_display = 0; } -#ifdef DEBUG +#if DEBUG void daE_WW_HIO_c::genMessage(JORMContext* mctx) { mctx->genLabel("ホワイトウルフォス", 0x80000001, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); mctx->genSlider("モデルサイズ", &model_size, 0.0f, 10.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); @@ -245,7 +245,7 @@ void daE_WW_c::setHeadAngle() { int daE_WW_c::draw() { if (mAction == ACTION_MASTER) { - #ifdef DEBUG + #if DEBUG if (l_HIO.move_range_debug_display != 0) { cXyz curr_pos = current.pos; curr_pos.y += 100.0f; diff --git a/src/d/actor/d_a_e_yd.cpp b/src/d/actor/d_a_e_yd.cpp index 8915a350eb..6bf2590e6a 100644 --- a/src/d/actor/d_a_e_yd.cpp +++ b/src/d/actor/d_a_e_yd.cpp @@ -942,7 +942,7 @@ static void kuki_ha_set(e_yd_class* i_this) { mDoMtx_stack_c::YrotM(rot->y); mDoMtx_stack_c::XrotM(rot->x); mDoMtx_stack_c::ZrotM(i << 13); -#ifdef DEBUG +#if DEBUG if (i_this->actor.current.pos.x == 1.0f && i_this->actor.current.pos.y == 1.0f && i_this->actor.current.pos.z == 1.0f) { diff --git a/src/d/actor/d_a_e_yh.cpp b/src/d/actor/d_a_e_yh.cpp index 7294aacb8f..a583fb29d7 100644 --- a/src/d/actor/d_a_e_yh.cpp +++ b/src/d/actor/d_a_e_yh.cpp @@ -36,7 +36,7 @@ daE_YH_HIO_c::daE_YH_HIO_c() { mAttackFreq = 30; } -#ifdef DEBUG +#if DEBUG void daE_YH_HIO_c::genMessage(JORMContext* ctx) { ctx->genLabel(" デグババ", 0x80000001, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); ctx->genSlider("基本サイズ", &mBasicSize, 0.0f, 5.0f, 0, NULL, 0xffff, 0xffff, 0x200, diff --git a/src/d/actor/d_a_e_yk.cpp b/src/d/actor/d_a_e_yk.cpp index afab19879f..11e9670cdf 100644 --- a/src/d/actor/d_a_e_yk.cpp +++ b/src/d/actor/d_a_e_yk.cpp @@ -57,7 +57,7 @@ static u8 data_80807EF8; static daE_YK_HIO_c l_HIO; -#ifdef DEBUG +#if DEBUG void daE_YK_HIO_c::genMessage(JORMContext* ctx) { ctx->genLabel("闇キース", 0x80000001, 0, NULL, 0xFFFF, 0xFFFF, 512, 24); ctx->genSlider("基本サイズ", &mModelScale, 0.0f, 3.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x512, 24); diff --git a/src/d/actor/d_a_e_ym.cpp b/src/d/actor/d_a_e_ym.cpp index 4ac0bf2da6..c96dc6865e 100644 --- a/src/d/actor/d_a_e_ym.cpp +++ b/src/d/actor/d_a_e_ym.cpp @@ -929,9 +929,7 @@ void daE_YM_c::executeDown() { } else { gravity = 0.0f; } -#if DEBUG - OSReport("YM executeDown %d %f %f \n", gnd_cross, current.pos.z, mMode); -#endif + OS_REPORT("YM executeDown %d %f %f \n", gnd_cross, current.pos.z, mMode); field_0x6cf = 0; switch (mMode) { case 0: @@ -3355,10 +3353,8 @@ int daE_YM_c::create() { field_0x6a3 = (current.angle.x & 0xff00) >> 8; if (mSwitchBit != 0xFF && dComIfGs_isSwitch(mSwitchBit, fopAcM_GetRoomNo(this))) { -#ifdef DEBUG // E_YM won't reset because it's already been defeated. - OSReport("E_YM やられ後なので再セットしません\n"); -#endif + OS_REPORT("E_YM やられ後なので再セットしません\n"); return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_e_zh.cpp b/src/d/actor/d_a_e_zh.cpp index 997517f4be..5cb4c8fcea 100644 --- a/src/d/actor/d_a_e_zh.cpp +++ b/src/d/actor/d_a_e_zh.cpp @@ -224,7 +224,7 @@ int daE_ZH_c::draw() { return 1; } - #ifdef DEBUG + #if DEBUG mBgc.DrawWall(dComIfG_Bgsp()); #endif @@ -1069,7 +1069,7 @@ void daE_ZH_c::executeOpenStart() { break; } - #ifdef DEBUG + #if DEBUG if (ZREG_S(0) == 0) { break; } diff --git a/src/d/actor/d_a_e_zm.cpp b/src/d/actor/d_a_e_zm.cpp index 8c62cfbeea..b2024a8620 100644 --- a/src/d/actor/d_a_e_zm.cpp +++ b/src/d/actor/d_a_e_zm.cpp @@ -949,12 +949,10 @@ cPhs__Step daE_ZM_c::create() { attention_info.distances[fopAc_attn_BATTLE_e] = 0; fopAcM_SetGroup(this, 0); - #ifdef DEBUG if (NREG_S(0) != 0) { fopAcM_SetMin(this, -20000.0f, -10000.0f, -10000.0f); fopAcM_SetMax(this, 20000.0f, 10000.0f, 10000.0f); } - #endif bitSw = 0xFF; bitSw2 = 0xFF; diff --git a/src/d/actor/d_a_horse.cpp b/src/d/actor/d_a_horse.cpp index 797f4adfcc..ffca6690cd 100644 --- a/src/d/actor/d_a_horse.cpp +++ b/src/d/actor/d_a_horse.cpp @@ -560,6 +560,8 @@ BOOL daHorse_c::checkEnding() { #if DEBUG int l_debugMode; +#else +#define l_debugMode 0 #endif extern int g_horsePosInit; @@ -610,9 +612,7 @@ int daHorse_c::create() { m_offRideFlg = &daHorse_c::offRideFlgSubstance; if (daAlink_getAlinkActorClass()->checkHorseStart() || checkStateFlg0(FLG0_UNK_8000) || -#if DEBUG - g_horsePosInit || -#endif + (DEBUG && g_horsePosInit) || strcmp(dComIfGs_getHorseRestartStageName(), "") == 0 /* dSv_event_flag_c::M_002 - Cutscene - [cutscene: 2] Met with Ilia (brings horse to spring) */ @@ -4301,6 +4301,7 @@ int daHorse_c::execute() { l_debugMode = 1; } } +#endif if (l_debugMode) { f32 f31 = 50.0f; @@ -4318,140 +4319,136 @@ int daHorse_c::execute() { setMatrix(); m_model->calc(); setBodyPart(); - } else { // unsure of the best way to handle this jump -#endif + } else { + animePlay(); + checkDemoAction(); - animePlay(); - checkDemoAction(); + (this->*m_proc)(); - (this->*m_proc)(); + cXyz old_pos(current.pos); + f32 old_speedF = speedF; + speedF *= cM_scos(shape_angle.x); - cXyz old_pos(current.pos); - f32 old_speedF = speedF; - speedF *= cM_scos(shape_angle.x); + if (m_procID == PROC_JUMP_e) { + fopAcM_posMoveF(this, NULL); + } else { + fopAcM_posMoveF(this, m_cc_stts.GetCCMoveP()); + if (m_cc_stts.GetCCMoveP()->abs() > 0.0001f) { + s16 old_shape_y = shape_angle.y; + s16 old_angle_y = current.angle.y; + + for (int i = 0; i < 8; i++) { + if (checkHorseNoMove(1) == 2) { + current.pos -= *m_cc_stts.GetCCMoveP(); + break; + } - if (m_procID == PROC_JUMP_e) { - fopAcM_posMoveF(this, NULL); - } else { - fopAcM_posMoveF(this, m_cc_stts.GetCCMoveP()); - if (m_cc_stts.GetCCMoveP()->abs() > 0.0001f) { - s16 old_shape_y = shape_angle.y; - s16 old_angle_y = current.angle.y; - - for (int i = 0; i < 8; i++) { - if (checkHorseNoMove(1) == 2) { - current.pos -= *m_cc_stts.GetCCMoveP(); - break; + shape_angle.y += (s16)0x2000; + current.angle.y = shape_angle.y; } - shape_angle.y += (s16)0x2000; - current.angle.y = shape_angle.y; + shape_angle.y = old_shape_y; + current.angle.y = old_angle_y; } - - shape_angle.y = old_shape_y; - current.angle.y = old_angle_y; } - } - speedF = old_speedF; + speedF = old_speedF; - m_cc_stts.ClrCcMove(); - f32 old_speed_y = speed.y; + m_cc_stts.ClrCcMove(); + f32 old_speed_y = speed.y; - bgCheck(); - m_acch.CrrPos(dComIfG_Bgsp()); + bgCheck(); + m_acch.CrrPos(dComIfG_Bgsp()); - if (checkStateFlg0(FLG0_UNK_4000)) { - autoGroundHit(); - } else { - current.pos.y = old_pos.y; - speed.y = 0.0f; - } + if (checkStateFlg0(FLG0_UNK_4000)) { + autoGroundHit(); + } else { + current.pos.y = old_pos.y; + speed.y = 0.0f; + } - if (m_procID == PROC_TOOL_DEMO_e) { - J3DTransformInfo sp70; - m_mtxcalc->getAnm(0)->getTransform(0, &sp70); + if (m_procID == PROC_TOOL_DEMO_e) { + J3DTransformInfo sp70; + m_mtxcalc->getAnm(0)->getTransform(0, &sp70); - mDoMtx_stack_c::transS(old_pos); - mDoMtx_stack_c::YrotM(shape_angle.y); + mDoMtx_stack_c::transS(old_pos); + mDoMtx_stack_c::YrotM(shape_angle.y); - Vec sp54 = {0.0f, 0.0f, 0.0f}; - sp54.x = sp70.mTranslate.x; - f32 f28 = sp70.mTranslate.z; - sp54.z = f28; + Vec sp54 = {0.0f, 0.0f, 0.0f}; + sp54.x = sp70.mTranslate.x; + f32 f28 = sp70.mTranslate.z; + sp54.z = f28; - mDoMtx_stack_c::multVec(&sp54, ¤t.pos); - if (field_0x1730 != 0 && -G_CM3D_F_INF != m_acch.GetGroundH()) { - current.pos.y = m_acch.GetGroundH(); + mDoMtx_stack_c::multVec(&sp54, ¤t.pos); + if (field_0x1730 != 0 && -G_CM3D_F_INF != m_acch.GetGroundH()) { + current.pos.y = m_acch.GetGroundH(); + } + } else if (m_procID == PROC_JUMP_e) { + speed.y = old_speed_y; } - } else if (m_procID == PROC_JUMP_e) { - speed.y = old_speed_y; - } - if (checkStateFlg0(FLG0_UNK_1) && m_acch.ChkGroundHit() && checkStateFlg0(FLG0_UNK_2)) { - if (!checkStateFlg0(FLG0_UNK_1000)) { - dComIfGp_getVibration().StartQuake(VIBMODE_S_DOKUTT, 1, cXyz(0.0f, 1.0f, 0.0f)); - onStateFlg0(FLG0_UNK_1000); + if (checkStateFlg0(FLG0_UNK_1) && m_acch.ChkGroundHit() && checkStateFlg0(FLG0_UNK_2)) { + if (!checkStateFlg0(FLG0_UNK_1000)) { + dComIfGp_getVibration().StartQuake(VIBMODE_S_DOKUTT, 1, cXyz(0.0f, 1.0f, 0.0f)); + onStateFlg0(FLG0_UNK_1000); + } + } else if (checkStateFlg0(FLG0_UNK_1000)) { + dComIfGp_getVibration().StopQuake(0x1F); + offStateFlg0(FLG0_UNK_1000); } - } else if (checkStateFlg0(FLG0_UNK_1000)) { - dComIfGp_getVibration().StopQuake(0x1F); - offStateFlg0(FLG0_UNK_1000); - } - setRoomInfo(0); - setMatrix(); - footBgCheck(); - setTailAngle(); + setRoomInfo(0); + setMatrix(); + footBgCheck(); + setTailAngle(); - m_model->calc(); - setBodyPart(); + m_model->calc(); + setBodyPart(); - if (m_procID == PROC_TOOL_DEMO_e) { - cXyz sp48; - mDoMtx_multVec(m_model->getAnmMtx(0), &cXyz::BaseX, &sp48); - field_0x170e = cM_atan2s(-sp48.x, -sp48.z); - } else { - field_0x170e = shape_angle.y; - } + if (m_procID == PROC_TOOL_DEMO_e) { + cXyz sp48; + mDoMtx_multVec(m_model->getAnmMtx(0), &cXyz::BaseX, &sp48); + field_0x170e = cM_atan2s(-sp48.x, -sp48.z); + } else { + field_0x170e = shape_angle.y; + } - cXyz sp3C; - cXyz sp30; - mDoMtx_multVecZero(m_model->getAnmMtx(0xB), &sp3C); - mDoMtx_multVecZero(m_model->getAnmMtx(0x14), &sp30); - sp30 -= sp3C; + cXyz sp3C; + cXyz sp30; + mDoMtx_multVecZero(m_model->getAnmMtx(0xB), &sp3C); + mDoMtx_multVecZero(m_model->getAnmMtx(0x14), &sp30); + sp30 -= sp3C; - field_0x1712 = sp30.atan2sX_Z() - field_0x170e; - if (field_0x1712 > 0x2000) { - field_0x1712 = 0x2000; - } else if (field_0x1712 < -0x2000) { - field_0x1712 = -0x2000; - } - - if (checkResetStateFlg0(RFLG0_UNK_1)) { - mDoMtx_stack_c::transS(m_bodyEyePos.x, m_bodyEyePos.y, m_bodyEyePos.z); - mDoMtx_stack_c::YrotM(field_0x170e - field_0x1710); - mDoMtx_stack_c::transM(-field_0x17b8.x, -field_0x17b8.y, -field_0x17b8.z); + field_0x1712 = sp30.atan2sX_Z() - field_0x170e; + if (field_0x1712 > 0x2000) { + field_0x1712 = 0x2000; + } else if (field_0x1712 < -0x2000) { + field_0x1712 = -0x2000; + } - daHorseRein_c* rein_p = m_rein; - cXyz* var_r26; - for (int i = 0; i < 3; i++, rein_p++) { - var_r26 = rein_p->field_0x0[0]; - for (int j = 0; j < rein_p->field_0x8[1]; j++, var_r26++) { - mDoMtx_stack_c::multVec(var_r26, var_r26); + if (checkResetStateFlg0(RFLG0_UNK_1)) { + mDoMtx_stack_c::transS(m_bodyEyePos.x, m_bodyEyePos.y, m_bodyEyePos.z); + mDoMtx_stack_c::YrotM(field_0x170e - field_0x1710); + mDoMtx_stack_c::transM(-field_0x17b8.x, -field_0x17b8.y, -field_0x17b8.z); + + daHorseRein_c* rein_p = m_rein; + cXyz* var_r26; + for (int i = 0; i < 3; i++, rein_p++) { + var_r26 = rein_p->field_0x0[0]; + for (int j = 0; j < rein_p->field_0x8[1]; j++, var_r26++) { + mDoMtx_stack_c::multVec(var_r26, var_r26); + } } } - } - field_0x17b8 = m_bodyEyePos; + field_0x17b8 = m_bodyEyePos; - m_sound.framework(m_poly_sound, m_reverb); + m_sound.framework(m_poly_sound, m_reverb); - if (field_0x1144 != NULL) { - m_sound.updateAnime(field_0x1144->getFrame(), field_0x1144->getRate()); - } -#if DEBUG + if (field_0x1144 != NULL) { + m_sound.updateAnime(field_0x1144->getFrame(), field_0x1144->getRate()); + } } -#endif setEffect(); setCollision(); diff --git a/src/d/actor/d_a_kytag14.cpp b/src/d/actor/d_a_kytag14.cpp index 8ac983ac5a..a4d63f187f 100644 --- a/src/d/actor/d_a_kytag14.cpp +++ b/src/d/actor/d_a_kytag14.cpp @@ -60,7 +60,7 @@ static int daKytag14_Execute(kytag14_class* i_this) { if (event1_set == true && event2_unset == true && switch1_set == true && switch2_unset == true) { - #ifdef DEBUG + #if DEBUG if (!g_kankyoHIO.navy.display_save_location) { dDbVw_Report(20, 16, "TAG SavMem STAGE[%s] Room[%d] Lp[%d]", dComIfGp_getStartStageName(), i_this->mSaveRoomNo, i_this->mSavePoint); if (i_this->mSaveRoomNo == -1) { diff --git a/src/d/actor/d_a_npc.cpp b/src/d/actor/d_a_npc.cpp index 97cc372903..e3fa84cd84 100644 --- a/src/d/actor/d_a_npc.cpp +++ b/src/d/actor/d_a_npc.cpp @@ -13,7 +13,7 @@ #include "f_op/f_op_kankyo_mng.h" #include "m_Do/m_Do_lib.h" -#ifdef DEBUG +#if DEBUG void daNpcT_cmnListenPropertyEvent(char* param_0, int* param_1, daNpcT_HIOParam* param_2) { sprintf(¶m_0[*param_1], "%.3ff,\t// 注目オフセット\n", param_2->attention_offset); *param_1 = strlen(param_0); diff --git a/src/d/actor/d_a_npc2.cpp b/src/d/actor/d_a_npc2.cpp index b7b0e12983..778f0c7efe 100644 --- a/src/d/actor/d_a_npc2.cpp +++ b/src/d/actor/d_a_npc2.cpp @@ -754,7 +754,7 @@ int daBaseNpc_moveBgActor_c::MoveBGCreate(char const* i_arcName, int i_dzbId, Mo return cPhs_ERROR_e; } -#ifdef DEBUG +#if DEBUG if (mpBgw != NULL && mpBgw->ChkUsed()) { BOOL isConnect = mDoCPd_c::isConnect(PAD_3); if (isConnect) { diff --git a/src/d/actor/d_a_npc4.cpp b/src/d/actor/d_a_npc4.cpp index 0c2ee96844..6fea49bde1 100644 --- a/src/d/actor/d_a_npc4.cpp +++ b/src/d/actor/d_a_npc4.cpp @@ -447,7 +447,7 @@ void daNpcF_Lookat_c::initCalc(fopAc_ac_c* i_actor, Mtx i_baseTransformMtx, cXyz param_3[i].setall(0); param_3[i].x = -cM_atan2s(local_90.y, local_90.absXZ()); - #ifdef DEBUG + #if DEBUG if (i_debug) { f32 var_f31 = fabsf(cM_ssin(param_3[i].x)); OS_REPORT(">>>>>>>%d: sin(%d):%f\n", i, abs(param_3[i].x), var_f31); @@ -1905,9 +1905,9 @@ BOOL daNpcF_chkDoBtnEqSpeak(fopAc_ac_c* i_actor_p) { if (dComIfGp_getAttention()->LockonTarget(i) == i_actor_p && dComIfGp_getAttention()->getActionBtnB() && (dComIfGp_getAttention()->getActionBtnB()->mType == fopAc_attn_TALK_e -#if DEBUG + #if !PLATFORM_GCN || dComIfGp_getAttention()->getActionBtnB()->mType == fopAc_attn_UNK_4 -#endif + #endif )) { ret = TRUE; diff --git a/src/d/actor/d_a_npc_aru.cpp b/src/d/actor/d_a_npc_aru.cpp index 14b3341b8f..935dc6db6e 100644 --- a/src/d/actor/d_a_npc_aru.cpp +++ b/src/d/actor/d_a_npc_aru.cpp @@ -423,7 +423,7 @@ int daNpc_Aru_c::Draw() { } draw( -#ifdef DEBUG +#if DEBUG chkAction(&daNpc_Aru_c::test), #else FALSE, @@ -2018,11 +2018,8 @@ int daNpc_Aru_c::talk(void* param_1) { return 0; } -#ifdef DEBUG int daNpc_Aru_c::test(void* param_1) { - } -#endif static int daNpc_Aru_Create(void* a_this) { return static_cast<daNpc_Aru_c*>(a_this)->create(); diff --git a/src/d/actor/d_a_npc_bans.cpp b/src/d/actor/d_a_npc_bans.cpp index c107a11d65..59e55c1cf9 100644 --- a/src/d/actor/d_a_npc_bans.cpp +++ b/src/d/actor/d_a_npc_bans.cpp @@ -1824,7 +1824,6 @@ int daNpc_Bans_c::shop(void* param_1) { return 0; } -#if DEBUG int daNpc_Bans_c::test(void* param_1) { int rv = 0; @@ -1848,7 +1847,6 @@ int daNpc_Bans_c::test(void* param_1) { return rv; } -#endif static int daNpc_Bans_Create(void* i_this) { return static_cast<daNpc_Bans_c*>(i_this)->create(); diff --git a/src/d/actor/d_a_npc_besu.cpp b/src/d/actor/d_a_npc_besu.cpp index 2e84caf79c..191ac9a8f3 100644 --- a/src/d/actor/d_a_npc_besu.cpp +++ b/src/d/actor/d_a_npc_besu.cpp @@ -279,7 +279,7 @@ enum Event { /* 0xC */ EVENT_CONVERSATION_ABOUT_ZORA, }; -#ifndef DEBUG +#if !DEBUG #endif @@ -538,7 +538,7 @@ daNpc_Besu_c::~daNpc_Besu_c() { mpCupModelMorf->stopZelAnime(); } -// #ifdef DEBUG +// #if DEBUG // if (field_0xe40 != NULL) { // field_0xe40->removeHIO(); // } @@ -631,7 +631,7 @@ int daNpc_Besu_c::create() { fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); mSound.init(¤t.pos, &eyePos, 3, 1); -// #ifdef DEBUG +// #if DEBUG // field_0xe40 = &l_HIO; // // "Beth": // field_0xe40->entryHIO("ベス"); @@ -1248,14 +1248,14 @@ void daNpc_Besu_c::action() { } if (actor_p != NULL && mType != 5 -#ifndef DEBUG +#if !DEBUG && !chkNurse() #endif ) { mStagger.setParam(this, actor_p, mCurAngle.y); setDamage(0, 0xC, 0x12); // FIXME: Fakematch -#ifdef DEBUG +#if DEBUG mStagger.setPower(0.0f); #else for (int i = 0; i < 2; i++) { @@ -1268,7 +1268,7 @@ void daNpc_Besu_c::action() { if (mStagger.checkRebirth()) { // FIXME: Fakematch -#ifdef DEBUG +#if DEBUG mStagger.initialize(); #else for (int i = 0; i < 2; i++) { diff --git a/src/d/actor/d_a_npc_chat.cpp b/src/d/actor/d_a_npc_chat.cpp index 5271a16fc1..0fd2cc3734 100644 --- a/src/d/actor/d_a_npc_chat.cpp +++ b/src/d/actor/d_a_npc_chat.cpp @@ -2700,7 +2700,7 @@ cPhs__Step daNpcChat_c::Create() { mSound.init(¤t.pos, &eyePos, 3, 1); mSound.setMdlType(mType, false, mTwilight & 0xFF); - #ifdef DEBUG + #if DEBUG // mHIO = l_HIO; mHIO->entryHIO("多人数会話NPC"); #endif @@ -3065,7 +3065,7 @@ void daNpcChat_c::setParam() { } } - #ifdef DEBUG + #if DEBUG scale.set(daNpcChat_Param_c::m.common.scale, daNpcChat_Param_c::m.common.scale, daNpcChat_Param_c::m.common.scale); mAcchCir.SetWallR(daNpcChat_Param_c::m.common.width); mAcchCir.SetWallH(daNpcChat_Param_c::m.common.knee_length); diff --git a/src/d/actor/d_a_npc_chin.cpp b/src/d/actor/d_a_npc_chin.cpp index ad1c90cf8b..cacfe23527 100644 --- a/src/d/actor/d_a_npc_chin.cpp +++ b/src/d/actor/d_a_npc_chin.cpp @@ -284,7 +284,7 @@ int daNpcChin_c::Create() { mpHIO = &l_HIO; // "W Hook Shot Shop" mpHIO->entryHIO("Wフックショット屋"); -#endif + #endif mAcchCir.SetWall(mpHIO->m.common.width, mpHIO->m.common.knee_length); diff --git a/src/d/actor/d_a_npc_df.cpp b/src/d/actor/d_a_npc_df.cpp index 01d043abc6..00c3eb5fdf 100644 --- a/src/d/actor/d_a_npc_df.cpp +++ b/src/d/actor/d_a_npc_df.cpp @@ -11,6 +11,12 @@ #include "d/actor/d_a_npc_henna.h" #include "Z2AudioLib/Z2Instances.h" +#if DEBUG +#define NPC_DF_HEAP_SIZE 0x4B000 +#else +#define NPC_DF_HEAP_SIZE 0x3B90 +#endif + static int daNpc_Df_Draw(npc_df_class* i_this) { fopAc_ac_c* actor = (fopAc_ac_c*)&i_this->actor; df_s* df_p = i_this->mDfs; @@ -369,13 +375,7 @@ static cPhs__Step daNpc_Df_Create(fopAc_ac_c* i_this) { OS_REPORT("NPC_DF//////////////NPC_DF SET 1 !!\n"); - if ( - #if DEBUG - !fopAcM_entrySolidHeap(i_this, useHeapInit, 0x4B000) - #else - !fopAcM_entrySolidHeap(i_this, useHeapInit, 0x3B90) - #endif - ) { + if (!fopAcM_entrySolidHeap(i_this, useHeapInit, NPC_DF_HEAP_SIZE)) { OS_REPORT("//////////////NPC_DF SET NON !!\n"); return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_npc_doc.cpp b/src/d/actor/d_a_npc_doc.cpp index 063d741c84..0bf2359a43 100644 --- a/src/d/actor/d_a_npc_doc.cpp +++ b/src/d/actor/d_a_npc_doc.cpp @@ -274,11 +274,14 @@ int daNpc_Doc_c::Draw() { mdlData_p->getMaterialNodePointer(getEyeballMaterialNo())->setMaterialAnm(mpMatAnm[0]); } - #if DEBUG - return draw(chkAction(&daNpc_Doc_c::test), FALSE, mRealShadowSize, NULL, 100.0f, FALSE, FALSE, FALSE); - #else - return draw(FALSE, FALSE, mRealShadowSize, NULL, 100.0f, FALSE, FALSE, FALSE); - #endif + return draw( +#if DEBUG + chkAction(&daNpc_Doc_c::test), +#else + FALSE, +#endif + FALSE, mRealShadowSize, NULL, 100.0f, FALSE, FALSE, FALSE + ); } int daNpc_Doc_c::createHeapCallBack(fopAc_ac_c* i_this) { @@ -827,6 +830,10 @@ int daNpc_Doc_c::talk(void* param_0) { return 0; } +int daNpc_Doc_c::test(void* i_this) { + // DEBUG NONMATCHING +} + static int daNpc_Doc_Create(void* i_this) { return ((daNpc_Doc_c*)i_this)->create(); } diff --git a/src/d/actor/d_a_npc_doorboy.cpp b/src/d/actor/d_a_npc_doorboy.cpp index aeb2a1c8c8..66d5c726a5 100644 --- a/src/d/actor/d_a_npc_doorboy.cpp +++ b/src/d/actor/d_a_npc_doorboy.cpp @@ -834,7 +834,7 @@ void daNpcDoorBoy_c::setAttnPos() { sp28.y = current.pos.y; field_0xc98.SetC(sp28); - #ifdef DEBUG + #if DEBUG field_0xc98.SetH(daNpcDoorBoy_Param_c::m.common.height); field_0xc98.SetR(daNpcDoorBoy_Param_c::m.common.width); #endif diff --git a/src/d/actor/d_a_npc_fairy.cpp b/src/d/actor/d_a_npc_fairy.cpp index 93f40b34e0..be4f8be689 100644 --- a/src/d/actor/d_a_npc_fairy.cpp +++ b/src/d/actor/d_a_npc_fairy.cpp @@ -1239,7 +1239,6 @@ int daNpc_Fairy_c::talk(int param_1) { return 1; } -#if DEBUG int daNpc_Fairy_c::test(int param_1) { int rv = 0; @@ -1263,7 +1262,6 @@ int daNpc_Fairy_c::test(int param_1) { return rv; } -#endif void daNpc_Fairy_c::AppearDemoCall() { if (mType == TYPE_50F) { diff --git a/src/d/actor/d_a_npc_fguard.cpp b/src/d/actor/d_a_npc_fguard.cpp index 3c3805dc17..0f58c48228 100644 --- a/src/d/actor/d_a_npc_fguard.cpp +++ b/src/d/actor/d_a_npc_fguard.cpp @@ -147,7 +147,7 @@ void daNpcFgd_c::checkGroundHeight() { } void daNpcFgd_c::setCollision() { - #ifdef DEBUG + #if DEBUG mCyl.SetR(Cd2_HIO_cylR(m_type)); mCyl.SetH(Cd2_HIO_cylH(m_type)); #endif diff --git a/src/d/actor/d_a_npc_grmc.cpp b/src/d/actor/d_a_npc_grmc.cpp index 4b43840afe..621dc26fe3 100644 --- a/src/d/actor/d_a_npc_grmc.cpp +++ b/src/d/actor/d_a_npc_grmc.cpp @@ -320,7 +320,7 @@ int daNpc_grMC_c::Execute() { int daNpc_grMC_c::Draw() { return draw( - #ifdef DEBUG + #if DEBUG chkAction(&daNpc_grMC_c::test), #else FALSE, @@ -737,7 +737,6 @@ int daNpc_grMC_c::shop(void* param_1) { return 0; } -#ifdef DEBUG int daNpc_grMC_c::test(void* param_1) { int rv = 0; @@ -749,8 +748,8 @@ int daNpc_grMC_c::test(void* param_1) { mMode = 2; // fallthrough case 2: - mFaceMotionSeqMngr.setNo(mHIO->param.common.face_expression, -1.0f, FALSE, 0); - mMotionSeqMngr.setNo(mHIO->param.common.motion, -1.0f, FALSE, 0); + mFaceMotionSeqMngr.setNo(mHIO->m.common.face_expression, -1.0f, FALSE, 0); + mMotionSeqMngr.setNo(mHIO->m.common.motion, -1.0f, FALSE, 0); mJntAnm.lookNone(0); attention_info.flags = 0; break; @@ -761,7 +760,6 @@ int daNpc_grMC_c::test(void* param_1) { return rv; } -#endif static int daNpc_grMC_Create(void* a_this) { return static_cast<daNpc_grMC_c*>(a_this)->create(); diff --git a/src/d/actor/d_a_npc_grr.cpp b/src/d/actor/d_a_npc_grr.cpp index 1e203b485f..c2619aa657 100644 --- a/src/d/actor/d_a_npc_grr.cpp +++ b/src/d/actor/d_a_npc_grr.cpp @@ -215,7 +215,7 @@ daNpc_grR_c::~daNpc_grR_c() { mAnm_p->stopZelAnime(); } - #ifdef DEBUG + #if DEBUG if (mHIO != NULL) { mHIO->removeHIO(); } diff --git a/src/d/actor/d_a_npc_grs.cpp b/src/d/actor/d_a_npc_grs.cpp index fbc4aea70a..f8beca273e 100644 --- a/src/d/actor/d_a_npc_grs.cpp +++ b/src/d/actor/d_a_npc_grs.cpp @@ -335,11 +335,7 @@ int daNpc_grS_c::ctrlJointCallBack(J3DJoint* i_joint, int param_1) { void daNpc_grS_c::setParam() { actionFunc oldAction = mpNextActionFn; -#if DEBUG - u32 flags = 0x42; -#else - u32 flags = 0xa; -#endif + u32 flags = fopAc_AttnFlag_TALK_e | fopAc_AttnFlag_SPEAK_e; selectAction(); diff --git a/src/d/actor/d_a_npc_guard.cpp b/src/d/actor/d_a_npc_guard.cpp index 1a282ca486..813ca5e215 100644 --- a/src/d/actor/d_a_npc_guard.cpp +++ b/src/d/actor/d_a_npc_guard.cpp @@ -528,7 +528,7 @@ static int daNpcGuard_Execute(void* i_this) { } void daNpcGuard_c::setCollision() { -#ifdef DEBUG +#if DEBUG mCyl.SetR(Cd2_HIO_cylR(m_type)); mCyl.SetH(Cd2_HIO_cylH(m_type)); #endif diff --git a/src/d/actor/d_a_npc_hoz.cpp b/src/d/actor/d_a_npc_hoz.cpp index dd342f124e..dd9cd849b5 100644 --- a/src/d/actor/d_a_npc_hoz.cpp +++ b/src/d/actor/d_a_npc_hoz.cpp @@ -396,11 +396,14 @@ int daNpc_Hoz_c::Draw() { modelData->getMaterialNodePointer(getEyeballMaterialNo())->setMaterialAnm(mpMatAnm[0]); } - #if DEBUG - return draw(chkAction(&daNpc_Hoz_c::test), FALSE, daNpc_Hoz_Param_c::m.common.real_shadow_size, NULL, 100.0f, FALSE, FALSE, FALSE); - #else - return draw(FALSE, FALSE, daNpc_Hoz_Param_c::m.common.real_shadow_size, NULL, 100.0f, FALSE, FALSE, FALSE); - #endif + return draw( +#if DEBUG + chkAction(&daNpc_Hoz_c::test), +#else + FALSE, +#endif + FALSE, daNpc_Hoz_Param_c::m.common.real_shadow_size, NULL, 100.0f, FALSE, FALSE, FALSE + ); } int daNpc_Hoz_c::createHeapCallBack(fopAc_ac_c* actor) { @@ -824,6 +827,10 @@ BOOL daNpc_Hoz_c::drawDbgInfo() { return false; } +int daNpc_Hoz_c::test(void* i_this) { + // DEBUG NONMATCHING +} + int daNpc_Hoz_c::selectAction() { field_0xfac = NULL; diff --git a/src/d/actor/d_a_npc_kasi_hana.cpp b/src/d/actor/d_a_npc_kasi_hana.cpp index 0757b6cdb9..7aefa40ac8 100644 --- a/src/d/actor/d_a_npc_kasi_hana.cpp +++ b/src/d/actor/d_a_npc_kasi_hana.cpp @@ -890,7 +890,7 @@ void daNpcKasiHana_c::setAttnPos() { mDoMtx_stack_c::multVecZero(&sp28); sp28.y = current.pos.y; mCyl.SetC(sp28); - #ifdef DEBUG + #if DEBUG mCyl.SetH(mHIO->m.common.height); mCyl.SetR(mHIO->m.common.width); #endif diff --git a/src/d/actor/d_a_npc_kasi_kyu.cpp b/src/d/actor/d_a_npc_kasi_kyu.cpp index 47e87fa936..60c4d24a07 100644 --- a/src/d/actor/d_a_npc_kasi_kyu.cpp +++ b/src/d/actor/d_a_npc_kasi_kyu.cpp @@ -417,7 +417,7 @@ void daNpcKasiKyu_c::setAttnPos() { mDoMtx_stack_c::multVecZero(&sp28); sp28.y = current.pos.y; mCyl.SetC(sp28); - #ifdef DEBUG + #if DEBUG mCyl.SetH(daNpcKasiKyu_Param_c::m.common.height); mCyl.SetR(daNpcKasiKyu_Param_c::m.common.width); #endif diff --git a/src/d/actor/d_a_npc_kasi_mich.cpp b/src/d/actor/d_a_npc_kasi_mich.cpp index 365dcc81cb..d217e50df9 100644 --- a/src/d/actor/d_a_npc_kasi_mich.cpp +++ b/src/d/actor/d_a_npc_kasi_mich.cpp @@ -417,7 +417,7 @@ void daNpcKasiMich_c::setAttnPos() { mDoMtx_stack_c::multVecZero(&sp28); sp28.y = current.pos.y; mCyl.SetC(sp28); - #ifdef DEBUG + #if DEBUG mCyl.SetH(daNpcKasiMich_Param_c::m.common.height); mCyl.SetR(daNpcKasiMich_Param_c::m.common.width); #endif diff --git a/src/d/actor/d_a_npc_kn.cpp b/src/d/actor/d_a_npc_kn.cpp index fd077d36ec..15a9b4e71e 100644 --- a/src/d/actor/d_a_npc_kn.cpp +++ b/src/d/actor/d_a_npc_kn.cpp @@ -4980,7 +4980,7 @@ int daNpc_Kn_c::setSlipPrtcl() { mDoMtx_stack_c::multVecZero(&mParticleMngr[0].mPos); mParticleMngr[0].mPos.y -= 20.0f; mParticleMngr[0].mAngle = current.angle; - #ifdef DEBUG + #if DEBUG mParticleMngr[0].mAngle.y -= (s16) 0x8000; #else mParticleMngr[0].mAngle.y -= 0x8000; @@ -4991,7 +4991,7 @@ int daNpc_Kn_c::setSlipPrtcl() { mDoMtx_stack_c::multVecZero(&mParticleMngr[1].mPos); mParticleMngr[1].mPos.y -= 20.0f; mParticleMngr[1].mAngle = current.angle; - #ifdef DEBUG + #if DEBUG mParticleMngr[1].mAngle.y -= (s16) 0x8000; #else mParticleMngr[1].mAngle.y -= 0x8000; diff --git a/src/d/actor/d_a_npc_kolin.cpp b/src/d/actor/d_a_npc_kolin.cpp index b25da3e05c..5a63a56ad8 100644 --- a/src/d/actor/d_a_npc_kolin.cpp +++ b/src/d/actor/d_a_npc_kolin.cpp @@ -1090,7 +1090,7 @@ void daNpc_Kolin_c::changeBck(int* param_1, int* param_2) { int daNpc_Kolin_c::selectAction() { mNextAction = NULL; -#ifdef DEBUG +#if DEBUG if (daNpc_Kolin_Param_c::m.common.debug_mode_ON) { mNextAction = &daNpc_Kolin_c::test; return 1; diff --git a/src/d/actor/d_a_npc_kolinb.cpp b/src/d/actor/d_a_npc_kolinb.cpp index 488a1bad91..72a428872a 100644 --- a/src/d/actor/d_a_npc_kolinb.cpp +++ b/src/d/actor/d_a_npc_kolinb.cpp @@ -590,7 +590,7 @@ int daNpc_Kolinb_c::drawDbgInfo() { int daNpc_Kolinb_c::selectAction() { mNextAction = NULL; -#ifdef DEBUG +#if DEBUG if (daNpc_Kolinb_Param_c::m.common.debug_mode_ON) { mNextAction = &daNpc_Kolinb_c::test; return 1; diff --git a/src/d/actor/d_a_npc_len.cpp b/src/d/actor/d_a_npc_len.cpp index 7f5f79a424..1a4cf2b58c 100644 --- a/src/d/actor/d_a_npc_len.cpp +++ b/src/d/actor/d_a_npc_len.cpp @@ -608,7 +608,7 @@ void daNpc_Len_c::action() { if (mStagger.checkRebirth()) { // FIXME: Fakematch - same issue in npc_besu -#ifdef DEBUG +#if DEBUG mStagger.initialize(); #else for (int i = 0; i < 2; i++) { diff --git a/src/d/actor/d_a_npc_moir.cpp b/src/d/actor/d_a_npc_moir.cpp index ddd7e999e8..13f879df14 100644 --- a/src/d/actor/d_a_npc_moir.cpp +++ b/src/d/actor/d_a_npc_moir.cpp @@ -1847,7 +1847,7 @@ void daNpcMoiR_c::setParam() { } } - #ifdef DEBUG + #if DEBUG scale.set(mpHIO->m.common.scale, mpHIO->m.common.scale, mpHIO->m.common.scale); mAcchCir.SetWallR(mpHIO->m.common.width); mAcchCir.SetWallH(mpHIO->m.common.knee_length); diff --git a/src/d/actor/d_a_npc_pachi_besu.cpp b/src/d/actor/d_a_npc_pachi_besu.cpp index 385bbdd023..4c78c54d94 100644 --- a/src/d/actor/d_a_npc_pachi_besu.cpp +++ b/src/d/actor/d_a_npc_pachi_besu.cpp @@ -629,7 +629,7 @@ int daNpc_Pachi_Besu_c::Draw() { } return draw( -#ifdef DEBUG +#if DEBUG chkAction(&daNpc_Pachi_Besu_c::test), #else FALSE, @@ -1088,11 +1088,9 @@ BOOL daNpc_Pachi_Besu_c::talk(void* param_1) { return FALSE; } -#ifdef DEBUG BOOL daNpc_Pachi_Besu_c::test(void* param_1) { // DEBUG NONMATCHING } -#endif BOOL daNpc_Pachi_Besu_c::_turn_to_link(s16 param_1) { cXyz pos(*fopAcM_GetPosition_p(daPy_getPlayerActorClass())); diff --git a/src/d/actor/d_a_npc_pachi_maro.cpp b/src/d/actor/d_a_npc_pachi_maro.cpp index f12acc8ed2..f392fc6717 100644 --- a/src/d/actor/d_a_npc_pachi_maro.cpp +++ b/src/d/actor/d_a_npc_pachi_maro.cpp @@ -667,7 +667,7 @@ int daNpc_Pachi_Maro_c::Draw() { } return draw( -#ifdef DEBUG +#if DEBUG chkAction(&daNpc_Pachi_Maro_c::test), #else FALSE, diff --git a/src/d/actor/d_a_npc_pachi_taro.cpp b/src/d/actor/d_a_npc_pachi_taro.cpp index 3e5d7c2a16..8b7c1cc658 100644 --- a/src/d/actor/d_a_npc_pachi_taro.cpp +++ b/src/d/actor/d_a_npc_pachi_taro.cpp @@ -917,7 +917,7 @@ int daNpc_Pachi_Taro_c::Draw() { } return draw( -#ifdef DEBUG +#if DEBUG chkAction(&daNpc_Pachi_Taro_c::test), #else FALSE, diff --git a/src/d/actor/d_a_npc_raca.cpp b/src/d/actor/d_a_npc_raca.cpp index f6b1269912..014c8d4466 100644 --- a/src/d/actor/d_a_npc_raca.cpp +++ b/src/d/actor/d_a_npc_raca.cpp @@ -311,10 +311,10 @@ int daNpc_Raca_c::Draw() { } draw( -#ifdef DEBUG +#if DEBUG chkAction(mAction), #else - 0, + FALSE, #endif FALSE, mRealShadowSize, NULL, 100.0f, FALSE, FALSE, FALSE ); diff --git a/src/d/actor/d_a_npc_saru.cpp b/src/d/actor/d_a_npc_saru.cpp index 49eac2f188..735152b035 100644 --- a/src/d/actor/d_a_npc_saru.cpp +++ b/src/d/actor/d_a_npc_saru.cpp @@ -312,7 +312,7 @@ int daNpc_Saru_c::create() { fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); mSound.init(¤t.pos, &eyePos, 3, 1); - #ifdef DEBUG + #if DEBUG field_0xe90->entryHIO("サル"); // Monkey #endif reset(); @@ -552,7 +552,7 @@ void daNpc_Saru_c::setParam() { } void daNpc_Saru_c::setAfterTalkMotion() { - #ifdef DEBUG + #if DEBUG mFaceMotionSeqMngr.getNo(); #endif mFaceMotionSeqMngr.setNo(FACE_NONE, -1.0f, 0, 0); diff --git a/src/d/actor/d_a_npc_seic.cpp b/src/d/actor/d_a_npc_seic.cpp index b6f10081f2..6c32627cf8 100644 --- a/src/d/actor/d_a_npc_seic.cpp +++ b/src/d/actor/d_a_npc_seic.cpp @@ -61,7 +61,7 @@ daNpc_seiC_c::~daNpc_seiC_c() { mpMorf[0]->stopZelAnime(); } - #ifdef DEBUG + #if DEBUG if (field_0xe40 != NULL) { field_0xe40->removeHIO(); } @@ -137,7 +137,7 @@ int daNpc_seiC_c::create() { fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); mSound.init(¤t.pos, &eyePos, 3, 1); -#ifdef DEBUG +#if DEBUG //field_0xe40->field_0x8 = &l_HIO; field_0xe40->entryHIO("光の精霊c"); // Spirit of Light c #endif diff --git a/src/d/actor/d_a_npc_seid.cpp b/src/d/actor/d_a_npc_seid.cpp index 15cb2ff20e..431cac1c9a 100644 --- a/src/d/actor/d_a_npc_seid.cpp +++ b/src/d/actor/d_a_npc_seid.cpp @@ -61,7 +61,7 @@ daNpc_seiD_c::~daNpc_seiD_c() { mpMorf[0]->stopZelAnime(); } - #ifdef DEBUG + #if DEBUG if (field_0xe40 != NULL) { field_0xe40->removeHIO(); } @@ -137,7 +137,7 @@ int daNpc_seiD_c::create() { fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); mSound.init(¤t.pos, &eyePos, 3, 1); -#ifdef DEBUG +#if DEBUG //field_0xe40->field_0x8 = &l_HIO; field_0xe40->entryHIO("光の精霊d"); // Spirit of Light d #endif diff --git a/src/d/actor/d_a_npc_taro.cpp b/src/d/actor/d_a_npc_taro.cpp index 3ac9028e85..6d4f42c386 100644 --- a/src/d/actor/d_a_npc_taro.cpp +++ b/src/d/actor/d_a_npc_taro.cpp @@ -245,7 +245,7 @@ daNpc_Taro_c::~daNpc_Taro_c() { mpMorf[0]->stopZelAnime(); } - #ifdef DEBUG + #if DEBUG if (field_0xe40 != NULL) { field_0xe40->removeHIO(); } @@ -300,7 +300,7 @@ int daNpc_Taro_c::create() { mSound.init(¤t.pos, &eyePos, 3, 1); field_0x9c0.init(&mAcch, 0.0f, 0.0f); -#ifdef DEBUG +#if DEBUG // I'm unsure exactly how we're supposed to set + use the param ptr in the debug build... // field_0xe40 = &l_HIO; // field_0xe40->entryHIO("タロ"); @@ -894,7 +894,7 @@ void daNpc_Taro_c::action() { hitActor, mCurAngle.y); setDamage(0, 17, 33); - #ifdef DEBUG + #if DEBUG mStagger.setPower(0.0f); #else for (int i = 0; i < 2; i++) { @@ -906,7 +906,7 @@ void daNpc_Taro_c::action() { mJntAnm.lookNone(1); } if (mStagger.checkRebirth()) { - #ifdef DEBUG + #if DEBUG mStagger.initialize(); #else for (int i = 0; i < 2; i++) { diff --git a/src/d/actor/d_a_npc_tkj2.cpp b/src/d/actor/d_a_npc_tkj2.cpp index 1821b6a827..cdbfadc75b 100644 --- a/src/d/actor/d_a_npc_tkj2.cpp +++ b/src/d/actor/d_a_npc_tkj2.cpp @@ -1099,7 +1099,7 @@ static cPhs__Step daNpc_Tkj2_Create(fopAc_ac_c* a_this) { l_HIO.field_0x4 = -1; } - #ifdef DEBUG + #if DEBUG fopAcM_OnStatus(a_this, 0); #endif diff --git a/src/d/actor/d_a_npc_tks.cpp b/src/d/actor/d_a_npc_tks.cpp index 9ce3e37e5a..ce20c8387b 100644 --- a/src/d/actor/d_a_npc_tks.cpp +++ b/src/d/actor/d_a_npc_tks.cpp @@ -2950,7 +2950,7 @@ void daNpcTks_c::setAttnPos() { if (!fopAcM_checkCarryNow(this)) { if (!field_0x138a) { mCyl.SetC(current.pos); - #ifdef DEBUG + #if DEBUG mCyl.SetH(daNpcTks_Param_c::m.common.height); mCyl.SetR(daNpcTks_Param_c::m.common.width); #endif diff --git a/src/d/actor/d_a_npc_toby.cpp b/src/d/actor/d_a_npc_toby.cpp index 3599d0656e..e8ea58b0be 100644 --- a/src/d/actor/d_a_npc_toby.cpp +++ b/src/d/actor/d_a_npc_toby.cpp @@ -418,9 +418,10 @@ int daNpc_Toby_c::Draw() { #if DEBUG chkAction(&daNpc_Toby_c::test), #else - 0, + FALSE, #endif - 0, mRealShadowSize, NULL, 100.0f, 0, 0, 0); + FALSE, mRealShadowSize, NULL, 100.0f, 0, 0, 0 + ); } int daNpc_Toby_c::createHeapCallBack(fopAc_ac_c* i_this) { @@ -2182,11 +2183,9 @@ int daNpc_Toby_c::talk(void*) { return 0; } -#if DEBUG int daNpc_Toby_c::test(void* param_0) { // TODO } -#endif static int daNpc_Toby_Create(void* i_this) { return static_cast<daNpc_Toby_c*>(i_this)->create(); diff --git a/src/d/actor/d_a_npc_worm.cpp b/src/d/actor/d_a_npc_worm.cpp index 4c59f1667f..cba5eaa209 100644 --- a/src/d/actor/d_a_npc_worm.cpp +++ b/src/d/actor/d_a_npc_worm.cpp @@ -116,7 +116,7 @@ static void npc_worm_normal(npc_worm_class* i_this) { a_this->eventInfo.onCondition(dEvtCnd_40_e); } - #ifndef DEBUG + #if !DEBUG if (i_this->field_0x5e8[1] == 0) { i_this->field_0x5a6 = 2; i_this->field_0x5a8 = 0; diff --git a/src/d/actor/d_a_npc_wrestler.cpp b/src/d/actor/d_a_npc_wrestler.cpp index 236f0f51e6..fe9655e2c3 100644 --- a/src/d/actor/d_a_npc_wrestler.cpp +++ b/src/d/actor/d_a_npc_wrestler.cpp @@ -930,7 +930,7 @@ void daNpcWrestler_c::setAttnPos() { if (chkAction(&daNpcWrestler_c::wait) || chkAction(&daNpcWrestler_c::talk)) { field_0xc90.SetC(sp68); -#ifdef DEBUG +#if DEBUG field_0xc90.SetH(field_0xbdc->field_0x0); field_0xc90.SetR(field_0xbdc->mWallR); #endif @@ -1909,7 +1909,7 @@ bool daNpcWrestler_c::talk(void* param_1) { setAction(&daNpcWrestler_c::gotoArena); } else { int choiceNo = mFlow.getChoiceNo(); -#ifdef DEBUG +#if DEBUG // "Choice %s\n", (choiceNo == 0) ? "Yes" : "No" OS_REPORT("二択分岐 %s\n", (choiceNo == 0) ? "はい" : "いいえ"); #endif @@ -3765,7 +3765,7 @@ bool daNpcWrestler_c::demoSumouReady(void* param_1) { fopAcM_effSmokeSet1(&field_0xde8, &field_0xdec, &sp3c, NULL, 0.8f, &tevStr, 1); } -#ifdef DEBUG +#if DEBUG mDemoCam.field_0x18.set(0.0f, 0.0f, -100.0f); mDoMtx_stack_c::transS(current.pos); mDoMtx_stack_c::YrotM(mCurAngle.y); @@ -3791,7 +3791,7 @@ bool daNpcWrestler_c::demoSumouReady(void* param_1) { break; case 5: -#ifdef DEBUG +#if DEBUG mDemoCam.field_0x18.set(0.0f, 0.0f, -100.0f); mDoMtx_stack_c::transS(current.pos); mDoMtx_stack_c::YrotM(mCurAngle.y); @@ -3852,7 +3852,7 @@ bool daNpcWrestler_c::demoSumouReady(void* param_1) { dComIfGp_getVibration().StartShock(3, 15, cXyz(0.0f, 1.0f, 0.0f)); } -#ifdef DEBUG +#if DEBUG mDoMtx_stack_c::transS(fopAcM_GetPosition(daPy_getPlayerActorClass())); mDoMtx_stack_c::YrotM(fopAcM_GetShapeAngle_p(daPy_getPlayerActorClass())->y); mDoMtx_stack_c::transM(field_0xbd8->field_0xd0); @@ -3878,7 +3878,7 @@ bool daNpcWrestler_c::demoSumouReady(void* param_1) { break; case 9: -#ifdef DEBUG +#if DEBUG mDoMtx_stack_c::transS(fopAcM_GetPosition(daPy_getPlayerActorClass())); mDoMtx_stack_c::YrotM(fopAcM_GetShapeAngle_p(daPy_getPlayerActorClass())->y); mDoMtx_stack_c::transM(field_0xbd8->field_0xdc); @@ -4700,7 +4700,7 @@ BOOL daNpcWrestler_c::EvCut_grDSEntry(int i_cutIndex) { case '0009': if (setTalkAngle() && talkProc(NULL, TRUE, NULL)) { int choice_no = mFlow.getChoiceNo(); -#ifdef DEBUG +#if DEBUG // "Two-way split %s\n", (mFlow.getChoiceNo() == 0) ? "Yes" : "No" OS_REPORT("二択分岐 %s\n", (choice_no == 0) ? "はい" : "いいえ"); #endif @@ -4829,7 +4829,7 @@ BOOL daNpcWrestler_c::EvCut_grDSEntry3_4(int i_cutIndex) { case '0001': if (setTalkAngle() && talkProc(NULL, TRUE, NULL)) { s16 choice_no = mFlow.getChoiceNo(); -#ifdef DEBUG +#if DEBUG char* choice; if (choice_no == 0) { choice = "はい"; diff --git a/src/d/actor/d_a_npc_ykm.cpp b/src/d/actor/d_a_npc_ykm.cpp index 8b620aaa6a..390c94e71e 100644 --- a/src/d/actor/d_a_npc_ykm.cpp +++ b/src/d/actor/d_a_npc_ykm.cpp @@ -776,7 +776,7 @@ int daNpc_ykM_c::Draw() { } rv = draw( - #ifdef DEBUG + #if DEBUG chkAction(&daNpc_ykM_c::test), #else FALSE, @@ -3470,9 +3470,7 @@ BOOL daNpc_ykM_c::race(void* param_1) { angleY = cLib_targetAngleY(&field_0x14fc, &daPy_getPlayerActorClass()->current.pos); if (field_0x1560 < 0 || -#if DEBUG - field_0x1558.field_0x0 >= 0 && -#endif + (!DEBUG || field_0x1558.field_0x0 >= 0) && (field_0x14fc.abs2(daPy_getPlayerActorClass()->current.pos) < 640000.0f && (angleY < -0x4000 || angleY > 0x4000))) { field_0x1560 = -1; mGndChk.SetPos(&daPy_getPlayerActorClass()->current.pos); @@ -3695,7 +3693,6 @@ BOOL daNpc_ykM_c::talk(void* param_1) { return FALSE; } -#ifdef DEBUG BOOL daNpc_ykM_c::test(void* param_1) { int rv = FALSE; switch (mMode) { @@ -3718,7 +3715,6 @@ BOOL daNpc_ykM_c::test(void* param_1) { return rv; } -#endif static int daNpc_ykM_Create(void* i_this) { return ((daNpc_ykM_c*)i_this)->create(); diff --git a/src/d/actor/d_a_npc_ykw.cpp b/src/d/actor/d_a_npc_ykw.cpp index 5b7bcb9274..db9f8bdb69 100644 --- a/src/d/actor/d_a_npc_ykw.cpp +++ b/src/d/actor/d_a_npc_ykw.cpp @@ -452,11 +452,14 @@ int daNpc_ykW_c::Draw() { modelData->getMaterialNodePointer(getEyeballMaterialNo())->setMaterialAnm(mpMatAnm[0]); } + result = draw( #if DEBUG - result = draw(chkAction(NULL), 0, mRealShadowSize, NULL, 100.0f, 0, 0, 0); + chkAction(NULL), #else - result = draw(FALSE, 0, mRealShadowSize, NULL, 100.0f, 0, 0, 0); + FALSE, #endif + 0, mRealShadowSize, NULL, 100.0f, 0, 0, 0 + ); if (field_0x1069 != 0) { fopAc_ac_c* actor = mActorMngrs[3].getActorP(); @@ -2982,7 +2985,6 @@ int daNpc_ykW_c::talk(void* param_0) { return 0; } -#if DEBUG int daNpc_ykW_c::test(void* param_0) { int retval = 0; @@ -3008,7 +3010,6 @@ int daNpc_ykW_c::test(void* param_0) { return retval; } -#endif static int daNpc_ykW_Create(void* i_this) { diff --git a/src/d/actor/d_a_npc_zanb.cpp b/src/d/actor/d_a_npc_zanb.cpp index cd1834497d..03285707f5 100644 --- a/src/d/actor/d_a_npc_zanb.cpp +++ b/src/d/actor/d_a_npc_zanb.cpp @@ -254,11 +254,14 @@ int daNpc_zanB_c::Draw() { mdlData_p->getMaterialNodePointer(getEyeballMaterialNo())->setMaterialAnm(mpMatAnm[0]); } - #if DEBUG - return draw(chkAction(&daNpc_zanB_c::test), FALSE, mRealShadowSize, NULL, 0.0f, TRUE, FALSE, FALSE); - #else - return draw(FALSE, FALSE, mRealShadowSize, NULL, 0.0f, TRUE, FALSE, FALSE); - #endif + return draw( +#if DEBUG + chkAction(&daNpc_zanB_c::test), +#else + FALSE, +#endif + FALSE, mRealShadowSize, NULL, 0.0f, TRUE, FALSE, FALSE + ); } int daNpc_zanB_c::createHeapCallBack(fopAc_ac_c* i_this) { diff --git a/src/d/actor/d_a_npc_zelRo.cpp b/src/d/actor/d_a_npc_zelRo.cpp index 90e2d58dd7..a80d0770bb 100644 --- a/src/d/actor/d_a_npc_zelRo.cpp +++ b/src/d/actor/d_a_npc_zelRo.cpp @@ -251,7 +251,7 @@ int daNpc_ZelRo_c::Draw() { } return draw( -#ifdef DEBUG +#if DEBUG chkAction(&daNpc_ZelRo_c::test), #else FALSE, @@ -626,12 +626,10 @@ int daNpc_ZelRo_c::talk(void* param_1) { return 0; } -#ifdef DEBUG int daNpc_ZelRo_c::test(void* param_1) { int rt = 0; return rt; } -#endif static int daNpc_ZelRo_Create(void* a_this) { return static_cast<daNpc_ZelRo_c*>(a_this)->create(); diff --git a/src/d/actor/d_a_npc_zelda.cpp b/src/d/actor/d_a_npc_zelda.cpp index 79070ef87d..b0f4cab482 100644 --- a/src/d/actor/d_a_npc_zelda.cpp +++ b/src/d/actor/d_a_npc_zelda.cpp @@ -313,11 +313,14 @@ int daNpc_Zelda_c::Draw() { modelData->getMaterialNodePointer(getEyeballRMaterialNo())->setMaterialAnm(mpMatAnm[1]); } + return draw( #if DEBUG - return draw(chkAction(NULL), TRUE, mRealShadowSize, NULL, 100.0f, FALSE, FALSE, FALSE); + chkAction(NULL), #else - return draw(NULL, TRUE, mRealShadowSize, NULL, 100.0f, FALSE, FALSE, FALSE); + FALSE, #endif + TRUE, mRealShadowSize, NULL, 100.0f, FALSE, FALSE, FALSE + ); } int daNpc_Zelda_c::createHeapCallBack(fopAc_ac_c* i_this) { diff --git a/src/d/actor/d_a_obj_Turara.cpp b/src/d/actor/d_a_obj_Turara.cpp index 60ae5611d0..b1fffc09ee 100644 --- a/src/d/actor/d_a_obj_Turara.cpp +++ b/src/d/actor/d_a_obj_Turara.cpp @@ -163,7 +163,7 @@ int daTurara_c::create() { fopAcM_setCullSizeBox2(this, mpModel[field_0x984]->getModelData()); setBaseMtx(); field_0x994 = 1; - #ifdef DEBUG + #if DEBUG l_HIO.entryHIO("つらら"); #endif } diff --git a/src/d/actor/d_a_obj_amiShutter.cpp b/src/d/actor/d_a_obj_amiShutter.cpp index 8d81ca3b03..9eed1d4c4b 100644 --- a/src/d/actor/d_a_obj_amiShutter.cpp +++ b/src/d/actor/d_a_obj_amiShutter.cpp @@ -31,7 +31,7 @@ daAmiShutter_HIO_c::daAmiShutter_HIO_c() { mWaitTime = 0; } -#ifdef DEBUG +#if DEBUG void daAmiShutter_HIO_c::genMessage(JORMContext* i_ctx) { i_ctx->genSlider("open速度", &mMaxOpenSpeed, 0.1f, 1000.0f, 0, NULL, 0xffff, 0xffff, 512, 24); @@ -102,7 +102,7 @@ cPhs__Step daAmiShutter_c::create() { init_modeWait(); } setBaseMtx(); - #ifdef DEBUG + #if DEBUG l_HIO.entryHIO("アミシャッター"); #endif } @@ -263,7 +263,7 @@ int daAmiShutter_c::Draw() { int daAmiShutter_c::Delete() { dComIfG_resDelete(&mPhaseReq, "S_Zami"); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(); #endif diff --git a/src/d/actor/d_a_obj_batta.cpp b/src/d/actor/d_a_obj_batta.cpp index 5ef55edd9d..910f90ac72 100644 --- a/src/d/actor/d_a_obj_batta.cpp +++ b/src/d/actor/d_a_obj_batta.cpp @@ -51,7 +51,7 @@ static bool l_HIOInit; static daObj_BattaHIO_c l_HIO; -#ifdef DEBUG +#if DEBUG void daObj_BattaHIO_c::genMessage(JORMContext* ctx) { // Golden bugs diff --git a/src/d/actor/d_a_obj_bemos.cpp b/src/d/actor/d_a_obj_bemos.cpp index aa68a2a6a5..af4d0ac41c 100644 --- a/src/d/actor/d_a_obj_bemos.cpp +++ b/src/d/actor/d_a_obj_bemos.cpp @@ -38,7 +38,7 @@ s16 const daObjBm_c::M_dir_base[4] = { 0xC000, }; -#ifdef DEBUG +#if DEBUG class daObjBm_HIO_c : public mDoHIO_entry_c { public: daObjBm_HIO_c(); @@ -391,7 +391,7 @@ int daObjBm_c::CreateHeap() { } mpBtkAnm->setFrame(mpBtkAnm->getEndFrame()); -#ifdef DEBUG +#if DEBUG pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, 0x18); JUT_ASSERT(840, pbtk != NULL); #endif @@ -447,8 +447,8 @@ int daObjBm_c::create1st() { return phase_state; } -#ifdef DEBUG OS_REPORT("新ビーモス:0x%x\n", fopAcM_GetParam(this)); +#if DEBUG l_HIO.entryHIO("ビーモス"); #endif } @@ -457,7 +457,7 @@ int daObjBm_c::create1st() { } int daObjBm_c::Execute(Mtx** param_0) { -#ifdef DEBUG +#if DEBUG scale.setall(l_HIO.mBodyScale); mpModel->setBaseScale(scale); daPy_py_c* player = daPy_getPlayerActorClass(); @@ -1727,7 +1727,7 @@ int daObjBm_c::Draw() { return 1; } -#ifdef DEBUG +#if DEBUG void daObjBm_c::debugDraw() { if (l_HIO.mDebugDraw) { GXColor local_4c = { diff --git a/src/d/actor/d_a_obj_carry.cpp b/src/d/actor/d_a_obj_carry.cpp index 13c8980ac9..a572152de7 100644 --- a/src/d/actor/d_a_obj_carry.cpp +++ b/src/d/actor/d_a_obj_carry.cpp @@ -1286,32 +1286,28 @@ int daObjCarry_c::CreateHeap() { int daObjCarry_c::create() { preInit(); -#ifdef DEBUG - if (prm_chk_type_lightball() && strcmp(dComIfGp_getStartStageName(), "T_ENE02") == 0) { - goto next; - } -#endif - - int create_phase; - create_phase = cPhs_NEXT_e; - - switch (mType) { - case TYPE_BALL_S: - create_phase = (cPhs__Step)checkCreate_LightBallA(); - break; - case TYPE_BALL_S_2: - create_phase = (cPhs__Step)checkCreate_LightBallB(); - break; - case TYPE_LV8_BALL: - create_phase = (cPhs__Step)checkCreate_Lv8Ball(); - break; - } + if (!(DEBUG && prm_chk_type_lightball() && + strcmp(dComIfGp_getStartStageName(), "T_ENE02") == 0)) { + int create_phase; + create_phase = cPhs_NEXT_e; + + switch (mType) { + case TYPE_BALL_S: + create_phase = (cPhs__Step)checkCreate_LightBallA(); + break; + case TYPE_BALL_S_2: + create_phase = (cPhs__Step)checkCreate_LightBallB(); + break; + case TYPE_LV8_BALL: + create_phase = (cPhs__Step)checkCreate_Lv8Ball(); + break; + } - if (create_phase != cPhs_NEXT_e) { - return create_phase; + if (create_phase != cPhs_NEXT_e) { + return create_phase; + } } -next: int phase_state = dComIfG_resLoad(&mPhaseReq, getArcName()); if (phase_state == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, CheckCreateHeap, data().m_heapSize)) { @@ -1970,7 +1966,7 @@ int daObjCarry_c::draw() { } void daObjCarry_c::debugDraw() { -#ifdef DEBUG +#if DEBUG if (KREG_S(8) == 10000 && !mRotAxis.isZero()) { cXyz start(current.pos); start.y += 35.0f; diff --git a/src/d/actor/d_a_obj_crvfence.cpp b/src/d/actor/d_a_obj_crvfence.cpp index 3c8b4cf25c..6e7d602dc2 100644 --- a/src/d/actor/d_a_obj_crvfence.cpp +++ b/src/d/actor/d_a_obj_crvfence.cpp @@ -228,7 +228,7 @@ bool daObjCRVFENCE_c::checkViewArea(cXyz* param_1) { bool rv = false; bool bVar1 = false; - #ifdef DEBUG + #if DEBUG if (sp24.x >= 0.0f) { if (sp24.y <= FB_WIDTH) { bVar1 = true; diff --git a/src/d/actor/d_a_obj_damCps.cpp b/src/d/actor/d_a_obj_damCps.cpp index 59f07bf625..2bdbdf644a 100644 --- a/src/d/actor/d_a_obj_damCps.cpp +++ b/src/d/actor/d_a_obj_damCps.cpp @@ -7,7 +7,7 @@ #include "d/actor/d_a_obj_damCps.h" -#ifdef DEBUG +#if DEBUG #include "d/d_debug_viewer.h" static daObjDamCps_HIO_c l_HIO; @@ -210,7 +210,7 @@ extern actor_process_profile_definition g_profile_Obj_DamCps = { 0, // mParameters &g_fopAc_Method.base, // sub_method 629, // mPriority -#ifdef DEBUG +#if DEBUG &l_daObjDamCps_Method, // sub_method #else NULL, // sub_method diff --git a/src/d/actor/d_a_obj_digsnow.cpp b/src/d/actor/d_a_obj_digsnow.cpp index d2b87753d4..318780b5e3 100644 --- a/src/d/actor/d_a_obj_digsnow.cpp +++ b/src/d/actor/d_a_obj_digsnow.cpp @@ -110,7 +110,7 @@ void daObjDigSnow_c::mode_init_dig() { if (gnd_height != -G_CM3D_F_INF) { mGroundHeight = gnd_height; } else { -#ifdef DEBUG +#if DEBUG // "No BG under digsnow!" OS_REPORT_ERROR("掘る雪の下にBGがありません!"); fopAcM_delete(this); diff --git a/src/d/actor/d_a_obj_drop.cpp b/src/d/actor/d_a_obj_drop.cpp index f8bee55fd7..cac20e8ce2 100644 --- a/src/d/actor/d_a_obj_drop.cpp +++ b/src/d/actor/d_a_obj_drop.cpp @@ -19,7 +19,7 @@ #include "d/actor/d_a_e_ymb.h" #include "f_op/f_op_camera_mng.h" -#ifdef DEBUG +#if DEBUG daObjDrop_HIO_c l_HIO; #endif @@ -215,7 +215,7 @@ int daObjDrop_c::modeNoParent() { parentActorID = fopAcM_GetID(pparent); setMode(MODE_PARENT_WAIT_e); } else { -#ifdef DEBUG +#if DEBUG if (!l_HIO.field_0x17) { // "Drop of Light: Waiting for Shadow Insect Creation! SW=%d\n" OS_REPORT("光の雫:闇虫生成待ち!SW=%d\n", getYmSwbit()); diff --git a/src/d/actor/d_a_obj_fallobj.cpp b/src/d/actor/d_a_obj_fallobj.cpp index 0c92f80583..3387a97f3d 100644 --- a/src/d/actor/d_a_obj_fallobj.cpp +++ b/src/d/actor/d_a_obj_fallobj.cpp @@ -11,7 +11,7 @@ #include "d/d_debug_viewer.h" #include "d/d_procname.h" -#ifdef DEBUG +#if DEBUG daObjFallObj_HIO_c::daObjFallObj_HIO_c() { mMovementShake = 0; @@ -120,7 +120,7 @@ int daObjFallObj_c::create1st() { return phase; } - #ifdef DEBUG + #if DEBUG // Falling obj l_HIO.entryHIO("落下OBJ"); #endif @@ -363,7 +363,7 @@ int daObjFallObj_c::Draw() { mDoExt_modelUpdateDL(mpModel); dComIfGd_setList(); - #ifdef DEBUG + #if DEBUG if (l_HIO.mCheckDisplay) { mpBgW->CalcPlane(); daPy_py_c* player = daPy_getPlayerActorClass(); @@ -381,7 +381,7 @@ int daObjFallObj_c::Delete() { mSoundObj.deleteObject(); dComIfG_resDelete(&mPhaseReq, l_arcName); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(); #endif return 1; diff --git a/src/d/actor/d_a_obj_flag2.cpp b/src/d/actor/d_a_obj_flag2.cpp index 5e1c59e499..c7ae1b0070 100644 --- a/src/d/actor/d_a_obj_flag2.cpp +++ b/src/d/actor/d_a_obj_flag2.cpp @@ -13,7 +13,7 @@ #include "d/d_cc_d.h" #include "d/d_com_inf_game.h" -#ifdef DEBUG +#if DEBUG class daObjFlag2_Hio_c : public JORReflexible { public: daObjFlag2_Hio_c() { @@ -329,7 +329,7 @@ void daObjFlag2_c::create_init() { initBaseMtx(); initCollision(); - #ifdef DEBUG + #if DEBUG M_hio.ct(); #endif } @@ -449,7 +449,7 @@ int daObjFlag2_c::execute() { return 1; } - #ifdef DEBUG + #if DEBUG mFlagCloth.setSpringRate(attr().mSpringCoeeficient); mFlagCloth.setWindRate(attr().mWindCoefficient); mFlagCloth.setDecayRate(attr().mDecayRate); @@ -485,7 +485,7 @@ static int daObjFlag2_Delete(daObjFlag2_c* i_this) { } daObjFlag2_c::~daObjFlag2_c() { - #ifdef DEBUG + #if DEBUG M_hio.dt(); #endif diff --git a/src/d/actor/d_a_obj_flag3.cpp b/src/d/actor/d_a_obj_flag3.cpp index 15bb4dd5d3..8f2683aa3a 100644 --- a/src/d/actor/d_a_obj_flag3.cpp +++ b/src/d/actor/d_a_obj_flag3.cpp @@ -352,7 +352,7 @@ int daObjFlag3_c::execute() { return 1; } - #ifdef DEBUG + #if DEBUG mFlagCloth.setSpringRate(attr().mSpringCoeeficient); mFlagCloth.setWindRate(attr().mWindCoefficient); mFlagCloth.setDecayRate(attr().mDecayRate); @@ -408,7 +408,7 @@ static int daObjFlag3_Delete(daObjFlag3_c* i_this) { } daObjFlag3_c::~daObjFlag3_c() { - #ifdef DEBUG + #if DEBUG M_hio.dt(); #endif @@ -445,7 +445,7 @@ void daObjFlag3_c::create_init() { mFlagCloth.setTornado(attr().mTornado); initBaseMtx(); - #ifdef DEBUG + #if DEBUG M_hio.ct(); #endif } diff --git a/src/d/actor/d_a_obj_gomikabe.cpp b/src/d/actor/d_a_obj_gomikabe.cpp index 8caae93b2a..862aaab606 100644 --- a/src/d/actor/d_a_obj_gomikabe.cpp +++ b/src/d/actor/d_a_obj_gomikabe.cpp @@ -18,7 +18,7 @@ daObjGOMIKABE_HIO_c::daObjGOMIKABE_HIO_c() { mId = -1; } -#ifdef DEBUG +#if DEBUG void daObjGOMIKABE_HIO_c::genMessage(JORMContext* ctx) { // Zora Rock ctx->genLabel("ゾーラ岩", 0x80000001, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); diff --git a/src/d/actor/d_a_obj_gpTaru.cpp b/src/d/actor/d_a_obj_gpTaru.cpp index 94ede76333..969073afda 100644 --- a/src/d/actor/d_a_obj_gpTaru.cpp +++ b/src/d/actor/d_a_obj_gpTaru.cpp @@ -125,7 +125,7 @@ int daGpTaru_c::create() { mExplosionRange = 80.0f; field_0x955 = 1; - #ifdef DEBUG + #if DEBUG l_HIO.entryHIO("火薬樽"); #endif } @@ -557,7 +557,7 @@ int daGpTaru_c::Delete() { dKyw_pntwind_cut(&mWind); dComIfG_resDelete(&mPhase, "K_ktar00"); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(this); #endif return 1; diff --git a/src/d/actor/d_a_obj_gra2.cpp b/src/d/actor/d_a_obj_gra2.cpp index 3c69faf2c8..e4265578d5 100644 --- a/src/d/actor/d_a_obj_gra2.cpp +++ b/src/d/actor/d_a_obj_gra2.cpp @@ -12,7 +12,7 @@ #include "d/d_cc_uty.h" #include "d/d_com_inf_game.h" #include "d/d_com_inf_actor.h" -#ifdef DEBUG +#if DEBUG #include "d/d_debug_viewer.h" #endif #include "d/d_msg_object.h" @@ -1468,7 +1468,7 @@ int daObj_GrA_c::talk(void* param_1) { } if (mMsgFlow.doFlow(this, NULL, 0) != 0) { - #ifdef DEBUG + #if DEBUG char* cVar1; int choiceNo = mMsgFlow.getChoiceNo(); if (choiceNo != 0) { diff --git a/src/d/actor/d_a_obj_gra2_base.inc b/src/d/actor/d_a_obj_gra2_base.inc index 74dc70b364..e697261016 100644 --- a/src/d/actor/d_a_obj_gra2_base.inc +++ b/src/d/actor/d_a_obj_gra2_base.inc @@ -62,7 +62,7 @@ int daObj_GrA_c::waitDemo(void* param_1) { } } } else { - #ifdef DEBUG + #if DEBUG if (mpHIO->m.field_0x8a) { fopAcM_OffStatus(this, fopAcM_STATUS_UNK_0x100); } else { @@ -79,7 +79,7 @@ int daObj_GrA_c::waitDemo(void* param_1) { break; case 2: - #ifdef DEBUG + #if DEBUG fopAcM_OnStatus(this, fopAcM_STATUS_UNK_0x100); #endif break; diff --git a/src/d/actor/d_a_obj_gra2_soldier.inc b/src/d/actor/d_a_obj_gra2_soldier.inc index 815ff867be..086487c869 100644 --- a/src/d/actor/d_a_obj_gra2_soldier.inc +++ b/src/d/actor/d_a_obj_gra2_soldier.inc @@ -1858,7 +1858,7 @@ void daObj_GrA_c::calcCatchPos(f32 param_1, int param_2) { field_0x91a.y = shape_angle.y; } } else { - #ifdef DEBUG + #if DEBUG dDbVw_Report(100, 100, "pos.y = %f", sp9c.y - player->current.pos.y); #endif diff --git a/src/d/actor/d_a_obj_iceblock.cpp b/src/d/actor/d_a_obj_iceblock.cpp index e117a6fc2a..40b675c690 100644 --- a/src/d/actor/d_a_obj_iceblock.cpp +++ b/src/d/actor/d_a_obj_iceblock.cpp @@ -142,7 +142,7 @@ int daObjIceBlk_c::saveCurrentPos() { int nearest_point_no = 0; for (int i = 0; i < mpPath->m_num; i++) { -#ifdef DEBUG +#if DEBUG f32 dist = current.pos.absXZ(point->m_position); if (dist < nearest_dist) { nearest_point_no = i; @@ -279,7 +279,7 @@ int daObjIceBlk_c::Create() { mColdEffEmitters[i] = dComIfGp_particle_set(l_eff_id[i], ¤t.pos, &home.angle, &scale, 0xFF, NULL, -1, NULL, NULL, NULL); -#ifdef DEBUG +#if DEBUG if (mColdEffEmitters[i] == NULL) { // "Ice Block: Cold Effect set failed\n" OS_REPORT("氷ブロック:冷気エフェクトセット失敗\n"); diff --git a/src/d/actor/d_a_obj_ikada.cpp b/src/d/actor/d_a_obj_ikada.cpp index dbe2b89dfb..e749c6e56d 100644 --- a/src/d/actor/d_a_obj_ikada.cpp +++ b/src/d/actor/d_a_obj_ikada.cpp @@ -147,13 +147,13 @@ int daObjIkada_c::Execute(Mtx** mtx) { posY = fopAcM_wt_c::getWaterY(); } - #ifdef DEBUG + #if DEBUG field_0x5c4 = field_0x5c4 + (((TREG_S(1) + 0x350) + (HREG_F(1) + 2.0f)) * field_0x5a0 + field_0x5a4 * HREG_F(9)); #else field_0x5c4 = field_0x5c4 + (((HREG_F(1) + 2.0f) * field_0x5a0) + 848.0f) + field_0x5a4 * HREG_F(9); #endif - #ifdef DEBUG + #if DEBUG field_0x5c6 = field_0x5c6 + (((TREG_S(2) + 0x350) + (HREG_F(2) + 2.0f)) * field_0x5a0 + field_0x5a4 * HREG_F(9)); #else field_0x5c6 = field_0x5c6 + (((HREG_F(2) + 2.0f) * field_0x5a0) + 848.0f) + field_0x5a4 * HREG_F(9); diff --git a/src/d/actor/d_a_obj_itamato.cpp b/src/d/actor/d_a_obj_itamato.cpp index d5d4e019eb..234c330232 100644 --- a/src/d/actor/d_a_obj_itamato.cpp +++ b/src/d/actor/d_a_obj_itamato.cpp @@ -50,7 +50,7 @@ daObj_ItaMato_HIOParam const daObj_ItaMato_Param_c::m = { 20.0f, }; -#ifdef DEBUG +#if DEBUG daObj_ItaMato_HIO_c::daObj_ItaMato_HIO_c() { mAttr = daObj_ItaMato_Param_c::m; } @@ -117,7 +117,7 @@ static char* l_resName = "H_ItaMato"; daObj_ItaMato_c::~daObj_ItaMato_c() { OS_REPORT("|%06d:%x|daObj_ItaMato_c -> デストラクト\n", g_Counter.mCounter0, this); - #ifdef DEBUG + #if DEBUG if (mHIO != NULL) { mHIO->removeHIO(); } @@ -152,7 +152,7 @@ cPhs__Step daObj_ItaMato_c::create() { fopAcM_SetMtx(this, mpModels[health]->getBaseTRMtx()); fopAcM_setCullSizeBox(this, -200.0f, -50.0f, -200.0f, 200.0f, 200.0f, 200.0f); - #ifdef DEBUG + #if DEBUG mHIO = &l_HIO; mHIO->entryHIO("板的"); #endif diff --git a/src/d/actor/d_a_obj_item.cpp b/src/d/actor/d_a_obj_item.cpp index 7288d4985e..2f690791e4 100644 --- a/src/d/actor/d_a_obj_item.cpp +++ b/src/d/actor/d_a_obj_item.cpp @@ -245,7 +245,7 @@ int daItem_c::_daItem_create() { m_itemNo = daItem_prm::getItemNo(this); BOOL flag = dItem_data::chkFlag(m_itemNo, 2); -#ifdef DEBUG +#if DEBUG if (dItem_data::getFieldArc(m_itemNo) == NULL) { // "Item Num<%d>: No Resource Archive specified!!\n" OS_REPORT_ERROR("アイテム番号<%d>:リソースのアーカイブ指定がありません!!\n", m_itemNo); diff --git a/src/d/actor/d_a_obj_kamakiri.cpp b/src/d/actor/d_a_obj_kamakiri.cpp index c740bbd636..386514e0e5 100644 --- a/src/d/actor/d_a_obj_kamakiri.cpp +++ b/src/d/actor/d_a_obj_kamakiri.cpp @@ -524,7 +524,7 @@ void daObjKAM_c::Z_BufferChk() { } else { cameraHeight = 0.0f; } -#ifdef DEBUG +#if DEBUG #define Z_BUFFERCHK_X_MAX FB_WIDTH #define Z_BUFFERCHK_Y_MAX FB_HEIGHT #else @@ -779,7 +779,7 @@ int daObjKAM_c::create() { mDraw = true; } -#ifdef DEBUG +#if DEBUG #define DAOBJKAM_C_CREATE_DIST_INDEX fopAc_attn_ETC_e #else #define DAOBJKAM_C_CREATE_DIST_INDEX fopAc_attn_CARRY_e diff --git a/src/d/actor/d_a_obj_kbacket.cpp b/src/d/actor/d_a_obj_kbacket.cpp index 5651ca72a8..31ec1836ea 100644 --- a/src/d/actor/d_a_obj_kbacket.cpp +++ b/src/d/actor/d_a_obj_kbacket.cpp @@ -39,7 +39,7 @@ static dCcD_SrcCyl l_ccDCyl = { static daObj_KBacket_Param_c l_HIO; static inline const daObj_KBacket_HIOParam* get_params(daObj_KBacket_c* i_this) { -#ifdef DEBUG +#if DEBUG return &i_this->mHIO->param; #else return &daObj_KBacket_Param_c::m; @@ -48,7 +48,7 @@ static inline const daObj_KBacket_HIOParam* get_params(daObj_KBacket_c* i_this) daObj_KBacket_c::~daObj_KBacket_c() { OS_REPORT("|%06d:%x|daObj_KBacket_c -> デストラクト\n", g_Counter.mCounter0, this); -#ifdef DEBUG +#if DEBUG if (mHIO != NULL) { mHIO->removeHIO(); } @@ -340,7 +340,7 @@ int daObj_KBacket_c::Execute() { field_0xa4a = 1; } else { if (mObjAcch.ChkGroundHit() != 0) { -#ifndef DEBUG +#if !DEBUG fopAcM_seStart(this, Z2SE_OBJ_WOODSTICK_BOUND, 0); #endif if (field_0x9d4.y < -30.0f) { @@ -359,7 +359,7 @@ int daObj_KBacket_c::Execute() { } else { if (field_0xa4a != 0) { if (mObjAcch.ChkGroundHit() != 0) { -#ifndef DEBUG +#if !DEBUG fopAcM_seStart(this, Z2SE_OBJ_WOODSTICK_BOUND, 0); #endif if (this->field_0x9d4.y < -30.0f) { @@ -376,7 +376,7 @@ int daObj_KBacket_c::Execute() { } } else { if (field_0xa49 != 0) { -#ifndef DEBUG +#if !DEBUG fopAcM_seStart(this, Z2SE_OBJ_WOODSTICK_PUT, 0); #endif } else { diff --git a/src/d/actor/d_a_obj_kbox.cpp b/src/d/actor/d_a_obj_kbox.cpp index ab857d9a14..05e30dd828 100644 --- a/src/d/actor/d_a_obj_kbox.cpp +++ b/src/d/actor/d_a_obj_kbox.cpp @@ -15,7 +15,7 @@ daObj_Kbox_HIO_c::daObj_Kbox_HIO_c() { mWidth = 2.0f; } -#ifdef DEBUG +#if DEBUG void daObj_Kbox_HIO_c::genMessage(JORMContext* ctx) { // Skull fish wooden box ctx->genLabel(" スカル魚木箱 ", 0x80000001, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); diff --git a/src/d/actor/d_a_obj_kgate.cpp b/src/d/actor/d_a_obj_kgate.cpp index 9f1de606f2..1af514b6ee 100644 --- a/src/d/actor/d_a_obj_kgate.cpp +++ b/src/d/actor/d_a_obj_kgate.cpp @@ -259,9 +259,7 @@ int daObjKGate_c::Create() { l_cull_box.max.y, l_cull_box.max.z); if (dComIfG_Bgsp().Regist(mpBgW, this)) { -#ifdef DEBUG - OSReport_Error("キコルの門:BG登録失敗しました\n"); -#endif + OS_REPORT_ERROR("キコルの門:BG登録失敗しました\n"); return 0; } @@ -336,7 +334,7 @@ int daObjKGate_c::create1st() { phase_state = MoveBGCreate(l_arcName[mNameArg], l_gateDzbIdx[mNameArg], NULL, heap_size, NULL); if (phase_state == cPhs_ERROR_e) { -#ifdef DEBUG +#if DEBUG OSReport("KGATE PARAM:%x\n", fopAcM_GetParam(this)); #endif return phase_state; @@ -956,9 +954,7 @@ int daObjKGate_c::Draw() { int daObjKGate_c::Delete() { if (mpBgW != NULL && mpBgW->ChkUsed()) { if (dComIfG_Bgsp().Release(mpBgW)) { -#ifdef DEBUG - OSReport("Release Error\n"); -#endif + OS_REPORT("Release Error\n"); } } diff --git a/src/d/actor/d_a_obj_kita.cpp b/src/d/actor/d_a_obj_kita.cpp index 1a2dc43615..7c52cd9edd 100644 --- a/src/d/actor/d_a_obj_kita.cpp +++ b/src/d/actor/d_a_obj_kita.cpp @@ -18,7 +18,7 @@ daObj_Kita_HIO_c::daObj_Kita_HIO_c() { mSwingRange = 0.6f; } -#ifdef DEBUG +#if DEBUG void daObj_Kita_HIO_c::genMessage(JORMContext* ctx) { ctx->genLabel(" 風で動く連続板", 0x80000001, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); // Model Size X diff --git a/src/d/actor/d_a_obj_klift00.cpp b/src/d/actor/d_a_obj_klift00.cpp index ab92c2a56d..8476751b42 100644 --- a/src/d/actor/d_a_obj_klift00.cpp +++ b/src/d/actor/d_a_obj_klift00.cpp @@ -27,7 +27,7 @@ struct daObjKLift00_HIO_c : public mDoHIO_entry_c { /* 0x1C */ f32 field_0x1C; }; -#ifdef DEBUG +#if DEBUG static daObjKLift00_HIO_c l_HIO; daObjKLift00_HIO_c::daObjKLift00_HIO_c() { @@ -102,7 +102,7 @@ static dCcD_SrcCyl l_cc_cyl_src = { } // mCyl }; -#ifdef DEBUG +#if DEBUG static const int l_dzbidx[] = {9}; #endif @@ -128,7 +128,7 @@ cPhs__Step daObjKLift00_c::create1st() { } // "Foothold(Lv3)" - #ifdef DEBUG + #if DEBUG l_HIO.entryHIO("足場(Lv3)"); #endif @@ -328,7 +328,7 @@ int daObjKLift00_c::Execute(Mtx** i_mtx) { // Check if player hit chains, and play sfx & move the chains accordingly bool playedHitSfx = false; - #ifdef DEBUG + #if DEBUG for(int i = 0; i < 8; i++) { const s32 currentChainIdx = (mNumChains - 1) - (i * 2); if(currentChainIdx >= 0 && mChainSphereColliders[i].ChkTgHit() ) { @@ -461,7 +461,7 @@ int daObjKLift00_c::Draw() { int daObjKLift00_c::Delete() { dComIfG_resDelete(this, l_arcName); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(); #endif diff --git a/src/d/actor/d_a_obj_kshutter.cpp b/src/d/actor/d_a_obj_kshutter.cpp index 7d2230c1ea..1bd2b6711f 100644 --- a/src/d/actor/d_a_obj_kshutter.cpp +++ b/src/d/actor/d_a_obj_kshutter.cpp @@ -270,7 +270,7 @@ int daObjKshtr_c::CreateHeap() { } } - #ifdef DEBUG + #if DEBUG if (checkKey() != 0) { mIsCheckKey = true; } @@ -320,7 +320,7 @@ cPhs__Step daObjKshtr_c::phase_0() { mType = getType() + 1; mSwNo = getSwNo(); - #ifdef DEBUG + #if DEBUG if (mSwNo == 0xFF) { OS_REPORT_ERROR("鍵付き壁ドア:スイッチ指定がありません\n"); // Locked wall door: No switch specification return cPhs_ERROR_e; @@ -329,7 +329,7 @@ cPhs__Step daObjKshtr_c::phase_0() { initKey(); #endif - #ifdef DEBUG + #if DEBUG if (mType >= 6) { OS_REPORT_ERROR("鍵付き壁ドア:引数0のタイプ指定が不正値です\n"); // Locked wall door: The type specification for argument 0 is invalid @@ -835,7 +835,7 @@ void daObjKshtr_c::anmInit() { JUT_ASSERT(1278, anm != NULL); - #ifdef DEBUG + #if DEBUG if (!mpBckAnm->init(anm, 1, 0, 1.0f, 0, -1, true)) { JUT_ASSERT(1281, FALSE); diff --git a/src/d/actor/d_a_obj_kwheel00.cpp b/src/d/actor/d_a_obj_kwheel00.cpp index a0eed328d5..7512f46ad1 100644 --- a/src/d/actor/d_a_obj_kwheel00.cpp +++ b/src/d/actor/d_a_obj_kwheel00.cpp @@ -17,7 +17,7 @@ static int daObjKWheel00_MoveBGDelete(daObjKWheel00_c*); static int daObjKWheel00_MoveBGExecute(daObjKWheel00_c*); static int daObjKWheel00_MoveBGDraw(daObjKWheel00_c*); -#ifdef DEBUG +#if DEBUG static daObjKWheel00_HIO_c l_HIO; daObjKWheel00_HIO_c::daObjKWheel00_HIO_c() { @@ -54,7 +54,7 @@ int daObjKWheel00_c::create1st() { if(phase == cPhs_ERROR_e) return phase; - #ifdef DEBUG + #if DEBUG // "Water wheel(Lv3)" l_HIO.entryHIO("水車(Lv3)"); #endif @@ -135,7 +135,7 @@ int daObjKWheel00_c::Create() { mZAngularVelocity = 0; if(getSwNo() != 0xFF && fopAcM_isSwitch(this, getSwNo())) { - #ifdef DEBUG + #if DEBUG if(getArg0()) mZAngularVelocity = l_HIO.mTargetZAngularSpeed; else @@ -192,7 +192,7 @@ int daObjKWheel00_c::Execute(Mtx** i_mtx) { // Only draw particles and play SFX if gear is moving if(mZAngularVelocity != 0) { // Increase angular velocity via an arithmetic sequence with a ratio of 2 - #ifdef DEBUG + #if DEBUG if(mZAngularVelocity > 0) { if(mZAngularVelocity < l_HIO.mTargetZAngularSpeed) mZAngularVelocity += l_HIO.mZAngularAcceleration; @@ -324,7 +324,7 @@ int daObjKWheel00_c::Draw() { int daObjKWheel00_c::Delete() { dComIfG_resDelete(this, l_arcName[m_type]); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(); #endif diff --git a/src/d/actor/d_a_obj_kwheel01.cpp b/src/d/actor/d_a_obj_kwheel01.cpp index da0700171a..a786bb5312 100644 --- a/src/d/actor/d_a_obj_kwheel01.cpp +++ b/src/d/actor/d_a_obj_kwheel01.cpp @@ -28,7 +28,7 @@ static const char* l_arcName = "K_Wheel01"; // Likely to have been a macro; matches for loop at beginning of create1st for both debug and retail, despite retail only calling getArg4567() #define CHECK_KLIFT_EXISTS(kLiftNum) (!((1 << kLiftNum) & getArg4567())) -#ifdef DEBUG +#if DEBUG static daObjKWheel01_HIO_c l_HIO; daObjKWheel01_HIO_c::daObjKWheel01_HIO_c() { @@ -94,7 +94,7 @@ cPhs__Step daObjKWheel01_c::create1st() { } } - #ifdef DEBUG + #if DEBUG // "Pulley(Lv3)" l_HIO.entryHIO("滑車(Lv3)"); #endif @@ -163,7 +163,7 @@ int daObjKWheel01_c::Create() { fopAcM_SetMtx(this, mTransformMtx); if(getSwNo() != 0xFF && fopAcM_isSwitch(this, getSwNo())) { - #ifdef DEBUG + #if DEBUG if(getArg0()) { mYAngularVelocity = l_HIO.mTargetYAngularSpeed; } @@ -208,7 +208,7 @@ int daObjKWheel01_c::Execute(Mtx** i_mtx) { shape_angle.y = current.angle.y; if(current.angle.y != old.angle.y) { - #ifdef DEBUG + #if DEBUG mYAngularVelocity = l_HIO.mTargetYAngularSpeed; #else mYAngularVelocity = 64; @@ -230,7 +230,7 @@ int daObjKWheel01_c::Execute(Mtx** i_mtx) { } if(mYAngularVelocity != 0) { - #ifdef DEBUG + #if DEBUG if(mYAngularVelocity > 0) { if(mYAngularVelocity < l_HIO.mTargetYAngularSpeed) mYAngularVelocity += l_HIO.mYAngularAcceleration; @@ -299,7 +299,7 @@ int daObjKWheel01_c::Draw() { int daObjKWheel01_c::Delete() { dComIfG_resDelete(this, l_arcName); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(); #endif @@ -312,7 +312,7 @@ int daObjKWheel01_c::Delete() { } bool daObjKWheel01_c::eventStart() { - #ifdef DEBUG + #if DEBUG if(getArg0()) mYAngularVelocity = l_HIO.mYAngularAcceleration; else diff --git a/src/d/actor/d_a_obj_lv3Water2.cpp b/src/d/actor/d_a_obj_lv3Water2.cpp index dc3847cc74..35a2ca0ef3 100644 --- a/src/d/actor/d_a_obj_lv3Water2.cpp +++ b/src/d/actor/d_a_obj_lv3Water2.cpp @@ -32,7 +32,7 @@ daLv3Water2_HIO_c::daLv3Water2_HIO_c() { mLevelControlWaitFrames = 0; } -#ifdef DEBUG +#if DEBUG void daLv3Water2_HIO_c::genMessage(JORMContext* ctx) { ctx->genSlider("wait time", &mLevelControlWaitFrames, 0, 255, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); } @@ -120,7 +120,7 @@ cPhs__Step daLv3Water2_c::create() { mMode = WAIT; // "LV3 Water surface (2SW)" - #ifdef DEBUG + #if DEBUG l_HIO.entryHIO("LV3水面(2SW)"); #endif } @@ -237,7 +237,7 @@ int daLv3Water2_c::Draw() { int daLv3Water2_c::Delete() { dComIfG_resDelete(&mPhase, l_resNameIdx[mResourceIndex]); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(); #endif diff --git a/src/d/actor/d_a_obj_lv4chandelier.cpp b/src/d/actor/d_a_obj_lv4chandelier.cpp index 7a7f692324..a4cc3b7526 100644 --- a/src/d/actor/d_a_obj_lv4chandelier.cpp +++ b/src/d/actor/d_a_obj_lv4chandelier.cpp @@ -12,7 +12,7 @@ #include "d/d_cc_d.h" #include "d/d_cc_uty.h" -#ifdef DEBUG +#if DEBUG class daObjLv4Chan_HIO_c : public mDoHIO_entry_c { public: daObjLv4Chan_HIO_c(); @@ -70,7 +70,7 @@ int daObjLv4Chan_c::create1st() { return rv; } - #ifdef DEBUG + #if DEBUG // “Chandelier (Lv4)” l_HIO.entryHIO("シャンデリア(Lv4)"); #endif diff --git a/src/d/actor/d_a_obj_lv4digsand.cpp b/src/d/actor/d_a_obj_lv4digsand.cpp index d01616f31f..e846622e57 100644 --- a/src/d/actor/d_a_obj_lv4digsand.cpp +++ b/src/d/actor/d_a_obj_lv4digsand.cpp @@ -107,7 +107,7 @@ void daObjL4DigSand_c::mode_init_dig() { if (gnd_y != -G_CM3D_F_INF) { mGroundY = gnd_y; } else { -#ifdef DEBUG +#if DEBUG // "No BG below dig-sand!" OS_REPORT_ERROR("掘れる砂の下にBGがありません!"); fopAcM_delete(this); diff --git a/src/d/actor/d_a_obj_lv6bemos.cpp b/src/d/actor/d_a_obj_lv6bemos.cpp index 7f600e3300..f048c74f21 100644 --- a/src/d/actor/d_a_obj_lv6bemos.cpp +++ b/src/d/actor/d_a_obj_lv6bemos.cpp @@ -184,7 +184,7 @@ int daObjL6Bm_c::CreateHeap() { return 0; } - #ifdef DEBUG + #if DEBUG pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, BTK_EF_BIMOBEAM_OFF); JUT_ASSERT(660, pbtk != NULL); #endif diff --git a/src/d/actor/d_a_obj_lv6bemos2.cpp b/src/d/actor/d_a_obj_lv6bemos2.cpp index 05763a1495..7711f18f5b 100644 --- a/src/d/actor/d_a_obj_lv6bemos2.cpp +++ b/src/d/actor/d_a_obj_lv6bemos2.cpp @@ -201,7 +201,7 @@ int daObjLv6Bm_c::Create() { } } - #ifdef DEBUG + #if DEBUG if (mEyeMaterial == NULL) { OS_REPORT("Lv6ビーモス:目のマテリアル<%s>がありません\n", l_eye_matName); // Lv6 Beamos: Eye material <%s> is not available. return 0; @@ -248,7 +248,7 @@ int daObjLv6Bm_c::CreateHeap() { return 0; } - #ifdef DEBUG + #if DEBUG pbrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes(l_arcName, BRK_BM6_TURN); JUT_ASSERT(644, pbrk != NULL); #endif @@ -275,7 +275,7 @@ int daObjLv6Bm_c::CreateHeap() { } mpBtkAnm->setFrame(mpBtkAnm->getEndFrame()); - #ifdef DEBUG + #if DEBUG pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, BTK_EF_BIMOL6_ON); JUT_ASSERT(693, pbtk != NULL); #endif diff --git a/src/d/actor/d_a_obj_lv6swturn.cpp b/src/d/actor/d_a_obj_lv6swturn.cpp index af4fe5615a..92484685f7 100644 --- a/src/d/actor/d_a_obj_lv6swturn.cpp +++ b/src/d/actor/d_a_obj_lv6swturn.cpp @@ -99,7 +99,7 @@ int daObjLv6SwTurn_c::CreateHeap() { return TRUE; } -#ifdef DEBUG +#if DEBUG static daObjLv6SwTurn_HIO_c l_HIO; #endif diff --git a/src/d/actor/d_a_obj_magLiftRot.cpp b/src/d/actor/d_a_obj_magLiftRot.cpp index 8c75554859..a4f09b2d49 100644 --- a/src/d/actor/d_a_obj_magLiftRot.cpp +++ b/src/d/actor/d_a_obj_magLiftRot.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_obj_magLiftRot.h" #include "d/d_com_inf_game.h" #include "d/d_procname.h" -#ifdef DEBUG +#if DEBUG #include "m_Do/m_Do_hostIO.h" #endif #include "d/d_bg_w.h" diff --git a/src/d/actor/d_a_obj_mhole.cpp b/src/d/actor/d_a_obj_mhole.cpp index bfff9235e6..69baaea558 100644 --- a/src/d/actor/d_a_obj_mhole.cpp +++ b/src/d/actor/d_a_obj_mhole.cpp @@ -37,7 +37,7 @@ dCcD_SrcCps l_cps_src = { } // mCpsAttr }; -#ifdef DEBUG +#if DEBUG static daObjMHole_HIO_c l_HIO; daObjMHole_HIO_c::daObjMHole_HIO_c() { @@ -86,7 +86,7 @@ void daObjMHole_c::initBaseMtx() { } void daObjMHole_c::setBaseMtx() { -#ifdef DEBUG +#if DEBUG if (l_HIO.scale_adjust_on != 0) { scale = l_HIO.scale; } @@ -198,8 +198,8 @@ int daObjMHole_c::create() { if (Create() == 0) { return cPhs_ERROR_e; } -#ifdef DEBUG - OSReport("MHole Param<%x> arc<%s>\n", fopAcM_GetParam(this), l_arcName[mKind]); + OS_REPORT("MHole Param<%x> arc<%s>\n", fopAcM_GetParam(this), l_arcName[mKind]); +#if DEBUG l_HIO.entryHIO("マグネホール"); #endif } @@ -333,7 +333,7 @@ int daObjMHole_c::draw() { mDoExt_brkAnmRemove(mpModel->getModelData()); mDoExt_btkAnmRemove(mpModel->getModelData()); -#ifdef DEBUG +#if DEBUG if (l_HIO.collision_display != 0) { GXColor color = {0xFF, 0x0, 0x0, 0xFF}; if (mCps.GetAtVecP() != NULL) { @@ -349,7 +349,7 @@ int daObjMHole_c::_delete() { effectEnd(); mSound.deleteObject(); dComIfG_resDelete(&mPhase, l_arcName[mKind]); -#ifdef DEBUG +#if DEBUG l_HIO.removeHIO(); #endif diff --git a/src/d/actor/d_a_obj_mie.cpp b/src/d/actor/d_a_obj_mie.cpp index 2258318bc6..2ed126eb06 100644 --- a/src/d/actor/d_a_obj_mie.cpp +++ b/src/d/actor/d_a_obj_mie.cpp @@ -44,7 +44,7 @@ static dCcD_SrcCyl l_ccDCyl = { } // mCyl }; -#ifdef DEBUG +#if DEBUG void daObj_Mie_HIO_c::genMessage(JORMContext* ctx) { ctx->genSlider("注目オフセット ", &mParams.focus_offset, 0.0f, 1000.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); diff --git a/src/d/actor/d_a_obj_msima.cpp b/src/d/actor/d_a_obj_msima.cpp index 809495fa19..0163bbe96d 100644 --- a/src/d/actor/d_a_obj_msima.cpp +++ b/src/d/actor/d_a_obj_msima.cpp @@ -22,7 +22,7 @@ daObj_Msima_HIO_c::daObj_Msima_HIO_c() { mBasicPosition = 800.0f; } -#ifdef DEBUG +#if DEBUG void daObj_Msima_HIO_c::genMessage(JORMContext* context) { // Magma Island context->genLabel(" マグネ島 ", 0x80000001, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); diff --git a/src/d/actor/d_a_obj_ornament_cloth.cpp b/src/d/actor/d_a_obj_ornament_cloth.cpp index cc7b57f1e5..085b1e6fcf 100644 --- a/src/d/actor/d_a_obj_ornament_cloth.cpp +++ b/src/d/actor/d_a_obj_ornament_cloth.cpp @@ -17,7 +17,7 @@ enum J_Necktie_RES_File_ID { /* 0x7 */ BTK_J_NECKTIE = 0x7, }; -#ifdef DEBUG +#if DEBUG class daObjOnCloth_Hio_c : public JORReflexible { public: diff --git a/src/d/actor/d_a_obj_poFire.cpp b/src/d/actor/d_a_obj_poFire.cpp index 5c89dd88e2..25a1094276 100644 --- a/src/d/actor/d_a_obj_poFire.cpp +++ b/src/d/actor/d_a_obj_poFire.cpp @@ -45,7 +45,7 @@ daPoFire_HIO_c::daPoFire_HIO_c() { mPickupRange = 150.0f; mFireWaitTime = 20; } -#ifdef DEBUG +#if DEBUG /* daPoFire_HIO_c::genMessage (JORMContext *) */ void daPoFire_HIO_c::genMessage(JORMContext* mctx) { mctx->genSlider("捕まえ範囲", &mPickupRange, 0.0f, 1000.0f, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 24); @@ -106,7 +106,7 @@ int daPoFire_c::create() { init_modeOnFire(); } -#ifdef DEBUG +#if DEBUG l_HIO.entryHIO("ポウ炎"); #endif @@ -407,7 +407,7 @@ int daPoFire_c::Draw() { int daPoFire_c::Delete() { dComIfG_resDelete(&mPhase, "poFire"); -#ifdef DEBUG +#if DEBUG l_HIO.removeHIO(); #endif diff --git a/src/d/actor/d_a_obj_rgate.cpp b/src/d/actor/d_a_obj_rgate.cpp index 2349c84a6d..2194493de3 100644 --- a/src/d/actor/d_a_obj_rgate.cpp +++ b/src/d/actor/d_a_obj_rgate.cpp @@ -239,9 +239,7 @@ int daObjRgate_c::Create() { l_cull_box.max.y, l_cull_box.max.z); if (dComIfG_Bgsp().Regist(mpBgW, this)) { -#ifdef DEBUG - OSReport_Error("キコルの門:BG登録失敗しました\n"); -#endif + OS_REPORT_ERROR("キコルの門:BG登録失敗しました\n"); return 0; } else { for (u16 i = 0; i < mpGateModel->getModelData()->getJointNum(); i++) { @@ -847,9 +845,7 @@ int daObjRgate_c::Draw() { int daObjRgate_c::Delete() { if (mpBgW != NULL && mpBgW->ChkUsed()) { if (dComIfG_Bgsp().Release(mpBgW)) { -#ifdef DEBUG - OSReport("Release Error\n"); -#endif + OS_REPORT("Release Error\n"); } } diff --git a/src/d/actor/d_a_obj_sakuita.cpp b/src/d/actor/d_a_obj_sakuita.cpp index b56deef764..05a8cfbf91 100644 --- a/src/d/actor/d_a_obj_sakuita.cpp +++ b/src/d/actor/d_a_obj_sakuita.cpp @@ -9,7 +9,7 @@ #include "d/d_a_obj.h" #include "d/d_com_inf_game.h" -#ifdef DEBUG +#if DEBUG class daObjSakuita_Hio_c : public JORReflexible { public: void genMessage(JORMContext* ctx); @@ -78,7 +78,7 @@ void daObjSakuita_c::create_init() { } field_0x74c = 1; - #ifdef DEBUG + #if DEBUG M_hio.ct(); #endif } @@ -156,7 +156,7 @@ static int daObjSakuita_Draw(daObjSakuita_c* i_this) { } inline int daObjSakuita_c::execute() { - #ifdef DEBUG + #if DEBUG gravity = attr().mGravity; #endif current.pos.y += attr().mHangingPosition; @@ -181,7 +181,7 @@ static int daObjSakuita_Delete(daObjSakuita_c* i_this) { } daObjSakuita_c::~daObjSakuita_c() { - #ifdef DEBUG + #if DEBUG M_hio.dt(); #endif diff --git a/src/d/actor/d_a_obj_sakuita_rope.cpp b/src/d/actor/d_a_obj_sakuita_rope.cpp index c0cef88f63..66585092e2 100644 --- a/src/d/actor/d_a_obj_sakuita_rope.cpp +++ b/src/d/actor/d_a_obj_sakuita_rope.cpp @@ -9,7 +9,7 @@ #include "d/d_com_inf_game.h" #include "d/d_path.h" -#ifdef DEBUG +#if DEBUG #include "d/d_a_obj.h" class daObjItaRope_Hio_c : public JORReflexible { @@ -139,12 +139,12 @@ void Sakuita_c::calcAngle() { static char* l_arcName = "A_Sakuita"; -#ifdef DEBUG +#if DEBUG daObjItaRope_Hio_c M_hio; #endif inline daObjItaRope_c::~daObjItaRope_c() { -#ifdef DEBUG +#if DEBUG M_hio.dt(); #endif delete [] mRopes; @@ -207,7 +207,7 @@ void daObjItaRope_c::create_init() { pSakuita->create(pPos, sVar12, fopAcM_GetRoomNo(this)); } - #ifdef DEBUG + #if DEBUG M_hio.ct(); #endif } diff --git a/src/d/actor/d_a_obj_scannon.cpp b/src/d/actor/d_a_obj_scannon.cpp index fd392f1bfa..67fa3adac3 100644 --- a/src/d/actor/d_a_obj_scannon.cpp +++ b/src/d/actor/d_a_obj_scannon.cpp @@ -353,7 +353,7 @@ void daSCannon_c::middleExe() { void daSCannon_c::orderEvtInit() { eventInfo.setArchiveName(l_arcName_Zev); mEvtIdx = dComIfGp_getEventManager().getEventIdx(this, l_eventName[mDemoType], 0xFF); -#ifdef DEBUG +#if DEBUG if (mEvtIdx == -1) { // "××××××××××××× Sky Cannon d_a_obj_scannon.cpp: Failed to get event\n" OS_REPORT("×××××××××××××天空砲台 d_a_obj_scannon.cpp:イベント取得失敗\n"); @@ -603,7 +603,7 @@ void daSCannon_c::demoExeFire() { } void daSCannon_c::demoInitFinish() { -#ifdef DEBUG +#if DEBUG if (dComIfG_play_c::getLayerNo(0) == 3 || dComIfG_play_c::getLayerNo(0) == 10) { J3DJoint* joint_p = mpModels[mIsRepaired]->getModelData()->getJointNodePointer(mHeadJointNo); if (joint_p == NULL) { diff --git a/src/d/actor/d_a_obj_scannon_ten.cpp b/src/d/actor/d_a_obj_scannon_ten.cpp index bbd08bcc79..773d07b055 100644 --- a/src/d/actor/d_a_obj_scannon_ten.cpp +++ b/src/d/actor/d_a_obj_scannon_ten.cpp @@ -160,7 +160,7 @@ void daObjSCannonTen_c::exeModeWait() { if (aREG_F(0) == 0.0f && fopAcM_checkHookCarryNow(this) && dComIfGp_checkPlayerStatus1(0, 0x10)) { eventInfo.setArchiveName(l_arcName); mEvtIdx = dComIfGp_getEventManager().getEventIdx(this, l_eventName, 0xFF); -#ifdef DEBUG +#if DEBUG if (mEvtIdx == -1) { // "××××××××××××× Sky Cannon (City in the Sky) d_a_obj_scannon_ten.cpp: Failed to get event\n" OS_REPORT("×××××××××天空砲台(天空都市) d_a_obj_scannon_ten.cpp:イベント取得失敗\n"); @@ -316,7 +316,7 @@ void daObjSCannonTen_c::demoExeFireEnd() { } void daObjSCannonTen_c::demoInitFinish() { -#ifdef DEBUG +#if DEBUG J3DJoint* joint_p = mpModel->getModelData()->getJointNodePointer(mHeadJointNo); if (joint_p == NULL) { // "××××××Sky Cannon—The head joint is missing!!!! ××××××" diff --git a/src/d/actor/d_a_obj_smgdoor.cpp b/src/d/actor/d_a_obj_smgdoor.cpp index 91d78bf6c0..88cc4b30ac 100644 --- a/src/d/actor/d_a_obj_smgdoor.cpp +++ b/src/d/actor/d_a_obj_smgdoor.cpp @@ -10,7 +10,7 @@ #include "d/d_meter2_info.h" #include "d/d_s_play.h" -#ifdef DEBUG +#if DEBUG class daObjSmgDoor_HIO_c : public mDoHIO_entry_c { public: daObjSmgDoor_HIO_c(); @@ -133,7 +133,7 @@ int daObjSmgDoor_c::create1st() { } } -#ifdef DEBUG +#if DEBUG // Present or Past Door l_HIO.entryHIO("現在or過去の扉"); #endif @@ -385,7 +385,7 @@ int daObjSmgDoor_c::Draw() { mDoExt_modelUpdateDL(mpModel[1]); dComIfGd_setList(); -#ifdef DEBUG +#if DEBUG if (l_HIO.field_0x6 != 0) { mpBgW->CalcPlane(); } @@ -396,7 +396,7 @@ int daObjSmgDoor_c::Draw() { int daObjSmgDoor_c::Delete() { dComIfG_resDelete(&mPhase, l_arcName[mType]); -#ifdef DEBUG +#if DEBUG l_HIO.removeHIO(); #endif return 1; diff --git a/src/d/actor/d_a_obj_spinLift.cpp b/src/d/actor/d_a_obj_spinLift.cpp index dddb1517c5..4e2f3120c9 100644 --- a/src/d/actor/d_a_obj_spinLift.cpp +++ b/src/d/actor/d_a_obj_spinLift.cpp @@ -12,7 +12,7 @@ public: daSpinLift_HIO_c(); ~daSpinLift_HIO_c() {}; -#ifdef DEBUG +#if DEBUG void genMessage(JORMContext*); #endif @@ -29,7 +29,7 @@ daSpinLift_HIO_c::daSpinLift_HIO_c() { mVibration = 4; } -#ifdef DEBUG +#if DEBUG void daSpinLift_HIO_c::genMessage(JORMContext* ctx) { // === Ascent === ctx->genLabel("\n=== 上昇 ===", 0, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); @@ -106,7 +106,7 @@ int daSpinLift_c::create() { } setBaseMtx(); -#ifdef DEBUG +#if DEBUG // Spin Lift l_HIO.entryHIO("スピンリフト"); #endif @@ -247,7 +247,7 @@ int daSpinLift_c::Draw() { int daSpinLift_c::Delete() { dComIfG_resDelete(&mPhase, l_resNameIdx[mModelType]); -#ifdef DEBUG +#if DEBUG l_HIO.removeHIO(); #endif return 1; diff --git a/src/d/actor/d_a_obj_ss_drink.cpp b/src/d/actor/d_a_obj_ss_drink.cpp index 9ea78dfd7e..899d8c92d5 100644 --- a/src/d/actor/d_a_obj_ss_drink.cpp +++ b/src/d/actor/d_a_obj_ss_drink.cpp @@ -305,7 +305,7 @@ void daObj_SSDrink_c::setParam() { gravity = -5.0f; -#ifdef DEBUG +#if DEBUG bool bVar1 = false; bool bVar2 = false; #endif @@ -409,7 +409,7 @@ int daObj_SSDrink_c::orderEvent() { } int daObj_SSDrink_c::wait(void* param_0) { -#ifdef DEBUG +#if DEBUG switch (field_0xb08) { case 0: case 2: diff --git a/src/d/actor/d_a_obj_swLight.cpp b/src/d/actor/d_a_obj_swLight.cpp index 445b577131..025314b0bb 100644 --- a/src/d/actor/d_a_obj_swLight.cpp +++ b/src/d/actor/d_a_obj_swLight.cpp @@ -9,7 +9,7 @@ #include "d/d_cc_d.h" #include "d/d_s_play.h" -#ifdef DEBUG +#if DEBUG class daObjSwLight_HIO_c : public mDoHIO_entry_c { public: /* 811CF8C0 */ daObjSwLight_HIO_c(); @@ -108,7 +108,7 @@ static dCcD_SrcCyl l_cyl_src = { int daObjSwLight_c::Create() { if (fopAcM_isSwitch(this, getSwbit())) { init_modeSwOffWait(); -#ifdef DEBUG +#if DEBUG field_0xadc = l_HIO.mLightMaxRadius; #else field_0xadc = 500.0f; @@ -143,7 +143,7 @@ int daObjSwLight_c::Create() { } } -#ifdef DEBUG +#if DEBUG if (field_0xae8 == 0xffff) { // Light Candlestick Switch: Material "cc_LB_v" is missing. OSReport_Error("光燭台スイッチ:マテリアル\"cc_LB_v\"がありません\n"); @@ -178,7 +178,7 @@ int daObjSwLight_c::create1st() { if (phase == cPhs_ERROR_e) { return phase; } -#ifdef DEBUG +#if DEBUG // Light Candlestick Switch l_HIO.entryHIO("光燭台スイッチ"); #endif @@ -222,7 +222,7 @@ void daObjSwLight_c::action() { mTgSph[i].SetC(cStack_48); dComIfG_Ccsp()->Set(&mTgSph[i]); } -#ifdef DEBUG +#if DEBUG u8 a = 1; u8 light_hit = l_HIO.mNoLightHit == 0; #endif @@ -240,7 +240,7 @@ void daObjSwLight_c::action() { } } -#ifdef DEBUG +#if DEBUG u8 tmp = field_0xadc / l_HIO.mLightMaxRadius * 255.0f; #else u8 tmp = field_0xadc / 500.0f * 255.0f; @@ -276,13 +276,13 @@ void daObjSwLight_c::modeSwOnWait() { if (field_0xae1 < 5) { field_0xadc = 0.0f; } else if (field_0xae1 == 5) { -#ifdef DEBUG +#if DEBUG field_0xadc = l_HIO.mLightMaxRadius * 0.25f; #else field_0xadc = 500.0f * 0.25f; #endif } else if (field_0xae1 < 50) { -#ifdef DEBUG +#if DEBUG field_0xadc = l_HIO.mLightMaxRadius * ((field_0xae1 - 5) * 0.25f / 45.0f + 0.25f); #else @@ -290,7 +290,7 @@ void daObjSwLight_c::modeSwOnWait() { #endif } else if (field_0xae1 == 50) { -#ifdef DEBUG +#if DEBUG field_0xadc = l_HIO.mLightMaxRadius; #else field_0xadc = 500.0f; @@ -309,7 +309,7 @@ void daObjSwLight_c::init_modeOnLight() { } void daObjSwLight_c::modeOnLight() { -#ifdef DEBUG +#if DEBUG if (cLib_chaseF(&field_0xadc, l_HIO.mLightMaxRadius, l_HIO.mLightMaxRadius * 0.05f)) { init_modeSwOffWait(); } @@ -341,7 +341,7 @@ void daObjSwLight_c::modeSwOffWait() { if (field_0xae3 != 0) { if (!fopAcM_isSwitch(this, getSwbit2())) { -#ifdef DEBUG +#if DEBUG if (cLib_chaseF(&field_0xadc, 0.0f, l_HIO.mLightMaxRadius * 0.05f)) { #else if (cLib_chaseF(&field_0xadc, 0.0f, 500.0f * 0.05f)) { @@ -349,7 +349,7 @@ void daObjSwLight_c::modeSwOffWait() { init_modeSwOnWait(); } } else { -#ifdef DEBUG +#if DEBUG cLib_chaseF(&field_0xadc, l_HIO.mLightMaxRadius, l_HIO.mLightMaxRadius * 0.05f); #else cLib_chaseF(&field_0xadc, 500.0f, 500.0f * 0.05); @@ -359,7 +359,7 @@ void daObjSwLight_c::modeSwOffWait() { } else { if (!cLib_checkBit<u8>(field_0xae6, (u8)1) && !cLib_checkBit<u8>(field_0xae6, 2) && !cLib_calcTimer(&field_0xae4) && -#ifdef DEBUG +#if DEBUG cLib_chaseF(&field_0xadc, 0.0f, l_HIO.mLightMaxRadius * 0.05f)) { #else @@ -420,7 +420,7 @@ int daObjSwLight_c::Draw() { J3DMaterial* material = modelData->getMaterialNodePointer(field_0xae8); J3DGXColor* color = material->getTevKColor(0); -#ifdef DEBUG +#if DEBUG u8 fVar1 = field_0xadc / l_HIO.mLightMaxRadius * 255.0f; #else u8 fVar1 = field_0xadc / 500.0f * 255.0f; @@ -433,7 +433,7 @@ int daObjSwLight_c::Draw() { mDoExt_modelUpdateDL(mpModel); dComIfGd_setList(); -#ifdef DEBUG +#if DEBUG if (l_HIO.mCheckRendering) { mpBgW->CalcPlane(); } @@ -445,7 +445,7 @@ int daObjSwLight_c::Draw() { int daObjSwLight_c::Delete() { mSound.deleteObject(); dComIfG_resDelete(&mPhase, l_arcName); -#ifdef DEBUG +#if DEBUG l_HIO.removeHIO(); #endif return 1; diff --git a/src/d/actor/d_a_obj_swchain.cpp b/src/d/actor/d_a_obj_swchain.cpp index 05e9599880..49d6576b35 100644 --- a/src/d/actor/d_a_obj_swchain.cpp +++ b/src/d/actor/d_a_obj_swchain.cpp @@ -5,14 +5,14 @@ #include "d/dolzel_rel.h" // IWYU pragma: keep -#ifdef DEBUG +#if DEBUG #include "d/d_debug_viewer.h" #endif #include "d/actor/d_a_obj_swchain.h" #include "d/d_cc_d.h" #include "d/d_s_play.h" -#ifdef DEBUG +#if DEBUG class daObjSwChain_HIO_c : public mDoHIO_entry_c { public: /* 811C8DE0 */ daObjSwChain_HIO_c(); @@ -256,7 +256,7 @@ int daObjSwChain_c::create1st() { mOutNum = getOutNum(); mChainID = getChainID(); -#ifdef DEBUG +#if DEBUG if (mChainID != 0 && mChainID != 1 && mChainID != 2 && mChainID != 3) { // Chain Switch: Chain ID value is abnormal <%d> OS_REPORT_ERROR("チェーンスイッチ:鎖の番号が異常値です<%d>\n", mChainID); @@ -264,7 +264,7 @@ int daObjSwChain_c::create1st() { } #endif -#ifdef DEBUG +#if DEBUG if (mOutNum > mChainNum) { // Chain Switch: Argument 2 > Argument 1 ! OS_REPORT_ERROR("チェーンスイッチ:引数2>引数1になっています!\n"); @@ -272,7 +272,7 @@ int daObjSwChain_c::create1st() { } #endif -#ifdef DEBUG +#if DEBUG if (mHookShotLength > mChainNum) { // Chain Switch: Argument 3 > Argument 1 ! OS_REPORT_ERROR("チェーンスイッチ:引数3>引数1になっています!\n"); @@ -292,7 +292,7 @@ int daObjSwChain_c::create1st() { if (!Create()) { return cPhs_ERROR_e; } -#ifdef DEBUG +#if DEBUG // Chain Switch l_HIO.entryHIO("チェーンスイッチ"); #endif @@ -302,7 +302,7 @@ int daObjSwChain_c::create1st() { } int daObjSwChain_c::execute() { -#ifdef DEBUG +#if DEBUG if (l_HIO.mProcessStop) { return 1; } @@ -350,7 +350,7 @@ int daObjSwChain_c::execute() { cXyz cStack_68(mChains[getTopChainNo()].field_0x34); cXyz cStack_74(mChains[mChainNum].field_0x34); f32 fVar15 = cStack_74.abs(cStack_68); -#ifdef DEBUG +#if DEBUG if (fVar15 < (l_HIO.field_0xc * (mOutNum - 2)) || mCarry == 0) #else if (fVar15 < (35.0f * (mOutNum - 2)) || mCarry == 0) @@ -365,7 +365,7 @@ int daObjSwChain_c::execute() { case 4: case 6: if (mOutNum > field_0xa69) { -#ifdef DEBUG +#if DEBUG chains_p->field_0x34 += cStack_8c * l_HIO.mReturnSpeedHigh; #else chains_p->field_0x34 += cStack_8c * 30.0f; @@ -374,7 +374,7 @@ int daObjSwChain_c::execute() { field_0xa6b = 1; field_0xa6b = 1; } else { -#ifdef DEBUG +#if DEBUG chains_p->field_0x34 += cStack_8c * l_HIO.mReturnSpeedLow; #else chains_p->field_0x34 += cStack_8c * 15.0f; @@ -382,7 +382,7 @@ int daObjSwChain_c::execute() { } break; default: -#ifdef DEBUG +#if DEBUG chains_p->field_0x34 += cStack_8c * l_HIO.mReturnSpeed; #else chains_p->field_0x34 += cStack_8c * 2.0f; @@ -393,7 +393,7 @@ int daObjSwChain_c::execute() { if (field_0xa6c == 0) { cXyz pos = (daPy_getPlayerActorClass()->current.pos - home.pos); s16 abs_tmp = pos.atan2sX_Z() - shape_angle.y; -#ifdef DEBUG +#if DEBUG if (abs(abs_tmp) < l_HIO.mReactionAngle) { #else if (abs(abs_tmp) < 0xe74) { @@ -427,7 +427,7 @@ int daObjSwChain_c::execute() { } field_0xa9d = mCarry; -#ifdef DEBUG +#if DEBUG if (l_HIO.field_0x42 != 0) { if (l_HIO.field_0x44 == getChainID()) { dDbVw_Report(0x28, 200, "Num<%d>Len<%.2f>", getCurrentChainNum(), @@ -458,7 +458,7 @@ void daObjSwChain_c::chain_control() { cXyz* pcVar1 = &chains_p1->field_0x34; pcVar2 = pcVar1; f32 fVar2 = - #ifdef DEBUG + #if DEBUG l_HIO.mGravity; #else -6.0f; @@ -470,7 +470,7 @@ void daObjSwChain_c::chain_control() { fVar2 *= KREG_F(2) + 0.099999994f; } else { fVar2 = - #ifdef DEBUG + #if DEBUG l_HIO.mGravity; #else -6.0f; @@ -480,7 +480,7 @@ void daObjSwChain_c::chain_control() { fVar2 *= KREG_F(2) + 0.099999994f; } else { fVar2 = - #ifdef DEBUG + #if DEBUG l_HIO.mGravity; #else -6.0f; @@ -534,7 +534,7 @@ void daObjSwChain_c::chain_control() { sp94.normalizeZP(); f32 fVar3 = - #ifdef DEBUG + #if DEBUG l_HIO.field_0xc; #else 35.0f; @@ -542,7 +542,7 @@ void daObjSwChain_c::chain_control() { if (topChainNo == mChainNum - 1) { fVar3 = - #ifdef DEBUG + #if DEBUG l_HIO.field_0x10; #else 35.0f; @@ -550,7 +550,7 @@ void daObjSwChain_c::chain_control() { } if (fVar1 <= fVar3 - - #ifdef DEBUG + #if DEBUG l_HIO.field_0x14 #else 8.0f @@ -558,7 +558,7 @@ void daObjSwChain_c::chain_control() { ) { fVar1 = fVar3 - - #ifdef DEBUG + #if DEBUG l_HIO.field_0x14; #else 8.0f; @@ -604,7 +604,7 @@ void daObjSwChain_c::chain_control2() { mDoMtx_stack_c::get()[2][3] = 0.0f; mDoMtx_stack_c::multVec(&sp90, &sp90); sp78 += sp90; - #ifdef DEBUG + #if DEBUG field_0xac0 = sp78; #endif @@ -631,7 +631,7 @@ void daObjSwChain_c::chain_control2() { mDoMtx_stack_c::XrotM(-field_0xa6e); mDoMtx_stack_c::multVec(&sp78, &sp84); sp84 += field_0xa78; - #ifdef DEBUG + #if DEBUG field_0xac0 = sp84; #endif *pcVar1 = sp84; @@ -648,7 +648,7 @@ void daObjSwChain_c::chain_control2() { spb4.z = 0.0f; spb4.x = 0.0f; spb4.y *= - #ifdef DEBUG + #if DEBUG l_HIO.field_0x18; #else 0.0f; @@ -684,7 +684,7 @@ void daObjSwChain_c::chain_control2() { spcc.normalizeZP(); f32 fVar3 = - #ifdef DEBUG + #if DEBUG l_HIO.field_0xc; #else 35.0f; @@ -692,7 +692,7 @@ void daObjSwChain_c::chain_control2() { if (i == mChainNum - 1) { fVar3 = - #ifdef DEBUG + #if DEBUG l_HIO.field_0x10; #else 35.0f; @@ -700,7 +700,7 @@ void daObjSwChain_c::chain_control2() { } if (fVar1 <= fVar3 - - #ifdef DEBUG + #if DEBUG l_HIO.field_0x14 #else 8.0f @@ -708,7 +708,7 @@ void daObjSwChain_c::chain_control2() { ) { fVar1 = fVar3 - - #ifdef DEBUG + #if DEBUG l_HIO.field_0x14; #else 8.0f; @@ -805,7 +805,7 @@ void daObjSwChain_c::chain_count_control() { int roomNo = fopAcM_GetRoomNo(this); f32 fVar1 = sp60.abs(chains_p->field_0x34); f32 fVar2 = - #ifdef DEBUG + #if DEBUG l_HIO.field_0xc #else 35.0f @@ -819,7 +819,7 @@ void daObjSwChain_c::chain_count_control() { if (roomNo != 4 && roomNo != 6) { for (fVar1 -= fVar2; fVar1 > 0.0f;) { fVar1 -= - #ifdef DEBUG + #if DEBUG l_HIO.field_0xc; #else 35.0f; @@ -850,7 +850,7 @@ void daObjSwChain_c::chain_count_control() { chains_p2->field_0x34.z = (chains_p->field_0x34.z + sp60.z) * 0.5f; } } else if (fVar1 < - #ifdef DEBUG + #if DEBUG l_HIO.field_0xc #else 35.0f @@ -883,13 +883,13 @@ void daObjSwChain_c::chain_count_control() { topChain_p->field_0x34 = mChains->field_0x34; if ( (!bVar1 && pow > - #ifdef DEBUG + #if DEBUG l_HIO.mSwitchOnTension #else 10.0f #endif ) || (bVar1 && pow > - #ifdef DEBUG + #if DEBUG l_HIO.field_0x2c #else 1.5f @@ -916,13 +916,13 @@ void daObjSwChain_c::chain_count_control() { topChain_p->field_0x34 = mChains->field_0x34; if ( (!daPy_getPlayerActorClass()->checkBootsOrArmorHeavy() && pow > - #ifdef DEBUG + #if DEBUG l_HIO.mSwitchOnTension #else 10.0f #endif ) || (daPy_getPlayerActorClass()->checkBootsOrArmorHeavy() && pow > - #ifdef DEBUG + #if DEBUG l_HIO.field_0x2c #else 1.5f @@ -933,7 +933,7 @@ void daObjSwChain_c::chain_count_control() { if (getSwbit() != 0xFF) { if (!fopAcM_isSwitch(this, getSwbit()) && field_0xa68 > - #ifdef DEBUG + #if DEBUG l_HIO.mSwitchOnTime #else 0 @@ -992,7 +992,7 @@ void daObjSwChain_c::setTension() { f32 len = spc8.abs(spbc); f32 max = - #ifdef DEBUG + #if DEBUG l_HIO.field_0xc #else 35.0f @@ -1001,7 +1001,7 @@ void daObjSwChain_c::setTension() { if (roomNo == 4 || roomNo == 6) { max = (field_0xa67 + AREG_S(0) + -1) * - #ifdef DEBUG + #if DEBUG l_HIO.field_0xc; #else 35.0f; @@ -1032,7 +1032,7 @@ void daObjSwChain_c::setTension() { cXyz spe0(mChains->field_0x34 - mChains[mChainNum].field_0x34); player->setOutPower(pow, cM_atan2s(spe0.x, spe0.z), 0); - #ifdef DEBUG + #if DEBUG if (l_HIO.field_0x41 != 0) { dDbVw_Report(40, 260, "len<%.2f>max<%.2f>pow<%.2f>pl_spd<%.2f>", len, max, pow, player->getSpeedF()); } @@ -1050,7 +1050,7 @@ void daObjSwChain_c::setTension() { if (daPy_py_c::checkNowWolf()) { fVar1 = - #ifdef DEBUG + #if DEBUG l_HIO.mTensionWolf; #else 13.0f; @@ -1059,14 +1059,14 @@ void daObjSwChain_c::setTension() { f32 fVar7; if (daPy_getPlayerActorClass()->checkBootsOrArmorHeavy()) { fVar7 = - #ifdef DEBUG + #if DEBUG l_HIO.mTensionBootsEquipped; #else 2.1f; #endif } else { fVar7 = - #ifdef DEBUG + #if DEBUG l_HIO.mTension; #else 15.0f; @@ -1115,7 +1115,7 @@ int daObjSwChain_c::draw() { g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr); mDoExt_modelUpdateDL(mpModel); - #ifdef DEBUG + #if DEBUG if (l_HIO.field_0x41 != 0) { cXyz sp2c; mDoMtx_stack_c::YrotS(shape_angle.y); @@ -1165,7 +1165,7 @@ int daObjSwChain_c::draw() { int daObjSwChain_c::_delete() { dComIfG_resDelete(&mPhase, l_arcName); -#ifdef DEBUG +#if DEBUG l_HIO.removeHIO(); #endif return 1; diff --git a/src/d/actor/d_a_obj_swpush.cpp b/src/d/actor/d_a_obj_swpush.cpp index fbceaee644..d7a82cc7e3 100644 --- a/src/d/actor/d_a_obj_swpush.cpp +++ b/src/d/actor/d_a_obj_swpush.cpp @@ -347,7 +347,7 @@ void daObjSwpush::Act_c::rideCB(dBgW* i_bgw, fopAc_ac_c* i_ac, fopAc_ac_c* i_pt) cXyz spa8; int vtxnum = i_this->mpBgW->GetVtxNum(); - #ifdef DEBUG + #if DEBUG for (int i = 0; i < 4; i++) { JUT_ASSERT(859, M_op_vtx[i] < vtxnum); } diff --git a/src/d/actor/d_a_obj_thdoor.cpp b/src/d/actor/d_a_obj_thdoor.cpp index c181ec45be..868bdce1fa 100644 --- a/src/d/actor/d_a_obj_thdoor.cpp +++ b/src/d/actor/d_a_obj_thdoor.cpp @@ -11,7 +11,7 @@ #include "d/actor/d_a_player.h" #include "d/d_com_inf_game.h" -#ifdef DEBUG +#if DEBUG daObjThDoor_HIO_c::daObjThDoor_HIO_c() { } @@ -127,10 +127,10 @@ int daObjThDoor_c::create1st() { return rv; } - #ifdef DEBUG // Telma's door OS_REPORT("テルマの家のドア:sw<%d>msg<%d>\n", getSwbit(), getMsg()); + #if DEBUG // Telma's door l_HIO.entryHIO("テルマの家のドア"); #endif @@ -329,7 +329,7 @@ int daObjThDoor_c::Draw() { int daObjThDoor_c::Delete() { dComIfG_resDelete(&mPhase, l_arcName); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(); #endif diff --git a/src/d/actor/d_a_obj_toby.cpp b/src/d/actor/d_a_obj_toby.cpp index efda2a889a..620671511f 100644 --- a/src/d/actor/d_a_obj_toby.cpp +++ b/src/d/actor/d_a_obj_toby.cpp @@ -14,7 +14,7 @@ #include "f_op/f_op_camera_mng.h" #include "Z2AudioLib/Z2Instances.h" -#ifdef DEBUG +#if DEBUG #include "d/d_debug_viewer.h" #endif @@ -79,7 +79,7 @@ static int daObj_Toby_Draw(obj_toby_class* i_this) { } } - #ifdef DEBUG + #if DEBUG if (mDoCPd_c::getHoldY(PAD_2)) { GXColor local_104; local_104.r = 100; diff --git a/src/d/actor/d_a_obj_tobyhouse.cpp b/src/d/actor/d_a_obj_tobyhouse.cpp index f196f24419..da5fc97992 100644 --- a/src/d/actor/d_a_obj_tobyhouse.cpp +++ b/src/d/actor/d_a_obj_tobyhouse.cpp @@ -13,7 +13,7 @@ #include "f_op/f_op_camera_mng.h" #include "Z2AudioLib/Z2Instances.h" -#ifdef DEBUG +#if DEBUG daObjTobyHouse_HIO_c l_HIO; daObjTobyHouse_HIO_c::daObjTobyHouse_HIO_c() { @@ -153,7 +153,7 @@ int daObjTobyHouse_c::Create() { for (int i = 0; i < 2; i++) { mEventIds[i] = (s16)dComIfGp_getEventManager().getEventIdx(this, l_event_name[i], 0xff); - #ifdef DEBUG + #if DEBUG if (mEventIds[i] == -1) { // Cannon shed - failure to obtain event OS_REPORT_ERROR("大砲小屋:イベント取得失敗\n"); @@ -236,7 +236,7 @@ int daObjTobyHouse_c::create1st() { return rv; } - #ifdef DEBUG + #if DEBUG // Toby's Cannon Shack l_HIO.entryHIO("トビーの大砲小屋"); #endif @@ -519,7 +519,7 @@ int daObjTobyHouse_c::Draw() { mDoExt_bckAnmRemove(mModel->getModelData()); } - #ifdef DEBUG + #if DEBUG if (l_HIO.mDrawCollision) { mpBgW->CalcPlane(); } @@ -572,7 +572,7 @@ int daObjTobyHouse_c::Delete() { dComIfG_resDelete(&mPhase, l_arcName[mType]); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(); #endif return 1; diff --git a/src/d/actor/d_a_obj_togeTrap.cpp b/src/d/actor/d_a_obj_togeTrap.cpp index 0c12d3f554..335ce5b8a3 100644 --- a/src/d/actor/d_a_obj_togeTrap.cpp +++ b/src/d/actor/d_a_obj_togeTrap.cpp @@ -95,7 +95,7 @@ int daTogeTrap_c::create() { init_modeWait(); setBaseMtx(); - #ifdef DEBUG + #if DEBUG // Spike traps l_HIO.entryHIO("トゲトラップ"); #endif @@ -268,7 +268,7 @@ int daTogeTrap_c::Draw() { int daTogeTrap_c::Delete() { dComIfG_resDelete(&mPhase, "P_Toge"); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(this); #endif diff --git a/src/d/actor/d_a_obj_tombo.cpp b/src/d/actor/d_a_obj_tombo.cpp index 8c45cd2a45..617ae6ee6d 100644 --- a/src/d/actor/d_a_obj_tombo.cpp +++ b/src/d/actor/d_a_obj_tombo.cpp @@ -19,7 +19,7 @@ public: daObj_TomHIO_c(); virtual ~daObj_TomHIO_c() {} - #ifdef DEBUG + #if DEBUG void genMessage(JORMContext* context) { // Golden dragonfly context->genLabel("黄金蟲(トンボ)", 0x80000001, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); diff --git a/src/d/actor/d_a_obj_treesh.cpp b/src/d/actor/d_a_obj_treesh.cpp index 465d355bbe..de87cf879b 100644 --- a/src/d/actor/d_a_obj_treesh.cpp +++ b/src/d/actor/d_a_obj_treesh.cpp @@ -88,7 +88,7 @@ int daTreeSh_c::create1st() { return cPhs_ERROR_e; } -#ifdef DEBUG +#if DEBUG l_HIO.entryHIO("針葉樹"); #endif } @@ -128,7 +128,7 @@ int daTreeSh_c::Draw() { int daTreeSh_c::Delete() { dComIfG_resDelete(&mPhase, l_arcName); -#ifdef DEBUG +#if DEBUG l_HIO.removeHIO(); #endif return 1; diff --git a/src/d/actor/d_a_obj_twGate.cpp b/src/d/actor/d_a_obj_twGate.cpp index 05cee13772..4df7a162a7 100644 --- a/src/d/actor/d_a_obj_twGate.cpp +++ b/src/d/actor/d_a_obj_twGate.cpp @@ -28,7 +28,7 @@ daTwGate_HIO_c::daTwGate_HIO_c() { mRange = 1900.0f; } -#ifdef DEBUG +#if DEBUG void daTwGate_HIO_c::genMessage(JORMContext* ctx) { // Range ctx->genSlider("範囲", &mRange, 0.0f, 500000.0f, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); @@ -139,7 +139,7 @@ int daTwGate_c::create() { mLine.SetStartEnd(l_cheeckPos0[mGateType], l_cheeckPos1[mGateType]); mBrk.setPlaySpeed(-1.0f); - #ifdef DEBUG + #if DEBUG // Twilight Gate l_HIO.entryHIO("トワイライトゲート"); #endif @@ -186,7 +186,7 @@ int daTwGate_c::Draw() { int daTwGate_c::Delete() { dComIfG_resDelete(&mPhase, l_resNameIdx[mGateType]); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(this); #endif diff --git a/src/d/actor/d_a_obj_volcbom.cpp b/src/d/actor/d_a_obj_volcbom.cpp index 935311f4cc..78bdcb22d7 100644 --- a/src/d/actor/d_a_obj_volcbom.cpp +++ b/src/d/actor/d_a_obj_volcbom.cpp @@ -15,7 +15,7 @@ #include "d/d_com_inf_game.h" #include "d/d_meter2_info.h" -#ifdef DEBUG +#if DEBUG daObjVolcBom_HIO_c::daObjVolcBom_HIO_c() { } @@ -118,7 +118,7 @@ int daObjVolcBom_c::Create() { } } - #ifdef DEBUG + #if DEBUG if (mEffectJntNo != 0xffff) { mBtk1->entry(mModel1->getModelData()); mModel1->calcMaterial(); @@ -211,7 +211,7 @@ int daObjVolcBom_c::create1st() { return rv; } - #ifdef DEBUG + #if DEBUG // The Great Lava Bombs l_HIO.entryHIO("大溶岩弾"); #endif @@ -227,7 +227,7 @@ int daObjVolcBom_c::Execute(Mtx** i_mtx) { mBtk1->play(); mBrk1->play(); - #ifdef DEBUG + #if DEBUG if (l_HIO.field_0x14 != 0) { switch (mMode) { case MODE_WAIT_APPEAR: @@ -260,7 +260,7 @@ void daObjVolcBom_c::mode_proc_call() { cXyz scale(mBaseScale, mBaseScale, mBaseScale); mModel1->setBaseScale(scale); - #ifdef DEBUG + #if DEBUG if (l_HIO.field_0x15 != 0) { fopAc_ac_c* player = dComIfGp_getPlayer(0); current.pos.x = player->current.pos.x; @@ -800,7 +800,7 @@ int daObjVolcBom_c::Draw() { mModel1->calc(); } - #ifdef DEBUG + #if DEBUG if (l_HIO.field_0x34 != 0) { cXyz cStack_24; @@ -835,7 +835,7 @@ int daObjVolcBom_c::Draw() { } int daObjVolcBom_c::Delete() { - #ifdef DEBUG + #if DEBUG if (l_HIO.field_0x04 != 0) { fopAcM_offSwitch(this, getSwbit()); } @@ -850,7 +850,7 @@ int daObjVolcBom_c::Delete() { endBindEffect(); dComIfG_resDelete(&mPhase, l_arcName); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(); #endif diff --git a/src/d/actor/d_a_obj_warp_kbrg.cpp b/src/d/actor/d_a_obj_warp_kbrg.cpp index 8c66522d24..5cc6be037f 100644 --- a/src/d/actor/d_a_obj_warp_kbrg.cpp +++ b/src/d/actor/d_a_obj_warp_kbrg.cpp @@ -127,7 +127,7 @@ int daObjWarpKBrg_c::Create() { } } - #ifdef DEBUG + #if DEBUG if (mEffJointNo == 0xFFFF) { // "Kakariko Bridge: joint effect_p not found" OSReport_Error("カカリコ橋;ジョイント effect_p が見つかりませんでした\n"); diff --git a/src/d/actor/d_a_obj_waterGate.cpp b/src/d/actor/d_a_obj_waterGate.cpp index aefe9d1e19..83731e4b54 100644 --- a/src/d/actor/d_a_obj_waterGate.cpp +++ b/src/d/actor/d_a_obj_waterGate.cpp @@ -23,7 +23,7 @@ daWtGate_HIO_c::daWtGate_HIO_c() { field_0x9 = 4; } -#ifdef DEBUG +#if DEBUG void daWtGate_HIO_c::genMessage(JORMContext* ctx) { // "Maximum speed" ctx->genSlider("最大速度", &mMaxSpeed, 0.1, 500.0, 0, NULL, 0xffff, 0xffff, 0x200, 0x18); @@ -82,7 +82,7 @@ cPhs__Step daWtGate_c::create() { // "Sluice gate(Lv3)" - #ifdef DEBUG + #if DEBUG l_HIO.entryHIO("水門(Lv3)"); #endif } @@ -180,7 +180,7 @@ int daWtGate_c::Draw() { int daWtGate_c::Delete() { dComIfG_resDelete(&mPhase, "S_Zsuimon"); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(); #endif diff --git a/src/d/actor/d_a_obj_wood_statue.cpp b/src/d/actor/d_a_obj_wood_statue.cpp index b541439e4b..0a13402949 100644 --- a/src/d/actor/d_a_obj_wood_statue.cpp +++ b/src/d/actor/d_a_obj_wood_statue.cpp @@ -12,7 +12,7 @@ #include "d/d_item_data.h" #include "d/d_s_play.h" -#ifdef DEBUG +#if DEBUG class daObjWStatue_HIO_c : public fOpAcm_HIO_entry_c { public: @@ -125,7 +125,7 @@ int daObjWStatue_c::Create() { eventInfo.setArchiveName(l_arcName); mEventIdx = (s16)dComIfGp_getEventManager().getEventIdx(this, l_eventName, 0xff); - #ifdef DEBUG + #if DEBUG if (mEventIdx == -1) { // Wooden statue: Event acquisition failure OS_REPORT_ERROR("木彫りの像:イベント取得失敗\n"); @@ -159,7 +159,7 @@ int daObjWStatue_c::create() { return cPhs_ERROR_e; } - #ifdef DEBUG + #if DEBUG // Wooden statue l_HIO.entryHIO("木彫りの像"); #endif @@ -279,7 +279,7 @@ int daObjWStatue_c::actionSwOnWait() { switch (field_0x93a) { case 0: if (iVar2 == NULL) { - #ifdef DEBUG + #if DEBUG mRespawnTimer = l_HIO.mRespawnTimer; #else mRespawnTimer = 30; @@ -438,7 +438,7 @@ void daObjWStatue_c::setListStart() {} int daObjWStatue_c::_delete() { DeleteBase(dItem_data::getFieldArc(m_itemNo)); - #ifdef DEBUG + #if DEBUG l_HIO.removeHIO(this); #endif diff --git a/src/d/actor/d_a_passer_mng.cpp b/src/d/actor/d_a_passer_mng.cpp index 2218b10a10..fc7836276b 100644 --- a/src/d/actor/d_a_passer_mng.cpp +++ b/src/d/actor/d_a_passer_mng.cpp @@ -572,7 +572,7 @@ void daPasserMng_c::create_init() { ind++; } } - #ifdef DEBUG + #if DEBUG OS_REPORT("初期ばらまき位置 Path=%d ", getPathID()); for (int i = 0; i < max; i++) { OS_REPORT("%d, ", arr[i]); diff --git a/src/d/actor/d_a_swc00.cpp b/src/d/actor/d_a_swc00.cpp index 96c53a8ee5..89d319ae89 100644 --- a/src/d/actor/d_a_swc00.cpp +++ b/src/d/actor/d_a_swc00.cpp @@ -55,7 +55,7 @@ static BOOL hitCheck(daSwc00_c* i_swc) { return FALSE; } -#ifdef DEBUG +#if DEBUG int daSwc00_Draw(daSwc00_c* i_this) { fopAc_ac_c* a_this = i_this; @@ -329,7 +329,7 @@ static actor_method_class l_daSwc00_Method = { (process_method_func)daSwc00_Delete, (process_method_func)daSwc00_Execute, (process_method_func)daSwc00_IsDelete, - #ifdef DEBUG + #if DEBUG (process_method_func)daSwc00_Draw, #else NULL diff --git a/src/d/actor/d_a_tag_shop_item.cpp b/src/d/actor/d_a_tag_shop_item.cpp index a16c01d993..be9557c131 100644 --- a/src/d/actor/d_a_tag_shop_item.cpp +++ b/src/d/actor/d_a_tag_shop_item.cpp @@ -27,25 +27,19 @@ int daTag_ShopItem_c::create() { if (getGroupID() == 15) { mCreateTimer = 150; -#ifdef DEBUG // "Event Item\n" - OSReport("イベントアイテム\n"); -#endif + OS_REPORT("イベントアイテム\n"); if (getSwitchBit1() != 0xFF) { if (!dComIfGs_isSaveSwitch(getSwitchBit1())) { dComIfGs_onSaveSwitch(getSwitchBit2()); field_0x572 = true; mCreateTimer = 0; -#ifdef DEBUG // "Before Talk\n" - OSReport("会話前\n"); -#endif + OS_REPORT("会話前\n"); } else { -#ifdef DEBUG // "After Talk\n" - OSReport("会話後\n"); -#endif + OS_REPORT("会話後\n"); } } } else { @@ -54,20 +48,16 @@ int daTag_ShopItem_c::create() { if (getSwitchBit1() != 0xFF) { if (dComIfGs_isSaveSwitch(getSwitchBit1())) { mCreateTimer = 150; -#ifdef DEBUG // "Already Sold\n" - OSReport("もう売れたよ\n"); -#endif + OS_REPORT("もう売れたよ\n"); } } if (getSwitchBit2() != 0xFF) { if (!dComIfGs_isSaveSwitch(getSwitchBit2())) { mCreateTimer = 150; -#ifdef DEBUG // "Not sold yet\n" - OSReport("まだ売れない\n"); -#endif + OS_REPORT("まだ売れない\n"); } } } diff --git a/src/d/actor/d_a_tbox.cpp b/src/d/actor/d_a_tbox.cpp index 34b5811972..fcbdbd8c25 100644 --- a/src/d/actor/d_a_tbox.cpp +++ b/src/d/actor/d_a_tbox.cpp @@ -1299,7 +1299,7 @@ u8 daTbox_c::getBombItemNoMain(u8 i_itemNo) { } } -#ifdef DEBUG +#if DEBUG // "====Bomb Bag count is %d====\n" OS_REPORT("====バクダン袋の数は %d 個です====\n", bag_count); for (int i = 0; i < 3; i++) { diff --git a/src/d/actor/d_a_vrbox2.cpp b/src/d/actor/d_a_vrbox2.cpp index 550fe2c21a..346ce45c97 100644 --- a/src/d/actor/d_a_vrbox2.cpp +++ b/src/d/actor/d_a_vrbox2.cpp @@ -107,7 +107,7 @@ static int daVrbox2_Draw(vrbox2_class* i_this) { var_f31 = dStage_FileList_dt_SeaLevel(filelist_p); } -#ifdef DEBUG +#if DEBUG if (g_kankyoHIO.vrbox.field_0x14 != 0) { var_f31 = g_kankyoHIO.vrbox.m_horizonHeight; } else { @@ -139,7 +139,7 @@ static int daVrbox2_Draw(vrbox2_class* i_this) { cXyz sp14; sp14 = sun_p->mPos[0]; -#ifndef DEBUG +#if !DEBUG cXyz sp8; if (strcmp(dComIfGp_getStartStageName(), "F_SP102") == 0) { dKyr_get_vectle_calc(&camera_p->lookat.eye, &g_env_light.sun_pos, &sp8); diff --git a/src/d/actor/d_a_warp_bug.cpp b/src/d/actor/d_a_warp_bug.cpp index 3a021961b8..ea16657ddd 100644 --- a/src/d/actor/d_a_warp_bug.cpp +++ b/src/d/actor/d_a_warp_bug.cpp @@ -53,15 +53,11 @@ static int daWarpBug_Draw(daWarpBug_c* i_this) { } int daWarpBug_c::draw() { -#ifdef DEBUG +#if DEBUG daPy_py_c* player_p = (daPy_py_c*)dComIfGp_getPlayer(0); if (!player_p->checkMidnaWarp()) { -#endif - field_0x57c = 0; return 1; - -#ifdef DEBUG } cLib_chaseS(&field_0x57c, 255, 25); @@ -94,20 +90,22 @@ int daWarpBug_c::draw() { mpBtk->entry(modelData); mDoExt_modelUpdateDL(mpModel); dComIfGd_setList(); +#else + field_0x57c = 0; +#endif return 1; -#endif } int daWarpBug_c::execute() { -#ifdef DEBUG +#if DEBUG daPy_py_c* player_p = (daPy_py_c*)dComIfGp_getPlayer(0); #endif mDoMtx_stack_c::copy(mpModel->getBaseTRMtx()); mDoMtx_stack_c::multVecZero(¤t.pos); -#ifdef DEBUG +#if DEBUG if (player_p->checkMidnaWarp()) { mpBrk->play(); mpBtk->play(); diff --git a/src/d/actor/d_a_ykgr.cpp b/src/d/actor/d_a_ykgr.cpp index 9a33c16168..208d44d0d7 100644 --- a/src/d/actor/d_a_ykgr.cpp +++ b/src/d/actor/d_a_ykgr.cpp @@ -29,7 +29,7 @@ struct daYkgr_HIO_c : public mDoHIO_entry_c { /* 0x24 */ f32 field_0x24; }; -#ifdef DEBUG +#if DEBUG void daYkgr_HIO_c::genMessage(JORMContext* ctx) { ctx->genLabel("竜の山陽炎HIO", 0, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); ctx->genSlider("アルファ速度", &field_0xc, 0, 255, 0, NULL, 0xFFFF, 0xFFFF, 0x200, 0x18); @@ -155,7 +155,7 @@ inline int daYkgr_c::_create() { field_0x5a8 = 0.0f; stop(); } -#ifdef DEBUG +#if DEBUG l_HIO.entryHIO("竜の山陽炎"); #endif } else { @@ -177,7 +177,7 @@ static int daYkgrCreate(void* i_this) { } inline int daYkgr_c::_delete() { -#ifdef DEBUG +#if DEBUG l_HIO.removeHIO(); #endif return 1; @@ -250,13 +250,10 @@ inline int daYkgr_c::_draw() { set_mtx(); if (m_emitter != NULL) { m_emitter->setGlobalRTMatrix(field_0x570); -#ifdef DEBUG - if (l_HIO.field_0x4 != 0) { + if (DEBUG && l_HIO.field_0x4 != 0) { m_emitter->setGlobalAlpha(l_HIO.field_0x8); YkgrCB.setParam(l_HIO.field_0x10); - } else -#endif - { + } else { m_emitter->setGlobalAlpha(m_alpha); } } diff --git a/src/d/actor/d_flower.inc b/src/d/actor/d_flower.inc index f798a78a3e..de57e158ee 100644 --- a/src/d/actor/d_flower.inc +++ b/src/d/actor/d_flower.inc @@ -569,19 +569,15 @@ void dFlower_packet_c::draw() { dKy_setLight_nowroom_grass(sp50->room_no, 1.0f); for (dFlower_data_c* sp44 = sp5C->getData(); sp44 != NULL; sp44 = sp44->mp_next) { -#if DEBUG - if (g_kankyoHIO.navy.grass_adjust_ON != 0) { + if (DEBUG && g_kankyoHIO.navy.grass_adjust_ON != 0) { sp64.r = g_kankyoHIO.navy.grass_ambcol.r * 2; sp64.g = g_kankyoHIO.navy.grass_ambcol.g * 2; sp64.b = g_kankyoHIO.navy.grass_ambcol.b * 2; } else { -#endif sp64.r = (sp44->field_0x04 & 0x1F) * 2; sp64.g = ((sp44->field_0x04 >> 5) & 0x1F) * 2; sp64.b = ((sp44->field_0x04 >> 0xA) & 0x1F) * 2; -#if DEBUG } -#endif if (daPy_py_c::checkNowWolfPowerUp()) { f32 var_f31 = g_env_light.bg_amb_col[0].r / 255.0f; diff --git a/src/d/actor/d_grass.inc b/src/d/actor/d_grass.inc index e5f470b74a..759bbe0f09 100644 --- a/src/d/actor/d_grass.inc +++ b/src/d/actor/d_grass.inc @@ -642,13 +642,11 @@ void dGrass_packet_c::draw() { GXColor sp38; -#if DEBUG - if (g_kankyoHIO.navy.grass_adjust_ON) { + if (DEBUG && g_kankyoHIO.navy.grass_adjust_ON) { sp38.r = g_kankyoHIO.navy.grass_ambcol.r * 2; sp38.g = g_kankyoHIO.navy.grass_ambcol.g * 2; sp38.b = g_kankyoHIO.navy.grass_ambcol.b * 2; } else { -#endif sp38.r = (var_r29->m_addCol & 0x1F) * 2; sp38.g = ((var_r29->m_addCol >> 5) & 0x1F) * 2; sp38.b = ((var_r29->m_addCol >> 0xA) & 0x1F) * 2; @@ -693,9 +691,7 @@ void dGrass_packet_c::draw() { } else { sp38.b = sp38.b * var_f28; } -#ifdef DEBUG } -#endif GXSetChanAmbColor(GX_COLOR0A0, sp38); diff --git a/src/d/d_attention.cpp b/src/d/d_attention.cpp index bfc7628675..d41cef2b19 100644 --- a/src/d/d_attention.cpp +++ b/src/d/d_attention.cpp @@ -1196,11 +1196,9 @@ void dAttention_c::judgementStatus4Hold() { } } -#if DEBUG if (var_r29 != mAttnStatus) { OS_REPORT("%06d: attention: status %d, %d -> %d (%d)\n", g_Counter.mCounter0, mLockonCount, var_r29, mAttnStatus, var_r30); } -#endif } void dAttention_c::judgementStatus4Switch() { @@ -1320,11 +1318,9 @@ void dAttention_c::judgementStatus4Switch() { } } -#if DEBUG if (var_r29 != mAttnStatus) { OS_REPORT("%06d: attention: status %d, %d -> %d (%d)\n", g_Counter.mCounter0, mLockonCount, var_r29, mAttnStatus, var_r30); } -#endif } int dAttention_c::Run() { diff --git a/src/d/d_bg_w_kcol.cpp b/src/d/d_bg_w_kcol.cpp index f08202e857..b618cc0b6a 100644 --- a/src/d/d_bg_w_kcol.cpp +++ b/src/d/d_bg_w_kcol.cpp @@ -1004,7 +1004,7 @@ struct wcs_data { static wcs_data l_wcsbuf[84]; -#ifdef DEBUG +#if DEBUG static u8 lit_5300[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; @@ -1168,7 +1168,7 @@ bool dBgWKCol::WallCorrectSort(dBgS_Acch* pwi) { sp_e8 = &l_wcsbuf[wcsIndex_e4]; wcsIndex_e4++; } else { - #ifdef DEBUG + #if DEBUG lit_5300[0] = 1; #endif } @@ -1182,7 +1182,7 @@ bool dBgWKCol::WallCorrectSort(dBgS_Acch* pwi) { // local_118->_0 = l_wcsbuf[local_11c]._0; wcsIndex_e4++; } else { - #ifdef DEBUG + #if DEBUG lit_5300[0] = 1; #endif } @@ -1197,7 +1197,7 @@ bool dBgWKCol::WallCorrectSort(dBgS_Acch* pwi) { sp_a8->next = &l_wcsbuf[wcsIndex_e4]; wcsIndex_e4++; } else { - #ifdef DEBUG + #if DEBUG lit_5300[0] = 1; #endif } @@ -1217,7 +1217,7 @@ bool dBgWKCol::WallCorrectSort(dBgS_Acch* pwi) { sp_a8->next = &l_wcsbuf[wcsIndex_e4]; wcsIndex_e4++; } else { - #ifdef DEBUG + #if DEBUG lit_5300[0] = 1; #endif } diff --git a/src/d/d_com_inf_game.cpp b/src/d/d_com_inf_game.cpp index 5bc923bbf3..d99996c45c 100644 --- a/src/d/d_com_inf_game.cpp +++ b/src/d/d_com_inf_game.cpp @@ -1783,7 +1783,7 @@ void dComIfGs_gameStart() { dComIfGp_setNextStage(name, point, roomNo, -1, 0.0f, 0, 1, 0, 0, 0, 0); } -#ifdef DEBUG +#if DEBUG void dComIfG_playerStatusD() { dComIfGs_setDataNum(0); dComIfGs_setMaxLife(50); diff --git a/src/d/d_demo.cpp b/src/d/d_demo.cpp index 29c15637e5..f199a7a3b9 100644 --- a/src/d/d_demo.cpp +++ b/src/d/d_demo.cpp @@ -28,7 +28,7 @@ void jstudio_tAdaptor_message::adaptor_do_MESSAGE(JStudio::data::TEOperationData break; } default: -#ifdef DEBUG +#if DEBUG JGadget_outMessage msg(JGadget_outMessage::warning, __FILE__, 124); msg << "unknown data-type : " << iType << "\n demo-object : " << adaptor_getID_string(); int x = 0; @@ -96,7 +96,7 @@ dDemo_actor_c::~dDemo_actor_c() { mBtkId = -1; mBrkId = -1; - #ifdef DEBUG + #if DEBUG if(dComIfGp_event_getMode() == 0) { g_dComIfG_gameInfo.play.getEvent().setDebugStb(0); } diff --git a/src/d/d_ev_camera.cpp b/src/d/d_ev_camera.cpp index 3d73e1ef2e..6494dacb34 100644 --- a/src/d/d_ev_camera.cpp +++ b/src/d/d_ev_camera.cpp @@ -512,7 +512,7 @@ bool dCamera_c::fixedFrameEvCamera() { fframe_p->field_0x0 = getEvIntData(&fframe_p->mTimer, "Timer", -1); getEvStringData(fframe_p->mRelUseMask, "RelUseMask", "oo"); -#ifdef DEBUG +#if DEBUG if (strlen(fframe_p->mRelUseMask) != 2) { OSReport("camera: event: bad length -> xx\n"); strcpy(fframe_p->mRelUseMask, "xx"); @@ -1892,7 +1892,7 @@ bool dCamera_c::maptoolIdEvCamera() { if (mEventData.field_0xc != 0xFF) { s32 style = mCamTypeData[mEventData.field_0xc].field_0x18[mIsWolf][0]; -#ifdef DEBUG +#if DEBUG if (mCurCamStyleTimer == 0) { OSReport("type %d mode %d style %d\n", mEventData.field_0xc, 0, style); } @@ -2541,7 +2541,7 @@ bool dCamera_c::tactEvCamera() { } } -#ifdef DEBUG +#if DEBUG if (mCamSetup.CheckFlag(0x8000)) { dDbVw_Report(20, 250, " %d", tact_p->field_0x0); } @@ -2647,7 +2647,7 @@ bool dCamera_c::loadEvCamera() { dComIfGp_loadCameraPosition(0, &load->field_0x28, &load->field_0x34, &load->field_0x48, &local_b0); load->field_0x42 = cSAngle(local_b0); } else { -#ifdef DEBUG +#if DEBUG if (mSavedViewStack[load->mSlot].field_0x1e == 0 || load->mSlot >= 2) { OS_REPORT("camera: event: LOAD: warning!! slot %d not saved\n", load->mSlot); } @@ -3417,7 +3417,7 @@ bool dCamera_c::fixedFramesEvCamera() { fframes_p->field_0x0 = getEvIntData(&fframes_p->mTimer, "Timer", const_1_val); getEvStringData(&fframes_p->mRelUseMask, "RelUseMask", "oo"); -#ifdef DEBUG +#if DEBUG if (strlen(&fframes_p->mRelUseMask) != 2) { OSReport("camera: event: bad length -> xx\n"); strcpy(&fframes_p->mRelUseMask, "xx"); @@ -3959,7 +3959,7 @@ bool dCamera_c::bspTransEvCamera() { bspTrans->mSplinePath1.Step(); getEvStringData(use1, "Use1", "ooxxxx"); -#ifdef DEBUG +#if DEBUG if (strlen(use1) != 6) { OSReport("camera: event: bad length -> xxxxxx\n"); strcpy(use1, "xxxxxx"); @@ -3979,7 +3979,7 @@ bool dCamera_c::bspTransEvCamera() { bspTrans->mSplinePath2.Step(); getEvStringData(use2, "Use2", "xxooox"); -#ifdef DEBUG +#if DEBUG if (strlen(use2) != 6) { OSReport_Error("camera: event: bad length -> xxxxxx\n"); strcpy(use2, "xxxxxx"); @@ -3994,7 +3994,7 @@ bool dCamera_c::bspTransEvCamera() { if (bspTrans->mRelActor) { getEvStringData(&bspTrans->mRelUseMask, "RelUseMask", "oo"); -#ifdef DEBUG +#if DEBUG if (strlen(&bspTrans->mRelUseMask) != 2) { OSReport_Error("camera: event: bad length -> xx\n"); strcpy(&bspTrans->mRelUseMask, "xx"); diff --git a/src/d/d_event_debug.cpp b/src/d/d_event_debug.cpp index 10fecd3cf4..91aa103807 100644 --- a/src/d/d_event_debug.cpp +++ b/src/d/d_event_debug.cpp @@ -1,4 +1,3 @@ -#ifdef DEBUG #include "d/dolzel.h" // IWYU pragma: keep #include "d/d_event_debug.h" @@ -447,5 +446,3 @@ char* dEvDb_flag_base_c::searchDirNameReg(int bit) { return NULL; } - -#endif diff --git a/src/d/d_event_manager.cpp b/src/d/d_event_manager.cpp index ef7a0572ae..f6efd6d107 100644 --- a/src/d/d_event_manager.cpp +++ b/src/d/d_event_manager.cpp @@ -641,14 +641,12 @@ void dEvent_manager_c::Sequencer() { break; } - if ( + if ((dStage_MapEvent_dt_c_getEventSCutSW(mapdata) != 0 #if DEBUG - (dStage_MapEvent_dt_c_getEventSCutSW(mapdata) != 0 || l_HIO.m_enable_skip) && - #else - dStage_MapEvent_dt_c_getEventSCutSW(mapdata) != 0 && + || l_HIO.m_enable_skip #endif - !evtControl.chkFlag2(2) - ) { + ) && + !evtControl.chkFlag2(2)) { int scut_type = dStage_MapEvent_dt_c_getEventSCutType(mapdata); if (scut_type == 2) { evtControl.onSkipFade(); diff --git a/src/d/d_kankyo.cpp b/src/d/d_kankyo.cpp index 013995e0c1..5c9deff6ed 100644 --- a/src/d/d_kankyo.cpp +++ b/src/d/d_kankyo.cpp @@ -517,30 +517,32 @@ void dKy_twi_wolflight_set(int light_id) { if (g_kankyoHIO.navy.room_light_type != 0) { size = g_kankyoHIO.navy.room_light_type - 1; } - - if (!g_kankyoHIO.navy.camera_light_adjust_ON) { #endif - switch (size) { - case LIGHT_SIZE_S: - kankyo->field_0x0c18[light_id].mPos.y += 1500.0f; - break; - case LIGHT_SIZE_M: - kankyo->field_0x0c18[light_id].mPos.y += 500.0f; - break; - case LIGHT_SIZE_L: - kankyo->field_0x0c18[light_id].mPos.y += 1000.0f; - break; - case LIGHT_SIZE_LL: - kankyo->field_0x0c18[light_id].mPos.y += 1500.0f; - break; - default: - kankyo->field_0x0c18[light_id].mPos.y += 500.0f; - break; + #if DEBUG + if (!g_kankyoHIO.navy.camera_light_adjust_ON) + #endif + { + switch (size) { + case LIGHT_SIZE_S: + kankyo->field_0x0c18[light_id].mPos.y += 1500.0f; + break; + case LIGHT_SIZE_M: + kankyo->field_0x0c18[light_id].mPos.y += 500.0f; + break; + case LIGHT_SIZE_L: + kankyo->field_0x0c18[light_id].mPos.y += 1000.0f; + break; + case LIGHT_SIZE_LL: + kankyo->field_0x0c18[light_id].mPos.y += 1500.0f; + break; + default: + kankyo->field_0x0c18[light_id].mPos.y += 500.0f; + break; + } } - #if DEBUG - } else { + else { kankyo->field_0x0c18[light_id].mPos.y += g_kankyoHIO.navy.camera_light_y_shift; } #endif @@ -1072,10 +1074,8 @@ static void plight_set() { dKy_plight_set(&g_env_light.mLightInfluence[plight_no]); plight_no++; } else { -#ifdef DEBUG // "\nToo many Point Lights set!!!" - OSReport_Warning("\nポイントライトマップ配置が多すぎます!!!"); -#endif + OS_WARNING("\nポイントライトマップ配置が多すぎます!!!"); } } } @@ -1460,10 +1460,7 @@ static void envcolor_init() { } #endif - #if DEBUG - if (g_env_light.time_change_rate < 1000.0f) - #endif - { + if (!DEBUG || g_env_light.time_change_rate < 1000.0f) { stage_stag_info_class* stageinfo = dComIfGp_getStage()->getStagInfo(); int stage_time = dStage_stagInfo_GetTimeH(stageinfo); if ((s8)stage_time >= 0) { @@ -1471,14 +1468,11 @@ static void envcolor_init() { } } - #if DEBUG - if (g_env_light.time_change_rate >= 2000.0f) { + if (DEBUG && g_env_light.time_change_rate >= 2000.0f) { g_env_light.time_change_rate = 0.03f; - } else if (g_env_light.time_change_rate >= 1000.0f) { + } else if (DEBUG && g_env_light.time_change_rate >= 1000.0f) { g_env_light.time_change_rate = 0.0f; - } else - #endif - { + } else { g_env_light.time_change_rate = 0.012f; } diff --git a/src/d/d_kankyo_data.cpp b/src/d/d_kankyo_data.cpp index 0bb6db6d57..c572533fde 100644 --- a/src/d/d_kankyo_data.cpp +++ b/src/d/d_kankyo_data.cpp @@ -773,10 +773,7 @@ static GXFogAdjTable S_xfog_table_data[2] = { }; void dKyd_xfog_table_set(u8 tblIdx) { - #if DEBUG - if (g_kankyoHIO.light.field_0x5 != 1) - #endif - { + if (!(DEBUG && g_kankyoHIO.light.field_0x5 == 1)) { for (int i = 0; i < 10; i++) { g_env_light.mXFogTbl.r[i] = S_xfog_table_data[tblIdx].r[i]; } diff --git a/src/d/d_kankyo_rain.cpp b/src/d/d_kankyo_rain.cpp index e030ea5553..0676ae8ec2 100644 --- a/src/d/d_kankyo_rain.cpp +++ b/src/d/d_kankyo_rain.cpp @@ -1859,7 +1859,7 @@ void vrkumo_move() { if (filelist != NULL) { sp2C = dStage_FileList_dt_SeaLevel(filelist); - #ifdef DEBUG + #if DEBUG if (g_kankyoHIO.vrbox.field_0x14) { sp2C = g_kankyoHIO.vrbox.m_horizonHeight; } else { @@ -4624,7 +4624,7 @@ void drawVrkumo(Mtx drawMtx, GXColor& color, u8** tex) { sp70 = dStage_FileList_dt_SeaLevel(filelist); } -#ifdef DEBUG +#if DEBUG if (g_kankyoHIO.vrbox.field_0x14) { sp70 = g_kankyoHIO.vrbox.m_horizonHeight; } else { @@ -4714,7 +4714,7 @@ void drawVrkumo(Mtx drawMtx, GXColor& color, u8** tex) { static f32 howa_loop_cnt = 0.0f; -#ifdef DEBUG +#if DEBUG spAC = g_kankyoHIO.navy.cloud_sunny_size; spA8 = g_kankyoHIO.navy.cloud_cloudy_size; #else diff --git a/src/d/d_meter_HIO.cpp b/src/d/d_meter_HIO.cpp index 0970a754c1..498d0c6356 100644 --- a/src/d/d_meter_HIO.cpp +++ b/src/d/d_meter_HIO.cpp @@ -801,7 +801,7 @@ void dMeter_drawLightDropHIO_c::genMessage(JORMContext* mctx) { #endif dMeter_drawHIO_c::dMeter_drawHIO_c() { - #ifdef DEBUG + #if DEBUG field_0x8_debug = 0; #endif mLifeTopPosX = 40.0f; diff --git a/src/d/d_msg_class.cpp b/src/d/d_msg_class.cpp index 11320c468c..5e3443e72e 100644 --- a/src/d/d_msg_class.cpp +++ b/src/d/d_msg_class.cpp @@ -1971,7 +1971,7 @@ void jmessage_tSequenceProcessor::do_end() { bool jmessage_tSequenceProcessor::do_isReady() { jmessage_tReference* pReference = (jmessage_tReference*)getReference(); - #ifdef DEBUG + #if DEBUG if (pReference->getRevoMessageID() != 0) { return 0; } diff --git a/src/d/d_msg_flow.cpp b/src/d/d_msg_flow.cpp index a2cd304fd7..3201873387 100644 --- a/src/d/d_msg_flow.cpp +++ b/src/d/d_msg_flow.cpp @@ -68,7 +68,7 @@ void dMsgFlow_c::init(fopAc_ac_c* i_partner, int i_flowID, int param_2, fopAc_ac setNodeIndex(nodeIdx, i_talkPartners); } -#ifdef DEBUG +#if DEBUG dbgPrint(); #endif dMsgObject_setSelectWordFlag(0); @@ -457,7 +457,7 @@ int dMsgFlow_c::setSelectMsg(mesg_flow_node* i_flowNode_p, mesg_flow_node* param // "Message Set (Select)" OS_REPORT("\x1B[44;37mメッセ−ジセット(選択) \x1B[m|:"); -#ifdef DEBUG +#if DEBUG if (i_speaker_p != NULL) { const char* speaker_name = fopAcM_getProcNameString(i_speaker_p); OS_REPORT("flow:%d, msg:%d(%d), speaker:%s\n", mFlow, msg_no, temp_r25, speaker_name); @@ -501,7 +501,7 @@ int dMsgFlow_c::setNormalMsg(mesg_flow_node* i_flowNode_p, fopAc_ac_c* i_speaker // "Message Set" OS_REPORT("\x1B[44;37mメッセ−ジセット \x1B[m|:"); -#ifdef DEBUG +#if DEBUG if (i_speaker_p != NULL) { const char* speaker_name = fopAcM_getProcNameString(i_speaker_p); OS_REPORT("flow:%d, msg:%d, speaker:%s\n", mFlow, msg_no, speaker_name); @@ -761,7 +761,7 @@ queryFunc dMsgFlow_c::mQueryList[53] = { &dMsgFlow_c::query053, }; -#ifdef DEBUG +#if DEBUG void dMsgFlow_c::dbgPrint() {} #endif diff --git a/src/d/d_msg_scrn_item.cpp b/src/d/d_msg_scrn_item.cpp index 4e16e8afd3..02943d326c 100644 --- a/src/d/d_msg_scrn_item.cpp +++ b/src/d/d_msg_scrn_item.cpp @@ -34,7 +34,7 @@ dMsgScrnItem_c::dMsgScrnItem_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { int iVar6 = dMsgObject_getMessageID(); bool bVar5 = false; - #ifdef DEBUG + #if DEBUG if (dMsgObject_getMessageID() >= 0x10cc && dMsgObject_getMessageID() < 0x11cc) { mItemIndex = dMsgObject_getMessageID() - 0x10cc; bVar5 = true; @@ -122,7 +122,7 @@ dMsgScrnItem_c::dMsgScrnItem_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) { dMeter2Info_setItemColor( mItemIndex, mpItemPane[0], mpItemPane[1], mpItemPane[2], NULL); - #ifdef DEBUG + #if DEBUG if (mItemIndex == 0x81 || mItemIndex == 0x23) { field_0x19e = true; } diff --git a/src/d/d_msg_unit.cpp b/src/d/d_msg_unit.cpp index 5fb9236417..bebfec7a0c 100644 --- a/src/d/d_msg_unit.cpp +++ b/src/d/d_msg_unit.cpp @@ -294,7 +294,7 @@ void dMsgUnit_c::setTag(int i_type, int i_value, char* o_buffer, bool param_4) { // This section is weird. The debug seems like entriesStr is outside the condition // but the normal build doesn't really work with that. Same for pInfoBlock->entries. -#ifdef DEBUG +#if DEBUG dMsgUnit_inf1_entry* entriesInf = &pInfoBlock->entries[i_type]; u32 dat1EntryOffset = entriesInf->dat1EntryOffset; const char* uVar5; @@ -322,13 +322,13 @@ void dMsgUnit_c::setTag(int i_type, int i_value, char* o_buffer, bool param_4) { #else if (i_value == 1) { #endif -#ifdef DEBUG +#if DEBUG uVar5 = entriesStr->str + vals[0]; #else uVar5 = pStrAttributeBlock->entries->str + vals[0]; #endif } else { -#ifdef DEBUG +#if DEBUG uVar5 = entriesStr->str + vals[1]; #else uVar5 = pStrAttributeBlock->entries->str + vals[1]; diff --git a/src/d/d_resorce.cpp b/src/d/d_resorce.cpp index 7e4f306339..62e457b9d0 100644 --- a/src/d/d_resorce.cpp +++ b/src/d/d_resorce.cpp @@ -344,7 +344,7 @@ int dRes_info_c::loadResource() { JKRExpHeap* parentHeap = (JKRExpHeap*)JKRHeap::findFromRoot(JKRHeap::getCurrentHeap()); JUT_ASSERT(0x308, parentHeap != NULL && (parentHeap == mDoExt_getGameHeap() || parentHeap == mDoExt_getArchiveHeap())); -#ifdef DEBUG +#if DEBUG char* heapName; if (parentHeap == mDoExt_getGameHeap()) { heapName = "GameHeap"; @@ -401,7 +401,7 @@ int dRes_info_c::loadResource() { } modelData = (J3DModelData*)result; -#ifdef DEBUG +#if DEBUG J3DMaterial* materialp = modelData->getMaterialNodePointer(0); if (materialp->isDrawModeOpaTexEdge()) { // "BMDG:Translucent model can't be drawn!!\n" @@ -733,7 +733,7 @@ int dRes_control_c::syncRes(char const* i_arcName, dRes_info_c* i_resInfo, int i dRes_info_c* resInfo = getResInfo(i_arcName, i_resInfo, i_infoNum); if (resInfo == NULL) { -#ifdef DEBUG +#if DEBUG if (i_arcName[0] == 'R' || (i_arcName[0] == 'S' && i_arcName[1] == 't' && i_arcName[2] == 'g' && i_arcName[3] == '_' && i_arcName[4] == '0' && i_arcName[5] == '0') || strncmp(i_arcName, "Pack", 4) == 0) @@ -755,7 +755,7 @@ int dRes_control_c::deleteRes(char const* i_arcName, dRes_info_c* i_resInfo, int dRes_info_c* resInfo = getResInfo(i_arcName, i_resInfo, i_infoNum); if (resInfo == NULL) { -#ifdef DEBUG +#if DEBUG if (strcmp(i_arcName, "Xtg_00") == 0) { // "<%s.arc> deleteRes: res nothing !!\n(Detected deleting an unregistered resource! Please fix.)\n" OS_REPORT_ERROR("<%s.arc> deleteRes: res nothing !!\n(未登録のリソースを削除してるのを発見しました!修正してください。)\n", i_arcName); @@ -799,7 +799,7 @@ dRes_info_c* dRes_control_c::getResInfoLoaded(char const* i_arcName, dRes_info_c dRes_info_c* resInfo = getResInfo(i_arcName, i_resInfo, i_infoNum); if (resInfo == NULL) { -#ifdef DEBUG +#if DEBUG if (stricmp(i_arcName, "Xtg_00") == 0) { OS_REPORT("\x1b[35m<%s.arc> getRes: res nothing !!\n\x1b[m", i_arcName); } @@ -879,7 +879,7 @@ int dRes_control_c::setObjectRes(char const* i_arcName, void* i_archiveRes, u32 JKRHeap* i_heap) { JUT_ASSERT(0x7A3, i_archiveRes != NULL); -#ifdef DEBUG +#if DEBUG dRes_info_c* nowInfo = getResInfo(i_arcName, mObjectInfo, ARRAY_SIZEU(mObjectInfo)); JUT_ASSERT(0x7A6, nowInfo == NULL); #endif diff --git a/src/d/d_s_menu.cpp b/src/d/d_s_menu.cpp index 21a8bfb349..7b7934f473 100644 --- a/src/d/d_s_menu.cpp +++ b/src/d/d_s_menu.cpp @@ -21,7 +21,7 @@ #include <strtoul.h> -#ifdef DEBUG +#if DEBUG extern "C" int atoi(const char* str); void dScnMenu_setItem(int i_slotNo, u8 i_itemNo); diff --git a/src/d/d_s_play.cpp b/src/d/d_s_play.cpp index 2e9979d20e..7187d0229d 100644 --- a/src/d/d_s_play.cpp +++ b/src/d/d_s_play.cpp @@ -566,7 +566,7 @@ dScnPly_reg_HIO_c g_regHIO; dScnPly_env_HIO_c g_envHIO; -#ifdef DEBUG +#if DEBUG dScnPly_preset_HIO_c g_presetHIO; #endif diff --git a/src/d/d_save.cpp b/src/d/d_save.cpp index f1da8b4daa..2e92baef02 100644 --- a/src/d/d_save.cpp +++ b/src/d/d_save.cpp @@ -1856,7 +1856,7 @@ int dSv_info_c::initdata_to_card(char* i_cardPtr, int i_dataNum) { return 0; } -#ifdef DEBUG +#if DEBUG flagFile_c::flagFile_c() { m_no = mDoHIO_CREATE_CHILD("フラグファイル", this); m_flags = FLAG_ALL_e; diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp index e055c19bb6..df4ca3fb0f 100644 --- a/src/d/d_stage.cpp +++ b/src/d/d_stage.cpp @@ -1071,7 +1071,7 @@ static dStage_objectNameInf l_objectName[] = { OBJNAME("d_act30", PROC_DEMO00, 0x1E), OBJNAME("d_act31", PROC_DEMO00, 0x1F), OBJNAME("TLogo", PROC_TITLE, 0xFF), -#ifdef DEBUG +#if DEBUG OBJNAME("unitC00", PROC_Obj_TestCube, 0xFF), OBJNAME("unitS00", PROC_Obj_TestCube, 0xFF), OBJNAME("unitCy0", PROC_Obj_TestCube, 0xFF), @@ -1093,7 +1093,7 @@ static dStage_objectNameInf l_objectName[] = { OBJNAME("mvbg_a", PROC_BG_OBJ, 0xFF), OBJNAME("burnBox", PROC_Obj_BurnBox, 0xFF), OBJNAME("stnMark", PROC_Obj_StoneMark, 0xFF), -#ifndef DEBUG +#if !DEBUG OBJNAME("Passer", PROC_NPC_PASSER, 0xFF), #endif OBJNAME("Passer2", PROC_NPC_PASSER2, 0xFF), @@ -1398,7 +1398,7 @@ void dStage_stageDt_c::init() { mElst = NULL; mWorldRollAngleX = 0; mWorldRollDirAngleY = 0; -#ifdef DEBUG +#if DEBUG mPaletteNumInfo = 0; mPselectNumInfo = 0; mVrboxNumInfo = 0; @@ -1432,7 +1432,7 @@ void dStage_roomDt_c::init() { mDrTg = NULL; mDoor = NULL; mFloorInfo = NULL; -#ifdef DEBUG +#if DEBUG field_0x60 = 0; #endif } |
