From 6f73e18bd290a1bce40ce48c56e1641784839dff Mon Sep 17 00:00:00 2001 From: Niklas Bauer Date: Sat, 24 Jan 2026 20:20:33 +0100 Subject: [PATCH 1/5] d_a_e_tk debug (#3062) * d_a_e_tk debug * a_this -> actor --- config/RZDE01_00/rels/d_a_e_tk/symbols.txt | 2 +- config/RZDE01_00/rels/d_a_e_tk2/symbols.txt | 2 +- config/RZDE01_02/rels/d_a_e_tk/symbols.txt | 2 +- config/RZDE01_02/rels/d_a_e_tk2/symbols.txt | 2 +- config/RZDJ01/rels/d_a_e_tk/symbols.txt | 2 +- config/RZDJ01/rels/d_a_e_tk2/symbols.txt | 2 +- config/RZDP01/rels/d_a_e_tk/symbols.txt | 2 +- config/RZDP01/rels/d_a_e_tk2/symbols.txt | 2 +- config/Shield/rels/d_a_e_tk/symbols.txt | 2 +- config/Shield/rels/d_a_e_tk2/symbols.txt | 2 +- config/ShieldD/rels/d_a_e_tk2D/symbols.txt | 2 +- config/ShieldD/rels/d_a_e_tkD/symbols.txt | 2 +- include/d/actor/d_a_e_tk.h | 18 +- include/d/actor/d_a_e_tk2.h | 16 +- src/d/actor/d_a_e_tk.cpp | 345 ++++++++++++-------- src/d/actor/d_a_e_tk2.cpp | 255 +++++++++------ src/d/actor/d_a_e_tk_ball.cpp | 236 +++++++------ 17 files changed, 533 insertions(+), 361 deletions(-) diff --git a/config/RZDE01_00/rels/d_a_e_tk/symbols.txt b/config/RZDE01_00/rels/d_a_e_tk/symbols.txt index 5f28fc6b9a..5e84f1046d 100644 --- a/config/RZDE01_00/rels/d_a_e_tk/symbols.txt +++ b/config/RZDE01_00/rels/d_a_e_tk/symbols.txt @@ -63,6 +63,6 @@ lbl_238_data_104 = .data:0x00000104; // type:object size:0xD data:string @93851 = .data:0x00000114; // type:object size:0xC scope:local __RTTI__12daE_TK_HIO_c = .data:0x00000120; // type:object size:0x8 scope:global __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global -lbl_238_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte +hio_set = .bss:0x00000008; // type:object size:0x1 data:byte @93233 = .bss:0x0000000C; // type:object size:0xC scope:local l_HIO = .bss:0x00000018; // type:object size:0x1C scope:global data:byte diff --git a/config/RZDE01_00/rels/d_a_e_tk2/symbols.txt b/config/RZDE01_00/rels/d_a_e_tk2/symbols.txt index 8bcd97d9ce..b845cbd451 100644 --- a/config/RZDE01_00/rels/d_a_e_tk2/symbols.txt +++ b/config/RZDE01_00/rels/d_a_e_tk2/symbols.txt @@ -58,6 +58,6 @@ lbl_239_data_D8 = .data:0x000000D8; // type:object size:0xE data:string @93703 = .data:0x000000E8; // type:object size:0xC scope:local __RTTI__13daE_TK2_HIO_c = .data:0x000000F4; // type:object size:0x8 scope:global __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global -lbl_239_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte +hio_set = .bss:0x00000008; // type:object size:0x1 data:byte @93233 = .bss:0x0000000C; // type:object size:0xC scope:local l_HIO = .bss:0x00000018; // type:object size:0x1C scope:global data:byte diff --git a/config/RZDE01_02/rels/d_a_e_tk/symbols.txt b/config/RZDE01_02/rels/d_a_e_tk/symbols.txt index 37c5e956bf..18a0fc9edc 100644 --- a/config/RZDE01_02/rels/d_a_e_tk/symbols.txt +++ b/config/RZDE01_02/rels/d_a_e_tk/symbols.txt @@ -63,6 +63,6 @@ lbl_238_data_104 = .data:0x00000104; // type:object size:0xD data:string @93851 = .data:0x00000114; // type:object size:0xC scope:local align:4 __RTTI__12daE_TK_HIO_c = .data:0x00000120; // type:object size:0x8 scope:global align:4 __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global align:4 -lbl_238_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte +hio_set = .bss:0x00000008; // type:object size:0x1 data:byte @93233 = .bss:0x0000000C; // type:object size:0xC scope:local align:4 l_HIO = .bss:0x00000018; // type:object size:0x1C scope:global align:4 data:byte diff --git a/config/RZDE01_02/rels/d_a_e_tk2/symbols.txt b/config/RZDE01_02/rels/d_a_e_tk2/symbols.txt index f68be15cb1..f01fa8d4a2 100644 --- a/config/RZDE01_02/rels/d_a_e_tk2/symbols.txt +++ b/config/RZDE01_02/rels/d_a_e_tk2/symbols.txt @@ -58,6 +58,6 @@ lbl_239_data_D8 = .data:0x000000D8; // type:object size:0xE data:string @93703 = .data:0x000000E8; // type:object size:0xC scope:local align:4 __RTTI__13daE_TK2_HIO_c = .data:0x000000F4; // type:object size:0x8 scope:global align:4 __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global align:4 -lbl_239_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte +hio_set = .bss:0x00000008; // type:object size:0x1 data:byte @93233 = .bss:0x0000000C; // type:object size:0xC scope:local align:4 l_HIO = .bss:0x00000018; // type:object size:0x1C scope:global align:4 data:byte diff --git a/config/RZDJ01/rels/d_a_e_tk/symbols.txt b/config/RZDJ01/rels/d_a_e_tk/symbols.txt index afe487bc4c..a9515fa1bd 100644 --- a/config/RZDJ01/rels/d_a_e_tk/symbols.txt +++ b/config/RZDJ01/rels/d_a_e_tk/symbols.txt @@ -63,6 +63,6 @@ lbl_238_data_104 = .data:0x00000104; // type:object size:0xD data:string @93851 = .data:0x00000114; // type:object size:0xC scope:local align:4 __RTTI__12daE_TK_HIO_c = .data:0x00000120; // type:object size:0x8 scope:global align:4 __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global align:4 -lbl_238_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte +hio_set = .bss:0x00000008; // type:object size:0x1 data:byte @93233 = .bss:0x0000000C; // type:object size:0xC scope:local align:4 l_HIO = .bss:0x00000018; // type:object size:0x1C scope:global align:4 data:byte diff --git a/config/RZDJ01/rels/d_a_e_tk2/symbols.txt b/config/RZDJ01/rels/d_a_e_tk2/symbols.txt index cd18a5c806..4ee3221cf2 100644 --- a/config/RZDJ01/rels/d_a_e_tk2/symbols.txt +++ b/config/RZDJ01/rels/d_a_e_tk2/symbols.txt @@ -58,6 +58,6 @@ lbl_239_data_D8 = .data:0x000000D8; // type:object size:0xE data:string @93703 = .data:0x000000E8; // type:object size:0xC scope:local align:4 __RTTI__13daE_TK2_HIO_c = .data:0x000000F4; // type:object size:0x8 scope:global align:4 __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global align:4 -lbl_239_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte +hio_set = .bss:0x00000008; // type:object size:0x1 data:byte @93233 = .bss:0x0000000C; // type:object size:0xC scope:local align:4 l_HIO = .bss:0x00000018; // type:object size:0x1C scope:global align:4 data:byte diff --git a/config/RZDP01/rels/d_a_e_tk/symbols.txt b/config/RZDP01/rels/d_a_e_tk/symbols.txt index afe487bc4c..a9515fa1bd 100644 --- a/config/RZDP01/rels/d_a_e_tk/symbols.txt +++ b/config/RZDP01/rels/d_a_e_tk/symbols.txt @@ -63,6 +63,6 @@ lbl_238_data_104 = .data:0x00000104; // type:object size:0xD data:string @93851 = .data:0x00000114; // type:object size:0xC scope:local align:4 __RTTI__12daE_TK_HIO_c = .data:0x00000120; // type:object size:0x8 scope:global align:4 __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global align:4 -lbl_238_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte +hio_set = .bss:0x00000008; // type:object size:0x1 data:byte @93233 = .bss:0x0000000C; // type:object size:0xC scope:local align:4 l_HIO = .bss:0x00000018; // type:object size:0x1C scope:global align:4 data:byte diff --git a/config/RZDP01/rels/d_a_e_tk2/symbols.txt b/config/RZDP01/rels/d_a_e_tk2/symbols.txt index cd18a5c806..4ee3221cf2 100644 --- a/config/RZDP01/rels/d_a_e_tk2/symbols.txt +++ b/config/RZDP01/rels/d_a_e_tk2/symbols.txt @@ -58,6 +58,6 @@ lbl_239_data_D8 = .data:0x000000D8; // type:object size:0xE data:string @93703 = .data:0x000000E8; // type:object size:0xC scope:local align:4 __RTTI__13daE_TK2_HIO_c = .data:0x000000F4; // type:object size:0x8 scope:global align:4 __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global align:4 -lbl_239_bss_8 = .bss:0x00000008; // type:object size:0x1 data:byte +hio_set = .bss:0x00000008; // type:object size:0x1 data:byte @93233 = .bss:0x0000000C; // type:object size:0xC scope:local align:4 l_HIO = .bss:0x00000018; // type:object size:0x1C scope:global align:4 data:byte diff --git a/config/Shield/rels/d_a_e_tk/symbols.txt b/config/Shield/rels/d_a_e_tk/symbols.txt index c80fc3619f..0c6de6ef25 100644 --- a/config/Shield/rels/d_a_e_tk/symbols.txt +++ b/config/Shield/rels/d_a_e_tk/symbols.txt @@ -62,5 +62,5 @@ __vt__12daE_TK_HIO_c = .data:0x000000D0; // type:object size:0xC scope:global @110122 = .data:0x000000DC; // type:object size:0xD scope:local data:string @110123 = .data:0x000000EC; // type:object size:0xC scope:local __RTTI__12daE_TK_HIO_c = .data:0x000000F8; // type:object size:0x8 scope:global -lbl_235_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte +hio_set = .bss:0x00000000; // type:object size:0x1 data:byte l_HIO = .bss:0x00000004; // type:object size:0x1C scope:global align:4 data:float diff --git a/config/Shield/rels/d_a_e_tk2/symbols.txt b/config/Shield/rels/d_a_e_tk2/symbols.txt index 446816f051..8f3902a1c7 100644 --- a/config/Shield/rels/d_a_e_tk2/symbols.txt +++ b/config/Shield/rels/d_a_e_tk2/symbols.txt @@ -56,5 +56,5 @@ __vt__13daE_TK2_HIO_c = .data:0x000000D0; // type:object size:0xC scope:global @110028 = .data:0x000000DC; // type:object size:0xE scope:local data:string @110029 = .data:0x000000EC; // type:object size:0xC scope:local __RTTI__13daE_TK2_HIO_c = .data:0x000000F8; // type:object size:0x8 scope:global -lbl_237_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte +hio_set = .bss:0x00000000; // type:object size:0x1 data:byte l_HIO = .bss:0x00000004; // type:object size:0x1C scope:global align:4 data:float diff --git a/config/ShieldD/rels/d_a_e_tk2D/symbols.txt b/config/ShieldD/rels/d_a_e_tk2D/symbols.txt index fb73cfa4c5..0ce7ed9422 100644 --- a/config/ShieldD/rels/d_a_e_tk2D/symbols.txt +++ b/config/ShieldD/rels/d_a_e_tk2D/symbols.txt @@ -104,5 +104,5 @@ lbl_231_data_238 = .data:0x00000238; // type:object size:0x24 @118843 = .data:0x00000410; // type:object size:0xE scope:local data:string @118844 = .data:0x00000420; // type:object size:0xC scope:local @118845 = .data:0x00000444; // type:object size:0x11 scope:local data:string -lbl_231_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte +hio_set = .bss:0x00000000; // type:object size:0x1 data:byte l_HIO = .bss:0x00000004; // type:object size:0x1C scope:global data:byte diff --git a/config/ShieldD/rels/d_a_e_tkD/symbols.txt b/config/ShieldD/rels/d_a_e_tkD/symbols.txt index 62a43d9ee3..a14f779065 100644 --- a/config/ShieldD/rels/d_a_e_tkD/symbols.txt +++ b/config/ShieldD/rels/d_a_e_tkD/symbols.txt @@ -112,5 +112,5 @@ lbl_229_data_280 = .data:0x00000280; // type:object size:0x24 @118960 = .data:0x00000458; // type:object size:0xE scope:local data:string @118961 = .data:0x00000468; // type:object size:0xC scope:local @118962 = .data:0x0000048C; // type:object size:0x11 scope:local data:string -lbl_229_bss_0 = .bss:0x00000000; // type:object size:0x1 data:byte +hio_set = .bss:0x00000000; // type:object size:0x1 data:byte l_HIO = .bss:0x00000004; // type:object size:0x1C scope:global data:byte diff --git a/include/d/actor/d_a_e_tk.h b/include/d/actor/d_a_e_tk.h index ef9befab0d..7d554a3df4 100644 --- a/include/d/actor/d_a_e_tk.h +++ b/include/d/actor/d_a_e_tk.h @@ -6,6 +6,7 @@ #include "d/d_cc_uty.h" #include "d/d_path.h" #include "f_op/f_op_actor.h" +#include "m_Do/m_Do_ext.h" /** * @ingroup actors-enemies @@ -60,17 +61,18 @@ public: STATIC_ASSERT(sizeof(e_tk_class) == 0xA64); -class daE_TK_HIO_c { +class daE_TK_HIO_c : public JORReflexible { public: daE_TK_HIO_c(); - virtual ~daE_TK_HIO_c() {} + void genMessage(JORMContext*); + virtual ~daE_TK_HIO_c() {}; - /* 0x04 */ s8 field_0x04; - /* 0x08 */ f32 mRadiusScale; - /* 0x0C */ f32 mPlayerRange1; - /* 0x10 */ f32 mPlayerRange2; - /* 0x14 */ f32 mSpeedModifier1; - /* 0x18 */ f32 mSpeedModifier2; + /* 0x04 */ s8 mNo; + /* 0x08 */ f32 mBaseSize; + /* 0x0C */ f32 mPlayerDetectionDistanceNear; + /* 0x10 */ f32 mPlayerDetectionDistanceFar; + /* 0x14 */ f32 mSwimSpeedModifier; + /* 0x18 */ f32 mFleeSpeedModifier; }; STATIC_ASSERT(sizeof(daE_TK_HIO_c) == 0x1C); diff --git a/include/d/actor/d_a_e_tk2.h b/include/d/actor/d_a_e_tk2.h index 4af171d709..e4d29cf674 100644 --- a/include/d/actor/d_a_e_tk2.h +++ b/include/d/actor/d_a_e_tk2.h @@ -5,6 +5,7 @@ #include "d/d_cc_d.h" #include "d/d_cc_uty.h" #include "f_op/f_op_actor.h" +#include "m_Do/m_Do_ext.h" /** * @ingroup actors-enemies @@ -54,17 +55,18 @@ public: STATIC_ASSERT(sizeof(e_tk2_class) == 0xA50); -class daE_TK2_HIO_c { +class daE_TK2_HIO_c : public JORReflexible { public: daE_TK2_HIO_c(); virtual ~daE_TK2_HIO_c() {}; + void genMessage(JORMContext *); - /* 0x04 */ s8 field_0x04; - /* 0x08 */ f32 mRadiusScale; - /* 0x0C */ f32 mPlayerRange1; - /* 0x10 */ f32 mPlayerRange2; - /* 0x14 */ f32 mSpeedModifier1; /* Unused */ - /* 0x18 */ f32 mSpeedModifier2; /* Unused */ + /* 0x04 */ s8 mNo; + /* 0x08 */ f32 mBaseSize; + /* 0x0C */ f32 mPlayerDetectionDistanceNear; + /* 0x10 */ f32 mPlayerDetectionDistanceFar; + /* 0x14 */ f32 mSwimSpeedModifier; /* Unused */ + /* 0x18 */ f32 mFleeSpeedModifier; /* Unused */ }; STATIC_ASSERT(sizeof(daE_TK2_HIO_c) == 0x1C); diff --git a/src/d/actor/d_a_e_tk.cpp b/src/d/actor/d_a_e_tk.cpp index 7309d8b50d..96aae1b85f 100644 --- a/src/d/actor/d_a_e_tk.cpp +++ b/src/d/actor/d_a_e_tk.cpp @@ -1,13 +1,14 @@ /** -* @file d_a_e_tk.cpp + * @file d_a_e_tk.cpp * */ -#include "d/dolzel_rel.h" // IWYU pragma: keep +#include "d/dolzel_rel.h" // IWYU pragma: keep #include "d/actor/d_a_e_tk.h" #include "d/actor/d_a_e_tk_ball.h" #include "d/d_com_inf_game.h" +#include "d/d_s_play.h" #include "f_op/f_op_kankyo_mng.h" enum Action { @@ -45,26 +46,46 @@ static bool hio_set; static daE_TK_HIO_c l_HIO; daE_TK_HIO_c::daE_TK_HIO_c() { - field_0x04 = -1; - mRadiusScale = 1.9f; - mPlayerRange2 = 1400.0f; - mPlayerRange1 = 500.0f; - mSpeedModifier1 = 10.0f; - mSpeedModifier2 = 25.0f; + mNo = -1; + mBaseSize = 1.9f; + mPlayerDetectionDistanceFar = 1400.0f; + mPlayerDetectionDistanceNear = 500.0f; + mSwimSpeedModifier = 10.0f; + mFleeSpeedModifier = 25.0f; } -static void anm_init(e_tk_class* i_this, int i_index, f32 i_morf, u8 i_attr, f32 i_rate) { - J3DAnmTransform* anm = (J3DAnmTransform*)dComIfG_getObjectRes("E_tk", i_index); +#if DEBUG +void daE_TK_HIO_c::genMessage(JORMContext* ctext) { + // Tadpole + ctext->genLabel(" タドポール", 0x80000001, 0U, NULL); + // Base Size + ctext->genSlider("基本サイズ", &mBaseSize, 0.0f, 5.0f); + // Player Detection Distance Far + ctext->genSlider("PL認識距離 遠", &mPlayerDetectionDistanceFar, 0.0f, 3000.0f); + // Player Detection Distance Near + ctext->genSlider("PL認識距離 近", &mPlayerDetectionDistanceNear, 0.0f, 3000.0f); + ctext->genLabel(" ", 0x80000001); + // ↓ Behavior not guaranteed if changed + ctext->genLabel(" ↓変更すると動作保証しません", 0x80000001); + // Swim Speed + ctext->genSlider("泳ぎ速度", &mSwimSpeedModifier, 0.0f, 40.0f); + // Flee Speed + ctext->genSlider("逃げ速度", &mFleeSpeedModifier, 0.0f, 40.0f); +} +#endif - i_this->mpMorf->setAnm(anm, i_attr, i_morf, i_rate, 0.0f, -1.0f); +static void anm_init(e_tk_class* i_this, int i_index, f32 i_morf, u8 i_attr, f32 i_rate) { + i_this->mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("E_tk", i_index), i_attr, i_morf, + i_rate, 0.0f, -1.0f); i_this->mAnim = i_index; } static int daE_TK_Draw(e_tk_class* i_this) { + fopAc_ac_c* actor = i_this; J3DModel* model = i_this->mpMorf->getModel(); - g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr); - g_env_light.setLightTevColorType_MAJI(model, &i_this->tevStr); + g_env_light.settingTevStruct(0, &actor->current.pos, &actor->tevStr); + g_env_light.setLightTevColorType_MAJI(model, &actor->tevStr); i_this->mpMorf->entryDL(); return 1; } @@ -72,6 +93,7 @@ static int daE_TK_Draw(e_tk_class* i_this) { static int other_bg_check(e_tk_class* i_this, fopAc_ac_c* i_ac) { fopAc_ac_c* actor = i_this; dBgS_LinChk line_check; + cXyz _unk1; cXyz start_pos; cXyz end_pos; @@ -90,7 +112,13 @@ static int other_bg_check(e_tk_class* i_this, fopAc_ac_c* i_ac) { } static int pl_y_check(e_tk_class* i_this) { - if (i_this->current.pos.y - dComIfGp_getPlayer(0)->current.pos.y > 130.0f) { + fopAc_ac_c* actor = i_this; +#if DEBUG // TODO: Debug Fakematch. On retail, actor is accessed before the gameInfo. + fopAc_ac_c* player = dComIfGp_getPlayer(0); + if (actor->current.pos.y - player->current.pos.y > 130.0f) { +#else + if (actor->current.pos.y - dComIfGp_getPlayer(0)->current.pos.y > 130.0f) { +#endif return 0; } else { return 1; @@ -98,10 +126,11 @@ static int pl_y_check(e_tk_class* i_this) { } static int pl_check(e_tk_class* i_this, f32 i_limit, s16 i_max_diff) { + fopAc_ac_c* actor = i_this; fopAc_ac_c* player = dComIfGp_getPlayer(0); if (i_this->mPlayerDistanceLimit < i_limit) { - s16 diff = i_this->shape_angle.y - i_this->mPlayerAngleY; + s16 diff = actor->shape_angle.y - i_this->mPlayerAngleY; if (diff < i_max_diff && diff > (s16)-i_max_diff && !other_bg_check(i_this, player)) { return 1; } @@ -111,6 +140,9 @@ static int pl_check(e_tk_class* i_this, f32 i_limit, s16 i_max_diff) { } static void damage_check(e_tk_class* i_this) { + fopAc_ac_c* actor = i_this; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + if (i_this->mInvincibilityTimer == 0) { i_this->mStts.Move(); @@ -129,7 +161,7 @@ static void damage_check(e_tk_class* i_this) { i_this->mMode = MODE_TK_KYORO2; i_this->mActionTimer[0] = 50; } else { - cc_at_check(i_this, &i_this->mAtInfo); + cc_at_check(actor, &i_this->mAtInfo); if (i_this->mAtInfo.mHitType == HIT_TYPE_STUN) { i_this->mAction = ACT_TK_S_DAMAGE; } else { @@ -139,8 +171,8 @@ static void damage_check(e_tk_class* i_this) { } } - if (i_this->health <= 1) { - i_this->health = 0; + if (actor->health <= 1) { + actor->health = 0; i_this->mSph.SetTgHitMark(CcG_Tg_UNK_MARK_3); } } @@ -152,12 +184,12 @@ static int way_bg_check(e_tk_class* i_this, f32 i_limit) { cXyz mtx_pos; cXyz start_pos; + cXyz end_pos; start_pos = actor->current.pos; start_pos.y -= 50.0f; - mDoMtx_YrotS(*calc_mtx, actor->shape_angle.y); + cMtx_YrotS(*calc_mtx, actor->shape_angle.y); - cXyz end_pos; mtx_pos.x = 0.0; mtx_pos.y = -50.0f; mtx_pos.z = i_limit; @@ -174,8 +206,11 @@ static int way_bg_check(e_tk_class* i_this, f32 i_limit) { } static void e_tk_wait_0(e_tk_class* i_this) { + fopAc_ac_c* actor = i_this; + cXyz src_pos; f32 speed_mul = 1.0f; + f32 speed_step = 1.0f + YREG_F(5); i_this->mAttentionOFF = true; @@ -187,23 +222,23 @@ static void e_tk_wait_0(e_tk_class* i_this) { case MODE_TK_APPEAR: if (i_this->mActionTimer[0] == 0) { - src_pos = i_this->home.pos - i_this->current.pos; + src_pos = actor->home.pos - actor->current.pos; i_this->mSomeAngle = cM_atan2s(src_pos.x, src_pos.z) + (s16)cM_rndFX(8000.0f); i_this->mActionTimer[0] = cM_rndF(30.0f) + 30.0f; } if (i_this->mActionTimer[2] == 0 && way_bg_check(i_this, 200.0f)) { i_this->mActionTimer[2] = 40; - src_pos = i_this->home.pos - i_this->current.pos; + src_pos = actor->home.pos - actor->current.pos; i_this->mSomeAngle = cM_atan2s(src_pos.x, src_pos.z) + (s16)cM_rndFX(2000.0f); i_this->mActionTimer[0] = cM_rndF(30.0f) + 30.0f; } if (i_this->mActionTimer[1] == 0 && pl_y_check(i_this) && - pl_check(i_this, l_HIO.mPlayerRange2, 0x4000)) + pl_check(i_this, l_HIO.mPlayerDetectionDistanceFar, 0x4000)) { i_this->mAction = ACT_TK_FIND; - if (pl_check(i_this, l_HIO.mPlayerRange1, 0x4000)) { + if (pl_check(i_this, l_HIO.mPlayerDetectionDistanceNear, 0x4000)) { i_this->mMode = MODE_TK_WAIT01; } else { i_this->mMode = MODE_TK_NONE; @@ -212,19 +247,22 @@ static void e_tk_wait_0(e_tk_class* i_this) { break; } - cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->mSomeAngle, 0x10, 0x400); - cLib_addCalcAngleS2(&i_this->shape_angle.x, 0, 0x10, 0x400); - cLib_addCalc2(&i_this->speedF, l_HIO.mSpeedModifier1 * speed_mul, 1.0f, 1.0f); - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + cLib_addCalcAngleS2(&actor->shape_angle.y, i_this->mSomeAngle, 0x10, 0x400); + cLib_addCalcAngleS2(&actor->shape_angle.x, 0, 0x10, 0x400); + cLib_addCalc2(&actor->speedF, l_HIO.mSwimSpeedModifier * speed_mul, 1.0f, speed_step); + cMtx_YrotS(*calc_mtx, actor->shape_angle.y); src_pos.x = 0.0f; src_pos.y = 0.0f; - src_pos.z = i_this->speedF; - MtxPosition(&src_pos, &i_this->speed); - i_this->current.pos += i_this->speed; + src_pos.z = actor->speedF; + MtxPosition(&src_pos, &actor->speed); + actor->current.pos += actor->speed; } static void e_tk_find(e_tk_class* i_this) { + fopAc_ac_c* actor = i_this; + + cXyz local_58; f32 speed_target = 0.0f; f32 speed_step = 3.0f; @@ -247,7 +285,7 @@ static void e_tk_find(e_tk_class* i_this) { i_this->mAction = ACT_TK_ATTACK; i_this->mMode = MODE_TK_NONE; } else { - if (pl_check(i_this, l_HIO.mPlayerRange1, 0x4000)) { + if (pl_check(i_this, l_HIO.mPlayerDetectionDistanceNear, 0x4000)) { i_this->mMode = MODE_TK_KYORO2; } } @@ -279,7 +317,7 @@ static void e_tk_find(e_tk_class* i_this) { break; case MODE_TK_SWIM: - i_this->mPlayerAngleY = i_this->mPlayerAngleY + -0x8000; + ADD_ANGLE(i_this->mPlayerAngleY, 0x8000); i_this->mAttentionOFF = true; if (i_this->mpMorf->isStop()) { i_this->mAnimSpeed = 4.0f; @@ -292,10 +330,10 @@ static void e_tk_find(e_tk_class* i_this) { i_this->mAttentionOFF = true; cLib_addCalc2(&i_this->mAnimSpeed, 2.0f, 1.0f, 0.15f); i_this->mpMorf->setPlaySpeed(i_this->mAnimSpeed); - speed_target = 1.0f; - speed_step = 10.0f; + speed_target = 1.0f + YREG_F(17); + speed_step = 10.0f + YREG_F(18); if (i_this->mActionTimer[0] == 0 && - i_this->mPlayerDistanceLimit > l_HIO.mPlayerRange1 * 1.2f) + i_this->mPlayerDistanceLimit > l_HIO.mPlayerDetectionDistanceNear * 1.2f) { i_this->mMode = MODE_TK_NONE; } else { @@ -305,27 +343,28 @@ static void e_tk_find(e_tk_class* i_this) { } } if (i_this->mActionTimer[1] == 0) { - i_this->mPlayerAngleY = i_this->mPlayerAngleY - 0x8000; + ADD_ANGLE(i_this->mPlayerAngleY, 0x8000); } else { i_this->mPlayerAngleY = i_this->mSomeAngle; } break; } - cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->mPlayerAngleY, 4, 0x800); - cLib_addCalc2(&i_this->speedF, l_HIO.mSpeedModifier2 * speed_target, 1.0f, speed_step); - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + cLib_addCalcAngleS2(&actor->shape_angle.y, i_this->mPlayerAngleY, 4, 0x800); + cLib_addCalc2(&actor->speedF, l_HIO.mFleeSpeedModifier * speed_target, 1.0f, speed_step); + cMtx_YrotS(*calc_mtx, actor->shape_angle.y); - cXyz local_58; local_58.x = 0.0f; local_58.y = 0.0f; - local_58.z = i_this->speedF; - MtxPosition(&local_58, &i_this->speed); - i_this->current.pos += i_this->speed; - cLib_addCalcAngleS2(&i_this->shape_angle.x, 0, 4, 0x400); + local_58.z = actor->speedF; + MtxPosition(&local_58, &actor->speed); + actor->current.pos += actor->speed; + cLib_addCalcAngleS2(&actor->shape_angle.x, 0, 4, 0x400); } static void e_tk_attack(e_tk_class* i_this) { + fopAc_ac_c* actor = i_this; + switch (i_this->mMode) { case MODE_TK_NONE: i_this->mMode = MODE_TK_APPEAR; @@ -336,8 +375,8 @@ static void e_tk_attack(e_tk_class* i_this) { if (pl_y_check(i_this)) { if ((int)i_this->mpMorf->getFrame() == 24) { i_this->mBallID = - fopAcM_createChild(PROC_E_TK_BALL, fopAcM_GetID(i_this), 0, &i_this->eyePos, - fopAcM_GetRoomNo(i_this), &i_this->shape_angle, 0, -1, 0); + fopAcM_createChild(PROC_E_TK_BALL, fopAcM_GetID(actor), 0, &actor->eyePos, + fopAcM_GetRoomNo(actor), &actor->shape_angle, 0, -1, 0); } if ((int)i_this->mpMorf->getFrame() == 28) { i_this->mTKBallSpawned = true; @@ -355,22 +394,24 @@ static void e_tk_attack(e_tk_class* i_this) { i_this->mAction = ACT_TK_FIND; i_this->mMode = MODE_TK_DAMAGE; } - if (pl_check(i_this, l_HIO.mPlayerRange1, 0x4000)) { + if (pl_check(i_this, l_HIO.mPlayerDetectionDistanceNear, 0x4000)) { i_this->mAction = ACT_TK_FIND; i_this->mMode = MODE_TK_KYORO2; } break; } - cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->mPlayerAngleY, 4, 0x800); + cLib_addCalcAngleS2(&actor->shape_angle.y, i_this->mPlayerAngleY, 4, 0x800); } static void e_tk_pathswim(e_tk_class* i_this) { + fopAc_ac_c* actor = i_this; + cXyz local_50; + cXyz _unk1; f32 speed_target = 1.0f; - f32 speed_step = 1.0f; - + f32 speed_step = 1.0f + YREG_F(5); switch (i_this->mMode) { case MODE_TK_NONE: anm_init(i_this, ANM_TK_SWIM, 5.0f, 0x2, 1.0f); @@ -400,7 +441,7 @@ static void e_tk_pathswim(e_tk_class* i_this) { } case MODE_TK_ATTACK: - local_50 = i_this->mPos - i_this->current.pos; + local_50 = i_this->mPos - actor->current.pos; if (JMAFastSqrt(local_50.x * local_50.x + local_50.z * local_50.z) < 100.0f) { dPnt* point = &i_this->mpPath->m_points[i_this->mPathID]; if (point->mArg0 != 0x2) { @@ -412,14 +453,15 @@ static void e_tk_pathswim(e_tk_class* i_this) { i_this->mMode = MODE_TK_APPEAR; } } - i_this->mSomeAngle = cM_atan2s(local_50.x, local_50.z); + i_this->mSomeAngle = (s16)cM_atan2s(local_50.x, local_50.z); break; case MODE_TK_DAMAGE: speed_target = 0.0f; speed_step = 3.0f; + dPnt* point; if (i_this->mActionTimer[1] == 0 && pl_y_check(i_this) && - pl_check(i_this, l_HIO.mPlayerRange2, 0x4000)) + pl_check(i_this, l_HIO.mPlayerDetectionDistanceFar, 0x4000)) { i_this->mAction = ACT_TK_FIND; anm_init(i_this, ANM_TK_WAIT01, 5.0f, 0x2, 1.0f); @@ -432,18 +474,20 @@ static void e_tk_pathswim(e_tk_class* i_this) { break; } - cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->mSomeAngle, 8, 0x400); - cLib_addCalc2(&i_this->speedF, l_HIO.mSpeedModifier1 * speed_target, 1.0f, speed_step); - cMtx_YrotS(*calc_mtx, i_this->shape_angle.y); + cLib_addCalcAngleS2(&actor->shape_angle.y, i_this->mSomeAngle, 8, 0x400); + cLib_addCalc2(&actor->speedF, l_HIO.mSwimSpeedModifier * speed_target, 1.0f, speed_step); + cMtx_YrotS(*calc_mtx, actor->shape_angle.y); local_50.x = 0.0f; local_50.y = 0.0f; - local_50.z = i_this->speedF; - MtxPosition(&local_50, &i_this->speed); - i_this->current.pos += i_this->speed; + local_50.z = actor->speedF; + MtxPosition(&local_50, &actor->speed); + actor->current.pos += actor->speed; } static void e_tk_s_damage(e_tk_class* i_this) { + fopAc_ac_c* actor = i_this; + switch (i_this->mMode) { case MODE_TK_NONE: anm_init(i_this, ANM_TK_DAMAGE, 2.0f, 0x0, 1.0f); @@ -451,7 +495,7 @@ static void e_tk_s_damage(e_tk_class* i_this) { break; case MODE_TK_APPEAR: - if (i_this->mpMorf->getFrame() > 10.0f) { + if (i_this->mpMorf->getFrame() > 10.0f + YREG_F(3)) { i_this->mAction = ACT_TK_FIND; i_this->mMode = MODE_TK_DAMAGE; } @@ -460,6 +504,8 @@ static void e_tk_s_damage(e_tk_class* i_this) { } static void e_tk_damage(e_tk_class* i_this) { + fopAc_ac_c* actor = i_this; + i_this->mInvincibilityTimer = 6; i_this->mAttentionOFF = true; @@ -471,16 +517,21 @@ static void e_tk_damage(e_tk_class* i_this) { case MODE_TK_APPEAR: if (i_this->mpMorf->isStop()) { - fopAcM_createDisappear(i_this, &i_this->eyePos, 10, 0, 0x11); - fopAcM_delete(i_this); + fopAcM_createDisappear(actor, &actor->eyePos, 10, 0, 0x11); + fopAcM_delete(actor); } break; } } static void action(e_tk_class* i_this) { - i_this->mPlayerAngleY = fopAcM_searchPlayerAngleY(i_this); - i_this->mPlayerDistanceLimit = fopAcM_searchPlayerDistance(i_this); + fopAc_ac_c* actor = i_this; + + cXyz _unk1; + cXyz _unk2; + + i_this->mPlayerAngleY = fopAcM_searchPlayerAngleY(actor); + i_this->mPlayerDistanceLimit = fopAcM_searchPlayerDistance(actor); damage_check(i_this); s8 link_search_flag = false; @@ -513,27 +564,32 @@ static void action(e_tk_class* i_this) { i_this->mSound.setLinkSearch(false); } - if (i_this->speedF < 2.0f) { - cXyz this_pos = i_this->current.pos; - fopAcM_effHamonSet(&i_this->mHamonSet, &this_pos, 2.3f, 0.05f); + if (actor->speedF < 2.0f) { + cXyz this_pos = actor->current.pos; + f32 emit_rate = 0.05f + KREG_F(3); + fopAcM_effHamonSet(&i_this->mHamonSet, &this_pos, 2.3f + KREG_F(2), emit_rate); } } static int daE_TK_Execute(e_tk_class* i_this) { + fopAc_ac_c* actor = i_this; + cXyz cStack_94; cXyz cStack_a0; if (i_this->mExecuteState == 0x00) { dBgS_ObjGndChk_Spl ground_check; - cStack_94 = i_this->current.pos; + cStack_94 = actor->current.pos; cStack_94.y += 200.0f; ground_check.SetPos(&cStack_94); - i_this->current.pos.y = dComIfG_Bgsp().GroundCross(&ground_check); + f32 ground_cross = dComIfG_Bgsp().GroundCross(&ground_check); + actor->current.pos.y = ground_cross + KREG_F(17); } i_this->mLifetime++; i_this->mAttentionOFF = false; - for (int i = 0; i <= 3; i++) { + for (int i = 0; i < 4; i++) { + (void)i; // Debug Fakematch: Force i into register. if (i_this->mActionTimer[i] != 0) { i_this->mActionTimer[i]--; } @@ -545,20 +601,20 @@ static int daE_TK_Execute(e_tk_class* i_this) { action(i_this); i_this->mAcch.CrrPos(dComIfG_Bgsp()); - mDoMtx_stack_c::transS(i_this->current.pos.x, i_this->current.pos.y, i_this->current.pos.z); - mDoMtx_stack_c::YrotM(i_this->shape_angle.y); - mDoMtx_stack_c::XrotM(i_this->shape_angle.x); - mDoMtx_stack_c::scaleM(l_HIO.mRadiusScale, l_HIO.mRadiusScale, l_HIO.mRadiusScale); + mDoMtx_stack_c::transS(actor->current.pos.x, actor->current.pos.y, actor->current.pos.z); + mDoMtx_stack_c::YrotM(actor->shape_angle.y); + mDoMtx_stack_c::XrotM(actor->shape_angle.x); + mDoMtx_stack_c::scaleM(l_HIO.mBaseSize, l_HIO.mBaseSize, l_HIO.mBaseSize); J3DModel* model = i_this->mpMorf->getModel(); model->setBaseTRMtx(mDoMtx_stack_c::get()); - i_this->mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + i_this->mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(actor))); if (i_this->mpMorf->checkFrame(6.0f) && (i_this->mAnim == ANM_TK_APPEAR || i_this->mAnim == ANM_TK_HIDE)) { - fopKyM_createWpillar(&i_this->current.pos, 2.3f, 0); + fopKyM_createWpillar(&actor->current.pos, 2.3f + KREG_F(6), 0); } if (i_this->mAnim == ANM_TK_SWIM) { @@ -602,33 +658,31 @@ static int daE_TK_Execute(e_tk_class* i_this) { MTXCopy(model->getAnmMtx(3), *calc_mtx); cStack_94.set(0.0f, 0.0f, 0.0f); - MtxPosition(&cStack_94, &i_this->eyePos); + MtxPosition(&cStack_94, &actor->eyePos); - i_this->attention_info.position = i_this->eyePos; - i_this->attention_info.position.y = - i_this->attention_info.position.y + l_HIO.mRadiusScale * 35.0f; + actor->attention_info.position = actor->eyePos; + actor->attention_info.position.y = actor->attention_info.position.y + l_HIO.mBaseSize * 35.0f; if (i_this->mTKBallSpawned) { e_tk_ball_class* ball_actor = static_cast(fopAcM_SearchByID(i_this->mBallID)); if (ball_actor != NULL) { - ball_actor->current.pos = i_this->eyePos; + ball_actor->current.pos = actor->eyePos; ball_actor->mSuspended = false; } - cXyz scale; - scale.setall(2.0f); - dComIfGp_particle_set(0x819B, &i_this->eyePos, &i_this->shape_angle, &scale); - dComIfGp_particle_set(0x819C, &i_this->eyePos, &i_this->shape_angle, &scale); + cXyz scale(2.0f + TREG_F(8), 2.0f + TREG_F(8), 2.0f + TREG_F(8)); + dComIfGp_particle_set(0x819B, &actor->eyePos, &actor->shape_angle, &scale); + dComIfGp_particle_set(0x819C, &actor->eyePos, &actor->shape_angle, &scale); i_this->mTKBallSpawned = false; } if (i_this->mAttentionOFF) { - fopAcM_OffStatus(i_this, 0); - i_this->attention_info.flags = 0; + fopAcM_OffStatus(actor, 0); + actor->attention_info.flags = 0; } else { - fopAcM_OnStatus(i_this, 0); - i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; + fopAcM_OnStatus(actor, 0); + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } MTXCopy(model->getAnmMtx(2), *calc_mtx); @@ -636,7 +690,7 @@ static int daE_TK_Execute(e_tk_class* i_this) { MtxPosition(&cStack_94, &cStack_a0); i_this->mSph.SetC(cStack_a0); - i_this->mSph.SetR(50.0f * l_HIO.mRadiusScale); + i_this->mSph.SetR((50.0f + JREG_F(3)) * l_HIO.mBaseSize); dComIfG_Ccsp()->Set(&i_this->mSph); @@ -648,18 +702,23 @@ static int daE_TK_IsDelete(e_tk_class* i_this) { } static int daE_TK_Delete(e_tk_class* i_this) { + fopAc_ac_c* actor = i_this; + + fopAcM_RegisterDeleteID(i_this, "E_TK"); + dComIfG_resDelete(&i_this->mPhaseReq, "E_tk"); if (i_this->mInitHIO) { hio_set = false; + mDoHIO_DELETE_CHILD(l_HIO.mNo); } - if (i_this->heap != NULL) { + if (actor->heap != NULL) { i_this->mpMorf->stopZelAnime(); } return 1; } -static int useHeapInit(fopAc_ac_c* a_this) { - e_tk_class* i_this = static_cast(a_this); +static int useHeapInit(fopAc_ac_c* actor) { + e_tk_class* i_this = static_cast(actor); i_this->mpMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("E_tk", 0xE), NULL, NULL, @@ -673,70 +732,76 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 1; } -static int daE_TK_Create(fopAc_ac_c* i_this) { - static dCcD_SrcSph cc_sph_src = { - { - {0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph - } // mSphAttr - }; - +static int daE_TK_Create(fopAc_ac_c* actor) { + e_tk_class* i_this = (e_tk_class*)actor; fopAcM_ct(i_this, e_tk_class); - e_tk_class* const a_this = static_cast(i_this); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&a_this->mPhaseReq, "E_tk"); + cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhaseReq, "E_tk"); if (phase == cPhs_COMPLEATE_e) { - a_this->mArg0 = fopAcM_GetParamBit(a_this, 0, 8); - a_this->mArg1 = fopAcM_GetParamBit(a_this, 8, 4); - a_this->mArg2 = fopAcM_GetParamBit(a_this, 12, 4); - a_this->mParamPathIdx = fopAcM_GetParamBit(a_this, 16, 8); + OS_REPORT("E_tk PARAM %x\n", fopAcM_GetParam(actor)); + i_this->mArg0 = (fopAcM_GetParam(actor) & 0xFF) >> 0; + i_this->mArg1 = (fopAcM_GetParam(actor) & 0xF00) >> 8; + i_this->mArg2 = (fopAcM_GetParam(actor) & 0xF000) >> 12; + i_this->mParamPathIdx = (fopAcM_GetParam(actor) & 0xFF0000) >> 16; - if (!fopAcM_entrySolidHeap(a_this, useHeapInit, 0x1e20)) { + OS_REPORT("E_tk//////////////E_TK SET 1 !!\n"); + + if (!fopAcM_entrySolidHeap(actor, useHeapInit, 0x1e20)) { + OS_REPORT("//////////////E_TK SET NON !!\n"); return cPhs_ERROR_e; } - if (a_this->mParamPathIdx != 0xff) { - a_this->mpPath = dPath_GetRoomPath(a_this->mParamPathIdx, fopAcM_GetRoomNo(a_this)); - if (a_this->mpPath == NULL) { + OS_REPORT("//////////////E_TK SET 2 !!\n"); + + if (i_this->mParamPathIdx != 0xff) { + i_this->mpPath = dPath_GetRoomPath(i_this->mParamPathIdx, fopAcM_GetRoomNo(actor)); + if (i_this->mpPath == NULL) { + OS_REPORT("//////////////E_TK NON PATH !!!\n"); return cPhs_ERROR_e; } - a_this->mPathLoaded = a_this->mParamPathIdx + 0x1; - a_this->mPathDirection = 0x1; - a_this->mAction = ACT_TK_PATHSWIM; + i_this->mPathLoaded = i_this->mParamPathIdx + 0x1; + i_this->mPathDirection = 0x1; + i_this->mAction = ACT_TK_PATHSWIM; } if (hio_set == false) { - a_this->mInitHIO = true; + i_this->mInitHIO = true; hio_set = true; - l_HIO.field_0x04 = -1; + l_HIO.mNo = mDoHIO_CREATE_CHILD("たどぽーる", &l_HIO); // "Tadpole" } - a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; - fopAcM_SetMtx(a_this, a_this->mpMorf->getModel()->getBaseTRMtx()); - fopAcM_SetMin(a_this, -100.0f, -100.0f, -100.0f); - fopAcM_SetMax(a_this, 100.0f, 100.0f, 100.0f); + fopAcM_SetMtx(actor, i_this->mpMorf->getModel()->getBaseTRMtx()); + fopAcM_SetMin(actor, -100.0f, -100.0f, -100.0f); + fopAcM_SetMax(actor, 100.0f, 100.0f, 100.0f); - a_this->attention_info.distances[fopAc_attn_BATTLE_e] = 0x04; - a_this->health = 10; - a_this->field_0x560 = 10; + actor->attention_info.distances[fopAc_attn_BATTLE_e] = 0x04; + actor->field_0x560 = actor->health = 10; - a_this->mStts.Init(100, 0, a_this); - a_this->mSph.Set(cc_sph_src); - a_this->mSph.SetStts(&a_this->mStts); + static dCcD_SrcSph cc_sph_src = { + { + {0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph + } // mSphAttr + }; - a_this->mAcch.Set(&i_this->current.pos, &a_this->old.pos, a_this, 1, &a_this->mAcchCir, - fopAcM_GetSpeed_p(a_this), NULL, NULL); + i_this->mStts.Init(100, 0, actor); + i_this->mSph.Set(cc_sph_src); + i_this->mSph.SetStts(&i_this->mStts); - a_this->mAcchCir.SetWall(-50.0f, 60.0f); - a_this->mSound.init(&a_this->current.pos, &a_this->eyePos, 0x3, 0x1); - a_this->mSound.setEnemyName("E_tk"); - a_this->mAtInfo.mpSound = &a_this->mSound; - a_this->mExecuteState = 0x14; - daE_TK_Execute(a_this); + i_this->mAcch.Set(fopAcM_GetPosition_p(actor), fopAcM_GetOldPosition_p(actor), actor, 1, + &i_this->mAcchCir, fopAcM_GetSpeed_p(actor), NULL, NULL); + + i_this->mAcchCir.SetWall(-50.0f, 60.0f); + i_this->mSound.init(&actor->current.pos, &actor->eyePos, 0x3, 0x1); + i_this->mSound.setEnemyName("E_tk"); + i_this->mAtInfo.mpSound = &i_this->mSound; + i_this->mExecuteState = 0x14; + daE_TK_Execute(i_this); } return phase; } diff --git a/src/d/actor/d_a_e_tk2.cpp b/src/d/actor/d_a_e_tk2.cpp index ca528b2276..4215e02dab 100644 --- a/src/d/actor/d_a_e_tk2.cpp +++ b/src/d/actor/d_a_e_tk2.cpp @@ -1,13 +1,14 @@ /** -* @file d_a_e_tk2.cpp + * @file d_a_e_tk2.cpp * */ -#include "d/dolzel_rel.h" // IWYU pragma: keep +#include "d/dolzel_rel.h" // IWYU pragma: keep #include "d/actor/d_a_e_tk2.h" #include "d/actor/d_a_e_tk_ball.h" #include "d/d_com_inf_game.h" +#include "d/d_s_play.h" enum Action { /* 0x0 */ ACT_TK2_WAIT, @@ -43,26 +44,46 @@ static bool hio_set; static daE_TK2_HIO_c l_HIO; daE_TK2_HIO_c::daE_TK2_HIO_c() { - field_0x04 = -1; - mRadiusScale = 2.3f; - mPlayerRange2 = 1400.0f; - mPlayerRange1 = 500.0f; - mSpeedModifier1 = 10.0f; - mSpeedModifier2 = 25.0f; + mNo = -1; + mBaseSize = 2.3f; + mPlayerDetectionDistanceFar = 1400.0f; + mPlayerDetectionDistanceNear = 500.0f; + mSwimSpeedModifier = 10.0f; + mFleeSpeedModifier = 25.0f; } -static void anm_init(e_tk2_class* i_this, int i_index, f32 i_morf, u8 i_attr, f32 i_rate) { - J3DAnmTransform* anm = (J3DAnmTransform*)dComIfG_getObjectRes("E_tk2", i_index); +#if DEBUG +void daE_TK2_HIO_c::genMessage(JORMContext* ctext) { + // Tadpole + ctext->genLabel(" タドポール", 0x80000001, 0U, NULL); + // Base Size + ctext->genSlider("基本サイズ", &mBaseSize, 0.0f, 5.0f); + // Player Detection Distance Far + ctext->genSlider("PL認識距離 遠", &mPlayerDetectionDistanceFar, 0.0f, 3000.0f); + // Player Detection Distance Near + ctext->genSlider("PL認識距離 近", &mPlayerDetectionDistanceNear, 0.0f, 3000.0f); + ctext->genLabel(" ", 0x80000001); + // ↓ Behavior not guaranteed if changed + ctext->genLabel(" ↓変更すると動作保証しません", 0x80000001); + // Swim Speed + ctext->genSlider("泳ぎ速度", &mSwimSpeedModifier, 0.0f, 40.0f); + // Flee Speed + ctext->genSlider("逃げ速度", &mFleeSpeedModifier, 0.0f, 40.0f); +} +#endif - i_this->mpMorf->setAnm(anm, i_attr, i_morf, i_rate, 0.0f, -1.0f); +static void anm_init(e_tk2_class* i_this, int i_index, f32 i_morf, u8 i_attr, f32 i_rate) { + i_this->mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("E_tk2", i_index), i_attr, i_morf, + i_rate, 0.0f, -1.0f); i_this->mAnim = i_index; } static int daE_TK2_Draw(e_tk2_class* i_this) { + fopAc_ac_c* actor = i_this; J3DModel* model = i_this->mpMorf->getModel(); - g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr); - g_env_light.setLightTevColorType_MAJI(model, &i_this->tevStr); + g_env_light.settingTevStruct(0, &actor->current.pos, &actor->tevStr); + g_env_light.setLightTevColorType_MAJI(model, &actor->tevStr); i_this->mpMorf->entryDL(); return 1; } @@ -70,6 +91,7 @@ static int daE_TK2_Draw(e_tk2_class* i_this) { static int other_bg_check(e_tk2_class* i_this, fopAc_ac_c* i_ac) { fopAc_ac_c* actor = i_this; dBgS_LinChk line_check; + cXyz _unk1; cXyz start_pos; cXyz end_pos; @@ -88,10 +110,11 @@ static int other_bg_check(e_tk2_class* i_this, fopAc_ac_c* i_ac) { } static int pl_check(e_tk2_class* i_this, f32 i_limit, s16 i_max_diff) { + fopAc_ac_c* actor = i_this; fopAc_ac_c* player = dComIfGp_getPlayer(0); if (i_this->mPlayerDistanceLimit < i_limit) { - s16 diff = i_this->shape_angle.y - i_this->mPlayerAngleY; + s16 diff = actor->shape_angle.y - i_this->mPlayerAngleY; if (diff < i_max_diff && diff > (s16)-i_max_diff && !other_bg_check(i_this, player)) { return 1; } @@ -101,6 +124,9 @@ static int pl_check(e_tk2_class* i_this, f32 i_limit, s16 i_max_diff) { } static void damage_check(e_tk2_class* i_this) { + fopAc_ac_c* actor = i_this; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + if (i_this->mInvincibilityTimer == 0) { i_this->mStts.Move(); @@ -119,7 +145,7 @@ static void damage_check(e_tk2_class* i_this) { i_this->mMode = MODE_TK2_KYORO2; i_this->mActionTimer[0] = 50; } else { - cc_at_check(i_this, &i_this->mAtInfo); + cc_at_check(actor, &i_this->mAtInfo); if (i_this->mAtInfo.mHitType == HIT_TYPE_STUN) { i_this->mAction = ACT_TK2_S_DAMAGE; } else { @@ -129,18 +155,24 @@ static void damage_check(e_tk2_class* i_this) { } } - if (i_this->health <= 1) { - i_this->health = 0; + if (actor->health <= 1) { + actor->health = 0; i_this->mSph.SetTgHitMark(CcG_Tg_UNK_MARK_3); } - if (i_this->health <= 1) { // Yes, this is a duplicate (??) - i_this->health = 0; + if (actor->health <= 1) { // Yes, this is a duplicate (??) + actor->health = 0; i_this->mSph.SetTgHitMark(CcG_Tg_UNK_MARK_3); } } } static void e_tk2_wait_0(e_tk2_class* i_this) { + fopAc_ac_c* actor = i_this; + + cXyz src_pos; + f32 speed_mul = 1.0f; + f32 speed_step = 1.0f + YREG_F(5); + i_this->mAttentionOFF = true; switch (i_this->mMode) { @@ -149,7 +181,9 @@ static void e_tk2_wait_0(e_tk2_class* i_this) { break; case MODE_TK2_APPEAR: - if (i_this->mActionTimer[1] == 0 && pl_check(i_this, l_HIO.mPlayerRange2, 0x4000)) { + if (i_this->mActionTimer[1] == 0 && + pl_check(i_this, l_HIO.mPlayerDetectionDistanceFar, 0x4000)) + { i_this->mAction = ACT_TK2_FIND; i_this->mMode = MODE_TK2_NONE; } @@ -157,10 +191,16 @@ static void e_tk2_wait_0(e_tk2_class* i_this) { } i_this->mSomeAngle = i_this->mPlayerAngleY; - cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->mSomeAngle, 0x10, 0x400); + cLib_addCalcAngleS2(&actor->shape_angle.y, i_this->mSomeAngle, 0x10, 0x400); } static void e_tk2_find(e_tk2_class* i_this) { + fopAc_ac_c* actor = i_this; + + cXyz local_58; + f32 speed_target = 0.0f; + f32 speed_step = 3.0f; + switch (i_this->mMode) { case MODE_TK2_NONE: anm_init(i_this, ANM_TK2_APPEAR, 3.0f, 0x0, 1.0f); @@ -202,7 +242,7 @@ static void e_tk2_find(e_tk2_class* i_this) { break; case MODE_TK2_SWIM: - i_this->mPlayerAngleY = i_this->mPlayerAngleY + -0x8000; + ADD_ANGLE(i_this->mPlayerAngleY, 0x8000); i_this->mAttentionOFF = true; if (i_this->mpMorf->isStop()) { i_this->mAnimSpeed = 4.0f; @@ -215,8 +255,10 @@ static void e_tk2_find(e_tk2_class* i_this) { i_this->mAttentionOFF = true; cLib_addCalc2(&i_this->mAnimSpeed, 2.0f, 1.0f, 0.15f); i_this->mpMorf->setPlaySpeed(i_this->mAnimSpeed); + speed_target = 1.0f + YREG_F(17); + speed_step = 10.0f + YREG_F(18); if (i_this->mActionTimer[0] == 0 && - i_this->mPlayerDistanceLimit > l_HIO.mPlayerRange1 * 1.2f) + i_this->mPlayerDistanceLimit > l_HIO.mPlayerDetectionDistanceNear * 1.2f) { i_this->mMode = MODE_TK2_NONE; } else { @@ -226,16 +268,18 @@ static void e_tk2_find(e_tk2_class* i_this) { } } if (i_this->mActionTimer[1] == 0) { - i_this->mPlayerAngleY = i_this->mPlayerAngleY - 0x8000; + ADD_ANGLE(i_this->mPlayerAngleY, 0x8000); } else { i_this->mPlayerAngleY = i_this->mSomeAngle; } } - cLib_addCalcAngleS2(&(i_this)->shape_angle.y, i_this->mPlayerAngleY, 4, 0x800); + cLib_addCalcAngleS2(&actor->shape_angle.y, i_this->mPlayerAngleY, 4, 0x800); } static void e_tk2_attack(e_tk2_class* i_this) { + fopAc_ac_c* actor = i_this; + switch (i_this->mMode) { case MODE_TK2_NONE: i_this->mMode = MODE_TK2_APPEAR; @@ -245,15 +289,15 @@ static void e_tk2_attack(e_tk2_class* i_this) { case MODE_TK2_APPEAR: if ((int)i_this->mpMorf->getFrame() == 0x18) { i_this->mBallID = - fopAcM_createChild(PROC_E_TK_BALL, fopAcM_GetID(i_this), 1, &i_this->eyePos, - fopAcM_GetRoomNo(i_this), &i_this->shape_angle, 0, -1, 0); + fopAcM_createChild(PROC_E_TK_BALL, fopAcM_GetID(actor), 1, &actor->eyePos, + fopAcM_GetRoomNo(actor), &actor->shape_angle, 0, -1, 0); } if ((int)i_this->mpMorf->getFrame() == 0x1c) { i_this->mTKBallSpawned = true; } if (i_this->mpMorf->isStop()) { anm_init(i_this, ANM_TK2_WAIT01, 1.0f, 0x02, 1.0f); - i_this->mActionTimer[0] = (short)(int)(cM_rndF(30.0f) + 70.0f); + i_this->mActionTimer[0] = cM_rndF(30.0f) + 70.0f; i_this->mMode = MODE_TK2_ATTACK; } break; @@ -261,17 +305,19 @@ static void e_tk2_attack(e_tk2_class* i_this) { case MODE_TK2_ATTACK: if (i_this->mActionTimer[0] == 0) { i_this->mMode = MODE_TK2_NONE; - } else if (!pl_check(i_this, l_HIO.mPlayerRange2 + 50.0f, 0x6000)) { + } else if (!pl_check(i_this, l_HIO.mPlayerDetectionDistanceFar + 50.0f, 0x6000)) { i_this->mAction = ACT_TK2_FIND; i_this->mMode = MODE_TK2_DAMAGE; } break; } - cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->mPlayerAngleY, 4, 0x800); + cLib_addCalcAngleS2(&actor->shape_angle.y, i_this->mPlayerAngleY, 4, 0x800); } static void e_tk2_s_damage(e_tk2_class* i_this) { + fopAc_ac_c* actor = i_this; + switch (i_this->mMode) { case MODE_TK2_NONE: anm_init(i_this, ANM_TK2_DAMAGE, 2.0f, 0x0, 1.0f); @@ -279,7 +325,7 @@ static void e_tk2_s_damage(e_tk2_class* i_this) { break; case MODE_TK2_APPEAR: - if (i_this->mpMorf->getFrame() > 10.0f) { + if (i_this->mpMorf->getFrame() > 10.0f + YREG_F(3)) { i_this->mAction = ACT_TK2_FIND; i_this->mMode = MODE_TK2_DAMAGE; } @@ -288,6 +334,8 @@ static void e_tk2_s_damage(e_tk2_class* i_this) { } static void e_tk2_damage(e_tk2_class* i_this) { + fopAc_ac_c* actor = i_this; + i_this->mInvincibilityTimer = 6; i_this->mAttentionOFF = true; @@ -299,8 +347,8 @@ static void e_tk2_damage(e_tk2_class* i_this) { case MODE_TK2_APPEAR: if (i_this->mpMorf->isStop()) { - fopAcM_createDisappear(i_this, &i_this->eyePos, 10, 0, 0x12); - fopAcM_delete(i_this); + fopAcM_createDisappear(actor, &actor->eyePos, 10, 0, 0x12); + fopAcM_delete(actor); } break; } @@ -308,6 +356,10 @@ static void e_tk2_damage(e_tk2_class* i_this) { static void action(e_tk2_class* i_this) { fopAc_ac_c* actor = i_this; + + cXyz _unk1; + cXyz _unk2; + i_this->mPlayerAngleY = fopAcM_searchPlayerAngleY(actor); i_this->mPlayerDistanceLimit = fopAcM_searchPlayerDistance(actor); damage_check(i_this); @@ -341,20 +393,23 @@ static void action(e_tk2_class* i_this) { } static int daE_TK2_Execute(e_tk2_class* i_this) { + fopAc_ac_c* actor = i_this; + cXyz cStack_94; cXyz cStack_a0; if (i_this->mExecuteState == 0x00) { dBgS_ObjGndChk_Spl ground_check; - cStack_94 = i_this->current.pos; + cStack_94 = actor->current.pos; cStack_94.y += 200.0f; ground_check.SetPos(&cStack_94); - i_this->current.pos.y = dComIfG_Bgsp().GroundCross(&ground_check) - 10.0f; + f32 ground_cross = dComIfG_Bgsp().GroundCross(&ground_check); + actor->current.pos.y = ground_cross - 10.0f + JREG_F(8); } i_this->mLifetime++; i_this->mAttentionOFF = false; - for (int i = 0; i <= 3; i++) { + for (int i = 0; i < 4; i++) { if (i_this->mActionTimer[i] != 0) { i_this->mActionTimer[i]--; } @@ -366,14 +421,14 @@ static int daE_TK2_Execute(e_tk2_class* i_this) { action(i_this); i_this->mAcch.CrrPos(dComIfG_Bgsp()); - mDoMtx_stack_c::transS(i_this->current.pos.x, i_this->current.pos.y, i_this->current.pos.z); - mDoMtx_stack_c::YrotM(i_this->shape_angle.y); - mDoMtx_stack_c::scaleM(l_HIO.mRadiusScale, l_HIO.mRadiusScale, l_HIO.mRadiusScale); + mDoMtx_stack_c::transS(actor->current.pos.x, actor->current.pos.y, actor->current.pos.z); + mDoMtx_stack_c::YrotM(actor->shape_angle.y); + mDoMtx_stack_c::scaleM(l_HIO.mBaseSize, l_HIO.mBaseSize, l_HIO.mBaseSize); J3DModel* model = i_this->mpMorf->getModel(); model->setBaseTRMtx(mDoMtx_stack_c::get()); - i_this->mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + i_this->mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(actor))); if (i_this->mAnim == ANM_TK2_SWIM) { if (i_this->mpMorf->checkFrame(0.0f) || i_this->mpMorf->checkFrame(6.0f) || @@ -416,32 +471,30 @@ static int daE_TK2_Execute(e_tk2_class* i_this) { MTXCopy(model->getAnmMtx(3), *calc_mtx); cStack_94.set(0.0f, 0.0f, 0.0f); - MtxPosition(&cStack_94, &i_this->eyePos); + MtxPosition(&cStack_94, &actor->eyePos); - i_this->attention_info.position = i_this->eyePos; - i_this->attention_info.position.y = - i_this->attention_info.position.y + l_HIO.mRadiusScale * 35.0f; + actor->attention_info.position = actor->eyePos; + actor->attention_info.position.y = actor->attention_info.position.y + l_HIO.mBaseSize * 35.0f; if (i_this->mTKBallSpawned) { e_tk_ball_class* ball_actor = static_cast(fopAcM_SearchByID(i_this->mBallID)); if (ball_actor != NULL) { - ball_actor->current.pos = i_this->eyePos; + ball_actor->current.pos = actor->eyePos; ball_actor->mSuspended = false; } - cXyz scale; - scale.setall(2.0f); - dComIfGp_particle_set(0x8198, &i_this->eyePos, &i_this->shape_angle, &scale); - dComIfGp_particle_set(0x8199, &i_this->eyePos, &i_this->shape_angle, &scale); + cXyz scale(2.0f + TREG_F(8), 2.0f + TREG_F(8), 2.0f + TREG_F(8)); + dComIfGp_particle_set(0x8198, &actor->eyePos, &actor->shape_angle, &scale); + dComIfGp_particle_set(0x8199, &actor->eyePos, &actor->shape_angle, &scale); i_this->mTKBallSpawned = false; } if (i_this->mAttentionOFF) { - fopAcM_OffStatus(i_this, 0); - i_this->attention_info.flags = 0; + fopAcM_OffStatus(actor, 0); + actor->attention_info.flags = 0; } else { - fopAcM_OnStatus(i_this, 0); - i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; + fopAcM_OnStatus(actor, 0); + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; } MTXCopy(model->getAnmMtx(2), *calc_mtx); @@ -449,7 +502,7 @@ static int daE_TK2_Execute(e_tk2_class* i_this) { MtxPosition(&cStack_94, &cStack_a0); i_this->mSph.SetC(cStack_a0); - i_this->mSph.SetR(50.0f * l_HIO.mRadiusScale); + i_this->mSph.SetR((50.0f + JREG_F(3)) * l_HIO.mBaseSize); dComIfG_Ccsp()->Set(&i_this->mSph); @@ -461,18 +514,23 @@ static int daE_TK2_IsDelete(e_tk2_class* i_this) { } static int daE_TK2_Delete(e_tk2_class* i_this) { + fopAc_ac_c* actor = i_this; + + fopAcM_RegisterDeleteID(i_this, "E_TK2"); + dComIfG_resDelete(&i_this->mPhaseReq, "E_tk2"); if (i_this->mInitHIO) { hio_set = false; + mDoHIO_DELETE_CHILD(l_HIO.mNo); } - if (i_this->heap != NULL) { + if (actor->heap != NULL) { i_this->mpMorf->stopZelAnime(); } return 1; } -static int useHeapInit(fopAc_ac_c* a_this) { - e_tk2_class* i_this = static_cast(a_this); +static int useHeapInit(fopAc_ac_c* actor) { + e_tk2_class* i_this = static_cast(actor); i_this->mpMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes("E_tk2", 0xE), NULL, NULL, @@ -486,61 +544,66 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 1; } -static int daE_TK2_Create(fopAc_ac_c* i_this) { - static dCcD_SrcSph cc_sph_src = { - { - {0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph - } // mSphAttr - }; - +static int daE_TK2_Create(fopAc_ac_c* actor) { + e_tk2_class* i_this = (e_tk2_class*)actor; fopAcM_ct(i_this, e_tk2_class); - e_tk2_class* a_this = static_cast(i_this); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&a_this->mPhaseReq, "E_tk2"); + cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhaseReq, "E_tk2"); if (phase == cPhs_COMPLEATE_e) { - a_this->mArg0 = fopAcM_GetParamBit(a_this, 0, 8); - a_this->mArg1 = fopAcM_GetParamBit(a_this, 8, 4); - a_this->mArg2 = fopAcM_GetParamBit(a_this, 12, 4); + OS_REPORT("E_tk2 PARAM %x\n", fopAcM_GetParam(actor)); + i_this->mArg0 = (fopAcM_GetParam(actor) & 0xFF) >> 0; + i_this->mArg1 = (fopAcM_GetParam(actor) & 0xF00) >> 8; + i_this->mArg2 = (fopAcM_GetParam(actor) & 0xF000) >> 12; - if (!fopAcM_entrySolidHeap(a_this, useHeapInit, 0x23a0)) { + OS_REPORT("E_tk2//////////////E_TK2 SET 1 !!\n"); + + if (!fopAcM_entrySolidHeap(actor, useHeapInit, 0x23a0)) { + OS_REPORT("//////////////E_TK2 SET NON !!\n"); return cPhs_ERROR_e; } + OS_REPORT("//////////////E_TK2 SET 2 !!\n"); + if (hio_set == false) { - a_this->mInitHIO = true; + i_this->mInitHIO = true; hio_set = true; - l_HIO.field_0x04 = -1; + l_HIO.mNo = mDoHIO_CREATE_CHILD("たどぽーる2", &l_HIO); // "Tadpole 2" } - a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e; + actor->attention_info.flags = fopAc_AttnFlag_BATTLE_e; - fopAcM_SetMtx(a_this, a_this->mpMorf->getModel()->getBaseTRMtx()); - fopAcM_SetMin(a_this, -100.0f, -100.0f, -100.0f); - fopAcM_SetMax(a_this, 100.0f, 100.0f, 100.0f); + fopAcM_SetMtx(actor, i_this->mpMorf->getModel()->getBaseTRMtx()); + fopAcM_SetMin(actor, -100.0f, -100.0f, -100.0f); + fopAcM_SetMax(actor, 100.0f, 100.0f, 100.0f); - a_this->attention_info.distances[fopAc_attn_BATTLE_e] = 0x04; - a_this->health = 0; - a_this->field_0x560 = 0; + actor->attention_info.distances[fopAc_attn_BATTLE_e] = 0x04; + actor->field_0x560 = actor->health = 0; - a_this->mStts.Init(100, 0, a_this); - a_this->mSph.Set(cc_sph_src); - a_this->mSph.SetStts(&a_this->mStts); + static dCcD_SrcSph cc_sph_src = { + { + {0x0, {{0x0, 0x0, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 40.0f} // mSph + } // mSphAttr + }; - a_this->mAcch.Set(&i_this->current.pos, &a_this->old.pos, a_this, 1, &a_this->mAcchCir, - fopAcM_GetSpeed_p(a_this), NULL, NULL); + i_this->mStts.Init(100, 0, actor); + i_this->mSph.Set(cc_sph_src); + i_this->mSph.SetStts(&i_this->mStts); - a_this->mAcchCir.SetWall(-50.0f, 60.0f); - a_this->mSound.init(&a_this->current.pos, &a_this->eyePos, 0x3, 0x1); - a_this->mSound.setEnemyName("E_tk2"); - a_this->mAtInfo.mpSound = &a_this->mSound; - a_this->mExecuteState = 0x14; - daE_TK2_Execute(a_this); + i_this->mAcch.Set(fopAcM_GetPosition_p(actor), fopAcM_GetOldPosition_p(actor), actor, 1, + &i_this->mAcchCir, fopAcM_GetSpeed_p(actor), NULL, NULL); + + i_this->mAcchCir.SetWall(-50.0f, 60.0f); + i_this->mSound.init(&actor->current.pos, &actor->eyePos, 0x3, 0x1); + i_this->mSound.setEnemyName("E_tk2"); + i_this->mAtInfo.mpSound = &i_this->mSound; + i_this->mExecuteState = 0x14; + daE_TK2_Execute(i_this); } return phase; } diff --git a/src/d/actor/d_a_e_tk_ball.cpp b/src/d/actor/d_a_e_tk_ball.cpp index 4429670d69..c1ca119e2e 100644 --- a/src/d/actor/d_a_e_tk_ball.cpp +++ b/src/d/actor/d_a_e_tk_ball.cpp @@ -1,12 +1,13 @@ /** -* @file d_a_e_tk_ball.cpp + * @file d_a_e_tk_ball.cpp * */ -#include "d/dolzel_rel.h" // IWYU pragma: keep +#include "d/dolzel_rel.h" // IWYU pragma: keep #include "d/actor/d_a_e_tk_ball.h" #include "d/actor/d_a_player.h" +#include "d/d_s_play.h" enum Action { /* 0x00 */ ACT_TK_BALL_MOVE, // Move in a straight line @@ -30,8 +31,10 @@ static int daE_TK_BALL_Draw(e_tk_ball_class* i_this) { return 1; } - g_env_light.settingTevStruct(0, &i_this->current.pos, &i_this->tevStr); - g_env_light.setLightTevColorType_MAJI(i_this->mpModel, &i_this->tevStr); + fopAc_ac_c* actor = i_this; + + g_env_light.settingTevStruct(0, &actor->current.pos, &actor->tevStr); + g_env_light.setLightTevColorType_MAJI(i_this->mpModel, &actor->tevStr); mDoExt_modelUpdateDL(i_this->mpModel); return 1; } @@ -39,15 +42,20 @@ static int daE_TK_BALL_Draw(e_tk_ball_class* i_this) { static int simple_bg_check(e_tk_ball_class* i_this) { fopAc_ac_c* actor = i_this; - cXyz current_pos = actor->current.pos; + cXyz current_pos; + cXyz start_pos; + cXyz end_pos; + cXyz ray_offset; + cXyz mtx_offset; + + current_pos = actor->current.pos; current_pos.y += i_this->mArcHeight; cMtx_YrotS(*calc_mtx, actor->current.angle.y); - cXyz start_pos; - cXyz end_pos; - cXyz ray_offset(0.0f, 30.0f, -50.0f); + ray_offset.x = 0.0f; + ray_offset.y = 30.0f; + ray_offset.z = -50.0f; - cXyz mtx_offset; MtxPosition(&ray_offset, &mtx_offset); start_pos = current_pos + mtx_offset; @@ -66,13 +74,14 @@ static int simple_bg_check(e_tk_ball_class* i_this) { } static void impact_eff_set(e_tk_ball_class* i_this) { - cXyz pos = i_this->current.pos; + fopAc_ac_c* actor = i_this; + cXyz pos = actor->current.pos; pos.y += i_this->mArcHeight; - cXyz scale(2.0f, 2.0f, 2.0f); + cXyz scale(2.0f + TREG_F(8), 2.0f + TREG_F(8), 2.0f + TREG_F(8)); - csXyz rotation = i_this->current.angle; - rotation.y -= 0x8000; + csXyz rotation = actor->current.angle; + ADD_ANGLE(rotation.y, 0x8000); if (i_this->mType == TYPE_TK_BALL_WATER) { dComIfGp_particle_set(0x819B, &pos, &rotation, &scale); @@ -91,14 +100,14 @@ static void e_tk_ball_move(e_tk_ball_class* i_this) { cXyz direction_vec; cXyz speed_vec; - cXyz target_center; + cXyz unk1; switch (i_this->mMode) { case MODE_TK_BALL_INIT: i_this->mMode = MODE_TK_BALL_MOVE; i_this->mInitalPosition = actor->current.pos; direction_vec = player->eyePos; - direction_vec.y += -20.0f; + direction_vec.y += -20.0f + TREG_F(9); direction_vec -= i_this->mInitalPosition; i_this->mInitalDistance = direction_vec.abs(); @@ -112,7 +121,9 @@ static void e_tk_ball_move(e_tk_ball_class* i_this) { cMtx_YrotS(*calc_mtx, actor->current.angle.y); cMtx_XrotM(*calc_mtx, actor->current.angle.x); - direction_vec.set(0.0f, 0.0f, 50.0f); + direction_vec.x = 0.0f; + direction_vec.y = 0.0f; + direction_vec.z = 50.0f + TREG_F(10); MtxPosition(&direction_vec, &actor->speed); i_this->mAtSph.OnAtVsPlayerBit(); @@ -126,7 +137,7 @@ static void e_tk_ball_move(e_tk_ball_class* i_this) { break; } - target_center = actor->current.pos; + cXyz target_center = actor->current.pos; target_center.y += i_this->mArcHeight; i_this->mTgSph.SetC(target_center); dComIfG_Ccsp()->Set(&i_this->mTgSph); @@ -146,7 +157,7 @@ static void e_tk_ball_move(e_tk_ball_class* i_this) { if (actor_lockon && daPy_getPlayerActorClass()->getCutType() != daPy_py_c::CUT_TYPE_NONE) { i_this->mAction = ACT_TK_BALL_RETURN; i_this->mMode = MODE_TK_BALL_INIT; - actor->current.angle.y -= 0x8000; + ADD_ANGLE(actor->current.angle.y, 0x8000); } else { i_this->mAction = ACT_TK_BALL_DROP; i_this->mMode = MODE_TK_BALL_INIT; @@ -165,7 +176,7 @@ static void e_tk_ball_move(e_tk_ball_class* i_this) { speed_vec.x = 0.0; speed_vec.y = 0.0; if (daPy_getPlayerActorClass()->getCutType() != daPy_py_c::CUT_TYPE_NONE) { - speed_vec.z = 60.0f; + speed_vec.z = 60.0f + TREG_F(16); } cMtx_YrotS(*calc_mtx, actor->current.angle.y); cMtx_XrotM(*calc_mtx, actor->current.angle.x); @@ -187,46 +198,59 @@ static void e_tk_ball_move(e_tk_ball_class* i_this) { } static void e_tk_ball_return(e_tk_ball_class* i_this) { + fopAc_ac_c* actor = i_this; + + cXyz _unk1; + cXyz _unk2; + switch (i_this->mMode) { case MODE_TK_BALL_INIT: - i_this->current.pos += i_this->speed; + actor->current.pos += actor->speed; if (i_this->mActionTimer[1] == 0) { i_this->mTgSph.SetTgHitMark(CcG_Tg_UNK_MARK_0); } break; } - cXyz new_center = i_this->current.pos; + cXyz new_center = actor->current.pos; new_center.y += i_this->mArcHeight; i_this->mAtSph.MoveCAt(new_center); dComIfG_Ccsp()->Set(&i_this->mAtSph); if (i_this->mActionTimer[1] == 0 && (simple_bg_check(i_this) || i_this->mAtSph.ChkAtHit())) { impact_eff_set(i_this); - fopAcM_delete(i_this); + fopAcM_delete(actor); } } static void e_tk_ball_drop(e_tk_ball_class* i_this) { + fopAc_ac_c* actor = i_this; + + cXyz _unk1; + cXyz _unk2; + switch (i_this->mMode) { case MODE_TK_BALL_INIT: - i_this->current.pos += i_this->speed; - i_this->speed.y -= 2.0f; - if (i_this->speed.y < -50.0f) { - i_this->speed.y = -50.0f; + actor->current.pos += actor->speed; + actor->speed.y -= 2.0f; + if (actor->speed.y < -50.0f) { + actor->speed.y = -50.0f; } break; } if (simple_bg_check(i_this) || i_this->mActionTimer[0] == 0) { impact_eff_set(i_this); - fopAcM_delete(i_this); + fopAcM_delete(actor); } } static void action(e_tk_ball_class* i_this) { fopAc_ac_c* actor = i_this; + cXyz position_diff; + cXyz _unk2; + static u16 e_id[3] = {0x819D, 0x819E, 0x819A}; s8 is_moving = true; @@ -244,11 +268,11 @@ static void action(e_tk_ball_class* i_this) { } if (is_moving) { - cXyz position_diff = actor->home.pos - actor->current.pos; + position_diff = actor->home.pos - actor->current.pos; f32 pos_diff_abs = position_diff.abs(); - f32 height_scale = i_this->mInitalDistance * 0.1f; - if (height_scale > 300.0f) { - height_scale = 300.0f; + f32 height_scale = i_this->mInitalDistance * (TREG_F(19) + 0.1f); + if (height_scale > 300.0f + TREG_F(18)) { + height_scale = 300.0f + TREG_F(18); } i_this->mArcHeight = height_scale * cM_ssin((pos_diff_abs / i_this->mInitalDistance) * 32768.0f); @@ -262,7 +286,7 @@ static void action(e_tk_ball_class* i_this) { cXyz particle_position = actor->current.pos; particle_position.y += i_this->mArcHeight; - cXyz particle_scale(2.0f, 2.0f, 2.0f); + cXyz particle_scale(2.0f + TREG_F(8), 2.0f + TREG_F(8), 2.0f + TREG_F(8)); for (int i = 0; i < 2; i++) { i_this->mParticleKey[i] = dComIfGp_particle_set( @@ -294,6 +318,11 @@ static int daE_TK_BALL_Execute(e_tk_ball_class* i_this) { return 1; } + fopAc_ac_c* actor = i_this; + + cXyz _unk1; + cXyz _unk2; + i_this->mLifetime++; for (int i = 0; i < 2; i++) { if (i_this->mActionTimer[i] != 0) { @@ -306,17 +335,18 @@ static int daE_TK_BALL_Execute(e_tk_ball_class* i_this) { action(i_this); - i_this->shape_angle.y += 0x1000; - i_this->shape_angle.x += 0xE00; + ADD_ANGLE(actor->shape_angle.y, 0x1000); + ADD_ANGLE(actor->shape_angle.x, 0xE00); - mDoMtx_stack_c::transS(i_this->current.pos.x, i_this->current.pos.y + i_this->mArcHeight, - i_this->current.pos.z); - mDoMtx_stack_c::YrotM(i_this->shape_angle.y); - mDoMtx_stack_c::XrotM(i_this->shape_angle.x); - mDoMtx_stack_c::scaleM(2.0f, 2.0f, 2.0f); + mDoMtx_stack_c::transS(actor->current.pos.x, actor->current.pos.y + i_this->mArcHeight, + actor->current.pos.z); + mDoMtx_stack_c::YrotM(actor->shape_angle.y); + mDoMtx_stack_c::XrotM(actor->shape_angle.x); + f32 scale = 2.0f + TREG_F(8); + mDoMtx_stack_c::scaleM(scale, scale, scale); i_this->mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); - i_this->mSound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(i_this))); + i_this->mSound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(actor))); return 1; } @@ -325,29 +355,32 @@ static int daE_TK_BALL_IsDelete(e_tk_ball_class* i_this) { } static int daE_TK_BALL_Delete(e_tk_ball_class* i_this) { + fopAc_ac_c* actor = i_this; + fopAcM_RegisterDeleteID(i_this, "E_TK_BALL"); if (i_this->mType == TYPE_TK_BALL_WATER) { dComIfG_resDelete(&i_this->mPhaseReq, "E_tk"); } else { dComIfG_resDelete(&i_this->mPhaseReq, "E_tk2"); } - if (i_this->heap != NULL) { + if (actor->heap != NULL) { i_this->mSound.deleteObject(); } return 1; } static int useHeapInit(fopAc_ac_c* i_this) { - e_tk_ball_class* a_this = static_cast(i_this); - J3DModelData* ball_model; + e_tk_ball_class* actor = static_cast(i_this); + J3DModelData* modelData; - if (a_this->mType == TYPE_TK_BALL_WATER) { - ball_model = (J3DModelData*)dComIfG_getObjectRes("E_tk", 0xD); + if (actor->mType == TYPE_TK_BALL_WATER) { + modelData = (J3DModelData*)dComIfG_getObjectRes("E_tk", 0xD); } else { - ball_model = (J3DModelData*)dComIfG_getObjectRes("E_tk2", 0xD); + modelData = (J3DModelData*)dComIfG_getObjectRes("E_tk2", 0xD); } - a_this->mpModel = mDoExt_J3DModel__create(ball_model, 0x80000, 0x11000084); + JUT_ASSERT(679, modelData != 0); + actor->mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); - if (a_this->mpModel == NULL) { + if (actor->mpModel == NULL) { return 0; } else { return 1; @@ -355,77 +388,84 @@ static int useHeapInit(fopAc_ac_c* i_this) { } static int daE_TK_BALL_Create(fopAc_ac_c* i_this) { - static dCcD_SrcSph at_sph_src = { - { - {0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0xd}, {0x0, 0x0}, 0x0}}, // mObj - {dCcD_SE_METAL, 0x1, 0x0, 0x0, 0x0}, // mGObjAt - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 20.0f} // mSph - } // mSphAttr - }; + e_tk_ball_class* actor = (e_tk_ball_class*)i_this; + fopAcM_ct(actor, e_tk_ball_class); - static dCcD_SrcSph tg_sph_src = { - { - {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt - {dCcD_SE_METAL, 0x5, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {{0.0f, 0.0f, 0.0f}, 35.0f} // mSph - } // mSphAttr - }; - - fopAcM_ct(i_this, e_tk_ball_class); - e_tk_ball_class* a_this = static_cast(i_this); - - a_this->mType = fopAcM_GetParam(a_this); - if (a_this->mType == TYPE_TK_BALL_UNK) { - a_this->mType = TYPE_TK_BALL_WATER; + actor->mType = fopAcM_GetParam(i_this); + if (actor->mType == TYPE_TK_BALL_UNK) { + actor->mType = TYPE_TK_BALL_WATER; } cPhs__Step phase; u32 size; - if (a_this->mType == TYPE_TK_BALL_WATER) { - phase = (cPhs__Step)dComIfG_resLoad(&a_this->mPhaseReq, "E_tk"); + if (actor->mType == TYPE_TK_BALL_WATER) { + phase = (cPhs__Step)dComIfG_resLoad(&actor->mPhaseReq, "E_tk"); size = 0x820; } else { - phase = (cPhs__Step)dComIfG_resLoad(&a_this->mPhaseReq, "E_tk2"); + phase = (cPhs__Step)dComIfG_resLoad(&actor->mPhaseReq, "E_tk2"); size = 0xEE0; } if (phase == cPhs_COMPLEATE_e) { - a_this->mArg1 = fopAcM_GetParamBit(i_this, 8, 8); - if (a_this->mArg1 == 0xff) { - a_this->mArg1 = 0x00; + OS_REPORT("E_tk_BALL PARAM %x\n", fopAcM_GetParam(i_this)); + actor->mArg1 = (fopAcM_GetParam(i_this) & 0xFF00) >> 8; + if (actor->mArg1 == 0xff) { + actor->mArg1 = 0x00; } + OS_REPORT("E_tk_BALL//////////////E_TK_BALL SET 1 !!\n"); + if (!fopAcM_entrySolidHeap(i_this, useHeapInit, size)) { + OS_REPORT("//////////////E_TK_BALL SET NON !!\n"); return cPhs_ERROR_e; } - fopAcM_SetMtx(a_this, a_this->mpModel->getBaseTRMtx()); - a_this->mStts.Init(0xff, 0, a_this); - a_this->mAtSph.Set(at_sph_src); - a_this->mAtSph.SetStts(&a_this->mStts); - if (a_this->mType == TYPE_TK_BALL_FIRE) { - a_this->mAtSph.SetAtType(AT_TYPE_100); - a_this->mAtSph.SetAtMtrl(dCcD_MTRL_FIRE); + + OS_REPORT("//////////////E_TK_BALL SET 2 !!\n"); + + static dCcD_SrcSph at_sph_src = { + { + {0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0xd}, {0x0, 0x0}, 0x0}}, // mObj + {dCcD_SE_METAL, 0x1, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 20.0f} // mSph + } // mSphAttr + }; + + static dCcD_SrcSph tg_sph_src = { + { + {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_METAL, 0x5, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {{0.0f, 0.0f, 0.0f}, 35.0f} // mSph + } // mSphAttr + }; + + fopAcM_SetMtx(i_this, actor->mpModel->getBaseTRMtx()); + actor->mStts.Init(0xff, 0, i_this); + actor->mAtSph.Set(at_sph_src); + actor->mAtSph.SetStts(&actor->mStts); + if (actor->mType == TYPE_TK_BALL_FIRE) { + actor->mAtSph.SetAtType(AT_TYPE_100); + actor->mAtSph.SetAtMtrl(dCcD_MTRL_FIRE); } - a_this->mTgSph.Set(tg_sph_src); - a_this->mTgSph.SetStts(&a_this->mStts); + actor->mTgSph.Set(tg_sph_src); + actor->mTgSph.SetStts(&actor->mStts); - a_this->mSound.init(&a_this->current.pos, 1); - a_this->shape_angle.y = cM_rndFX(32768.0f); - a_this->shape_angle.x = cM_rndFX(32768.0f); - a_this->mSuspended = true; + actor->mSound.init(&i_this->current.pos, 1); + i_this->shape_angle.y = cM_rndFX(32768.0f); + i_this->shape_angle.x = cM_rndFX(32768.0f); + actor->mSuspended = true; mDoMtx_stack_c::scaleS(0.0f, 0.0f, 0.0f); - a_this->mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); - daE_TK_BALL_Execute(a_this); + actor->mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); + daE_TK_BALL_Execute(actor); } return phase; } From c9e2a73dda1cf97a635dfbd2666a0e1c9da2da1f Mon Sep 17 00:00:00 2001 From: TakaRikka <38417346+TakaRikka@users.noreply.github.com> Date: Sat, 24 Jan 2026 23:36:23 -0800 Subject: [PATCH 2/5] general cleanup, d_menu_quit / d_a_obj_testcube mostly done, d_msg_scrn_explain debug (#3065) * typedef for cPhs_Step * make sdk includes consistent * d_menu_quit / d_msg_scrn_explain debug * d_a_obj_testcube mostly done * d_debug_pad mostly done * jstudio tool library headers * some JStudioCameraEditor headers * d_jcam_editor mostly done * try fixing some shield regressions * d_bg_parts mostly done * fix merge errors * debug fix --- include/JSystem/J2DGraph/J2DGrafContext.h | 2 +- include/JSystem/J2DGraph/J2DManage.h | 2 +- include/JSystem/J2DGraph/J2DPane.h | 2 +- include/JSystem/J2DGraph/J2DTevs.h | 2 +- include/JSystem/J3DGraphAnimator/J3DModel.h | 2 +- .../JSystem/J3DGraphAnimator/J3DModelData.h | 4 + .../JSystem/J3DGraphAnimator/J3DSkinDeform.h | 2 +- include/JSystem/J3DGraphBase/J3DMaterial.h | 1 + include/JSystem/J3DGraphBase/J3DPacket.h | 4 +- include/JSystem/J3DGraphBase/J3DShape.h | 2 +- include/JSystem/J3DGraphBase/J3DShapeDraw.h | 2 +- include/JSystem/J3DGraphBase/J3DShapeMtx.h | 2 +- include/JSystem/J3DGraphBase/J3DStruct.h | 4 +- include/JSystem/J3DGraphBase/J3DSys.h | 22 +- include/JSystem/J3DGraphBase/J3DTevs.h | 2 +- include/JSystem/J3DGraphBase/J3DVertex.h | 2 +- .../JSystem/J3DGraphLoader/J3DModelLoader.h | 2 +- .../J3DGraphLoader/J3DModelLoaderCalcSize.h | 2 +- include/JSystem/J3DU/J3DUClipper.h | 2 +- include/JSystem/J3DU/J3DUD.h | 2 +- include/JSystem/JAHostIO/JAHFrameNode.h | 2 +- include/JSystem/JAHostIO/JAHioMessage.h | 2 +- include/JSystem/JAudio2/JASAiCtrl.h | 2 +- include/JSystem/JAudio2/JASAramStream.h | 2 +- include/JSystem/JAudio2/JASAudioReseter.h | 2 +- include/JSystem/JAudio2/JASBank.h | 2 +- include/JSystem/JAudio2/JASBankList.h | 2 +- include/JSystem/JAudio2/JASCalc.h | 2 +- include/JSystem/JAudio2/JASCallback.h | 2 +- include/JSystem/JAudio2/JASDSPInterface.h | 2 +- include/JSystem/JAudio2/JASDvdThread.h | 2 +- include/JSystem/JAudio2/JASLfo.h | 2 +- include/JSystem/JAudio2/JASOscillator.h | 2 +- include/JSystem/JAudio2/JASProbe.h | 2 +- include/JSystem/JAudio2/JASRegisterParam.h | 2 +- include/JSystem/JAudio2/JASSeqParser.h | 2 +- include/JSystem/JAudio2/JASSeqReader.h | 2 +- include/JSystem/JAudio2/JASSoundParams.h | 2 +- include/JSystem/JAudio2/JASTrackPort.h | 2 +- include/JSystem/JAudio2/JASWaveInfo.h | 2 +- .../JSystem/JAudio2/JAUAudioArcInterpreter.h | 2 +- include/JSystem/JAudio2/JAUInitializer.h | 2 +- include/JSystem/JAudio2/dspproc.h | 2 +- include/JSystem/JAudio2/dsptask.h | 2 +- include/JSystem/JFramework/JFWSystem.h | 2 +- include/JSystem/JGeometry.h | 2 +- include/JSystem/JHostIO/JOREntry.h | 2 +- include/JSystem/JKernel/JKRDvdFile.h | 2 +- include/JSystem/JKernel/JKRFileFinder.h | 2 +- include/JSystem/JMath/JMATrigonometric.h | 2 +- include/JSystem/JMath/JMath.h | 2 +- include/JSystem/JMath/random.h | 2 +- include/JSystem/JParticle/JPADrawInfo.h | 2 +- include/JSystem/JParticle/JPADynamicsBlock.h | 2 +- include/JSystem/JParticle/JPAEmitterManager.h | 2 +- include/JSystem/JParticle/JPAExTexShape.h | 2 +- include/JSystem/JParticle/JPAExtraShape.h | 2 +- include/JSystem/JParticle/JPAFieldBlock.h | 2 +- include/JSystem/JParticle/JPAKeyBlock.h | 2 +- include/JSystem/JParticle/JPAList.h | 2 +- include/JSystem/JParticle/JPAMath.h | 2 +- include/JSystem/JParticle/JPARandom.h | 2 +- include/JSystem/JParticle/JPAResource.h | 2 +- include/JSystem/JParticle/JPAResourceLoader.h | 2 +- include/JSystem/JStage/JSGObject.h | 2 +- .../JSystem/JStudio/JStudio/jstudio-math.h | 2 +- .../JSystem/JStudio/JStudio/jstudio-object.h | 6 + include/JSystem/JStudio/JStudio/object-id.h | 2 +- include/JSystem/JStudio/JStudio/stb-data.h | 2 +- include/JSystem/JStudio/JStudio/stb.h | 2 +- .../JStudio/JStudioCameraEditor/control.h | 217 +++++ .../controlset-csb-valueset.h | 16 + .../JSystem/JStudio/JStudioCameraEditor/csb.h | 77 ++ .../JStudio/JStudioCameraEditor/sequence.h | 20 + .../JStudio/JStudioToolLibrary/anchor.h | 39 + .../JStudio/JStudioToolLibrary/console.h | 87 ++ .../JStudioToolLibrary/controlset-preview.h | 81 ++ .../JStudioToolLibrary/controlset-transform.h | 54 ++ .../JStudio/JStudioToolLibrary/controlset.h | 63 ++ .../JStudio/JStudioToolLibrary/interface.h | 47 + .../JStudio/JStudioToolLibrary/scroll.h | 49 + .../JStudio/JStudioToolLibrary/visual.h | 125 +++ .../JSystem/JStudio/JStudio_JStage/control.h | 3 + include/JSystem/JSupport/JSUIosBase.h | 2 +- include/JSystem/JSupport/JSUList.h | 2 +- include/JSystem/JUtility/JUTAssert.h | 2 +- include/JSystem/JUtility/JUTDirectFile.h | 2 +- .../JUtility/JUTFontData_Ascfont_fix12.h | 2 +- include/JSystem/JUtility/JUTGraphFifo.h | 2 +- include/JSystem/JUtility/JUTNameTab.h | 2 +- include/JSystem/JUtility/JUTResource.h | 2 +- include/JSystem/TPosition3.h | 2 +- .../SSystem/SComponent/c_API_controller_pad.h | 4 +- include/SSystem/SComponent/c_bg_s_chk.h | 2 +- include/SSystem/SComponent/c_bg_s_poly_info.h | 2 +- include/SSystem/SComponent/c_bg_w.h | 2 +- include/SSystem/SComponent/c_counter.h | 2 +- include/SSystem/SComponent/c_lib.h | 2 +- include/SSystem/SComponent/c_m3d.h | 2 +- include/SSystem/SComponent/c_m3d_g_cir.h | 2 +- include/SSystem/SComponent/c_malloc.h | 2 +- include/SSystem/SComponent/c_phase.h | 6 +- include/SSystem/SComponent/c_request.h | 2 +- include/SSystem/SComponent/c_sxyz.h | 2 +- include/SSystem/SComponent/c_tag.h | 2 +- include/SSystem/SComponent/c_xyz.h | 2 +- include/SSystem/SStandard/s_basic.h | 2 +- .../MetroTRK/Portable/dispatch.h | 2 +- .../MetroTRK/Portable/mem_TRK.h | 2 +- .../MetroTRK/Portable/msg.h | 2 +- .../MetroTRK/Portable/mutex_TRK.h | 2 +- .../TRK_MINNOW_DOLPHIN/Os/dolphin/UDP_Stubs.h | 2 +- .../Os/dolphin/dolphin_trk_glue.h | 2 +- .../Os/dolphin/target_options.h | 2 +- .../TRK_MINNOW_DOLPHIN/Os/dolphin/usr_put.h | 2 +- .../TRK_MINNOW_DOLPHIN/ppc/Export/targsupp.h | 2 +- .../utils/common/CircleBuffer.h | 2 +- .../TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h | 2 +- .../utils/gc/MWCriticalSection_gc.h | 2 +- include/Z2AudioLib/Z2AudioCS.h | 2 +- include/Z2AudioLib/Z2Calc.h | 2 +- include/Z2AudioLib/Z2Param.h | 2 +- include/d/actor/d_a_arrow.h | 2 +- include/d/actor/d_a_b_ds.h | 2 +- include/d/actor/d_a_b_yo.h | 2 +- include/d/actor/d_a_b_yo_ice.h | 2 +- include/d/actor/d_a_balloon_2D.h | 2 +- include/d/actor/d_a_door_boss.h | 2 +- include/d/actor/d_a_door_bossL1.h | 2 +- include/d/actor/d_a_door_bossL5.h | 2 +- include/d/actor/d_a_door_mbossL1.h | 2 +- include/d/actor/d_a_door_shutter.h | 2 +- include/d/actor/d_a_e_db_leaf.h | 2 +- include/d/actor/d_a_e_dt.h | 2 +- include/d/actor/d_a_e_fb.h | 2 +- include/d/actor/d_a_e_gm.h | 2 +- include/d/actor/d_a_e_oc.h | 2 +- include/d/actor/d_a_e_oct_bg.h | 2 +- include/d/actor/d_a_e_ot.h | 2 +- include/d/actor/d_a_e_pm.h | 2 +- include/d/actor/d_a_e_sb.h | 2 +- include/d/actor/d_a_e_sm.h | 2 +- include/d/actor/d_a_e_sw.h | 2 +- include/d/actor/d_a_e_ymb.h | 2 +- include/d/actor/d_a_e_zh.h | 2 +- include/d/actor/d_a_e_zm.h | 2 +- include/d/actor/d_a_fr.h | 2 +- include/d/actor/d_a_kytag12.h | 2 +- include/d/actor/d_a_kytag13.h | 2 +- include/d/actor/d_a_midna.h | 2 +- include/d/actor/d_a_npc_aru.h | 2 +- include/d/actor/d_a_npc_ash.h | 2 +- include/d/actor/d_a_npc_ashB.h | 2 +- include/d/actor/d_a_npc_bans.h | 2 +- include/d/actor/d_a_npc_bouS.h | 2 +- include/d/actor/d_a_npc_cd2.h | 2 +- include/d/actor/d_a_npc_chat.h | 4 +- include/d/actor/d_a_npc_coach.h | 2 +- include/d/actor/d_a_npc_doorboy.h | 2 +- include/d/actor/d_a_npc_fairy.h | 2 +- include/d/actor/d_a_npc_fguard.h | 2 +- include/d/actor/d_a_npc_grc.h | 2 +- include/d/actor/d_a_npc_grm.h | 2 +- include/d/actor/d_a_npc_grmc.h | 2 +- include/d/actor/d_a_npc_gro.h | 2 +- include/d/actor/d_a_npc_grr.h | 2 +- include/d/actor/d_a_npc_grz.h | 2 +- include/d/actor/d_a_npc_gwolf.h | 2 +- include/d/actor/d_a_npc_ins.h | 2 +- include/d/actor/d_a_npc_kasi_hana.h | 2 +- include/d/actor/d_a_npc_kasi_kyu.h | 2 +- include/d/actor/d_a_npc_kasi_mich.h | 2 +- include/d/actor/d_a_npc_kolin.h | 2 +- include/d/actor/d_a_npc_kolinb.h | 2 +- include/d/actor/d_a_npc_moir.h | 2 +- include/d/actor/d_a_npc_pachi_besu.h | 2 +- include/d/actor/d_a_npc_pachi_maro.h | 2 +- include/d/actor/d_a_npc_pachi_taro.h | 2 +- include/d/actor/d_a_npc_passer.h | 2 +- include/d/actor/d_a_npc_passer2.h | 2 +- include/d/actor/d_a_npc_post.h | 2 +- include/d/actor/d_a_npc_raca.h | 2 +- include/d/actor/d_a_npc_seirei.h | 2 +- include/d/actor/d_a_npc_shad.h | 2 +- include/d/actor/d_a_npc_shaman.h | 2 +- include/d/actor/d_a_npc_shoe.h | 2 +- include/d/actor/d_a_npc_soldierA.h | 2 +- include/d/actor/d_a_npc_soldierB.h | 2 +- include/d/actor/d_a_npc_the.h | 2 +- include/d/actor/d_a_npc_theB.h | 2 +- include/d/actor/d_a_npc_tkc.h | 2 +- include/d/actor/d_a_npc_tks.h | 2 +- include/d/actor/d_a_npc_toby.h | 2 +- include/d/actor/d_a_npc_wrestler.h | 2 +- include/d/actor/d_a_npc_yamid.h | 2 +- include/d/actor/d_a_npc_yamis.h | 2 +- include/d/actor/d_a_npc_yamit.h | 2 +- include/d/actor/d_a_npc_yelia.h | 2 +- include/d/actor/d_a_npc_ykm.h | 2 +- include/d/actor/d_a_npc_zanb.h | 2 +- include/d/actor/d_a_npc_zelRo.h | 2 +- include/d/actor/d_a_npc_zra.h | 2 +- include/d/actor/d_a_npc_zrc.h | 2 +- include/d/actor/d_a_npc_zrz.h | 2 +- include/d/actor/d_a_obj_amiShutter.h | 2 +- include/d/actor/d_a_obj_ari.h | 2 +- include/d/actor/d_a_obj_avalanche.h | 2 +- include/d/actor/d_a_obj_barDesk.h | 2 +- include/d/actor/d_a_obj_bed.h | 4 +- include/d/actor/d_a_obj_bmWindow.h | 2 +- include/d/actor/d_a_obj_bosswarp.h | 2 +- include/d/actor/d_a_obj_bsGate.h | 2 +- include/d/actor/d_a_obj_burnbox.h | 2 +- include/d/actor/d_a_obj_cdoor.h | 2 +- include/d/actor/d_a_obj_chandelier.h | 2 +- include/d/actor/d_a_obj_cho.h | 2 +- include/d/actor/d_a_obj_crvfence.h | 2 +- include/d/actor/d_a_obj_dan.h | 2 +- include/d/actor/d_a_obj_goGate.h | 2 +- include/d/actor/d_a_obj_gra2.h | 2 +- include/d/actor/d_a_obj_grave_stone.h | 2 +- include/d/actor/d_a_obj_grz_rock.h | 2 +- include/d/actor/d_a_obj_h_saku.h | 2 +- include/d/actor/d_a_obj_hata.h | 4 +- include/d/actor/d_a_obj_ikada.h | 2 +- include/d/actor/d_a_obj_ita.h | 2 +- include/d/actor/d_a_obj_itamato.h | 2 +- include/d/actor/d_a_obj_kabuto.h | 2 +- include/d/actor/d_a_obj_kag.h | 2 +- include/d/actor/d_a_obj_kago.h | 2 +- include/d/actor/d_a_obj_kaisou.h | 2 +- include/d/actor/d_a_obj_klift00.h | 2 +- include/d/actor/d_a_obj_kshutter.h | 10 +- include/d/actor/d_a_obj_kwheel01.h | 2 +- include/d/actor/d_a_obj_lv1Candle00.h | 2 +- include/d/actor/d_a_obj_lv1Candle01.h | 2 +- include/d/actor/d_a_obj_lv2Candle.h | 2 +- include/d/actor/d_a_obj_lv3Candle.h | 2 +- include/d/actor/d_a_obj_lv3Water2.h | 2 +- include/d/actor/d_a_obj_lv6SzGate.h | 2 +- include/d/actor/d_a_obj_lv6bemos.h | 2 +- include/d/actor/d_a_obj_lv6bemos2.h | 2 +- include/d/actor/d_a_obj_magne_arm.h | 6 +- include/d/actor/d_a_obj_mirror_chain.h | 2 +- include/d/actor/d_a_obj_mirror_screw.h | 2 +- include/d/actor/d_a_obj_mirror_table.h | 2 +- include/d/actor/d_a_obj_ornament_cloth.h | 2 +- include/d/actor/d_a_obj_saidan.h | 2 +- include/d/actor/d_a_obj_sekizo.h | 2 +- include/d/actor/d_a_obj_sm_door.h | 2 +- include/d/actor/d_a_obj_smw_stone.h | 2 +- include/d/actor/d_a_obj_snow_soup.h | 2 +- include/d/actor/d_a_obj_stopper.h | 2 +- include/d/actor/d_a_obj_sword.h | 2 +- include/d/actor/d_a_obj_swpush.h | 4 +- include/d/actor/d_a_obj_syRock.h | 2 +- include/d/actor/d_a_obj_testcube.h | 44 + include/d/actor/d_a_obj_waterGate.h | 2 +- include/d/actor/d_a_obj_waterPillar.h | 2 +- include/d/actor/d_a_obj_waterfall.h | 4 +- include/d/actor/d_a_obj_wchain.h | 2 +- include/d/actor/d_a_obj_window.h | 2 +- include/d/actor/d_a_obj_yobikusa.h | 2 +- include/d/actor/d_a_obj_zrTurara.h | 2 +- include/d/actor/d_a_obj_zrTuraraRock.h | 2 +- include/d/actor/d_a_obj_zra_freeze.h | 2 +- include/d/actor/d_a_obj_zra_rock.h | 2 +- include/d/actor/d_a_path_line.h | 2 +- include/d/actor/d_a_peru.h | 2 +- include/d/actor/d_a_ppolamp.h | 2 +- include/d/actor/d_a_tag_evtarea.h | 2 +- include/d/actor/d_a_tag_kmsg.h | 2 +- include/d/actor/d_a_tag_statue_evt.h | 4 +- include/d/actor/d_a_tag_waterfall.h | 2 +- include/d/actor/d_a_tbox.h | 10 +- include/d/d_bg_parts.h | 247 ++++- include/d/d_bg_pc.h | 2 +- include/d/d_bg_w.h | 5 +- include/d/d_bg_w_base.h | 2 +- include/d/d_camera.h | 2 +- include/d/d_cc_uty.h | 2 +- include/d/d_debug_pad.h | 12 +- include/d/d_door_param2.h | 2 +- include/d/d_event_lib.h | 2 +- include/d/d_eye_hl.h | 2 +- include/d/d_item.h | 2 +- include/d/d_item_data.h | 2 +- include/d/d_jcam_editor.h | 33 +- include/d/d_jpreviewer.h | 2 +- include/d/d_kankyo_data.h | 2 +- include/d/d_kankyo_rain.h | 2 +- include/d/d_kankyo_tev_str.h | 2 +- include/d/d_menu_dmap.h | 2 +- include/d/d_menu_fmap2D.h | 2 +- include/d/d_menu_fmap_map.h | 2 +- include/d/d_menu_map_common.h | 2 +- include/d/d_menu_quit.h | 52 ++ include/d/d_menu_window_HIO.h | 2 +- include/d/d_msg_flow.h | 2 +- include/d/d_msg_object.h | 10 +- include/d/d_msg_out_font.h | 2 +- include/d/d_msg_scrn_3select.h | 6 +- include/d/d_msg_scrn_arrow.h | 2 +- include/d/d_msg_scrn_explain.h | 15 +- include/d/d_msg_scrn_item.h | 2 +- include/d/d_msg_scrn_talk.h | 2 +- include/d/d_particle_name.h | 2 +- include/d/d_path.h | 4 +- include/d/d_stage.h | 6 +- include/d/d_tresure.h | 2 +- include/d/d_vib_pattern.h | 2 +- include/dolphin/base/PPCArch.h | 2 +- include/f_op/f_op_view.h | 2 +- include/f_pc/f_pc_create_iter.h | 2 +- include/f_pc/f_pc_deletor.h | 2 +- include/f_pc/f_pc_draw.h | 2 +- include/f_pc/f_pc_draw_priority.h | 2 +- include/f_pc/f_pc_layer_iter.h | 2 +- include/f_pc/f_pc_load.h | 2 +- include/f_pc/f_pc_method.h | 2 +- include/f_pc/f_pc_method_iter.h | 2 +- include/f_pc/f_pc_pause.h | 2 +- include/f_pc/f_pc_profile.h | 2 +- include/m_Do/m_Do_Reset.h | 2 +- include/revolution/base/PPCArch.h | 2 +- include/revolution/os/OSHardware.h | 10 +- src/JSystem/J2DGraph/J2DAnimation.cpp | 2 +- src/JSystem/J2DGraph/J2DGrafContext.cpp | 2 +- src/JSystem/J2DGraph/J2DMatBlock.cpp | 2 +- src/JSystem/J2DGraph/J2DMaterialFactory.cpp | 2 +- src/JSystem/J2DGraph/J2DOrthoGraph.cpp | 2 +- src/JSystem/J2DGraph/J2DPicture.cpp | 2 +- src/JSystem/J2DGraph/J2DPictureEx.cpp | 2 +- src/JSystem/J2DGraph/J2DScreen.cpp | 2 +- src/JSystem/J2DGraph/J2DTevs.cpp | 2 +- src/JSystem/J3DGraphAnimator/J3DCluster.cpp | 2 +- src/JSystem/J3DGraphLoader/J3DAnmLoader.cpp | 2 +- .../J3DGraphLoader/J3DClusterLoader.cpp | 2 +- .../J3DGraphLoader/J3DModelLoaderCalcSize.cpp | 2 +- .../J3DGraphLoader/J3DShapeFactory.cpp | 2 +- src/JSystem/JAudio2/JASAiCtrl.cpp | 2 +- src/JSystem/JAudio2/JASAudioReseter.cpp | 2 +- src/JSystem/JAudio2/JASAudioThread.cpp | 2 +- src/JSystem/JAudio2/JASCmdStack.cpp | 2 +- src/JSystem/JAudio2/JASHeapCtrl.cpp | 2 +- src/JSystem/JAudio2/JASWaveArcLoader.cpp | 2 +- src/JSystem/JAudio2/JAUSectionHeap.cpp | 2 +- src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp | 2 +- src/JSystem/JAudio2/osdsp.cpp | 2 +- src/JSystem/JFramework/JFWDisplay.cpp | 2 +- src/JSystem/JKernel/JKRAram.cpp | 2 +- src/JSystem/JKernel/JKRAramPiece.cpp | 2 +- src/JSystem/JKernel/JKRDvdAramRipper.cpp | 2 +- src/JSystem/JKernel/JKRDvdRipper.cpp | 2 +- src/JSystem/JKernel/JKRFile.cpp | 2 +- src/JSystem/JParticle/JPABaseShape.cpp | 4 +- src/JSystem/JParticle/JPAChildShape.cpp | 4 +- src/JSystem/JParticle/JPAEmitter.cpp | 2 +- src/JSystem/JParticle/JPAEmitterManager.cpp | 2 +- src/JSystem/JParticle/JPAExTexShape.cpp | 2 +- src/JSystem/JParticle/JPAExtraShape.cpp | 2 +- src/JSystem/JParticle/JPAResource.cpp | 2 +- .../JStudio/JStudio/stb-data-parse.cpp | 2 +- src/JSystem/JUtility/JUTCacheFont.cpp | 2 +- src/JSystem/JUtility/JUTPalette.cpp | 4 +- src/JSystem/JUtility/JUTResFont.cpp | 2 +- src/JSystem/JUtility/JUTTexture.cpp | 2 +- src/JSystem/JUtility/JUTVideo.cpp | 2 +- src/JSystem/JUtility/JUTXfb.cpp | 2 +- .../MSL_C/PPC_EABI/Src/uart_console_io_gcn.c | 2 +- src/PowerPC_EABI_Support/MetroTRK/trk.h | 4 +- .../Runtime/Inc/CPlusLibPPC.h | 4 +- .../Runtime/Inc/__init_cpp_exceptions.h | 4 +- .../Runtime/Inc/runtime.h | 4 +- .../Runtime/Src/GCN_Mem_Alloc.c | 2 +- src/SSystem/SComponent/c_list_iter.cpp | 2 +- .../MetroTRK/Os/dolphin/dolphin_trk_glue.c | 2 +- .../embedded/MetroTRK/Os/dolphin/usr_put.c | 2 +- .../Processor/ppc/Generic/flush_cache.c | 2 +- src/d/actor/d_a_arrow.cpp | 2 +- src/d/actor/d_a_b_ds.cpp | 6 +- src/d/actor/d_a_b_tn.cpp | 4 +- src/d/actor/d_a_b_yo.cpp | 18 +- src/d/actor/d_a_b_yo_ice.cpp | 6 +- src/d/actor/d_a_bg.cpp | 1 + src/d/actor/d_a_bg_obj.cpp | 2 +- src/d/actor/d_a_cow.cpp | 2 +- src/d/actor/d_a_do.cpp | 4 +- src/d/actor/d_a_door_boss.cpp | 6 +- src/d/actor/d_a_e_ba.cpp | 4 +- src/d/actor/d_a_e_bee.cpp | 4 +- src/d/actor/d_a_e_bi.cpp | 4 +- src/d/actor/d_a_e_bug.cpp | 4 +- src/d/actor/d_a_e_dd.cpp | 4 +- src/d/actor/d_a_e_df.cpp | 2 +- src/d/actor/d_a_e_dn.cpp | 4 +- src/d/actor/d_a_e_dt.cpp | 10 +- src/d/actor/d_a_e_fb.cpp | 4 +- src/d/actor/d_a_e_fs.cpp | 4 +- src/d/actor/d_a_e_gb.cpp | 4 +- src/d/actor/d_a_e_gm.cpp | 8 +- src/d/actor/d_a_e_mf.cpp | 4 +- src/d/actor/d_a_e_mm_mt.cpp | 2 +- src/d/actor/d_a_e_nest.cpp | 4 +- src/d/actor/d_a_e_oc.cpp | 6 +- src/d/actor/d_a_e_oct_bg.cpp | 2 +- src/d/actor/d_a_e_ot.cpp | 6 +- src/d/actor/d_a_e_pm.cpp | 6 +- src/d/actor/d_a_e_rd.cpp | 4 +- src/d/actor/d_a_e_rdy.cpp | 4 +- src/d/actor/d_a_e_sb.cpp | 4 +- src/d/actor/d_a_e_sf.cpp | 4 +- src/d/actor/d_a_e_sg.cpp | 2 +- src/d/actor/d_a_e_sm.cpp | 4 +- src/d/actor/d_a_e_st.cpp | 4 +- src/d/actor/d_a_e_sw.cpp | 4 +- src/d/actor/d_a_e_tk.cpp | 2 +- src/d/actor/d_a_e_tk2.cpp | 2 +- src/d/actor/d_a_e_tk_ball.cpp | 6 +- src/d/actor/d_a_e_yc.cpp | 4 +- src/d/actor/d_a_e_yg.cpp | 4 +- src/d/actor/d_a_e_ymb.cpp | 4 +- src/d/actor/d_a_e_zh.cpp | 4 +- src/d/actor/d_a_e_zm.cpp | 4 +- src/d/actor/d_a_mg_fish.cpp | 4 +- src/d/actor/d_a_midna.cpp | 6 +- src/d/actor/d_a_mirror.cpp | 4 +- src/d/actor/d_a_myna.cpp | 2 +- src/d/actor/d_a_npc_aru.cpp | 4 +- src/d/actor/d_a_npc_ash.cpp | 8 +- src/d/actor/d_a_npc_ashB.cpp | 8 +- src/d/actor/d_a_npc_bans.cpp | 4 +- src/d/actor/d_a_npc_besu.cpp | 2 +- src/d/actor/d_a_npc_bouS.cpp | 6 +- src/d/actor/d_a_npc_chat.cpp | 20 +- src/d/actor/d_a_npc_chin.cpp | 2 +- src/d/actor/d_a_npc_coach.cpp | 4 +- src/d/actor/d_a_npc_df.cpp | 4 +- src/d/actor/d_a_npc_doorboy.cpp | 6 +- src/d/actor/d_a_npc_du.cpp | 4 +- src/d/actor/d_a_npc_fairy.cpp | 4 +- src/d/actor/d_a_npc_fguard.cpp | 4 +- src/d/actor/d_a_npc_grc.cpp | 4 +- src/d/actor/d_a_npc_grm.cpp | 6 +- src/d/actor/d_a_npc_grmc.cpp | 4 +- src/d/actor/d_a_npc_gro.cpp | 6 +- src/d/actor/d_a_npc_grr.cpp | 4 +- src/d/actor/d_a_npc_grz.cpp | 4 +- src/d/actor/d_a_npc_gwolf.cpp | 4 +- src/d/actor/d_a_npc_henna.cpp | 2 +- src/d/actor/d_a_npc_ins.cpp | 6 +- src/d/actor/d_a_npc_kasi_hana.cpp | 6 +- src/d/actor/d_a_npc_kasi_kyu.cpp | 6 +- src/d/actor/d_a_npc_kasi_mich.cpp | 6 +- src/d/actor/d_a_npc_kolin.cpp | 4 +- src/d/actor/d_a_npc_kolinb.cpp | 4 +- src/d/actor/d_a_npc_lf.cpp | 4 +- src/d/actor/d_a_npc_moir.cpp | 6 +- src/d/actor/d_a_npc_ne.cpp | 4 +- src/d/actor/d_a_npc_pachi_besu.cpp | 4 +- src/d/actor/d_a_npc_pachi_maro.cpp | 4 +- src/d/actor/d_a_npc_pachi_taro.cpp | 4 +- src/d/actor/d_a_npc_passer.cpp | 4 +- src/d/actor/d_a_npc_passer2.cpp | 4 +- src/d/actor/d_a_npc_post.cpp | 4 +- src/d/actor/d_a_npc_raca.cpp | 4 +- src/d/actor/d_a_npc_seirei.cpp | 4 +- src/d/actor/d_a_npc_shad.cpp | 6 +- src/d/actor/d_a_npc_shaman.cpp | 4 +- src/d/actor/d_a_npc_shoe.cpp | 8 +- src/d/actor/d_a_npc_soldierA.cpp | 4 +- src/d/actor/d_a_npc_soldierB.cpp | 6 +- src/d/actor/d_a_npc_sq.cpp | 4 +- src/d/actor/d_a_npc_taro.cpp | 2 +- src/d/actor/d_a_npc_the.cpp | 8 +- src/d/actor/d_a_npc_theB.cpp | 4 +- src/d/actor/d_a_npc_tkc.cpp | 6 +- src/d/actor/d_a_npc_tkj2.cpp | 4 +- src/d/actor/d_a_npc_tks.cpp | 6 +- src/d/actor/d_a_npc_wrestler.cpp | 8 +- src/d/actor/d_a_npc_yamid.cpp | 4 +- src/d/actor/d_a_npc_yamis.cpp | 4 +- src/d/actor/d_a_npc_yamit.cpp | 4 +- src/d/actor/d_a_npc_yelia.cpp | 6 +- src/d/actor/d_a_npc_ykm.cpp | 4 +- src/d/actor/d_a_npc_zanb.cpp | 4 +- src/d/actor/d_a_npc_zelRo.cpp | 4 +- src/d/actor/d_a_npc_zra.cpp | 12 +- src/d/actor/d_a_npc_zrc.cpp | 6 +- src/d/actor/d_a_npc_zrz.cpp | 6 +- src/d/actor/d_a_obj_amiShutter.cpp | 6 +- src/d/actor/d_a_obj_ari.cpp | 6 +- src/d/actor/d_a_obj_barDesk.cpp | 6 +- src/d/actor/d_a_obj_bed.cpp | 6 +- src/d/actor/d_a_obj_bemos.cpp | 4 +- src/d/actor/d_a_obj_bkdoor.cpp | 4 +- src/d/actor/d_a_obj_bosswarp.cpp | 6 +- src/d/actor/d_a_obj_bsGate.cpp | 6 +- src/d/actor/d_a_obj_burnbox.cpp | 6 +- src/d/actor/d_a_obj_carry.cpp | 6 +- src/d/actor/d_a_obj_cdoor.cpp | 8 +- src/d/actor/d_a_obj_chandelier.cpp | 8 +- src/d/actor/d_a_obj_cho.cpp | 6 +- src/d/actor/d_a_obj_crvfence.cpp | 6 +- src/d/actor/d_a_obj_crvgate.cpp | 4 +- src/d/actor/d_a_obj_dan.cpp | 6 +- src/d/actor/d_a_obj_digsnow.cpp | 4 +- src/d/actor/d_a_obj_fallobj.cpp | 4 +- src/d/actor/d_a_obj_food.cpp | 4 +- src/d/actor/d_a_obj_fw.cpp | 4 +- src/d/actor/d_a_obj_ganonwall.cpp | 2 +- src/d/actor/d_a_obj_ganonwall2.cpp | 4 +- src/d/actor/d_a_obj_gm.cpp | 4 +- src/d/actor/d_a_obj_goGate.cpp | 4 +- src/d/actor/d_a_obj_gra2.cpp | 6 +- src/d/actor/d_a_obj_grave_stone.cpp | 8 +- src/d/actor/d_a_obj_grz_rock.cpp | 8 +- src/d/actor/d_a_obj_h_saku.cpp | 6 +- src/d/actor/d_a_obj_hasu2.cpp | 4 +- src/d/actor/d_a_obj_hata.cpp | 4 +- src/d/actor/d_a_obj_hb.cpp | 4 +- src/d/actor/d_a_obj_ihasi.cpp | 2 +- src/d/actor/d_a_obj_ikada.cpp | 6 +- src/d/actor/d_a_obj_ita.cpp | 6 +- src/d/actor/d_a_obj_itamato.cpp | 4 +- src/d/actor/d_a_obj_ito.cpp | 4 +- src/d/actor/d_a_obj_kabuto.cpp | 6 +- src/d/actor/d_a_obj_kag.cpp | 4 +- src/d/actor/d_a_obj_kago.cpp | 4 +- src/d/actor/d_a_obj_kaisou.cpp | 4 +- src/d/actor/d_a_obj_ki.cpp | 4 +- src/d/actor/d_a_obj_klift00.cpp | 8 +- src/d/actor/d_a_obj_kshutter.cpp | 16 +- src/d/actor/d_a_obj_kwheel00.cpp | 4 +- src/d/actor/d_a_obj_kwheel01.cpp | 6 +- src/d/actor/d_a_obj_lbox.cpp | 4 +- src/d/actor/d_a_obj_lv1Candle00.cpp | 6 +- src/d/actor/d_a_obj_lv1Candle01.cpp | 6 +- src/d/actor/d_a_obj_lv2Candle.cpp | 6 +- src/d/actor/d_a_obj_lv3Candle.cpp | 4 +- src/d/actor/d_a_obj_lv3Water2.cpp | 4 +- src/d/actor/d_a_obj_lv6SzGate.cpp | 4 +- src/d/actor/d_a_obj_lv6bemos.cpp | 6 +- src/d/actor/d_a_obj_lv6bemos2.cpp | 6 +- src/d/actor/d_a_obj_magne_arm.cpp | 10 +- src/d/actor/d_a_obj_maki.cpp | 6 +- src/d/actor/d_a_obj_mirror_chain.cpp | 6 +- src/d/actor/d_a_obj_mirror_screw.cpp | 8 +- src/d/actor/d_a_obj_mirror_table.cpp | 6 +- src/d/actor/d_a_obj_nameplate.cpp | 2 +- src/d/actor/d_a_obj_ndoor.cpp | 2 +- src/d/actor/d_a_obj_ornament_cloth.cpp | 6 +- src/d/actor/d_a_obj_pumpkin.cpp | 2 +- src/d/actor/d_a_obj_rock.cpp | 2 +- src/d/actor/d_a_obj_saidan.cpp | 4 +- src/d/actor/d_a_obj_sekidoor.cpp | 4 +- src/d/actor/d_a_obj_sekizo.cpp | 8 +- src/d/actor/d_a_obj_sekizoa.cpp | 2 +- src/d/actor/d_a_obj_sm_door.cpp | 8 +- src/d/actor/d_a_obj_smw_stone.cpp | 6 +- src/d/actor/d_a_obj_snow_soup.cpp | 6 +- src/d/actor/d_a_obj_stopper.cpp | 4 +- src/d/actor/d_a_obj_sword.cpp | 4 +- src/d/actor/d_a_obj_swpush.cpp | 10 +- src/d/actor/d_a_obj_syRock.cpp | 6 +- src/d/actor/d_a_obj_takaraDai.cpp | 2 +- src/d/actor/d_a_obj_testcube.cpp | 395 +++++++- src/d/actor/d_a_obj_udoor.cpp | 4 +- src/d/actor/d_a_obj_waterGate.cpp | 4 +- src/d/actor/d_a_obj_waterPillar.cpp | 4 +- src/d/actor/d_a_obj_waterfall.cpp | 4 +- src/d/actor/d_a_obj_wchain.cpp | 6 +- src/d/actor/d_a_obj_wind_stone.cpp | 2 +- src/d/actor/d_a_obj_window.cpp | 8 +- src/d/actor/d_a_obj_yobikusa.cpp | 4 +- src/d/actor/d_a_obj_ystone.cpp | 4 +- src/d/actor/d_a_obj_zrTurara.cpp | 8 +- src/d/actor/d_a_obj_zrTuraraRock.cpp | 6 +- src/d/actor/d_a_obj_zra_freeze.cpp | 6 +- src/d/actor/d_a_obj_zra_rock.cpp | 8 +- src/d/actor/d_a_sq.cpp | 4 +- src/d/actor/d_a_tag_Lv8Gate.cpp | 4 +- src/d/actor/d_a_tag_evt.cpp | 2 +- src/d/actor/d_a_tag_evtarea.cpp | 4 +- src/d/actor/d_a_tag_statue_evt.cpp | 8 +- src/d/actor/d_a_tag_waterfall.cpp | 2 +- src/d/actor/d_a_tbox.cpp | 18 +- src/d/d_bg_parts.cpp | 845 +++++++++++++++++- src/d/d_com_inf_actor.cpp | 2 +- src/d/d_debug_pad.cpp | 90 ++ src/d/d_jcam_editor.cpp | 89 ++ src/d/d_kyeff.cpp | 89 +- src/d/d_menu_collect.cpp | 2 +- src/d/d_menu_letter.cpp | 2 +- src/d/d_menu_option.cpp | 2 +- src/d/d_menu_quit.cpp | 153 ++++ src/d/d_msg_scrn_3select.cpp | 2 +- src/d/d_msg_scrn_explain.cpp | 267 ++++-- src/d/d_s_room.cpp | 30 +- src/d/d_stage.cpp | 1 + src/dolphin/os/__ppc_eabi_init.cpp | 2 +- src/f_op/f_op_scene_req.cpp | 40 +- src/m_Do/m_Do_Reset.cpp | 4 +- src/m_Do/m_Do_lib.cpp | 2 +- src/m_Do/m_Do_machine.cpp | 4 +- src/odemuexi2/DebuggerDriver.c | 2 +- .../nw4hbm/lyt/arcResourceAccessor.h | 4 +- .../homebuttonLib/nw4hbm/lyt/common.h | 4 +- .../homebuttonLib/nw4hbm/lyt/lyt_types.h | 2 +- .../homebuttonLib/nw4hbm/lyt/pane.h | 2 +- .../nw4hbm/lyt/resourceAccessor.h | 2 +- src/revolution/os/__start.c | 4 +- 612 files changed, 4052 insertions(+), 1141 deletions(-) create mode 100644 include/JSystem/JStudio/JStudioCameraEditor/control.h create mode 100644 include/JSystem/JStudio/JStudioCameraEditor/controlset-csb-valueset.h create mode 100644 include/JSystem/JStudio/JStudioCameraEditor/csb.h create mode 100644 include/JSystem/JStudio/JStudioCameraEditor/sequence.h create mode 100644 include/JSystem/JStudio/JStudioToolLibrary/anchor.h create mode 100644 include/JSystem/JStudio/JStudioToolLibrary/console.h create mode 100644 include/JSystem/JStudio/JStudioToolLibrary/controlset-preview.h create mode 100644 include/JSystem/JStudio/JStudioToolLibrary/controlset-transform.h create mode 100644 include/JSystem/JStudio/JStudioToolLibrary/controlset.h create mode 100644 include/JSystem/JStudio/JStudioToolLibrary/interface.h create mode 100644 include/JSystem/JStudio/JStudioToolLibrary/scroll.h create mode 100644 include/JSystem/JStudio/JStudioToolLibrary/visual.h create mode 100644 include/d/d_menu_quit.h create mode 100644 src/d/d_debug_pad.cpp create mode 100644 src/d/d_jcam_editor.cpp create mode 100644 src/d/d_menu_quit.cpp diff --git a/include/JSystem/J2DGraph/J2DGrafContext.h b/include/JSystem/J2DGraph/J2DGrafContext.h index 209ff61e30..9f9ff431a7 100644 --- a/include/JSystem/J2DGraph/J2DGrafContext.h +++ b/include/JSystem/J2DGraph/J2DGrafContext.h @@ -3,7 +3,7 @@ #include "JSystem/JGeometry.h" #include "JSystem/JUtility/TColor.h" -#include "dolphin/mtx.h" +#include /** * @ingroup jsystem-j2d diff --git a/include/JSystem/J2DGraph/J2DManage.h b/include/JSystem/J2DGraph/J2DManage.h index 4a5b39a2a1..abccbe04c2 100644 --- a/include/JSystem/J2DGraph/J2DManage.h +++ b/include/JSystem/J2DGraph/J2DManage.h @@ -1,7 +1,7 @@ #ifndef J2DMANAGE_H #define J2DMANAGE_H -#include "dolphin/types.h" +#include class JSUInputStream; diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h index bde7118f37..8ef7bd802f 100644 --- a/include/JSystem/J2DGraph/J2DPane.h +++ b/include/JSystem/J2DGraph/J2DPane.h @@ -4,7 +4,7 @@ #include "JSystem/JGeometry.h" #include "JSystem/JSupport/JSUList.h" #include -#include "dolphin/mtx.h" +#include class J2DAnmBase; class J2DAnmColor; diff --git a/include/JSystem/J2DGraph/J2DTevs.h b/include/JSystem/J2DGraph/J2DTevs.h index b3dedd90fe..f7ce3f4ef9 100644 --- a/include/JSystem/J2DGraph/J2DTevs.h +++ b/include/JSystem/J2DGraph/J2DTevs.h @@ -2,7 +2,7 @@ #define J2DTEVS_H #include -#include "dolphin/mtx.h" +#include #include "global.h" /** diff --git a/include/JSystem/J3DGraphAnimator/J3DModel.h b/include/JSystem/J3DGraphAnimator/J3DModel.h index 1efc718b2d..4de7175e85 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModel.h +++ b/include/JSystem/J3DGraphAnimator/J3DModel.h @@ -3,7 +3,7 @@ #include "JSystem/J3DGraphAnimator/J3DSkinDeform.h" #include "JSystem/J3DGraphBase/J3DPacket.h" -#include "dolphin/types.h" +#include enum J3DMdlFlag { J3DMdlFlag_None = 0x0, diff --git a/include/JSystem/J3DGraphAnimator/J3DModelData.h b/include/JSystem/J3DGraphAnimator/J3DModelData.h index e4436ea064..f34b524df0 100644 --- a/include/JSystem/J3DGraphAnimator/J3DModelData.h +++ b/include/JSystem/J3DGraphAnimator/J3DModelData.h @@ -99,6 +99,10 @@ public: mShapeTable.hide(); } + const void* getBinary() { + return mpRawData; + } + private: friend class J3DModelLoader; diff --git a/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h b/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h index fd906d8a3c..74cc8f9fa0 100644 --- a/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h +++ b/include/JSystem/J3DGraphAnimator/J3DSkinDeform.h @@ -3,7 +3,7 @@ #include "JSystem/J3DGraphAnimator/J3DCluster.h" #include "JSystem/J3DGraphAnimator/J3DMtxBuffer.h" -#include "dolphin/types.h" +#include class J3DModel; class J3DAnmCluster; diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/include/JSystem/J3DGraphBase/J3DMaterial.h index a125cdf925..92ca58ef6b 100644 --- a/include/JSystem/J3DGraphBase/J3DMaterial.h +++ b/include/JSystem/J3DGraphBase/J3DMaterial.h @@ -69,6 +69,7 @@ public: BOOL isDrawModeOpaTexEdge() { return (mMaterialMode & 3) ? 1 : 0; } J3DPEBlock* getPEBlock() { return mPEBlock; } void onInvalid() { mInvalid = 1; } + u32 getInvalid() { return mInvalid; } u32 getTexGenNum() const { return mTexGenBlock->getTexGenNum(); } u8 getTevStageNum() const { return mTevBlock->getTevStageNum(); } J3DTexCoord* getTexCoord(u32 idx) { return mTexGenBlock->getTexCoord(idx); } diff --git a/include/JSystem/J3DGraphBase/J3DPacket.h b/include/JSystem/J3DGraphBase/J3DPacket.h index 67dea2f83c..3e94e1830c 100644 --- a/include/JSystem/J3DGraphBase/J3DPacket.h +++ b/include/JSystem/J3DGraphBase/J3DPacket.h @@ -4,8 +4,8 @@ #include "JSystem/J3DAssert.h" #include "JSystem/J3DGraphBase/J3DSys.h" #include "JSystem/J3DGraphBase/J3DEnum.h" -#include "dolphin/gd/GDBase.h" -#include "dolphin/mtx.h" +#include +#include #include class J3DMatPacket; diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h index afcfa283fe..151f4235ab 100644 --- a/include/JSystem/J3DGraphBase/J3DShape.h +++ b/include/JSystem/J3DGraphBase/J3DShape.h @@ -189,7 +189,7 @@ public: J3DMaterial* getMaterial() const { return mMaterial; } u16 getIndex() const { return mIndex; } u32 getTexMtxLoadType() const { return mFlags & 0xF000; } - u32 getMtxGroupNum() const { return mMtxGroupNum; } + u16 getMtxGroupNum() const { return mMtxGroupNum; } J3DShapeDraw* getShapeDraw(u16 idx) { return mShapeDraw[idx]; } J3DShapeMtx* getShapeMtx(u16 idx) { return mShapeMtx[idx]; } Vec* getMin() { return &mMin; } diff --git a/include/JSystem/J3DGraphBase/J3DShapeDraw.h b/include/JSystem/J3DGraphBase/J3DShapeDraw.h index 8d915610bb..ad3f7ec4cb 100644 --- a/include/JSystem/J3DGraphBase/J3DShapeDraw.h +++ b/include/JSystem/J3DGraphBase/J3DShapeDraw.h @@ -1,7 +1,7 @@ #ifndef J3DSHAPEDRAW_H #define J3DSHAPEDRAW_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-j3d diff --git a/include/JSystem/J3DGraphBase/J3DShapeMtx.h b/include/JSystem/J3DGraphBase/J3DShapeMtx.h index 7029ab3350..d840b66c7a 100644 --- a/include/JSystem/J3DGraphBase/J3DShapeMtx.h +++ b/include/JSystem/J3DGraphBase/J3DShapeMtx.h @@ -3,7 +3,7 @@ #include "JSystem/J3DGraphBase/J3DShape.h" #include "JSystem/J3DAssert.h" -#include "dolphin/mtx.h" +#include class J3DTexMtx; class J3DTexGenBlock; diff --git a/include/JSystem/J3DGraphBase/J3DStruct.h b/include/JSystem/J3DGraphBase/J3DStruct.h index 7ab166946a..cd41270401 100644 --- a/include/JSystem/J3DGraphBase/J3DStruct.h +++ b/include/JSystem/J3DGraphBase/J3DStruct.h @@ -2,8 +2,8 @@ #define J3DSTRUCT_H #include -#include "dolphin/mtx.h" -#include "dolphin/mtx.h" +#include +#include #include "global.h" /** diff --git a/include/JSystem/J3DGraphBase/J3DSys.h b/include/JSystem/J3DGraphBase/J3DSys.h index 711639e576..2f6c692e02 100644 --- a/include/JSystem/J3DGraphBase/J3DSys.h +++ b/include/JSystem/J3DGraphBase/J3DSys.h @@ -88,15 +88,6 @@ struct J3DSys { void setDrawModeOpaTexEdge() { mDrawMode = J3DSysDrawMode_OpaTexEdge; } void setDrawModeXlu() { mDrawMode = J3DSysDrawMode_Xlu; } - void* getVtxPos() { return mVtxPos; } - void setVtxPos(void* pVtxPos) { mVtxPos = pVtxPos; } - - void* getVtxNrm() { return mVtxNrm; } - void setVtxNrm(void* pVtxNrm) { mVtxNrm = pVtxNrm; } - - void* getVtxCol() { return mVtxCol; } - void setVtxCol(GXColor* pVtxCol) { mVtxCol = pVtxCol; } - void setDrawBuffer(J3DDrawBuffer* buffer, int type) { J3D_ASSERT_RANGE(114, type >= 0 && type < J3DSysDrawBuf_MAX); J3D_ASSERT_NULLPTR(115, buffer); @@ -160,6 +151,19 @@ struct J3DSys { GXSetArray(GX_NRM_MTX_ARRAY, mModelNrmMtx, sizeof(*mModelNrmMtx)); } + void* getVtxPos() { return mVtxPos; } + + void setVtxPos(void* pVtxPos) { + J3D_ASSERT_NULLPTR(252, pVtxPos != NULL); + mVtxPos = pVtxPos; + } + + void* getVtxNrm() { return mVtxNrm; } + void setVtxNrm(void* pVtxNrm) { mVtxNrm = pVtxNrm; } + + void* getVtxCol() { return mVtxCol; } + void setVtxCol(GXColor* pVtxCol) { mVtxCol = pVtxCol; } + Mtx& getModelDrawMtx(u16 no) { return mModelDrawMtx[no]; } J3DShapePacket* getShapePacket() { return mShapePacket; } diff --git a/include/JSystem/J3DGraphBase/J3DTevs.h b/include/JSystem/J3DGraphBase/J3DTevs.h index 1f7d6dfa59..a13b54e4a4 100644 --- a/include/JSystem/J3DGraphBase/J3DTevs.h +++ b/include/JSystem/J3DGraphBase/J3DTevs.h @@ -1,7 +1,7 @@ #ifndef J3DTEVS_H #define J3DTEVS_H -#include "dolphin/types.h" +#include #include #include "JSystem/J3DGraphBase/J3DGD.h" #include "JSystem/J3DGraphBase/J3DStruct.h" diff --git a/include/JSystem/J3DGraphBase/J3DVertex.h b/include/JSystem/J3DGraphBase/J3DVertex.h index 1bfd011219..2486fdc41c 100644 --- a/include/JSystem/J3DGraphBase/J3DVertex.h +++ b/include/JSystem/J3DGraphBase/J3DVertex.h @@ -2,7 +2,7 @@ #define J3DVERTEX_H #include -#include "dolphin/mtx.h" +#include typedef struct _GXColor GXColor; class J3DModel; diff --git a/include/JSystem/J3DGraphLoader/J3DModelLoader.h b/include/JSystem/J3DGraphLoader/J3DModelLoader.h index 847397a7dc..5fff37ecad 100644 --- a/include/JSystem/J3DGraphLoader/J3DModelLoader.h +++ b/include/JSystem/J3DGraphLoader/J3DModelLoader.h @@ -2,7 +2,7 @@ #define J3DMODELLOADER_H #include "JSystem/J3DGraphBase/J3DSys.h" -#include "dolphin/mtx.h" +#include class J3DModelData; class J3DMaterialTable; diff --git a/include/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.h b/include/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.h index 5b231aeb1c..2fec016614 100644 --- a/include/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.h +++ b/include/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.h @@ -1,6 +1,6 @@ #ifndef J3DMODELLOADERCALCSIZE_H #define J3DMODELLOADERCALCSIZE_H -#include "dolphin/types.h" +#include #endif /* J3DMODELLOADERCALCSIZE_H */ diff --git a/include/JSystem/J3DU/J3DUClipper.h b/include/JSystem/J3DU/J3DUClipper.h index d1910eb45c..c8417b2a69 100644 --- a/include/JSystem/J3DU/J3DUClipper.h +++ b/include/JSystem/J3DU/J3DUClipper.h @@ -1,7 +1,7 @@ #ifndef J3DUCLIPPER_H #define J3DUCLIPPER_H -#include "dolphin/mtx.h" +#include /** * @ingroup jsystem-j3d diff --git a/include/JSystem/J3DU/J3DUD.h b/include/JSystem/J3DU/J3DUD.h index 39496dd500..ec9357c96b 100644 --- a/include/JSystem/J3DU/J3DUD.h +++ b/include/JSystem/J3DU/J3DUD.h @@ -1,7 +1,7 @@ #ifndef J3DUD_H #define J3DUD_H -#include "dolphin/types.h" +#include namespace J3DUD { inline f32 JMAAbs(f32 x) { diff --git a/include/JSystem/JAHostIO/JAHFrameNode.h b/include/JSystem/JAHostIO/JAHFrameNode.h index 51a08a2cf4..ed9830e8b3 100644 --- a/include/JSystem/JAHostIO/JAHFrameNode.h +++ b/include/JSystem/JAHostIO/JAHFrameNode.h @@ -1,7 +1,7 @@ #ifndef JAHFRAMENODE_H #define JAHFRAMENODE_H -#include "dolphin/types.h" +#include #include "JSystem/JAHostIO/JAHioNode.h" class JAHVirtualNode; diff --git a/include/JSystem/JAHostIO/JAHioMessage.h b/include/JSystem/JAHostIO/JAHioMessage.h index dabba5158a..766456bc10 100644 --- a/include/JSystem/JAHostIO/JAHioMessage.h +++ b/include/JSystem/JAHostIO/JAHioMessage.h @@ -1,7 +1,7 @@ #ifndef JAHIOMESSAGE_H #define JAHIOMESSAGE_H -#include "dolphin/types.h" +#include class JAHioNode; class JORMContext; diff --git a/include/JSystem/JAudio2/JASAiCtrl.h b/include/JSystem/JAudio2/JASAiCtrl.h index d7e7ff73fe..cebae770f8 100644 --- a/include/JSystem/JAudio2/JASAiCtrl.h +++ b/include/JSystem/JAudio2/JASAiCtrl.h @@ -1,7 +1,7 @@ #ifndef JASAICTRL_H #define JASAICTRL_H -#include "dolphin/types.h" +#include enum JASOutputRate { OUTPUT_RATE_0, diff --git a/include/JSystem/JAudio2/JASAramStream.h b/include/JSystem/JAudio2/JASAramStream.h index a50b9e6893..f737f76cd3 100644 --- a/include/JSystem/JAudio2/JASAramStream.h +++ b/include/JSystem/JAudio2/JASAramStream.h @@ -3,7 +3,7 @@ #include "JSystem/JAudio2/JASTaskThread.h" #include "JSystem/JUtility/JUTAssert.h" -#include "dolphin/dvd.h" +#include class JASChannel; diff --git a/include/JSystem/JAudio2/JASAudioReseter.h b/include/JSystem/JAudio2/JASAudioReseter.h index 18850e8832..2c699b0eb0 100644 --- a/include/JSystem/JAudio2/JASAudioReseter.h +++ b/include/JSystem/JAudio2/JASAudioReseter.h @@ -1,7 +1,7 @@ #ifndef JASAUDIORESETER_H #define JASAUDIORESETER_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASBank.h b/include/JSystem/JAudio2/JASBank.h index 67136da0ee..f99d245d89 100644 --- a/include/JSystem/JAudio2/JASBank.h +++ b/include/JSystem/JAudio2/JASBank.h @@ -1,7 +1,7 @@ #ifndef JASBANK_H #define JASBANK_H -#include "dolphin/types.h" +#include class JASChannel; class JASInstParam; diff --git a/include/JSystem/JAudio2/JASBankList.h b/include/JSystem/JAudio2/JASBankList.h index 814d6d78ec..6d3fd44088 100644 --- a/include/JSystem/JAudio2/JASBankList.h +++ b/include/JSystem/JAudio2/JASBankList.h @@ -1,7 +1,7 @@ #ifndef JASBANKLIST_H #define JASBANKLIST_H -#include "dolphin/types.h" +#include class JASBank; diff --git a/include/JSystem/JAudio2/JASCalc.h b/include/JSystem/JAudio2/JASCalc.h index d72e16d408..83de07401f 100644 --- a/include/JSystem/JAudio2/JASCalc.h +++ b/include/JSystem/JAudio2/JASCalc.h @@ -1,7 +1,7 @@ #ifndef JASCALC_H #define JASCALC_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASCallback.h b/include/JSystem/JAudio2/JASCallback.h index 0c9fb517a2..f1dddc7492 100644 --- a/include/JSystem/JAudio2/JASCallback.h +++ b/include/JSystem/JAudio2/JASCallback.h @@ -1,7 +1,7 @@ #ifndef JASCALLBACK_H #define JASCALLBACK_H -#include "dolphin/types.h" +#include typedef s32 JASCallback(void*); diff --git a/include/JSystem/JAudio2/JASDSPInterface.h b/include/JSystem/JAudio2/JASDSPInterface.h index 7c519402f9..d68727c9ea 100644 --- a/include/JSystem/JAudio2/JASDSPInterface.h +++ b/include/JSystem/JAudio2/JASDSPInterface.h @@ -1,7 +1,7 @@ #ifndef JASDSPINTERFACE_H #define JASDSPINTERFACE_H -#include "dolphin/types.h" +#include struct JASWaveInfo; diff --git a/include/JSystem/JAudio2/JASDvdThread.h b/include/JSystem/JAudio2/JASDvdThread.h index cc82296d3a..7fbe4e188f 100644 --- a/include/JSystem/JAudio2/JASDvdThread.h +++ b/include/JSystem/JAudio2/JASDvdThread.h @@ -1,7 +1,7 @@ #ifndef JASDVDTHREAD_H #define JASDVDTHREAD_H -#include "dolphin/types.h" +#include class JASTaskThread; diff --git a/include/JSystem/JAudio2/JASLfo.h b/include/JSystem/JAudio2/JASLfo.h index 42c303b73b..ac76c9924a 100644 --- a/include/JSystem/JAudio2/JASLfo.h +++ b/include/JSystem/JAudio2/JASLfo.h @@ -1,7 +1,7 @@ #ifndef JASLFO_H #define JASLFO_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASOscillator.h b/include/JSystem/JAudio2/JASOscillator.h index 56e7dbf966..8b47f37acb 100644 --- a/include/JSystem/JAudio2/JASOscillator.h +++ b/include/JSystem/JAudio2/JASOscillator.h @@ -1,7 +1,7 @@ #ifndef JASOSCILLATOR_H #define JASOSCILLATOR_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASProbe.h b/include/JSystem/JAudio2/JASProbe.h index 3f4ab89d61..a431f991f5 100644 --- a/include/JSystem/JAudio2/JASProbe.h +++ b/include/JSystem/JAudio2/JASProbe.h @@ -1,7 +1,7 @@ #ifndef JASPROBE_H #define JASPROBE_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASRegisterParam.h b/include/JSystem/JAudio2/JASRegisterParam.h index 0b5b13b6c8..f02e3a1839 100644 --- a/include/JSystem/JAudio2/JASRegisterParam.h +++ b/include/JSystem/JAudio2/JASRegisterParam.h @@ -1,7 +1,7 @@ #ifndef JASREGISTERPARAM_H #define JASREGISTERPARAM_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASSeqParser.h b/include/JSystem/JAudio2/JASSeqParser.h index 506068d13c..b9368b28ed 100644 --- a/include/JSystem/JAudio2/JASSeqParser.h +++ b/include/JSystem/JAudio2/JASSeqParser.h @@ -1,7 +1,7 @@ #ifndef JASSEQPARSER_H #define JASSEQPARSER_H -#include "dolphin/types.h" +#include class JASTrack; diff --git a/include/JSystem/JAudio2/JASSeqReader.h b/include/JSystem/JAudio2/JASSeqReader.h index b600d49504..2fed6253fe 100644 --- a/include/JSystem/JAudio2/JASSeqReader.h +++ b/include/JSystem/JAudio2/JASSeqReader.h @@ -1,7 +1,7 @@ #ifndef JASSEQREADER_H #define JASSEQREADER_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASSoundParams.h b/include/JSystem/JAudio2/JASSoundParams.h index b12857f9f5..a7314da2f0 100644 --- a/include/JSystem/JAudio2/JASSoundParams.h +++ b/include/JSystem/JAudio2/JASSoundParams.h @@ -1,7 +1,7 @@ #ifndef JASSOUNDPARAMS_H #define JASSOUNDPARAMS_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASTrackPort.h b/include/JSystem/JAudio2/JASTrackPort.h index f020ae3bd1..536f85eada 100644 --- a/include/JSystem/JAudio2/JASTrackPort.h +++ b/include/JSystem/JAudio2/JASTrackPort.h @@ -1,7 +1,7 @@ #ifndef JASTRACKPORT_H #define JASTRACKPORT_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JASWaveInfo.h b/include/JSystem/JAudio2/JASWaveInfo.h index 695962ad70..1ed6996bae 100644 --- a/include/JSystem/JAudio2/JASWaveInfo.h +++ b/include/JSystem/JAudio2/JASWaveInfo.h @@ -1,7 +1,7 @@ #ifndef JASWAVEINFO_H #define JASWAVEINFO_H -#include "dolphin/types.h" +#include class JASWaveArc; diff --git a/include/JSystem/JAudio2/JAUAudioArcInterpreter.h b/include/JSystem/JAudio2/JAUAudioArcInterpreter.h index 79d5e6672a..7516848350 100644 --- a/include/JSystem/JAudio2/JAUAudioArcInterpreter.h +++ b/include/JSystem/JAudio2/JAUAudioArcInterpreter.h @@ -1,7 +1,7 @@ #ifndef JAUAUDIOARCINTERPRETER_H #define JAUAUDIOARCINTERPRETER_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jaudio diff --git a/include/JSystem/JAudio2/JAUInitializer.h b/include/JSystem/JAudio2/JAUInitializer.h index 4712ea5d6a..77f28218dc 100644 --- a/include/JSystem/JAudio2/JAUInitializer.h +++ b/include/JSystem/JAudio2/JAUInitializer.h @@ -1,7 +1,7 @@ #ifndef JAUINITIALIZER_H #define JAUINITIALIZER_H -#include "dolphin/types.h" +#include class JKRSolidHeap; diff --git a/include/JSystem/JAudio2/dspproc.h b/include/JSystem/JAudio2/dspproc.h index a515c6c3cf..09266bbf81 100644 --- a/include/JSystem/JAudio2/dspproc.h +++ b/include/JSystem/JAudio2/dspproc.h @@ -1,7 +1,7 @@ #ifndef DSPPROC_H #define DSPPROC_H -#include "dolphin/types.h" +#include void DSPReleaseHalt2(u32 msg); void DsetupTable(u32 param_0, u32 param_1, u32 param_2, u32 param_3, u32 param_4); diff --git a/include/JSystem/JAudio2/dsptask.h b/include/JSystem/JAudio2/dsptask.h index 336d923228..b331a6c867 100644 --- a/include/JSystem/JAudio2/dsptask.h +++ b/include/JSystem/JAudio2/dsptask.h @@ -1,7 +1,7 @@ #ifndef DSPTASK_H #define DSPTASK_H -#include "dolphin/types.h" +#include void DspBoot(void (*)(void*)); void DspFinishWork(u16 param_0); diff --git a/include/JSystem/JFramework/JFWSystem.h b/include/JSystem/JFramework/JFWSystem.h index 7205453262..cf6ac86b69 100644 --- a/include/JSystem/JFramework/JFWSystem.h +++ b/include/JSystem/JFramework/JFWSystem.h @@ -1,7 +1,7 @@ #ifndef JFWSYSTEM_H #define JFWSYSTEM_H -#include "dolphin/types.h" +#include #include "JSystem/JUtility/JUTAssert.h" typedef struct _GXRenderModeObj GXRenderModeObj; diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h index 62f2a743c1..513d5242dd 100644 --- a/include/JSystem/JGeometry.h +++ b/include/JSystem/JGeometry.h @@ -1,7 +1,7 @@ #ifndef JGEOMETRY_H #define JGEOMETRY_H -#include "dolphin/mtx.h" +#include #include #include "JSystem/JMath/JMath.h" diff --git a/include/JSystem/JHostIO/JOREntry.h b/include/JSystem/JHostIO/JOREntry.h index 76780640e7..da1ec2e68c 100644 --- a/include/JSystem/JHostIO/JOREntry.h +++ b/include/JSystem/JHostIO/JOREntry.h @@ -2,7 +2,7 @@ #define JORENTRY_H #include "JSystem/JHostIO/JHIComm.h" -#include "dolphin/os.h" +#include template class JHIpvector { diff --git a/include/JSystem/JKernel/JKRDvdFile.h b/include/JSystem/JKernel/JKRDvdFile.h index bda9aa738a..b06d4e76d5 100644 --- a/include/JSystem/JKernel/JKRDvdFile.h +++ b/include/JSystem/JKernel/JKRDvdFile.h @@ -2,7 +2,7 @@ #define JKRDVDFILE_H #include "JSystem/JKernel/JKRFile.h" -#include "dolphin/dvd.h" +#include #include #include diff --git a/include/JSystem/JKernel/JKRFileFinder.h b/include/JSystem/JKernel/JKRFileFinder.h index 24af7c7027..195fd9685e 100644 --- a/include/JSystem/JKernel/JKRFileFinder.h +++ b/include/JSystem/JKernel/JKRFileFinder.h @@ -1,7 +1,7 @@ #ifndef JKRFILEFINDER_H #define JKRFILEFINDER_H -#include "dolphin/dvd.h" +#include /** * @ingroup jsystem-jkernel diff --git a/include/JSystem/JMath/JMATrigonometric.h b/include/JSystem/JMath/JMATrigonometric.h index 9e12850a76..f764be5b6b 100644 --- a/include/JSystem/JMath/JMATrigonometric.h +++ b/include/JSystem/JMath/JMATrigonometric.h @@ -1,7 +1,7 @@ #ifndef JMATRIGONOMETRIC_H #define JMATRIGONOMETRIC_H -#include "dolphin/types.h" +#include #include #include diff --git a/include/JSystem/JMath/JMath.h b/include/JSystem/JMath/JMath.h index df02301499..ab0faee049 100644 --- a/include/JSystem/JMath/JMath.h +++ b/include/JSystem/JMath/JMath.h @@ -1,7 +1,7 @@ #ifndef JMATH_H #define JMATH_H -#include "dolphin/mtx.h" +#include #include void JMAMTXApplyScale(const Mtx, Mtx, f32, f32, f32); diff --git a/include/JSystem/JMath/random.h b/include/JSystem/JMath/random.h index 273ab97c12..29b542d00d 100644 --- a/include/JSystem/JMath/random.h +++ b/include/JSystem/JMath/random.h @@ -1,7 +1,7 @@ #ifndef RANDOM_H #define RANDOM_H -#include "dolphin/types.h" +#include namespace JMath { diff --git a/include/JSystem/JParticle/JPADrawInfo.h b/include/JSystem/JParticle/JPADrawInfo.h index 0cf63754c5..d98448f5f4 100644 --- a/include/JSystem/JParticle/JPADrawInfo.h +++ b/include/JSystem/JParticle/JPADrawInfo.h @@ -1,7 +1,7 @@ #ifndef JPADRAWINFO_H #define JPADRAWINFO_H -#include "dolphin/mtx.h" +#include /** * @ingroup jsystem-jparticle diff --git a/include/JSystem/JParticle/JPADynamicsBlock.h b/include/JSystem/JParticle/JPADynamicsBlock.h index 41bb17f858..a27922913e 100644 --- a/include/JSystem/JParticle/JPADynamicsBlock.h +++ b/include/JSystem/JParticle/JPADynamicsBlock.h @@ -3,7 +3,7 @@ #include "JSystem/JGeometry.h" -#include "dolphin/types.h" +#include class JPAEmitterWorkData; diff --git a/include/JSystem/JParticle/JPAEmitterManager.h b/include/JSystem/JParticle/JPAEmitterManager.h index 8aeb2f56cd..4508ef9cec 100644 --- a/include/JSystem/JParticle/JPAEmitterManager.h +++ b/include/JSystem/JParticle/JPAEmitterManager.h @@ -1,7 +1,7 @@ #ifndef JPAEMITTERMANAGER_H #define JPAEMITTERMANAGER_H -#include "dolphin/types.h" +#include #include "JSystem/JParticle/JPAList.h" #include "JSystem/JParticle/JPADrawInfo.h" #include "JSystem/JSupport/JSUList.h" diff --git a/include/JSystem/JParticle/JPAExTexShape.h b/include/JSystem/JParticle/JPAExTexShape.h index 11825759c1..43175517ec 100644 --- a/include/JSystem/JParticle/JPAExTexShape.h +++ b/include/JSystem/JParticle/JPAExTexShape.h @@ -1,7 +1,7 @@ #ifndef JPAEXTEXSHAPE_H #define JPAEXTEXSHAPE_H -#include "dolphin/types.h" +#include class JPAEmitterWorkData; diff --git a/include/JSystem/JParticle/JPAExtraShape.h b/include/JSystem/JParticle/JPAExtraShape.h index e7c619806c..9e9f315ff5 100644 --- a/include/JSystem/JParticle/JPAExtraShape.h +++ b/include/JSystem/JParticle/JPAExtraShape.h @@ -1,7 +1,7 @@ #ifndef JPAEXTRASHAPE_H #define JPAEXTRASHAPE_H -#include "dolphin/types.h" +#include class JPAEmitterWorkData; class JPABaseParticle; diff --git a/include/JSystem/JParticle/JPAFieldBlock.h b/include/JSystem/JParticle/JPAFieldBlock.h index 20f7b896de..56a2de1d15 100644 --- a/include/JSystem/JParticle/JPAFieldBlock.h +++ b/include/JSystem/JParticle/JPAFieldBlock.h @@ -2,7 +2,7 @@ #define JPAFIELDBLOCK_H #include "JSystem/JGeometry.h" -#include "dolphin/types.h" +#include class JKRHeap; class JPAEmitterWorkData; diff --git a/include/JSystem/JParticle/JPAKeyBlock.h b/include/JSystem/JParticle/JPAKeyBlock.h index 39941068d2..e1591f1d26 100644 --- a/include/JSystem/JParticle/JPAKeyBlock.h +++ b/include/JSystem/JParticle/JPAKeyBlock.h @@ -1,7 +1,7 @@ #ifndef JPAKEYBLOCK_H #define JPAKEYBLOCK_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jparticle diff --git a/include/JSystem/JParticle/JPAList.h b/include/JSystem/JParticle/JPAList.h index ab2e5a7fdf..cb02349c87 100644 --- a/include/JSystem/JParticle/JPAList.h +++ b/include/JSystem/JParticle/JPAList.h @@ -1,7 +1,7 @@ #ifndef JPALIST_H #define JPALIST_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jparticle diff --git a/include/JSystem/JParticle/JPAMath.h b/include/JSystem/JParticle/JPAMath.h index 68701359ce..e48758c4d8 100644 --- a/include/JSystem/JParticle/JPAMath.h +++ b/include/JSystem/JParticle/JPAMath.h @@ -1,7 +1,7 @@ #ifndef JPAMATH_H #define JPAMATH_H -#include "dolphin/mtx.h" +#include #include "JSystem/JGeometry.h" void JPAGetDirMtx(JGeometry::TVec3 const& param_0, f32 (*param_1)[4]); diff --git a/include/JSystem/JParticle/JPARandom.h b/include/JSystem/JParticle/JPARandom.h index 5ffb276d07..551e6f6934 100644 --- a/include/JSystem/JParticle/JPARandom.h +++ b/include/JSystem/JParticle/JPARandom.h @@ -1,7 +1,7 @@ #ifndef JPARANDOM_H #define JPARANDOM_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jparticle diff --git a/include/JSystem/JParticle/JPAResource.h b/include/JSystem/JParticle/JPAResource.h index eec55de945..f07868208d 100644 --- a/include/JSystem/JParticle/JPAResource.h +++ b/include/JSystem/JParticle/JPAResource.h @@ -1,7 +1,7 @@ #ifndef JPARESOURCE_H #define JPARESOURCE_H -#include "dolphin/types.h" +#include class JKRHeap; class JPAEmitterWorkData; diff --git a/include/JSystem/JParticle/JPAResourceLoader.h b/include/JSystem/JParticle/JPAResourceLoader.h index b958585211..7e411a8497 100644 --- a/include/JSystem/JParticle/JPAResourceLoader.h +++ b/include/JSystem/JParticle/JPAResourceLoader.h @@ -1,7 +1,7 @@ #ifndef JPARESOURCELOADER_H #define JPARESOURCELOADER_H -#include "dolphin/types.h" +#include class JPAResourceManager; diff --git a/include/JSystem/JStage/JSGObject.h b/include/JSystem/JStage/JSGObject.h index fa9148dc6e..cdf1849a48 100644 --- a/include/JSystem/JStage/JSGObject.h +++ b/include/JSystem/JStage/JSGObject.h @@ -1,7 +1,7 @@ #ifndef JSGOBJECT_H #define JSGOBJECT_H -#include "dolphin/mtx.h" +#include namespace JStage { /** diff --git a/include/JSystem/JStudio/JStudio/jstudio-math.h b/include/JSystem/JStudio/JStudio/jstudio-math.h index 27df37a634..9e06530076 100644 --- a/include/JSystem/JStudio/JStudio/jstudio-math.h +++ b/include/JSystem/JStudio/JStudio/jstudio-math.h @@ -1,7 +1,7 @@ #ifndef JSTUDIO_MATH_H #define JSTUDIO_MATH_H -#include "dolphin/mtx.h" +#include #include #define m_PI_D 3.141592653589793 diff --git a/include/JSystem/JStudio/JStudio/jstudio-object.h b/include/JSystem/JStudio/JStudio/jstudio-object.h index 10315471b4..9f743d6360 100644 --- a/include/JSystem/JStudio/JStudio/jstudio-object.h +++ b/include/JSystem/JStudio/JStudio/jstudio-object.h @@ -120,6 +120,12 @@ public: virtual void do_data(void const*, u32, void const*, u32); TAdaptor* getAdaptor() const { return mpAdaptor; } + + void setAdaptor(TAdaptor* pAdaptor) { + mpAdaptor = pAdaptor; + prepareAdaptor(); + } + TControl* getControl() { return (TControl*)stb::TObject::getControl(); } const TControl* getControl() const { return (const TControl*)stb::TObject::getControl(); } diff --git a/include/JSystem/JStudio/JStudio/object-id.h b/include/JSystem/JStudio/JStudio/object-id.h index a2699d4b47..9aaebe9039 100644 --- a/include/JSystem/JStudio/JStudio/object-id.h +++ b/include/JSystem/JStudio/JStudio/object-id.h @@ -1,7 +1,7 @@ #ifndef OBJECT_ID_H #define OBJECT_ID_H -#include "dolphin/types.h" +#include namespace JStudio { namespace object { diff --git a/include/JSystem/JStudio/JStudio/stb-data.h b/include/JSystem/JStudio/JStudio/stb-data.h index fe85eb671c..2cd1a29804 100644 --- a/include/JSystem/JStudio/JStudio/stb-data.h +++ b/include/JSystem/JStudio/JStudio/stb-data.h @@ -1,7 +1,7 @@ #ifndef STB_DATA_H #define STB_DATA_H -#include "dolphin/types.h" +#include namespace JStudio { namespace stb { diff --git a/include/JSystem/JStudio/JStudio/stb.h b/include/JSystem/JStudio/JStudio/stb.h index d61bfda06c..20813969ff 100644 --- a/include/JSystem/JStudio/JStudio/stb.h +++ b/include/JSystem/JStudio/JStudio/stb.h @@ -4,7 +4,7 @@ #include "JSystem/JGadget/linklist.h" #include "JSystem/JStudio/JStudio/object-id.h" #include "JSystem/JStudio/JStudio/stb-data-parse.h" -#include "dolphin/os.h" +#include namespace JStudio { class TObject; diff --git a/include/JSystem/JStudio/JStudioCameraEditor/control.h b/include/JSystem/JStudio/JStudioCameraEditor/control.h new file mode 100644 index 0000000000..4feda48915 --- /dev/null +++ b/include/JSystem/JStudio/JStudioCameraEditor/control.h @@ -0,0 +1,217 @@ +#ifndef JSTUDIOCAMERAEDITOR_CONTROL_H +#define JSTUDIOCAMERAEDITOR_CONTROL_H + +#include "JSystem/JStudio/JStudio/jstudio-control.h" +#include "JSystem/JStudio/JStudio/jstudio-object.h" +#include "JSystem/JStudio/JStudioCameraEditor/csb.h" +#include "JSystem/JStudio/JStudioCameraEditor/sequence.h" +#include "JSystem/JStudio/JStudioCameraEditor/controlset-csb-valueset.h" +#include "JSystem/JStudio/JStudioToolLibrary/controlset-preview.h" +#include "JSystem/JStudio/JStudioToolLibrary/controlset-transform.h" +#include "JSystem/JStudio/JStudioToolLibrary/console.h" +#include "JSystem/JStudio/JStudioToolLibrary/interface.h" +#include "JSystem/JStudio/JStudioToolLibrary/visual.h" +#include "JSystem/JStudio/JStudioToolLibrary/scroll.h" +#include "JSystem/JGadget/std-vector.h" +#include "JSystem/JHostIO/JORServer.h" + +namespace JStudioCameraEditor { + struct TControl : public JORReflexible, public JOREventCallbackListNode { + struct TSWValueWidth_ { + TSWValueWidth_(uint, uint); + + /* 0x0 */ uint field_0x0; + /* 0x4 */ uint field_0x4; + }; + + struct TOptionSet_ : public csb::TValueSet { + TOptionSet_(); + + int getPadding_vertical_() const; + int getPadding_horizontal_() const; + int getMargin_horizontal_() const; + + /* 0x02C */ int field_0x2c; + /* 0x030 */ int field_0x30; + /* 0x034 */ u8 field_0x34; + /* 0x035 */ u8 field_0x35; + /* 0x038 */ int field_0x38; + /* 0x03C */ int field_0x3c; + /* 0x040 */ int field_0x40; + /* 0x044 */ u8 field_0x44; + /* 0x045 */ u8 field_0x45; + /* 0x048 */ f32 field_0x48; + /* 0x04C */ f32 field_0x4c; + /* 0x050 */ f32 field_0x50; + /* 0x054 */ f32 field_0x54; + /* 0x058 */ f32 field_0x58; + /* 0x05C */ f32 field_0x5c; + /* 0x060 */ f32 field_0x60; + /* 0x064 */ f32 field_0x64; + /* 0x068 */ f32 field_0x68; + /* 0x06C */ f32 field_0x6c; + /* 0x070 */ int field_0x70; + /* 0x074 */ int field_0x74; + /* 0x078 */ int field_0x78; + /* 0x07C */ u8 field_0x7c; + /* 0x07D */ u8 field_0x7d; + /* 0x07E */ u8 field_0x7e; + /* 0x07F */ u8 field_0x7f; + /* 0x080 */ u8 field_0x80; + /* 0x081 */ u8 field_0x81; + /* 0x082 */ u8 field_0x82; + /* 0x083 */ u8 field_0x83; + /* 0x084 */ u8 field_0x84; + /* 0x088 */ int field_0x88; + /* 0x08C */ int field_0x8c; + /* 0x090 */ int field_0x90; + /* 0x094 */ int field_0x94; + /* 0x098 */ f32 field_0x98; + /* 0x09C */ f32 field_0x9c; + /* 0x0A0 */ JUtility::TColor field_0xa0; + /* 0x0A4 */ int field_0xa4; + /* 0x0A8 */ int field_0xa8; + /* 0x0AC */ int field_0xac; + /* 0x0B0 */ f32 field_0xb0; + /* 0x0B4 */ int field_0xb4; + /* 0x0B8 */ int field_0xb8; + /* 0x0BC */ int field_0xbc; + /* 0x0C0 */ int field_0xc0; + /* 0x0C4 */ int field_0xc4; + /* 0x0C8 */ int field_0xc8; + /* 0x0CC */ int field_0xcc; + /* 0x0D0 */ int field_0xd0; + /* 0x0D4 */ int field_0xd4; + /* 0x0D8 */ int field_0xd8; + /* 0x0DC */ int field_0xdc; + /* 0x0E0 */ int field_0xe0; + /* 0x0E4 */ int field_0xe4; + /* 0x0E8 */ int field_0xe8; + /* 0x0EC */ TSWValueWidth_ field_0xec; + /* 0x0F4 */ TSWValueWidth_ field_0xf4; + /* 0x0FC */ TSWValueWidth_ field_0xfc; + /* 0x104 */ TSWValueWidth_ field_0x104; + /* 0x10C */ JUtility::TColor field_0x10c; + /* 0x110 */ JUtility::TColor field_0x110; + /* 0x114 */ JUtility::TColor field_0x114; + /* 0x118 */ JUtility::TColor field_0x118; + /* 0x11C */ JUtility::TColor field_0x11c; + /* 0x120 */ JUtility::TColor field_0x120; + /* 0x124 */ JUtility::TColor field_0x124; + /* 0x128 */ JUtility::TColor field_0x128; + /* 0x12C */ JUtility::TColor field_0x12c; + /* 0x130 */ JUtility::TColor field_0x130; + /* 0x134 */ JUtility::TColor field_0x134; + /* 0x138 */ JUtility::TColor field_0x138; + /* 0x13C */ JUtility::TColor field_0x13c; + /* 0x140 */ JUtility::TColor field_0x140; + /* 0x144 */ JUtility::TColor field_0x144; + /* 0x148 */ JStudioToolLibrary::TColor_variable::TVelocity field_0x148; + /* 0x158 */ JStudioToolLibrary::TColor_variable::TVelocity field_0x158; + /* 0x168 */ JStudioToolLibrary::TColor_variable::TVelocity field_0x168; + /* 0x178 */ JStudioToolLibrary::TColor_variable::TVelocity field_0x178; + /* 0x188 */ JStudioToolLibrary::TColor_variable::TVelocity field_0x188; + /* 0x198 */ JStudioToolLibrary::TColor_variable::TVelocity field_0x198; + /* 0x1A8 */ int field_0x1a8; + /* 0x1AC */ int field_0x1ac; + }; + + struct TAdaptor_preview_ : public JStudioToolLibrary::TControlSet_preview::TAdaptor { + TAdaptor_preview_(TControl*); + + virtual bool do_isReady(); + virtual void do_begin(); + virtual void do_end(); + virtual void do_current(u32, s32); + virtual ~TAdaptor_preview_(); + + /* 0x4 */ TControl* pControl_; + }; + + enum TECommand {}; + + TControl(); + + void jstudio_setSecondPerFrame(double param_0) { + oJSTControl_.setSecondPerFrame(param_0); + } + + void show_setRender(J2DOrthoGraph* pOrthoGraph, JUTFont* pFont) { + field_0x3cc.setRender(pOrthoGraph); + oPrint_.setFont(pFont); + } + + void interface_setPad(const JUTGamePad* pPad) { + oPad_.setPad(pPad); + } + + void jstudio_setAdaptor(JStudio::TAdaptor_camera* pAdaptor) { + field_0x608.setAdaptor(pAdaptor); + } + + bool isEnabled() const { return bEnabled_; } + + virtual void listenPropertyEvent(const JORPropertyEvent*); + virtual void genMessage(JORMContext*); + + virtual int JORAct(u32, const char*); + virtual ~TControl(); + virtual void update(); + virtual void show2D(); + virtual void show3D(const Mtx); + virtual int command(TECommand, const char*); + + /* 0x018 */ JStudioToolLibrary::TConsole field_0x18; + /* 0x020 */ TOptionSet_ oOptionSet_; + /* 0x1D0 */ TAdaptor_preview_ field_0x1d0; + /* 0x1D8 */ bool bEnabled_; + /* 0x1DC */ int field_0x1dc; + /* 0x1E0 */ JStudioToolLibrary::TControlSet_preview oPreviewControl_; + /* 0x218 */ TControlSet_csb_valueSet field_0x218; + /* 0x260 */ TControlSet_csb_valueSet field_0x260; + /* 0x2A8 */ JStudioToolLibrary_JStudio::TControlSet_transform oTransformControl_; + /* 0x2D4 */ TSequenceContainer oSequenceContainer_; + /* 0x2E8 */ csb::TValueSet field_0x2e8; + /* 0x314 */ JGadget::TVector > field_0x314; + /* 0x328 */ TSequenceContainer field_0x328; + /* 0x33C */ u8 field_0x33C[0x36C - 0x33C]; + /* 0x36C */ int field_0x36c; + /* 0x370 */ u8 field_0x370; + /* 0x371 */ u8 field_0x371; + /* 0x372 */ u8 field_0x372; + /* 0x373 */ u8 field_0x373; + /* 0x374 */ u8 field_0x374; + /* 0x378 */ int field_0x378; + /* 0x37C */ u8 field_0x37c; + /* 0x380 */ int field_0x380; + /* 0x384 */ int field_0x384[2]; + /* 0x38C */ JGadget::TLinkList::iterator itIFSequence_; + /* 0x390 */ u32 uitIFSequence_; + /* 0x394 */ csb::TValueSet* itIFValueSet_; + /* 0x398 */ csb::TValueSet* uitIFValueSet_; + /* 0x39C */ JStudioToolLibrary::TPad oPad_; + /* 0x3A0 */ JStudioToolLibrary::TPad::TData oPadData_; + /* 0x3C8 */ bool bIsPad_applied_; + /* 0x3CC */ JStudioToolLibrary::TDrawPrimitive2D field_0x3cc; + /* 0x3D0 */ JStudioToolLibrary::TDrawPrimitive3D field_0x3d0; + /* 0x3D8 */ JStudioToolLibrary::TPrint oPrint_; + /* 0x3EC */ bool bVisible2D_; + /* 0x3ED */ bool bVisible3D_; + /* 0x3F0 */ JStudioToolLibrary::TScroll_drawBar_horizontal field_0x3f0; + /* 0x428 */ JStudioToolLibrary::TScroll_drawBar_horizontal field_0x428; + /* 0x460 */ int field_0x460; + /* 0x464 */ int field_0x464; + /* 0x468 */ JStudioToolLibrary::TColor_variable field_0x468; + /* 0x47C */ JStudioToolLibrary::TColor_variable field_0x47c; + /* 0x490 */ JStudioToolLibrary::TColor_variable field_0x490; + /* 0x4A4 */ JStudioToolLibrary::TColor_variable field_0x4a4; + /* 0x4B8 */ JStudioToolLibrary::TColor_variable field_0x4b8; + /* 0x4CC */ JStudioToolLibrary::TColor_variable field_0x4cc; + /* 0x4E0 */ u8 field_0x4E0[0x4F8 - 0x4E0]; + /* 0x4F8 */ JStudio::TControl oJSTControl_; + /* 0x608 */ JStudio::TObject_camera field_0x608; + /* 0x640 */ u8 field_0x640; + }; +} + +#endif diff --git a/include/JSystem/JStudio/JStudioCameraEditor/controlset-csb-valueset.h b/include/JSystem/JStudio/JStudioCameraEditor/controlset-csb-valueset.h new file mode 100644 index 0000000000..1bf4d6f79e --- /dev/null +++ b/include/JSystem/JStudio/JStudioCameraEditor/controlset-csb-valueset.h @@ -0,0 +1,16 @@ +#ifndef JSTUDIOCAMERAEDITOR_CONTROLSET_CSB_VALUESET_H +#define JSTUDIOCAMERAEDITOR_CONTROLSET_CSB_VALUESET_H + +#include "JSystem/JStudio/JStudioToolLibrary/controlset.h" +#include "JSystem/JStudio/JStudioCameraEditor/csb.h" + +namespace JStudioCameraEditor { + struct TControlSet_csb_valueSet : public JStudioToolLibrary::TControlSet { + /* 0x14 */ bool bChanged_; + /* 0x15 */ u8 field_0x15; + /* 0x18 */ csb::TValueSet* pValueSet_; + /* 0x1C */ csb::TValueSet field_0x1c; + }; +} + +#endif diff --git a/include/JSystem/JStudio/JStudioCameraEditor/csb.h b/include/JSystem/JStudio/JStudioCameraEditor/csb.h new file mode 100644 index 0000000000..de1a42421c --- /dev/null +++ b/include/JSystem/JStudio/JStudioCameraEditor/csb.h @@ -0,0 +1,77 @@ +#ifndef JSTUDIOCAMERAEDITOR_CSB_H +#define JSTUDIOCAMERAEDITOR_CSB_H + +#include +#include "JSystem/JGadget/linklist.h" +#include "JSystem/JGadget/std-vector.h" +#include "JSystem/JStudio/JStudio/functionvalue.h" + +namespace JStudioCameraEditor { + namespace csb { + namespace data { + enum TEValue {}; + } + + struct TValueSet { + TValueSet(); + TValueSet(const TValueSet&); + + void set(data::TEValue, f32); + void setVector_targetPosition(const Vec&); + void setVector_position(const Vec&); + void setApplied(data::TEValue, bool); + void getVector_targetPosition_relativePosition(Vec*) const; + void getVector_targetPosition(Vec*) const; + void getVector_position(Vec*) const; + void getVector_up(Vec*) const; + f32 getValue(data::TEValue) const; + void setTime(u32); + u32 getTime() const; + void setVector_position_relativeTargetPosition(const Vec&); + void getVector_position_relativeTargetPosition(Vec*) const; + void setVector_targetPosition_relativePosition(const Vec&); + void addValue(data::TEValue, f32); + void set(const TValueSet&, uint); + bool isApplied(data::TEValue) const; + + /* 0x00 */ f32 fValue_[8]; + /* 0x20 */ bool bApplied_[8]; + /* 0x28 */ u32 uTime_; + }; + + struct TSequence : public JGadget::TLinkListNode { + TSequence(u32); + ~TSequence(); + + JGadget::TVector >& referValueSetContainer(); + void getValueSetContainer() const; + void setInterpolate(JStudio::TFunctionValue::TEInterpolate); + JStudio::TFunctionValue::TEInterpolate getInterpolate() const; + void setTime(u32); + u32 getTime() const; + void setTime_begin(u32); + u32 getTime_begin() const; + void assign(const TSequence&); + u32 getTime_valueSet_all() const; + u32 getTime_actual(u32*) const; + u32 getTime_begin_actual_(u32) const; + bool getFunctionValue(JStudio::TFunctionValue_list_parameter*, JGadget::TVector >*, data::TEValue, double) const; + u32 getFunctionValueDataNumberNeeded() const; + + /* 0x08 */ JGadget::TVector > oContainer_; + /* 0x1C */ u32 uTime_; + /* 0x20 */ u32 uTimeBegin_; + /* 0x24 */ JStudio::TFunctionValue::TEInterpolate eInterpolate_; + }; + + struct TSequenceContainer : public JGadget::TLinkList_factory { + TSequenceContainer(); + + virtual ~TSequenceContainer(); + virtual TSequence* Do_create(); + virtual void Do_destroy(TSequence*); + }; + } +} + +#endif diff --git a/include/JSystem/JStudio/JStudioCameraEditor/sequence.h b/include/JSystem/JStudio/JStudioCameraEditor/sequence.h new file mode 100644 index 0000000000..82d8b78ab9 --- /dev/null +++ b/include/JSystem/JStudio/JStudioCameraEditor/sequence.h @@ -0,0 +1,20 @@ +#ifndef JSTUDIOCAMERAEDITOR_SEQUENCE_H +#define JSTUDIOCAMERAEDITOR_SEQUENCE_H + +#include "JSystem/JStudio/JStudioCameraEditor/csb.h" + +namespace JStudioCameraEditor { + struct TSequenceContainer : public csb::TSequenceContainer { + TSequenceContainer(); + + int GetSequenceValueSetDefaultNumber(); + + virtual ~TSequenceContainer(); + virtual csb::TSequence* Do_create(); + virtual void Do_destroy(csb::TSequence*); + + /* 0x10 */ int field_0x10; + }; +} + +#endif diff --git a/include/JSystem/JStudio/JStudioToolLibrary/anchor.h b/include/JSystem/JStudio/JStudioToolLibrary/anchor.h new file mode 100644 index 0000000000..cd5ff27c0b --- /dev/null +++ b/include/JSystem/JStudio/JStudioToolLibrary/anchor.h @@ -0,0 +1,39 @@ +#ifndef JSTUDIOTOOLLIBRARY_ANCHOR_H +#define JSTUDIOTOOLLIBRARY_ANCHOR_H + +#include "JSystem/JStudio/JStudioToolLibrary/scroll.h" + +namespace JStudioToolLibrary { + enum TEAnchor { + + }; + + struct TPoint { + TPoint(const TPoint&); + TPoint(int, int); + + void setX(int); + void setY(int); + + int getX() const; + int getY() const; + + /* 0x0 */ int iX_; + /* 0x4 */ int iY_; + }; + + struct TAnchor_corner { + TAnchor_corner(TEAnchor, int, int); + + void setAnchor(TEAnchor); + void setAnchorPosition(const TPoint&); + void getPosition(TPoint*, const TRectangle&, int, int) const; + TEAnchor getAnchor() const; + TPoint* getAnchorPosition() const; + + /* 0x0 */ TEAnchor eAnchor_; + /* 0x4 */ TPoint oAnchorPosition_; + }; +} + +#endif diff --git a/include/JSystem/JStudio/JStudioToolLibrary/console.h b/include/JSystem/JStudio/JStudioToolLibrary/console.h new file mode 100644 index 0000000000..cddd9a77e7 --- /dev/null +++ b/include/JSystem/JStudio/JStudioToolLibrary/console.h @@ -0,0 +1,87 @@ +#ifndef JSTUDIOTOOLLIBRARY_CONSOLE_H +#define JSTUDIOTOOLLIBRARY_CONSOLE_H + +#include "JSystem/JKernel/JKRHeap.h" +#include "JSystem/JHostIO/JORReflexible.h" +#include "JSystem/JUtility/TColor.h" + +namespace JStudioToolLibrary { + struct JORValPrpEvent {}; + struct JORStrValPrpEvent {}; + + struct TConsole { + TConsole(const char*, JORReflexible*); + + u32 memory_allocate_available(JKRHeap*, double, u32*); + bool memory_isAllocatable(JKRHeap*); + bool memory_isAllocatable(JKRHeap*, u32); + bool memory_isAllocatable_available(JKRHeap*, double, u32*); + bool memory_allocate(JKRHeap*, u32); + + void control_enable(const u32*, bool); + void control_enable(u32, bool); + void control_setStyle(u32, u32); + void control_generateRadioButton(JORMContext*, u32, const char*, const char*, int); + void control_generateSelectList(JORMContext*, u32, const char*, uint, const char*, int); + void control_generateLabel(JORMContext*, u32, const char*); + void control_getRadioButton(const JORValPrpEvent*); + void control_isCheckBox(const JORValPrpEvent*); + void control_getSelectList(const JORValPrpEvent*); + void control_generateEditBox_float(JORMContext*, u32, const char*, const f32&); + void control_generateEditBox_uint(JORMContext*, u32, const char*, const uint&); + void control_generateTitle(JORMContext*, const char*) const; + void control_generateSeparator(JORMContext*, const char*); + void control_setCheckBox(u32, bool); + void control_generateRadioButton_style(JORMContext*, u32, u32, const char*, const char**, int); + void control_setRadioButton(u32, int); + void control_generateSelectList_style(JORMContext*, u32, u32, const char*, uint, const char**, int); + void control_setSelectList(u32, int); + void control_generateLabel_style(JORMContext*, u32, u32, const char*); + void control_generateEditBox_style(JORMContext*, u32, u32, const char*, const char*); + void control_generateEditBox_style_int(JORMContext*, u32, u32, const char*, const int&); + void control_generateEditBox_style_uint(JORMContext*, u32, u32, const char*, const uint&); + void control_generateEditBox_style_float(JORMContext*, u32, u32, const char*, const f32&); + void control_generateEditBox_style_RGBA(JORMContext*, u32, u32, const char*, JUtility::TColor); + void control_generateEditBox_int(JORMContext*, u32, const char*, const int&); + void control_setEditBox(u32, const char*); + void control_setEditBox_f(u32, const char*, ...); + void control_setEditBox_f_va(u32, const char*, va_list); + void control_setEditBox_int(u32, const int&); + void control_setEditBox_uint(u32, const uint&); + void control_setEditBox_float(u32, const f32&); + void control_setEditBox_RGBA(u32, const JUtility::TColor&); + void control_replyEditBox_int(const JORStrValPrpEvent*, int*); + void control_replyEditBox_uint(const JORStrValPrpEvent*, uint*); + void control_replyEditBox_float(const JORStrValPrpEvent*, f32*); + void control_replyEditBox_float_not(const JORStrValPrpEvent*, f32*, const f32&); + void control_replyEditBox_float_greaterEqual(const JORStrValPrpEvent*, f32*, const f32&); + void control_replyEditBox_RGBA(const JORStrValPrpEvent*, JUtility::TColor*); + void control_forceEditBox(u32, const char*, const char*); + + void control_replyEditBox_float_range(const JORStrValPrpEvent*, f32*, const f32&, const f32&); + void control_replyEditBox_uint_range(const JORStrValPrpEvent*, uint*, const uint&, const uint&); + + bool parseValue_int(const char*, int*); + bool parseValue_uint(const char*, uint*); + bool parseValue_float(const char*, f32*); + bool parseValue_double(const char*, double*); + bool parseValue_RGBA(const char*, JUtility::TColor*); + bool parseValueList_float(const char*, char, f32*, f32*); + + int openMessageBox(uint, const char*); + int openMessageBox_f(uint, const char*, ...); + int openMessageBox_f_va(uint, const char*, va_list); + bool openBrowser(const char*); + + void toValue_style_(u32); + void getValueString_int(char*, u32, int); + void getValueString_uint(char*, u32, uint); + void getValueString_float(char*, u32, f32); + void getValueString_RGBA(char*, u32, const JUtility::TColor&); + + /* 0x0 */ char* szTitle_; + /* 0x4 */ JORReflexible* pReflexible_; + }; +} + +#endif diff --git a/include/JSystem/JStudio/JStudioToolLibrary/controlset-preview.h b/include/JSystem/JStudio/JStudioToolLibrary/controlset-preview.h new file mode 100644 index 0000000000..f83a388481 --- /dev/null +++ b/include/JSystem/JStudio/JStudioToolLibrary/controlset-preview.h @@ -0,0 +1,81 @@ +#ifndef JSTUDIOTOOLLIBRARY_CONTROLSET_PREVIEW_H +#define JSTUDIOTOOLLIBRARY_CONTROLSET_PREVIEW_H + +#include "JSystem/JStudio/JStudioToolLibrary/controlset.h" + +namespace JStudioToolLibrary { + struct TControlSet_preview : public TControlSet { + struct TAdaptor { + virtual bool do_isReady(); + virtual void do_begin(); + virtual void do_end(); + virtual void do_current(u32, s32); + }; + + enum TEPreview {}; + + TControlSet_preview(TConsole*, u32, uint, TAdaptor*); + + void preview_start(); + void preview_stop(); + void preview_rewind(); + void preview_step(); + void preview_pause(); + void preview_play(); + bool isPreview_stop() const; + u32 getTime() const; + u8 isTime_end() const; + void update(); + void forwardTime_next_(); + int getTime_step() const; + void adaptor_current_(u32, s32); + void flushTime_(); + void setTime_(u32); + void value_setTime_(u32); + void preview(TEPreview); + void adaptor_begin_(); + void resetTime_(); + bool adaptor_isReady_(); + u32 getControlStyle_time_end_() const; + u32 getControlStyle_time_() const; + void adaptor_end_(); + void control_updateTime_(); + void control_generate_preview(JORMContext*, TControlSet*, const TControl&); + void control_reply_preview(const JORPropertyEvent*, TControlSet*, const TControl&); + void control_update_preview(TControlSet*, const TControl&); + void control_generate_preview_rewind(JORMContext*, TControlSet*, const TControl&); + void control_reply_preview_rewind(const JORPropertyEvent*, TControlSet*, const TControl&); + void control_update_preview_rewind(TControlSet*, const TControl&); + void control_generate_preview_play(JORMContext*, TControlSet*, const TControl&); + void control_reply_preview_play(const JORPropertyEvent*, TControlSet*, const TControl&); + void control_update_preview_play(TControlSet*, const TControl&); + void control_generate_preview_step(JORMContext*, TControlSet*, const TControl&); + void control_reply_preview_step(const JORPropertyEvent*, TControlSet*, const TControl&); + void control_update_preview_step(TControlSet*, const TControl&); + void control_generate_time(JORMContext*, TControlSet*, const TControl&); + void control_reply_time(const JORPropertyEvent*, TControlSet*, const TControl&); + void control_update_time(TControlSet*, const TControl&); + void control_generate_time_end(JORMContext*, TControlSet*, const TControl&); + u32 getTime_end() const; + void control_reply_time_end(const JORPropertyEvent*, TControlSet*, const TControl&); + void control_update_time_end(TControlSet*, const TControl&); + void control_generate_time_step(JORMContext*, TControlSet*, const TControl&); + void control_reply_time_step(const JORPropertyEvent*, TControlSet*, const TControl&); + void setTime_step(u32); + void control_updateTime_step(); + void value_setTime_step(u32); + void control_update_time_step(TControlSet*, const TControl&); + + /* 0x14 */ u8 field_0x14; + /* 0x18 */ int field_0x18; + /* 0x1C */ u32 uTime_; + /* 0x20 */ u32 field_0x20; + /* 0x24 */ int field_0x24; + /* 0x28 */ u32 field_0x28; + /* 0x2C */ int iTimeStep_; + /* 0x30 */ u8 bTimeEnd_; + /* 0x34 */ TAdaptor* pAdaptor_; + }; +} + +#endif diff --git a/include/JSystem/JStudio/JStudioToolLibrary/controlset-transform.h b/include/JSystem/JStudio/JStudioToolLibrary/controlset-transform.h new file mode 100644 index 0000000000..5bf702b7f4 --- /dev/null +++ b/include/JSystem/JStudio/JStudioToolLibrary/controlset-transform.h @@ -0,0 +1,54 @@ +#ifndef JSTUDIOTOOLLIBRARY_CONTROLSET_TRANSFORM_H +#define JSTUDIOTOOLLIBRARY_CONTROLSET_TRANSFORM_H + +#include "JSystem/JStudio/JStudioToolLibrary/controlset.h" +#include "JSystem/JStudio/JStudio/jstudio-control.h" + +namespace JStudioToolLibrary_JStudio { + struct TControlSet_transform : public JStudioToolLibrary::TControlSet { + TControlSet_transform(JStudioToolLibrary::TConsole*, u32, JStudio::TControl); + + void resetOrigin(); + void setOrigin(const Vec&, f32); + void setEnabled(bool); + + JStudio::TControl* jstudio_getControl() const; + void jstudio_setControl(JStudio::TControl*); + + void control_updateEnabled(); + void value_setEnabled(bool); + void control_updateOrigin(); + void value_setOrigin(const Vec&, f32); + bool setOrigin(const char*); + bool setOrigin_TxyzRy_(TControlSet_transform*, const char*); + void control_generate_float_(JORMContext*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&, f32); + void control_reply_float_(const JORPropertyEvent*, TControlSet_transform*, f32*); + void control_update_float_(TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&, f32); + void control_generate_enable(JORMContext*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + bool isEnabled() const; + void control_reply_enable(const JORPropertyEvent*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_update_enable(TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_generate_origin_translationX(JORMContext*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_reply_origin_translationX(const JORPropertyEvent*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_update_origin_translationX(TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_generate_origin_translationY(JORMContext*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_reply_origin_translationY(const JORPropertyEvent*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_update_origin_translationY(TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_generate_origin_translationZ(JORMContext*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_reply_origin_translationZ(const JORPropertyEvent*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_update_origin_translationZ(TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_generate_origin_rotationY(JORMContext*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_reply_origin_rotationY(const JORPropertyEvent*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_update_origin_rotationY(TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_generate_origin_reset(JORMContext*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_reply_origin_reset(const JORPropertyEvent*, TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + void control_update_origin_reset(TControlSet_transform*, const JStudioToolLibrary::TControlSet::TControl&); + + /* 0x14 */ bool bEnabled_; + /* 0x18 */ TControl* pControl_; + /* 0x1C */ Vec field_0x1c; + /* 0x28 */ f32 field_0x28; + }; +} + +#endif diff --git a/include/JSystem/JStudio/JStudioToolLibrary/controlset.h b/include/JSystem/JStudio/JStudioToolLibrary/controlset.h new file mode 100644 index 0000000000..c688eea148 --- /dev/null +++ b/include/JSystem/JStudio/JStudioToolLibrary/controlset.h @@ -0,0 +1,63 @@ +#ifndef JSTUDIOTOOLLIBRARY_CONTROLSET_H +#define JSTUDIOTOOLLIBRARY_CONTROLSET_H + +#include "JSystem/JStudio/JStudioToolLibrary/console.h" + +namespace JStudioToolLibrary { + struct TControlSet { + struct TControl { + typedef void* (*generateFn)(JORMContext*, TControlSet*, const TControl&); + typedef void* (*replyFn)(const JORPropertyEvent*, TControlSet*, const TControl&); + typedef void* (*updateFn)(TControlSet*, const TControl&); + + TControl(); + TControl(const char*, generateFn, replyFn, updateFn); + + void update(TControlSet*) const; + void reply(const JORPropertyEvent*, TControlSet*) const; + void generate(JORMContext*, TControlSet*) const; + bool isEnd() const; + const char* getLabel() const; + int getID(const TControlSet&) const; + void setStyle(TControlSet*, u32) const; + + /* 0x00 */ char* szLabel_; + /* 0x04 */ void* pfnGenerate_; + /* 0x08 */ void* pfnReply_; + /* 0x0C */ void* pfnUpdate_; + }; + + TControlSet(TConsole*, const TControl*, u32, u32, const u32*); + + TConsole* getConsole(); + + TControl* control_getControl_IDOffset(u32) const; + u32 control_getNumber() const; + void control_generate(JORMContext*); + void control_generate_all(JORMContext*); + void control_generate(JORMContext*, const TControl&); + void control_generate_IDOffset(JORMContext*, const u32*); + void control_generate_IDOffset(JORMContext*, u32); + void control_generate_separator(JORMContext*, TControlSet*, const TControl&); + void control_generate_label(JORMContext*, TControlSet*, const TControl&); + void control_reply(const JORPropertyEvent*); + void control_getControl(u32) const; + u32 control_getIDBegin() const; + void control_toID(const TControl*) const; + u32 control_toID_IDOffset(u32) const; + u32 control_toIDOffset(const TControl&) const; + void control_update_IDOffset(u32); + void control_update(const TControl&); + void control_update_IDOffset(const u32*); + void control_setStyle(const TControl&, u32); + void control_setStyle_IDOffset(u32, u32); + + /* 0x00 */ TConsole* pConsole_; + /* 0x04 */ TControl* paoControl_; + /* 0x08 */ u32 uNumber_; + /* 0x0C */ u32 field_0xc; + /* 0x10 */ u32 field_0x10; + }; +} + +#endif diff --git a/include/JSystem/JStudio/JStudioToolLibrary/interface.h b/include/JSystem/JStudio/JStudioToolLibrary/interface.h new file mode 100644 index 0000000000..10f4595983 --- /dev/null +++ b/include/JSystem/JStudio/JStudioToolLibrary/interface.h @@ -0,0 +1,47 @@ +#ifndef JSTUDIOTOOLLIBRARY_INTERFACE_H +#define JSTUDIOTOOLLIBRARY_INTERFACE_H + +#include "JSystem/JUtility/JUTGamePad.h" + +namespace JStudioToolLibrary { + struct TPad { + struct TData { + TData(); + void reset(); + + /* 0x00 */ int iButton_; + /* 0x04 */ int iButtonTrigger_; + /* 0x08 */ int iButtonRelease_; + /* 0x0C */ int iButtonRepeat_; + /* 0x10 */ f32 fAnalogMainStickX_; + /* 0x14 */ f32 fAnalogMainStickY_; + /* 0x18 */ f32 fAnalogSubStickX_; + /* 0x1C */ f32 fAnalogSubStickY_; + /* 0x20 */ f32 fAnalogTriggerL_; + /* 0x24 */ f32 fAnalogTriggerR_; + }; + + TPad(); + + void setPad(const JUTGamePad* pPad) { + pPad_ = pPad; + } + + bool isEnabled() const; + void getData(TData*) const; + f32 getAnalog_triggerR() const; + f32 getAnalog_triggerL() const; + f32 getAnalog_subStickY() const; + f32 getAnalog_subStickX() const; + f32 getAnalog_mainStickY() const; + f32 getAnalog_mainStickX() const; + int getButton_repeat() const; + int getButton_release() const; + int getButton_trigger() const; + int getButton() const; + + /* 0x0 */ const JUTGamePad* pPad_; + }; +} + +#endif diff --git a/include/JSystem/JStudio/JStudioToolLibrary/scroll.h b/include/JSystem/JStudio/JStudioToolLibrary/scroll.h new file mode 100644 index 0000000000..cac9a4a0ee --- /dev/null +++ b/include/JSystem/JStudio/JStudioToolLibrary/scroll.h @@ -0,0 +1,49 @@ +#ifndef JSTUDIOTOOLLIBRARY_SCROLL_H +#define JSTUDIOTOOLLIBRARY_SCROLL_H + +#include "JSystem/JStudio/JStudioToolLibrary/visual.h" + +namespace JStudioToolLibrary { + struct TScroll { + TScroll(); + virtual ~TScroll(); + + int getStride() const; + int getValue() const; + int getMin() const; + int getMax() const; + void setStride(int); + void setValue_scroll(int); + void setValue(int); + void setRange(int, int); + void setValue_range_(int, int, int); + + /* 0x04 */ int iValue_; + /* 0x08 */ int iMin_; + /* 0x0C */ int iMax_; + /* 0x10 */ int field_0x10; + /* 0x14 */ int iStride_; + }; + + struct TScroll_drawBar : public TScroll { + void setRectangle(int, int, int, int); + TRectangle& getRectangle() const; + JUtility::TColor& getColor_disabled() const; + JUtility::TColor& getColor_background() const; + JUtility::TColor& getColor_foreground() const; + JUtility::TColor& getColor_frame() const; + + /* 0x18 */ TRectangle oRectangle_; + /* 0x28 */ JUtility::TColor oColorFrame_; + /* 0x2C */ JUtility::TColor oColorBackground_; + /* 0x30 */ JUtility::TColor oColorForeground_; + /* 0x34 */ JUtility::TColor oColorDisabled_; + }; + + struct TScroll_drawBar_horizontal : public TScroll_drawBar { + virtual ~TScroll_drawBar_horizontal(); + virtual void draw(TDrawPrimitive2D*) const; + }; +} + +#endif diff --git a/include/JSystem/JStudio/JStudioToolLibrary/visual.h b/include/JSystem/JStudio/JStudioToolLibrary/visual.h new file mode 100644 index 0000000000..438f71592c --- /dev/null +++ b/include/JSystem/JStudio/JStudioToolLibrary/visual.h @@ -0,0 +1,125 @@ +#ifndef JSTUDIOTOOLLIBRARY_VISUAL_H +#define JSTUDIOTOOLLIBRARY_VISUAL_H + +#include "JSystem/JUtility/TColor.h" +#include "JSystem/JUtility/JUTFont.h" +#include "JSystem/J2DGraph/J2DOrthoGraph.h" + +namespace JStudioToolLibrary { + struct TRectangle { + TRectangle(); + TRectangle(int, int, int, int); + + void set(int, int, int, int); + int getBottom() const; + int getTop() const; + int getRight() const; + int getLeft() const; + int getWidth() const; + int getHeight() const; + + /* 0x00 */ int iLeft_; + /* 0x04 */ int iTop_; + /* 0x08 */ int iRight_; + /* 0x0C */ int iBottom_; + }; + + struct TDrawPrimitive2D { + TDrawPrimitive2D(); + + void setRender(J2DOrthoGraph* pOrthoGraph) { + pOrthoGraph_ = pOrthoGraph; + } + + void fillRectangle(int, int, int, int); + void setColor(const JUtility::TColor&); + void prepare(); + bool isEnabled() const; + TRectangle getRectangle() const; + void setColor(const JUtility::TColor&, const JUtility::TColor&, const JUtility::TColor&, const JUtility::TColor&); + void frameRectangle(int, int, int, int); + void setLineWidth(f32); + + /* 0x0 */ J2DOrthoGraph* pOrthoGraph_; + }; + + struct TDrawPrimitive3D { + TDrawPrimitive3D(); + + void setColor(GXColor); + void setLineWidth(f32); + void setGXState_position3f32(); + void endGX(); + void beginGX(GXPrimitive, u32); + void setGXColor(GXColor); + void setGXLineWidth(f32); + void prepare(); + void drawAxis(); + void setGXColor(); + void setGXLineWidth(); + void setGXState_position1x8(); + void drawAxis_arrow(); + void drawAxis_color(); + void setGXState_position1x8_color1x8(); + void drawAxis_color_arrow(); + void drawGrid_xyz(uint); + void setGXState_position3s16(); + void drawGrid_xy(uint); + void drawGrid_xz(uint); + void drawGrid_yz(uint); + + /* 0x0 */ f32 fLineWidth_; + /* 0x4 */ GXColor oColor_; + }; + + struct TPrint { + TPrint(); + + int getY() const; + int getX() const; + + void setFont(JUTFont* pFont) { + pFont_ = pFont; + } + + void setColor(const JUtility::TColor&); + void locate(int, int); + void prepare(); + int getFontHeight() const; + int getFontWidth() const; + bool isEnabled() const; + void processControlCharacter(int); + void print(int); + void drawCharacter(int); + void print(const char*); + void print_f(const char*, ...); + void print_f_va(const char*, va_list); + + /* 0x00 */ JUTFont* pFont_; + /* 0x04 */ int field_0x4; + /* 0x08 */ int field_0x8; + /* 0x0C */ int iX_; + /* 0x10 */ int iY_; + }; + + struct TColor_variable { + struct TVelocity { + TVelocity(const TVelocity&); + TVelocity(int, int, int, int); + + /* 0x00 */ int field_0x0; + /* 0x04 */ int field_0x4; + /* 0x08 */ int field_0x8; + /* 0x0C */ int field_0xc; + }; + + TColor_variable(const JUtility::TColor&, const TVelocity&); + void update(); + void updateValue_(u8*, int*); + + /* 0x00 */ JUtility::TColor oColor_; + /* 0x04 */ TVelocity oVelocity_; + }; +} + +#endif diff --git a/include/JSystem/JStudio/JStudio_JStage/control.h b/include/JSystem/JStudio/JStudio_JStage/control.h index 2afcf959ce..1b41039866 100644 --- a/include/JSystem/JStudio/JStudio_JStage/control.h +++ b/include/JSystem/JStudio/JStudio_JStage/control.h @@ -38,6 +38,9 @@ struct TAdaptor_object_ { void adaptor_object_begin_() { pJSGObject_->JSGFEnableFlag(1); } void adaptor_object_end_() { pJSGObject_->JSGFDisableFlag(1); } + #if VERSION == VERSION_SHIELD_DEBUG + /* 0x0 */ const JStudio::TAdaptor* pAdaptor_; + #endif /* 0x0 */ JStage::TSystem const* pJSGSystem_; /* 0x4 */ JStage::TObject* pJSGObject_; }; diff --git a/include/JSystem/JSupport/JSUIosBase.h b/include/JSystem/JSupport/JSUIosBase.h index 5164cc5a2a..64ad4dba05 100644 --- a/include/JSystem/JSupport/JSUIosBase.h +++ b/include/JSystem/JSupport/JSUIosBase.h @@ -1,7 +1,7 @@ #ifndef JSUIOSBASE_H_ #define JSUIOSBASE_H_ -#include "dolphin/types.h" +#include enum JSUStreamSeekFrom { JSUStreamSeekFrom_SET = 0, // absolute diff --git a/include/JSystem/JSupport/JSUList.h b/include/JSystem/JSupport/JSUList.h index 20e36c1525..30a28b57cf 100644 --- a/include/JSystem/JSupport/JSUList.h +++ b/include/JSystem/JSupport/JSUList.h @@ -1,7 +1,7 @@ #ifndef JSULIST_H #define JSULIST_H -#include "dolphin/types.h" +#include template class JSUList; diff --git a/include/JSystem/JUtility/JUTAssert.h b/include/JSystem/JUtility/JUTAssert.h index 81c898e6a7..5a37e2b03c 100644 --- a/include/JSystem/JUtility/JUTAssert.h +++ b/include/JSystem/JUtility/JUTAssert.h @@ -1,7 +1,7 @@ #ifndef JUTASSERT_H #define JUTASSERT_H -#include "dolphin/os.h" +#include #if DEBUG #define JUT_SHOW_ASSERT(LINE, COND) JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, #COND) diff --git a/include/JSystem/JUtility/JUTDirectFile.h b/include/JSystem/JUtility/JUTDirectFile.h index 71a0c1f21c..caebf09dd1 100644 --- a/include/JSystem/JUtility/JUTDirectFile.h +++ b/include/JSystem/JUtility/JUTDirectFile.h @@ -1,7 +1,7 @@ #ifndef JUTDIRECTFILE_H #define JUTDIRECTFILE_H -#include "dolphin/dvd.h" +#include #define JUTDF_BUFSIZE (0x800) diff --git a/include/JSystem/JUtility/JUTFontData_Ascfont_fix12.h b/include/JSystem/JUtility/JUTFontData_Ascfont_fix12.h index 98ee9ffeca..da5d500653 100644 --- a/include/JSystem/JUtility/JUTFontData_Ascfont_fix12.h +++ b/include/JSystem/JUtility/JUTFontData_Ascfont_fix12.h @@ -1,6 +1,6 @@ #ifndef JUTFONTDATA_ASCFONT_FIX12_H #define JUTFONTDATA_ASCFONT_FIX12_H -#include "dolphin/types.h" +#include #endif /* JUTFONTDATA_ASCFONT_FIX12_H */ diff --git a/include/JSystem/JUtility/JUTGraphFifo.h b/include/JSystem/JUtility/JUTGraphFifo.h index 9af2d8a0bc..8e550a4737 100644 --- a/include/JSystem/JUtility/JUTGraphFifo.h +++ b/include/JSystem/JUtility/JUTGraphFifo.h @@ -1,7 +1,7 @@ #ifndef JUTGRAPHFIFO_H #define JUTGRAPHFIFO_H -#include "dolphin/gx.h" +#include /** * @ingroup jsystem-jutility diff --git a/include/JSystem/JUtility/JUTNameTab.h b/include/JSystem/JUtility/JUTNameTab.h index 56ec079dbd..0aa772a40d 100644 --- a/include/JSystem/JUtility/JUTNameTab.h +++ b/include/JSystem/JUtility/JUTNameTab.h @@ -1,7 +1,7 @@ #ifndef JUTNAMETAB_H #define JUTNAMETAB_H -#include "dolphin/types.h" +#include /** * @ingroup jsystem-jutility diff --git a/include/JSystem/JUtility/JUTResource.h b/include/JSystem/JUtility/JUTResource.h index c0898e60b2..4a4b8e6c8c 100644 --- a/include/JSystem/JUtility/JUTResource.h +++ b/include/JSystem/JUtility/JUTResource.h @@ -1,7 +1,7 @@ #ifndef JUTRESOURCE_H #define JUTRESOURCE_H -#include "dolphin/types.h" +#include class JKRArchive; class JSUInputStream; diff --git a/include/JSystem/TPosition3.h b/include/JSystem/TPosition3.h index 5b416eb9fa..7a8094e45e 100644 --- a/include/JSystem/TPosition3.h +++ b/include/JSystem/TPosition3.h @@ -1,7 +1,7 @@ #ifndef TPOSITION3_H #define TPOSITION3_H -#include "dolphin/mtx.h" +#include #include "JSystem/JMath/JMath.h" #include "JSystem/JGeometry.h" diff --git a/include/SSystem/SComponent/c_API_controller_pad.h b/include/SSystem/SComponent/c_API_controller_pad.h index a8476b8d29..36d8fa5a1f 100644 --- a/include/SSystem/SComponent/c_API_controller_pad.h +++ b/include/SSystem/SComponent/c_API_controller_pad.h @@ -1,7 +1,7 @@ #ifndef C_API_CONTROLLER_PAD_ #define C_API_CONTROLLER_PAD_ -#include "dolphin/types.h" +#include struct interface_of_controller_pad { /* 0x00 */ f32 mMainStickPosX; @@ -35,4 +35,4 @@ struct interface_of_controller_pad { void cAPICPad_recalibrate(void); u32 cAPICPad_ANY_BUTTON(u32 param_0); -#endif \ No newline at end of file +#endif diff --git a/include/SSystem/SComponent/c_bg_s_chk.h b/include/SSystem/SComponent/c_bg_s_chk.h index 4d6a6cef3f..390a203e16 100644 --- a/include/SSystem/SComponent/c_bg_s_chk.h +++ b/include/SSystem/SComponent/c_bg_s_chk.h @@ -1,7 +1,7 @@ #ifndef C_BG_S_CHK_H #define C_BG_S_CHK_H -#include "dolphin/mtx.h" +#include #include "f_pc/f_pc_base.h" #include "SSystem/SComponent/c_bg_s_grp_pass_chk.h" #include "SSystem/SComponent/c_bg_s_poly_pass_chk.h" diff --git a/include/SSystem/SComponent/c_bg_s_poly_info.h b/include/SSystem/SComponent/c_bg_s_poly_info.h index a0fbf35aba..214118476c 100644 --- a/include/SSystem/SComponent/c_bg_s_poly_info.h +++ b/include/SSystem/SComponent/c_bg_s_poly_info.h @@ -1,7 +1,7 @@ #ifndef C_BG_S_POLY_INFO_H #define C_BG_S_POLY_INFO_H -#include "dolphin/types.h" +#include #include "f_pc/f_pc_manager.h" class cBgS_PolyInfo { diff --git a/include/SSystem/SComponent/c_bg_w.h b/include/SSystem/SComponent/c_bg_w.h index 44a271052b..85233888a6 100644 --- a/include/SSystem/SComponent/c_bg_w.h +++ b/include/SSystem/SComponent/c_bg_w.h @@ -1,7 +1,7 @@ #ifndef C_BG_W_H #define C_BG_W_H -#include "dolphin/types.h" +#include class cBgW_BgId { private: diff --git a/include/SSystem/SComponent/c_counter.h b/include/SSystem/SComponent/c_counter.h index 975824eb9e..124d623fd0 100644 --- a/include/SSystem/SComponent/c_counter.h +++ b/include/SSystem/SComponent/c_counter.h @@ -1,7 +1,7 @@ #ifndef C_COUNTER_H #define C_COUNTER_H -#include "dolphin/types.h" +#include struct counter_class { u32 mCounter0; diff --git a/include/SSystem/SComponent/c_lib.h b/include/SSystem/SComponent/c_lib.h index 4a29fb58b3..ac3d153a3d 100644 --- a/include/SSystem/SComponent/c_lib.h +++ b/include/SSystem/SComponent/c_lib.h @@ -2,7 +2,7 @@ #define C_LIB_H_ #include "SSystem/SComponent/c_xyz.h" -#include "dolphin/mtx.h" +#include #include "SSystem/SComponent/c_math.h" inline bool cLib_IsZero(f32 value) { diff --git a/include/SSystem/SComponent/c_m3d.h b/include/SSystem/SComponent/c_m3d.h index 1db37b44a8..12303b9a65 100644 --- a/include/SSystem/SComponent/c_m3d.h +++ b/include/SSystem/SComponent/c_m3d.h @@ -2,7 +2,7 @@ #define C_M3D_H_ #include -#include "dolphin/mtx.h" +#include class cM3dGAab; class cM3dGCps; diff --git a/include/SSystem/SComponent/c_m3d_g_cir.h b/include/SSystem/SComponent/c_m3d_g_cir.h index e82f19b0de..8ad96fa2a6 100644 --- a/include/SSystem/SComponent/c_m3d_g_cir.h +++ b/include/SSystem/SComponent/c_m3d_g_cir.h @@ -1,7 +1,7 @@ #ifndef C_M3D_G_CIR_H #define C_M3D_G_CIR_H -#include "dolphin/types.h" +#include class cM2dGCir { public: diff --git a/include/SSystem/SComponent/c_malloc.h b/include/SSystem/SComponent/c_malloc.h index 9016215acf..bbcff9ae68 100644 --- a/include/SSystem/SComponent/c_malloc.h +++ b/include/SSystem/SComponent/c_malloc.h @@ -1,7 +1,7 @@ #ifndef C_MALLOC_H #define C_MALLOC_H -#include "dolphin/types.h" +#include class JKRHeap; diff --git a/include/SSystem/SComponent/c_phase.h b/include/SSystem/SComponent/c_phase.h index 2c2cd09e86..8b88d2f835 100644 --- a/include/SSystem/SComponent/c_phase.h +++ b/include/SSystem/SComponent/c_phase.h @@ -1,11 +1,13 @@ #ifndef C_PHASE_H #define C_PHASE_H -#include "dolphin/types.h" +#include typedef int (*cPhs__Handler)(void*); -enum cPhs__Step { +typedef int cPhs_Step; + +enum { /* 0x0 */ cPhs_INIT_e, /* 0x1 */ cPhs_LOADING_e, /* 0x2 */ cPhs_NEXT_e, diff --git a/include/SSystem/SComponent/c_request.h b/include/SSystem/SComponent/c_request.h index 8b1b377303..22bca520e8 100644 --- a/include/SSystem/SComponent/c_request.h +++ b/include/SSystem/SComponent/c_request.h @@ -1,7 +1,7 @@ #ifndef C_REQUEST_H #define C_REQUEST_H -#include "dolphin/types.h" +#include struct request_base_class { u8 flag0 : 1; diff --git a/include/SSystem/SComponent/c_sxyz.h b/include/SSystem/SComponent/c_sxyz.h index 8b835807f3..0a2a9df11d 100644 --- a/include/SSystem/SComponent/c_sxyz.h +++ b/include/SSystem/SComponent/c_sxyz.h @@ -1,7 +1,7 @@ #ifndef C_SXYZ_H #define C_SXYZ_H -#include "dolphin/mtx.h" +#include struct SVec { s16 x, y, z; diff --git a/include/SSystem/SComponent/c_tag.h b/include/SSystem/SComponent/c_tag.h index 4c536cd7c5..9e9b4a894e 100644 --- a/include/SSystem/SComponent/c_tag.h +++ b/include/SSystem/SComponent/c_tag.h @@ -2,7 +2,7 @@ #define C_TAG_H #include "SSystem/SComponent/c_node.h" -#include "dolphin/types.h" +#include typedef struct node_list_class node_list_class; typedef struct node_lists_tree_class node_lists_tree_class; diff --git a/include/SSystem/SComponent/c_xyz.h b/include/SSystem/SComponent/c_xyz.h index 23b059be98..7876d12c3c 100644 --- a/include/SSystem/SComponent/c_xyz.h +++ b/include/SSystem/SComponent/c_xyz.h @@ -1,7 +1,7 @@ #ifndef C_XYZ_H #define C_XYZ_H -#include "dolphin/mtx.h" +#include #include struct cXyz : Vec { diff --git a/include/SSystem/SStandard/s_basic.h b/include/SSystem/SStandard/s_basic.h index 3fea9ad699..d173a0bc77 100644 --- a/include/SSystem/SStandard/s_basic.h +++ b/include/SSystem/SStandard/s_basic.h @@ -1,7 +1,7 @@ #ifndef S_BASIC_H #define S_BASIC_H -#include "dolphin/types.h" +#include void sBs_FillArea_s(void* pPtr, u32 pNumBytes, s16 pValue); void sBs_ClearArea(void* pPtr, u32 pNumBytes); diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h index 19a35ab676..64312808a0 100644 --- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h +++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/dispatch.h @@ -1,7 +1,7 @@ #ifndef METROTRK_PORTABLE_DISPATCH_H #define METROTRK_PORTABLE_DISPATCH_H -#include "dolphin/types.h" +#include #ifdef __cplusplus extern "C" { diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mem_TRK.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mem_TRK.h index 135e1275b1..924fb5ee29 100644 --- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mem_TRK.h +++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mem_TRK.h @@ -1,7 +1,7 @@ #ifndef METROTRK_PORTABLE_MEM_TRK_H #define METROTRK_PORTABLE_MEM_TRK_H -#include "dolphin/types.h" +#include void* TRK_memset(void* dest, int val, size_t count); void* TRK_memcpy(void* dest, const void* src, size_t count); diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h index c2a697ce45..debc035386 100644 --- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h +++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/msg.h @@ -1,7 +1,7 @@ #ifndef METROTRK_PORTABLE_MSG_H #define METROTRK_PORTABLE_MSG_H -#include "dolphin/types.h" +#include typedef struct _TRK_Msg { u8 _00[8]; diff --git a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mutex_TRK.h b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mutex_TRK.h index d491ced086..fe34214e6e 100644 --- a/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mutex_TRK.h +++ b/include/TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mutex_TRK.h @@ -1,7 +1,7 @@ #ifndef METROTRK_PORTABLE_MUTEX_TRK_H #define METROTRK_PORTABLE_MUTEX_TRK_H -#include "revolution/types.h" +#include u8 TRKReleaseMutex(); u8 TRKAcquireMutex(); diff --git a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/UDP_Stubs.h b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/UDP_Stubs.h index 8ac33304df..1c64630181 100644 --- a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/UDP_Stubs.h +++ b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/UDP_Stubs.h @@ -1,7 +1,7 @@ #ifndef OS_DOLPHIN_UDP_STUBS_H #define OS_DOLPHIN_UDP_STUBS_H -#include "dolphin/os.h" +#include #ifdef __cplusplus extern "C" { diff --git a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h index 24f44107b0..f205a32590 100644 --- a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h +++ b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/dolphin_trk_glue.h @@ -1,7 +1,7 @@ #ifndef OS_DOLPHIN_DOLPHIN_TRK_GLUE_H #define OS_DOLPHIN_DOLPHIN_TRK_GLUE_H -#include "dolphin/os.h" +#include #include "trk.h" #ifdef __cplusplus diff --git a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/target_options.h b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/target_options.h index c77c54b2b3..473eca26f5 100644 --- a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/target_options.h +++ b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/target_options.h @@ -1,7 +1,7 @@ #ifndef OS_DOLPHIN_TARGET_OPTIONS_H #define OS_DOLPHIN_TARGET_OPTIONS_H -#include "dolphin/types.h" +#include #ifdef __cplusplus extern "C" { diff --git a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/usr_put.h b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/usr_put.h index 87091d4b2b..7bccc876ee 100644 --- a/include/TRK_MINNOW_DOLPHIN/Os/dolphin/usr_put.h +++ b/include/TRK_MINNOW_DOLPHIN/Os/dolphin/usr_put.h @@ -1,6 +1,6 @@ #ifndef OS_DOLPHIN_USR_PUT_H #define OS_DOLPHIN_USR_PUT_H -#include "dolphin/types.h" +#include #endif /* OS_DOLPHIN_USR_PUT_H */ diff --git a/include/TRK_MINNOW_DOLPHIN/ppc/Export/targsupp.h b/include/TRK_MINNOW_DOLPHIN/ppc/Export/targsupp.h index bf0e9b9287..3fc0ee3cb8 100644 --- a/include/TRK_MINNOW_DOLPHIN/ppc/Export/targsupp.h +++ b/include/TRK_MINNOW_DOLPHIN/ppc/Export/targsupp.h @@ -1,7 +1,7 @@ #ifndef PPC_EXPORT_TARGSUPP_H #define PPC_EXPORT_TARGSUPP_H -#include "dolphin/types.h" +#include #ifdef __cplusplus extern "C" { diff --git a/include/TRK_MINNOW_DOLPHIN/utils/common/CircleBuffer.h b/include/TRK_MINNOW_DOLPHIN/utils/common/CircleBuffer.h index 4bea021090..5bb30fbde1 100644 --- a/include/TRK_MINNOW_DOLPHIN/utils/common/CircleBuffer.h +++ b/include/TRK_MINNOW_DOLPHIN/utils/common/CircleBuffer.h @@ -1,7 +1,7 @@ #ifndef UTILS_COMMON_CIRCLEBUFFER_H #define UTILS_COMMON_CIRCLEBUFFER_H -#include "dolphin/types.h" +#include #ifdef __cplusplus extern "C" { diff --git a/include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h b/include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h index 35f9bb2fd0..7c38df3192 100644 --- a/include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h +++ b/include/TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h @@ -1,7 +1,7 @@ #ifndef UTILS_COMMON_MWTRACE_H #define UTILS_COMMON_MWTRACE_H -#include "dolphin/types.h" +#include void MWTRACE(u8, char*, ...); diff --git a/include/TRK_MINNOW_DOLPHIN/utils/gc/MWCriticalSection_gc.h b/include/TRK_MINNOW_DOLPHIN/utils/gc/MWCriticalSection_gc.h index f5fcf67f0c..bf2586b403 100644 --- a/include/TRK_MINNOW_DOLPHIN/utils/gc/MWCriticalSection_gc.h +++ b/include/TRK_MINNOW_DOLPHIN/utils/gc/MWCriticalSection_gc.h @@ -1,7 +1,7 @@ #ifndef UTILS_GC_MWCRITICALSECTION_GC_H #define UTILS_GC_MWCRITICALSECTION_GC_H -#include "dolphin/types.h" +#include #ifdef __cplusplus extern "C" { diff --git a/include/Z2AudioLib/Z2AudioCS.h b/include/Z2AudioLib/Z2AudioCS.h index 226e77867b..75584e9fdc 100644 --- a/include/Z2AudioLib/Z2AudioCS.h +++ b/include/Z2AudioLib/Z2AudioCS.h @@ -1,7 +1,7 @@ #ifndef Z2AUDIOCS_H #define Z2AUDIOCS_H -#include "dolphin/types.h" +#include class JKRHeap; class JKRArchive; diff --git a/include/Z2AudioLib/Z2Calc.h b/include/Z2AudioLib/Z2Calc.h index 883262ab40..db6e0561c8 100644 --- a/include/Z2AudioLib/Z2Calc.h +++ b/include/Z2AudioLib/Z2Calc.h @@ -1,7 +1,7 @@ #ifndef Z2CALC_H #define Z2CALC_H -#include "dolphin/types.h" +#include #include "m_Do/m_Do_lib.h" namespace Z2Calc { diff --git a/include/Z2AudioLib/Z2Param.h b/include/Z2AudioLib/Z2Param.h index aceb09ce97..c0d2bf53c7 100644 --- a/include/Z2AudioLib/Z2Param.h +++ b/include/Z2AudioLib/Z2Param.h @@ -1,7 +1,7 @@ #ifndef Z2PARAM_H #define Z2PARAM_H -#include "dolphin/types.h" +#include struct Z2Param { static f32 DISTANCE_MAX; diff --git a/include/d/actor/d_a_arrow.h b/include/d/actor/d_a_arrow.h index 23e476aaef..66b4a9d901 100644 --- a/include/d/actor/d_a_arrow.h +++ b/include/d/actor/d_a_arrow.h @@ -53,7 +53,7 @@ public: int procSlingHit(); int execute(); int draw(); - cPhs__Step create(); + cPhs_Step create(); ~daArrow_c(); void setBombArrowExplode() { field_0x950 = 0; } diff --git a/include/d/actor/d_a_b_ds.h b/include/d/actor/d_a_b_ds.h index 10b09546a2..d7dd03a90b 100644 --- a/include/d/actor/d_a_b_ds.h +++ b/include/d/actor/d_a_b_ds.h @@ -175,7 +175,7 @@ public: int execute(); int _delete(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); daB_DS_c(); cXyz getHandPosR(); diff --git a/include/d/actor/d_a_b_yo.h b/include/d/actor/d_a_b_yo.h index d215bdacc9..b4cef6d648 100644 --- a/include/d/actor/d_a_b_yo.h +++ b/include/d/actor/d_a_b_yo.h @@ -65,7 +65,7 @@ public: int _delete(); int CreateHeap(); int CreateHeap2(); - cPhs__Step create(); + cPhs_Step create(); u8 getModelNo() { return mModelNo; } s16 getFrizadRollAngle() { return mIceAngle; } diff --git a/include/d/actor/d_a_b_yo_ice.h b/include/d/actor/d_a_b_yo_ice.h index 32286929c7..2ad2e5388d 100644 --- a/include/d/actor/d_a_b_yo_ice.h +++ b/include/d/actor/d_a_b_yo_ice.h @@ -46,7 +46,7 @@ public: int execute(); int _delete(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); daB_YOI_c(); void setSubNumber(int i_subNumber) { mSubNumber = i_subNumber; } diff --git a/include/d/actor/d_a_balloon_2D.h b/include/d/actor/d_a_balloon_2D.h index d22e69d973..cf8a24116b 100644 --- a/include/d/actor/d_a_balloon_2D.h +++ b/include/d/actor/d_a_balloon_2D.h @@ -1,7 +1,7 @@ #ifndef D_A_BALLOON_2D_H #define D_A_BALLOON_2D_H -#include "dolphin/types.h" +#include #include "f_op/f_op_actor.h" #include "SSystem/SComponent/c_phase.h" #include "d/d_drawlist.h" diff --git a/include/d/actor/d_a_door_boss.h b/include/d/actor/d_a_door_boss.h index 9ec069ce3d..ed7afe97d4 100644 --- a/include/d/actor/d_a_door_boss.h +++ b/include/d/actor/d_a_door_boss.h @@ -31,7 +31,7 @@ public: int CreateHeap(); void calcMtx(); int CreateInit(); - cPhs__Step create(); + cPhs_Step create(); int getDemoAction(); void demoProc(); void calcGoal(cXyz*, int); diff --git a/include/d/actor/d_a_door_bossL1.h b/include/d/actor/d_a_door_bossL1.h index 855cda204f..81d9f5b844 100644 --- a/include/d/actor/d_a_door_bossL1.h +++ b/include/d/actor/d_a_door_bossL1.h @@ -1,7 +1,7 @@ #ifndef D_A_DOOR_BOSSL1_H #define D_A_DOOR_BOSSL1_H -#include "dolphin/types.h" +#include #include "f_op/f_op_actor.h" #include "d/d_bg_w.h" #include "d/d_bg_s_acch.h" diff --git a/include/d/actor/d_a_door_bossL5.h b/include/d/actor/d_a_door_bossL5.h index e980dcb7d3..11e7bf7843 100644 --- a/include/d/actor/d_a_door_bossL5.h +++ b/include/d/actor/d_a_door_bossL5.h @@ -1,7 +1,7 @@ #ifndef D_A_DOOR_BOSSL5_H #define D_A_DOOR_BOSSL5_H -#include "dolphin/types.h" +#include #include "f_op/f_op_actor.h" #include "SSystem/SComponent/c_phase.h" #include "d/d_bg_w.h" diff --git a/include/d/actor/d_a_door_mbossL1.h b/include/d/actor/d_a_door_mbossL1.h index 71b8a18514..ce2be23aa0 100644 --- a/include/d/actor/d_a_door_mbossL1.h +++ b/include/d/actor/d_a_door_mbossL1.h @@ -1,7 +1,7 @@ #ifndef D_A_DOOR_MBOSSL1_H #define D_A_DOOR_MBOSSL1_H -#include "dolphin/types.h" +#include #include "f_op/f_op_actor.h" #include "SSystem/SComponent/c_phase.h" #include "d/d_bg_w.h" diff --git a/include/d/actor/d_a_door_shutter.h b/include/d/actor/d_a_door_shutter.h index c414a8e585..5df7c2f4af 100644 --- a/include/d/actor/d_a_door_shutter.h +++ b/include/d/actor/d_a_door_shutter.h @@ -1,7 +1,7 @@ #ifndef D_A_DOOR_SHUTTER_H #define D_A_DOOR_SHUTTER_H -#include "dolphin/types.h" +#include #include "f_op/f_op_actor.h" #include "SSystem/SComponent/c_phase.h" #include "d/d_bg_w.h" diff --git a/include/d/actor/d_a_e_db_leaf.h b/include/d/actor/d_a_e_db_leaf.h index 7072c2d2e8..2a19d4b01b 100644 --- a/include/d/actor/d_a_e_db_leaf.h +++ b/include/d/actor/d_a_e_db_leaf.h @@ -2,7 +2,7 @@ #define D_A_E_DB_LEAF_H #include "d/d_com_inf_game.h" -#include "dolphin/types.h" +#include /** * @ingroup actors-enemies diff --git a/include/d/actor/d_a_e_dt.h b/include/d/actor/d_a_e_dt.h index 9eb4e2c8e3..1296a78e5b 100644 --- a/include/d/actor/d_a_e_dt.h +++ b/include/d/actor/d_a_e_dt.h @@ -74,7 +74,7 @@ public: int execute(); int _delete(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); bool isFlyingAttack() { return mFlyingAttack; } bool isFlyingAttackLand() { return mFlyingAttackLand; } diff --git a/include/d/actor/d_a_e_fb.h b/include/d/actor/d_a_e_fb.h index 7388ff15f2..3e8734b8b6 100644 --- a/include/d/actor/d_a_e_fb.h +++ b/include/d/actor/d_a_e_fb.h @@ -37,7 +37,7 @@ public: int execute(); int _delete(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); daE_FB_c(); private: diff --git a/include/d/actor/d_a_e_gm.h b/include/d/actor/d_a_e_gm.h index d5e03ac68c..370dea9150 100644 --- a/include/d/actor/d_a_e_gm.h +++ b/include/d/actor/d_a_e_gm.h @@ -51,7 +51,7 @@ public: int execute(); int _delete(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); void InstantKill() { field_0xa76 = 1; } u8 CheckDeath() { return field_0xa68; } diff --git a/include/d/actor/d_a_e_oc.h b/include/d/actor/d_a_e_oc.h index c3306376fd..ada1b5310b 100644 --- a/include/d/actor/d_a_e_oc.h +++ b/include/d/actor/d_a_e_oc.h @@ -77,7 +77,7 @@ public: int execute(); int _delete(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); bool isHomeWait() { return mIsHomeWait; } bool isBattleOn() { return mBattleOn; } diff --git a/include/d/actor/d_a_e_oct_bg.h b/include/d/actor/d_a_e_oct_bg.h index 1bb57b1bed..7c54d6e84b 100644 --- a/include/d/actor/d_a_e_oct_bg.h +++ b/include/d/actor/d_a_e_oct_bg.h @@ -1,7 +1,7 @@ #ifndef D_A_E_OCT_BG_H #define D_A_E_OCT_BG_H -#include "dolphin/types.h" +#include #include "f_op/f_op_actor.h" #include "d/d_bg_s_acch.h" #include "Z2AudioLib/Z2Creature.h" diff --git a/include/d/actor/d_a_e_ot.h b/include/d/actor/d_a_e_ot.h index 7fd5ecef59..54e8399b7b 100644 --- a/include/d/actor/d_a_e_ot.h +++ b/include/d/actor/d_a_e_ot.h @@ -38,7 +38,7 @@ public: int execute(); int _delete(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int getChildNo() { return mChildNo; } int getActionMode() { return mAction; } diff --git a/include/d/actor/d_a_e_pm.h b/include/d/actor/d_a_e_pm.h index bafc71cc88..9077a4d56d 100644 --- a/include/d/actor/d_a_e_pm.h +++ b/include/d/actor/d_a_e_pm.h @@ -77,7 +77,7 @@ public: void setGakkiBaseMtx(); void setLampBaseMtx(); void SkipChk(); - cPhs__Step Create(); + cPhs_Step Create(); void AppearSet() { mAppear = true; } u8 ActionChk() { return mPuppetDelete; } diff --git a/include/d/actor/d_a_e_sb.h b/include/d/actor/d_a_e_sb.h index e72f74ea27..e015ecc5bc 100644 --- a/include/d/actor/d_a_e_sb.h +++ b/include/d/actor/d_a_e_sb.h @@ -56,7 +56,7 @@ public: int Draw(); int Delete(); void setBaseMtx(); - cPhs__Step Create(); + cPhs_Step Create(); private: /* 0x5AC */ int field_0x5ac; /* 0x5B0 */ int field_0x5b0; diff --git a/include/d/actor/d_a_e_sm.h b/include/d/actor/d_a_e_sm.h index b20115910a..d19294eafb 100644 --- a/include/d/actor/d_a_e_sm.h +++ b/include/d/actor/d_a_e_sm.h @@ -55,7 +55,7 @@ public: int Delete(); int CreateHeap(); void initCoSph(); - cPhs__Step Create(); + cPhs_Step Create(); daE_SM_c(); /* 0x05AC */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_e_sw.h b/include/d/actor/d_a_e_sw.h index 46cebe726a..b073dae952 100644 --- a/include/d/actor/d_a_e_sw.h +++ b/include/d/actor/d_a_e_sw.h @@ -55,7 +55,7 @@ public: int execute(); int _delete(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); void d_setAction(void (daE_SW_c::*)()); void d_checkFall(); void d_damage_check(); diff --git a/include/d/actor/d_a_e_ymb.h b/include/d/actor/d_a_e_ymb.h index c6f8ae695d..6f804bb05c 100644 --- a/include/d/actor/d_a_e_ymb.h +++ b/include/d/actor/d_a_e_ymb.h @@ -78,7 +78,7 @@ public: int execute(); int _delete(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int getMaxLockAttack() { return 6; } u8 getSwitchBit() { return mSwitchBit; } diff --git a/include/d/actor/d_a_e_zh.h b/include/d/actor/d_a_e_zh.h index 8fd29035e8..0c184acc5d 100644 --- a/include/d/actor/d_a_e_zh.h +++ b/include/d/actor/d_a_e_zh.h @@ -52,7 +52,7 @@ public: int execute(); int _delete(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); daE_ZH_c(); /* 0x5AC */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_e_zm.h b/include/d/actor/d_a_e_zm.h index 8c5ce67fcd..ef79e25933 100644 --- a/include/d/actor/d_a_e_zm.h +++ b/include/d/actor/d_a_e_zm.h @@ -35,7 +35,7 @@ public: int execute(); int _delete(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); /* 0x5AC */ request_of_phase_process_class mPhase; /* 0x5B4 */ mDoExt_McaMorfSO* mpModelMorf; diff --git a/include/d/actor/d_a_fr.h b/include/d/actor/d_a_fr.h index 67f87f137b..cf44361b89 100644 --- a/include/d/actor/d_a_fr.h +++ b/include/d/actor/d_a_fr.h @@ -4,7 +4,7 @@ #include "d/d_bg_s_acch.h" #include "d/d_cc_d.h" #include "d/d_msg_flow.h" -#include "dolphin/types.h" +#include #include "SSystem/SComponent/c_phase.h" #include "f_op/f_op_actor_mng.h" diff --git a/include/d/actor/d_a_kytag12.h b/include/d/actor/d_a_kytag12.h index fdfe133898..a043aafaad 100644 --- a/include/d/actor/d_a_kytag12.h +++ b/include/d/actor/d_a_kytag12.h @@ -1,7 +1,7 @@ #ifndef D_A_KYTAG12_H #define D_A_KYTAG12_H -#include "dolphin/types.h" +#include #include "f_op/f_op_actor_mng.h" /** diff --git a/include/d/actor/d_a_kytag13.h b/include/d/actor/d_a_kytag13.h index 9a4916f903..e03d9c579c 100644 --- a/include/d/actor/d_a_kytag13.h +++ b/include/d/actor/d_a_kytag13.h @@ -1,7 +1,7 @@ #ifndef D_A_KYTAG13_H #define D_A_KYTAG13_H -#include "dolphin/types.h" +#include #include "f_op/f_op_actor_mng.h" /** diff --git a/include/d/actor/d_a_midna.h b/include/d/actor/d_a_midna.h index a4f6bba546..c9e84ee9d4 100644 --- a/include/d/actor/d_a_midna.h +++ b/include/d/actor/d_a_midna.h @@ -253,7 +253,7 @@ public: int initInvModel(u16, J3DModel**, mDoExt_invisibleModel*, u32); int initDemoModel(J3DModel**, char const*, u32); int createHeap(); - cPhs__Step create(); + cPhs_Step create(); void allAnimePlay(); void setMatrix(); void setBodyPartMatrix(); diff --git a/include/d/actor/d_a_npc_aru.h b/include/d/actor/d_a_npc_aru.h index 20a6df5379..8259741d13 100644 --- a/include/d/actor/d_a_npc_aru.h +++ b/include/d/actor/d_a_npc_aru.h @@ -94,7 +94,7 @@ public: typedef int (daNpc_Aru_c::*cutFunc)(int); ~daNpc_Aru_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_ash.h b/include/d/actor/d_a_npc_ash.h index 62d9fce84f..084569a66e 100644 --- a/include/d/actor/d_a_npc_ash.h +++ b/include/d/actor/d_a_npc_ash.h @@ -96,7 +96,7 @@ public: public: daNpcAsh_c(); ~daNpcAsh_c(); - cPhs__Step Create(); + cPhs_Step Create(); BOOL CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_ashB.h b/include/d/actor/d_a_npc_ashB.h index 300d21b224..cbba17f4c5 100644 --- a/include/d/actor/d_a_npc_ashB.h +++ b/include/d/actor/d_a_npc_ashB.h @@ -100,7 +100,7 @@ public: public: daNpcAshB_c(); ~daNpcAshB_c(); - cPhs__Step Create(); + cPhs_Step Create(); BOOL CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_bans.h b/include/d/actor/d_a_npc_bans.h index 4826be2789..7c60822f5e 100644 --- a/include/d/actor/d_a_npc_bans.h +++ b/include/d/actor/d_a_npc_bans.h @@ -45,7 +45,7 @@ public: typedef int (daNpc_Bans_c::*cutFunc)(int); ~daNpc_Bans_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_bouS.h b/include/d/actor/d_a_npc_bouS.h index ff4f23700e..bd3b1ff0b6 100644 --- a/include/d/actor/d_a_npc_bouS.h +++ b/include/d/actor/d_a_npc_bouS.h @@ -53,7 +53,7 @@ public: daNpcBouS_c(); ~daNpcBouS_c(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_cd2.h b/include/d/actor/d_a_npc_cd2.h index b306e36daa..85ec30b4e2 100644 --- a/include/d/actor/d_a_npc_cd2.h +++ b/include/d/actor/d_a_npc_cd2.h @@ -5,7 +5,7 @@ #include "d/actor/d_a_tag_escape.h" #include "d/d_npc_lib.h" #include "d/d_path.h" -#include "dolphin/types.h" +#include enum { MdlMANa_e = 0, diff --git a/include/d/actor/d_a_npc_chat.h b/include/d/actor/d_a_npc_chat.h index 1e959b4bde..67814c27cc 100644 --- a/include/d/actor/d_a_npc_chat.h +++ b/include/d/actor/d_a_npc_chat.h @@ -49,13 +49,13 @@ public: J3DModel* ObjCreate(int); J3DModel* ChairCreate(f32); bool isM_(); - cPhs__Step loadResrc(int, int); + cPhs_Step loadResrc(int, int); J3DModelData* getNpcMdlDataP(int); J3DModelData* getObjMdlDataP(int); J3DAnmTexPattern* getTexAnmP(int); BOOL removeResrc(int, int); BOOL setAttention(int); - cPhs__Step Create(); + cPhs_Step Create(); BOOL CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_coach.h b/include/d/actor/d_a_npc_coach.h index 8d6a2446a7..d5ee60e2cf 100644 --- a/include/d/actor/d_a_npc_coach.h +++ b/include/d/actor/d_a_npc_coach.h @@ -245,7 +245,7 @@ public: void calcHorsePath(); int draw(); ~daNpcCoach_c(); - cPhs__Step create(); + cPhs_Step create(); void create_init(); inline void initCollision(); void initBaseMtx(); diff --git a/include/d/actor/d_a_npc_doorboy.h b/include/d/actor/d_a_npc_doorboy.h index 536f0d0961..cc7261d64c 100644 --- a/include/d/actor/d_a_npc_doorboy.h +++ b/include/d/actor/d_a_npc_doorboy.h @@ -45,7 +45,7 @@ public: daNpcDoorBoy_c(); ~daNpcDoorBoy_c(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_fairy.h b/include/d/actor/d_a_npc_fairy.h index 09bed565c5..3ab5901281 100644 --- a/include/d/actor/d_a_npc_fairy.h +++ b/include/d/actor/d_a_npc_fairy.h @@ -161,7 +161,7 @@ public: typedef int (daNpc_Fairy_c::*cutFunc)(int); ~daNpc_Fairy_c(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); void setAnmData(); bool setMotionAnm(int, f32, int); diff --git a/include/d/actor/d_a_npc_fguard.h b/include/d/actor/d_a_npc_fguard.h index 9a062bdf14..4c2eddb877 100644 --- a/include/d/actor/d_a_npc_fguard.h +++ b/include/d/actor/d_a_npc_fguard.h @@ -16,7 +16,7 @@ class daNpcFgd_c : public daNpcCd2_c { public: void initPosAngle(Vec&, s16); - cPhs__Step create(); + cPhs_Step create(); void create_init(); inline virtual ~daNpcFgd_c(); diff --git a/include/d/actor/d_a_npc_grc.h b/include/d/actor/d_a_npc_grc.h index 2342adcd8e..0375dbd17f 100644 --- a/include/d/actor/d_a_npc_grc.h +++ b/include/d/actor/d_a_npc_grc.h @@ -47,7 +47,7 @@ public: daNpc_grC_c(); ~daNpc_grC_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_grm.h b/include/d/actor/d_a_npc_grm.h index e3e6f1f45a..866c4f342e 100644 --- a/include/d/actor/d_a_npc_grm.h +++ b/include/d/actor/d_a_npc_grm.h @@ -82,7 +82,7 @@ public: }; ~daNpc_grM_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_grmc.h b/include/d/actor/d_a_npc_grmc.h index 7d1bef1381..b5c72e7d10 100644 --- a/include/d/actor/d_a_npc_grmc.h +++ b/include/d/actor/d_a_npc_grmc.h @@ -74,7 +74,7 @@ public: typedef int (daNpc_grMC_c::*actionFunc)(void*); ~daNpc_grMC_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_gro.h b/include/d/actor/d_a_npc_gro.h index 259e188df6..f83cf1957a 100644 --- a/include/d/actor/d_a_npc_gro.h +++ b/include/d/actor/d_a_npc_gro.h @@ -44,7 +44,7 @@ public: daNpc_grO_c(); ~daNpc_grO_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_grr.h b/include/d/actor/d_a_npc_grr.h index 4dfed0b3fe..0fdd240f9b 100644 --- a/include/d/actor/d_a_npc_grr.h +++ b/include/d/actor/d_a_npc_grr.h @@ -45,7 +45,7 @@ public: typedef int (daNpc_grR_c::*actionFunc)(void*); daNpc_grR_c(); ~daNpc_grR_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_grz.h b/include/d/actor/d_a_npc_grz.h index 08ac9889bf..d7c947f19e 100644 --- a/include/d/actor/d_a_npc_grz.h +++ b/include/d/actor/d_a_npc_grz.h @@ -64,7 +64,7 @@ public: daNpc_Grz_c(); ~daNpc_Grz_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_gwolf.h b/include/d/actor/d_a_npc_gwolf.h index 2bcab4be53..adcdb75adb 100644 --- a/include/d/actor/d_a_npc_gwolf.h +++ b/include/d/actor/d_a_npc_gwolf.h @@ -53,7 +53,7 @@ public: typedef BOOL (daNpc_GWolf_c::*cutFunc)(int); daNpc_GWolf_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_ins.h b/include/d/actor/d_a_npc_ins.h index 20e960a414..0437a01e30 100644 --- a/include/d/actor/d_a_npc_ins.h +++ b/include/d/actor/d_a_npc_ins.h @@ -52,7 +52,7 @@ public: daNpcIns_c(); ~daNpcIns_c(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_kasi_hana.h b/include/d/actor/d_a_npc_kasi_hana.h index f1a3bd534b..54b0cf914b 100644 --- a/include/d/actor/d_a_npc_kasi_hana.h +++ b/include/d/actor/d_a_npc_kasi_hana.h @@ -123,7 +123,7 @@ public: daNpcKasiHana_c(); ~daNpcKasiHana_c(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_kasi_kyu.h b/include/d/actor/d_a_npc_kasi_kyu.h index bbf2f10238..9ca549e46c 100644 --- a/include/d/actor/d_a_npc_kasi_kyu.h +++ b/include/d/actor/d_a_npc_kasi_kyu.h @@ -47,7 +47,7 @@ public: daNpcKasiKyu_c(); ~daNpcKasiKyu_c(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_kasi_mich.h b/include/d/actor/d_a_npc_kasi_mich.h index 1237167f6a..9f38d3dd1c 100644 --- a/include/d/actor/d_a_npc_kasi_mich.h +++ b/include/d/actor/d_a_npc_kasi_mich.h @@ -48,7 +48,7 @@ public: daNpcKasiMich_c(); ~daNpcKasiMich_c(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_kolin.h b/include/d/actor/d_a_npc_kolin.h index a96d77648a..314a29541b 100644 --- a/include/d/actor/d_a_npc_kolin.h +++ b/include/d/actor/d_a_npc_kolin.h @@ -51,7 +51,7 @@ public: typedef int (daNpc_Kolin_c::*actionFunc)(void*); ~daNpc_Kolin_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_kolinb.h b/include/d/actor/d_a_npc_kolinb.h index 28291b5943..cea3e7a3e2 100644 --- a/include/d/actor/d_a_npc_kolinb.h +++ b/include/d/actor/d_a_npc_kolinb.h @@ -99,7 +99,7 @@ public: typedef int (daNpc_Kolinb_c::*actionFunc)(void*); ~daNpc_Kolinb_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_moir.h b/include/d/actor/d_a_npc_moir.h index 59f1d27aa7..0cc8be336a 100644 --- a/include/d/actor/d_a_npc_moir.h +++ b/include/d/actor/d_a_npc_moir.h @@ -145,7 +145,7 @@ public: daNpcMoiR_c(); ~daNpcMoiR_c(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_pachi_besu.h b/include/d/actor/d_a_npc_pachi_besu.h index c01375b7f4..2dd99f1b98 100644 --- a/include/d/actor/d_a_npc_pachi_besu.h +++ b/include/d/actor/d_a_npc_pachi_besu.h @@ -45,7 +45,7 @@ public: typedef BOOL (daNpc_Pachi_Besu_c::*cutFunc)(int); ~daNpc_Pachi_Besu_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_pachi_maro.h b/include/d/actor/d_a_npc_pachi_maro.h index 781621dcf7..716e599ffd 100644 --- a/include/d/actor/d_a_npc_pachi_maro.h +++ b/include/d/actor/d_a_npc_pachi_maro.h @@ -77,7 +77,7 @@ public: typedef int (daNpc_Pachi_Maro_c::*cutFunc)(int); ~daNpc_Pachi_Maro_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_pachi_taro.h b/include/d/actor/d_a_npc_pachi_taro.h index daccafb1b8..b9c24cde8c 100644 --- a/include/d/actor/d_a_npc_pachi_taro.h +++ b/include/d/actor/d_a_npc_pachi_taro.h @@ -78,7 +78,7 @@ public: typedef int (daNpc_Pachi_Taro_c::*cutFunc)(int); ~daNpc_Pachi_Taro_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_passer.h b/include/d/actor/d_a_npc_passer.h index 32cf74c582..f6c05ae7a5 100644 --- a/include/d/actor/d_a_npc_passer.h +++ b/include/d/actor/d_a_npc_passer.h @@ -29,7 +29,7 @@ public: ~daNpcPasser_c(); int createHeap(); - cPhs__Step create(); + cPhs_Step create(); int execute(); int draw(); void setAction(daNpcPasser_c::Mode_e); diff --git a/include/d/actor/d_a_npc_passer2.h b/include/d/actor/d_a_npc_passer2.h index c777c254fc..529b99fc35 100644 --- a/include/d/actor/d_a_npc_passer2.h +++ b/include/d/actor/d_a_npc_passer2.h @@ -28,7 +28,7 @@ public: void executePath(); void setAngle(); void pathMoveF(); - cPhs__Step create(); + cPhs_Step create(); void create_init(); inline ~daNpcPasser2_c(); diff --git a/include/d/actor/d_a_npc_post.h b/include/d/actor/d_a_npc_post.h index 0119805647..91b6396ed8 100644 --- a/include/d/actor/d_a_npc_post.h +++ b/include/d/actor/d_a_npc_post.h @@ -83,7 +83,7 @@ public: typedef int (daNpc_Post_c::*cutFunc)(int); ~daNpc_Post_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_raca.h b/include/d/actor/d_a_npc_raca.h index abeb1e6572..42a3229e8f 100644 --- a/include/d/actor/d_a_npc_raca.h +++ b/include/d/actor/d_a_npc_raca.h @@ -84,7 +84,7 @@ public: typedef int (daNpc_Raca_c::*cutFunc)(int); ~daNpc_Raca_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_seirei.h b/include/d/actor/d_a_npc_seirei.h index c23f7ed4de..8e42d1a035 100644 --- a/include/d/actor/d_a_npc_seirei.h +++ b/include/d/actor/d_a_npc_seirei.h @@ -47,7 +47,7 @@ public: typedef BOOL (daNpc_Seirei_c::*cutFunc)(int); ~daNpc_Seirei_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_shad.h b/include/d/actor/d_a_npc_shad.h index 2168beca28..0afc724746 100644 --- a/include/d/actor/d_a_npc_shad.h +++ b/include/d/actor/d_a_npc_shad.h @@ -140,7 +140,7 @@ public: daNpcShad_c(); virtual ~daNpcShad_c(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_shaman.h b/include/d/actor/d_a_npc_shaman.h index 68bddcc500..5f0a26b52f 100644 --- a/include/d/actor/d_a_npc_shaman.h +++ b/include/d/actor/d_a_npc_shaman.h @@ -44,7 +44,7 @@ public: typedef BOOL (daNpc_Sha_c::*queryFunc)(); ~daNpc_Sha_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_shoe.h b/include/d/actor/d_a_npc_shoe.h index f706159d7a..0b96f8567b 100644 --- a/include/d/actor/d_a_npc_shoe.h +++ b/include/d/actor/d_a_npc_shoe.h @@ -62,7 +62,7 @@ public: daNpcShoe_c(); ~daNpcShoe_c(); - cPhs__Step Create(); + cPhs_Step Create(); BOOL CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_soldierA.h b/include/d/actor/d_a_npc_soldierA.h index d8e9ce3cbf..cc841c7092 100644 --- a/include/d/actor/d_a_npc_soldierA.h +++ b/include/d/actor/d_a_npc_soldierA.h @@ -44,7 +44,7 @@ public: daNpc_SoldierA_c(); ~daNpc_SoldierA_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_soldierB.h b/include/d/actor/d_a_npc_soldierB.h index 5f2f222b30..6e864b0cd2 100644 --- a/include/d/actor/d_a_npc_soldierB.h +++ b/include/d/actor/d_a_npc_soldierB.h @@ -43,7 +43,7 @@ public: daNpc_SoldierB_c(); ~daNpc_SoldierB_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_the.h b/include/d/actor/d_a_npc_the.h index 9bf13dbfef..6e9a24d42b 100644 --- a/include/d/actor/d_a_npc_the.h +++ b/include/d/actor/d_a_npc_the.h @@ -129,7 +129,7 @@ public: BOOL test(void*); BOOL EvCut_TwResistance(int); BOOL EvCut_Introduction(int); - cPhs__Step create(); + cPhs_Step create(); void reset(); /* inline */ inline int Draw(); inline void setParam(); diff --git a/include/d/actor/d_a_npc_theB.h b/include/d/actor/d_a_npc_theB.h index 0eb8ab4db5..9179ddd652 100644 --- a/include/d/actor/d_a_npc_theB.h +++ b/include/d/actor/d_a_npc_theB.h @@ -80,7 +80,7 @@ public: daNpcTheB_c(); ~daNpcTheB_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_tkc.h b/include/d/actor/d_a_npc_tkc.h index 20f6852ed8..ab2c871be2 100644 --- a/include/d/actor/d_a_npc_tkc.h +++ b/include/d/actor/d_a_npc_tkc.h @@ -59,7 +59,7 @@ public: daNpcTkc_c(); ~daNpcTkc_c(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_tks.h b/include/d/actor/d_a_npc_tks.h index 6f908fd7e0..c2f7e6ff53 100644 --- a/include/d/actor/d_a_npc_tks.h +++ b/include/d/actor/d_a_npc_tks.h @@ -73,7 +73,7 @@ public: daNpcTks_c(); ~daNpcTks_c(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_toby.h b/include/d/actor/d_a_npc_toby.h index 835767d6c2..2168d28947 100644 --- a/include/d/actor/d_a_npc_toby.h +++ b/include/d/actor/d_a_npc_toby.h @@ -1,7 +1,7 @@ #ifndef D_A_NPC_TOBY_H #define D_A_NPC_TOBY_H -#include "dolphin/types.h" +#include #include "d/actor/d_a_npc.h" struct daNpc_Toby_HIOParam { diff --git a/include/d/actor/d_a_npc_wrestler.h b/include/d/actor/d_a_npc_wrestler.h index f19de06fb5..e9df8ff516 100644 --- a/include/d/actor/d_a_npc_wrestler.h +++ b/include/d/actor/d_a_npc_wrestler.h @@ -131,7 +131,7 @@ public: typedef BOOL (daNpcWrestler_c::*EventFn)(int); daNpcWrestler_c(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_yamid.h b/include/d/actor/d_a_npc_yamid.h index f4f7856ac6..77287cb6a1 100644 --- a/include/d/actor/d_a_npc_yamid.h +++ b/include/d/actor/d_a_npc_yamid.h @@ -45,7 +45,7 @@ public: typedef int (daNpc_yamiD_c::*actionFunc)(void*); ~daNpc_yamiD_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_yamis.h b/include/d/actor/d_a_npc_yamis.h index 640fb431c9..1a8bc3a56b 100644 --- a/include/d/actor/d_a_npc_yamis.h +++ b/include/d/actor/d_a_npc_yamis.h @@ -44,7 +44,7 @@ public: typedef int (daNpc_yamiS_c::*actionFunc)(void*); ~daNpc_yamiS_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_yamit.h b/include/d/actor/d_a_npc_yamit.h index d43b49dedf..f2ddaea4b6 100644 --- a/include/d/actor/d_a_npc_yamit.h +++ b/include/d/actor/d_a_npc_yamit.h @@ -45,7 +45,7 @@ public: typedef int (daNpc_yamiT_c::*actionFunc)(void*); ~daNpc_yamiT_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_yelia.h b/include/d/actor/d_a_npc_yelia.h index 0b30954344..d512ad8d75 100644 --- a/include/d/actor/d_a_npc_yelia.h +++ b/include/d/actor/d_a_npc_yelia.h @@ -42,7 +42,7 @@ public: class daNpc_Yelia_c : public daNpcT_c { public: ~daNpc_Yelia_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_ykm.h b/include/d/actor/d_a_npc_ykm.h index 558e21402d..69c9d99858 100644 --- a/include/d/actor/d_a_npc_ykm.h +++ b/include/d/actor/d_a_npc_ykm.h @@ -195,7 +195,7 @@ public: typedef BOOL (daNpc_ykM_c::*ActionFn)(void*); ~daNpc_ykM_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_zanb.h b/include/d/actor/d_a_npc_zanb.h index 0e63f79d43..b2c8aa704a 100644 --- a/include/d/actor/d_a_npc_zanb.h +++ b/include/d/actor/d_a_npc_zanb.h @@ -43,7 +43,7 @@ public: typedef int (daNpc_zanB_c::*cutFunc)(int); ~daNpc_zanB_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_zelRo.h b/include/d/actor/d_a_npc_zelRo.h index 4056b4ea28..b137c3bedb 100644 --- a/include/d/actor/d_a_npc_zelRo.h +++ b/include/d/actor/d_a_npc_zelRo.h @@ -99,7 +99,7 @@ public: typedef int (daNpc_ZelRo_c::*cutFunc)(int); ~daNpc_ZelRo_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_zra.h b/include/d/actor/d_a_npc_zra.h index 76df44770d..1760d3c41d 100644 --- a/include/d/actor/d_a_npc_zra.h +++ b/include/d/actor/d_a_npc_zra.h @@ -265,7 +265,7 @@ public: daNpc_zrA_c(); ~daNpc_zrA_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_zrc.h b/include/d/actor/d_a_npc_zrc.h index 907dbe11a5..327d87beb5 100644 --- a/include/d/actor/d_a_npc_zrc.h +++ b/include/d/actor/d_a_npc_zrc.h @@ -51,7 +51,7 @@ public: daNpc_zrC_c(); ~daNpc_zrC_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_npc_zrz.h b/include/d/actor/d_a_npc_zrz.h index 259046fe1b..55a9159945 100644 --- a/include/d/actor/d_a_npc_zrz.h +++ b/include/d/actor/d_a_npc_zrz.h @@ -57,7 +57,7 @@ public: daNpc_zrZ_c(); ~daNpc_zrZ_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_obj_amiShutter.h b/include/d/actor/d_a_obj_amiShutter.h index 5d6ffd61f7..b0e881c4c0 100644 --- a/include/d/actor/d_a_obj_amiShutter.h +++ b/include/d/actor/d_a_obj_amiShutter.h @@ -33,7 +33,7 @@ public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int Execute(Mtx**); void moveShutter(); BOOL playerAreaCheck(); diff --git a/include/d/actor/d_a_obj_ari.h b/include/d/actor/d_a_obj_ari.h index b3abad72bb..a771b054f1 100644 --- a/include/d/actor/d_a_obj_ari.h +++ b/include/d/actor/d_a_obj_ari.h @@ -38,7 +38,7 @@ public: void setBaseMtx(); /* inline */ inline int Draw(); bool CreateChk(); - cPhs__Step create(); + cPhs_Step create(); private: /* 0x590 */ dBgS_GndChk mGndChk; diff --git a/include/d/actor/d_a_obj_avalanche.h b/include/d/actor/d_a_obj_avalanche.h index 425e74c93b..18912da8f7 100644 --- a/include/d/actor/d_a_obj_avalanche.h +++ b/include/d/actor/d_a_obj_avalanche.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_AVALANCHE_H #define D_A_OBJ_AVALANCHE_H -#include "dolphin/types.h" +#include #include "d/d_bg_s_movebg_actor.h" #include "f_op/f_op_actor_mng.h" diff --git a/include/d/actor/d_a_obj_barDesk.h b/include/d/actor/d_a_obj_barDesk.h index 08081226f7..427e18ebdb 100644 --- a/include/d/actor/d_a_obj_barDesk.h +++ b/include/d/actor/d_a_obj_barDesk.h @@ -18,7 +18,7 @@ class daBarDesk_c : public dBgS_MoveBgActor { public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int Execute(Mtx**); void windowProc(); void init_modeWait(); diff --git a/include/d/actor/d_a_obj_bed.h b/include/d/actor/d_a_obj_bed.h index e889f8a590..0997e25353 100644 --- a/include/d/actor/d_a_obj_bed.h +++ b/include/d/actor/d_a_obj_bed.h @@ -4,7 +4,7 @@ #include "SSystem/SComponent/c_phase.h" #include "d/d_bg_s_acch.h" #include "f_op/f_op_actor.h" -#include "dolphin/types.h" +#include class dBgW; @@ -64,7 +64,7 @@ public: /* 0x840 */ /* vtable */ virtual ~daObj_Bed_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_obj_bmWindow.h b/include/d/actor/d_a_obj_bmWindow.h index fe49cf106a..fd04b16ccb 100644 --- a/include/d/actor/d_a_obj_bmWindow.h +++ b/include/d/actor/d_a_obj_bmWindow.h @@ -1,7 +1,7 @@ #ifndef D_A_OBJ_BMWINDOW_H #define D_A_OBJ_BMWINDOW_H -#include "dolphin/types.h" +#include #include "d/d_bg_s_movebg_actor.h" #include "d/d_cc_d.h" #include "f_op/f_op_actor_mng.h" diff --git a/include/d/actor/d_a_obj_bosswarp.h b/include/d/actor/d_a_obj_bosswarp.h index 15d92d6803..9b62f1a0f6 100644 --- a/include/d/actor/d_a_obj_bosswarp.h +++ b/include/d/actor/d_a_obj_bosswarp.h @@ -32,7 +32,7 @@ public: void setBaseMtx(); int Create(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); void appear(int); void set_appear(); void disappear(int); diff --git a/include/d/actor/d_a_obj_bsGate.h b/include/d/actor/d_a_obj_bsGate.h index d5a42a8e48..6ccdb38633 100644 --- a/include/d/actor/d_a_obj_bsGate.h +++ b/include/d/actor/d_a_obj_bsGate.h @@ -23,7 +23,7 @@ public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int Execute(Mtx**); void moveGate(); void init_modeWait(); diff --git a/include/d/actor/d_a_obj_burnbox.h b/include/d/actor/d_a_obj_burnbox.h index 6083f83939..f87678dccc 100644 --- a/include/d/actor/d_a_obj_burnbox.h +++ b/include/d/actor/d_a_obj_burnbox.h @@ -19,7 +19,7 @@ public: void setBaseMtx(); int Create(); int CreateHeap(); - cPhs__Step create1st(); + cPhs_Step create1st(); int Execute(Mtx**); int Draw(); int Delete(); diff --git a/include/d/actor/d_a_obj_cdoor.h b/include/d/actor/d_a_obj_cdoor.h index 6e457ee281..ee06fd790c 100644 --- a/include/d/actor/d_a_obj_cdoor.h +++ b/include/d/actor/d_a_obj_cdoor.h @@ -29,7 +29,7 @@ public: virtual ~daObjCdoor_c(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); void setMatrix(); int Execute(Mtx**); void execCdoor(); diff --git a/include/d/actor/d_a_obj_chandelier.h b/include/d/actor/d_a_obj_chandelier.h index 52c0ed7044..4aae0160d8 100644 --- a/include/d/actor/d_a_obj_chandelier.h +++ b/include/d/actor/d_a_obj_chandelier.h @@ -41,7 +41,7 @@ public: void moveSwingFall(); void hookSwingInitParm(); - virtual cPhs__Step create1st(); + virtual cPhs_Step create1st(); virtual ~daObjChandelier_c(); u8 getSW_0() { return fopAcM_GetParamBit(this, 4, 8); } diff --git a/include/d/actor/d_a_obj_cho.h b/include/d/actor/d_a_obj_cho.h index e1466f50e0..49dd5332b1 100644 --- a/include/d/actor/d_a_obj_cho.h +++ b/include/d/actor/d_a_obj_cho.h @@ -43,7 +43,7 @@ public: int Delete(); void setBaseMtx(); bool CreateChk(); - cPhs__Step create(); + cPhs_Step create(); inline int Draw(); private: diff --git a/include/d/actor/d_a_obj_crvfence.h b/include/d/actor/d_a_obj_crvfence.h index 3de1e090fe..dd760bb43f 100644 --- a/include/d/actor/d_a_obj_crvfence.h +++ b/include/d/actor/d_a_obj_crvfence.h @@ -28,7 +28,7 @@ public: void Action(); void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int Create(); int Execute(Mtx**); int Draw(); diff --git a/include/d/actor/d_a_obj_dan.h b/include/d/actor/d_a_obj_dan.h index c2915f79b2..15caef361a 100644 --- a/include/d/actor/d_a_obj_dan.h +++ b/include/d/actor/d_a_obj_dan.h @@ -37,7 +37,7 @@ public: void setBaseMtx(); /* inline */ inline int Draw(); bool CreateChk(); - cPhs__Step create(); + cPhs_Step create(); private: /* 0x590 */ dCcD_Stts mCcStts; diff --git a/include/d/actor/d_a_obj_goGate.h b/include/d/actor/d_a_obj_goGate.h index 70fad83c80..a0a66c7f32 100644 --- a/include/d/actor/d_a_obj_goGate.h +++ b/include/d/actor/d_a_obj_goGate.h @@ -24,7 +24,7 @@ public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int Execute(Mtx**); void moveGate(); void init_modeWait(); diff --git a/include/d/actor/d_a_obj_gra2.h b/include/d/actor/d_a_obj_gra2.h index cac3b992e2..59fd35343b 100644 --- a/include/d/actor/d_a_obj_gra2.h +++ b/include/d/actor/d_a_obj_gra2.h @@ -102,7 +102,7 @@ public: static void rideCallBack(dBgW*, fopAc_ac_c*, fopAc_ac_c*); daObj_GrA_c(); ~daObj_GrA_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(Mtx**); diff --git a/include/d/actor/d_a_obj_grave_stone.h b/include/d/actor/d_a_obj_grave_stone.h index 4f38629fbf..dee38757a3 100644 --- a/include/d/actor/d_a_obj_grave_stone.h +++ b/include/d/actor/d_a_obj_grave_stone.h @@ -31,7 +31,7 @@ public: void setRoomNo(); int Create(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int Execute(Mtx**); int Draw(); int Delete(); diff --git a/include/d/actor/d_a_obj_grz_rock.h b/include/d/actor/d_a_obj_grz_rock.h index e2223d1e4e..cd65d2e906 100644 --- a/include/d/actor/d_a_obj_grz_rock.h +++ b/include/d/actor/d_a_obj_grz_rock.h @@ -21,7 +21,7 @@ public: void setPrtcl(); int Create(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int Execute(Mtx**); int Draw(); int Delete(); diff --git a/include/d/actor/d_a_obj_h_saku.h b/include/d/actor/d_a_obj_h_saku.h index d999465808..689f1cf9aa 100644 --- a/include/d/actor/d_a_obj_h_saku.h +++ b/include/d/actor/d_a_obj_h_saku.h @@ -27,7 +27,7 @@ public: inline int Execute(Mtx**); inline int Draw(); inline int Delete(); - inline cPhs__Step create(); + inline cPhs_Step create(); /* 0x5A0 */ u8 field_0x5a0; /* 0x5A1 */ u8 field_0x5a1; diff --git a/include/d/actor/d_a_obj_hata.h b/include/d/actor/d_a_obj_hata.h index f122b84690..e0763a9c75 100644 --- a/include/d/actor/d_a_obj_hata.h +++ b/include/d/actor/d_a_obj_hata.h @@ -2,7 +2,7 @@ #define D_A_OBJ_HATA_H #include "SSystem/SComponent/c_phase.h" -#include "dolphin/types.h" +#include #include "f_op/f_op_actor.h" /** @@ -19,7 +19,7 @@ public: daObjHata_c(); virtual ~daObjHata_c(); int createHeap(); - cPhs__Step create(); + cPhs_Step create(); int Delete(); int draw(); int execute(); diff --git a/include/d/actor/d_a_obj_ikada.h b/include/d/actor/d_a_obj_ikada.h index cf8170e2b6..184f406a20 100644 --- a/include/d/actor/d_a_obj_ikada.h +++ b/include/d/actor/d_a_obj_ikada.h @@ -26,7 +26,7 @@ public: inline int Draw(); inline int Delete(); - inline cPhs__Step create(); + inline cPhs_Step create(); /* 0x5A0 */ f32 field_0x5a0; /* 0x5A4 */ f32 field_0x5a4; diff --git a/include/d/actor/d_a_obj_ita.h b/include/d/actor/d_a_obj_ita.h index c597e1615f..58fbcbe364 100644 --- a/include/d/actor/d_a_obj_ita.h +++ b/include/d/actor/d_a_obj_ita.h @@ -20,7 +20,7 @@ public: BOOL Check_RideOn(); void initBaseMtx(); void setBaseMtx(); - inline cPhs__Step create(); + inline cPhs_Step create(); inline int CreateHeap(); inline int Create(); inline int Execute(Mtx**); diff --git a/include/d/actor/d_a_obj_itamato.h b/include/d/actor/d_a_obj_itamato.h index a2a646a806..cb358289eb 100644 --- a/include/d/actor/d_a_obj_itamato.h +++ b/include/d/actor/d_a_obj_itamato.h @@ -48,7 +48,7 @@ private: public: daObj_ItaMato_c() {} virtual ~daObj_ItaMato_c(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_obj_kabuto.h b/include/d/actor/d_a_obj_kabuto.h index 7e41a20467..9738147885 100644 --- a/include/d/actor/d_a_obj_kabuto.h +++ b/include/d/actor/d_a_obj_kabuto.h @@ -44,7 +44,7 @@ public: int Delete(); void setBaseMtx(); bool CreateChk(); - cPhs__Step create(); + cPhs_Step create(); inline int Draw(); private: diff --git a/include/d/actor/d_a_obj_kag.h b/include/d/actor/d_a_obj_kag.h index 34192a871d..58692d7a8c 100644 --- a/include/d/actor/d_a_obj_kag.h +++ b/include/d/actor/d_a_obj_kag.h @@ -35,7 +35,7 @@ public: int execute(); int _delete(); void setBaseMtx(); - cPhs__Step create(); + cPhs_Step create(); void kag_setParticle(); inline int CreateHeap(); inline int draw(); diff --git a/include/d/actor/d_a_obj_kago.h b/include/d/actor/d_a_obj_kago.h index 46d1e0eb42..c2ea85d8f2 100644 --- a/include/d/actor/d_a_obj_kago.h +++ b/include/d/actor/d_a_obj_kago.h @@ -54,7 +54,7 @@ public: */ class daObj_Kago_c : public fopAc_ac_c { public: - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Delete(); int Execute(); diff --git a/include/d/actor/d_a_obj_kaisou.h b/include/d/actor/d_a_obj_kaisou.h index 53bde7d1a6..3398c24884 100644 --- a/include/d/actor/d_a_obj_kaisou.h +++ b/include/d/actor/d_a_obj_kaisou.h @@ -24,7 +24,7 @@ public: int Execute(); int Delete(); void setBaseMtx(); - cPhs__Step create(); + cPhs_Step create(); inline int CreateHeap(); inline int Draw(); diff --git a/include/d/actor/d_a_obj_klift00.h b/include/d/actor/d_a_obj_klift00.h index 7c2159fefb..865fab8c47 100644 --- a/include/d/actor/d_a_obj_klift00.h +++ b/include/d/actor/d_a_obj_klift00.h @@ -16,7 +16,7 @@ */ class daObjKLift00_c : public dBgS_MoveBgActor, public request_of_phase_process_class { public: - cPhs__Step create1st(); + cPhs_Step create1st(); void setMtx(); void rideActor(fopAc_ac_c*); int CreateHeap(); diff --git a/include/d/actor/d_a_obj_kshutter.h b/include/d/actor/d_a_obj_kshutter.h index 642935eb9d..b217adef2d 100644 --- a/include/d/actor/d_a_obj_kshutter.h +++ b/include/d/actor/d_a_obj_kshutter.h @@ -15,7 +15,7 @@ class daObjKshtr_c : public dBgS_MoveBgActor { public: - typedef cPhs__Step (daObjKshtr_c::*PhaseFunc)(); + typedef cPhs_Step (daObjKshtr_c::*PhaseFunc)(); typedef void (daObjKshtr_c::*ActionFunc)(); typedef BOOL (daObjKshtr_c::*DemoFunc)(); @@ -25,10 +25,10 @@ public: void offDzb(); int CreateHeap(); void initKey(); - cPhs__Step phase_0(); - cPhs__Step phase_1(); - cPhs__Step phase_2(); - cPhs__Step create1st(); + cPhs_Step phase_0(); + cPhs_Step phase_1(); + cPhs_Step phase_2(); + cPhs_Step create1st(); void event_proc_call(); void event_proc_call2(); int Execute(Mtx**); diff --git a/include/d/actor/d_a_obj_kwheel01.h b/include/d/actor/d_a_obj_kwheel01.h index 2fab8a4982..40bc025db4 100644 --- a/include/d/actor/d_a_obj_kwheel01.h +++ b/include/d/actor/d_a_obj_kwheel01.h @@ -18,7 +18,7 @@ public: daObjKWheel01_c() : dEvLib_callback_c(this) {} ~daObjKWheel01_c() {}; - cPhs__Step create1st(); + cPhs_Step create1st(); void setMtx(); int CreateHeap(); int Create(); diff --git a/include/d/actor/d_a_obj_lv1Candle00.h b/include/d/actor/d_a_obj_lv1Candle00.h index 79032a3c5d..48fca4acb6 100644 --- a/include/d/actor/d_a_obj_lv1Candle00.h +++ b/include/d/actor/d_a_obj_lv1Candle00.h @@ -20,7 +20,7 @@ class daLv1Cdl00_c : public fopAc_ac_c { public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); static int createHeapCallBack(fopAc_ac_c*); void lightInit(); void setLight(); diff --git a/include/d/actor/d_a_obj_lv1Candle01.h b/include/d/actor/d_a_obj_lv1Candle01.h index d3663d8a17..66524cc4dc 100644 --- a/include/d/actor/d_a_obj_lv1Candle01.h +++ b/include/d/actor/d_a_obj_lv1Candle01.h @@ -18,7 +18,7 @@ class daLv1Cdl01_c : public dBgS_MoveBgActor { public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); void lightInit(); void setLight(); void cutLight(); diff --git a/include/d/actor/d_a_obj_lv2Candle.h b/include/d/actor/d_a_obj_lv2Candle.h index b5817cdfff..767480d550 100644 --- a/include/d/actor/d_a_obj_lv2Candle.h +++ b/include/d/actor/d_a_obj_lv2Candle.h @@ -18,7 +18,7 @@ class daLv2Candle_c : public fopAc_ac_c { public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); u8 isSwitch(); static int createHeapCallBack(fopAc_ac_c*); static void* searchDemoTagAct(void*, void*); diff --git a/include/d/actor/d_a_obj_lv3Candle.h b/include/d/actor/d_a_obj_lv3Candle.h index 40943fad52..0adca9d812 100644 --- a/include/d/actor/d_a_obj_lv3Candle.h +++ b/include/d/actor/d_a_obj_lv3Candle.h @@ -18,7 +18,7 @@ class daLv3Candle_c : public fopAc_ac_c { public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); static int createHeapCallBack(fopAc_ac_c*); void lightInit(); void pointLightProc(); diff --git a/include/d/actor/d_a_obj_lv3Water2.h b/include/d/actor/d_a_obj_lv3Water2.h index 37142c04c3..7bfee65c27 100644 --- a/include/d/actor/d_a_obj_lv3Water2.h +++ b/include/d/actor/d_a_obj_lv3Water2.h @@ -20,7 +20,7 @@ public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int Execute(Mtx**); void mode_proc_wait(); void mode_init_levelCtrl(); diff --git a/include/d/actor/d_a_obj_lv6SzGate.h b/include/d/actor/d_a_obj_lv6SzGate.h index deb25e4f12..80601341ec 100644 --- a/include/d/actor/d_a_obj_lv6SzGate.h +++ b/include/d/actor/d_a_obj_lv6SzGate.h @@ -25,7 +25,7 @@ public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int Execute(Mtx**); void moveGate(); void init_modeWait(); diff --git a/include/d/actor/d_a_obj_lv6bemos.h b/include/d/actor/d_a_obj_lv6bemos.h index 84fbf66c31..677d89dda5 100644 --- a/include/d/actor/d_a_obj_lv6bemos.h +++ b/include/d/actor/d_a_obj_lv6bemos.h @@ -21,7 +21,7 @@ public: void setBaseMtx(); int Create(); int CreateHeap(); - cPhs__Step create1st(); + cPhs_Step create1st(); int Execute(Mtx**); void action(); void actionWait(); diff --git a/include/d/actor/d_a_obj_lv6bemos2.h b/include/d/actor/d_a_obj_lv6bemos2.h index 90f2b0f26a..df0d1f66b2 100644 --- a/include/d/actor/d_a_obj_lv6bemos2.h +++ b/include/d/actor/d_a_obj_lv6bemos2.h @@ -22,7 +22,7 @@ public: void setBaseMtx(); int Create(); int CreateHeap(); - cPhs__Step create1st(); + cPhs_Step create1st(); int Execute(Mtx**); void action(); void calcBeam(); diff --git a/include/d/actor/d_a_obj_magne_arm.h b/include/d/actor/d_a_obj_magne_arm.h index 3b610935f0..fe46a3fbfc 100644 --- a/include/d/actor/d_a_obj_magne_arm.h +++ b/include/d/actor/d_a_obj_magne_arm.h @@ -49,9 +49,9 @@ public: void setBaseMtx(); int Create(); int CreateHeap(); - cPhs__Step phase_0(); - cPhs__Step phase_1(); - cPhs__Step phase_2(); + cPhs_Step phase_0(); + cPhs_Step phase_1(); + cPhs_Step phase_2(); int create1st(); int Execute(Mtx**); void action(); diff --git a/include/d/actor/d_a_obj_mirror_chain.h b/include/d/actor/d_a_obj_mirror_chain.h index 723466ae06..106272f116 100644 --- a/include/d/actor/d_a_obj_mirror_chain.h +++ b/include/d/actor/d_a_obj_mirror_chain.h @@ -42,7 +42,7 @@ public: int execute(); inline ~daObjMirrorChain_c(); inline void create_init(); - inline cPhs__Step create(); + inline cPhs_Step create(); u8 getSwitchNo() { return (fopAcM_GetParam(this) >> 8) & 0xff; } void setAnmSpeed(f32 speed) { mpBckAnm->setPlaySpeed(speed); } diff --git a/include/d/actor/d_a_obj_mirror_screw.h b/include/d/actor/d_a_obj_mirror_screw.h index 41f44c6a77..feeb6bf294 100644 --- a/include/d/actor/d_a_obj_mirror_screw.h +++ b/include/d/actor/d_a_obj_mirror_screw.h @@ -39,7 +39,7 @@ public: void executeWait(); void initDown(); void executeDown(); - inline cPhs__Step create(); + inline cPhs_Step create(); int CreateHeap(); inline void setBaseMtx(); inline void initBaseMtx(); diff --git a/include/d/actor/d_a_obj_mirror_table.h b/include/d/actor/d_a_obj_mirror_table.h index f573c7828f..1b99c17521 100644 --- a/include/d/actor/d_a_obj_mirror_table.h +++ b/include/d/actor/d_a_obj_mirror_table.h @@ -21,7 +21,7 @@ public: inline void setBaseMtx(); int execute(); inline ~daObjMirrorTable_c(); - cPhs__Step create(); + cPhs_Step create(); void create_init(); void initBaseMtx(); diff --git a/include/d/actor/d_a_obj_ornament_cloth.h b/include/d/actor/d_a_obj_ornament_cloth.h index 2a7e3e79ed..e0ea54b63d 100644 --- a/include/d/actor/d_a_obj_ornament_cloth.h +++ b/include/d/actor/d_a_obj_ornament_cloth.h @@ -57,7 +57,7 @@ public: inline int draw(); inline int execute(); inline ~daObjOnCloth_c(); - inline cPhs__Step create(); + inline cPhs_Step create(); const daObjOnCloth_Attr_c& attr() const { return M_attr; } diff --git a/include/d/actor/d_a_obj_saidan.h b/include/d/actor/d_a_obj_saidan.h index 4a0a75acc3..ef38588f00 100644 --- a/include/d/actor/d_a_obj_saidan.h +++ b/include/d/actor/d_a_obj_saidan.h @@ -23,7 +23,7 @@ public: void setBaseMtx(); virtual int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); virtual int Execute(Mtx**); void moveProc(); void init_modeWait(); diff --git a/include/d/actor/d_a_obj_sekizo.h b/include/d/actor/d_a_obj_sekizo.h index 272f900c5d..54fa84f5df 100644 --- a/include/d/actor/d_a_obj_sekizo.h +++ b/include/d/actor/d_a_obj_sekizo.h @@ -40,7 +40,7 @@ public: */ class daObj_Sekizo_c : public dBgS_MoveBgActor { public: - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Create(); diff --git a/include/d/actor/d_a_obj_sm_door.h b/include/d/actor/d_a_obj_sm_door.h index 70746d1e6b..bec15a0ae8 100644 --- a/include/d/actor/d_a_obj_sm_door.h +++ b/include/d/actor/d_a_obj_sm_door.h @@ -24,7 +24,7 @@ public: void DrawChk1(); void DrawChk2(); void setBaseMtx(); - cPhs__Step create(); + cPhs_Step create(); int CreateHeap(); int Create(); int Execute(Mtx**); diff --git a/include/d/actor/d_a_obj_smw_stone.h b/include/d/actor/d_a_obj_smw_stone.h index 6d7b499cfe..02f58284ff 100644 --- a/include/d/actor/d_a_obj_smw_stone.h +++ b/include/d/actor/d_a_obj_smw_stone.h @@ -15,7 +15,7 @@ class daSmWStone_c : public fopAc_ac_c, public request_of_phase_process_class { public: daSmWStone_c(); virtual ~daSmWStone_c(); - cPhs__Step create(); + cPhs_Step create(); int execute(); int draw(); int Delete(); diff --git a/include/d/actor/d_a_obj_snow_soup.h b/include/d/actor/d_a_obj_snow_soup.h index 490b2489c0..91c23c8f85 100644 --- a/include/d/actor/d_a_obj_snow_soup.h +++ b/include/d/actor/d_a_obj_snow_soup.h @@ -17,7 +17,7 @@ public: daObjSnowSoup_c(); virtual ~daObjSnowSoup_c(); int createHeap(); - cPhs__Step create(); + cPhs_Step create(); int Delete(); int draw(); int execute(); diff --git a/include/d/actor/d_a_obj_stopper.h b/include/d/actor/d_a_obj_stopper.h index 2a9d006609..562d5a87ca 100644 --- a/include/d/actor/d_a_obj_stopper.h +++ b/include/d/actor/d_a_obj_stopper.h @@ -5,7 +5,7 @@ #include "d/d_bg_s_movebg_actor.h" #include "d/d_cc_d.h" #include "d/d_particle.h" -#include "dolphin/types.h" +#include #include "f_op/f_op_actor_mng.h" /** diff --git a/include/d/actor/d_a_obj_sword.h b/include/d/actor/d_a_obj_sword.h index 5043db2233..163175ddec 100644 --- a/include/d/actor/d_a_obj_sword.h +++ b/include/d/actor/d_a_obj_sword.h @@ -18,7 +18,7 @@ public: void initBaseMtx(); void setBaseMtx(); int Create(); - cPhs__Step create(); + cPhs_Step create(); int actionWait(); int initActionOrderGetDemo(); int actionOrderGetDemo(); diff --git a/include/d/actor/d_a_obj_swpush.h b/include/d/actor/d_a_obj_swpush.h index b856f69170..c222e0f833 100644 --- a/include/d/actor/d_a_obj_swpush.h +++ b/include/d/actor/d_a_obj_swpush.h @@ -107,8 +107,8 @@ namespace daObjSwpush { bool is_switch2() const; static BOOL solidHeapCB(fopAc_ac_c*); bool create_heap(); - cPhs__Step create_res_load(); - cPhs__Step Mthd_Create(); + cPhs_Step create_res_load(); + cPhs_Step Mthd_Create(); int Mthd_Delete(); void set_mtx(); void init_mtx(); diff --git a/include/d/actor/d_a_obj_syRock.h b/include/d/actor/d_a_obj_syRock.h index 6b00a4f46b..aa662de6bd 100644 --- a/include/d/actor/d_a_obj_syRock.h +++ b/include/d/actor/d_a_obj_syRock.h @@ -20,7 +20,7 @@ public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); void setFallStat(); int Execute(Mtx**); void move(); diff --git a/include/d/actor/d_a_obj_testcube.h b/include/d/actor/d_a_obj_testcube.h index f0487e7e75..f7b6dde682 100644 --- a/include/d/actor/d_a_obj_testcube.h +++ b/include/d/actor/d_a_obj_testcube.h @@ -2,5 +2,49 @@ #define D_A_OBJ_TESTCUBE_H #include "f_op/f_op_actor_mng.h" +#include "d/d_bg_s_movebg_actor.h" + +class daObjCube_c : public dBgS_MoveBgActor { +public: +#if DEBUG + daObjCube_c() {} + + void getDzbName(char*); + void getBmdName(char*); + void initBaseMtx(); + void setBaseMtx(); + int create(); + + virtual int CreateHeap(); + virtual int Create(); + virtual int Execute(Mtx**); + virtual int Draw(); + virtual int Delete(); + + /* 0x5A8 */ request_of_phase_process_class mPhase; + /* 0x5B0 */ J3DModel* mpModel; + /* 0x5B4 */ u8 mShape; + /* 0x5B5 */ u8 mNameArg; + /* 0x5B6 */ u8 field_0x5b6; +#endif +}; + +namespace daObjCube_prm { +inline u8 getNameArg(daObjCube_c* i_this) { + return fopAcM_GetParam(i_this) & 0xFF; +} + +inline u8 getShape(daObjCube_c* i_this) { + return (fopAcM_GetParam(i_this) >> 0x1C) & 7; +} + +inline u8 getSwitch(daObjCube_c* i_this) { + return (fopAcM_GetParam(i_this) >> 8) & 0xFF; +} + +inline u8 getArg0(daObjCube_c* i_this) { + return fopAcM_GetParam(i_this) >> 0x1F; +} +} #endif /* D_A_OBJ_TESTCUBE_H */ diff --git a/include/d/actor/d_a_obj_waterGate.h b/include/d/actor/d_a_obj_waterGate.h index db36c07b5e..66a076be78 100644 --- a/include/d/actor/d_a_obj_waterGate.h +++ b/include/d/actor/d_a_obj_waterGate.h @@ -19,7 +19,7 @@ class daWtGate_c : public dBgS_MoveBgActor { public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int Execute(Mtx**); void move(); void init_modeWait(); diff --git a/include/d/actor/d_a_obj_waterPillar.h b/include/d/actor/d_a_obj_waterPillar.h index a2eca0ec65..0a4bba4c04 100644 --- a/include/d/actor/d_a_obj_waterPillar.h +++ b/include/d/actor/d_a_obj_waterPillar.h @@ -23,7 +23,7 @@ public: void setBaseMtx(); static int createHeapCallBack(fopAc_ac_c*); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int execute(); void actionMain(); void effectSet(); diff --git a/include/d/actor/d_a_obj_waterfall.h b/include/d/actor/d_a_obj_waterfall.h index 4c20554ced..031a45d717 100644 --- a/include/d/actor/d_a_obj_waterfall.h +++ b/include/d/actor/d_a_obj_waterfall.h @@ -18,8 +18,8 @@ public: void search_arrow(); void initBaseMtx(); void setBaseMtx(); - cPhs__Step Create(); - cPhs__Step create(); + cPhs_Step Create(); + cPhs_Step create(); int execute(); void push_player(); int draw(); diff --git a/include/d/actor/d_a_obj_wchain.h b/include/d/actor/d_a_obj_wchain.h index 98300869ab..b9f791d058 100644 --- a/include/d/actor/d_a_obj_wchain.h +++ b/include/d/actor/d_a_obj_wchain.h @@ -21,7 +21,7 @@ public: class daObjWchain_c : public fopAc_ac_c { public: int createHeap(); - cPhs__Step create(); + cPhs_Step create(); ~daObjWchain_c(); void setMatrix(); s16 getChainAngleZ(cXyz*, int); diff --git a/include/d/actor/d_a_obj_window.h b/include/d/actor/d_a_obj_window.h index 3738a0f18c..83b62740a4 100644 --- a/include/d/actor/d_a_obj_window.h +++ b/include/d/actor/d_a_obj_window.h @@ -19,7 +19,7 @@ public: void setBaseMtx(); int Create(); int CreateHeap(); - cPhs__Step create1st(); + cPhs_Step create1st(); int Execute(Mtx**); int Draw(); int Delete(); diff --git a/include/d/actor/d_a_obj_yobikusa.h b/include/d/actor/d_a_obj_yobikusa.h index e74b649006..9c1ee2a746 100644 --- a/include/d/actor/d_a_obj_yobikusa.h +++ b/include/d/actor/d_a_obj_yobikusa.h @@ -73,7 +73,7 @@ public: inline int createHeap(); inline int draw(); - inline cPhs__Step create(); + inline cPhs_Step create(); inline ~daObjYobikusa_c(); static attributes const M_attr; diff --git a/include/d/actor/d_a_obj_zrTurara.h b/include/d/actor/d_a_obj_zrTurara.h index 60861d8b01..9f48464cf9 100644 --- a/include/d/actor/d_a_obj_zrTurara.h +++ b/include/d/actor/d_a_obj_zrTurara.h @@ -18,7 +18,7 @@ class daZrTurara_c : public dBgS_MoveBgActor { public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int Execute(Mtx**); void move(); void modeWait(); diff --git a/include/d/actor/d_a_obj_zrTuraraRock.h b/include/d/actor/d_a_obj_zrTuraraRock.h index b116019677..4590cff2cf 100644 --- a/include/d/actor/d_a_obj_zrTuraraRock.h +++ b/include/d/actor/d_a_obj_zrTuraraRock.h @@ -18,7 +18,7 @@ class daZrTuraRc_c : public fopAc_ac_c { public: void setBaseMtx(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); static int createHeapCallBack(fopAc_ac_c*); int Execute(); void move(); diff --git a/include/d/actor/d_a_obj_zra_freeze.h b/include/d/actor/d_a_obj_zra_freeze.h index d31af415cd..fb6b916d7c 100644 --- a/include/d/actor/d_a_obj_zra_freeze.h +++ b/include/d/actor/d_a_obj_zra_freeze.h @@ -16,7 +16,7 @@ class daZraFreeze_c : public fopAc_ac_c { public: void setBaseMtx(); BOOL chkActorInScreen(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); void setHitodamaPrtcl(); int Execute(); diff --git a/include/d/actor/d_a_obj_zra_rock.h b/include/d/actor/d_a_obj_zra_rock.h index ab566a9f3a..586fc176c5 100644 --- a/include/d/actor/d_a_obj_zra_rock.h +++ b/include/d/actor/d_a_obj_zra_rock.h @@ -21,7 +21,7 @@ public: void setRoomNo(); int Create(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int Execute(Mtx**); int Draw(); int Delete(); diff --git a/include/d/actor/d_a_path_line.h b/include/d/actor/d_a_path_line.h index d9716453c2..a03c5445e7 100644 --- a/include/d/actor/d_a_path_line.h +++ b/include/d/actor/d_a_path_line.h @@ -1,6 +1,6 @@ #ifndef D_A_PATH_LINE_H #define D_A_PATH_LINE_H -#include "dolphin/types.h" +#include #endif /* D_A_PATH_LINE_H */ diff --git a/include/d/actor/d_a_peru.h b/include/d/actor/d_a_peru.h index 2ca6d71e12..583f7c62d0 100644 --- a/include/d/actor/d_a_peru.h +++ b/include/d/actor/d_a_peru.h @@ -2,7 +2,7 @@ #define D_A_PERU_H #include "d/actor/d_a_tag_evtarea.h" -#include "dolphin/types.h" +#include #include "d/actor/d_a_npc.h" #include "SSystem/SComponent/c_counter.h" diff --git a/include/d/actor/d_a_ppolamp.h b/include/d/actor/d_a_ppolamp.h index 410f03ce26..f6a6da2e66 100644 --- a/include/d/actor/d_a_ppolamp.h +++ b/include/d/actor/d_a_ppolamp.h @@ -1,7 +1,7 @@ #ifndef D_A_PPOLAMP_H #define D_A_PPOLAMP_H -#include "dolphin/types.h" +#include #include "f_op/f_op_actor_mng.h" /** diff --git a/include/d/actor/d_a_tag_evtarea.h b/include/d/actor/d_a_tag_evtarea.h index 5bfeaf4c3e..4bf0ec404e 100644 --- a/include/d/actor/d_a_tag_evtarea.h +++ b/include/d/actor/d_a_tag_evtarea.h @@ -5,7 +5,7 @@ class daTag_EvtArea_c : public fopAc_ac_c { public: - cPhs__Step create(); + cPhs_Step create(); BOOL Delete(); BOOL Execute(); BOOL Draw(); diff --git a/include/d/actor/d_a_tag_kmsg.h b/include/d/actor/d_a_tag_kmsg.h index cbd12b4077..2875ca3210 100644 --- a/include/d/actor/d_a_tag_kmsg.h +++ b/include/d/actor/d_a_tag_kmsg.h @@ -1,7 +1,7 @@ #ifndef D_A_TAG_KMSG_H #define D_A_TAG_KMSG_H -#include "dolphin/types.h" +#include #include "f_op/f_op_actor.h" #include "f_op/f_op_actor_mng.h" #include "d/d_msg_flow.h" diff --git a/include/d/actor/d_a_tag_statue_evt.h b/include/d/actor/d_a_tag_statue_evt.h index e116dea787..1bdc0d4f52 100644 --- a/include/d/actor/d_a_tag_statue_evt.h +++ b/include/d/actor/d_a_tag_statue_evt.h @@ -7,9 +7,9 @@ class daTagStatue_c : public fopAc_ac_c { public: void initBaseMtx(); void setBaseMtx(); - cPhs__Step Create(); + cPhs_Step Create(); int CreateHeap(); - cPhs__Step create(); + cPhs_Step create(); int execute(); void event_proc_call(); void actionWait(); diff --git a/include/d/actor/d_a_tag_waterfall.h b/include/d/actor/d_a_tag_waterfall.h index fe833394c2..80ffe7bec2 100644 --- a/include/d/actor/d_a_tag_waterfall.h +++ b/include/d/actor/d_a_tag_waterfall.h @@ -20,7 +20,7 @@ public: bool checkHitWaterFallCamera(); int execute(); int _delete(); - cPhs__Step create(); + cPhs_Step create(); private: /* 0x568 */ f32 mCylinderRadiusA; diff --git a/include/d/actor/d_a_tbox.h b/include/d/actor/d_a_tbox.h index 0e8feaa653..798a1c8661 100644 --- a/include/d/actor/d_a_tbox.h +++ b/include/d/actor/d_a_tbox.h @@ -59,10 +59,10 @@ public: }; daTbox_ModelInfo* getModelInfo(); - cPhs__Step commonShapeSet(); - cPhs__Step effectShapeSet(); - cPhs__Step envShapeSet(); - cPhs__Step bgCheckSet(); + cPhs_Step commonShapeSet(); + cPhs_Step effectShapeSet(); + cPhs_Step envShapeSet(); + cPhs_Step bgCheckSet(); void lightReady(); void setLightPos(); int checkEnv(); @@ -121,7 +121,7 @@ public: void mode_proc_call(); void mode_exec_wait(); void mode_exec(); - cPhs__Step create1st(); + cPhs_Step create1st(); int Execute(Mtx**); int Draw(); int Delete(); diff --git a/include/d/d_bg_parts.h b/include/d/d_bg_parts.h index e36b6cba33..adfb97d2b9 100644 --- a/include/d/d_bg_parts.h +++ b/include/d/d_bg_parts.h @@ -2,15 +2,252 @@ #define D_D_BG_PARTS #include "f_op/f_op_actor.h" +#include "d/d_com_inf_game.h" +#include "JSystem/J3DGraphBase/J3DDrawBuffer.h" +#include "JSystem/J3DGraphBase/J3DPacket.h" +#include "m_Do/m_Do_ext.h" +#include "d/d_bg_w.h" class dBgp_c { public: - int registBg(fopAc_ac_c*); - void draw(fopAc_ac_c*); - int execute(bool); - void releaseBg(); + class material_c { + public: + material_c() {} - static void setPointer(void*); + void draw(); + material_c* getNext() { return mpNext; } + material_c** getNext_p() { return &mpNext; } + + void setNext(material_c* i_material) { + mpNext = i_material; + } + + virtual void drawSimple() = 0; + virtual bool isSame(material_c*) { return false; } + + virtual void addChild(material_c* i_material) { + UNUSED(i_material); + JUT_ASSERT(78, FALSE); + } + + /* 0x4 */ material_c* mpNext; + }; + + class modelMaterial_c : public material_c { + public: + modelMaterial_c() {} + + MtxPtr getMtx() { + return mpMtx; + } + + J3DModelData* getModelData() { + return mpModelData; + } + + modelMaterial_c* getChild() { + return mpChild; + } + + J3DMaterial* getMaterial() { + return mpMaterial; + } + + u16 getMaterialID() { return mMaterialID; } + + void setChild(modelMaterial_c* i_child) { + mpChild = i_child; + } + + void set(J3DModelData*, J3DMaterial*, Mtx); + + virtual void drawSimple(); + virtual bool isSame(material_c*); + virtual void addChild(material_c*); + + /* 0x08 */ u16 mMaterialID; + /* 0x0C */ J3DModelData* mpModelData; + /* 0x10 */ J3DMaterial* mpMaterial; + /* 0x14 */ MtxPtr mpMtx; + /* 0x18 */ modelMaterial_c* mpChild; + }; + + class packet_c : public J3DPacket { + public: + packet_c(); + ~packet_c(); + + void draw(); + s8 getRoomNo() { return mRoomNo; } + void setRoomNo(s8 i_roomNo) { + mRoomNo = i_roomNo; + } + void reset(); + void entryMaterial(material_c*, u32); + void entryModel(modelMaterial_c*); + void entryShare(modelMaterial_c*); + + static const int MATERIAL_SORT_LEVEL = 2; + + /* 0x10 */ s8 mRoomNo; + /* 0x14 */ material_c* mpMaterials[64]; + }; + + class model_c { + public: + model_c() { + mMaterial = NULL; + } + + void create(J3DModelData*, Mtx); + void remove(); + + MtxPtr getBaseTRMtx() { + return mBaseTRMtx; + } + + modelMaterial_c* getMaterial() { + return mMaterial; + } + + /* 0x00 */ u16 mId; + /* 0x04 */ Mtx mBaseTRMtx; + /* 0x34 */ modelMaterial_c* mMaterial; + }; + + class share_c { + public: + share_c(); + ~share_c() {} + + void set(u16); + void reset(); + + const char* getArcName(); + int execute(); + void draw(); + void entry(packet_c*); + void cbNormal(); + void cbConveyor(); + + u16 getId() { return mId; } + u16 getCount() { return mCount; } + bool isUsed() { return mStatus != -1; } + bool isDraw() { return mStatus == 0; } + + void setCallback(void (share_c::*i_callback)()) { + mCallback = i_callback; + } + + /* 0x00 */ s8 mStatus; + /* 0x01 */ u8 field_0x1; + /* 0x02 */ u16 mId; + /* 0x04 */ u16 mCount; + /* 0x08 */ J3DModelData* mModelData; + /* 0x0C */ mDoExt_btkAnm mBtk; + /* 0x24 */ mDoExt_brkAnm mBrk; + /* 0x3C */ modelMaterial_c* mMaterial; + /* 0x40 */ void (share_c::*mCallback)(); + }; + + // made up names except for `unit_group_class` + struct unit_class; + struct unit_group_class; + + struct stage_map_unit_class { + /* 0x0 */ int num; + /* 0x4 */ unit_class* entries; + }; + + struct unit_unk_data2_class { + /* 0x00 */ u8 field_0x0[3]; + /* 0x03 */ u8 field_0x3; + /* 0x04 */ u8 field_0x4; + /* 0x05 */ u8 field_0x5; + /* 0x06 */ s16 angle; + /* 0x08 */ Vec pos; + /* 0x14 */ u8 field_0x14; + /* 0x15 */ u8 field_0x15; + }; + + struct unit_unk_data_class { + u16 field_0x0; + u16 field_0x2; + }; + + struct unit_class { + /* 0x0 */ int num; + /* 0x4 */ unit_group_class* groups; + /* 0x8 */ unit_unk_data_class* unk_0x8; + /* 0xC */ unit_unk_data2_class* unk_0xc; + }; + + struct unit_group_class { + /* 0x0 */ u8 unk_0x0; + /* 0x1 */ u8 switchNo; + /* 0x2 */ u16 unk_0x2; + }; + + dBgp_c(); + ~dBgp_c(); + + void create(s8, void*); + int remove(); + BOOL isSwitch(unit_group_class*); + void registBg(fopAc_ac_c*); + void releaseBg(); + int registBg(int, fopAc_ac_c*); + void releaseBg(int); + int execute(bool); + void draw(fopAc_ac_c*); + + void entryPacket() { + dComIfGd_getOpaListBG()->entryImm(&mPacket, 0); + } + + void entryModel(model_c* i_model) { + modelMaterial_c* var_30 = i_model->getMaterial(); + for (int i = var_30->getModelData()->getMaterialNum() - 1; i >= 0; i--) { + mPacket.entryModel(var_30); + var_30++; + } + } + + static void setPointer(void* i_pointer); + + static u16 getArg0(u8* param_0) { + return ((param_0[1] & 0xF) << 8) | (param_0[2]); + } + + static u16 getId(u8* param_0) { + return (param_0[0] << 4) | ((param_0[1] >> 4) & 0xF); + } + + static const char* getArcName(u8* param_0) { + return getArcName(getId(param_0), getArg0(param_0)); + } + + static const char* getArcName(u16, u16); + + static void createShare(); + static void removeShare(); + static void addShare(u16); + static void cutShare(u16); + static bool executeShare(); + static void drawShare(); + static void entryShare(packet_c*); + + static JKRSolidHeap* mShareHeap; + static share_c* mShare; + + /* 0x000 */ void* mPointer; + /* 0x004 */ char mArcName[8]; + /* 0x00C */ JKRSolidHeap* mHeap; + /* 0x010 */ JKRSolidHeap* mHeap2; + /* 0x014 */ dBgW* mBgWork; + /* 0x018 */ model_c* mModel; + /* 0x01C */ packet_c mPacket; + /* 0x130 */ u16 field_0x130; }; #endif /* D_D_BG_PARTS */ diff --git a/include/d/d_bg_pc.h b/include/d/d_bg_pc.h index bbf58c21ca..949c38e609 100644 --- a/include/d/d_bg_pc.h +++ b/include/d/d_bg_pc.h @@ -1,7 +1,7 @@ #ifndef D_BG_D_BG_PC_H #define D_BG_D_BG_PC_H -#include "dolphin/types.h" +#include struct sBgPc { /* 0x00 */ u32 code0; diff --git a/include/d/d_bg_w.h b/include/d/d_bg_w.h index 527c0e3fe4..fa4ba70105 100644 --- a/include/d/d_bg_w.h +++ b/include/d/d_bg_w.h @@ -4,8 +4,8 @@ #include "SSystem/SComponent/c_m3d_g_aab.h" #include "SSystem/SComponent/c_sxyz.h" #include "d/d_bg_w_base.h" -#include "dolphin/mtx.h" -#include "dolphin/types.h" +#include +#include class cBgS_GrpPassChk; class cBgS_PolyPassChk; @@ -228,6 +228,7 @@ public: void ClrNoCalcVtx() { mFlags &= ~NO_CALC_VTX_e; } void SetBaseMtxP(MtxP mtx) { pm_base = mtx; } void SetNoCalcVtx() { mFlags |= NO_CALC_VTX_e; } + cBgD_t* GetBgd() const { return pm_bgd; } public: /* 0x18 */ MtxP pm_base; // Model Matrix diff --git a/include/d/d_bg_w_base.h b/include/d/d_bg_w_base.h index 0eb10e977e..0a05467820 100644 --- a/include/d/d_bg_w_base.h +++ b/include/d/d_bg_w_base.h @@ -4,7 +4,7 @@ #include "SSystem/SComponent/c_bg_s_poly_info.h" #include "SSystem/SComponent/c_bg_w.h" #include "SSystem/SComponent/c_m3d_g_pla.h" -#include "dolphin/gx.h" +#include #include "f_pc/f_pc_base.h" class cBgS_GndChk; diff --git a/include/d/d_camera.h b/include/d/d_camera.h index a826def568..c49cce155e 100644 --- a/include/d/d_camera.h +++ b/include/d/d_camera.h @@ -1136,7 +1136,7 @@ public: int Gear() { return mGear; } - bool HideBGPartsOK() { + bool HideBGPartsOk() { return chkFlag(0x4); } diff --git a/include/d/d_cc_uty.h b/include/d/d_cc_uty.h index 9e080aa47c..bc58f99dc8 100644 --- a/include/d/d_cc_uty.h +++ b/include/d/d_cc_uty.h @@ -2,7 +2,7 @@ #define D_CC_D_CC_UTY_H #include "SSystem/SComponent/c_sxyz.h" -#include "dolphin/types.h" +#include class cCcD_Obj; class fopAc_ac_c; diff --git a/include/d/d_debug_pad.h b/include/d/d_debug_pad.h index 8293d442e3..4c5658adf4 100644 --- a/include/d/d_debug_pad.h +++ b/include/d/d_debug_pad.h @@ -1,11 +1,19 @@ #ifndef D_DEBUG_PAD_H #define D_DEBUG_PAD_H -#include "m_Do/m_Do_controller_pad.h" #include "JSystem/JUtility/TColor.h" class dDebugPad_c { public: + enum Mode_e { + MODE_CAMERA_e, + MODE_LIGHT_e, + MODE_WINDTEST_e, + MODE_SDCARD_e, + + MODE_MAX_e, + }; + dDebugPad_c(); bool Active() { return mIsActive; } @@ -14,6 +22,8 @@ public: bool Enable(s32); bool Trigger(); + static const char mode_name[MODE_MAX_e][9]; + /* 0x0 */ bool mIsActive; /* 0x1 */ u8 mTrigger; /* 0x4 */ s32 mMode; diff --git a/include/d/d_door_param2.h b/include/d/d_door_param2.h index bc09bc8a41..ffb6f9a9c2 100644 --- a/include/d/d_door_param2.h +++ b/include/d/d_door_param2.h @@ -1,7 +1,7 @@ #ifndef D_D_DOOR_PARAM2_H #define D_D_DOOR_PARAM2_H -#include "dolphin/types.h" +#include class fopAc_ac_c; diff --git a/include/d/d_event_lib.h b/include/d/d_event_lib.h index ac497e28a7..7220534f5c 100644 --- a/include/d/d_event_lib.h +++ b/include/d/d_event_lib.h @@ -1,7 +1,7 @@ #ifndef D_EVENT_D_EVENT_LIB_H #define D_EVENT_D_EVENT_LIB_H -#include "dolphin/types.h" +#include class fopAc_ac_c; diff --git a/include/d/d_eye_hl.h b/include/d/d_eye_hl.h index ef3263cda4..d174387806 100644 --- a/include/d/d_eye_hl.h +++ b/include/d/d_eye_hl.h @@ -1,7 +1,7 @@ #ifndef D_D_EYE_HL_H #define D_D_EYE_HL_H -#include "dolphin/types.h" +#include class J3DModelData; struct ResTIMG; diff --git a/include/d/d_item.h b/include/d/d_item.h index 14425c4d60..8b988ce10c 100644 --- a/include/d/d_item.h +++ b/include/d/d_item.h @@ -1,7 +1,7 @@ #ifndef D_D_ITEM_H #define D_D_ITEM_H -#include "dolphin/types.h" +#include class dEnemyItem_c { public: diff --git a/include/d/d_item_data.h b/include/d/d_item_data.h index a67e965a32..00fb9e5b9b 100644 --- a/include/d/d_item_data.h +++ b/include/d/d_item_data.h @@ -1,7 +1,7 @@ #ifndef D_D_ITEM_DATA_H #define D_D_ITEM_DATA_H -#include "dolphin/types.h" +#include struct dItem_itemInfo { /* 0x0 */ u8 mShadowSize; diff --git a/include/d/d_jcam_editor.h b/include/d/d_jcam_editor.h index db926274cc..87f0c890b0 100644 --- a/include/d/d_jcam_editor.h +++ b/include/d/d_jcam_editor.h @@ -1,38 +1,39 @@ #ifndef D_JCAM_EDITOR_H #define D_JCAM_EDITOR_H -#include "dolphin/mtx.h" +#include "JSystem/JStudio/JStudioCameraEditor/control.h" +#include "JSystem/JStudio/JStudio_JStage/object-camera.h" +#include "JSystem/JUtility/JUTResFont.h" +#include "JSystem/JKernel/JKRExpHeap.h" -namespace JStage { - class TSystem; -} -namespace JStudioCameraEditor { - class TControl; -} - -class JKRExpHeap; class JUTGamePad; -class JUTResFont; class dJcame_c { public: dJcame_c(const JStage::TSystem*, f32, JUTGamePad&); + ~dJcame_c(); + void update(); void show3D(Mtx); void show2D(); + bool isEnabled() { return mControl->isEnabled(); } + static void create(const JStage::TSystem*, f32, JUTGamePad&); + static void remove(); static dJcame_c* m_myObj; static dJcame_c* get() { return m_myObj; } - /* 0x00 */ JStage::TSystem* field_0x0; - /* 0x04 */ JUTResFont* field_0x4; - /* 0x08 */ JKRExpHeap* mHeap; - /* 0x0C */ JStudioCameraEditor::TControl* mControl; - /* 0x10 */ int field_0x10; - /* 0x14 */ u8 field_0x14; + /* 0x00 */ const JStage::TSystem* mSystem; + /* 0x04 */ J2DOrthoGraph* mOrthoGraph; + /* 0x08 */ JUTResFont* mFont; + /* 0x0C */ JKRExpHeap* mHeap; + /* 0x10 */ JStudioCameraEditor::TControl* mControl; + /* 0x14 */ JStudio_JStage::TAdaptor_camera* mAdaptor; + /* 0x18 */ bool mIsAdaptorSet; + /* 0x19 */ s8 mHioId; }; #endif /* D_JCAM_EDITOR_H */ diff --git a/include/d/d_jpreviewer.h b/include/d/d_jpreviewer.h index c9cd4cbc35..98079c6eb4 100644 --- a/include/d/d_jpreviewer.h +++ b/include/d/d_jpreviewer.h @@ -1,7 +1,7 @@ #ifndef D_JPREVIEWER_H #define D_JPREVIEWER_H -#include "dolphin/mtx.h" +#include namespace JStudio { class TControl; diff --git a/include/d/d_kankyo_data.h b/include/d/d_kankyo_data.h index 2d6e628c48..93b0cecfcb 100644 --- a/include/d/d_kankyo_data.h +++ b/include/d/d_kankyo_data.h @@ -1,7 +1,7 @@ #ifndef D_KANKYO_D_KANKYO_DATA_H #define D_KANKYO_D_KANKYO_DATA_H -#include "dolphin/types.h" +#include struct color_RGB_class { /* 0x0 */ u8 r; diff --git a/include/d/d_kankyo_rain.h b/include/d/d_kankyo_rain.h index 7b3e1ef75c..0feb428cd2 100644 --- a/include/d/d_kankyo_rain.h +++ b/include/d/d_kankyo_rain.h @@ -1,7 +1,7 @@ #ifndef D_KANKYO_D_KANKYO_RAIN_H #define D_KANKYO_D_KANKYO_RAIN_H -#include "dolphin/mtx.h" +#include struct cXyz; struct _GXColor; diff --git a/include/d/d_kankyo_tev_str.h b/include/d/d_kankyo_tev_str.h index e945694d01..177dc80d65 100644 --- a/include/d/d_kankyo_tev_str.h +++ b/include/d/d_kankyo_tev_str.h @@ -3,7 +3,7 @@ #include "JSystem/J3DGraphBase/J3DTevs.h" #include "SSystem/SComponent/c_xyz.h" -#include "dolphin/types.h" +#include class dKy_tevstr_c { public: diff --git a/include/d/d_menu_dmap.h b/include/d/d_menu_dmap.h index 5e5c0c7a16..fafa30e0c0 100644 --- a/include/d/d_menu_dmap.h +++ b/include/d/d_menu_dmap.h @@ -5,7 +5,7 @@ #include "d/d_msg_flow.h" #include "d/d_menu_map_common.h" #include "d/d_map_path_dmap.h" -#include "dolphin/types.h" +#include class CPaneMgr; struct CSTControl; diff --git a/include/d/d_menu_fmap2D.h b/include/d/d_menu_fmap2D.h index cda275f36f..ba8fd8659f 100644 --- a/include/d/d_menu_fmap2D.h +++ b/include/d/d_menu_fmap2D.h @@ -7,7 +7,7 @@ #include "d/d_menu_map_common.h" #include "d/d_meter_haihai.h" #include "d/d_pane_class.h" -#include "dolphin/types.h" +#include class dMsgScrnExplain_c; diff --git a/include/d/d_menu_fmap_map.h b/include/d/d_menu_fmap_map.h index 2879d03d02..b5b6f7e8d1 100644 --- a/include/d/d_menu_fmap_map.h +++ b/include/d/d_menu_fmap_map.h @@ -2,7 +2,7 @@ #define D_MENU_D_MENU_FMAP_MAP_H #include "SSystem/SComponent/c_counter.h" -#include "dolphin/types.h" +#include #include "d/d_menu_fmap.h" #include "d/d_map.h" #include "d/d_map_path.h" diff --git a/include/d/d_menu_map_common.h b/include/d/d_menu_map_common.h index 29575fd7bb..7d81ba620d 100644 --- a/include/d/d_menu_map_common.h +++ b/include/d/d_menu_map_common.h @@ -1,7 +1,7 @@ #ifndef D_MENU_D_MENU_MAP_COMMON_H #define D_MENU_D_MENU_MAP_COMMON_H -#include "dolphin/types.h" +#include class J2DPicture; class JKRArchive; diff --git a/include/d/d_menu_quit.h b/include/d/d_menu_quit.h new file mode 100644 index 0000000000..4c25beccaa --- /dev/null +++ b/include/d/d_menu_quit.h @@ -0,0 +1,52 @@ +#ifndef D_MENU_OPTION_H +#define D_MENU_OPTION_H + +#include "d/d_msg_scrn_explain.h" + +class dMq_HIO_c : public JORReflexible { +public: + dMq_HIO_c(); + virtual ~dMq_HIO_c(); + + virtual void genMessage(JORMContext*); + + s8 id; +}; + +class dDlst_MenuQuitExplain_c : public dDlst_base_c { +public: + virtual void draw(); + virtual ~dDlst_MenuQuitExplain_c() {} + + /* 0x4 */ dMsgScrnExplain_c* mpExplain; +}; + +class dMenu_Quit_c { +public: + dMenu_Quit_c(); + virtual ~dMenu_Quit_c(); + + void select1_init(); + void select1_proc(); + void select2_init(); + void select2_proc(); + void messageChange(); + bool YesNoSelect(); + void msgTxtSet(u16, bool); + + /* 0x04 */ STControl* mStick; + /* 0x08 */ dDlst_MenuQuitExplain_c mMenuQuitExplain; + /* 0x10 */ u8 field_0x10; + /* 0x11 */ u8 field_0x11; + /* 0x12 */ u8 field_0x12; + /* 0x13 */ u8 field_0x13; + /* 0x14 */ u8 field_0x14; + /* 0x18 */ dMsgScrnExplain_c* mpScrnExplain; + /* 0x1C */ u8 field_0x1c; + /* 0x1E */ u16 mMsgId; + /* 0x20 */ bool field_0x20; + /* 0x21 */ u8 field_0x21; + /* 0x22 */ u8 field_0x22; +}; + +#endif /* D_MENU_OPTION_H */ diff --git a/include/d/d_menu_window_HIO.h b/include/d/d_menu_window_HIO.h index 2a6a04f730..9a6e82fa06 100644 --- a/include/d/d_menu_window_HIO.h +++ b/include/d/d_menu_window_HIO.h @@ -1,7 +1,7 @@ #ifndef D_MENU_D_MENU_WINDOW_HIO_H #define D_MENU_D_MENU_WINDOW_HIO_H -#include "dolphin/types.h" +#include class dMw_DHIO_c { public: diff --git a/include/d/d_msg_flow.h b/include/d/d_msg_flow.h index edfce0ea8a..89037d78cb 100644 --- a/include/d/d_msg_flow.h +++ b/include/d/d_msg_flow.h @@ -1,7 +1,7 @@ #ifndef D_MSG_D_MSG_FLOW_H #define D_MSG_D_MSG_FLOW_H -#include "dolphin/types.h" +#include enum { NODETYPE_MESSAGE_e = 1, diff --git a/include/d/d_msg_object.h b/include/d/d_msg_object.h index 2ddb5c410e..ef7135f09d 100644 --- a/include/d/d_msg_object.h +++ b/include/d/d_msg_object.h @@ -421,11 +421,11 @@ inline void dMsgObject_setTalkActor(fopAc_ac_c* actor) { } } -inline bool dMsgObject_getString(u32 param_0, J2DTextBox* param_1, J2DTextBox* param_2, - JUTFont* param_3, COutFont_c* param_4, char* param_5, - char* param_6, char* param_7, s16* param_8) { - return dMsgObject_getMsgObjectClass()->getString(param_0, param_1, param_2, param_3, param_4, param_5, param_6, - param_7, param_8); +inline bool dMsgObject_getString(u32 i_msgId, J2DTextBox* i_tbox, J2DTextBox* i_rubyTbox, + JUTFont* i_font, COutFont_c* i_outFont, char* o_text, + char* o_ruby, char* o_textS, s16* param_8) { + return dMsgObject_getMsgObjectClass()->getString(i_msgId, i_tbox, i_rubyTbox, i_font, i_outFont, o_text, o_ruby, + o_textS, param_8); } inline void dMsgObject_onCameraCancelFlag() { diff --git a/include/d/d_msg_out_font.h b/include/d/d_msg_out_font.h index 34a1ae5645..f1cb15a5c4 100644 --- a/include/d/d_msg_out_font.h +++ b/include/d/d_msg_out_font.h @@ -1,7 +1,7 @@ #ifndef D_MSG_D_MSG_OUT_FONT_H #define D_MSG_D_MSG_OUT_FONT_H -#include "dolphin/types.h" +#include class J2DPicture; class J2DTextBox; diff --git a/include/d/d_msg_scrn_3select.h b/include/d/d_msg_scrn_3select.h index aed6fbd03f..90a64ead62 100644 --- a/include/d/d_msg_scrn_3select.h +++ b/include/d/d_msg_scrn_3select.h @@ -54,6 +54,7 @@ public: bool isAnimeUpdate(int param_0) { return (field_0x114 & (u8)(1 << param_0)) ? TRUE : FALSE; } void onAnimeUpdate(int param_0) { field_0x114 |= (u8)(1 << param_0); } void offAnimeUpdate(int param_0) { field_0x114 &= ~(u8)(1 << param_0); } + u8 getDPDPoint() { return mDPDPoint; } private: /* 0x004 */ J2DScreen* mpScreen; @@ -72,6 +73,9 @@ private: /* 0x0A0 */ CPaneMgr* mpSelPo_c[3]; /* 0x0AC */ CPaneMgr* mpKahen_c[3]; /* 0x0B8 */ CPaneMgr* mpCursor_c[3]; + #if !PLATFORM_GCN + /* 0x0C4 */ CPaneMgr* mpTouchArea[3]; + #endif /* 0x0C4 */ JUtility::TColor mSelMsgCol; /* 0x0C8 */ JUtility::TColor mSelMsgInactiveCol; /* 0x0CC */ Vec mCursorPos[3]; @@ -91,7 +95,7 @@ private: /* 0x112 */ u8 field_0x112; /* 0x113 */ u8 mProcess; /* 0x114 */ u8 field_0x114; - /* 0x115 */ u8 field_0x115; + /* 0x115 */ u8 mDPDPoint; /* 0x116 */ u8 field_0x116; /* 0x117 */ u8 field_0x117; }; // Size: 0x118 diff --git a/include/d/d_msg_scrn_arrow.h b/include/d/d_msg_scrn_arrow.h index 9a185d1122..0f65181033 100644 --- a/include/d/d_msg_scrn_arrow.h +++ b/include/d/d_msg_scrn_arrow.h @@ -1,7 +1,7 @@ #ifndef MSG_SCRN_D_MSG_SCRN_ARROW_H #define MSG_SCRN_D_MSG_SCRN_ARROW_H -#include "dolphin/types.h" +#include class J2DScreen; class J2DAnmTransform; diff --git a/include/d/d_msg_scrn_explain.h b/include/d/d_msg_scrn_explain.h index 5702cd87d6..20931ec9ac 100644 --- a/include/d/d_msg_scrn_explain.h +++ b/include/d/d_msg_scrn_explain.h @@ -11,6 +11,15 @@ class dMsgString_c; class dMsgScrnExplain_c { public: + enum Status_e { + STATUS_WAIT_e, + STATUS_OPEN_REQ_e, + STATUS_OPEN_e, + STATUS_MOVE_e, + STATUS_MOVE_SELECT_e, + STATUS_CLOSE_e, + }; + dMsgScrnExplain_c(STControl*, u8, bool, u8); void move(); void draw(J2DOrthoGraph*); @@ -43,7 +52,7 @@ public: private: /* 0x04 */ dMsgString_c* mpString_c; /* 0x08 */ CPaneMgr* mpTm_c[2]; - /* 0x10 */ CPaneMgr* field_0x10[2]; + /* 0x10 */ CPaneMgr* mpTmr_c[2]; /* 0x18 */ CPaneMgr* mpMg_c[2]; /* 0x20 */ CPaneMgr* mpRoot_c[2]; /* 0x28 */ CPaneMgr* mpArw_c; @@ -57,8 +66,8 @@ private: /* 0x48 */ f32 field_0x48; /* 0x4C */ f32 field_0x4c; /* 0x50 */ f32 field_0x50; - /* 0x54 */ u32 field_0x54; - /* 0x58 */ u8 field_0x58; + /* 0x54 */ u32 mOpenMsgId; + /* 0x58 */ bool field_0x58; /* 0x5A */ s16 field_0x5a; /* 0x5C */ s16 field_0x5c; /* 0x5E */ s16 mKeyWaitTimer; diff --git a/include/d/d_msg_scrn_item.h b/include/d/d_msg_scrn_item.h index 70c6ba765c..2d82bb2138 100644 --- a/include/d/d_msg_scrn_item.h +++ b/include/d/d_msg_scrn_item.h @@ -1,7 +1,7 @@ #ifndef MSG_SCRN_D_MSG_SCRN_ITEM_H #define MSG_SCRN_D_MSG_SCRN_ITEM_H -#include "dolphin/types.h" +#include #include "d/d_msg_scrn_base.h" class dMsgScrnArrow_c; diff --git a/include/d/d_msg_scrn_talk.h b/include/d/d_msg_scrn_talk.h index dc9b1a754b..cac9efc97b 100644 --- a/include/d/d_msg_scrn_talk.h +++ b/include/d/d_msg_scrn_talk.h @@ -1,7 +1,7 @@ #ifndef MSG_SCRN_D_MSG_SCRN_TALK_H #define MSG_SCRN_D_MSG_SCRN_TALK_H -#include "dolphin/types.h" +#include #include "d/d_msg_scrn_base.h" class dMsgScrnArrow_c; diff --git a/include/d/d_particle_name.h b/include/d/d_particle_name.h index 52b7770484..61a7c4d7e5 100644 --- a/include/d/d_particle_name.h +++ b/include/d/d_particle_name.h @@ -1,7 +1,7 @@ #ifndef D_PARTICLE_D_PARTICLE_NAME_H #define D_PARTICLE_D_PARTICLE_NAME_H -#include "dolphin/types.h" +#include // Room scenes use a bit to specify an ID is from a room particle pack, not the common particle pack #define dPa_RM(id) (0x8000 | (id)) diff --git a/include/d/d_path.h b/include/d/d_path.h index 3d1b296988..7a4e6576ac 100644 --- a/include/d/d_path.h +++ b/include/d/d_path.h @@ -1,8 +1,8 @@ #ifndef D_D_PATH_H #define D_D_PATH_H -#include "dolphin/types.h" -#include "dolphin/mtx.h" +#include +#include class cBgS_PolyInfo; struct cXyz; diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 98e0cf5e07..87c6cec2bb 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -2,7 +2,6 @@ #define D_D_STAGE_H #include "SSystem/SComponent/c_lib.h" -#include "d/d_bg_parts.h" #include "d/d_kankyo.h" #include "d/d_kankyo_data.h" #include "f_op/f_op_actor_mng.h" @@ -1071,6 +1070,7 @@ public: STATIC_ASSERT(sizeof(dStage_roomStatus_c) == 0x404); +class dBgp_c; class dStage_roomControl_c { public: class roomDzs_c { @@ -1207,6 +1207,10 @@ public: static JKRExpHeap* getMemoryBlockHeap(int i_no) { return mMemoryBlock[i_no]; } + #if DEBUG + static void setBgp(int, void*); + #endif + static const int MEMORY_BLOCK_MAX = 19; static JKRExpHeap* mMemoryBlock[MEMORY_BLOCK_MAX]; diff --git a/include/d/d_tresure.h b/include/d/d_tresure.h index 6784c38094..73375e461f 100644 --- a/include/d/d_tresure.h +++ b/include/d/d_tresure.h @@ -1,7 +1,7 @@ #ifndef D_D_TRESURE_H #define D_D_TRESURE_H -#include "dolphin/mtx.h" +#include class dTres_c { public: diff --git a/include/d/d_vib_pattern.h b/include/d/d_vib_pattern.h index 122015787d..55d213513b 100644 --- a/include/d/d_vib_pattern.h +++ b/include/d/d_vib_pattern.h @@ -1,7 +1,7 @@ #ifndef D_D_VIB_PATTERN_H #define D_D_VIB_PATTERN_H -#include "dolphin/types.h" +#include diff --git a/include/dolphin/base/PPCArch.h b/include/dolphin/base/PPCArch.h index fa67b8a021..bb9e2845ab 100644 --- a/include/dolphin/base/PPCArch.h +++ b/include/dolphin/base/PPCArch.h @@ -4,7 +4,7 @@ #ifdef __REVOLUTION_SDK__ #include #else -#include "dolphin/types.h" +#include #ifdef __cplusplus extern "C" { diff --git a/include/f_op/f_op_view.h b/include/f_op/f_op_view.h index e9a95de8ee..07971a7642 100644 --- a/include/f_op/f_op_view.h +++ b/include/f_op/f_op_view.h @@ -2,7 +2,7 @@ #define F_F_OP_VIEW_H_ #include "SSystem/SComponent/c_xyz.h" -#include "dolphin/mtx.h" +#include #include "f_pc/f_pc_leaf.h" struct view_process_profile_definition { diff --git a/include/f_pc/f_pc_create_iter.h b/include/f_pc/f_pc_create_iter.h index 73b68c64f7..509a0fe1c0 100644 --- a/include/f_pc/f_pc_create_iter.h +++ b/include/f_pc/f_pc_create_iter.h @@ -2,7 +2,7 @@ #ifndef F_PC_CREATE_ITER_H_ #define F_PC_CREATE_ITER_H_ -#include "dolphin/types.h" +#include typedef struct create_tag create_tag; diff --git a/include/f_pc/f_pc_deletor.h b/include/f_pc/f_pc_deletor.h index 4470217e3b..9f4cbeb014 100644 --- a/include/f_pc/f_pc_deletor.h +++ b/include/f_pc/f_pc_deletor.h @@ -2,7 +2,7 @@ #ifndef F_PC_DELETOR_H_ #define F_PC_DELETOR_H_ -#include "dolphin/types.h" +#include typedef struct base_process_class base_process_class; diff --git a/include/f_pc/f_pc_draw.h b/include/f_pc/f_pc_draw.h index 447d3926de..dc971c8c27 100644 --- a/include/f_pc/f_pc_draw.h +++ b/include/f_pc/f_pc_draw.h @@ -1,7 +1,7 @@ #ifndef F_PC_DRAW_H_ #define F_PC_DRAW_H_ -#include "dolphin/types.h" +#include typedef struct base_process_class base_process_class; diff --git a/include/f_pc/f_pc_draw_priority.h b/include/f_pc/f_pc_draw_priority.h index e6a48f5638..b34a810f70 100644 --- a/include/f_pc/f_pc_draw_priority.h +++ b/include/f_pc/f_pc_draw_priority.h @@ -2,7 +2,7 @@ #ifndef F_PC_DRAW_PRIORITY_H_ #define F_PC_DRAW_PRIORITY_H_ -#include "dolphin/types.h" +#include typedef struct draw_priority_class { s16 priority; diff --git a/include/f_pc/f_pc_layer_iter.h b/include/f_pc/f_pc_layer_iter.h index f5554b6e57..35e16fd8fa 100644 --- a/include/f_pc/f_pc_layer_iter.h +++ b/include/f_pc/f_pc_layer_iter.h @@ -1,7 +1,7 @@ #ifndef F_PC_LAYER_ITER_H_ #define F_PC_LAYER_ITER_H_ -#include "dolphin/types.h" +#include typedef struct layer_class layer_class; diff --git a/include/f_pc/f_pc_load.h b/include/f_pc/f_pc_load.h index dc5137cd3d..b71a767982 100644 --- a/include/f_pc/f_pc_load.h +++ b/include/f_pc/f_pc_load.h @@ -2,7 +2,7 @@ #ifndef F_PC_LOAD_H_ #define F_PC_LOAD_H_ -#include "dolphin/types.h" +#include BOOL fpcLd_Use(s16 i_procName); BOOL fpcLd_IsLoaded(s16 i_procName); diff --git a/include/f_pc/f_pc_method.h b/include/f_pc/f_pc_method.h index e10b756a59..b87aa81e15 100644 --- a/include/f_pc/f_pc_method.h +++ b/include/f_pc/f_pc_method.h @@ -1,7 +1,7 @@ #ifndef F_PC_METHOD_H_ #define F_PC_METHOD_H_ -#include "dolphin/types.h" +#include typedef int (*process_method_func)(void*); diff --git a/include/f_pc/f_pc_method_iter.h b/include/f_pc/f_pc_method_iter.h index c858382546..05c1de4402 100644 --- a/include/f_pc/f_pc_method_iter.h +++ b/include/f_pc/f_pc_method_iter.h @@ -2,7 +2,7 @@ #ifndef F_PC_METHOD_ITER_H_ #define F_PC_METHOD_ITER_H_ -#include "dolphin/types.h" +#include typedef struct node_list_class node_list_class; diff --git a/include/f_pc/f_pc_pause.h b/include/f_pc/f_pc_pause.h index 557734f923..0bc14c72b3 100644 --- a/include/f_pc/f_pc_pause.h +++ b/include/f_pc/f_pc_pause.h @@ -1,7 +1,7 @@ #ifndef F_PC_PAUSE_ #define F_PC_PAUSE_ -#include "dolphin/types.h" +#include int fpcPause_IsEnable(void* pProc, u8 expected); int fpcPause_Enable(void* pProc, u8 pauseMask); diff --git a/include/f_pc/f_pc_profile.h b/include/f_pc/f_pc_profile.h index 399e11460f..8bc40fadc7 100644 --- a/include/f_pc/f_pc_profile.h +++ b/include/f_pc/f_pc_profile.h @@ -2,7 +2,7 @@ #ifndef F_PC_PROFILE_H_ #define F_PC_PROFILE_H_ -#include "dolphin/types.h" +#include typedef struct nodedraw_method_class nodedraw_method_class; typedef struct leafdraw_method_class leafdraw_method_class; diff --git a/include/m_Do/m_Do_Reset.h b/include/m_Do/m_Do_Reset.h index 76272c3774..5396a1510d 100644 --- a/include/m_Do/m_Do_Reset.h +++ b/include/m_Do/m_Do_Reset.h @@ -1,7 +1,7 @@ #ifndef M_DO_M_DO_RESET_H #define M_DO_M_DO_RESET_H -#include "dolphin/types.h" +#include void mDoRst_reset(int, u32, int); void mDoRst_resetCallBack(int, void*); diff --git a/include/revolution/base/PPCArch.h b/include/revolution/base/PPCArch.h index cd25faae2d..5a0a21364e 100644 --- a/include/revolution/base/PPCArch.h +++ b/include/revolution/base/PPCArch.h @@ -1,7 +1,7 @@ #ifndef _REVOLUTION_PPCARCH #define _REVOLUTION_PPCARCH -#include "revolution/types.h" +#include #ifdef __cplusplus extern "C" { diff --git a/include/revolution/os/OSHardware.h b/include/revolution/os/OSHardware.h index aa4a651f70..0217f369e8 100644 --- a/include/revolution/os/OSHardware.h +++ b/include/revolution/os/OSHardware.h @@ -8,11 +8,11 @@ #ifndef _RVL_SDK_OS_HARDWARE_H #define _RVL_SDK_OS_HARDWARE_H -#include "revolution/dvd.h" -#include "revolution/os.h" -#include "revolution/os/OSContext.h" -#include "revolution/os/OSThread.h" -#include "revolution/types.h" +#include +#include +#include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/JSystem/J2DGraph/J2DAnimation.cpp b/src/JSystem/J2DGraph/J2DAnimation.cpp index 5ca534a3a1..bf19ea1546 100644 --- a/src/JSystem/J2DGraph/J2DAnimation.cpp +++ b/src/JSystem/J2DGraph/J2DAnimation.cpp @@ -5,7 +5,7 @@ #include "JSystem/J3DGraphBase/J3DTexture.h" #include "JSystem/JUtility/JUTPalette.h" #include "JSystem/JUtility/JUTResource.h" -#include "dolphin/os.h" +#include template f32 J2DGetKeyFrameInterpolation(f32 param_0, J3DAnmKeyTableBase* param_1, T* param_2) { diff --git a/src/JSystem/J2DGraph/J2DGrafContext.cpp b/src/JSystem/J2DGraph/J2DGrafContext.cpp index 3f920bc407..9f676cd7e5 100644 --- a/src/JSystem/J2DGraph/J2DGrafContext.cpp +++ b/src/JSystem/J2DGraph/J2DGrafContext.cpp @@ -1,7 +1,7 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/J2DGraph/J2DGrafContext.h" -#include "dolphin/gx.h" +#include J2DGrafContext::J2DGrafContext(f32 x, f32 y, f32 width, f32 height) : mBounds(x, y, x + width, y + height), mScissorBounds(x, y, x + width, y + height) { diff --git a/src/JSystem/J2DGraph/J2DMatBlock.cpp b/src/JSystem/J2DGraph/J2DMatBlock.cpp index f8f530924a..9bb4f87572 100644 --- a/src/JSystem/J2DGraph/J2DMatBlock.cpp +++ b/src/JSystem/J2DGraph/J2DMatBlock.cpp @@ -5,7 +5,7 @@ #include "JSystem/JUtility/JUTPalette.h" #include "JSystem/JUtility/JUTResFont.h" #include "JSystem/JUtility/JUTTexture.h" -#include "dolphin/gx.h" +#include void J2DColorBlock::initialize() { for (int i = 0; i < 2; i++) { diff --git a/src/JSystem/J2DGraph/J2DMaterialFactory.cpp b/src/JSystem/J2DGraph/J2DMaterialFactory.cpp index 55a8ca4c36..8c45bff19e 100644 --- a/src/JSystem/J2DGraph/J2DMaterialFactory.cpp +++ b/src/JSystem/J2DGraph/J2DMaterialFactory.cpp @@ -6,7 +6,7 @@ #include "JSystem/JSupport/JSupport.h" #include "JSystem/JUtility/JUTResource.h" #include -#include "dolphin/types.h" +#include J2DMaterialFactory::J2DMaterialFactory(J2DMaterialBlock const& param_0) { field_0x0 = param_0.field_0x8; diff --git a/src/JSystem/J2DGraph/J2DOrthoGraph.cpp b/src/JSystem/J2DGraph/J2DOrthoGraph.cpp index 6025c957c9..5cd6778572 100644 --- a/src/JSystem/J2DGraph/J2DOrthoGraph.cpp +++ b/src/JSystem/J2DGraph/J2DOrthoGraph.cpp @@ -1,7 +1,7 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/J2DGraph/J2DOrthoGraph.h" -#include "dolphin/gx.h" +#include J2DOrthoGraph::J2DOrthoGraph() : J2DGrafContext(0, 0, 0, 0) { this->setLookat(); diff --git a/src/JSystem/J2DGraph/J2DPicture.cpp b/src/JSystem/J2DGraph/J2DPicture.cpp index 7208db3cd7..efeaca2ebf 100644 --- a/src/JSystem/J2DGraph/J2DPicture.cpp +++ b/src/JSystem/J2DGraph/J2DPicture.cpp @@ -7,7 +7,7 @@ #include "JSystem/JUtility/JUTTexture.h" #include "JSystem/JUtility/JUTResource.h" #include "JSystem/JSupport/JSURandomInputStream.h" -#include "dolphin/gx.h" +#include J2DPicture::J2DPicture() : mPalette(NULL) { for (u32 i = 0; i < 2; i++) { diff --git a/src/JSystem/J2DGraph/J2DPictureEx.cpp b/src/JSystem/J2DGraph/J2DPictureEx.cpp index eafa5619fe..27cc68cc94 100644 --- a/src/JSystem/J2DGraph/J2DPictureEx.cpp +++ b/src/JSystem/J2DGraph/J2DPictureEx.cpp @@ -5,7 +5,7 @@ #include "JSystem/J2DGraph/J2DScreen.h" #include "JSystem/JSupport/JSURandomInputStream.h" #include "JSystem/JUtility/JUTTexture.h" -#include "dolphin/types.h" +#include void J2DPictureEx::initiate(ResTIMG const* param_0, ResTLUT const* param_1) { u32 texGenNum = mMaterial->getTexGenBlock()->getTexGenNum(); diff --git a/src/JSystem/J2DGraph/J2DScreen.cpp b/src/JSystem/J2DGraph/J2DScreen.cpp index 28f90beeaa..37c9aef084 100644 --- a/src/JSystem/J2DGraph/J2DScreen.cpp +++ b/src/JSystem/J2DGraph/J2DScreen.cpp @@ -9,7 +9,7 @@ #include "JSystem/JKernel/JKRArchive.h" #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JSupport/JSUMemoryStream.h" -#include "dolphin/types.h" +#include J2DScreen::J2DScreen() : J2DPane(NULL, true, 'root', JGeometry::TBox2(JGeometry::TVec2(0, 0), JGeometry::TVec2(640, 480))), mColor() { diff --git a/src/JSystem/J2DGraph/J2DTevs.cpp b/src/JSystem/J2DGraph/J2DTevs.cpp index 88d1c1c69b..fc9306507a 100644 --- a/src/JSystem/J2DGraph/J2DTevs.cpp +++ b/src/JSystem/J2DGraph/J2DTevs.cpp @@ -7,7 +7,7 @@ #include "JSystem/J2DGraph/J2DTevs.h" #include "JSystem/J2DGraph/J2DMaterial.h" #include -#include "dolphin/gx.h" +#include void J2DTexMtx::load(u32 mtxIdx) { GXLoadTexMtxImm(mTexMtx, mtxIdx * 3 + GX_TEXMTX0, (GXTexMtxType)mInfo.mTexMtxType); diff --git a/src/JSystem/J3DGraphAnimator/J3DCluster.cpp b/src/JSystem/J3DGraphAnimator/J3DCluster.cpp index 1bb6a195f2..3f6398fda8 100644 --- a/src/JSystem/J3DGraphAnimator/J3DCluster.cpp +++ b/src/JSystem/J3DGraphAnimator/J3DCluster.cpp @@ -4,7 +4,7 @@ #include "JSystem/J3DGraphAnimator/J3DAnimation.h" #include "JSystem/J3DGraphAnimator/J3DModel.h" #include "JSystem/JMath/JMATrigonometric.h" -#include "dolphin/base/PPCArch.h" +#include J3DDeformData::J3DDeformData() { mClusterNum = 0; diff --git a/src/JSystem/J3DGraphLoader/J3DAnmLoader.cpp b/src/JSystem/J3DGraphLoader/J3DAnmLoader.cpp index 8add976ec4..daef72afec 100644 --- a/src/JSystem/J3DGraphLoader/J3DAnmLoader.cpp +++ b/src/JSystem/J3DGraphLoader/J3DAnmLoader.cpp @@ -7,7 +7,7 @@ #include "JSystem/J3DGraphLoader/J3DAnmLoader.h" #include "JSystem/J3DGraphAnimator/J3DAnimation.h" #include "JSystem/JSupport/JSupport.h" -#include "dolphin/os.h" +#include J3DAnmBase* J3DAnmLoaderDataBase::load(const void* i_data, J3DAnmLoaderDataBaseFlag flag) { const JUTDataFileHeader* header = (const JUTDataFileHeader*)i_data; diff --git a/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp b/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp index 03a0e66213..7d868d8730 100644 --- a/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp +++ b/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp @@ -8,7 +8,7 @@ #include "JSystem/J3DGraphAnimator/J3DSkinDeform.h" #include "JSystem/JSupport/JSupport.h" #include "JSystem/JKernel/JKRHeap.h" -#include "dolphin/os.h" +#include #include void* J3DClusterLoaderDataBase::load(const void* i_data) { diff --git a/src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp b/src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp index 5957fcc642..2fbe4a0c77 100644 --- a/src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp +++ b/src/JSystem/J3DGraphLoader/J3DModelLoaderCalcSize.cpp @@ -8,7 +8,7 @@ #include "JSystem/J3DGraphAnimator/J3DJoint.h" #include "JSystem/J3DGraphAnimator/J3DModelData.h" #include "JSystem/JSupport/JSupport.h" -#include "dolphin/os.h" +#include #include "global.h" u16 J3DModelLoader::countMaterialNum(const void* stream) { diff --git a/src/JSystem/J3DGraphLoader/J3DShapeFactory.cpp b/src/JSystem/J3DGraphLoader/J3DShapeFactory.cpp index d724d7cb8e..a37319a74c 100644 --- a/src/JSystem/J3DGraphLoader/J3DShapeFactory.cpp +++ b/src/JSystem/J3DGraphLoader/J3DShapeFactory.cpp @@ -5,7 +5,7 @@ #include "JSystem/J3DGraphBase/J3DShapeMtx.h" #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JSupport/JSupport.h" -#include "dolphin/os.h" +#include #include "global.h" J3DShapeFactory::J3DShapeFactory(J3DShapeBlock const& block) { diff --git a/src/JSystem/JAudio2/JASAiCtrl.cpp b/src/JSystem/JAudio2/JASAiCtrl.cpp index 662e5e6df4..f4cdfa4d46 100644 --- a/src/JSystem/JAudio2/JASAiCtrl.cpp +++ b/src/JSystem/JAudio2/JASAiCtrl.cpp @@ -14,7 +14,7 @@ #include "JSystem/JAudio2/JASLfo.h" #include "JSystem/JKernel/JKRSolidHeap.h" #include "JSystem/JUtility/JUTAssert.h" -#include "dolphin/ai.h" +#include #include #include diff --git a/src/JSystem/JAudio2/JASAudioReseter.cpp b/src/JSystem/JAudio2/JASAudioReseter.cpp index e1198d6af8..9ef9f57b31 100644 --- a/src/JSystem/JAudio2/JASAudioReseter.cpp +++ b/src/JSystem/JAudio2/JASAudioReseter.cpp @@ -5,7 +5,7 @@ #include "JSystem/JAudio2/JASCriticalSection.h" #include "JSystem/JAudio2/JASDriverIF.h" #include "JSystem/JAudio2/JASDSPChannel.h" -#include "dolphin/types.h" +#include JASAudioReseter::JASAudioReseter() { field_0x0 = 0; diff --git a/src/JSystem/JAudio2/JASAudioThread.cpp b/src/JSystem/JAudio2/JASAudioThread.cpp index 4cf66d5abf..0277f00804 100644 --- a/src/JSystem/JAudio2/JASAudioThread.cpp +++ b/src/JSystem/JAudio2/JASAudioThread.cpp @@ -9,7 +9,7 @@ #include "JSystem/JAudio2/JASProbe.h" #include "JSystem/JAudio2/JASReport.h" #include "JSystem/JKernel/JKRSolidHeap.h" -#include "dolphin/dsp.h" +#include #include JASAudioThread::JASAudioThread(int stackSize, int msgCount, u32 threadPriority) diff --git a/src/JSystem/JAudio2/JASCmdStack.cpp b/src/JSystem/JAudio2/JASCmdStack.cpp index 1a39ab1560..22b5a340e1 100644 --- a/src/JSystem/JAudio2/JASCmdStack.cpp +++ b/src/JSystem/JAudio2/JASCmdStack.cpp @@ -6,7 +6,7 @@ #include "JSystem/JAudio2/JASCmdStack.h" #include "JSystem/JAudio2/JASCriticalSection.h" -#include "dolphin/os.h" +#include JASPortCmd::TPortHead JASPortCmd::sCommandListOnce; diff --git a/src/JSystem/JAudio2/JASHeapCtrl.cpp b/src/JSystem/JAudio2/JASHeapCtrl.cpp index 5e82d25366..ee280261f4 100644 --- a/src/JSystem/JAudio2/JASHeapCtrl.cpp +++ b/src/JSystem/JAudio2/JASHeapCtrl.cpp @@ -6,7 +6,7 @@ #include "JSystem/JKernel/JKRExpHeap.h" #include "JSystem/JKernel/JKRSolidHeap.h" #include "JSystem/JUtility/JUTAssert.h" -#include "dolphin/ar.h" +#include JASHeap::JASHeap(JASDisposer* disposer) : mTree(this) { mDisposer = disposer; diff --git a/src/JSystem/JAudio2/JASWaveArcLoader.cpp b/src/JSystem/JAudio2/JASWaveArcLoader.cpp index 37086c0d4e..c2b7400444 100644 --- a/src/JSystem/JAudio2/JASWaveArcLoader.cpp +++ b/src/JSystem/JAudio2/JASWaveArcLoader.cpp @@ -6,7 +6,7 @@ #include "JSystem/JAudio2/JASMutex.h" #include "JSystem/JKernel/JKRDvdAramRipper.h" #include -#include "dolphin/os.h" +#include #include JASHeap* JASWaveArcLoader::sAramHeap; diff --git a/src/JSystem/JAudio2/JAUSectionHeap.cpp b/src/JSystem/JAudio2/JAUSectionHeap.cpp index cf037011fe..ad2b5beb95 100644 --- a/src/JSystem/JAudio2/JAUSectionHeap.cpp +++ b/src/JSystem/JAudio2/JAUSectionHeap.cpp @@ -14,7 +14,7 @@ #include "JSystem/JAudio2/JAUSoundTable.h" #include "JSystem/JAudio2/JAUStreamFileTable.h" #include "JSystem/JKernel/JKRSolidHeap.h" -#include "dolphin/dvd.h" +#include namespace { class TPushCurrentHeap { diff --git a/src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp b/src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp index 37e0577413..f973cb4779 100644 --- a/src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp +++ b/src/JSystem/JAudio2/JAUSeqDataBlockMgr.cpp @@ -7,7 +7,7 @@ #include "JSystem/JAudio2/JAUSeqDataBlockMgr.h" #include "JSystem/JAudio2/JAUSoundInfo.h" #include "JSystem/JAudio2/JASResArcLoader.h" -#include "dolphin/types.h" +#include JAUSeqDataBlock::JAUSeqDataBlock() : field_0x0(this) {} diff --git a/src/JSystem/JAudio2/osdsp.cpp b/src/JSystem/JAudio2/osdsp.cpp index ff222269ec..f147b6e81b 100644 --- a/src/JSystem/JAudio2/osdsp.cpp +++ b/src/JSystem/JAudio2/osdsp.cpp @@ -2,7 +2,7 @@ #include "JSystem/JAudio2/osdsp.h" #include "JSystem/JAudio2/osdsp_task.h" -#include "dolphin/os.h" +#include #include extern "C" void __DSP_insert_task(DSPTaskInfo*); diff --git a/src/JSystem/JFramework/JFWDisplay.cpp b/src/JSystem/JFramework/JFWDisplay.cpp index 0392ffdb0b..eb40c484e4 100644 --- a/src/JSystem/JFramework/JFWDisplay.cpp +++ b/src/JSystem/JFramework/JFWDisplay.cpp @@ -6,7 +6,7 @@ #include "JSystem/JUtility/JUTConsole.h" #include "JSystem/JUtility/JUTDbPrint.h" #include "JSystem/JUtility/JUTProcBar.h" -#include "dolphin/gx.h" +#include #include #include "global.h" #include diff --git a/src/JSystem/JKernel/JKRAram.cpp b/src/JSystem/JKernel/JKRAram.cpp index 7d1c573f11..ffea3d9af7 100644 --- a/src/JSystem/JKernel/JKRAram.cpp +++ b/src/JSystem/JKernel/JKRAram.cpp @@ -6,7 +6,7 @@ #include "JSystem/JKernel/JKRDecomp.h" #include "JSystem/JKernel/JKRExpHeap.h" #include "JSystem/JUtility/JUTException.h" -#include "dolphin/ar.h" +#include #include #include diff --git a/src/JSystem/JKernel/JKRAramPiece.cpp b/src/JSystem/JKernel/JKRAramPiece.cpp index 7bc83cf0c2..e74cf5d5c7 100644 --- a/src/JSystem/JKernel/JKRAramPiece.cpp +++ b/src/JSystem/JKernel/JKRAramPiece.cpp @@ -4,7 +4,7 @@ #include "JSystem/JKernel/JKRAram.h" #include "JSystem/JKernel/JKRDecomp.h" #include "JSystem/JUtility/JUTException.h" -#include "dolphin/os.h" +#include JKRAMCommand* JKRAramPiece::prepareCommand(int direction, u32 src, u32 dst, u32 length, JKRAramBlock* block, diff --git a/src/JSystem/JKernel/JKRDvdAramRipper.cpp b/src/JSystem/JKernel/JKRDvdAramRipper.cpp index 8d44cc29d8..3ca276e050 100644 --- a/src/JSystem/JKernel/JKRDvdAramRipper.cpp +++ b/src/JSystem/JKernel/JKRDvdAramRipper.cpp @@ -9,7 +9,7 @@ #include "JSystem/JSupport/JSUFileStream.h" #include #include -#include "dolphin/vi.h" +#include #include "global.h" #include diff --git a/src/JSystem/JKernel/JKRDvdRipper.cpp b/src/JSystem/JKernel/JKRDvdRipper.cpp index fc792c50cd..cf84ef9eec 100644 --- a/src/JSystem/JKernel/JKRDvdRipper.cpp +++ b/src/JSystem/JKernel/JKRDvdRipper.cpp @@ -10,7 +10,7 @@ #include "JSystem/JUtility/JUTException.h" #include #include -#include "dolphin/vi.h" +#include #include static int JKRDecompressFromDVD(JKRDvdFile*, void*, u32, u32, u32, u32, u32*); diff --git a/src/JSystem/JKernel/JKRFile.cpp b/src/JSystem/JKernel/JKRFile.cpp index 91ac9040a9..b267e93235 100644 --- a/src/JSystem/JKernel/JKRFile.cpp +++ b/src/JSystem/JKernel/JKRFile.cpp @@ -1,7 +1,7 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/JKernel/JKRFile.h" -#include "dolphin/vi.h" +#include void JKRFile::read(void* data, s32 length, s32 offset) { JUT_ASSERT(32, ( length & 0x1f ) == 0); diff --git a/src/JSystem/JParticle/JPABaseShape.cpp b/src/JSystem/JParticle/JPABaseShape.cpp index 94523299c0..66b299af58 100644 --- a/src/JSystem/JParticle/JPABaseShape.cpp +++ b/src/JSystem/JParticle/JPABaseShape.cpp @@ -6,8 +6,8 @@ #include "JSystem/JParticle/JPAEmitter.h" #include "JSystem/JParticle/JPAResourceManager.h" #include "JSystem/JMath/JMATrigonometric.h" -#include "dolphin/mtx.h" -#include "dolphin/gx.h" +#include +#include void JPASetPointSize(JPAEmitterWorkData* work) { GXSetPointSize((u8)(25.0f * work->mGlobalPtclScl.x), GX_TO_ONE); diff --git a/src/JSystem/JParticle/JPAChildShape.cpp b/src/JSystem/JParticle/JPAChildShape.cpp index 906c1f1c1b..4c2a0403b5 100644 --- a/src/JSystem/JParticle/JPAChildShape.cpp +++ b/src/JSystem/JParticle/JPAChildShape.cpp @@ -3,8 +3,8 @@ #include "JSystem/JParticle/JPAChildShape.h" #include "JSystem/JParticle/JPAParticle.h" #include "JSystem/JParticle/JPAEmitter.h" -#include "dolphin/gx.h" -#include "dolphin/os.h" +#include +#include void JPARegistChildPrmEnv(JPAEmitterWorkData* work) { JPAChildShape* csp = work->mpRes->getCsp(); diff --git a/src/JSystem/JParticle/JPAEmitter.cpp b/src/JSystem/JParticle/JPAEmitter.cpp index 1972c4f4a1..95ab4147dd 100644 --- a/src/JSystem/JParticle/JPAEmitter.cpp +++ b/src/JSystem/JParticle/JPAEmitter.cpp @@ -5,7 +5,7 @@ #include "JSystem/JParticle/JPAParticle.h" #include "JSystem/JParticle/JPAResourceManager.h" #include "JSystem/JParticle/JPABaseShape.h" -#include "dolphin/types.h" +#include JPAEmitterCallBack::~JPAEmitterCallBack() { } diff --git a/src/JSystem/JParticle/JPAEmitterManager.cpp b/src/JSystem/JParticle/JPAEmitterManager.cpp index 51e95a46ad..40f8411134 100644 --- a/src/JSystem/JParticle/JPAEmitterManager.cpp +++ b/src/JSystem/JParticle/JPAEmitterManager.cpp @@ -6,7 +6,7 @@ #include "JSystem/JParticle/JPAParticle.h" #include "JSystem/JParticle/JPAResourceManager.h" #include "JSystem/JUtility/JUTAssert.h" -#include "dolphin/gx.h" +#include JPAEmitterManager::JPAEmitterManager(u32 i_ptclNum, u32 i_emtrNum, JKRHeap* pHeap, u8 i_gidMax, u8 i_ridMax) { diff --git a/src/JSystem/JParticle/JPAExTexShape.cpp b/src/JSystem/JParticle/JPAExTexShape.cpp index 79e3c5a339..81e14ef556 100644 --- a/src/JSystem/JParticle/JPAExTexShape.cpp +++ b/src/JSystem/JParticle/JPAExTexShape.cpp @@ -3,7 +3,7 @@ #include "JSystem/JParticle/JPAExTexShape.h" #include "JSystem/JParticle/JPAResourceManager.h" #include "JSystem/JParticle/JPAEmitter.h" -#include "dolphin/gx.h" +#include void JPALoadExTex(JPAEmitterWorkData* work) { JPAExTexShape* ets = work->mpRes->getEts(); diff --git a/src/JSystem/JParticle/JPAExtraShape.cpp b/src/JSystem/JParticle/JPAExtraShape.cpp index 49eed254cb..09c6b45bb0 100644 --- a/src/JSystem/JParticle/JPAExtraShape.cpp +++ b/src/JSystem/JParticle/JPAExtraShape.cpp @@ -4,7 +4,7 @@ #include "JSystem/JMath/JMATrigonometric.h" #include "JSystem/JParticle/JPAParticle.h" #include "JSystem/JParticle/JPAEmitter.h" -#include "dolphin/os.h" +#include void JPACalcScaleX(JPAEmitterWorkData* work, JPABaseParticle* ptcl) { JPAExtraShape* esp = work->mpRes->getEsp(); diff --git a/src/JSystem/JParticle/JPAResource.cpp b/src/JSystem/JParticle/JPAResource.cpp index 925726ccae..b3351be574 100644 --- a/src/JSystem/JParticle/JPAResource.cpp +++ b/src/JSystem/JParticle/JPAResource.cpp @@ -11,7 +11,7 @@ #include "JSystem/JParticle/JPAKeyBlock.h" #include "JSystem/JParticle/JPAParticle.h" #include "JSystem/JParticle/JPAResourceManager.h" -#include "dolphin/gx.h" +#include #include "global.h" JPAResource::JPAResource() { diff --git a/src/JSystem/JStudio/JStudio/stb-data-parse.cpp b/src/JSystem/JStudio/JStudio/stb-data-parse.cpp index e9ab233d33..ec263a18e5 100644 --- a/src/JSystem/JStudio/JStudio/stb-data-parse.cpp +++ b/src/JSystem/JStudio/JStudio/stb-data-parse.cpp @@ -2,7 +2,7 @@ #include "JSystem/JStudio/JStudio/stb-data-parse.h" #include "JSystem/JUtility/JUTAssert.h" -#include "dolphin/os.h" +#include #include namespace JStudio { diff --git a/src/JSystem/JUtility/JUTCacheFont.cpp b/src/JSystem/JUtility/JUTCacheFont.cpp index 3292adc78b..a4f22ab3d6 100644 --- a/src/JSystem/JUtility/JUTCacheFont.cpp +++ b/src/JSystem/JUtility/JUTCacheFont.cpp @@ -5,7 +5,7 @@ #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JUtility/JUTConsole.h" #include "JSystem/JKernel/JKRAram.h" -#include "dolphin/gx.h" +#include #include JUTCacheFont::JUTCacheFont(ResFONT const* p_fontRes, u32 cacheSize, JKRHeap* p_heap) { diff --git a/src/JSystem/JUtility/JUTPalette.cpp b/src/JSystem/JUtility/JUTPalette.cpp index a28b4184dd..23d2aa41c6 100644 --- a/src/JSystem/JUtility/JUTPalette.cpp +++ b/src/JSystem/JUtility/JUTPalette.cpp @@ -1,8 +1,8 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/JUtility/JUTPalette.h" -#include "dolphin/gx.h" -#include "dolphin/os.h" +#include +#include void JUTPalette::storeTLUT(GXTlut param_0, ResTLUT* tlut) { if (tlut == NULL) { diff --git a/src/JSystem/JUtility/JUTResFont.cpp b/src/JSystem/JUtility/JUTResFont.cpp index 5a609070ca..62abfbd213 100644 --- a/src/JSystem/JUtility/JUTResFont.cpp +++ b/src/JSystem/JUtility/JUTResFont.cpp @@ -5,7 +5,7 @@ #include "JSystem/JSupport/JSupport.h" #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JUtility/JUTConsole.h" -#include "dolphin/gx.h" +#include JUTResFont::JUTResFont() { initialize_state(); diff --git a/src/JSystem/JUtility/JUTTexture.cpp b/src/JSystem/JUtility/JUTTexture.cpp index 0bbdc93fe0..985ea6499b 100644 --- a/src/JSystem/JUtility/JUTTexture.cpp +++ b/src/JSystem/JUtility/JUTTexture.cpp @@ -2,7 +2,7 @@ #include "JSystem/JUtility/JUTTexture.h" #include "JSystem/JUtility/JUTPalette.h" -#include "dolphin/gx.h" +#include JUTTexture::~JUTTexture() { if (getCaptureFlag()) { diff --git a/src/JSystem/JUtility/JUTVideo.cpp b/src/JSystem/JUtility/JUTVideo.cpp index 60f0ea680b..823402eff4 100644 --- a/src/JSystem/JUtility/JUTVideo.cpp +++ b/src/JSystem/JUtility/JUTVideo.cpp @@ -3,7 +3,7 @@ #include "JSystem/JUtility/JUTVideo.h" #include "JSystem/JUtility/JUTDirectPrint.h" #include "JSystem/JUtility/JUTXfb.h" -#include "dolphin/gx.h" +#include #include JUTVideo* JUTVideo::sManager; diff --git a/src/JSystem/JUtility/JUTXfb.cpp b/src/JSystem/JUtility/JUTXfb.cpp index 3557f7d8c1..8e2f0a9173 100644 --- a/src/JSystem/JUtility/JUTXfb.cpp +++ b/src/JSystem/JUtility/JUTXfb.cpp @@ -3,7 +3,7 @@ #include "JSystem/JUtility/JUTXfb.h" #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JUtility/JUTAssert.h" -#include "dolphin/gx.h" +#include void JUTXfb::clearIndex() { mDrawingXfbIndex = -1; diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c index ea52db1e2a..3916d03315 100644 --- a/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/PPC_EABI/Src/uart_console_io_gcn.c @@ -1,5 +1,5 @@ #include "uart_console_io_gcn.h" -#include "dolphin/os.h" +#include int InitializeUART(size_t); int WriteUARTN(unsigned char*, size_t); diff --git a/src/PowerPC_EABI_Support/MetroTRK/trk.h b/src/PowerPC_EABI_Support/MetroTRK/trk.h index d8fb5bc7b1..a90cf24d75 100644 --- a/src/PowerPC_EABI_Support/MetroTRK/trk.h +++ b/src/PowerPC_EABI_Support/MetroTRK/trk.h @@ -1,7 +1,7 @@ #ifndef __METROTRK_TRK_H__ #define __METROTRK_TRK_H__ -#include "dolphin/types.h" +#include #ifdef __cplusplus extern "C" { @@ -375,4 +375,4 @@ void TRKSaveExtended1Block(); } #endif -#endif /* __METROTRK_TRK_H__ */ \ No newline at end of file +#endif /* __METROTRK_TRK_H__ */ diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h b/src/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h index ce053b3709..6ef61bc186 100644 --- a/src/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h +++ b/src/PowerPC_EABI_Support/Runtime/Inc/CPlusLibPPC.h @@ -1,6 +1,6 @@ #ifndef CPLUSLIBPPC_H #define CPLUSLIBPPC_H -#include "dolphin/types.h" +#include -#endif /* CPLUSLIBPPC_H */ \ No newline at end of file +#endif /* CPLUSLIBPPC_H */ diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/__init_cpp_exceptions.h b/src/PowerPC_EABI_Support/Runtime/Inc/__init_cpp_exceptions.h index 8ceb140b9e..63cc422514 100644 --- a/src/PowerPC_EABI_Support/Runtime/Inc/__init_cpp_exceptions.h +++ b/src/PowerPC_EABI_Support/Runtime/Inc/__init_cpp_exceptions.h @@ -1,6 +1,6 @@ #ifndef __INIT_CPP_EXCEPTIONS_H #define __INIT_CPP_EXCEPTIONS_H -#include "dolphin/types.h" +#include -#endif /* __INIT_CPP_EXCEPTIONS_H */ \ No newline at end of file +#endif /* __INIT_CPP_EXCEPTIONS_H */ diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/runtime.h b/src/PowerPC_EABI_Support/Runtime/Inc/runtime.h index 6ae7a1e78e..b70bc02086 100644 --- a/src/PowerPC_EABI_Support/Runtime/Inc/runtime.h +++ b/src/PowerPC_EABI_Support/Runtime/Inc/runtime.h @@ -1,6 +1,6 @@ #ifndef RUNTIME_H #define RUNTIME_H -#include "dolphin/types.h" +#include -#endif /* RUNTIME_H */ \ No newline at end of file +#endif /* RUNTIME_H */ diff --git a/src/PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c b/src/PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c index f3f2c182e8..33b700446d 100644 --- a/src/PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c +++ b/src/PowerPC_EABI_Support/Runtime/Src/GCN_Mem_Alloc.c @@ -3,7 +3,7 @@ * Description: */ -#include "dolphin/os.h" +#include inline static void InitDefaultHeap(void) { void* arenaLo; diff --git a/src/SSystem/SComponent/c_list_iter.cpp b/src/SSystem/SComponent/c_list_iter.cpp index 19e502ba7b..077840f838 100644 --- a/src/SSystem/SComponent/c_list_iter.cpp +++ b/src/SSystem/SComponent/c_list_iter.cpp @@ -5,7 +5,7 @@ #include "SSystem/SComponent/c_list_iter.h" #include "SSystem/SComponent/c_list.h" -#include "dolphin/types.h" +#include int cLsIt_Method(node_list_class* list, cNdIt_MethodFunc method, void* data) { if (list->mSize > 0) diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c index e22f2c565b..9bfd2e02fd 100644 --- a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c +++ b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/dolphin_trk_glue.c @@ -2,7 +2,7 @@ #include "TRK_MINNOW_DOLPHIN/Os/dolphin/DDH_Stubs.h" #include "TRK_MINNOW_DOLPHIN/Os/dolphin/GDEV_Stubs.h" #include "TRK_MINNOW_DOLPHIN/Os/dolphin/UDP_Stubs.h" -#include "dolphin/base/PPCArch.h" +#include #include "trk.h" void TRKInterruptHandler(); diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/usr_put.c b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/usr_put.c index 76d5f961b8..0a73fe5f10 100644 --- a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/usr_put.c +++ b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Os/dolphin/usr_put.c @@ -4,7 +4,7 @@ */ #include "TRK_MINNOW_DOLPHIN/Os/dolphin/usr_put.h" -// #include "dolphin/os.h" +// #include // void OSReport(char* fmt, ...) causes extra crclr instruction. // look into issue later diff --git a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c index fcfbd12a37..53db0e46ba 100644 --- a/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c +++ b/src/TRK_MINNOW_DOLPHIN/debugger/embedded/MetroTRK/Processor/ppc/Generic/flush_cache.c @@ -3,7 +3,7 @@ * Description: */ -#include "dolphin/types.h" +#include asm void TRK_flush_cache(u32, int) { // clang-format off diff --git a/src/d/actor/d_a_arrow.cpp b/src/d/actor/d_a_arrow.cpp index fc26f70eb7..920448ce24 100644 --- a/src/d/actor/d_a_arrow.cpp +++ b/src/d/actor/d_a_arrow.cpp @@ -1132,7 +1132,7 @@ static void* daAlink_searchHorseZelda(fopAc_ac_c* param_0, void* param_1) { return NULL; } -cPhs__Step daArrow_c::create() { +cPhs_Step daArrow_c::create() { fopAcM_ct(this, daArrow_c); mArrowType = fopAcM_GetParamBit(this, 8, 8); diff --git a/src/d/actor/d_a_b_ds.cpp b/src/d/actor/d_a_b_ds.cpp index 99795f5bee..88b5c8042a 100644 --- a/src/d/actor/d_a_b_ds.cpp +++ b/src/d/actor/d_a_b_ds.cpp @@ -5426,10 +5426,10 @@ static int useHeapInit(fopAc_ac_c* i_this) { return static_cast(i_this)->CreateHeap(); } -cPhs__Step daB_DS_c::create() { +cPhs_Step daB_DS_c::create() { fopAcM_ct(this, daB_DS_c); - cPhs__Step phase_state = (cPhs__Step)dComIfG_resLoad(&mPhase, "B_DS"); + cPhs_Step phase_state = dComIfG_resLoad(&mPhase, "B_DS"); if (phase_state == cPhs_COMPLEATE_e) { if (arg0 == TYPE_BATTLE_1 && dComIfGs_isStageBossEnemy()) { // "After B_DS defeated, so not re-setting\n" @@ -5676,7 +5676,7 @@ cPhs__Step daB_DS_c::create() { daB_DS_c::daB_DS_c() {} -static cPhs__Step daB_DS_Create(daB_DS_c* i_this) { +static cPhs_Step daB_DS_Create(daB_DS_c* i_this) { return i_this->create(); } diff --git a/src/d/actor/d_a_b_tn.cpp b/src/d/actor/d_a_b_tn.cpp index 6f2ee0c701..608cbf6336 100644 --- a/src/d/actor/d_a_b_tn.cpp +++ b/src/d/actor/d_a_b_tn.cpp @@ -5048,9 +5048,9 @@ int daB_TN_c::create() { } } - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq1, "B_tn"); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq1, "B_tn"); if (step == cPhs_COMPLEATE_e) { - step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq2, mArcName); + step = dComIfG_resLoad(&mPhaseReq2, mArcName); if (step == cPhs_COMPLEATE_e) { mBrkAnmFrame = fopAcM_GetParamBit(this, 16, 16); diff --git a/src/d/actor/d_a_b_yo.cpp b/src/d/actor/d_a_b_yo.cpp index 5029eec6d8..70a7d42391 100644 --- a/src/d/actor/d_a_b_yo.cpp +++ b/src/d/actor/d_a_b_yo.cpp @@ -3242,9 +3242,9 @@ static int useHeapInit2(fopAc_ac_c* i_this) { return static_cast(i_this)->CreateHeap2(); } -cPhs__Step daB_YO_c::create() { +cPhs_Step daB_YO_c::create() { fopAcM_ct(this, daB_YO_c); - cPhs__Step step; + cPhs_Step step; mSwNo = fopAcM_GetParam(this) & 0xff; mSwNo2 = (fopAcM_GetParam(this) >> 8) & 0xff; @@ -3258,7 +3258,7 @@ cPhs__Step daB_YO_c::create() { mIsInactive2 = mIsInactive; if (mIsInactive == 1) { - step = (cPhs__Step)dComIfG_resLoad(&mPhase2, "L5_R50"); + step = dComIfG_resLoad(&mPhase2, "L5_R50"); if (step == cPhs_COMPLEATE_e) { if (!daMirror_c::remove()) { @@ -3292,11 +3292,11 @@ cPhs__Step daB_YO_c::create() { return step; } else { - if ((step = (cPhs__Step)dComIfG_resLoad(&mPhase1, "B_YO"), step == cPhs_COMPLEATE_e) - && (step = (cPhs__Step)dComIfG_resLoad(&mPhase2, "L5_R50"), step == cPhs_COMPLEATE_e) - && (step = (cPhs__Step)dComIfG_resLoad(&mPhase3, "ykW"), step == cPhs_COMPLEATE_e) - && (step = (cPhs__Step)dComIfG_resLoad(&mPhase4, "ykW1"), step == cPhs_COMPLEATE_e) - && (step = (cPhs__Step)dComIfG_resLoad(&mPhase5, "E_FZ"), step == cPhs_COMPLEATE_e)) + if ((step = dComIfG_resLoad(&mPhase1, "B_YO"), step == cPhs_COMPLEATE_e) + && (step = dComIfG_resLoad(&mPhase2, "L5_R50"), step == cPhs_COMPLEATE_e) + && (step = dComIfG_resLoad(&mPhase3, "ykW"), step == cPhs_COMPLEATE_e) + && (step = dComIfG_resLoad(&mPhase4, "ykW1"), step == cPhs_COMPLEATE_e) + && (step = dComIfG_resLoad(&mPhase5, "E_FZ"), step == cPhs_COMPLEATE_e)) { if (cDmr_SkipInfo != 0 && !daMirror_c::remove()) { return cPhs_INIT_e; @@ -3412,7 +3412,7 @@ cPhs__Step daB_YO_c::create() { } } -static cPhs__Step daB_YO_Create(daB_YO_c* i_this) { +static cPhs_Step daB_YO_Create(daB_YO_c* i_this) { return i_this->create(); } diff --git a/src/d/actor/d_a_b_yo_ice.cpp b/src/d/actor/d_a_b_yo_ice.cpp index 085fb1e0d7..ca2c8e130b 100644 --- a/src/d/actor/d_a_b_yo_ice.cpp +++ b/src/d/actor/d_a_b_yo_ice.cpp @@ -1010,9 +1010,9 @@ static int useHeapInit(fopAc_ac_c* i_this) { } // data/rodata swap -cPhs__Step daB_YOI_c::create() { +cPhs_Step daB_YOI_c::create() { fopAcM_ct(this, daB_YOI_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, "B_YO"); + cPhs_Step step = dComIfG_resLoad(&mPhase, "B_YO"); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, useHeapInit, 0x1CA0)) { @@ -1087,7 +1087,7 @@ daB_YOI_c::daB_YOI_c() { /* empty function */ } -static cPhs__Step daB_YOI_Create(daB_YOI_c* i_this) { +static cPhs_Step daB_YOI_Create(daB_YOI_c* i_this) { return i_this->create(); } diff --git a/src/d/actor/d_a_bg.cpp b/src/d/actor/d_a_bg.cpp index be8960fc51..39f7e07990 100644 --- a/src/d/actor/d_a_bg.cpp +++ b/src/d/actor/d_a_bg.cpp @@ -10,6 +10,7 @@ #include "d/d_com_static.h" #include "d/actor/d_a_grass.h" #include "d/d_bg_w.h" +#include "d/d_bg_parts.h" #include "m_Do/m_Do_lib.h" #include "d/d_demo.h" #include "JSystem/JKernel/JKRExpHeap.h" diff --git a/src/d/actor/d_a_bg_obj.cpp b/src/d/actor/d_a_bg_obj.cpp index e8c934afab..bf131498f5 100644 --- a/src/d/actor/d_a_bg_obj.cpp +++ b/src/d/actor/d_a_bg_obj.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_bg_obj.h" #include "JSystem/J3DGraphBase/J3DMaterial.h" #include -#include "dolphin/os.h" +#include #include "d/actor/d_a_set_bgobj.h" #include "d/d_s_play.h" #include "SSystem/SComponent/c_math.h" diff --git a/src/d/actor/d_a_cow.cpp b/src/d/actor/d_a_cow.cpp index a13161b797..2b12092989 100644 --- a/src/d/actor/d_a_cow.cpp +++ b/src/d/actor/d_a_cow.cpp @@ -15,7 +15,7 @@ #include "d/d_com_inf_game.h" #include "d/d_meter2_info.h" #include "d/d_timer.h" -#include "dolphin/types.h" +#include #include "f_op/f_op_actor_mng.h" #include "f_op/f_op_camera_mng.h" #include "m_Do/m_Do_ext.h" diff --git a/src/d/actor/d_a_do.cpp b/src/d/actor/d_a_do.cpp index 420c0baf39..f8632be6c9 100644 --- a/src/d/actor/d_a_do.cpp +++ b/src/d/actor/d_a_do.cpp @@ -2402,11 +2402,11 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daDo_Create(fopAc_ac_c* i_this) { +static cPhs_Step daDo_Create(fopAc_ac_c* i_this) { do_class* _this = static_cast(i_this); fopAcM_ct(i_this, do_class); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhase, "Do"); + cPhs_Step step = dComIfG_resLoad(&_this->mPhase, "Do"); if (step == cPhs_COMPLEATE_e) { _this->mParam0 = fopAcM_GetParam(i_this) & 7; diff --git a/src/d/actor/d_a_door_boss.cpp b/src/d/actor/d_a_door_boss.cpp index 8bc8cee3f8..1b124f12bf 100644 --- a/src/d/actor/d_a_door_boss.cpp +++ b/src/d/actor/d_a_door_boss.cpp @@ -104,9 +104,9 @@ int daBdoor_c::CreateInit() { return 1; } -cPhs__Step daBdoor_c::create() { +cPhs_Step daBdoor_c::create() { fopAcM_ct(this, daBdoor_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, getArcName()); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, getArcName()); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, CheckCreateHeap, 0xa000)) { return cPhs_ERROR_e; @@ -404,7 +404,7 @@ static int daBdoor_Delete(daBdoor_c* i_this) { return 1; } -static cPhs__Step daBdoor_Create(fopAc_ac_c* i_this) { +static cPhs_Step daBdoor_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_e_ba.cpp b/src/d/actor/d_a_e_ba.cpp index 2c6134559d..f1271aa873 100644 --- a/src/d/actor/d_a_e_ba.cpp +++ b/src/d/actor/d_a_e_ba.cpp @@ -989,7 +989,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { } } -static cPhs__Step daE_BA_Create(fopAc_ac_c* i_this) { +static cPhs_Step daE_BA_Create(fopAc_ac_c* i_this) { static char* arc_name[3] = {"E_ba", "E_fb", "E_ib"}; static dCcD_SrcSph cc_sph_src = { @@ -1013,7 +1013,7 @@ static cPhs__Step daE_BA_Create(fopAc_ac_c* i_this) { } _this->mArcName = arc_name[_this->mType]; - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhase, _this->mArcName); + cPhs_Step step = dComIfG_resLoad(&_this->mPhase, _this->mArcName); if (step == cPhs_COMPLEATE_e) { int sw = fopAcM_GetParam(_this) >> 24; diff --git a/src/d/actor/d_a_e_bee.cpp b/src/d/actor/d_a_e_bee.cpp index 85ffee70bb..d0f182031d 100644 --- a/src/d/actor/d_a_e_bee.cpp +++ b/src/d/actor/d_a_e_bee.cpp @@ -716,11 +716,11 @@ static int useHeapInit(fopAc_ac_c* i_this) { return true; } -static cPhs__Step daE_Bee_Create(fopAc_ac_c* i_this) { +static cPhs_Step daE_Bee_Create(fopAc_ac_c* i_this) { e_bee_class* _this = static_cast(i_this); fopAcM_ct(_this, e_bee_class); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhase, "E_bee"); + cPhs_Step step = dComIfG_resLoad(&_this->mPhase, "E_bee"); if (step == cPhs_COMPLEATE_e) { _this->mParam0 = (u8)fopAcM_GetParam(_this); _this->mParam1 = (u8)(fopAcM_GetParam(_this) >> 8); diff --git a/src/d/actor/d_a_e_bi.cpp b/src/d/actor/d_a_e_bi.cpp index b5a43fa168..e6eb59aeb3 100644 --- a/src/d/actor/d_a_e_bi.cpp +++ b/src/d/actor/d_a_e_bi.cpp @@ -864,11 +864,11 @@ static int useHeapInit(fopAc_ac_c* actor) { return 1; } -static cPhs__Step daE_BI_Create(fopAc_ac_c* actor) { +static cPhs_Step daE_BI_Create(fopAc_ac_c* actor) { fopAcM_ct(actor, e_bi_class); e_bi_class* i_this = (e_bi_class*)actor; - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->phase, "E_BI"); + cPhs_Step phase = dComIfG_resLoad(&i_this->phase, "E_BI"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_BI PARAM %x\n", fopAcM_GetParam(actor)); diff --git a/src/d/actor/d_a_e_bug.cpp b/src/d/actor/d_a_e_bug.cpp index 51b0561706..d31174a14e 100644 --- a/src/d/actor/d_a_e_bug.cpp +++ b/src/d/actor/d_a_e_bug.cpp @@ -801,12 +801,12 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 1; } -static cPhs__Step daE_Bug_Create(fopAc_ac_c* a_this) { +static cPhs_Step daE_Bug_Create(fopAc_ac_c* a_this) { e_bug_class* i_this = (e_bug_class*)a_this; fopAcM_ct(a_this, e_bug_class); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, "E_bug"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, "E_bug"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_BUG PARAM %x\n", fopAcM_GetParam(a_this)); i_this->field_0x570 = fopAcM_GetParam(a_this); diff --git a/src/d/actor/d_a_e_dd.cpp b/src/d/actor/d_a_e_dd.cpp index 867d6a1335..e0de6cb03f 100644 --- a/src/d/actor/d_a_e_dd.cpp +++ b/src/d/actor/d_a_e_dd.cpp @@ -1661,11 +1661,11 @@ static int kabe_initial_pos_set(e_dd_class* i_this) { return 0; } -static cPhs__Step daE_DD_Create(fopAc_ac_c* a_this) { +static cPhs_Step daE_DD_Create(fopAc_ac_c* a_this) { e_dd_class* i_this = (e_dd_class*)a_this; fopAcM_ct(a_this, e_dd_class); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, "E_dd"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, "E_dd"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_DD PARAM %x\n", fopAcM_GetParam(a_this)); diff --git a/src/d/actor/d_a_e_df.cpp b/src/d/actor/d_a_e_df.cpp index a044b3d936..cd1fd1b187 100644 --- a/src/d/actor/d_a_e_df.cpp +++ b/src/d/actor/d_a_e_df.cpp @@ -649,7 +649,7 @@ static int daE_DF_Delete(daE_DF_c* i_this) { int daE_DF_c::Create() { fopAcM_ct(this, daE_DF_c); - cPhs__Step rv = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, "E_DF"); + cPhs_Step rv = dComIfG_resLoad(&mPhaseReq, "E_DF"); if (rv == cPhs_COMPLEATE_e) { OS_REPORT("E_DF PARAM %x\n", fopAcM_GetParam(this)); mArg0 = (u8)fopAcM_GetParam(this); diff --git a/src/d/actor/d_a_e_dn.cpp b/src/d/actor/d_a_e_dn.cpp index 2669c783b0..794458bbe6 100644 --- a/src/d/actor/d_a_e_dn.cpp +++ b/src/d/actor/d_a_e_dn.cpp @@ -3358,12 +3358,12 @@ static int useHeapInit(fopAc_ac_c* actor) { return 1; } -static cPhs__Step daE_DN_Create(fopAc_ac_c* actor) { +static cPhs_Step daE_DN_Create(fopAc_ac_c* actor) { e_dn_class* i_this = (e_dn_class*)actor; fopAcM_ct(actor, e_dn_class); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->phase, "E_dn"); + cPhs_Step phase = dComIfG_resLoad(&i_this->phase, "E_dn"); if (phase == cPhs_COMPLEATE_e) { int swBit = (fopAcM_GetParam(actor) & 0xFF000000) >> 24; if (swBit != 0xFF) { diff --git a/src/d/actor/d_a_e_dt.cpp b/src/d/actor/d_a_e_dt.cpp index 76034bb66d..7b52cf0f37 100644 --- a/src/d/actor/d_a_e_dt.cpp +++ b/src/d/actor/d_a_e_dt.cpp @@ -2456,18 +2456,18 @@ static int useHeapInit(fopAc_ac_c* i_this) { return static_cast(i_this)->CreateHeap(); } -cPhs__Step daE_DT_c::create() { +cPhs_Step daE_DT_c::create() { fopAcM_ct(this, daE_DT_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase[0], "E_DT"); + cPhs_Step step = dComIfG_resLoad(&mPhase[0], "E_DT"); if (step != cPhs_COMPLEATE_e) { return step; } - step = (cPhs__Step)dComIfG_resLoad(&mPhase[1], "Dalways"); + step = dComIfG_resLoad(&mPhase[1], "Dalways"); if (step != cPhs_COMPLEATE_e) { return step; } - step = (cPhs__Step)dComIfG_resLoad(&mPhase[2], "E_OT"); + step = dComIfG_resLoad(&mPhase[2], "E_OT"); if (step != cPhs_COMPLEATE_e) { return step; } @@ -2548,7 +2548,7 @@ cPhs__Step daE_DT_c::create() { return step; } -static cPhs__Step daE_DT_Create(daE_DT_c* i_this) { +static cPhs_Step daE_DT_Create(daE_DT_c* i_this) { return i_this->create(); } diff --git a/src/d/actor/d_a_e_fb.cpp b/src/d/actor/d_a_e_fb.cpp index bde1aea835..1fbbbc2410 100644 --- a/src/d/actor/d_a_e_fb.cpp +++ b/src/d/actor/d_a_e_fb.cpp @@ -907,7 +907,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return a_this->CreateHeap(); } -cPhs__Step daE_FB_c::create() { +cPhs_Step daE_FB_c::create() { fopAcM_ct(this, daE_FB_c); mType = fopAcM_GetParam(this); swBit0 = (fopAcM_GetParam(this) & 0xFF00) >> 8; @@ -916,7 +916,7 @@ cPhs__Step daE_FB_c::create() { mType = 0; } - cPhs__Step phase = (cPhs__Step) dComIfG_resLoad(&mPhaseReq, "E_FL"); + cPhs_Step phase = dComIfG_resLoad(&mPhaseReq, "E_FL"); if (phase == cPhs_COMPLEATE_e) { if (mType == 10 || mType == 11) { fopAcM_OffStatus(this, 0); diff --git a/src/d/actor/d_a_e_fs.cpp b/src/d/actor/d_a_e_fs.cpp index 7ab29d6fca..7e57585d0e 100644 --- a/src/d/actor/d_a_e_fs.cpp +++ b/src/d/actor/d_a_e_fs.cpp @@ -718,10 +718,10 @@ static int useHeapIe_fst(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daE_Fs_Create(fopAc_ac_c* i_this) { +static cPhs_Step daE_Fs_Create(fopAc_ac_c* i_this) { fopAcM_ct(i_this, e_fs_class); e_fs_class* _this = (e_fs_class*)(i_this); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhase, "E_FS"); + cPhs_Step step = dComIfG_resLoad(&_this->mPhase, "E_FS"); if (step == cPhs_COMPLEATE_e) { _this->field_0x5b4 = fopAcM_GetParam(_this) & 0xff; diff --git a/src/d/actor/d_a_e_gb.cpp b/src/d/actor/d_a_e_gb.cpp index d8fba44ccd..e3aff4c735 100644 --- a/src/d/actor/d_a_e_gb.cpp +++ b/src/d/actor/d_a_e_gb.cpp @@ -1614,7 +1614,7 @@ static int useHeapInit(fopAc_ac_c* actor) { return 1; } -static cPhs__Step daE_GB_Create(fopAc_ac_c* actor) { +static cPhs_Step daE_GB_Create(fopAc_ac_c* actor) { static dCcD_SrcSph head_cc_sph_src = { { {0x0, {{AT_TYPE_CSTATUE_SWING, 0x2, 0xd}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj @@ -1646,7 +1646,7 @@ static cPhs__Step daE_GB_Create(fopAc_ac_c* actor) { e_gb_class* i_this = (e_gb_class*)actor; fopAcM_ct(&i_this->actor, e_gb_class); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->phase, "E_gb"); + cPhs_Step phase = dComIfG_resLoad(&i_this->phase, "E_gb"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_gb PARAM %x\n", fopAcM_GetParam(actor)); u8 sw_bit = (fopAcM_GetParam(actor) & 0xFF0000) >> 16; diff --git a/src/d/actor/d_a_e_gm.cpp b/src/d/actor/d_a_e_gm.cpp index 228779b6ea..eef5561904 100644 --- a/src/d/actor/d_a_e_gm.cpp +++ b/src/d/actor/d_a_e_gm.cpp @@ -1699,7 +1699,7 @@ static u16 const l_heapsize[4] = { 0x3120, 0x3120, 0x21E0, 0x2DE0, }; -cPhs__Step daE_GM_c::create() { +cPhs_Step daE_GM_c::create() { fopAcM_ct(this, daE_GM_c); mType = fopAcM_GetParam(this); @@ -1727,11 +1727,11 @@ cPhs__Step daE_GM_c::create() { field_0xa54 = uVar1 * 100.0f; } - cPhs__Step phase; + cPhs_Step phase; if (mType == TYPE_GOMA) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhase, "E_mg"); + phase = dComIfG_resLoad(&mPhase, "E_mg"); } else { - phase = (cPhs__Step)dComIfG_resLoad(&mPhase, "E_gm"); + phase = dComIfG_resLoad(&mPhase, "E_gm"); } if (phase == cPhs_COMPLEATE_e) { diff --git a/src/d/actor/d_a_e_mf.cpp b/src/d/actor/d_a_e_mf.cpp index 3374b2a919..42ad76cfd7 100644 --- a/src/d/actor/d_a_e_mf.cpp +++ b/src/d/actor/d_a_e_mf.cpp @@ -3136,12 +3136,12 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 1; } -static cPhs__Step daE_MF_Create(fopAc_ac_c* a_this) { +static cPhs_Step daE_MF_Create(fopAc_ac_c* a_this) { e_mf_class* i_this = (e_mf_class*)a_this; fopAcM_ct(a_this, e_mf_class); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, "E_mf"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, "E_mf"); if (phase == cPhs_COMPLEATE_e) { int swBit = fopAcM_GetParam(a_this) >> 24; if (swBit != 0xFF) { diff --git a/src/d/actor/d_a_e_mm_mt.cpp b/src/d/actor/d_a_e_mm_mt.cpp index c0d2a120ef..92d02f20fc 100644 --- a/src/d/actor/d_a_e_mm_mt.cpp +++ b/src/d/actor/d_a_e_mm_mt.cpp @@ -750,7 +750,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { } static int daE_MM_MT_Create(fopAc_ac_c* i_this) { - cPhs__Step cVar1; + cPhs_Step cVar1; bool bVar2; f32 fVar3; diff --git a/src/d/actor/d_a_e_nest.cpp b/src/d/actor/d_a_e_nest.cpp index b02feff7bf..9da31111fd 100644 --- a/src/d/actor/d_a_e_nest.cpp +++ b/src/d/actor/d_a_e_nest.cpp @@ -959,11 +959,11 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daE_Nest_Create(fopAc_ac_c* i_this) { +static cPhs_Step daE_Nest_Create(fopAc_ac_c* i_this) { fopAcM_ct(i_this, e_nest_class); e_nest_class* _this = static_cast(i_this); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhase, "E_nest"); + cPhs_Step step = dComIfG_resLoad(&_this->mPhase, "E_nest"); if (step == cPhs_COMPLEATE_e) { _this->mBrokenSwitch = (u8)((u16)_this->current.angle.z >> 8); _this->shape_angle.z = 0; diff --git a/src/d/actor/d_a_e_oc.cpp b/src/d/actor/d_a_e_oc.cpp index 16f67be7e6..2dc8ee4845 100644 --- a/src/d/actor/d_a_e_oc.cpp +++ b/src/d/actor/d_a_e_oc.cpp @@ -2669,7 +2669,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return a_this->CreateHeap(); } -cPhs__Step daE_OC_c::create() { +cPhs_Step daE_OC_c::create() { fopAcM_ct(this, daE_OC_c); field_0x6b4 = fopAcM_GetParam(this) & 0xFF; if (field_0x6b4 == 0xFF) { @@ -2706,9 +2706,9 @@ cPhs__Step daE_OC_c::create() { mName = "E_OC2"; } - cPhs__Step phase = (cPhs__Step) dComIfG_resLoad(&mPhaseReqs[0], mName); + cPhs_Step phase = dComIfG_resLoad(&mPhaseReqs[0], mName); if (phase == cPhs_COMPLEATE_e) { - phase = (cPhs__Step) dComIfG_resLoad(&mPhaseReqs[1], "E_ocb"); + phase = dComIfG_resLoad(&mPhaseReqs[1], "E_ocb"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_OC PARAM %x\n", fopAcM_GetParam(this)); if (!fopAcM_entrySolidHeap(this, useHeapInit, 0x2e40)) { diff --git a/src/d/actor/d_a_e_oct_bg.cpp b/src/d/actor/d_a_e_oct_bg.cpp index 22b909882a..a16544f204 100644 --- a/src/d/actor/d_a_e_oct_bg.cpp +++ b/src/d/actor/d_a_e_oct_bg.cpp @@ -4,7 +4,7 @@ #include "d/dolzel_rel.h" // IWYU pragma: keep -#include "dolphin/types.h" +#include #include "d/actor/d_a_e_oct_bg.h" #include "f_op/f_op_actor_mng.h" diff --git a/src/d/actor/d_a_e_ot.cpp b/src/d/actor/d_a_e_ot.cpp index ac7ed366f7..e4849ccad6 100644 --- a/src/d/actor/d_a_e_ot.cpp +++ b/src/d/actor/d_a_e_ot.cpp @@ -741,10 +741,10 @@ static int useHeapInit(fopAc_ac_c* i_this) { return static_cast(i_this)->CreateHeap(); } -cPhs__Step daE_OT_c::create() { +cPhs_Step daE_OT_c::create() { fopAcM_ct(this, daE_OT_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, "E_OT"); + cPhs_Step step = dComIfG_resLoad(&mPhase, "E_OT"); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, useHeapInit, 0x1f40)) { return cPhs_ERROR_e; @@ -825,7 +825,7 @@ cPhs__Step daE_OT_c::create() { return step; } -static cPhs__Step daE_OT_Create(daE_OT_c* i_this) { +static cPhs_Step daE_OT_Create(daE_OT_c* i_this) { return i_this->create(); } diff --git a/src/d/actor/d_a_e_pm.cpp b/src/d/actor/d_a_e_pm.cpp index b9c75e830a..56041078ce 100644 --- a/src/d/actor/d_a_e_pm.cpp +++ b/src/d/actor/d_a_e_pm.cpp @@ -2794,9 +2794,9 @@ void daE_PM_c::SkipChk() { } } -cPhs__Step daE_PM_c::Create() { +cPhs_Step daE_PM_c::Create() { fopAcM_ct(this, daE_PM_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, "E_PM"); + cPhs_Step step = dComIfG_resLoad(&mPhase, "E_PM"); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, useHeapInit, 0x45E0)) { @@ -2855,7 +2855,7 @@ cPhs__Step daE_PM_c::Create() { return step; } -static cPhs__Step daE_PM_Create(fopAc_ac_c* i_this) { +static cPhs_Step daE_PM_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->Create(); } diff --git a/src/d/actor/d_a_e_rd.cpp b/src/d/actor/d_a_e_rd.cpp index 1efb1060bd..98e8ce700a 100644 --- a/src/d/actor/d_a_e_rd.cpp +++ b/src/d/actor/d_a_e_rd.cpp @@ -7274,7 +7274,7 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 1; } -static cPhs__Step daE_RD_Create(fopAc_ac_c* a_this) { +static cPhs_Step daE_RD_Create(fopAc_ac_c* a_this) { e_rd_class* i_this = (e_rd_class*)a_this; fopAcM_ct(&i_this->actor, e_rd_class); @@ -7302,7 +7302,7 @@ static cPhs__Step daE_RD_Create(fopAc_ac_c* a_this) { i_this->mResName = "E_RD"; } - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, i_this->mResName); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, i_this->mResName); if (phase == cPhs_COMPLEATE_e) { if (strcmp(dComIfGp_getStartStageName(), "F_SP124") == 0) { // Gerudo Desert diff --git a/src/d/actor/d_a_e_rdy.cpp b/src/d/actor/d_a_e_rdy.cpp index d8d86885dc..c12cfef2d9 100644 --- a/src/d/actor/d_a_e_rdy.cpp +++ b/src/d/actor/d_a_e_rdy.cpp @@ -4869,7 +4869,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daE_RDY_Create(fopAc_ac_c* i_this) { +static cPhs_Step daE_RDY_Create(fopAc_ac_c* i_this) { e_rdy_class* _this = (e_rdy_class*)i_this; fopAcM_ct(&_this->actor, e_rdy_class); @@ -4881,7 +4881,7 @@ static cPhs__Step daE_RDY_Create(fopAc_ac_c* i_this) { } _this->mpArcName = "E_rdy"; - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhase, _this->mpArcName); + cPhs_Step step = dComIfG_resLoad(&_this->mPhase, _this->mpArcName); if (step == cPhs_COMPLEATE_e) { OS_REPORT("E_RDY PARAM %x\n", fopAcM_GetParam(i_this)); if (_this->field_0x5b8 != 3) { diff --git a/src/d/actor/d_a_e_sb.cpp b/src/d/actor/d_a_e_sb.cpp index 1c20108a0e..d876993191 100644 --- a/src/d/actor/d_a_e_sb.cpp +++ b/src/d/actor/d_a_e_sb.cpp @@ -1094,9 +1094,9 @@ static int daE_SB_Delete(daE_SB_c* i_this) { return i_this->Delete(); } -cPhs__Step daE_SB_c::Create() { +cPhs_Step daE_SB_c::Create() { fopAcM_ct(this, daE_SB_c); - cPhs__Step phase = (cPhs__Step) dComIfG_resLoad(&mPhaseReq, "E_SB"); + cPhs_Step phase = dComIfG_resLoad(&mPhaseReq, "E_SB"); if (phase == cPhs_COMPLEATE_e) { field_0x61a = fopAcM_GetParam(this); if (field_0x61a != 0xFF && dComIfGs_isSwitch(field_0x61a, fopAcM_GetRoomNo(this))) { diff --git a/src/d/actor/d_a_e_sf.cpp b/src/d/actor/d_a_e_sf.cpp index 45bf84f63c..55414997c4 100644 --- a/src/d/actor/d_a_e_sf.cpp +++ b/src/d/actor/d_a_e_sf.cpp @@ -1739,11 +1739,11 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 1; } -static cPhs__Step daE_SF_Create(fopAc_ac_c* a_this) { +static cPhs_Step daE_SF_Create(fopAc_ac_c* a_this) { e_sf_class* i_this = (e_sf_class*)a_this; fopAcM_ct(a_this, e_sf_class); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, "E_sf"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, "E_sf"); if (phase == cPhs_COMPLEATE_e) { i_this->mSwBit = a_this->current.angle.z & 0xFF; if (i_this->mSwBit != 0xFF) { diff --git a/src/d/actor/d_a_e_sg.cpp b/src/d/actor/d_a_e_sg.cpp index 6e24f68b3c..36abce70fd 100644 --- a/src/d/actor/d_a_e_sg.cpp +++ b/src/d/actor/d_a_e_sg.cpp @@ -1163,7 +1163,7 @@ static int daE_SG_Create(fopAc_ac_c* i_this) { e_sg_class* a_this = static_cast(i_this); fopAcM_ct(i_this, e_sg_class); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&a_this->mPhaseReq, "E_sg"); + cPhs_Step step = dComIfG_resLoad(&a_this->mPhaseReq, "E_sg"); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(i_this, useHeapInit, 4000)) { diff --git a/src/d/actor/d_a_e_sm.cpp b/src/d/actor/d_a_e_sm.cpp index a00d3a2f62..9814a6021a 100644 --- a/src/d/actor/d_a_e_sm.cpp +++ b/src/d/actor/d_a_e_sm.cpp @@ -1895,10 +1895,10 @@ void daE_SM_c::initCoSph() { mCoCore.OnTgNoHitMark(); } -cPhs__Step daE_SM_c::Create() { +cPhs_Step daE_SM_c::Create() { fopAcM_ct(this, daE_SM_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, "E_SM"); + cPhs_Step phase = dComIfG_resLoad(&mPhase, "E_SM"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_SM PARAM %x\n", fopAcM_GetParam(this)); diff --git a/src/d/actor/d_a_e_st.cpp b/src/d/actor/d_a_e_st.cpp index 746f1a208c..e5b148b07a 100644 --- a/src/d/actor/d_a_e_st.cpp +++ b/src/d/actor/d_a_e_st.cpp @@ -3005,11 +3005,11 @@ static BOOL roof_initial_pos_set(e_st_class* i_this) { return FALSE; } -static cPhs__Step daE_ST_Create(fopAc_ac_c* a_this) { +static cPhs_Step daE_ST_Create(fopAc_ac_c* a_this) { e_st_class* i_this = (e_st_class*)a_this; fopAcM_ct(&i_this->actor, e_st_class); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, "E_st"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, "E_st"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_st PARAM %x\n", fopAcM_GetParam(a_this)); i_this->arg0 = fopAcM_GetParam(a_this) & 0xF; diff --git a/src/d/actor/d_a_e_sw.cpp b/src/d/actor/d_a_e_sw.cpp index 0e80cb7ec6..62b0ada490 100644 --- a/src/d/actor/d_a_e_sw.cpp +++ b/src/d/actor/d_a_e_sw.cpp @@ -1638,7 +1638,7 @@ static int useHeapInit(fopAc_ac_c* a_this) { return i_this->CreateHeap(); } -cPhs__Step daE_SW_c::create() { +cPhs_Step daE_SW_c::create() { fopAcM_ct(this, daE_SW_c); field_0x68c = fopAcM_GetParam(this) & 15; @@ -1682,7 +1682,7 @@ cPhs__Step daE_SW_c::create() { field_0x696 = 0xFF; } - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, "E_SW"); + cPhs_Step phase = dComIfG_resLoad(&mPhase, "E_SW"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_SW PARAM %x %d %d\n", fopAcM_GetParam(this), field_0x696, fopAcM_GetID(this)); shape_angle.x = 0; diff --git a/src/d/actor/d_a_e_tk.cpp b/src/d/actor/d_a_e_tk.cpp index 96aae1b85f..dbe22e40f4 100644 --- a/src/d/actor/d_a_e_tk.cpp +++ b/src/d/actor/d_a_e_tk.cpp @@ -736,7 +736,7 @@ static int daE_TK_Create(fopAc_ac_c* actor) { e_tk_class* i_this = (e_tk_class*)actor; fopAcM_ct(i_this, e_tk_class); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhaseReq, "E_tk"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhaseReq, "E_tk"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_tk PARAM %x\n", fopAcM_GetParam(actor)); i_this->mArg0 = (fopAcM_GetParam(actor) & 0xFF) >> 0; diff --git a/src/d/actor/d_a_e_tk2.cpp b/src/d/actor/d_a_e_tk2.cpp index 4215e02dab..4d2b62d295 100644 --- a/src/d/actor/d_a_e_tk2.cpp +++ b/src/d/actor/d_a_e_tk2.cpp @@ -548,7 +548,7 @@ static int daE_TK2_Create(fopAc_ac_c* actor) { e_tk2_class* i_this = (e_tk2_class*)actor; fopAcM_ct(i_this, e_tk2_class); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhaseReq, "E_tk2"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhaseReq, "E_tk2"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_tk2 PARAM %x\n", fopAcM_GetParam(actor)); i_this->mArg0 = (fopAcM_GetParam(actor) & 0xFF) >> 0; diff --git a/src/d/actor/d_a_e_tk_ball.cpp b/src/d/actor/d_a_e_tk_ball.cpp index c1ca119e2e..529eec4a89 100644 --- a/src/d/actor/d_a_e_tk_ball.cpp +++ b/src/d/actor/d_a_e_tk_ball.cpp @@ -396,13 +396,13 @@ static int daE_TK_BALL_Create(fopAc_ac_c* i_this) { actor->mType = TYPE_TK_BALL_WATER; } - cPhs__Step phase; + cPhs_Step phase; u32 size; if (actor->mType == TYPE_TK_BALL_WATER) { - phase = (cPhs__Step)dComIfG_resLoad(&actor->mPhaseReq, "E_tk"); + phase = dComIfG_resLoad(&actor->mPhaseReq, "E_tk"); size = 0x820; } else { - phase = (cPhs__Step)dComIfG_resLoad(&actor->mPhaseReq, "E_tk2"); + phase = dComIfG_resLoad(&actor->mPhaseReq, "E_tk2"); size = 0xEE0; } diff --git a/src/d/actor/d_a_e_yc.cpp b/src/d/actor/d_a_e_yc.cpp index 7dc53234c4..f6b975f4e9 100644 --- a/src/d/actor/d_a_e_yc.cpp +++ b/src/d/actor/d_a_e_yc.cpp @@ -752,11 +752,11 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daE_YC_Create(fopAc_ac_c* i_this) { +static cPhs_Step daE_YC_Create(fopAc_ac_c* i_this) { e_yc_class* _this = static_cast(i_this); fopAcM_ct(i_this, e_yc_class); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhase, "E_yc"); + cPhs_Step step = dComIfG_resLoad(&_this->mPhase, "E_yc"); if (step == cPhs_COMPLEATE_e) { _this->mParam = (u8)fopAcM_GetParam(_this); diff --git a/src/d/actor/d_a_e_yg.cpp b/src/d/actor/d_a_e_yg.cpp index 0b0bd774d8..f0a3059f62 100644 --- a/src/d/actor/d_a_e_yg.cpp +++ b/src/d/actor/d_a_e_yg.cpp @@ -1332,12 +1332,12 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 1; } -static cPhs__Step daE_YG_Create(fopAc_ac_c* actor) { +static cPhs_Step daE_YG_Create(fopAc_ac_c* actor) { e_yg_class* i_this = (e_yg_class*)actor; fopAcM_ct(&i_this->actor, e_yg_class); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, "E_YG"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, "E_YG"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_YG PARAM %x\n", fopAcM_GetParam(actor)); diff --git a/src/d/actor/d_a_e_ymb.cpp b/src/d/actor/d_a_e_ymb.cpp index 483139b0d6..c1d39eccec 100644 --- a/src/d/actor/d_a_e_ymb.cpp +++ b/src/d/actor/d_a_e_ymb.cpp @@ -3156,7 +3156,7 @@ static int useHeapInit(fopAc_ac_c* a_this) { return i_this->CreateHeap(); } -cPhs__Step daE_YMB_c::create() { +cPhs_Step daE_YMB_c::create() { fopAcM_ct(this, daE_YMB_c); mSwitchBit = fopAcM_GetParam(this); @@ -3168,7 +3168,7 @@ cPhs__Step daE_YMB_c::create() { } } - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, "E_YB"); + cPhs_Step phase = dComIfG_resLoad(&mPhase, "E_YB"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_YMB PARAM %x\n", fopAcM_GetParam(this)); if (!fopAcM_entrySolidHeap(this, useHeapInit, 0x5200)) { diff --git a/src/d/actor/d_a_e_zh.cpp b/src/d/actor/d_a_e_zh.cpp index 04385996af..4cae4a1adc 100644 --- a/src/d/actor/d_a_e_zh.cpp +++ b/src/d/actor/d_a_e_zh.cpp @@ -2165,10 +2165,10 @@ static int useHeapInit(fopAc_ac_c* a_this) { return i_this->CreateHeap(); } -cPhs__Step daE_ZH_c::create() { +cPhs_Step daE_ZH_c::create() { fopAcM_ct(this, daE_ZH_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, "E_ZH"); + cPhs_Step phase = dComIfG_resLoad(&mPhase, "E_ZH"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_ZH PARAM %x\n", fopAcM_GetParam(this)); arg0 = fopAcM_GetParam(this); diff --git a/src/d/actor/d_a_e_zm.cpp b/src/d/actor/d_a_e_zm.cpp index f32c8c2fe0..e8cc184b1a 100644 --- a/src/d/actor/d_a_e_zm.cpp +++ b/src/d/actor/d_a_e_zm.cpp @@ -904,10 +904,10 @@ static int useHeapInit(fopAc_ac_c* a_this) { return static_cast(a_this)->CreateHeap(); } -cPhs__Step daE_ZM_c::create() { +cPhs_Step daE_ZM_c::create() { fopAcM_ct(this, daE_ZM_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, "E_ZM"); + cPhs_Step phase = dComIfG_resLoad(&mPhase, "E_ZM"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("E_ZM PARAM %x\n", fopAcM_GetParam(this)); diff --git a/src/d/actor/d_a_mg_fish.cpp b/src/d/actor/d_a_mg_fish.cpp index 2809c7ce7f..16ed251d30 100644 --- a/src/d/actor/d_a_mg_fish.cpp +++ b/src/d/actor/d_a_mg_fish.cpp @@ -3854,8 +3854,8 @@ static int daMg_Fish_Create(fopAc_ac_c* i_this) { lit_1008 = 1; #endif - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&a_this->mPhaseReq, a_this->mResName); - cPhs__Step retval = phase; + cPhs_Step phase = dComIfG_resLoad(&a_this->mPhaseReq, a_this->mResName); + cPhs_Step retval = phase; if (phase == cPhs_COMPLEATE_e) { s32 params_0 = fopAcM_GetParam(i_this) >> 24; diff --git a/src/d/actor/d_a_midna.cpp b/src/d/actor/d_a_midna.cpp index 250f7e2032..afaccaf13b 100644 --- a/src/d/actor/d_a_midna.cpp +++ b/src/d/actor/d_a_midna.cpp @@ -541,9 +541,9 @@ daMidna_hio_c::daMidna_hio_c() { } #endif -cPhs__Step daMidna_c::create() { +cPhs_Step daMidna_c::create() { fopAcM_ct(this, daMidna_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step step = dComIfG_resLoad(&mPhase, l_arcName); if (step == cPhs_COMPLEATE_e) { if (dStage_roomControl_c::getDemoArcName()[0] != '\0' && @@ -663,7 +663,7 @@ cPhs__Step daMidna_c::create() { return step; } -static cPhs__Step daMidna_Create(fopAc_ac_c* i_this) { +static cPhs_Step daMidna_Create(fopAc_ac_c* i_this) { daMidna_c* a_this = (daMidna_c*)i_this; fopAcM_RegisterCreateID(i_this, "MIDNA"); return a_this->create(); diff --git a/src/d/actor/d_a_mirror.cpp b/src/d/actor/d_a_mirror.cpp index a15d2fd2ce..35cd34d8cf 100644 --- a/src/d/actor/d_a_mirror.cpp +++ b/src/d/actor/d_a_mirror.cpp @@ -10,8 +10,8 @@ #include "JSystem/J3DGraphBase/J3DMaterial.h" #include "d/actor/d_a_player.h" #include "d/d_com_inf_game.h" -#include "dolphin/gf/GFGeometry.h" -#include "dolphin/gf/GFLight.h" +#include +#include #include "m_Do/m_Do_lib.h" static BOOL daMirror_c_createHeap(fopAc_ac_c* i_this) { diff --git a/src/d/actor/d_a_myna.cpp b/src/d/actor/d_a_myna.cpp index 3f153bcad4..6e28336fd2 100644 --- a/src/d/actor/d_a_myna.cpp +++ b/src/d/actor/d_a_myna.cpp @@ -333,7 +333,7 @@ daMyna_c::BaseMotionFunc daMyna_c::mBaseMotionTBL[] = { int daMyna_c::create() { fopAcM_ct(this, daMyna_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, "Npc_myna"); + cPhs_Step phase = dComIfG_resLoad(&mPhase, "Npc_myna"); if (phase != cPhs_COMPLEATE_e) { return phase; } diff --git a/src/d/actor/d_a_npc_aru.cpp b/src/d/actor/d_a_npc_aru.cpp index d90ce03d80..9ad1f1029a 100644 --- a/src/d/actor/d_a_npc_aru.cpp +++ b/src/d/actor/d_a_npc_aru.cpp @@ -382,7 +382,7 @@ daNpc_Aru_c::~daNpc_Aru_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -cPhs__Step daNpc_Aru_c::create() { +cPhs_Step daNpc_Aru_c::create() { daNpcT_ct(this, daNpc_Aru_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -390,7 +390,7 @@ cPhs__Step daNpc_Aru_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), mType, mFlowNodeNo, getPathID(), fopAcM_GetParam(this)); diff --git a/src/d/actor/d_a_npc_ash.cpp b/src/d/actor/d_a_npc_ash.cpp index 6cbd2c6a46..5f285ace08 100644 --- a/src/d/actor/d_a_npc_ash.cpp +++ b/src/d/actor/d_a_npc_ash.cpp @@ -218,8 +218,8 @@ daNpcAsh_c::~daNpcAsh_c() { } } -cPhs__Step daNpcAsh_c::Create() { - cPhs__Step step; +cPhs_Step daNpcAsh_c::Create() { + cPhs_Step step; fopAcM_ct(this, daNpcAsh_c); @@ -249,7 +249,7 @@ cPhs__Step daNpcAsh_c::Create() { u32 i = 0; int arcIndex; while (arcIndex = l_loadRes_list[mType][i], arcIndex >= 0) { - step = (cPhs__Step)dComIfG_resLoad(&mPhase[i], l_arcNames[arcIndex]); + step = dComIfG_resLoad(&mPhase[i], l_arcNames[arcIndex]); if (step != cPhs_COMPLEATE_e) { return step; } @@ -1195,7 +1195,7 @@ BOOL daNpcAsh_c::EvCut_WiretapEntrant(int i_staffID) { return true; } -static cPhs__Step daNpcAsh_Create(void* i_this) { +static cPhs_Step daNpcAsh_Create(void* i_this) { return static_cast(i_this)->Create(); } diff --git a/src/d/actor/d_a_npc_ashB.cpp b/src/d/actor/d_a_npc_ashB.cpp index 4ddaba8dbf..237c93aa58 100644 --- a/src/d/actor/d_a_npc_ashB.cpp +++ b/src/d/actor/d_a_npc_ashB.cpp @@ -115,8 +115,8 @@ daNpcAshB_c::~daNpcAshB_c() { #endif } -cPhs__Step daNpcAshB_c::Create() { - cPhs__Step step; +cPhs_Step daNpcAshB_c::Create() { + cPhs_Step step; fopAcM_ct(this, daNpcAshB_c); @@ -132,7 +132,7 @@ cPhs__Step daNpcAshB_c::Create() { step = cPhs_ERROR_e; for (int i = 0; i < 1; i++) { - step = (cPhs__Step)dComIfG_resLoad(&mPhase[i], l_arcNames[i]); + step = dComIfG_resLoad(&mPhase[i], l_arcNames[i]); if (step != cPhs_COMPLEATE_e) { return step; } @@ -1066,7 +1066,7 @@ BOOL daNpcAshB_c::EvCut_Appear(int i_staffID) { return FALSE; } -static cPhs__Step daNpcAshB_Create(void* i_this) { +static cPhs_Step daNpcAshB_Create(void* i_this) { return static_cast(i_this)->Create(); } diff --git a/src/d/actor/d_a_npc_bans.cpp b/src/d/actor/d_a_npc_bans.cpp index 4a2418ce05..8bb1ec6260 100644 --- a/src/d/actor/d_a_npc_bans.cpp +++ b/src/d/actor/d_a_npc_bans.cpp @@ -372,7 +372,7 @@ daNpc_Bans_c::~daNpc_Bans_c() { static NPC_BANS_HIO_CLASS l_HIO; -cPhs__Step daNpc_Bans_c::create() { +cPhs_Step daNpc_Bans_c::create() { daNpcT_ct(this, daNpc_Bans_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -380,7 +380,7 @@ cPhs__Step daNpc_Bans_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = dKy_darkworld_check(); - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x, MaxItem:%d, group:%d<%08x> ", fopAcM_getProcNameString(this), mType, mFlowNodeNo, getPathID(), getMaxNumItem(), getGroupId(), fopAcM_GetParam(this)); diff --git a/src/d/actor/d_a_npc_besu.cpp b/src/d/actor/d_a_npc_besu.cpp index 5bbdf7f720..366dcacb2e 100644 --- a/src/d/actor/d_a_npc_besu.cpp +++ b/src/d/actor/d_a_npc_besu.cpp @@ -653,7 +653,7 @@ int daNpc_Besu_c::create() { mTwilight = false; } - cPhs__Step rv = (cPhs__Step) loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step rv = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (rv == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x, BitSW:%02x<%08x> ", fopAcM_getProcNameString(this), mType, mFlowNodeNo, getPathID(), diff --git a/src/d/actor/d_a_npc_bouS.cpp b/src/d/actor/d_a_npc_bouS.cpp index 64a34061ea..2eb763f042 100644 --- a/src/d/actor/d_a_npc_bouS.cpp +++ b/src/d/actor/d_a_npc_bouS.cpp @@ -330,14 +330,14 @@ daNpcBouS_HIOParam const daNpcBouS_Param_c::m = { 0, }; -cPhs__Step daNpcBouS_c::Create() { +cPhs_Step daNpcBouS_c::Create() { fopAcM_ct(this, daNpcBouS_c); mMsgNo = getMessageNo(); - cPhs__Step phase = cPhs_ERROR_e; + cPhs_Step phase = cPhs_ERROR_e; for (int i = 0; i < 2; i++) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_arcNames[i]); + phase = dComIfG_resLoad(&mPhases[i], l_arcNames[i]); if (phase != cPhs_COMPLEATE_e) { return phase; diff --git a/src/d/actor/d_a_npc_chat.cpp b/src/d/actor/d_a_npc_chat.cpp index f366e69161..2099c572f1 100644 --- a/src/d/actor/d_a_npc_chat.cpp +++ b/src/d/actor/d_a_npc_chat.cpp @@ -2494,38 +2494,38 @@ bool daNpcChat_c::isM_() { return a_jntNum == JntM_NUM_e; } -cPhs__Step daNpcChat_c::loadResrc(int idx, int param_2) { - cPhs__Step rv = cPhs_COMPLEATE_e; +cPhs_Step daNpcChat_c::loadResrc(int idx, int param_2) { + cPhs_Step rv = cPhs_COMPLEATE_e; if (mTwilight) { - rv = (cPhs__Step)dComIfG_resLoad(&mPhase1, l_resNameTbl[idx][1]); + rv = dComIfG_resLoad(&mPhase1, l_resNameTbl[idx][1]); if (rv != cPhs_COMPLEATE_e) { return rv; } } else { - rv = (cPhs__Step)dComIfG_resLoad(&mPhase1, l_resNameTbl[idx][0]); + rv = dComIfG_resLoad(&mPhase1, l_resNameTbl[idx][0]); if (rv != cPhs_COMPLEATE_e) { return rv; } } - rv = (cPhs__Step)dComIfG_resLoad(&mPhase2, l_resNameTbl[idx][2]); + rv = dComIfG_resLoad(&mPhase2, l_resNameTbl[idx][2]); if (rv != cPhs_COMPLEATE_e) { return rv; } if (param_2 != 0 || field_0xe51 == 1) { - rv = (cPhs__Step)dComIfG_resLoad(&mPhase3, l_resNameTbl[idx][3]); + rv = dComIfG_resLoad(&mPhase3, l_resNameTbl[idx][3]); if (rv != cPhs_COMPLEATE_e) { return rv; } if (mTwilight) { - rv = (cPhs__Step)dComIfG_resLoad(&mPhase4, l_resNameTbl[idx][5]); + rv = dComIfG_resLoad(&mPhase4, l_resNameTbl[idx][5]); if (rv != cPhs_COMPLEATE_e) { return rv; } } else { - rv = (cPhs__Step)dComIfG_resLoad(&mPhase4, l_resNameTbl[idx][4]); + rv = dComIfG_resLoad(&mPhase4, l_resNameTbl[idx][4]); if (rv != cPhs_COMPLEATE_e) { return rv; } @@ -2675,7 +2675,7 @@ inline f32 CylH(int type) { return (f32)(type < 16 ? a_prmTbl_M[type].field_0x30 : a_prmTbl_W[type - 16].field_0x30); } -cPhs__Step daNpcChat_c::Create() { +cPhs_Step daNpcChat_c::Create() { fopAcM_ct(this, daNpcChat_c); mTwilight = dKy_darkworld_check(); @@ -2701,7 +2701,7 @@ cPhs__Step daNpcChat_c::Create() { mMsgNo = getMessageNo(); - cPhs__Step phase = loadResrc(mType, mObjNum); + cPhs_Step phase = loadResrc(mType, mObjNum); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x800022E0)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_chin.cpp b/src/d/actor/d_a_npc_chin.cpp index 5986711619..500ff60eaa 100644 --- a/src/d/actor/d_a_npc_chin.cpp +++ b/src/d/actor/d_a_npc_chin.cpp @@ -243,7 +243,7 @@ int daNpcChin_c::Create() { int i = 0; while (*idx >= 0) { OS_REPORT("--- arc : %s\n", l_arcNames[*idx]); - phase_state = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_arcNames[*idx]); + phase_state = dComIfG_resLoad(&mPhases[i], l_arcNames[*idx]); if (phase_state != cPhs_COMPLEATE_e) { return phase_state; } diff --git a/src/d/actor/d_a_npc_coach.cpp b/src/d/actor/d_a_npc_coach.cpp index aadb0e25f7..759f9b82be 100644 --- a/src/d/actor/d_a_npc_coach.cpp +++ b/src/d/actor/d_a_npc_coach.cpp @@ -2009,10 +2009,10 @@ static int daNpcCoach_Create(fopAc_ac_c* a_this) { return i_this->create(); } -cPhs__Step daNpcCoach_c::create() { +cPhs_Step daNpcCoach_c::create() { fopAcM_ct(this, daNpcCoach_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_arcName); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createSolidHeap, 0x7D60)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_df.cpp b/src/d/actor/d_a_npc_df.cpp index 811cc82019..daba4eb8df 100644 --- a/src/d/actor/d_a_npc_df.cpp +++ b/src/d/actor/d_a_npc_df.cpp @@ -359,11 +359,11 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daNpc_Df_Create(fopAc_ac_c* i_this) { +static cPhs_Step daNpc_Df_Create(fopAc_ac_c* i_this) { fopAcM_ct(i_this, npc_df_class); npc_df_class* actor = (npc_df_class*)i_this; - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&actor->mPhase, "Npc_df"); + cPhs_Step phase = dComIfG_resLoad(&actor->mPhase, "Npc_df"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("NPC_DF PARAM %x\n", fopAcM_GetParam(i_this)); actor->field_0x570 = fopAcM_GetParam(i_this); diff --git a/src/d/actor/d_a_npc_doorboy.cpp b/src/d/actor/d_a_npc_doorboy.cpp index 8bebf0dfb4..edd785c781 100644 --- a/src/d/actor/d_a_npc_doorboy.cpp +++ b/src/d/actor/d_a_npc_doorboy.cpp @@ -185,14 +185,14 @@ daNpcDoorBoy_c::~daNpcDoorBoy_c() { #endif } -cPhs__Step daNpcDoorBoy_c::Create() { +cPhs_Step daNpcDoorBoy_c::Create() { fopAcM_ct(this, daNpcDoorBoy_c); mMessageNo = (s16)getMessageNo(); - cPhs__Step phase = cPhs_ERROR_e; + cPhs_Step phase = cPhs_ERROR_e; for (int i = 0; i < 2; i++) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_arcNames[i]); + phase = dComIfG_resLoad(&mPhases[i], l_arcNames[i]); if (phase != cPhs_COMPLEATE_e) { return phase; diff --git a/src/d/actor/d_a_npc_du.cpp b/src/d/actor/d_a_npc_du.cpp index 39e7dd923d..9443a720ed 100644 --- a/src/d/actor/d_a_npc_du.cpp +++ b/src/d/actor/d_a_npc_du.cpp @@ -632,11 +632,11 @@ static int useHeapInit(fopAc_ac_c* actor) { return 1; } -static cPhs__Step daNpc_Du_Create(fopAc_ac_c* a_this) { +static cPhs_Step daNpc_Du_Create(fopAc_ac_c* a_this) { npc_du_class* i_this = (npc_du_class*)a_this; fopAcM_ct(a_this, npc_du_class); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, "Npc_Du"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, "Npc_Du"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("NPC_DU PARAM %x\n", fopAcM_GetParam(a_this)); i_this->arg0 = fopAcM_GetParam(a_this); diff --git a/src/d/actor/d_a_npc_fairy.cpp b/src/d/actor/d_a_npc_fairy.cpp index b5b90495d8..c1187ab9e5 100644 --- a/src/d/actor/d_a_npc_fairy.cpp +++ b/src/d/actor/d_a_npc_fairy.cpp @@ -518,7 +518,7 @@ daNpc_Fairy_c::~daNpc_Fairy_c() { static NPC_FAIRY_HIO_CLASS l_HIO; -cPhs__Step daNpc_Fairy_c::Create() { +cPhs_Step daNpc_Fairy_c::Create() { daNpcT_ct(this, daNpc_Fairy_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -526,7 +526,7 @@ cPhs__Step daNpc_Fairy_c::Create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x8000)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_fguard.cpp b/src/d/actor/d_a_npc_fguard.cpp index 69a087156a..228cf38b7d 100644 --- a/src/d/actor/d_a_npc_fguard.cpp +++ b/src/d/actor/d_a_npc_fguard.cpp @@ -35,14 +35,14 @@ static int daNpcFgd_Create(void* a_this) { return static_cast(a_this)->create(); } -cPhs__Step daNpcFgd_c::create() { +cPhs_Step daNpcFgd_c::create() { fopAcM_ct(this, daNpcFgd_c); mIsDarkWorld = dKy_darkworld_check(); m_type = getType(); mObjNum = getObjNum(); - cPhs__Step phase = (cPhs__Step)loadResrc(m_type, mObjNum); + cPhs_Step phase = loadResrc(m_type, mObjNum); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x1910)) { OS_REPORT("隊列兵士アクター生成失敗しました!\n"); // Failed to generate the squad soldier actor! diff --git a/src/d/actor/d_a_npc_grc.cpp b/src/d/actor/d_a_npc_grc.cpp index c226de23cf..39637c0317 100644 --- a/src/d/actor/d_a_npc_grc.cpp +++ b/src/d/actor/d_a_npc_grc.cpp @@ -301,7 +301,7 @@ daNpc_grC_c::~daNpc_grC_c() { #endif } -cPhs__Step daNpc_grC_c::create() { +cPhs_Step daNpc_grC_c::create() { fopAcM_ct(this, daNpc_grC_c); mTwilight = dKy_darkworld_check(); @@ -320,7 +320,7 @@ cPhs__Step daNpc_grC_c::create() { int res_count = 0; int i = 0; for (; l_loadRes_list[mType][i] >= 0; i++) { - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); + cPhs_Step step = dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); if (step == cPhs_ERROR_e || step == cPhs_UNK3_e) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_grm.cpp b/src/d/actor/d_a_npc_grm.cpp index c7b9ab1877..96e22082a0 100644 --- a/src/d/actor/d_a_npc_grm.cpp +++ b/src/d/actor/d_a_npc_grm.cpp @@ -169,7 +169,7 @@ daNpc_grM_c::~daNpc_grM_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -cPhs__Step daNpc_grM_c::create() { +cPhs_Step daNpc_grM_c::create() { daNpcT_ct(this, daNpc_grM_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -177,7 +177,7 @@ cPhs__Step daNpc_grM_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x3730)) { return cPhs_ERROR_e; @@ -791,7 +791,7 @@ int daNpc_grM_c::shop(void* param_0) { return 0; } -static cPhs__Step daNpc_grM_Create(void* param_0) { +static cPhs_Step daNpc_grM_Create(void* param_0) { return static_cast(param_0)->create(); } diff --git a/src/d/actor/d_a_npc_grmc.cpp b/src/d/actor/d_a_npc_grmc.cpp index 15904ef3c2..d88ff0fa3d 100644 --- a/src/d/actor/d_a_npc_grmc.cpp +++ b/src/d/actor/d_a_npc_grmc.cpp @@ -230,7 +230,7 @@ void daNpc_grMC_HIO_c::genMessage(JORMContext* ctx) { } #endif -cPhs__Step daNpc_grMC_c::create() { +cPhs_Step daNpc_grMC_c::create() { daNpcT_ct(this, daNpc_grMC_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -238,7 +238,7 @@ cPhs__Step daNpc_grMC_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x35D0)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_gro.cpp b/src/d/actor/d_a_npc_gro.cpp index 1ac21f7cc5..564d0b1d8b 100644 --- a/src/d/actor/d_a_npc_gro.cpp +++ b/src/d/actor/d_a_npc_gro.cpp @@ -390,7 +390,7 @@ daNpc_grO_HIOParam const daNpc_grO_Param_c::m = { false, }; -cPhs__Step daNpc_grO_c::create() { +cPhs_Step daNpc_grO_c::create() { fopAcM_ct(this, daNpc_grO_c); mType = getTypeFromParam(); @@ -405,11 +405,11 @@ cPhs__Step daNpc_grO_c::create() { return cPhs_ERROR_e; } - cPhs__Step phase; + cPhs_Step phase; int res = 0; int i = 0; for (; l_loadRes_list[mType][i] >= 0; i++) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); + phase = dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); if (phase == cPhs_ERROR_e || phase == cPhs_UNK3_e) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_npc_grr.cpp b/src/d/actor/d_a_npc_grr.cpp index 93271a80cc..a01093ccb6 100644 --- a/src/d/actor/d_a_npc_grr.cpp +++ b/src/d/actor/d_a_npc_grr.cpp @@ -258,7 +258,7 @@ daNpc_grR_c::~daNpc_grR_c() { #endif } -cPhs__Step daNpc_grR_c::create() { +cPhs_Step daNpc_grR_c::create() { fopAcM_ct(this, daNpc_grR_c); mType = getTypeFromParam(); @@ -276,7 +276,7 @@ cPhs__Step daNpc_grR_c::create() { int res_count = 0; int i = 0; for (; l_loadRes_list[mType][i] >= 0; i++) { - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); + cPhs_Step phase = dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); if (phase == cPhs_ERROR_e || phase == cPhs_UNK3_e) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_npc_grz.cpp b/src/d/actor/d_a_npc_grz.cpp index a5140c604e..39f3b84bd1 100644 --- a/src/d/actor/d_a_npc_grz.cpp +++ b/src/d/actor/d_a_npc_grz.cpp @@ -448,7 +448,7 @@ daNpc_Grz_HIOParam const daNpc_Grz_Param_c::m = { 500.0f, }; -cPhs__Step daNpc_Grz_c::create() { +cPhs_Step daNpc_Grz_c::create() { fopAcM_ct(this, daNpc_Grz_c); mType = getTypeFromParam(); @@ -467,7 +467,7 @@ cPhs__Step daNpc_Grz_c::create() { int iVar1 = 0; int i = 0; for (; l_loadRes_list[mType][i] >= 0; i++) { - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); + cPhs_Step phase = dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); if (phase == cPhs_ERROR_e || phase == cPhs_UNK3_e) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_npc_gwolf.cpp b/src/d/actor/d_a_npc_gwolf.cpp index 8859b84ad4..75a68afda6 100644 --- a/src/d/actor/d_a_npc_gwolf.cpp +++ b/src/d/actor/d_a_npc_gwolf.cpp @@ -283,7 +283,7 @@ daNpc_GWolf_c::~daNpc_GWolf_c() { #endif } -cPhs__Step daNpc_GWolf_c::create() { +cPhs_Step daNpc_GWolf_c::create() { fopAcM_ct(this, daNpc_GWolf_c); mType = getTypeFromParam(); @@ -307,7 +307,7 @@ cPhs__Step daNpc_GWolf_c::create() { int iVar1 = 0; int i; for (i = 0; l_loadRes_list[mType][i] >= 0; i++) { - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); + cPhs_Step phase = dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); if (phase == cPhs_ERROR_e || phase == cPhs_UNK3_e) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_npc_henna.cpp b/src/d/actor/d_a_npc_henna.cpp index ab378448e8..d5246395df 100644 --- a/src/d/actor/d_a_npc_henna.cpp +++ b/src/d/actor/d_a_npc_henna.cpp @@ -2672,7 +2672,7 @@ static int daNpc_Henna_Create(fopAc_ac_c* i_this) { fopAcM_ct(i_this, npc_henna_class); npc_henna_class* a_this = (npc_henna_class*)i_this; - cPhs__Step loadResult = (cPhs__Step)dComIfG_resLoad(&a_this->phase, "Henna"); + cPhs_Step loadResult = dComIfG_resLoad(&a_this->phase, "Henna"); if (loadResult == cPhs_COMPLEATE_e) { OS_REPORT("NPC_HENNA PARAM %x\n", fopAcM_GetParam(i_this)); a_this->arg0 = fopAcM_GetParam(i_this); diff --git a/src/d/actor/d_a_npc_ins.cpp b/src/d/actor/d_a_npc_ins.cpp index 2d4724503a..c228481ad2 100644 --- a/src/d/actor/d_a_npc_ins.cpp +++ b/src/d/actor/d_a_npc_ins.cpp @@ -383,7 +383,7 @@ daNpcIns_c::~daNpcIns_c() { #endif } -cPhs__Step daNpcIns_c::Create() { +cPhs_Step daNpcIns_c::Create() { fopAcM_ct(this, daNpcIns_c); mType = TYPE_0; @@ -412,9 +412,9 @@ cPhs__Step daNpcIns_c::Create() { } } - cPhs__Step phase = cPhs_ERROR_e; + cPhs_Step phase = cPhs_ERROR_e; for (int i = 0; l_loadRes_list[mType][i] >= 0; i++) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_arcNames[l_loadRes_list[mType][i]]); + phase = dComIfG_resLoad(&mPhases[i], l_arcNames[l_loadRes_list[mType][i]]); if (phase != cPhs_COMPLEATE_e) { return phase; diff --git a/src/d/actor/d_a_npc_kasi_hana.cpp b/src/d/actor/d_a_npc_kasi_hana.cpp index 425bc526eb..2d592ec85e 100644 --- a/src/d/actor/d_a_npc_kasi_hana.cpp +++ b/src/d/actor/d_a_npc_kasi_hana.cpp @@ -638,15 +638,15 @@ daNpcKasiHana_c::~daNpcKasiHana_c() { #endif } -cPhs__Step daNpcKasiHana_c::Create() { +cPhs_Step daNpcKasiHana_c::Create() { fopAcM_ct(this, daNpcKasiHana_c); mMessageNo = getMessageNo(); mType = getType(); - cPhs__Step phase = cPhs_ERROR_e; + cPhs_Step phase = cPhs_ERROR_e; for (int i = 0; i < 3; i++) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_arcNames[i]); + phase = dComIfG_resLoad(&mPhases[i], l_arcNames[i]); if (phase != cPhs_COMPLEATE_e) { return phase; diff --git a/src/d/actor/d_a_npc_kasi_kyu.cpp b/src/d/actor/d_a_npc_kasi_kyu.cpp index 75d27aa733..27c4a0b6ba 100644 --- a/src/d/actor/d_a_npc_kasi_kyu.cpp +++ b/src/d/actor/d_a_npc_kasi_kyu.cpp @@ -210,15 +210,15 @@ daNpcKasiKyu_c::~daNpcKasiKyu_c() { #endif } -cPhs__Step daNpcKasiKyu_c::Create() { +cPhs_Step daNpcKasiKyu_c::Create() { fopAcM_ct(this, daNpcKasiKyu_c); mType = getType(); mMessageNo = getMessageNo(); - cPhs__Step phase = cPhs_ERROR_e; + cPhs_Step phase = cPhs_ERROR_e; for (int i = 0; i < 3; i++) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_arcNames[i]); + phase = dComIfG_resLoad(&mPhases[i], l_arcNames[i]); if (phase != cPhs_COMPLEATE_e) { return phase; diff --git a/src/d/actor/d_a_npc_kasi_mich.cpp b/src/d/actor/d_a_npc_kasi_mich.cpp index cb24b87b35..e76b9b9823 100644 --- a/src/d/actor/d_a_npc_kasi_mich.cpp +++ b/src/d/actor/d_a_npc_kasi_mich.cpp @@ -210,15 +210,15 @@ daNpcKasiMich_c::~daNpcKasiMich_c() { #endif } -cPhs__Step daNpcKasiMich_c::Create() { +cPhs_Step daNpcKasiMich_c::Create() { fopAcM_ct(this, daNpcKasiMich_c); mType = getType(); mMessageNo = getMessageNo(); - cPhs__Step phase = cPhs_ERROR_e; + cPhs_Step phase = cPhs_ERROR_e; for (int i = 0; i < 3; i++) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_arcNames[i]); + phase = dComIfG_resLoad(&mPhases[i], l_arcNames[i]); if (phase != cPhs_COMPLEATE_e) { return phase; diff --git a/src/d/actor/d_a_npc_kolin.cpp b/src/d/actor/d_a_npc_kolin.cpp index 44a3e9e2ba..b4cd80eb38 100644 --- a/src/d/actor/d_a_npc_kolin.cpp +++ b/src/d/actor/d_a_npc_kolin.cpp @@ -415,7 +415,7 @@ daNpc_Kolin_c::~daNpc_Kolin_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -cPhs__Step daNpc_Kolin_c::create() { +cPhs_Step daNpc_Kolin_c::create() { daNpcT_ct(this, daNpc_Kolin_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); mType = getType(); @@ -426,7 +426,7 @@ cPhs__Step daNpc_Kolin_c::create() { mTwilight = false; } - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x, BitSW:%02x<%08x> ", fopAcM_getProcNameString(this), mType, mFlowNodeNo, (getPathID() >> 32) & 0xFF, getBitSW() & 0xFF, fopAcM_GetParam(this)); diff --git a/src/d/actor/d_a_npc_kolinb.cpp b/src/d/actor/d_a_npc_kolinb.cpp index ef3a2f795a..a9036c679d 100644 --- a/src/d/actor/d_a_npc_kolinb.cpp +++ b/src/d/actor/d_a_npc_kolinb.cpp @@ -274,14 +274,14 @@ daNpc_Kolinb_c::~daNpc_Kolinb_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -cPhs__Step daNpc_Kolinb_c::create() { +cPhs_Step daNpc_Kolinb_c::create() { daNpcT_ct(this, daNpc_Kolinb_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); mType = getType(); mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) flowNo:%d, modelType:%02x<%08x> ", fopAcM_getProcNameString(this), mType, mFlowNodeNo, (getModelType() >> 32) & 0xFF, fopAcM_GetParam(this)); diff --git a/src/d/actor/d_a_npc_lf.cpp b/src/d/actor/d_a_npc_lf.cpp index 43ea8362f3..e1d196d829 100644 --- a/src/d/actor/d_a_npc_lf.cpp +++ b/src/d/actor/d_a_npc_lf.cpp @@ -261,11 +261,11 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daNPC_LF_Create(fopAc_ac_c* i_this) { +static cPhs_Step daNPC_LF_Create(fopAc_ac_c* i_this) { fopAcM_ct(i_this, npc_lf_class); npc_lf_class* a_this = static_cast(i_this); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&a_this->mPhase, "NPC_LF"); + cPhs_Step phase = dComIfG_resLoad(&a_this->mPhase, "NPC_LF"); if (phase == cPhs_COMPLEATE_e) { a_this->mParam1 = fopAcM_GetParam(a_this); diff --git a/src/d/actor/d_a_npc_moir.cpp b/src/d/actor/d_a_npc_moir.cpp index 9c68aac258..64ab83e0d9 100644 --- a/src/d/actor/d_a_npc_moir.cpp +++ b/src/d/actor/d_a_npc_moir.cpp @@ -284,7 +284,7 @@ daNpcMoiR_c::~daNpcMoiR_c() { #endif } -cPhs__Step daNpcMoiR_c::Create() { +cPhs_Step daNpcMoiR_c::Create() { fopAcM_ct(this, daNpcMoiR_c); if (strcmp(dComIfGp_getStartStageName(), "R_SP116") == 0 && dComIfG_play_c::getLayerNo(0) == 4) { @@ -315,9 +315,9 @@ cPhs__Step daNpcMoiR_c::Create() { } mMsgNo = getMessageNo(); - cPhs__Step phase = cPhs_ERROR_e; + cPhs_Step phase = cPhs_ERROR_e; for (int i = 0; l_loadRes_list[mMode][i] >= 0; i++) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhase[i], l_arcNames[l_loadRes_list[mMode][i]]); + phase = dComIfG_resLoad(&mPhase[i], l_arcNames[l_loadRes_list[mMode][i]]); if (phase != cPhs_COMPLEATE_e) { return phase; } diff --git a/src/d/actor/d_a_npc_ne.cpp b/src/d/actor/d_a_npc_ne.cpp index 3aa0c95b08..414022d377 100644 --- a/src/d/actor/d_a_npc_ne.cpp +++ b/src/d/actor/d_a_npc_ne.cpp @@ -3095,7 +3095,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daNpc_Ne_Create(fopAc_ac_c* i_this) { +static cPhs_Step daNpc_Ne_Create(fopAc_ac_c* i_this) { npc_ne_class* _this = static_cast(i_this); fopAcM_ct(i_this, npc_ne_class); @@ -3104,7 +3104,7 @@ static cPhs__Step daNpc_Ne_Create(fopAc_ac_c* i_this) { } else { _this->mResName = "Npc_ne"; } - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhase, _this->mResName); + cPhs_Step step = dComIfG_resLoad(&_this->mPhase, _this->mResName); if (step == cPhs_COMPLEATE_e) { _this->mBehavior = (u8)fopAcM_GetParam(_this); diff --git a/src/d/actor/d_a_npc_pachi_besu.cpp b/src/d/actor/d_a_npc_pachi_besu.cpp index 85b5295b83..637836d06f 100644 --- a/src/d/actor/d_a_npc_pachi_besu.cpp +++ b/src/d/actor/d_a_npc_pachi_besu.cpp @@ -542,7 +542,7 @@ daNpc_Pachi_Besu_c::~daNpc_Pachi_Besu_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -cPhs__Step daNpc_Pachi_Besu_c::create() { +cPhs_Step daNpc_Pachi_Besu_c::create() { daNpcT_ct(this, daNpc_Pachi_Besu_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -552,7 +552,7 @@ cPhs__Step daNpc_Pachi_Besu_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x35B0)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_pachi_maro.cpp b/src/d/actor/d_a_npc_pachi_maro.cpp index 9540b26438..c22bd4ccb0 100644 --- a/src/d/actor/d_a_npc_pachi_maro.cpp +++ b/src/d/actor/d_a_npc_pachi_maro.cpp @@ -550,7 +550,7 @@ daNpc_Pachi_Maro_HIOParam const daNpc_Pachi_Maro_Param_c::m = { 0, }; -cPhs__Step daNpc_Pachi_Maro_c::create() { +cPhs_Step daNpc_Pachi_Maro_c::create() { daNpcT_ct(this, daNpc_Pachi_Maro_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -559,7 +559,7 @@ cPhs__Step daNpc_Pachi_Maro_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x3310)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_pachi_taro.cpp b/src/d/actor/d_a_npc_pachi_taro.cpp index 9dcc0df0ee..da1530e99e 100644 --- a/src/d/actor/d_a_npc_pachi_taro.cpp +++ b/src/d/actor/d_a_npc_pachi_taro.cpp @@ -777,7 +777,7 @@ daNpc_Pachi_Taro_HIOParam const daNpc_Pachi_Taro_Param_c::m = { 55.0f, }; -cPhs__Step daNpc_Pachi_Taro_c::create() { +cPhs_Step daNpc_Pachi_Taro_c::create() { daNpcT_ct(this, daNpc_Pachi_Taro_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -786,7 +786,7 @@ cPhs__Step daNpc_Pachi_Taro_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x48E0)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_passer.cpp b/src/d/actor/d_a_npc_passer.cpp index 144542d9d6..91b5baebac 100644 --- a/src/d/actor/d_a_npc_passer.cpp +++ b/src/d/actor/d_a_npc_passer.cpp @@ -42,7 +42,7 @@ static int createHeapCallBack(fopAc_ac_c* i_this) { return actor->createHeap(); } -cPhs__Step daNpcPasser_c::create() { +cPhs_Step daNpcPasser_c::create() { fopAcM_ct(this, daNpcPasser_c); mIsDarkWorld = dKy_darkworld_check(); @@ -74,7 +74,7 @@ cPhs__Step daNpcPasser_c::create() { return cPhs_ERROR_e; } - cPhs__Step phase = (cPhs__Step)loadResrc(m_type, m_objNum); + cPhs_Step phase = loadResrc(m_type, m_objNum); if (phase == cPhs_COMPLEATE_e) { u32 i_size = 0; #if DEBUG diff --git a/src/d/actor/d_a_npc_passer2.cpp b/src/d/actor/d_a_npc_passer2.cpp index 4889cb7398..47f9dded36 100644 --- a/src/d/actor/d_a_npc_passer2.cpp +++ b/src/d/actor/d_a_npc_passer2.cpp @@ -201,7 +201,7 @@ static int daNpcPasser2_Create(void* i_this) { return static_cast(i_this)->create(); } -cPhs__Step daNpcPasser2_c::create() { +cPhs_Step daNpcPasser2_c::create() { fopAcM_ct(this, daNpcPasser2_c); mIsDarkWorld = dKy_darkworld_check(); @@ -235,7 +235,7 @@ cPhs__Step daNpcPasser2_c::create() { return cPhs_ERROR_e; } - cPhs__Step phase = (cPhs__Step)loadResrc(m_type, m_objNum); + cPhs_Step phase = loadResrc(m_type, m_objNum); if (phase == cPhs_COMPLEATE_e) { u32 i_size = 0; #if DEBUG diff --git a/src/d/actor/d_a_npc_post.cpp b/src/d/actor/d_a_npc_post.cpp index 62bed7ba41..7b8fb2018c 100644 --- a/src/d/actor/d_a_npc_post.cpp +++ b/src/d/actor/d_a_npc_post.cpp @@ -385,7 +385,7 @@ daNpc_Post_HIOParam const daNpc_Post_Param_c::m = { 60, }; -cPhs__Step daNpc_Post_c::create() { +cPhs_Step daNpc_Post_c::create() { daNpcT_ct(this, daNpc_Post_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -393,7 +393,7 @@ cPhs__Step daNpc_Post_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = dKy_darkworld_check(); - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) flowNo:%d, BitSW:%02x<%08x> ", fopAcM_getProcNameString(this), mType, mFlowNodeNo, getBitSW(), fopAcM_GetParam(this)); diff --git a/src/d/actor/d_a_npc_raca.cpp b/src/d/actor/d_a_npc_raca.cpp index 3d259c2033..b32a06b630 100644 --- a/src/d/actor/d_a_npc_raca.cpp +++ b/src/d/actor/d_a_npc_raca.cpp @@ -229,7 +229,7 @@ daNpc_Raca_c::~daNpc_Raca_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -cPhs__Step daNpc_Raca_c::create() { +cPhs_Step daNpc_Raca_c::create() { daNpcT_ct(this, daNpc_Raca_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -237,7 +237,7 @@ cPhs__Step daNpc_Raca_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = dKy_darkworld_check(); - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x3A10)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_seirei.cpp b/src/d/actor/d_a_npc_seirei.cpp index ff4cece557..306df2a332 100644 --- a/src/d/actor/d_a_npc_seirei.cpp +++ b/src/d/actor/d_a_npc_seirei.cpp @@ -226,7 +226,7 @@ daNpc_Seirei_c::~daNpc_Seirei_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -cPhs__Step daNpc_Seirei_c::create() { +cPhs_Step daNpc_Seirei_c::create() { daNpcT_ct(this, daNpc_Seirei_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -235,7 +235,7 @@ cPhs__Step daNpc_Seirei_c::create() { mTwilight = false; arg0 = fopAcM_GetParam(this) >> 28; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { if (arg0 != 0 && !fopAcM_entrySolidHeap(this, createHeapCallBack, 0)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_shad.cpp b/src/d/actor/d_a_npc_shad.cpp index 157dffcafa..bffc93e883 100644 --- a/src/d/actor/d_a_npc_shad.cpp +++ b/src/d/actor/d_a_npc_shad.cpp @@ -340,7 +340,7 @@ daNpcShad_c::~daNpcShad_c() { } } -cPhs__Step daNpcShad_c::Create() { +cPhs_Step daNpcShad_c::Create() { fopAcM_ct(this, daNpcShad_c); if (strcmp(dComIfGp_getStartStageName(), "R_SP116") == 0 && dComIfG_play_c::getLayerNo(0) == 4) { @@ -410,9 +410,9 @@ cPhs__Step daNpcShad_c::Create() { field_0xe14 = sVar1; field_0xe16 = field_0xe14; - cPhs__Step phase = cPhs_ERROR_e; + cPhs_Step phase = cPhs_ERROR_e; for (int i = 0; l_loadRes_list[mMode][i] >= 0; i++) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_arcNames[l_loadRes_list[mMode][i]]); + phase = dComIfG_resLoad(&mPhases[i], l_arcNames[l_loadRes_list[mMode][i]]); if (phase != cPhs_COMPLEATE_e) { return phase; diff --git a/src/d/actor/d_a_npc_shaman.cpp b/src/d/actor/d_a_npc_shaman.cpp index d8dd0b7199..aedba3e5f9 100644 --- a/src/d/actor/d_a_npc_shaman.cpp +++ b/src/d/actor/d_a_npc_shaman.cpp @@ -236,7 +236,7 @@ daNpc_Sha_HIOParam const daNpc_Sha_Param_c::m = { 0.0, }; -cPhs__Step daNpc_Sha_c::create() { +cPhs_Step daNpc_Sha_c::create() { daNpcT_ct(this, daNpc_Sha_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -244,7 +244,7 @@ cPhs__Step daNpc_Sha_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) flowNo:%d<%08x> ", fopAcM_getProcNameString(this), mType, mFlowNodeNo, fopAcM_GetParam(this)); diff --git a/src/d/actor/d_a_npc_shoe.cpp b/src/d/actor/d_a_npc_shoe.cpp index be0f54a2c1..1639f2ee86 100644 --- a/src/d/actor/d_a_npc_shoe.cpp +++ b/src/d/actor/d_a_npc_shoe.cpp @@ -117,8 +117,8 @@ daNpcShoe_c::~daNpcShoe_c() { } } -cPhs__Step daNpcShoe_c::Create() { - cPhs__Step step; +cPhs_Step daNpcShoe_c::Create() { + cPhs_Step step; fopAcM_ct(this, daNpcShoe_c); @@ -126,7 +126,7 @@ cPhs__Step daNpcShoe_c::Create() { step = cPhs_ERROR_e; for (int i = 0; i < 3; i++) { - step = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_arcNames[i]); + step = dComIfG_resLoad(&mPhases[i], l_arcNames[i]); if (step != cPhs_COMPLEATE_e) { return step; } @@ -634,7 +634,7 @@ bool daNpcShoe_c::demo(void* param_0) { return 1; } -static cPhs__Step daNpcShoe_Create(void* i_this) { +static cPhs_Step daNpcShoe_Create(void* i_this) { return static_cast(i_this)->Create(); } diff --git a/src/d/actor/d_a_npc_soldierA.cpp b/src/d/actor/d_a_npc_soldierA.cpp index 25383f05a1..439ae1f11f 100644 --- a/src/d/actor/d_a_npc_soldierA.cpp +++ b/src/d/actor/d_a_npc_soldierA.cpp @@ -199,7 +199,7 @@ daNpc_SoldierA_HIOParam const daNpc_SoldierA_Param_c::m = { false, }; -cPhs__Step daNpc_SoldierA_c::create() { +cPhs_Step daNpc_SoldierA_c::create() { mTwilight = dKy_darkworld_check(); fopAcM_ct(this, daNpc_SoldierA_c); @@ -219,7 +219,7 @@ cPhs__Step daNpc_SoldierA_c::create() { int res_count = 0; int i = 0; for (; l_loadRes_list[mType][i] >= 0; i++) { - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); + cPhs_Step phase = dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); if (phase == cPhs_ERROR_e || phase == cPhs_UNK3_e) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_npc_soldierB.cpp b/src/d/actor/d_a_npc_soldierB.cpp index 8c98eff41f..74d68caa56 100644 --- a/src/d/actor/d_a_npc_soldierB.cpp +++ b/src/d/actor/d_a_npc_soldierB.cpp @@ -164,7 +164,7 @@ daNpc_SoldierB_HIOParam const daNpc_SoldierB_Param_c::m = { false, // debug_info_ON }; -cPhs__Step daNpc_SoldierB_c::create() { +cPhs_Step daNpc_SoldierB_c::create() { mTwilight = dKy_darkworld_check(); fopAcM_ct(this, daNpc_SoldierB_c); @@ -184,8 +184,8 @@ cPhs__Step daNpc_SoldierB_c::create() { int res_count = 0; int i = 0; for (; l_loadRes_list[mType][i] >= 0; i++) { - cPhs__Step phase = - (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); + cPhs_Step phase = + dComIfG_resLoad(&mPhases[i], l_resNames[l_loadRes_list[mType][i]]); if (phase == cPhs_ERROR_e || phase == cPhs_UNK3_e) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_npc_sq.cpp b/src/d/actor/d_a_npc_sq.cpp index 834cd33476..cb883f0b24 100644 --- a/src/d/actor/d_a_npc_sq.cpp +++ b/src/d/actor/d_a_npc_sq.cpp @@ -316,11 +316,11 @@ static int useHeapInit(fopAc_ac_c* i_this) { 1, 0, 1.0f, 0, -1) ? 1 : 0; } -static cPhs__Step daNpc_Sq_Create(fopAc_ac_c* i_this) { +static cPhs_Step daNpc_Sq_Create(fopAc_ac_c* i_this) { fopAcM_ct(i_this, npc_sq_class); npc_sq_class* _this = static_cast(i_this); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhaseReq, "Sq"); + cPhs_Step step = dComIfG_resLoad(&_this->mPhaseReq, "Sq"); if (step == cPhs_COMPLEATE_e) { /* dSv_event_flag_c::D_0001 - Ordon Village - Stopped by squirrel in front of house at night */ if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[25])) { diff --git a/src/d/actor/d_a_npc_taro.cpp b/src/d/actor/d_a_npc_taro.cpp index d68fb52e52..32956de232 100644 --- a/src/d/actor/d_a_npc_taro.cpp +++ b/src/d/actor/d_a_npc_taro.cpp @@ -18,7 +18,7 @@ #include "d/d_msg_object.h" #include "f_op/f_op_actor.h" #include "f_op/f_op_camera_mng.h" -#include "dolphin/types.h" +#include daNpc_Maro_c::actionFunc dummy_lit_3931() { return &daNpc_Maro_c::choccai; diff --git a/src/d/actor/d_a_npc_the.cpp b/src/d/actor/d_a_npc_the.cpp index d614541427..79c169935d 100644 --- a/src/d/actor/d_a_npc_the.cpp +++ b/src/d/actor/d_a_npc_the.cpp @@ -924,11 +924,11 @@ BOOL daNpcThe_c::EvCut_Introduction(int i_staffID) { return false; } -static cPhs__Step daNpcThe_Create(void* i_this) { +static cPhs_Step daNpcThe_Create(void* i_this) { return static_cast(i_this)->create(); } -cPhs__Step daNpcThe_c::create() { +cPhs_Step daNpcThe_c::create() { fopAcM_ct(this, daNpcThe_c); mType = getTypeFromParam(); @@ -949,11 +949,11 @@ cPhs__Step daNpcThe_c::create() { return cPhs_ERROR_e; } - cPhs__Step step; + cPhs_Step step; int resources_loaded = 0; int i = 0; for (; l_loadRes_list[mType][i] >= 0; i++) { - step = (cPhs__Step)dComIfG_resLoad(&mPhase[i], l_resNames[l_loadRes_list[mType][i]]); + step = dComIfG_resLoad(&mPhase[i], l_resNames[l_loadRes_list[mType][i]]); if (step == cPhs_ERROR_e || step == cPhs_UNK3_e) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_npc_theB.cpp b/src/d/actor/d_a_npc_theB.cpp index 2954d9d297..67a19b8468 100644 --- a/src/d/actor/d_a_npc_theB.cpp +++ b/src/d/actor/d_a_npc_theB.cpp @@ -234,10 +234,10 @@ daNpcTheB_HIOParam const daNpcTheB_Param_c::m = { false, }; -cPhs__Step daNpcTheB_c::create() { +cPhs_Step daNpcTheB_c::create() { fopAcM_ct(this, daNpcTheB_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_arcName); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x2CB0)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_tkc.cpp b/src/d/actor/d_a_npc_tkc.cpp index 4a9d6a1c28..bb9581eca1 100644 --- a/src/d/actor/d_a_npc_tkc.cpp +++ b/src/d/actor/d_a_npc_tkc.cpp @@ -200,7 +200,7 @@ daNpcTkc_HIOParam const daNpcTkc_Param_c::m = { 0, }; -cPhs__Step daNpcTkc_c::Create() { +cPhs_Step daNpcTkc_c::Create() { fopAcM_ct(this, daNpcTkc_c); if (getType() != TYPE_2) { @@ -216,8 +216,8 @@ cPhs__Step daNpcTkc_c::Create() { } } - cPhs__Step phase = cPhs_ERROR_e; - phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step phase = cPhs_ERROR_e; + phase = dComIfG_resLoad(&mPhase, l_arcName); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x2030)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_tkj2.cpp b/src/d/actor/d_a_npc_tkj2.cpp index 3d352a704e..5d047e150b 100644 --- a/src/d/actor/d_a_npc_tkj2.cpp +++ b/src/d/actor/d_a_npc_tkj2.cpp @@ -1076,11 +1076,11 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 1; } -static cPhs__Step daNpc_Tkj2_Create(fopAc_ac_c* a_this) { +static cPhs_Step daNpc_Tkj2_Create(fopAc_ac_c* a_this) { fopAcM_ct(a_this, npc_tkj2_class); npc_tkj2_class* i_this = (npc_tkj2_class*)a_this; - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, "Tkj2"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, "Tkj2"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("NPC_TKJ2 PARAM %x\n", fopAcM_GetParam(a_this)); diff --git a/src/d/actor/d_a_npc_tks.cpp b/src/d/actor/d_a_npc_tks.cpp index 161de1d346..0f1a529b5c 100644 --- a/src/d/actor/d_a_npc_tks.cpp +++ b/src/d/actor/d_a_npc_tks.cpp @@ -284,7 +284,7 @@ daNpcTks_c::~daNpcTks_c() { #endif } -cPhs__Step daNpcTks_c::Create() { +cPhs_Step daNpcTks_c::Create() { fopAcM_ct(this, daNpcTks_c); if (dComIfGs_isStageBossEnemy()) { @@ -311,9 +311,9 @@ cPhs__Step daNpcTks_c::Create() { mMessageNo = getMessageNo(); - cPhs__Step phase = cPhs_ERROR_e; + cPhs_Step phase = cPhs_ERROR_e; for (int i = 0; l_loadRes_list[mTksTsubo.mTsuboType][i] >= 0; i++) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_arcNames[l_loadRes_list[mTksTsubo.mTsuboType][i]]); + phase = dComIfG_resLoad(&mPhases[i], l_arcNames[l_loadRes_list[mTksTsubo.mTsuboType][i]]); if (phase != cPhs_COMPLEATE_e) { return phase; } diff --git a/src/d/actor/d_a_npc_wrestler.cpp b/src/d/actor/d_a_npc_wrestler.cpp index 35335281b6..3d9eefe1e7 100644 --- a/src/d/actor/d_a_npc_wrestler.cpp +++ b/src/d/actor/d_a_npc_wrestler.cpp @@ -7,7 +7,7 @@ #include "d/actor/d_a_npc_wrestler.h" #include "d/d_timer.h" -#include "dolphin/types.h" +#include #include "d/actor/d_a_tag_arena.h" #include "d/actor/d_a_npc_gra.h" #include "d/actor/d_a_npc_bouS.h" @@ -672,16 +672,16 @@ daNpcWrestler_c::~daNpcWrestler_c() { #endif } -cPhs__Step daNpcWrestler_c::Create() { +cPhs_Step daNpcWrestler_c::Create() { fopAcM_ct(this, daNpcWrestler_c); mType = getType(); mMsgNo = getMessageNo(); field_0xe04 = l_anmList[mType]; - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_resALink); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_resALink); if (phase == cPhs_COMPLEATE_e) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhase2, l_resName[mType]); + phase = dComIfG_resLoad(&mPhase2, l_resName[mType]); } if (phase == cPhs_COMPLEATE_e) { diff --git a/src/d/actor/d_a_npc_yamid.cpp b/src/d/actor/d_a_npc_yamid.cpp index 7a443ecda6..ea0f13ea94 100644 --- a/src/d/actor/d_a_npc_yamid.cpp +++ b/src/d/actor/d_a_npc_yamid.cpp @@ -190,7 +190,7 @@ daNpc_yamiD_HIOParam const daNpc_yamiD_Param_c::m = { static NPC_YAMID_HIO_CLASS l_HIO; -cPhs__Step daNpc_yamiD_c::create() { +cPhs_Step daNpc_yamiD_c::create() { daNpcT_ct(this, daNpc_yamiD_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -199,7 +199,7 @@ cPhs__Step daNpc_yamiD_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x3710)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_yamis.cpp b/src/d/actor/d_a_npc_yamis.cpp index 21f3bec668..64d36e12f2 100644 --- a/src/d/actor/d_a_npc_yamis.cpp +++ b/src/d/actor/d_a_npc_yamis.cpp @@ -139,7 +139,7 @@ const daNpc_yamiS_HIOParam daNpc_yamiS_Param_c::m = { static NPC_YAMIS_HIO_CLASS l_HIO; -cPhs__Step daNpc_yamiS_c::create() { +cPhs_Step daNpc_yamiS_c::create() { daNpcT_ct(this, daNpc_yamiS_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -147,7 +147,7 @@ cPhs__Step daNpc_yamiS_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x3540)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_yamit.cpp b/src/d/actor/d_a_npc_yamit.cpp index ad9587867c..611bdc9feb 100644 --- a/src/d/actor/d_a_npc_yamit.cpp +++ b/src/d/actor/d_a_npc_yamit.cpp @@ -142,7 +142,7 @@ const daNpc_yamiT_HIOParam daNpc_yamiT_Param_c::m = { static NPC_YAMIT_HIO_CLASS l_HIO; -cPhs__Step daNpc_yamiT_c::create() { +cPhs_Step daNpc_yamiT_c::create() { daNpcT_ct(this, daNpc_yamiT_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -150,7 +150,7 @@ cPhs__Step daNpc_yamiT_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x3850)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_yelia.cpp b/src/d/actor/d_a_npc_yelia.cpp index d7ee35d686..55e13fd4a1 100644 --- a/src/d/actor/d_a_npc_yelia.cpp +++ b/src/d/actor/d_a_npc_yelia.cpp @@ -369,7 +369,7 @@ daNpc_Yelia_c::~daNpc_Yelia_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -cPhs__Step daNpc_Yelia_c::create() { +cPhs_Step daNpc_Yelia_c::create() { daNpcT_ct(this, daNpc_Yelia_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -380,7 +380,7 @@ cPhs__Step daNpc_Yelia_c::create() { mTwilight = true; } - cPhs__Step step = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step step = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (step == cPhs_COMPLEATE_e) { if (isDelete()) { @@ -1559,7 +1559,7 @@ BOOL daNpc_Yelia_c::talk(void* param_0) { return FALSE; } -static cPhs__Step daNpc_Yelia_Create(void* i_this) { +static cPhs_Step daNpc_Yelia_Create(void* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_npc_ykm.cpp b/src/d/actor/d_a_npc_ykm.cpp index 8d04cb3f8e..706634a16e 100644 --- a/src/d/actor/d_a_npc_ykm.cpp +++ b/src/d/actor/d_a_npc_ykm.cpp @@ -572,14 +572,14 @@ daNpc_ykM_c::~daNpc_ykM_c() { daNpcT_offTmpBit(0x54); // dSv_event_tmp_flag_c::T_0084 - Snowpeak mountain - Racing with Yeto } -cPhs__Step daNpc_ykM_c::create() { +cPhs_Step daNpc_ykM_c::create() { daNpcT_ct(this, daNpc_ykM_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); mType = getType(); mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) flowNo:%d, PathID:%02x, BitTRB:%02x<%08x> ", fopAcM_getProcNameString(this), mType, mFlowNodeNo, getPathID(), getBitTRB() & 0xFF, fopAcM_GetParam(this)); diff --git a/src/d/actor/d_a_npc_zanb.cpp b/src/d/actor/d_a_npc_zanb.cpp index 81309f74cb..93058921fc 100644 --- a/src/d/actor/d_a_npc_zanb.cpp +++ b/src/d/actor/d_a_npc_zanb.cpp @@ -138,7 +138,7 @@ daNpc_zanB_HIOParam const daNpc_zanB_Param_c::m = { static NPC_ZANB_HIO_CLASS l_HIO; -cPhs__Step daNpc_zanB_c::create() { +cPhs_Step daNpc_zanB_c::create() { daNpcT_ct(this, daNpc_zanB_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); @@ -147,7 +147,7 @@ cPhs__Step daNpc_zanB_c::create() { mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) flowNo:%d<%08x> ", fopAcM_getProcNameString(this), mType, mFlowNodeNo, fopAcM_GetParam(this)); diff --git a/src/d/actor/d_a_npc_zelRo.cpp b/src/d/actor/d_a_npc_zelRo.cpp index 7e730f09d4..f1bd201c7a 100644 --- a/src/d/actor/d_a_npc_zelRo.cpp +++ b/src/d/actor/d_a_npc_zelRo.cpp @@ -162,14 +162,14 @@ daNpc_ZelRo_c::~daNpc_ZelRo_c() { deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); } -cPhs__Step daNpc_ZelRo_c::create() { +cPhs_Step daNpc_ZelRo_c::create() { daNpcT_ct(this, daNpc_ZelRo_c, l_faceMotionAnmData, l_motionAnmData, l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, l_resNameList); mType = getType(); mFlowNodeNo = getFlowNodeNo(); mTwilight = false; - cPhs__Step phase = (cPhs__Step)loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + cPhs_Step phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x71C0)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_npc_zra.cpp b/src/d/actor/d_a_npc_zra.cpp index ddc75b50d6..aa78729989 100644 --- a/src/d/actor/d_a_npc_zra.cpp +++ b/src/d/actor/d_a_npc_zra.cpp @@ -488,7 +488,7 @@ daNpc_zrA_c::~daNpc_zrA_c() { #endif } -cPhs__Step daNpc_zrA_c::create() { +cPhs_Step daNpc_zrA_c::create() { fopAcM_ct(this, daNpc_zrA_c); mType = getTypeFromArgument(); @@ -508,7 +508,7 @@ cPhs__Step daNpc_zrA_c::create() { } int res_count = 0; - cPhs__Step step; + cPhs_Step step; int i; for (i = 0; l_loadRes_list[mType][i] >= 0; i++) { int res_no = l_loadRes_list[mType][i]; @@ -522,7 +522,7 @@ cPhs__Step daNpc_zrA_c::create() { } } - step = (cPhs__Step)dComIfG_resLoad(&mPhase[i], l_resNames[res_no]); + step = dComIfG_resLoad(&mPhase[i], l_resNames[res_no]); if (step == cPhs_ERROR_e || step == cPhs_UNK3_e) { return cPhs_ERROR_e; @@ -534,9 +534,9 @@ cPhs__Step daNpc_zrA_c::create() { if (mSoldierType != SOLDIER_NONE) { if (mTwilight) { - step = (cPhs__Step)dComIfG_resLoad(&mPhase[i], l_resNames[10]); + step = dComIfG_resLoad(&mPhase[i], l_resNames[10]); } else { - step = (cPhs__Step)dComIfG_resLoad(&mPhase[i], l_resNames[7]); + step = dComIfG_resLoad(&mPhase[i], l_resNames[7]); } if (step == cPhs_ERROR_e || step == cPhs_UNK3_e) { @@ -2303,7 +2303,7 @@ BOOL daNpc_zrA_c::test(void* param_0) { return true; } -static cPhs__Step daNpc_zrA_Create(void* i_this) { +static cPhs_Step daNpc_zrA_Create(void* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_npc_zrc.cpp b/src/d/actor/d_a_npc_zrc.cpp index 505c0c73b1..2745b04d8f 100644 --- a/src/d/actor/d_a_npc_zrc.cpp +++ b/src/d/actor/d_a_npc_zrc.cpp @@ -218,7 +218,7 @@ daNpc_zrC_c::~daNpc_zrC_c() { #endif } -cPhs__Step daNpc_zrC_c::create() { +cPhs_Step daNpc_zrC_c::create() { fopAcM_ct(this, daNpc_zrC_c); mType = getTypeFromParam(); @@ -240,7 +240,7 @@ cPhs__Step daNpc_zrC_c::create() { if (res_idx == 3 && mTwilight) { res_idx = 4; } - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase[i], l_resNames[res_idx]); + cPhs_Step step = dComIfG_resLoad(&mPhase[i], l_resNames[res_idx]); if (step == cPhs_ERROR_e || step == cPhs_UNK3_e) { return cPhs_ERROR_e; } @@ -1766,7 +1766,7 @@ BOOL daNpc_zrC_c::ECut_earringGet(int i_staffID) { return ret; } -static cPhs__Step daNpc_zrC_Create(void* i_this) { +static cPhs_Step daNpc_zrC_Create(void* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_npc_zrz.cpp b/src/d/actor/d_a_npc_zrz.cpp index 561cfd9035..a600f217cc 100644 --- a/src/d/actor/d_a_npc_zrz.cpp +++ b/src/d/actor/d_a_npc_zrz.cpp @@ -194,7 +194,7 @@ daNpc_zrZ_c::~daNpc_zrZ_c() { #endif } -cPhs__Step daNpc_zrZ_c::create() { +cPhs_Step daNpc_zrZ_c::create() { fopAcM_ct(this, daNpc_zrZ_c); mType = getTypeFromParam(); @@ -215,7 +215,7 @@ cPhs__Step daNpc_zrZ_c::create() { int res_count = 0; int i; for (i = 0; l_loadRes_list[mType][i] >= 0; i++) { - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase[i], + cPhs_Step step = dComIfG_resLoad(&mPhase[i], l_resNames[l_loadRes_list[mType][i]]); if (step == cPhs_ERROR_e || step == cPhs_UNK3_e) { return cPhs_ERROR_e; @@ -2420,7 +2420,7 @@ void daNpc_zrZ_c::himoCalc() { mLimbAngle.z = cM_atan2s(mLimbCalcRelPos.z, mLimbCalcRelPos.x); } -static cPhs__Step daNpc_zrZ_Create(void* i_this) { +static cPhs_Step daNpc_zrZ_Create(void* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_amiShutter.cpp b/src/d/actor/d_a_obj_amiShutter.cpp index 83995ff262..cdd4e2a69a 100644 --- a/src/d/actor/d_a_obj_amiShutter.cpp +++ b/src/d/actor/d_a_obj_amiShutter.cpp @@ -63,12 +63,12 @@ int daAmiShutter_c::CreateHeap() { } -cPhs__Step daAmiShutter_c::create() { +cPhs_Step daAmiShutter_c::create() { fopAcM_ct(this, daAmiShutter_c); - cPhs__Step phaseStep = (cPhs__Step) dComIfG_resLoad(&mPhaseReq, "S_Zami"); + cPhs_Step phaseStep = dComIfG_resLoad(&mPhaseReq, "S_Zami"); if (phaseStep == cPhs_COMPLEATE_e) { - cPhs__Step res = (cPhs__Step) MoveBGCreate("S_Zami", 7, + cPhs_Step res = MoveBGCreate("S_Zami", 7, dBgS_MoveBGProc_Typical, 0x1a00, NULL); if (res == cPhs_ERROR_e) { diff --git a/src/d/actor/d_a_obj_ari.cpp b/src/d/actor/d_a_obj_ari.cpp index 0250f14643..f97e72aa49 100644 --- a/src/d/actor/d_a_obj_ari.cpp +++ b/src/d/actor/d_a_obj_ari.cpp @@ -129,7 +129,7 @@ int daObjARI_c::CreateHeap() { return 1; } -static cPhs__Step daObjARI_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObjARI_Create(fopAc_ac_c* i_this) { fopAcM_GetID(i_this); return static_cast(i_this)->create(); } @@ -605,9 +605,9 @@ bool daObjARI_c::CreateChk() { return true; } -cPhs__Step daObjARI_c::create() { +cPhs_Step daObjARI_c::create() { fopAcM_ct(this, daObjARI_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, "I_Ari"); + cPhs_Step step = dComIfG_resLoad(&mPhase, "I_Ari"); if (step == cPhs_COMPLEATE_e) { mLocation = fopAcM_GetParam(this) & 0xf; diff --git a/src/d/actor/d_a_obj_barDesk.cpp b/src/d/actor/d_a_obj_barDesk.cpp index 85cb7f5955..9e0b3a4a8f 100644 --- a/src/d/actor/d_a_obj_barDesk.cpp +++ b/src/d/actor/d_a_obj_barDesk.cpp @@ -46,12 +46,12 @@ int daBarDesk_c::CreateHeap() { return 1; } -cPhs__Step daBarDesk_c::create() { +cPhs_Step daBarDesk_c::create() { fopAcM_ct(this, daBarDesk_c); if (fopAcM_isSwitch(this, (u8)fopAcM_GetParam(this))) { return cPhs_ERROR_e; } - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, "KHdesk"); + cPhs_Step step = dComIfG_resLoad(&mPhase, "KHdesk"); if (step == cPhs_COMPLEATE_e) { if (MoveBGCreate("KHdesk", 7, dBgS_MoveBGProc_TypicalRotY, 0xe50, NULL) == cPhs_ERROR_e) { return cPhs_ERROR_e; @@ -148,7 +148,7 @@ static int daBarDesk_Delete(daBarDesk_c* i_this) { return i_this->MoveBGDelete(); } -static cPhs__Step daBarDesk_Create(fopAc_ac_c* i_this) { +static cPhs_Step daBarDesk_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_bed.cpp b/src/d/actor/d_a_obj_bed.cpp index ea83d6ff33..37de863ca6 100644 --- a/src/d/actor/d_a_obj_bed.cpp +++ b/src/d/actor/d_a_obj_bed.cpp @@ -46,10 +46,10 @@ daObj_Bed_c::~daObj_Bed_c() { dComIfG_resDelete(&mPhase, getResName()); } -cPhs__Step daObj_Bed_c::create() { +cPhs_Step daObj_Bed_c::create() { fopAcM_ct(this, daObj_Bed_c); mType = getType(); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, getResName()); + cPhs_Step step = dComIfG_resLoad(&mPhase, getResName()); if (step == cPhs_COMPLEATE_e) { if (isDelete()) { return cPhs_ERROR_e; @@ -179,7 +179,7 @@ void daObj_Bed_c::setMtx() { } -static cPhs__Step daObj_Bed_Create(void* i_this) { +static cPhs_Step daObj_Bed_Create(void* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_bemos.cpp b/src/d/actor/d_a_obj_bemos.cpp index 37a78702ce..25dd1587ef 100644 --- a/src/d/actor/d_a_obj_bemos.cpp +++ b/src/d/actor/d_a_obj_bemos.cpp @@ -490,11 +490,11 @@ int daObjBm_c::create1st() { mCreateFirstFlag = 1; } - cPhs__Step phase_state = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step phase_state = dComIfG_resLoad(&mPhase, l_arcName); if (phase_state == cPhs_COMPLEATE_e) { phase_state = - (cPhs__Step)MoveBGCreate(l_arcName, 0x1E, dBgS_MoveBGProc_TypicalRotY, 0x5500, NULL); + MoveBGCreate(l_arcName, 0x1E, dBgS_MoveBGProc_TypicalRotY, 0x5500, NULL); if (phase_state == cPhs_ERROR_e) { return phase_state; } diff --git a/src/d/actor/d_a_obj_bkdoor.cpp b/src/d/actor/d_a_obj_bkdoor.cpp index b7eb850ade..8ed051902d 100644 --- a/src/d/actor/d_a_obj_bkdoor.cpp +++ b/src/d/actor/d_a_obj_bkdoor.cpp @@ -87,9 +87,9 @@ int daObjBkDoor_c::CreateHeap() { int daObjBkDoor_c::create1st() { mOrientation = fopAcM_GetParamBit(this, 0, 1); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, l_arcName); if (step == cPhs_COMPLEATE_e) { - step = (cPhs__Step)MoveBGCreate(l_arcName, l_dzb[mOrientation], dBgS_MoveBGProc_TypicalRotY, + step = MoveBGCreate(l_arcName, l_dzb[mOrientation], dBgS_MoveBGProc_TypicalRotY, 0xBD0, NULL); if (step == cPhs_ERROR_e) { return step; diff --git a/src/d/actor/d_a_obj_bosswarp.cpp b/src/d/actor/d_a_obj_bosswarp.cpp index a743466f7a..ab8f014d15 100644 --- a/src/d/actor/d_a_obj_bosswarp.cpp +++ b/src/d/actor/d_a_obj_bosswarp.cpp @@ -151,9 +151,9 @@ int daObjBossWarp_c::CreateHeap() { return 1; } -cPhs__Step daObjBossWarp_c::create() { +cPhs_Step daObjBossWarp_c::create() { fopAcM_ct(this, daObjBossWarp_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, l_arcName); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, CheckCreateHeap, 0x18e0)) { return cPhs_ERROR_e; @@ -657,7 +657,7 @@ static int daObjBossWarp_Delete(daObjBossWarp_c* i_this) { return i_this->_delete(); } -static cPhs__Step daObjBossWarp_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObjBossWarp_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_bsGate.cpp b/src/d/actor/d_a_obj_bsGate.cpp index e74892cfe9..03edb364f2 100644 --- a/src/d/actor/d_a_obj_bsGate.cpp +++ b/src/d/actor/d_a_obj_bsGate.cpp @@ -32,9 +32,9 @@ int daBsGate_c::CreateHeap() { return 1; } -cPhs__Step daBsGate_c::create() { +cPhs_Step daBsGate_c::create() { fopAcM_ct(this, daBsGate_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, "S_Zgate"); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, "S_Zgate"); if (step == cPhs_COMPLEATE_e) { if (MoveBGCreate("S_Zgate", 7, dBgS_MoveBGProc_TypicalRotY, 0xf00, NULL) == cPhs_ERROR_e) { return cPhs_ERROR_e; @@ -158,7 +158,7 @@ static int daBsGate_Delete(daBsGate_c* i_this) { return i_this->MoveBGDelete(); } -static cPhs__Step daBsGate_Create(fopAc_ac_c* i_this) { +static cPhs_Step daBsGate_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_burnbox.cpp b/src/d/actor/d_a_obj_burnbox.cpp index f8f5123570..b7b47b5357 100644 --- a/src/d/actor/d_a_obj_burnbox.cpp +++ b/src/d/actor/d_a_obj_burnbox.cpp @@ -99,8 +99,8 @@ int daObjBurnBox_c::CreateHeap() { return 1; } -cPhs__Step daObjBurnBox_c::create1st() { - cPhs__Step phaseStep = (cPhs__Step) dComIfG_resLoad(&mPhaseReq, l_arcName[getType()]); +cPhs_Step daObjBurnBox_c::create1st() { + cPhs_Step phaseStep = dComIfG_resLoad(&mPhaseReq, l_arcName[getType()]); if (phaseStep == cPhs_COMPLEATE_e) { int dzb_id = -1; u8 type = getType(); @@ -110,7 +110,7 @@ cPhs__Step daObjBurnBox_c::create1st() { dzb_id = 7; } - phaseStep = (cPhs__Step) MoveBGCreate(l_arcName[type], dzb_id, dBgS_MoveBGProc_TypicalRotY, + phaseStep = MoveBGCreate(l_arcName[type], dzb_id, dBgS_MoveBGProc_TypicalRotY, l_heap_size[type], NULL); if (phaseStep == cPhs_ERROR_e) { return phaseStep; diff --git a/src/d/actor/d_a_obj_carry.cpp b/src/d/actor/d_a_obj_carry.cpp index bea4671174..c41fdc88e7 100644 --- a/src/d/actor/d_a_obj_carry.cpp +++ b/src/d/actor/d_a_obj_carry.cpp @@ -1297,13 +1297,13 @@ int daObjCarry_c::create() { switch (mType) { case TYPE_BALL_S: - create_phase = (cPhs__Step)checkCreate_LightBallA(); + create_phase = checkCreate_LightBallA(); break; case TYPE_BALL_S_2: - create_phase = (cPhs__Step)checkCreate_LightBallB(); + create_phase = checkCreate_LightBallB(); break; case TYPE_LV8_BALL: - create_phase = (cPhs__Step)checkCreate_Lv8Ball(); + create_phase = checkCreate_Lv8Ball(); break; } diff --git a/src/d/actor/d_a_obj_cdoor.cpp b/src/d/actor/d_a_obj_cdoor.cpp index d98333c8dd..fe483fec3f 100644 --- a/src/d/actor/d_a_obj_cdoor.cpp +++ b/src/d/actor/d_a_obj_cdoor.cpp @@ -52,12 +52,12 @@ static void* daObjCdoor_searchChain(fopAc_ac_c* i_actor, void* i_this) { return NULL; } -cPhs__Step daObjCdoor_c::create() { +cPhs_Step daObjCdoor_c::create() { fopAcM_ct(this, daObjCdoor_c); mType = (fopAcM_GetParam(this) >> 8) & 0xf; - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName[mType]); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, l_arcName[mType]); if (step == cPhs_COMPLEATE_e) { - step = (cPhs__Step)MoveBGCreate(l_arcName[mType], l_dzbIdx[mType], NULL, 0xc00, NULL); + step = MoveBGCreate(l_arcName[mType], l_dzbIdx[mType], NULL, 0xc00, NULL); if (step == cPhs_ERROR_e) { return cPhs_ERROR_e; } @@ -102,7 +102,7 @@ cPhs__Step daObjCdoor_c::create() { return step; } -static cPhs__Step daObjCdoor_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObjCdoor_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_chandelier.cpp b/src/d/actor/d_a_obj_chandelier.cpp index 9a344acb0c..bdcf4b1983 100644 --- a/src/d/actor/d_a_obj_chandelier.cpp +++ b/src/d/actor/d_a_obj_chandelier.cpp @@ -37,11 +37,11 @@ int daObjChandelier_c::CreateHeap() { return 1; } -cPhs__Step daObjChandelier_c::create1st() { +cPhs_Step daObjChandelier_c::create1st() { fopAcM_ct(this, daObjChandelier_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(this, l_arcName); + cPhs_Step step = dComIfG_resLoad(this, l_arcName); if (step == cPhs_COMPLEATE_e) { - step = (cPhs__Step)MoveBGCreate(l_arcName, 7, dBgS_MoveBGProc_TypicalRotY, 0x4500, &mMtx); + step = MoveBGCreate(l_arcName, 7, dBgS_MoveBGProc_TypicalRotY, 0x4500, &mMtx); if (step == cPhs_ERROR_e) { return step; } @@ -231,7 +231,7 @@ void daObjChandelier_c::hookSwingInitParm() { field_0x5f8 = 5.0f; } -static cPhs__Step daObjChandelier_create1st(daObjChandelier_c* i_this) { +static cPhs_Step daObjChandelier_create1st(daObjChandelier_c* i_this) { fopAcM_ct(i_this, daObjChandelier_c); return i_this->create1st(); } diff --git a/src/d/actor/d_a_obj_cho.cpp b/src/d/actor/d_a_obj_cho.cpp index 24874778d5..33088afbdd 100644 --- a/src/d/actor/d_a_obj_cho.cpp +++ b/src/d/actor/d_a_obj_cho.cpp @@ -97,7 +97,7 @@ int daObjCHO_c::CreateHeap() { return 1; } -static cPhs__Step daObjCHO_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObjCHO_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } @@ -528,9 +528,9 @@ bool daObjCHO_c::CreateChk() { return true; } -cPhs__Step daObjCHO_c::create() { +cPhs_Step daObjCHO_c::create() { fopAcM_ct(this, daObjCHO_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, "I_Cho"); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, "I_Cho"); if (step == cPhs_COMPLEATE_e) { mLocation = fopAcM_GetParam(this) & 0xf; diff --git a/src/d/actor/d_a_obj_crvfence.cpp b/src/d/actor/d_a_obj_crvfence.cpp index b0bd21ba57..675647133c 100644 --- a/src/d/actor/d_a_obj_crvfence.cpp +++ b/src/d/actor/d_a_obj_crvfence.cpp @@ -323,10 +323,10 @@ int daObjCRVFENCE_c::CreateHeap() { return 1; } -cPhs__Step daObjCRVFENCE_c::create() { +cPhs_Step daObjCRVFENCE_c::create() { fopAcM_ct(this, daObjCRVFENCE_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_arcName); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("Obj_Fence PARAM %x\n", fopAcM_GetParam(this)); @@ -349,7 +349,7 @@ cPhs__Step daObjCRVFENCE_c::create() { JUT_ASSERT(783, dzb_id != -1) } - phase = (cPhs__Step)MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0x1CA0, NULL); + phase = MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0x1CA0, NULL); if (phase == cPhs_ERROR_e) { return phase; } diff --git a/src/d/actor/d_a_obj_crvgate.cpp b/src/d/actor/d_a_obj_crvgate.cpp index ccd8030230..d781f0bc18 100644 --- a/src/d/actor/d_a_obj_crvgate.cpp +++ b/src/d/actor/d_a_obj_crvgate.cpp @@ -717,7 +717,7 @@ void daObjCRVGATE_c::SetDoor() { int daObjCRVGATE_c::create() { fopAcM_ct(this, daObjCRVGATE_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhaseReq, l_arcName); if (phase == cPhs_COMPLEATE_e) { gravity = nREG_F(0) + -9.0f; @@ -729,7 +729,7 @@ int daObjCRVGATE_c::create() { JUT_ASSERT(783, dzb_id != -1) } phase = - (cPhs__Step)MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0x1480, NULL); + MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0x1480, NULL); if (phase == cPhs_ERROR_e) { return phase; diff --git a/src/d/actor/d_a_obj_dan.cpp b/src/d/actor/d_a_obj_dan.cpp index ed3d319128..3c5f1cc226 100644 --- a/src/d/actor/d_a_obj_dan.cpp +++ b/src/d/actor/d_a_obj_dan.cpp @@ -106,7 +106,7 @@ int daObjDAN_c::CreateHeap() { return 1; } -static cPhs__Step daObjDAN_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObjDAN_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } @@ -505,9 +505,9 @@ bool daObjDAN_c::CreateChk() { return true; } -cPhs__Step daObjDAN_c::create() { +cPhs_Step daObjDAN_c::create() { fopAcM_ct(this, daObjDAN_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, "I_Dan"); + cPhs_Step step = dComIfG_resLoad(&mPhase, "I_Dan"); if (step == cPhs_COMPLEATE_e) { mLocation = fopAcM_GetParam(this) & 0xf; diff --git a/src/d/actor/d_a_obj_digsnow.cpp b/src/d/actor/d_a_obj_digsnow.cpp index c6ab5208c6..7eca2582c9 100644 --- a/src/d/actor/d_a_obj_digsnow.cpp +++ b/src/d/actor/d_a_obj_digsnow.cpp @@ -53,9 +53,9 @@ int daObjDigSnow_c::create1st() { return cPhs_ERROR_e; } - cPhs__Step phase_state = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step phase_state = dComIfG_resLoad(&mPhaseReq, l_arcName); if (phase_state == cPhs_COMPLEATE_e) { - phase_state = (cPhs__Step)MoveBGCreate(l_arcName, 7, dBgS_MoveBGProc_TypicalRotY, 0x1000, NULL); + phase_state = MoveBGCreate(l_arcName, 7, dBgS_MoveBGProc_TypicalRotY, 0x1000, NULL); if (phase_state == cPhs_ERROR_e) { return phase_state; } diff --git a/src/d/actor/d_a_obj_fallobj.cpp b/src/d/actor/d_a_obj_fallobj.cpp index dad286560f..6900391d26 100644 --- a/src/d/actor/d_a_obj_fallobj.cpp +++ b/src/d/actor/d_a_obj_fallobj.cpp @@ -118,10 +118,10 @@ int daObjFallObj_c::CreateHeap() { int daObjFallObj_c::create1st() { field_0x5d8 = 1; - cPhs__Step phase = (cPhs__Step) dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhaseReq, l_arcName); if (phase == cPhs_COMPLEATE_e) { phase = - (cPhs__Step) MoveBGCreate(l_arcName, 7, dBgS_MoveBGProc_Typical, 0x2700, NULL); + MoveBGCreate(l_arcName, 7, dBgS_MoveBGProc_Typical, 0x2700, NULL); if (phase == cPhs_ERROR_e) { return phase; } diff --git a/src/d/actor/d_a_obj_food.cpp b/src/d/actor/d_a_obj_food.cpp index 3135d7a444..e416af3bf0 100644 --- a/src/d/actor/d_a_obj_food.cpp +++ b/src/d/actor/d_a_obj_food.cpp @@ -416,11 +416,11 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daObj_Food_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObj_Food_Create(fopAc_ac_c* i_this) { obj_food_class* _this = static_cast(i_this); fopAcM_ct(i_this, obj_food_class); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhase, "Obj_fd"); + cPhs_Step step = dComIfG_resLoad(&_this->mPhase, "Obj_fd"); if (step == cPhs_COMPLEATE_e) { _this->mType = (u8)fopAcM_GetParam(_this); _this->mParam1 = (u8)(fopAcM_GetParam(_this) >> 8); diff --git a/src/d/actor/d_a_obj_fw.cpp b/src/d/actor/d_a_obj_fw.cpp index 79304a02c3..48f11e1c1d 100644 --- a/src/d/actor/d_a_obj_fw.cpp +++ b/src/d/actor/d_a_obj_fw.cpp @@ -238,11 +238,11 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 1; } -static cPhs__Step daObj_Fw_Create(fopAc_ac_c* a_this) { +static cPhs_Step daObj_Fw_Create(fopAc_ac_c* a_this) { fopAcM_ct(a_this, obj_fw_class); obj_fw_class* i_this = (obj_fw_class*)a_this; - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, "RYUW00"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, "RYUW00"); if (phase == cPhs_COMPLEATE_e) { if (dComIfGs_isStageBossEnemy()) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_obj_ganonwall.cpp b/src/d/actor/d_a_obj_ganonwall.cpp index d2f04ddbb1..7f6704af47 100644 --- a/src/d/actor/d_a_obj_ganonwall.cpp +++ b/src/d/actor/d_a_obj_ganonwall.cpp @@ -86,7 +86,7 @@ int daObjGWall_c::CreateHeap() { int daObjGWall_c::create() { fopAcM_ct(this, daObjGWall_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhaseReq, l_arcName); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, CheckCreateHeap, 0x3500)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_obj_ganonwall2.cpp b/src/d/actor/d_a_obj_ganonwall2.cpp index 7ab8705d3a..80513d1bc1 100644 --- a/src/d/actor/d_a_obj_ganonwall2.cpp +++ b/src/d/actor/d_a_obj_ganonwall2.cpp @@ -80,9 +80,9 @@ int daObjGWall2_c::create1st() { { return cPhs_ERROR_e; } - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhaseReq, l_arcName); if (phase == cPhs_COMPLEATE_e) { - phase = (cPhs__Step)MoveBGCreate(l_arcName, 11, NULL, 0x6100, NULL); + phase = MoveBGCreate(l_arcName, 11, NULL, 0x6100, NULL); if (phase == cPhs_ERROR_e) { return phase; } diff --git a/src/d/actor/d_a_obj_gm.cpp b/src/d/actor/d_a_obj_gm.cpp index a5fd980fc0..714b2ba2fc 100644 --- a/src/d/actor/d_a_obj_gm.cpp +++ b/src/d/actor/d_a_obj_gm.cpp @@ -629,11 +629,11 @@ static int useHeapInit(fopAc_ac_c* a_this) { static daObj_Gm_HIO_c l_HIO; -static cPhs__Step daObj_Gm_Create(fopAc_ac_c* a_this) { +static cPhs_Step daObj_Gm_Create(fopAc_ac_c* a_this) { fopAcM_ct(a_this, obj_gm_class); obj_gm_class* i_this = (obj_gm_class*)a_this; - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, "OBJ_GM"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, "OBJ_GM"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("OBJ_GM PARAM %x\n", fopAcM_GetParam(a_this)); a_this->field_0x565 = fopAcM_GetParam(a_this); diff --git a/src/d/actor/d_a_obj_goGate.cpp b/src/d/actor/d_a_obj_goGate.cpp index fba08ce0ea..f8b85aded1 100644 --- a/src/d/actor/d_a_obj_goGate.cpp +++ b/src/d/actor/d_a_obj_goGate.cpp @@ -28,10 +28,10 @@ int daGoGate_c::CreateHeap() { return mpModel ? 1 : 0; } -cPhs__Step daGoGate_c::create() { +cPhs_Step daGoGate_c::create() { fopAcM_ct(this, daGoGate_c); - cPhs__Step phase = static_cast(dComIfG_resLoad(&mPhase, "P_Ggate")); + cPhs_Step phase = static_cast(dComIfG_resLoad(&mPhase, "P_Ggate")); if (phase == cPhs_COMPLEATE_e) { if (MoveBGCreate("P_Ggate", 7, dBgS_MoveBGProc_TypicalRotY, 0x1c00, NULL) == cPhs_ERROR_e) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_obj_gra2.cpp b/src/d/actor/d_a_obj_gra2.cpp index ff81db4ecd..9ac731d7ac 100644 --- a/src/d/actor/d_a_obj_gra2.cpp +++ b/src/d/actor/d_a_obj_gra2.cpp @@ -250,13 +250,13 @@ daObj_GrA_c::~daObj_GrA_c() { #endif } -cPhs__Step daObj_GrA_c::create() { +cPhs_Step daObj_GrA_c::create() { int uVar1 = 0; fopAcM_ct(this, daObj_GrA_c); mMode = getMode(); int i; - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, getResName()); + cPhs_Step phase = dComIfG_resLoad(&mPhase, getResName()); if (phase == cPhs_ERROR_e || phase == cPhs_UNK3_e) { return cPhs_ERROR_e; } @@ -266,7 +266,7 @@ cPhs__Step daObj_GrA_c::create() { } for (i = 0; l_exloadRes_list[mMode][i] >= 0; i++) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhases[i], l_resNames[l_exloadRes_list[mMode][i]]); + phase = dComIfG_resLoad(&mPhases[i], l_resNames[l_exloadRes_list[mMode][i]]); if (phase == cPhs_ERROR_e || phase == cPhs_UNK3_e) { return cPhs_ERROR_e; } diff --git a/src/d/actor/d_a_obj_grave_stone.cpp b/src/d/actor/d_a_obj_grave_stone.cpp index 8d1a5b3ab8..6dcb0389c0 100644 --- a/src/d/actor/d_a_obj_grave_stone.cpp +++ b/src/d/actor/d_a_obj_grave_stone.cpp @@ -156,12 +156,12 @@ int daGraveStone_c::CreateHeap() { return 1; } -cPhs__Step daGraveStone_c::create() { +cPhs_Step daGraveStone_c::create() { fopAcM_ct(this, daGraveStone_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step step = dComIfG_resLoad(&mPhase, l_arcName); if (step == cPhs_COMPLEATE_e) { int dzb_id = dComIfG_getObjctResName2Index(l_arcName, "H_Haka.dzb"); - step = (cPhs__Step)MoveBGCreate(l_arcName, dzb_id, + step = MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0x29A0, NULL); if (step == cPhs_ERROR_e) { return step; @@ -211,7 +211,7 @@ static int daGraveStone_Delete(daGraveStone_c* i_this) { return i_this->MoveBGDelete(); } -static cPhs__Step daGraveStone_create(fopAc_ac_c* i_this) { +static cPhs_Step daGraveStone_create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_grz_rock.cpp b/src/d/actor/d_a_obj_grz_rock.cpp index 3d75b738c9..5bd93e131b 100644 --- a/src/d/actor/d_a_obj_grz_rock.cpp +++ b/src/d/actor/d_a_obj_grz_rock.cpp @@ -62,7 +62,7 @@ int daObjGrzRock_c::CreateHeap() { return 1; } -cPhs__Step daObjGrzRock_c::create() { +cPhs_Step daObjGrzRock_c::create() { fopAcM_ct(this, daObjGrzRock_c); if (dComIfGs_isSwitch((fopAcM_GetParam(this) >> 8) & 0xFF, fopAcM_GetRoomNo(this))) { @@ -71,9 +71,9 @@ cPhs__Step daObjGrzRock_c::create() { int dzb_id = 0; int i = 0; - cPhs__Step phase; + cPhs_Step phase; for (; i < 1; i++) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhase[i], l_arcName); + phase = dComIfG_resLoad(&mPhase[i], l_arcName); if (phase == cPhs_ERROR_e || phase == cPhs_UNK3_e) { return cPhs_ERROR_e; } @@ -87,7 +87,7 @@ cPhs__Step daObjGrzRock_c::create() { dzb_id = dComIfG_getObjctResName2Index(l_arcName, "grZRock.dzb"); JUT_ASSERT(302, dzb_id != -1); - phase = (cPhs__Step)MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0x1030, NULL); + phase = MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0x1030, NULL); if (phase == cPhs_ERROR_e) { return phase; } diff --git a/src/d/actor/d_a_obj_h_saku.cpp b/src/d/actor/d_a_obj_h_saku.cpp index 04877443cd..7461add608 100644 --- a/src/d/actor/d_a_obj_h_saku.cpp +++ b/src/d/actor/d_a_obj_h_saku.cpp @@ -80,15 +80,15 @@ int daObjH_Saku_c::CreateHeap() { return 1; } -cPhs__Step daObjH_Saku_c::create() { +cPhs_Step daObjH_Saku_c::create() { fopAcM_ct(this, daObjH_Saku_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_arcName); if (phase == cPhs_COMPLEATE_e) { int dzb_id = dComIfG_getObjctResName2Index(l_arcName, "H_Saku.dzb"); JUT_ASSERT(113, dzb_id != -1); - phase = (cPhs__Step)MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0x1320, NULL); + phase = MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0x1320, NULL); if (phase == cPhs_ERROR_e) { return phase; } diff --git a/src/d/actor/d_a_obj_hasu2.cpp b/src/d/actor/d_a_obj_hasu2.cpp index 67f98dcfcc..f67a777e9f 100644 --- a/src/d/actor/d_a_obj_hasu2.cpp +++ b/src/d/actor/d_a_obj_hasu2.cpp @@ -34,11 +34,11 @@ nObjMHasu::daObjMHasu_c::daObjMHasu_c() : } int nObjMHasu::daObjMHasu_c::create1st() { - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(this, l_arcName); + cPhs_Step phase = dComIfG_resLoad(this, l_arcName); if (phase == cPhs_COMPLEATE_e) { setMtx(); - phase = (cPhs__Step)MoveBGCreate(l_arcName, l_dzbidx, dBgS_MoveBGProc_TypicalRotY, 0x1450, &mMtx); + phase = MoveBGCreate(l_arcName, l_dzbidx, dBgS_MoveBGProc_TypicalRotY, 0x1450, &mMtx); if (phase == cPhs_ERROR_e) { return phase; diff --git a/src/d/actor/d_a_obj_hata.cpp b/src/d/actor/d_a_obj_hata.cpp index 2135eb42b1..58fcc3dddb 100644 --- a/src/d/actor/d_a_obj_hata.cpp +++ b/src/d/actor/d_a_obj_hata.cpp @@ -52,10 +52,10 @@ int daObjHata_c::createHeap() { return 1; } -cPhs__Step daObjHata_c::create() { +cPhs_Step daObjHata_c::create() { fopAcM_ct(this, daObjHata_c); - cPhs__Step phase_step = (cPhs__Step)dComIfG_resLoad(this, l_arcName); + cPhs_Step phase_step = dComIfG_resLoad(this, l_arcName); if (phase_step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, daObjHata_c_createHeap, 0x870)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_obj_hb.cpp b/src/d/actor/d_a_obj_hb.cpp index 5bb7aa2b54..9f3d904066 100644 --- a/src/d/actor/d_a_obj_hb.cpp +++ b/src/d/actor/d_a_obj_hb.cpp @@ -642,11 +642,11 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 1; } -static cPhs__Step daOBJ_HB_Create(fopAc_ac_c* a_this) { +static cPhs_Step daOBJ_HB_Create(fopAc_ac_c* a_this) { fopAcM_ct(a_this, obj_hb_class); obj_hb_class* i_this = (obj_hb_class*)a_this; - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, "E_HB"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, "E_HB"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("OBJ_HB PARAM %x\n", fopAcM_GetParam(a_this)); i_this->arg0 = fopAcM_GetParam(a_this); diff --git a/src/d/actor/d_a_obj_ihasi.cpp b/src/d/actor/d_a_obj_ihasi.cpp index 64a79899d2..fe3219ee6c 100644 --- a/src/d/actor/d_a_obj_ihasi.cpp +++ b/src/d/actor/d_a_obj_ihasi.cpp @@ -152,7 +152,7 @@ static int daObj_Ihasi_Create(fopAc_ac_c* i_actor) { obj_ihasi_class* i_this = static_cast(i_actor); fopAcM_ct(i_this, obj_ihasi_class); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&i_this->mPhaseReq, "Obj_ihasi"); + cPhs_Step step = dComIfG_resLoad(&i_this->mPhaseReq, "Obj_ihasi"); if (step == cPhs_COMPLEATE_e) { OS_REPORT("OBJ_IHASI PARAM %x\n", fopAcM_GetParam(i_actor)); diff --git a/src/d/actor/d_a_obj_ikada.cpp b/src/d/actor/d_a_obj_ikada.cpp index a6bc5f2cf1..ef1f729c09 100644 --- a/src/d/actor/d_a_obj_ikada.cpp +++ b/src/d/actor/d_a_obj_ikada.cpp @@ -98,15 +98,15 @@ int daObjIkada_c::CreateHeap() { return 1; } -cPhs__Step daObjIkada_c::create() { +cPhs_Step daObjIkada_c::create() { fopAcM_ct(this, daObjIkada_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_arcName); if (phase == cPhs_COMPLEATE_e) { int dzb_id = dComIfG_getObjctResName2Index(l_arcName, "M_Ikada.dzb"); JUT_ASSERT(108, dzb_id != -1); - phase = (cPhs__Step)MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0xC00, NULL); + phase = MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0xC00, NULL); if (phase == cPhs_ERROR_e) { return phase; } diff --git a/src/d/actor/d_a_obj_ita.cpp b/src/d/actor/d_a_obj_ita.cpp index 994a406d79..a1dd15fe68 100644 --- a/src/d/actor/d_a_obj_ita.cpp +++ b/src/d/actor/d_a_obj_ita.cpp @@ -186,14 +186,14 @@ int daObjIta_c::CreateHeap() { return 1; } -cPhs__Step daObjIta_c::create() { +cPhs_Step daObjIta_c::create() { fopAcM_ct(this, daObjIta_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_arcName); if (phase == cPhs_COMPLEATE_e) { int dzb_id = dComIfG_getObjctResName2Index(l_arcName, "M_FloatingDust00.dzb"); JUT_ASSERT(763, dzb_id != -1); - phase = (cPhs__Step)MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0x1320, NULL); + phase = MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0x1320, NULL); if (phase == cPhs_ERROR_e) { return phase; } diff --git a/src/d/actor/d_a_obj_itamato.cpp b/src/d/actor/d_a_obj_itamato.cpp index 54ada49cda..92d15e694f 100644 --- a/src/d/actor/d_a_obj_itamato.cpp +++ b/src/d/actor/d_a_obj_itamato.cpp @@ -126,11 +126,11 @@ daObj_ItaMato_c::~daObj_ItaMato_c() { dComIfG_resDelete(&mPhase, getResName()); } -cPhs__Step daObj_ItaMato_c::create() { +cPhs_Step daObj_ItaMato_c::create() { fopAcM_ct(this, daObj_ItaMato_c); mType = getType(); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, getResName()); + cPhs_Step phase = dComIfG_resLoad(&mPhase, getResName()); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) no:%d, SWBit:%02x, SWBit2:%02x<%08x> -> roomNo.%d", fopAcM_getProcNameString(this), getType(), getNo(), getBitSW(), getBitSW2(), fopAcM_GetParam(this), fopAcM_GetRoomNo(this)); diff --git a/src/d/actor/d_a_obj_ito.cpp b/src/d/actor/d_a_obj_ito.cpp index c17ac611dc..87de60ae46 100644 --- a/src/d/actor/d_a_obj_ito.cpp +++ b/src/d/actor/d_a_obj_ito.cpp @@ -592,12 +592,12 @@ static int useHeapInit(fopAc_ac_c* a_this) { return 1; } -static cPhs__Step daObj_Ito_Create(fopAc_ac_c* a_this) { +static cPhs_Step daObj_Ito_Create(fopAc_ac_c* a_this) { fopAcM_ct(a_this, obj_ito_class); obj_ito_class* i_this = (obj_ito_class*)a_this; a_this = &i_this->actor; - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&i_this->mPhase, "OBJ_ITO"); + cPhs_Step phase = dComIfG_resLoad(&i_this->mPhase, "OBJ_ITO"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("OBJ_ITO PARAM %x\n", fopAcM_GetParam(a_this)); diff --git a/src/d/actor/d_a_obj_kabuto.cpp b/src/d/actor/d_a_obj_kabuto.cpp index ddfaedaa41..4e5413fa63 100644 --- a/src/d/actor/d_a_obj_kabuto.cpp +++ b/src/d/actor/d_a_obj_kabuto.cpp @@ -106,7 +106,7 @@ int daObjKABUTO_c::CreateHeap() { return 1; } -static cPhs__Step daObjKABUTO_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObjKABUTO_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } @@ -723,9 +723,9 @@ bool daObjKABUTO_c::CreateChk() { return true; } -cPhs__Step daObjKABUTO_c::create() { +cPhs_Step daObjKABUTO_c::create() { fopAcM_ct(this, daObjKABUTO_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, "Kab_m"); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, "Kab_m"); if (step == cPhs_COMPLEATE_e) { mLocation = fopAcM_GetParam(this) & 0xf; diff --git a/src/d/actor/d_a_obj_kag.cpp b/src/d/actor/d_a_obj_kag.cpp index e265521494..22db0ab5cb 100644 --- a/src/d/actor/d_a_obj_kag.cpp +++ b/src/d/actor/d_a_obj_kag.cpp @@ -639,12 +639,12 @@ static u16 const l_musiya_num[2] = { 0x01A8 }; -cPhs__Step daObjKAG_c::create() { +cPhs_Step daObjKAG_c::create() { u8 uVar1 = (fopAcM_GetParam(this) & 0xF00) >> 8; fopAcM_ct(this, daObjKAG_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, "I_Kag"); + cPhs_Step phase = dComIfG_resLoad(&mPhase, "I_Kag"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("KAG PARAM %x\n", fopAcM_GetParam(this)); diff --git a/src/d/actor/d_a_obj_kago.cpp b/src/d/actor/d_a_obj_kago.cpp index fc1ff5ca51..311f092bfe 100644 --- a/src/d/actor/d_a_obj_kago.cpp +++ b/src/d/actor/d_a_obj_kago.cpp @@ -92,7 +92,7 @@ daObj_Kago_c::~daObj_Kago_c() { dComIfG_resDelete(&mPhase, l_resNameList[l_bmdData[0][1]]); } -cPhs__Step daObj_Kago_c::create() { +cPhs_Step daObj_Kago_c::create() { static int const heapSize[5] = { 0x0820, 0x0820, 0, 0x0820, 0, }; @@ -101,7 +101,7 @@ cPhs__Step daObj_Kago_c::create() { mType = getType(); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_resNameList[l_bmdData[0][1]]); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_resNameList[l_bmdData[0][1]]); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) <%08x> -> roomNo.%d", fopAcM_getProcNameString(this), getType(), fopAcM_GetParam(this), fopAcM_GetRoomNo(this)); if (mType == 0 && isDelete()) { diff --git a/src/d/actor/d_a_obj_kaisou.cpp b/src/d/actor/d_a_obj_kaisou.cpp index bd5c84cfaa..d854741350 100644 --- a/src/d/actor/d_a_obj_kaisou.cpp +++ b/src/d/actor/d_a_obj_kaisou.cpp @@ -248,10 +248,10 @@ static int daObjKaisou_Execute(daObjKaisou_c* i_this) { return i_this->Execute(); } -cPhs__Step daObjKaisou_c::create() { +cPhs_Step daObjKaisou_c::create() { fopAcM_ct(this, daObjKaisou_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_arcName); if (phase == cPhs_COMPLEATE_e) { if (dComIfGs_isStageBossEnemy() && dComIfGp_getStartStageRoomNo() == 50) { if (strcmp("D_MN01A", dComIfGp_getStartStageName()) == 0) { diff --git a/src/d/actor/d_a_obj_ki.cpp b/src/d/actor/d_a_obj_ki.cpp index f8a8192a42..cec0fa740c 100644 --- a/src/d/actor/d_a_obj_ki.cpp +++ b/src/d/actor/d_a_obj_ki.cpp @@ -139,10 +139,10 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daObj_Ki_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObj_Ki_Create(fopAc_ac_c* i_this) { obj_ki_class* _this = static_cast(i_this); fopAcM_ct(_this, obj_ki_class); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhaseReq, "Obj_Ki"); + cPhs_Step step = dComIfG_resLoad(&_this->mPhaseReq, "Obj_Ki"); if (step == cPhs_COMPLEATE_e) { _this->mBmdIdx = (u8)fopAcM_GetParam(_this); diff --git a/src/d/actor/d_a_obj_klift00.cpp b/src/d/actor/d_a_obj_klift00.cpp index 8529063a0b..739c7fe7f8 100644 --- a/src/d/actor/d_a_obj_klift00.cpp +++ b/src/d/actor/d_a_obj_klift00.cpp @@ -114,16 +114,16 @@ void dummy() { delete (dCcD_Cyl*)NULL; } -cPhs__Step daObjKLift00_c::create1st() { +cPhs_Step daObjKLift00_c::create1st() { mNumChainModels = getArg0(); mNumChains = mNumChainModels + 1; - cPhs__Step phase = static_cast(dComIfG_resLoad(this, l_arcName)); + cPhs_Step phase = static_cast(dComIfG_resLoad(this, l_arcName)); if(phase == cPhs_COMPLEATE_e) { #if DEBUG - phase = static_cast(MoveBGCreate(l_arcName, l_dzbidx[0], dBgS_MoveBGProc_TypicalRotY, 0x2000, NULL)); + phase = static_cast(MoveBGCreate(l_arcName, l_dzbidx[0], dBgS_MoveBGProc_TypicalRotY, 0x2000, NULL)); #else - phase = static_cast(MoveBGCreate(l_arcName, 9, dBgS_MoveBGProc_TypicalRotY, 0x2000, NULL)); + phase = static_cast(MoveBGCreate(l_arcName, 9, dBgS_MoveBGProc_TypicalRotY, 0x2000, NULL)); #endif if(phase == cPhs_ERROR_e) return phase; diff --git a/src/d/actor/d_a_obj_kshutter.cpp b/src/d/actor/d_a_obj_kshutter.cpp index 917a9c5332..a484837a78 100644 --- a/src/d/actor/d_a_obj_kshutter.cpp +++ b/src/d/actor/d_a_obj_kshutter.cpp @@ -304,7 +304,7 @@ void daObjKshtr_c::initKey() { } } -cPhs__Step daObjKshtr_c::phase_0() { +cPhs_Step daObjKshtr_c::phase_0() { if (!field_0x619) { mHomeAngleZ = home.angle.z; mHomeAngleX = home.angle.x; @@ -334,17 +334,17 @@ cPhs__Step daObjKshtr_c::phase_0() { } #endif - cPhs__Step phase; + cPhs_Step phase; if (l_anmArcName[mType] != NULL) { - phase = (cPhs__Step)dComIfG_resLoad(&mPhase2, l_anmArcName[mType]); + phase = dComIfG_resLoad(&mPhase2, l_anmArcName[mType]); if (phase != cPhs_COMPLEATE_e) { return phase; } } - phase = (cPhs__Step)dComIfG_resLoad(&mPhase1, l_arcName[mType]); + phase = dComIfG_resLoad(&mPhase1, l_arcName[mType]); if (phase == cPhs_COMPLEATE_e) { - phase = (cPhs__Step)MoveBGCreate(l_arcName[mType], l_dzb[mType], NULL, l_heap_size[mType], NULL); + phase = MoveBGCreate(l_arcName[mType], l_dzb[mType], NULL, l_heap_size[mType], NULL); if (phase == cPhs_ERROR_e) { return phase; } @@ -356,7 +356,7 @@ cPhs__Step daObjKshtr_c::phase_0() { return phase; } -cPhs__Step daObjKshtr_c::phase_1() { +cPhs_Step daObjKshtr_c::phase_1() { if (mKeyHoleId != fpcM_ERROR_PROCESS_ID_e) { obj_keyhole_class* keyhole_p = (obj_keyhole_class*)fopAcM_SearchByID(mKeyHoleId); @@ -376,11 +376,11 @@ cPhs__Step daObjKshtr_c::phase_1() { return cPhs_INIT_e; } -cPhs__Step daObjKshtr_c::phase_2() { +cPhs_Step daObjKshtr_c::phase_2() { return cPhs_COMPLEATE_e; } -cPhs__Step daObjKshtr_c::create1st() { +cPhs_Step daObjKshtr_c::create1st() { static daObjKshtr_c::PhaseFunc l_ct_func[3] = { &daObjKshtr_c::phase_0, &daObjKshtr_c::phase_1, diff --git a/src/d/actor/d_a_obj_kwheel00.cpp b/src/d/actor/d_a_obj_kwheel00.cpp index c5a1d675c9..ad63eb2234 100644 --- a/src/d/actor/d_a_obj_kwheel00.cpp +++ b/src/d/actor/d_a_obj_kwheel00.cpp @@ -45,11 +45,11 @@ int daObjKWheel00_c::create1st() { m_type = static_cast(getType()); JUT_ASSERT(118, m_type == 0 || m_type == 1); - cPhs__Step phase = static_cast(dComIfG_resLoad(this, l_arcName[m_type])); + cPhs_Step phase = static_cast(dComIfG_resLoad(this, l_arcName[m_type])); if(phase == cPhs_COMPLEATE_e) { setMtx(); - phase = static_cast(MoveBGCreate(l_arcName[m_type], l_dzbidx[m_type], NULL, 0x4000, &mNewBgMtx)); + phase = static_cast(MoveBGCreate(l_arcName[m_type], l_dzbidx[m_type], NULL, 0x4000, &mNewBgMtx)); if(phase == cPhs_ERROR_e) return phase; diff --git a/src/d/actor/d_a_obj_kwheel01.cpp b/src/d/actor/d_a_obj_kwheel01.cpp index cf5e5d1eaf..b861f43bab 100644 --- a/src/d/actor/d_a_obj_kwheel01.cpp +++ b/src/d/actor/d_a_obj_kwheel01.cpp @@ -53,7 +53,7 @@ static Vec l_pos[4] = { {-930.0f, -165.0f, 0.0f}, {0.0f, -165.0f, -930.0f} }; -cPhs__Step daObjKWheel01_c::create1st() { +cPhs_Step daObjKWheel01_c::create1st() { bool atLeastOneKLiftExists = false; s8 debugStackVar; @@ -78,13 +78,13 @@ cPhs__Step daObjKWheel01_c::create1st() { } } - cPhs__Step phase = static_cast(dComIfG_resLoad(this, l_arcName)); + cPhs_Step phase = static_cast(dComIfG_resLoad(this, l_arcName)); if(phase == cPhs_COMPLEATE_e) { mYAngularVelocity = 0; setMtx(); - phase = static_cast(MoveBGCreate(l_arcName, (getOut() ? l_dzbidx[2] : l_dzbidx[0]), dBgS_MoveBGProc_TypicalRotY, 0x5D98, &mNewBgMtx)); + phase = static_cast(MoveBGCreate(l_arcName, (getOut() ? l_dzbidx[2] : l_dzbidx[0]), dBgS_MoveBGProc_TypicalRotY, 0x5D98, &mNewBgMtx)); if(phase == cPhs_ERROR_e) return phase; diff --git a/src/d/actor/d_a_obj_lbox.cpp b/src/d/actor/d_a_obj_lbox.cpp index cbd2c361a5..2928266677 100644 --- a/src/d/actor/d_a_obj_lbox.cpp +++ b/src/d/actor/d_a_obj_lbox.cpp @@ -134,7 +134,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daObj_Lbox_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObj_Lbox_Create(fopAc_ac_c* i_this) { static dCcD_SrcSph cc_sph_src = { { {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj @@ -149,7 +149,7 @@ static cPhs__Step daObj_Lbox_Create(fopAc_ac_c* i_this) { obj_lbox_class* a_this = static_cast(i_this); fopAcM_ct(a_this, obj_lbox_class); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&a_this->mPhaseReq, "Obj_lbox"); + cPhs_Step step = dComIfG_resLoad(&a_this->mPhaseReq, "Obj_lbox"); if (step == cPhs_COMPLEATE_e) { a_this->mParam = fopAcM_GetParam(i_this); diff --git a/src/d/actor/d_a_obj_lv1Candle00.cpp b/src/d/actor/d_a_obj_lv1Candle00.cpp index 701f474814..40394300a3 100644 --- a/src/d/actor/d_a_obj_lv1Candle00.cpp +++ b/src/d/actor/d_a_obj_lv1Candle00.cpp @@ -51,9 +51,9 @@ int daLv1Cdl00_c::CreateHeap() { return true; } -cPhs__Step daLv1Cdl00_c::create() { +cPhs_Step daLv1Cdl00_c::create() { fopAcM_ct(this, daLv1Cdl00_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, "lv1cdl00"); + cPhs_Step step = dComIfG_resLoad(&mPhase, "lv1cdl00"); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x820)) { return cPhs_ERROR_e; @@ -263,7 +263,7 @@ static int daLv1Cdl00_Delete(daLv1Cdl00_c* i_this) { return i_this->Delete(); } -static cPhs__Step daLv1Cdl00_Create(fopAc_ac_c* i_this) { +static cPhs_Step daLv1Cdl00_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_lv1Candle01.cpp b/src/d/actor/d_a_obj_lv1Candle01.cpp index 916b73bdb9..135f74f742 100644 --- a/src/d/actor/d_a_obj_lv1Candle01.cpp +++ b/src/d/actor/d_a_obj_lv1Candle01.cpp @@ -51,9 +51,9 @@ int daLv1Cdl01_c::CreateHeap() { return true; } -cPhs__Step daLv1Cdl01_c::create() { +cPhs_Step daLv1Cdl01_c::create() { fopAcM_ct(this, daLv1Cdl01_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, "lv1cdl01"); + cPhs_Step step = dComIfG_resLoad(&mPhase, "lv1cdl01"); if (step == cPhs_COMPLEATE_e) { if (MoveBGCreate("lv1cdl01", -1, NULL, 0x820, NULL) == cPhs_ERROR_e) { return cPhs_ERROR_e; @@ -217,7 +217,7 @@ static int daLv1Cdl01_Delete(daLv1Cdl01_c* i_this) { return i_this->MoveBGDelete(); } -static cPhs__Step daLv1Cdl01_Create(fopAc_ac_c* i_this) { +static cPhs_Step daLv1Cdl01_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_lv2Candle.cpp b/src/d/actor/d_a_obj_lv2Candle.cpp index d0e7100c44..f8c7dc7ab0 100644 --- a/src/d/actor/d_a_obj_lv2Candle.cpp +++ b/src/d/actor/d_a_obj_lv2Candle.cpp @@ -84,13 +84,13 @@ int daLv2Candle_c::CreateHeap() { return true; } -cPhs__Step daLv2Candle_c::create() { +cPhs_Step daLv2Candle_c::create() { fopAcM_ct(this, daLv2Candle_c); mModelType = getModelType(); if (mModelType == 0xf) { mModelType = 0; } - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, l_resNameIdx[mModelType]); + cPhs_Step step = dComIfG_resLoad(&mPhase, l_resNameIdx[mModelType]); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x1000)) { return cPhs_ERROR_e; @@ -382,7 +382,7 @@ static int daLv2Candle_Delete(daLv2Candle_c* i_this) { return i_this->Delete(); } -static cPhs__Step daLv2Candle_Create(fopAc_ac_c* i_this) { +static cPhs_Step daLv2Candle_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_lv3Candle.cpp b/src/d/actor/d_a_obj_lv3Candle.cpp index 6f48136279..079c2e5adc 100644 --- a/src/d/actor/d_a_obj_lv3Candle.cpp +++ b/src/d/actor/d_a_obj_lv3Candle.cpp @@ -47,7 +47,7 @@ int daLv3Candle_c::CreateHeap() { return TRUE; } -cPhs__Step daLv3Candle_c::create() { +cPhs_Step daLv3Candle_c::create() { fopAcM_ct(this, daLv3Candle_c); mType = getType(); @@ -55,7 +55,7 @@ cPhs__Step daLv3Candle_c::create() { mType = 0; } - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_resNameIdx[mType]); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, l_resNameIdx[mType]); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x900)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_obj_lv3Water2.cpp b/src/d/actor/d_a_obj_lv3Water2.cpp index 486e7e033f..f00fc68485 100644 --- a/src/d/actor/d_a_obj_lv3Water2.cpp +++ b/src/d/actor/d_a_obj_lv3Water2.cpp @@ -96,11 +96,11 @@ int daLv3Water2_c::CreateHeap() { return 1; } -cPhs__Step daLv3Water2_c::create() { +cPhs_Step daLv3Water2_c::create() { fopAcM_ct(this, daLv3Water2_c); mResourceIndex = getParam(0, 4); - cPhs__Step resPhase = static_cast(dComIfG_resLoad(&mPhase, l_resNameIdx[mResourceIndex])); + cPhs_Step resPhase = static_cast(dComIfG_resLoad(&mPhase, l_resNameIdx[mResourceIndex])); if(resPhase == cPhs_COMPLEATE_e) { if(MoveBGCreate(l_resNameIdx[mResourceIndex], l_dzbIdx[mResourceIndex], NULL, 0x2D00, NULL) == cPhs_ERROR_e) return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_obj_lv6SzGate.cpp b/src/d/actor/d_a_obj_lv6SzGate.cpp index c8e0d05efc..2ac61affec 100644 --- a/src/d/actor/d_a_obj_lv6SzGate.cpp +++ b/src/d/actor/d_a_obj_lv6SzGate.cpp @@ -76,10 +76,10 @@ int daLv6SzGate_c::CreateHeap() { return 1; } -cPhs__Step daLv6SzGate_c::create() { +cPhs_Step daLv6SzGate_c::create() { fopAcM_ct(this, daLv6SzGate_c); - cPhs__Step phase = static_cast(dComIfG_resLoad(&mPhase, "L6SzGate")); + cPhs_Step phase = static_cast(dComIfG_resLoad(&mPhase, "L6SzGate")); if (phase == cPhs_COMPLEATE_e) { if (MoveBGCreate("L6SzGate", 15, dBgS_MoveBGProc_TypicalRotY, 0x1d80, NULL) == cPhs_ERROR_e) { diff --git a/src/d/actor/d_a_obj_lv6bemos.cpp b/src/d/actor/d_a_obj_lv6bemos.cpp index 40f7fddbb2..2945ce8fce 100644 --- a/src/d/actor/d_a_obj_lv6bemos.cpp +++ b/src/d/actor/d_a_obj_lv6bemos.cpp @@ -214,15 +214,15 @@ int daObjL6Bm_c::CreateHeap() { return 1; } -cPhs__Step daObjL6Bm_c::create1st() { +cPhs_Step daObjL6Bm_c::create1st() { if (fopAcM_isSwitch(this, getSwBit())) { OS_REPORT("ビーモス破壊済み!<%d>\n", getSwBit() & 0xFF); // Beamos has been destroyed! <%d>\n return cPhs_ERROR_e; } - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_arcName); if (phase == cPhs_COMPLEATE_e) { - phase = (cPhs__Step)MoveBGCreate(l_arcName, DZB_K_BIMO00, NULL, 0x4000, NULL); + phase = MoveBGCreate(l_arcName, DZB_K_BIMO00, NULL, 0x4000, NULL); if (phase == cPhs_ERROR_e) { return phase; } diff --git a/src/d/actor/d_a_obj_lv6bemos2.cpp b/src/d/actor/d_a_obj_lv6bemos2.cpp index 90aa698e2b..b56db1563e 100644 --- a/src/d/actor/d_a_obj_lv6bemos2.cpp +++ b/src/d/actor/d_a_obj_lv6bemos2.cpp @@ -299,7 +299,7 @@ int daObjLv6Bm_c::CreateHeap() { return 1; } -cPhs__Step daObjLv6Bm_c::create1st() { +cPhs_Step daObjLv6Bm_c::create1st() { if (fopAcM_isSwitch(this, (u8)getSwNo3())) { OS_REPORT("Lv6ビーモス:既に破壊!<%d>\n", getSwNo3()); // Lv6 Beamos: Already destroyed! <%d> return cPhs_ERROR_e; @@ -317,9 +317,9 @@ cPhs__Step daObjLv6Bm_c::create1st() { field_0xa36 = 1; } - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_arcName); if (phase == cPhs_COMPLEATE_e) { - phase = (cPhs__Step)MoveBGCreate(l_arcName, DZB_BM6, dBgS_MoveBGProc_TypicalRotY, 0x2FA0, NULL); + phase = MoveBGCreate(l_arcName, DZB_BM6, dBgS_MoveBGProc_TypicalRotY, 0x2FA0, NULL); if (phase == cPhs_ERROR_e) { return phase; diff --git a/src/d/actor/d_a_obj_magne_arm.cpp b/src/d/actor/d_a_obj_magne_arm.cpp index 2557777987..e2531f8d34 100644 --- a/src/d/actor/d_a_obj_magne_arm.cpp +++ b/src/d/actor/d_a_obj_magne_arm.cpp @@ -332,20 +332,20 @@ int daObjMarm_c::CreateHeap() { return TRUE; } -cPhs__Step daObjMarm_c::phase_0() { +cPhs_Step daObjMarm_c::phase_0() { mMoveType = getMoveType(); int phase = dComIfG_resLoad(&mPhase, l_arcName); if (phase == cPhs_COMPLEATE_e) { phase = MoveBGCreate(l_arcName, 21, dBgS_MoveBGProc_Typical, 0x6000, NULL); if (phase == cPhs_ERROR_e) { - return (cPhs__Step)phase; + return phase; } mPhaseIndex++; } return cPhs_INIT_e; } -cPhs__Step daObjMarm_c::phase_1() { +cPhs_Step daObjMarm_c::phase_1() { cXyz scale(1.0f, 1.0f, 1.0f); mID = fopAcM_create(PROC_Obj_MHole, 0x12FF, ¤t.pos, fopAcM_GetRoomNo(this), ¤t.angle, &scale, -1); @@ -357,7 +357,7 @@ cPhs__Step daObjMarm_c::phase_1() { return cPhs_INIT_e; } -cPhs__Step daObjMarm_c::phase_2() { +cPhs_Step daObjMarm_c::phase_2() { daObjMHole_c* m_hole_actor = (daObjMHole_c*)fopAcM_SearchByID(mID); if (m_hole_actor != NULL) { csXyz angle(0, 0, 0); @@ -375,7 +375,7 @@ cPhs__Step daObjMarm_c::phase_2() { } int daObjMarm_c::create1st() { - typedef cPhs__Step (daObjMarm_c::*daObjMarm_func)(); + typedef cPhs_Step (daObjMarm_c::*daObjMarm_func)(); static daObjMarm_func l_ct_func[] = { &daObjMarm_c::phase_0, &daObjMarm_c::phase_1, diff --git a/src/d/actor/d_a_obj_maki.cpp b/src/d/actor/d_a_obj_maki.cpp index c20b7f3004..c555335745 100644 --- a/src/d/actor/d_a_obj_maki.cpp +++ b/src/d/actor/d_a_obj_maki.cpp @@ -19,7 +19,7 @@ #include "f_op/f_op_actor_mng.h" #include "m_Do/m_Do_ext.h" #include "m_Do/m_Do_mtx.h" -#include "dolphin/types.h" +#include daObj_Maki_HIO_c::daObj_Maki_HIO_c() { field_0x4 = -1; @@ -178,7 +178,7 @@ int useHeapInit(fopAc_ac_c* i_this) { daObj_Maki_HIO_c l_HIO; -cPhs__Step daObj_Maki_Create(fopAc_ac_c* i_this) { +cPhs_Step daObj_Maki_Create(fopAc_ac_c* i_this) { fopAcM_ct(i_this, obj_maki_class); obj_maki_class* a_this = (obj_maki_class*)i_this; static dCcD_SrcSph cc_sph_src = { @@ -193,7 +193,7 @@ cPhs__Step daObj_Maki_Create(fopAc_ac_c* i_this) { } // mSphAttr }; - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&a_this->mPhase, "Obj_maki"); + cPhs_Step phase = dComIfG_resLoad(&a_this->mPhase, "Obj_maki"); if (phase == cPhs_COMPLEATE_e) { a_this->field_0x57c = (u8)fopAcM_GetParam(a_this); u32 cVar3 = fopAcM_GetParam(a_this) >> 0x18; diff --git a/src/d/actor/d_a_obj_mirror_chain.cpp b/src/d/actor/d_a_obj_mirror_chain.cpp index 75bb7fd32f..83285c0c80 100644 --- a/src/d/actor/d_a_obj_mirror_chain.cpp +++ b/src/d/actor/d_a_obj_mirror_chain.cpp @@ -477,10 +477,10 @@ void daObjMirrorChain_c::create_init() { initBaseMtx(); } -cPhs__Step daObjMirrorChain_c::create() { +cPhs_Step daObjMirrorChain_c::create() { fopAcM_ct(this, daObjMirrorChain_c); - cPhs__Step phase_state = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step phase_state = dComIfG_resLoad(&mPhaseReq, l_arcName); if (phase_state == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createSolidHeap, 0x71b0)) { return cPhs_ERROR_e; @@ -491,7 +491,7 @@ cPhs__Step daObjMirrorChain_c::create() { return phase_state; } -static cPhs__Step daObjMirrorChain_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObjMirrorChain_Create(fopAc_ac_c* i_this) { fopAcM_GetID(i_this); return ((daObjMirrorChain_c*)i_this)->create(); } diff --git a/src/d/actor/d_a_obj_mirror_screw.cpp b/src/d/actor/d_a_obj_mirror_screw.cpp index 13a0c64eb5..eafd4740e2 100644 --- a/src/d/actor/d_a_obj_mirror_screw.cpp +++ b/src/d/actor/d_a_obj_mirror_screw.cpp @@ -142,7 +142,7 @@ static int daObjMirrorScrew_Delete(daObjMirrorScrew_c* i_this) { return 1; } -cPhs__Step daObjMirrorScrew_c::create() { +cPhs_Step daObjMirrorScrew_c::create() { fopAcM_ct(this, daObjMirrorScrew_c); if (fopAcM_isSwitch(this, getSwitchNo()) || /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ @@ -153,9 +153,9 @@ cPhs__Step daObjMirrorScrew_c::create() { return cPhs_ERROR_e; } - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, l_arcName); if (step == cPhs_COMPLEATE_e) { - step = (cPhs__Step)MoveBGCreate(l_arcName, 7, dBgS_MoveBGProc_TypicalRotY, 0xc760, NULL); + step = MoveBGCreate(l_arcName, 7, dBgS_MoveBGProc_TypicalRotY, 0xc760, NULL); if (step == cPhs_ERROR_e) { return step; } @@ -164,7 +164,7 @@ cPhs__Step daObjMirrorScrew_c::create() { return step; } -static cPhs__Step daObjMirrorScrew_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObjMirrorScrew_Create(fopAc_ac_c* i_this) { fopAcM_GetID(i_this); return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_mirror_table.cpp b/src/d/actor/d_a_obj_mirror_table.cpp index c366e2dae3..5746ad13d1 100644 --- a/src/d/actor/d_a_obj_mirror_table.cpp +++ b/src/d/actor/d_a_obj_mirror_table.cpp @@ -376,13 +376,13 @@ static int daObjMirrorTable_Delete(daObjMirrorTable_c* i_this) { return 1; } -static cPhs__Step daObjMirrorTable_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObjMirrorTable_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } -cPhs__Step daObjMirrorTable_c::create() { +cPhs_Step daObjMirrorTable_c::create() { fopAcM_ct(this, daObjMirrorTable_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, l_arcName); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createSolidHeap, 0xdb50)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_obj_nameplate.cpp b/src/d/actor/d_a_obj_nameplate.cpp index eede848e44..fc9e9074ab 100644 --- a/src/d/actor/d_a_obj_nameplate.cpp +++ b/src/d/actor/d_a_obj_nameplate.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_obj_nameplate.h" #include "d/actor/d_a_alink.h" #include "d/d_a_obj.h" -#include "dolphin/mtx.h" +#include #include "f_op/f_op_actor.h" #include "SSystem/SComponent/c_math.h" diff --git a/src/d/actor/d_a_obj_ndoor.cpp b/src/d/actor/d_a_obj_ndoor.cpp index f6bed90cc3..053488884b 100644 --- a/src/d/actor/d_a_obj_ndoor.cpp +++ b/src/d/actor/d_a_obj_ndoor.cpp @@ -103,7 +103,7 @@ static int daObj_Ndoor_Create(fopAc_ac_c* i_this) { obj_ndoor_class* a_this = (obj_ndoor_class*)i_this; fopAcM_ct(i_this, obj_ndoor_class); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&a_this->mPhase, "Obj_ndoor"); + cPhs_Step phase = dComIfG_resLoad(&a_this->mPhase, "Obj_ndoor"); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("OBJ_NDOOR PARAM %x\n", fopAcM_GetParam(a_this)); diff --git a/src/d/actor/d_a_obj_ornament_cloth.cpp b/src/d/actor/d_a_obj_ornament_cloth.cpp index fe5e515d0f..07c94fcd16 100644 --- a/src/d/actor/d_a_obj_ornament_cloth.cpp +++ b/src/d/actor/d_a_obj_ornament_cloth.cpp @@ -287,10 +287,10 @@ static int daObjOnCloth_Delete(daObjOnCloth_c* i_this) { ClothJoint_c::~ClothJoint_c() {} -cPhs__Step daObjOnCloth_c::create() { +cPhs_Step daObjOnCloth_c::create() { fopAcM_ct(this, daObjOnCloth_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_arcName); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createSolidHeap, 0x9A0)) { return cPhs_ERROR_e; @@ -303,7 +303,7 @@ cPhs__Step daObjOnCloth_c::create() { return phase; } -static cPhs__Step daObjOnCloth_Create(fopAc_ac_c* a_this) { +static cPhs_Step daObjOnCloth_Create(fopAc_ac_c* a_this) { return static_cast(a_this)->create(); } diff --git a/src/d/actor/d_a_obj_pumpkin.cpp b/src/d/actor/d_a_obj_pumpkin.cpp index 1f610d1429..c2e8e6e8ab 100644 --- a/src/d/actor/d_a_obj_pumpkin.cpp +++ b/src/d/actor/d_a_obj_pumpkin.cpp @@ -180,7 +180,7 @@ int daObj_Pumpkin_c::create() { fopAcM_ct(this, daObj_Pumpkin_c); mType = getType(); - cPhs__Step phase = (cPhs__Step) dComIfG_resLoad(&mPhaseReq, l_resNameList[l_bmdData[0][1]]); + cPhs_Step phase = dComIfG_resLoad(&mPhaseReq, l_resNameList[l_bmdData[0][1]]); if (phase == cPhs_COMPLEATE_e) { OS_REPORT("\t(%s:%d) ItemTableNo:%d, ProcType:%d<%08x> -> roomNo.%d", fopAcM_getProcNameString(this), getType(), getItemTableNo(), getProcType(), fopAcM_GetParam(this), fopAcM_GetRoomNo(this)); diff --git a/src/d/actor/d_a_obj_rock.cpp b/src/d/actor/d_a_obj_rock.cpp index 65fe8a4493..2494a2f534 100644 --- a/src/d/actor/d_a_obj_rock.cpp +++ b/src/d/actor/d_a_obj_rock.cpp @@ -105,7 +105,7 @@ static int daObj_Rock_Create(fopAc_ac_c* i_this) { obj_rock_class* a_this = static_cast(i_this); fopAcM_ct(a_this, obj_rock_class); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&a_this->mPhaseReq, "Obj_rock"); + cPhs_Step step = dComIfG_resLoad(&a_this->mPhaseReq, "Obj_rock"); if (step == cPhs_COMPLEATE_e) { a_this->mPatchRockNum = fopAcM_GetParam(a_this); a_this->mRockSpacing = fopAcM_GetParamBit(a_this, 8, 8); diff --git a/src/d/actor/d_a_obj_saidan.cpp b/src/d/actor/d_a_obj_saidan.cpp index fcbbbb9e6f..05c64f23ba 100644 --- a/src/d/actor/d_a_obj_saidan.cpp +++ b/src/d/actor/d_a_obj_saidan.cpp @@ -34,10 +34,10 @@ int daSaidan_c::CreateHeap() { return TRUE; } -cPhs__Step daSaidan_c::create() { +cPhs_Step daSaidan_c::create() { fopAcM_ct(this, daSaidan_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, "H_Saidan"); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, "H_Saidan"); if (step == cPhs_COMPLEATE_e) { if (MoveBGCreate("H_Saidan", 7, dBgS_MoveBGProc_TypicalRotY, 0x21b0, NULL) == cPhs_ERROR_e) { diff --git a/src/d/actor/d_a_obj_sekidoor.cpp b/src/d/actor/d_a_obj_sekidoor.cpp index ceae036eab..c12f4782c6 100644 --- a/src/d/actor/d_a_obj_sekidoor.cpp +++ b/src/d/actor/d_a_obj_sekidoor.cpp @@ -47,7 +47,7 @@ int daObj_SekiDoor_c::create() { mBitSW = 0; - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_resNameList[l_bmdData[mBitSW].resIdx]); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, l_resNameList[l_bmdData[mBitSW].resIdx]); if (step == cPhs_COMPLEATE_e) { if (getBitSW() != 0xff){ if (dComIfGs_isSwitch(getBitSW(), fopAcM_GetRoomNo(this))) { @@ -55,7 +55,7 @@ int daObj_SekiDoor_c::create() { } } - step = (cPhs__Step)MoveBGCreate(l_resNameList[l_dzbData[mBitSW].resIdx], + step = MoveBGCreate(l_resNameList[l_dzbData[mBitSW].resIdx], l_dzbData[mBitSW].dzbIdx, dBgS_MoveBGProc_TypicalRotY, 0xc20, NULL ); diff --git a/src/d/actor/d_a_obj_sekizo.cpp b/src/d/actor/d_a_obj_sekizo.cpp index dda9c26f3e..cfc74ef949 100644 --- a/src/d/actor/d_a_obj_sekizo.cpp +++ b/src/d/actor/d_a_obj_sekizo.cpp @@ -41,14 +41,14 @@ void daObj_Sekizo_HIO_c::genMessage(JORMContext* ctx) { } #endif -cPhs__Step daObj_Sekizo_c::create() { +cPhs_Step daObj_Sekizo_c::create() { fopAcM_ct(this, daObj_Sekizo_c); field_0x5b0 = 0; - cPhs__Step step = - (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_resNameList[l_bmdData[field_0x5b0].resIdx]); + cPhs_Step step = + dComIfG_resLoad(&mPhaseReq, l_resNameList[l_bmdData[field_0x5b0].resIdx]); if (step == cPhs_COMPLEATE_e) { - step = (cPhs__Step)MoveBGCreate(l_resNameList[l_dzbData[field_0x5b0].resIdx], + step = MoveBGCreate(l_resNameList[l_dzbData[field_0x5b0].resIdx], l_dzbData[field_0x5b0].dzbIdx, dBgS_MoveBGProc_TypicalRotY, 0x4000, NULL); if (step == cPhs_ERROR_e) { diff --git a/src/d/actor/d_a_obj_sekizoa.cpp b/src/d/actor/d_a_obj_sekizoa.cpp index 5147442ba9..490005649b 100644 --- a/src/d/actor/d_a_obj_sekizoa.cpp +++ b/src/d/actor/d_a_obj_sekizoa.cpp @@ -6,7 +6,7 @@ #include "d/actor/d_a_obj_smtile.h" #include "d/actor/d_a_tag_evtarea.h" #include "d/actor/d_a_tag_kmsg.h" -#include "dolphin/types.h" +#include #include "f_op/f_op_actor_mng.h" #include "f_op/f_op_msg.h" diff --git a/src/d/actor/d_a_obj_sm_door.cpp b/src/d/actor/d_a_obj_sm_door.cpp index fffd8a6f4e..b1d032b50a 100644 --- a/src/d/actor/d_a_obj_sm_door.cpp +++ b/src/d/actor/d_a_obj_sm_door.cpp @@ -14,7 +14,7 @@ static char* l_arcName = "sm_door"; -static cPhs__Step daObjSM_DOOR_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObjSM_DOOR_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } @@ -174,9 +174,9 @@ inline int daObjSM_DOOR_c::CreateHeap() { return 1; } -cPhs__Step daObjSM_DOOR_c::create() { +cPhs_Step daObjSM_DOOR_c::create() { fopAcM_ct(this, daObjSM_DOOR_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, l_arcName); + cPhs_Step step = dComIfG_resLoad(&mPhase, l_arcName); if (step == cPhs_COMPLEATE_e) { gravity = -9.0f; @@ -202,7 +202,7 @@ cPhs__Step daObjSM_DOOR_c::create() { mSwBit = fopAcM_GetParam(this) >> 8; - step = (cPhs__Step)MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, + step = MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_TypicalRotY, 0x1F20, NULL); if (step == cPhs_ERROR_e) { return step; diff --git a/src/d/actor/d_a_obj_smw_stone.cpp b/src/d/actor/d_a_obj_smw_stone.cpp index e243a6f17a..1eab4fb32c 100644 --- a/src/d/actor/d_a_obj_smw_stone.cpp +++ b/src/d/actor/d_a_obj_smw_stone.cpp @@ -29,9 +29,9 @@ static u8 const lit_3776[12] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -cPhs__Step daSmWStone_c::create() { +cPhs_Step daSmWStone_c::create() { fopAcM_ct(this, daSmWStone_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(this, l_arcName); + cPhs_Step step = dComIfG_resLoad(this, l_arcName); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, daSmWStone_c_createHeap, 0x1000)) { @@ -170,7 +170,7 @@ bool daSmWStone_c::chkWlfInRange() { return false; } -static cPhs__Step daSmWStone_create(daSmWStone_c* i_this) { +static cPhs_Step daSmWStone_create(daSmWStone_c* i_this) { fopAcM_ct(i_this, daSmWStone_c); return i_this->create(); } diff --git a/src/d/actor/d_a_obj_snow_soup.cpp b/src/d/actor/d_a_obj_snow_soup.cpp index f911d9cc90..9fca736a54 100644 --- a/src/d/actor/d_a_obj_snow_soup.cpp +++ b/src/d/actor/d_a_obj_snow_soup.cpp @@ -44,9 +44,9 @@ int daObjSnowSoup_c::createHeap() { return true; } -cPhs__Step daObjSnowSoup_c::create() { +cPhs_Step daObjSnowSoup_c::create() { fopAcM_ct(this, daObjSnowSoup_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(this, l_arcName); + cPhs_Step step = dComIfG_resLoad(this, l_arcName); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, daObjSnowSoup_c_createHeap, 0x6500)) { return cPhs_ERROR_e; @@ -167,7 +167,7 @@ void daObjSnowSoup_c::deleteSmkEmtChange(int i_state) { } -static cPhs__Step daObjSnowSoup_create(daObjSnowSoup_c* i_this) { +static cPhs_Step daObjSnowSoup_create(daObjSnowSoup_c* i_this) { fopAcM_ct(i_this, daObjSnowSoup_c); return i_this->create(); } diff --git a/src/d/actor/d_a_obj_stopper.cpp b/src/d/actor/d_a_obj_stopper.cpp index bee5fc640d..97f978f6a0 100644 --- a/src/d/actor/d_a_obj_stopper.cpp +++ b/src/d/actor/d_a_obj_stopper.cpp @@ -75,8 +75,8 @@ int daObjStopper_c::create() { shape_angle.x = shape_angle.z = 0; field_0x9fc = 1; } - cPhs__Step phase = cPhs_COMPLEATE_e; - phase = (cPhs__Step)MoveBGCreate(NULL, -1, dBgS_MoveBGProc_TypicalRotY, 0x810, NULL); + cPhs_Step phase = cPhs_COMPLEATE_e; + phase = MoveBGCreate(NULL, -1, dBgS_MoveBGProc_TypicalRotY, 0x810, NULL); if (phase == cPhs_ERROR_e) { return phase; } diff --git a/src/d/actor/d_a_obj_sword.cpp b/src/d/actor/d_a_obj_sword.cpp index ba7aa3c439..e9141a3998 100644 --- a/src/d/actor/d_a_obj_sword.cpp +++ b/src/d/actor/d_a_obj_sword.cpp @@ -34,14 +34,14 @@ int daObjSword_c::Create() { return 1; } -cPhs__Step daObjSword_c::create() { +cPhs_Step daObjSword_c::create() { fopAcM_ct(this, daObjSword_c); m_itemNo = 0x28; if (fopAcM_isItem(this, getItemBit())) { return cPhs_ERROR_e; } - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, dItem_data::getFieldArc(m_itemNo)); + cPhs_Step phase = dComIfG_resLoad(&mPhase, dItem_data::getFieldArc(m_itemNo)); if (phase == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, CheckFieldItemCreateHeap, 0x4000)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_obj_swpush.cpp b/src/d/actor/d_a_obj_swpush.cpp index 901b3f4210..f4866be6ad 100644 --- a/src/d/actor/d_a_obj_swpush.cpp +++ b/src/d/actor/d_a_obj_swpush.cpp @@ -107,8 +107,8 @@ bool daObjSwpush::Act_c::create_heap() { return rv; } -cPhs__Step daObjSwpush::Act_c::create_res_load() { - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, M_arcname[mMdl]); +cPhs_Step daObjSwpush::Act_c::create_res_load() { + cPhs_Step phase = dComIfG_resLoad(&mPhase, M_arcname[mMdl]); if (phase != cPhs_COMPLEATE_e) { return phase; } @@ -199,7 +199,7 @@ daObjSwpush::Hio_c::Attr_c const daObjSwpush::Act_c::M_attr[5] = { u8 const daObjSwpush::Act_c::M_op_vtx[4] = {0x0D, 0x0B, 0x0A, 0x0C}; -cPhs__Step daObjSwpush::Act_c::Mthd_Create() { +cPhs_Step daObjSwpush::Act_c::Mthd_Create() { fopAcM_ct(this, daObjSwpush::Act_c); prmZ_init(); @@ -212,7 +212,7 @@ cPhs__Step daObjSwpush::Act_c::Mthd_Create() { mMdl = 0; } - cPhs__Step phase = create_res_load(); + cPhs_Step phase = create_res_load(); if (phase == cPhs_COMPLEATE_e) { scale.x *= attr().scale; scale.z *= attr().scale; @@ -832,7 +832,7 @@ int daObjSwpush::Act_c::Mthd_Draw() { namespace daObjSwpush { namespace { - cPhs__Step Mthd_Create(void* i_this) { + cPhs_Step Mthd_Create(void* i_this) { return static_cast(i_this)->Mthd_Create(); } diff --git a/src/d/actor/d_a_obj_syRock.cpp b/src/d/actor/d_a_obj_syRock.cpp index cd053b8791..60d50e393f 100644 --- a/src/d/actor/d_a_obj_syRock.cpp +++ b/src/d/actor/d_a_obj_syRock.cpp @@ -109,7 +109,7 @@ dCcD_SrcGObjInf const daSyRock_c::mCcDObjInfo = { {}, // mGObjCo }; -cPhs__Step daSyRock_c::create() { +cPhs_Step daSyRock_c::create() { fopAcM_ct(this, daSyRock_c); if(getArg0() == TRUE) { @@ -119,9 +119,9 @@ cPhs__Step daSyRock_c::create() { return cPhs_INIT_e; } - const cPhs__Step requestedPhaseProcess = static_cast(dComIfG_resLoad(&mPhase, "syourock")); + const cPhs_Step requestedPhaseProcess = static_cast(dComIfG_resLoad(&mPhase, "syourock")); if(requestedPhaseProcess == cPhs_COMPLEATE_e) { - const cPhs__Step bgCreatePhaseProcess = static_cast(MoveBGCreate("syourock", 0x8, dBgS_MoveBGProc_TypicalRotY, 0x2100, NULL)); + const cPhs_Step bgCreatePhaseProcess = static_cast(MoveBGCreate("syourock", 0x8, dBgS_MoveBGProc_TypicalRotY, 0x2100, NULL)); if(bgCreatePhaseProcess == cPhs_ERROR_e) return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_obj_takaraDai.cpp b/src/d/actor/d_a_obj_takaraDai.cpp index c57060c4b5..e8a1e919f2 100644 --- a/src/d/actor/d_a_obj_takaraDai.cpp +++ b/src/d/actor/d_a_obj_takaraDai.cpp @@ -75,7 +75,7 @@ int daTkraDai_c::CreateHeap() { int daTkraDai_c::create() { fopAcM_ct(this, daTkraDai_c); - cPhs__Step phase = static_cast(dComIfG_resLoad(&mPhase, "M_TakaraD")); + cPhs_Step phase = static_cast(dComIfG_resLoad(&mPhase, "M_TakaraD")); if (phase == cPhs_COMPLEATE_e) { if (MoveBGCreate("M_TakaraD", 8, dBgS_MoveBGProc_Typical, 0x2e00, NULL) == cPhs_ERROR_e) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_obj_testcube.cpp b/src/d/actor/d_a_obj_testcube.cpp index 0406c17416..0a1a41ec36 100644 --- a/src/d/actor/d_a_obj_testcube.cpp +++ b/src/d/actor/d_a_obj_testcube.cpp @@ -1,25 +1,384 @@ /** * @file d_a_obj_testcube.cpp - * -*/ + * + */ -#include "d/dolzel_rel.h" // IWYU pragma: keep +#include "d/dolzel_rel.h" // IWYU pragma: keep #include "d/actor/d_a_obj_testcube.h" -actor_process_profile_definition g_profile_Obj_TestCube = { - fpcLy_CURRENT_e, // mLayerID - 3, // mListID - fpcPi_CURRENT_e, // mListPrio - PROC_Obj_TestCube, // mProcName - &g_fpcLf_Method.base, // sub_method - 0x000005A0, // mSize - 0, // mSizeOther - 0, // mParameters - &g_fopAc_Method.base, // sub_method - 442, // mPriority - NULL, // sub_method - 0x00040100, // mStatus - fopAc_ACTOR_e, // mActorType - fopAc_CULLBOX_CUSTOM_e, // cullType +#if DEBUG +const char* l_arcName[] = { + "K_cube00", + "K_cube01", + "K_cyli00", +}; + +class daObjCube_HIO_c : public mDoHIO_entry_c { +public: + daObjCube_HIO_c(); + virtual ~daObjCube_HIO_c() {} + + void genMessage(JORMContext*); + + /* 0x6 */ GXColor mColor[255]; +}; + +daObjCube_HIO_c l_HIO; + +static const GXColor l_obj_color[] = { + {0x00, 0x00, 0x00, 0xFF}, {0x12, 0x09, 0x00, 0xFF}, {0x0c, 0x0c, 0x0c, 0xFF}, + {0x1d, 0x14, 0x03, 0xFF}, {0x06, 0x14, 0x06, 0xFF}, {0x2b, 0x20, 0x16, 0xFF}, + {0x17, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x39, 0xFF}, {0x1f, 0x2f, 0x3f, 0xFF}, + {0x3f, 0x18, 0x0d, 0xFF}, {0x00, 0x07, 0x17, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x32, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x32, 0xFF}, + {0x00, 0x32, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, + {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, {0x00, 0x00, 0x00, 0xFF}, +}; + +daObjCube_HIO_c::daObjCube_HIO_c() { + for (int i = 0; i < 255; i++) { + mColor[i] = l_obj_color[i]; + } +} + +void daObjCube_HIO_c::genMessage(JORMContext* mctx) { + mctx->genLabel("テスト立方体", 0); + + for (int i = 0; i < 255; i++) { + char label[256]; + sprintf(label, "名前引数<%d>のカラー\n", i); + + mctx->genLabel(label, 0); + mctx->genSlider("r", &mColor[i].r, 0, 0xFF); + mctx->genSlider("g", &mColor[i].g, 0, 0xFF); + mctx->genSlider("b", &mColor[i].b, 0, 0xFF); + mctx->genSlider("a", &mColor[i].a, 0, 0xFF); + } +} + +void daObjCube_c::getDzbName(char* i_buffer) { + u8 arg = mNameArg; + + switch (mShape) { + case 0: + case 1: + sprintf(i_buffer, "k_size_cube%02d.dzb", mNameArg); + break; + case 2: + if (arg == 100) { + arg = 0; + } + + sprintf(i_buffer, "k_size_cyl%02d.dzb", arg); + break; + } +} + +void daObjCube_c::getBmdName(char* i_buffer) { + switch (mShape) { + case 0: + case 1: + sprintf(i_buffer, "K_size_cube.bmd"); + break; + case 2: + sprintf(i_buffer, "k_size_cylinder.bmd"); + break; + } +} + +void daObjCube_c::initBaseMtx() { + if (mShape == 2) { + scale.z = scale.x; + } + + setBaseMtx(); +} + +void daObjCube_c::setBaseMtx() { + mDoMtx_stack_c::transS(current.pos); + mDoMtx_stack_c::ZXYrotM(shape_angle); + mDoMtx_stack_c::scaleM(scale); + mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); + MTXCopy(mDoMtx_stack_c::get(), mBgMtx); +} + +int daObjCube_c::Create() { + if (mNameArg == 100) { + scale.x *= 10.0f; + scale.y *= 10.0f; + scale.z *= 10.0f; + } + + initBaseMtx(); + fopAcM_SetMtx(this, mpModel->getBaseTRMtx()); + + cXyz cullMin; + cXyz cullMax; + J3DJoint* rootJnt = mpModel->getModelData()->getJointNodePointer(0); + + cullMin.x = scale.x * rootJnt->getMin()->x; + cullMin.y = scale.y * rootJnt->getMin()->y; + cullMin.z = scale.z * rootJnt->getMin()->z; + + cullMax.x = scale.x * rootJnt->getMax()->x; + cullMax.y = scale.y * rootJnt->getMax()->y; + cullMax.z = scale.z * rootJnt->getMax()->z; + + fopAcM_setCullSizeBox(this, cullMin.x, cullMin.y, cullMin.z, cullMax.x, cullMax.y, cullMax.z); + fopAcM_setCullSizeFar(this, 10.0f); + return 1; +} + +int daObjCube_c::CreateHeap() { + char resName[40]; + getBmdName(resName); + + J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcName[mShape], resName); + JUT_ASSERT(581, modelData != NULL); + mpModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (mpModel == NULL) { + return 0; + } + + return 1; +} + +int daObjCube_c::create() { + fopAcM_ct(this, daObjCube_c); + + mShape = daObjCube_prm::getShape(this); + mNameArg = daObjCube_prm::getNameArg(this); + + int phase_state = dComIfG_resLoad(&mPhase, l_arcName[mShape]); + if (phase_state == cPhs_COMPLEATE_e) { + char resName[32]; + getDzbName(resName); + + int dzb_id = dComIfG_getObjctResName2Index(l_arcName[mShape], resName); + JUT_ASSERT(621, dzb_id != -1); + + phase_state = MoveBGCreate(l_arcName[mShape], dzb_id, NULL, 0xC10, NULL); + if (phase_state == cPhs_ERROR_e) { + return phase_state; + } + + MoveBGExecute(); + l_HIO.entryHIO("テスト立方体"); + } + + return phase_state; +} + +int daObjCube_c::Execute(Mtx** param_0) { + u8 arg0 = daObjCube_prm::getArg0(this); + u8 sw = daObjCube_prm::getSwitch(this); + BOOL isSwitch = fopAcM_isSwitch(this, sw); + + if (sw != 0xFF) { + if (arg0 == 0) { + if (isSwitch) { + if (mpBgW->ChkUsed()) { + if (dComIfG_Bgsp().Release(mpBgW)) { + OSReport_Error("テスト立方体:MoveBG解除に失敗しました\n"); + } + } + + field_0x5b6 = 1; + } else { + if (!mpBgW->ChkUsed()) { + if (dComIfG_Bgsp().Regist(mpBgW, this)) { + OSReport_Error("テスト立方体:MoveBG登録に失敗しました\n"); + } + } + + field_0x5b6 = 0; + } + } else { + if (isSwitch) { + if (!mpBgW->ChkUsed()) { + if (dComIfG_Bgsp().Regist(mpBgW, this)) { + OSReport_Error("テスト立方体:MoveBG登録に失敗しました\n"); + } + } + + field_0x5b6 = 0; + } else { + if (mpBgW->ChkUsed()) { + if (dComIfG_Bgsp().Release(mpBgW)) { + OSReport_Error("テスト立方体:MoveBG解除に失敗しました\n"); + } + } + + field_0x5b6 = 1; + } + } + } + + *param_0 = &mBgMtx; + return 1; +} + +int daObjCube_c::Draw() { + if (field_0x5b6) { + return 1; + } + + g_env_light.settingTevStruct(0x10, ¤t.pos, &tevStr); + g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr); + + u8 arg = mNameArg; + if (arg == 100) { + arg = 0; + } + + J3DModelData* modelData = mpModel->getModelData(); + for (u16 i = 0; i < modelData->getMaterialNum(); i++) { + J3DMaterial* material = modelData->getMaterialNodePointer(i); + J3DGXColor* tevColor = material->getTevKColor(3); + tevColor->r = l_HIO.mColor[arg].r; + tevColor->g = l_HIO.mColor[arg].g; + tevColor->b = l_HIO.mColor[arg].b; + tevColor->a = l_HIO.mColor[arg].a; + } + + dComIfGd_setListBG(); + mDoExt_modelUpdateDL(mpModel); + dComIfGd_setList(); + return 1; +} + +int daObjCube_c::Delete() { + dComIfG_resDelete(&mPhase, l_arcName[mShape]); + l_HIO.removeHIO(); + return 1; +} + +static int daObjCube_Draw(daObjCube_c* i_this) { + return i_this->MoveBGDraw(); +} + +static int daObjCube_Execute(daObjCube_c* i_this) { + return i_this->MoveBGExecute(); +} + +static int daObjCube_Delete(daObjCube_c* i_this) { + fpc_ProcID id = fopAcM_GetID(i_this); + return i_this->MoveBGDelete(); +} + +static int daObjCube_Create(fopAc_ac_c* actor) { + daObjCube_c* i_this = (daObjCube_c*)actor; + fpc_ProcID id = fopAcM_GetID(actor); + return i_this->create(); +} + +static actor_method_class l_daObjCube_Method = { + (process_method_func)daObjCube_Create, + (process_method_func)daObjCube_Delete, + (process_method_func)daObjCube_Execute, + (process_method_func)NULL, + (process_method_func)daObjCube_Draw, +}; +#endif + +#if DEBUG +#define OBJCUBE_METHODS &l_daObjCube_Method +#else +#define OBJCUBE_METHODS NULL +#endif + +actor_process_profile_definition g_profile_Obj_TestCube = { + fpcLy_CURRENT_e, // mLayerID + 3, // mListID + fpcPi_CURRENT_e, // mListPrio + PROC_Obj_TestCube, // mProcName + &g_fpcLf_Method.base, // sub_method + sizeof(daObjCube_c), // mSize + 0, // mSizeOther + 0, // mParameters + &g_fopAc_Method.base, // sub_method + 442, // mPriority + OBJCUBE_METHODS, // sub_method + 0x00040100, // mStatus + fopAc_ACTOR_e, // mActorType + fopAc_CULLBOX_CUSTOM_e, // cullType }; diff --git a/src/d/actor/d_a_obj_udoor.cpp b/src/d/actor/d_a_obj_udoor.cpp index 4cdc971875..43cd6e35b9 100644 --- a/src/d/actor/d_a_obj_udoor.cpp +++ b/src/d/actor/d_a_obj_udoor.cpp @@ -107,7 +107,7 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daObj_Udoor_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObj_Udoor_Create(fopAc_ac_c* i_this) { static dCcD_SrcSph cc_sph_src = { { {0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj @@ -123,7 +123,7 @@ static cPhs__Step daObj_Udoor_Create(fopAc_ac_c* i_this) { fopAcM_ct(i_this, obj_udoor_class); obj_udoor_class* a_this = static_cast(i_this); - cPhs__Step phase_state = (cPhs__Step)dComIfG_resLoad(&a_this->mPhase, "Obj_udoor"); + cPhs_Step phase_state = dComIfG_resLoad(&a_this->mPhase, "Obj_udoor"); if (phase_state == cPhs_COMPLEATE_e) { a_this->field_0x570 = fopAcM_GetParam(a_this); if (a_this->field_0x570 == 0xff) { diff --git a/src/d/actor/d_a_obj_waterGate.cpp b/src/d/actor/d_a_obj_waterGate.cpp index ef30c6230c..e20204e937 100644 --- a/src/d/actor/d_a_obj_waterGate.cpp +++ b/src/d/actor/d_a_obj_waterGate.cpp @@ -49,10 +49,10 @@ int daWtGate_c::CreateHeap() { return 1; } -cPhs__Step daWtGate_c::create() { +cPhs_Step daWtGate_c::create() { fopAcM_ct(this, daWtGate_c); - const cPhs__Step resPhase = static_cast(dComIfG_resLoad(&mPhase, "S_Zsuimon")); + const cPhs_Step resPhase = static_cast(dComIfG_resLoad(&mPhase, "S_Zsuimon")); if(resPhase == cPhs_COMPLEATE_e) { if(MoveBGCreate("S_Zsuimon", 7, dBgS_MoveBGProc_TypicalRotY, 0xE00, NULL) == cPhs_ERROR_e) return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_obj_waterPillar.cpp b/src/d/actor/d_a_obj_waterPillar.cpp index 5dd8545e19..65abe22e5c 100644 --- a/src/d/actor/d_a_obj_waterPillar.cpp +++ b/src/d/actor/d_a_obj_waterPillar.cpp @@ -119,9 +119,9 @@ dCcD_SrcCps daWtPillar_c::mCcDCps = { dCcD_SrcCyl daWtPillar_c::mCcDCyl = {daWtPillar_c::mCcDObjCoInfo}; -cPhs__Step daWtPillar_c::create() { +cPhs_Step daWtPillar_c::create() { fopAcM_ct(this, daWtPillar_c); - const cPhs__Step phase = static_cast(dComIfG_resLoad(&mPhase, "efWater")); + const cPhs_Step phase = static_cast(dComIfG_resLoad(&mPhase, "efWater")); if(phase == cPhs_COMPLEATE_e) { if(!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x2000)) diff --git a/src/d/actor/d_a_obj_waterfall.cpp b/src/d/actor/d_a_obj_waterfall.cpp index 2f12cacf8b..1ce008500b 100644 --- a/src/d/actor/d_a_obj_waterfall.cpp +++ b/src/d/actor/d_a_obj_waterfall.cpp @@ -175,7 +175,7 @@ static dCcD_SrcCyl l_cyl_src = { } }; -cPhs__Step daObjWaterFall_c::Create() { +cPhs_Step daObjWaterFall_c::Create() { initBaseMtx(); mCylColliderStts.Init(0, 0xFF, this); @@ -244,7 +244,7 @@ actor_process_profile_definition g_profile_Obj_WaterFall = { fopAc_CULLBOX_CUSTOM_e, // cullType }; -cPhs__Step daObjWaterFall_c::create() { +cPhs_Step daObjWaterFall_c::create() { fopAcM_ct(this, daObjWaterFall_c); if(Create() == cPhs_INIT_e) { diff --git a/src/d/actor/d_a_obj_wchain.cpp b/src/d/actor/d_a_obj_wchain.cpp index f3555cdff7..d812cc0040 100644 --- a/src/d/actor/d_a_obj_wchain.cpp +++ b/src/d/actor/d_a_obj_wchain.cpp @@ -30,10 +30,10 @@ static int daObjWchain_createHeap(fopAc_ac_c* i_this) { return static_cast(i_this)->createHeap(); } -cPhs__Step daObjWchain_c::create() { +cPhs_Step daObjWchain_c::create() { fopAcM_ct(this, daObjWchain_c); mSw = fopAcM_GetParam(this) & 0xff; - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, l_arcName); if (step == cPhs_COMPLEATE_e) { mRepeatable = (fopAcM_GetParam(this) >> 8) & 0xf; if (mRepeatable == 0xf) { @@ -82,7 +82,7 @@ cPhs__Step daObjWchain_c::create() { return step; } -static cPhs__Step daObjWchain_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObjWchain_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_wind_stone.cpp b/src/d/actor/d_a_obj_wind_stone.cpp index 51afb23173..5a1c51639f 100644 --- a/src/d/actor/d_a_obj_wind_stone.cpp +++ b/src/d/actor/d_a_obj_wind_stone.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_obj_wind_stone.h" #include "d/actor/d_a_alink.h" #include "d/d_meter2_info.h" -#include "dolphin/types.h" +#include static int daWindStone_c_createHeap(fopAc_ac_c* i_this) { return static_cast(i_this)->createHeap(); diff --git a/src/d/actor/d_a_obj_window.cpp b/src/d/actor/d_a_obj_window.cpp index cad92fc8dc..fe74f440de 100644 --- a/src/d/actor/d_a_obj_window.cpp +++ b/src/d/actor/d_a_obj_window.cpp @@ -80,14 +80,14 @@ int daObjWindow_c::CreateHeap() { return 1; } -cPhs__Step daObjWindow_c::create1st() { +cPhs_Step daObjWindow_c::create1st() { mType = getType(); if (mType == 0xff) { mType = 0; } - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, l_arcName); if (step == cPhs_COMPLEATE_e) { - step = (cPhs__Step)MoveBGCreate(l_arcName, 12, NULL, 0xee0, NULL); + step = MoveBGCreate(l_arcName, 12, NULL, 0xee0, NULL); if (step == cPhs_ERROR_e) { return step; } @@ -152,7 +152,7 @@ int daObjWindow_c::Delete() { return 1; } -static cPhs__Step daObjWindow_create1st(daObjWindow_c* i_this) { +static cPhs_Step daObjWindow_create1st(daObjWindow_c* i_this) { fopAcM_ct(i_this, daObjWindow_c); return i_this->create1st(); } diff --git a/src/d/actor/d_a_obj_yobikusa.cpp b/src/d/actor/d_a_obj_yobikusa.cpp index 5cc08c8baa..ad24f8ddf3 100644 --- a/src/d/actor/d_a_obj_yobikusa.cpp +++ b/src/d/actor/d_a_obj_yobikusa.cpp @@ -380,7 +380,7 @@ static int daObjYobikusa_Delete(daObjYobikusa_c* i_this) { return TRUE; } -cPhs__Step daObjYobikusa_c::create() { +cPhs_Step daObjYobikusa_c::create() { fopAcM_ct(this, daObjYobikusa_c); switch (getType()) { @@ -396,7 +396,7 @@ cPhs__Step daObjYobikusa_c::create() { break; } - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, mResName); + cPhs_Step step = dComIfG_resLoad(&mPhase, mResName); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createSolidHeap, 0x1080)) { step = cPhs_ERROR_e; diff --git a/src/d/actor/d_a_obj_ystone.cpp b/src/d/actor/d_a_obj_ystone.cpp index 93f752a986..e7352efcab 100644 --- a/src/d/actor/d_a_obj_ystone.cpp +++ b/src/d/actor/d_a_obj_ystone.cpp @@ -246,11 +246,11 @@ static int useHeapInit(fopAc_ac_c* i_this) { return 1; } -static cPhs__Step daObj_Ystone_Create(fopAc_ac_c* i_this) { +static cPhs_Step daObj_Ystone_Create(fopAc_ac_c* i_this) { obj_ystone_class* _this = static_cast(i_this); fopAcM_ct(_this, obj_ystone_class); _this->mLevel = getNowLevel() - 1; - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhaseReq, l_arcName[_this->mLevel]); + cPhs_Step step = dComIfG_resLoad(&_this->mPhaseReq, l_arcName[_this->mLevel]); if (step == cPhs_COMPLEATE_e) { if (_this->mLevel < 3) { diff --git a/src/d/actor/d_a_obj_zrTurara.cpp b/src/d/actor/d_a_obj_zrTurara.cpp index caa2a7e123..9e9767db06 100644 --- a/src/d/actor/d_a_obj_zrTurara.cpp +++ b/src/d/actor/d_a_obj_zrTurara.cpp @@ -75,11 +75,11 @@ int daZrTurara_c::CreateHeap() { return 1; } -cPhs__Step daZrTurara_c::create() { +cPhs_Step daZrTurara_c::create() { fopAcM_ct(this, daZrTurara_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, "M_DrpRock"); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, "M_DrpRock"); if (step == cPhs_COMPLEATE_e) { - cPhs__Step bg_step = (cPhs__Step)MoveBGCreate("M_DrpRock", 9, dBgS_MoveBGProc_TypicalRotY, + cPhs_Step bg_step = MoveBGCreate("M_DrpRock", 9, dBgS_MoveBGProc_TypicalRotY, 0x2800, NULL); if (bg_step == cPhs_ERROR_e) { return cPhs_ERROR_e; @@ -248,7 +248,7 @@ static int daZrTurara_Delete(daZrTurara_c* i_this) { return i_this->MoveBGDelete(); } -static cPhs__Step daZrTurara_Create(fopAc_ac_c* i_this) { +static cPhs_Step daZrTurara_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_zrTuraraRock.cpp b/src/d/actor/d_a_obj_zrTuraraRock.cpp index 90fc794a69..b4706929da 100644 --- a/src/d/actor/d_a_obj_zrTuraraRock.cpp +++ b/src/d/actor/d_a_obj_zrTuraraRock.cpp @@ -56,9 +56,9 @@ int daZrTuraRc_c::CreateHeap() { return 1; } -cPhs__Step daZrTuraRc_c::create() { +cPhs_Step daZrTuraRc_c::create() { fopAcM_ct(this, daZrTuraRc_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, "M_DRockHn"); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, "M_DRockHn"); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x840)) { return cPhs_ERROR_e; @@ -165,7 +165,7 @@ static int daZrTuraRc_Delete(daZrTuraRc_c* i_this) { return i_this->Delete(); } -static cPhs__Step daZrTuraRc_Create(fopAc_ac_c* i_this) { +static cPhs_Step daZrTuraRc_Create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_obj_zra_freeze.cpp b/src/d/actor/d_a_obj_zra_freeze.cpp index 833fd4317b..9c0ed17e93 100644 --- a/src/d/actor/d_a_obj_zra_freeze.cpp +++ b/src/d/actor/d_a_obj_zra_freeze.cpp @@ -51,14 +51,14 @@ static int createSolidHeap(fopAc_ac_c* i_this) { return static_cast(i_this)->CreateHeap(); } -cPhs__Step daZraFreeze_c::Create() { +cPhs_Step daZraFreeze_c::Create() { fopAcM_ct(this, daZraFreeze_c); field_0x5b0 = (fopAcM_GetParam(this) >> 8) & 0xff; field_0x5b1 = (fopAcM_GetParam(this) >> 0x10) & 0xff; field_0x5b2 = (fopAcM_GetParam(this) >> 0x18) & 0xff; mMapToolId = fopAcM_GetParam(this) & 0xff; mEventId = -1; - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, l_arcName); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createSolidHeap, 0x1540)) { return cPhs_ERROR_e; @@ -187,7 +187,7 @@ static int daZraFreeze_Delete(daZraFreeze_c* i_this) { return i_this->Delete(); } -static cPhs__Step daZraFreeze_create(fopAc_ac_c* i_this) { +static cPhs_Step daZraFreeze_create(fopAc_ac_c* i_this) { return static_cast(i_this)->Create(); } diff --git a/src/d/actor/d_a_obj_zra_rock.cpp b/src/d/actor/d_a_obj_zra_rock.cpp index 01613adc52..91eea51192 100644 --- a/src/d/actor/d_a_obj_zra_rock.cpp +++ b/src/d/actor/d_a_obj_zra_rock.cpp @@ -71,14 +71,14 @@ int daObjZraRock_c::CreateHeap() { return 1; } -cPhs__Step daObjZraRock_c::create() { +cPhs_Step daObjZraRock_c::create() { fopAcM_ct(this, daObjZraRock_c); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + cPhs_Step step = dComIfG_resLoad(&mPhaseReq, l_arcName); if (step == cPhs_ERROR_e || step == cPhs_UNK3_e) { return cPhs_ERROR_e; } else if (step == cPhs_COMPLEATE_e) { int dzb_id = dComIfG_getObjctResName2Index(l_arcName, "H_ZoraRock.dzb"); - step = (cPhs__Step)MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_Trans, 0x2050, NULL); + step = MoveBGCreate(l_arcName, dzb_id, dBgS_MoveBGProc_Trans, 0x2050, NULL); if (dComIfGs_isSwitch((fopAcM_GetParam(this) >> 8) & 0xff, fopAcM_GetRoomNo(this))) { step = cPhs_ERROR_e; } @@ -136,7 +136,7 @@ static int daObjZraRock_Delete(daObjZraRock_c* i_this) { return i_this->MoveBGDelete(); } -static cPhs__Step daObjZraRock_create(fopAc_ac_c* i_this) { +static cPhs_Step daObjZraRock_create(fopAc_ac_c* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_sq.cpp b/src/d/actor/d_a_sq.cpp index e021d6d9a3..a8abcd0134 100644 --- a/src/d/actor/d_a_sq.cpp +++ b/src/d/actor/d_a_sq.cpp @@ -490,10 +490,10 @@ static int useHeapInit(fopAc_ac_c* i_this) { 1, 0, 1.0f, 0, -1) ? 1 : 0; } -static cPhs__Step daSq_Create(fopAc_ac_c* i_this) { +static cPhs_Step daSq_Create(fopAc_ac_c* i_this) { sq_class* _this = static_cast(i_this); fopAcM_ct(i_this, sq_class); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&_this->mPhaseReq, "Sq"); + cPhs_Step step = dComIfG_resLoad(&_this->mPhaseReq, "Sq"); if (step == cPhs_COMPLEATE_e) { _this->mParam0 = fopAcM_GetParam(_this) & 0xff; diff --git a/src/d/actor/d_a_tag_Lv8Gate.cpp b/src/d/actor/d_a_tag_Lv8Gate.cpp index 0b836e8ca8..892653e6ed 100644 --- a/src/d/actor/d_a_tag_Lv8Gate.cpp +++ b/src/d/actor/d_a_tag_Lv8Gate.cpp @@ -43,12 +43,12 @@ inline void daTagLv8Gate_c::create_init() { inline int daTagLv8Gate_c::create() { fopAcM_ct(this, daTagLv8Gate_c); - cPhs__Step step; + cPhs_Step step; /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) { return cPhs_ERROR_e; } else { - step = (cPhs__Step)dComIfG_resLoad(&mPhaseReq, l_arcName); + step = dComIfG_resLoad(&mPhaseReq, l_arcName); if (step == cPhs_COMPLEATE_e) { if (!fopAcM_entrySolidHeap(this, createSolidHeap, 0x1600)) { return cPhs_ERROR_e; diff --git a/src/d/actor/d_a_tag_evt.cpp b/src/d/actor/d_a_tag_evt.cpp index d38bb6b500..81ada5a6fe 100644 --- a/src/d/actor/d_a_tag_evt.cpp +++ b/src/d/actor/d_a_tag_evt.cpp @@ -22,7 +22,7 @@ char* daTag_Evt_c::mEvtCutList[] = { int daTag_Evt_c::create() { fopAcM_ct(this, daTag_Evt_c); - cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_resFileName); + cPhs_Step phase = dComIfG_resLoad(&mPhase, l_resFileName); if (phase == cPhs_COMPLEATE_e) { eventInfo.setArchiveName(l_resFileName); strcpy(field_0x568, "TagEvt"); diff --git a/src/d/actor/d_a_tag_evtarea.cpp b/src/d/actor/d_a_tag_evtarea.cpp index 47df3e71d3..1a60b4f867 100644 --- a/src/d/actor/d_a_tag_evtarea.cpp +++ b/src/d/actor/d_a_tag_evtarea.cpp @@ -8,7 +8,7 @@ #include "d/actor/d_a_npc.h" #include "d/d_procname.h" -cPhs__Step daTag_EvtArea_c::create() { +cPhs_Step daTag_EvtArea_c::create() { int var_r28 = 0; fopAcM_ct(this, daTag_EvtArea_c); @@ -205,7 +205,7 @@ BOOL daTag_EvtArea_c::chkPointInArea(cXyz i_point, cXyz i_addSize) { return false; } -static cPhs__Step daTag_EvtArea_Create(void* i_this) { +static cPhs_Step daTag_EvtArea_Create(void* i_this) { return static_cast(i_this)->create(); } diff --git a/src/d/actor/d_a_tag_statue_evt.cpp b/src/d/actor/d_a_tag_statue_evt.cpp index de6ac67c85..eb7d3752eb 100644 --- a/src/d/actor/d_a_tag_statue_evt.cpp +++ b/src/d/actor/d_a_tag_statue_evt.cpp @@ -108,7 +108,7 @@ void daTagStatue_c::setBaseMtx() { mpModel->setBaseTRMtx(mDoMtx_stack_c::get()); } -cPhs__Step daTagStatue_c::Create() { +cPhs_Step daTagStatue_c::Create() { if (fopAcM_isSwitch(this, getSwbit2())) { // Player already obtained Sky Character from this tag setAction(ACTION_DEAD_e); @@ -180,7 +180,7 @@ int daTagStatue_c::CreateHeap() { return 1; } -cPhs__Step daTagStatue_c::create() { +cPhs_Step daTagStatue_c::create() { fopAcM_ct(this, daTagStatue_c); mSkyCharacterEventBitIdIndex = getType(); @@ -190,7 +190,7 @@ cPhs__Step daTagStatue_c::create() { phase = dComIfG_resLoad(&mEvArcPhase, l_evArcName[mSkyCharacterEventBitIdIndex]); if (phase != cPhs_COMPLEATE_e) { - return static_cast(phase); + return static_cast(phase); } } @@ -210,7 +210,7 @@ cPhs__Step daTagStatue_c::create() { #endif } - return static_cast(phase); + return static_cast(phase); } int daTagStatue_c::execute() { diff --git a/src/d/actor/d_a_tag_waterfall.cpp b/src/d/actor/d_a_tag_waterfall.cpp index f05003a982..eae7b283f6 100644 --- a/src/d/actor/d_a_tag_waterfall.cpp +++ b/src/d/actor/d_a_tag_waterfall.cpp @@ -278,7 +278,7 @@ static int daTagWaterFall_Delete(daTagWaterFall_c* i_this) { return i_this->_delete(); } -cPhs__Step daTagWaterFall_c::create() { +cPhs_Step daTagWaterFall_c::create() { fopAcM_ct(this, daTagWaterFall_c); OS_REPORT("Tag_WaterFall PARAM %x %x %x \n", fopAcM_GetParam(this), current.angle.x, current.angle.y); diff --git a/src/d/actor/d_a_tbox.cpp b/src/d/actor/d_a_tbox.cpp index 47e5803a3b..a9a58b44fd 100644 --- a/src/d/actor/d_a_tbox.cpp +++ b/src/d/actor/d_a_tbox.cpp @@ -101,7 +101,7 @@ daTbox_ModelInfo* daTbox_c::getModelInfo() { static const u32 l_open_se_id[3] = { Z2SE_OBJ_TBOX_OPEN_A, Z2SE_OBJ_TBOX_OPEN_B, Z2SE_OBJ_TBOX_OPEN_C }; -cPhs__Step daTbox_c::commonShapeSet() { +cPhs_Step daTbox_c::commonShapeSet() { daTbox_ModelInfo* model_info = getModelInfo(); J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(model_info->mArcName, model_info->mModelResNo); @@ -170,15 +170,15 @@ cPhs__Step daTbox_c::commonShapeSet() { return cPhs_COMPLEATE_e; } -cPhs__Step daTbox_c::effectShapeSet() { +cPhs_Step daTbox_c::effectShapeSet() { return cPhs_COMPLEATE_e; } -cPhs__Step daTbox_c::envShapeSet() { +cPhs_Step daTbox_c::envShapeSet() { return cPhs_COMPLEATE_e; } -cPhs__Step daTbox_c::bgCheckSet() { +cPhs_Step daTbox_c::bgCheckSet() { daTbox_ModelInfo* model_info = getModelInfo(); cBgD_t* bgd = (cBgD_t*)dComIfG_getObjectRes(model_info->mArcName, model_info->mOpenDzbResNo); @@ -325,7 +325,7 @@ u32 daTbox_c::calcHeapSize() { } int daTbox_c::CreateHeap() { - cPhs__Step step = commonShapeSet(); + cPhs_Step step = commonShapeSet(); if (step != cPhs_COMPLEATE_e) { return false; } @@ -1781,7 +1781,7 @@ void daTbox_c::mode_exec() { } } -cPhs__Step daTbox_c::create1st() { +cPhs_Step daTbox_c::create1st() { if (!mParamsInit) { field_0x980 = home.angle.x; field_0x982 = home.angle.z; @@ -1796,12 +1796,12 @@ cPhs__Step daTbox_c::create1st() { } daTbox_ModelInfo* model_info = getModelInfo(); - cPhs__Step step = (cPhs__Step)dComIfG_resLoad(&mPhase, model_info->mArcName); + cPhs_Step step = dComIfG_resLoad(&mPhase, model_info->mArcName); if (step != cPhs_COMPLEATE_e) { return step; } - step = (cPhs__Step)MoveBGCreate(model_info->mArcName, model_info->mClosedDzbResNo, + step = MoveBGCreate(model_info->mArcName, model_info->mClosedDzbResNo, dBgS_MoveBGProc_TypicalRotY, calcHeapSize(), NULL); if (step == cPhs_ERROR_e) { return step; @@ -1877,7 +1877,7 @@ int daTbox_c::Delete() { return true; } -cPhs__Step daTbox_create1st(daTbox_c* i_this) { +cPhs_Step daTbox_create1st(daTbox_c* i_this) { fopAcM_ct(i_this, daTbox_c); return i_this->create1st(); } diff --git a/src/d/d_bg_parts.cpp b/src/d/d_bg_parts.cpp index 581766df8e..7d4dcd38f2 100644 --- a/src/d/d_bg_parts.cpp +++ b/src/d/d_bg_parts.cpp @@ -1,30 +1,841 @@ #include "d/dolzel.h" // IWYU pragma: keep -#include "JSystem/J3DGraphAnimator/J3DAnimation.h" +#include "d/d_bg_parts.h" +#include "d/d_s_play.h" +#include "d/d_camera.h" +#include "f_op/f_op_camera_mng.h" +#include "JSystem/JKernel/JKRExpHeap.h" +#include "JSystem/JKernel/JKRSolidHeap.h" -int dBgp_c::registBg(fopAc_ac_c* i_actor) { - // NONMATCHING - return 0; +// NONMATCHING +void dBgp_c::material_c::draw() { + material_c* material; + do { + drawSimple(); + } while ((material = getNext()) != NULL); } -void dBgp_c::draw(fopAc_ac_c* i_actor) { - // NONMATCHING +// NONMATCHING - regalloc +void dBgp_c::modelMaterial_c::drawSimple() { + if (mpMaterial->getInvalid()) { + OSReport_Warning("Share Material Nothing !!\n"); + return; + } + + mpMaterial->loadSharedDL(); + mpModelData->syncJ3DSysFlags(); + j3dSys.setTexture(mpModelData->getTexture()); + + J3DShape* shape = mpMaterial->getShape(); + shape->loadCurrentMtx(); + + modelMaterial_c* modelMaterial = this; + int spC = 0; + void* vatCmd = NULL; + + if (getMaterial()->getShape()->checkFlag(1)) { + modelMaterial = modelMaterial->getChild(); + } + + do { + Mtx m; + J3DShape* shape = modelMaterial->getMaterial()->getShape(); + J3DModelData* modelData = modelMaterial->getModelData(); + + j3dSys.setVtxPos(modelData->getVtxPosArray()); + j3dSys.setVtxNrm(modelData->getVtxNrmArray()); + j3dSys.setVtxCol(modelData->getVtxColorArray(0)); + MTXConcat(j3dSys.getViewMtx(), modelMaterial->getMtx(), m); + GXLoadPosMtxImm(m, 0); + GXLoadNrmMtxImm(m, 0); + + if (vatCmd != shape->getVcdVatCmd()) { + GXCallDisplayList(shape->getVcdVatCmd(), 0xC0); + vatCmd = shape->getVcdVatCmd(); + } + + shape->loadVtxArray(); + + u16 mtxNum = shape->getMtxGroupNum(); + for (u16 i = 0; i < mtxNum; i++) { + if (shape->getShapeDraw(i) != NULL) { + shape->getShapeDraw(i)->draw(); + } + } + + modelMaterial = modelMaterial->getChild(); + } while (modelMaterial != NULL); } -int dBgp_c::execute(bool param_0) { - // NONMATCHING - return 0; +bool dBgp_c::modelMaterial_c::isSame(dBgp_c::material_c* i_material) { + dBgp_c::modelMaterial_c* modelMaterial = (dBgp_c::modelMaterial_c*)i_material; + return modelMaterial->getMaterialID() == mMaterialID; +} + +void dBgp_c::modelMaterial_c::addChild(dBgp_c::material_c* i_material) { + dBgp_c::modelMaterial_c* modelMaterial = (dBgp_c::modelMaterial_c*)i_material; + modelMaterial->setChild(mpChild); + mpChild = modelMaterial; +} + +// NONMATCHING +void dBgp_c::modelMaterial_c::set(J3DModelData* i_modelData, J3DMaterial* i_material, Mtx i_mtx) { + mpModelData = i_modelData; + mpMaterial = i_material; + mpMtx = i_mtx; + mpChild = NULL; + + setNext(NULL); + + JUTNameTab* nametab = i_modelData->getMaterialName(); + u16* name = (u16*)nametab->getName(i_material->getIndex()); + mMaterialID = *name; + JUT_ASSERT(157, mMaterialID != static_cast(~0)); + JUT_ASSERT(159, mMaterialID < (1<<(16-packet_c::MATERIAL_SORT_LEVEL))); + + const char* sortName = (const char*)name; + ASSERTLINE(166, sortName[2] == 'X' || sortName[2] == '0' || sortName[2] == '1' || sortName[2] == '2' || sortName[2] == '3'); + + u16 sp12 = 0; + if (sortName[2] != 'X') { + sp12 = (sortName[2] - 0x30) * 0x10; + } + + mMaterialID = (mMaterialID & ~0x30) | ((mMaterialID & 0x30) << 10) | sp12; +} + +void dBgp_c::model_c::create(J3DModelData* i_modelData, Mtx i_mtx) { + const void* binary = i_modelData->getBinary(); + + mId = *(u32*)((char*)binary + 0x1C); + if (mId != 0xFFFF) { + addShare(mId); + } + + JUT_ASSERT(205, i_modelData->getJointNum() == 1); + JUT_ASSERT(206, i_modelData->getMaterialNum() != 0); + + mMaterial = new modelMaterial_c[i_modelData->getMaterialNum()]; + JUT_ASSERT(212, mMaterial != NULL); + + J3DJoint* joint = i_modelData->getJointNodePointer(0); + cMtx_copy(i_mtx, mBaseTRMtx); + + J3DMaterial* material; + for (material = joint->getMesh(); material != NULL; material = material->getNext()) { + mMaterial[material->getIndex()].set(i_modelData, material, mBaseTRMtx); + } +} + +void dBgp_c::model_c::remove() { + if (mMaterial != NULL) { + cutShare(mId); + } +} + +void dBgp_c::packet_c::draw() { + dScnKy_env_light_c* kankyo = dKy_getEnvlight(); + s8 roomNo = (s8)getRoomNo(); + dKy_tevstr_c* roomTevstr = dComIfGp_roomControl_getTevStr(roomNo); + + g_env_light.settingTevStruct(0x40, NULL, roomTevstr); + dBgp_c::entryShare(this); + + GXColor ambcol; + stage_pure_lightvec_info_class* lightvecInf = dComIfGp_roomControl_getStatusRoomDt(roomNo)->getLightVecInfo(); + dKy_setLight_nowroom(roomNo); + + ambcol.r = roomTevstr->AmbCol.r; + ambcol.g = roomTevstr->AmbCol.g; + ambcol.b = roomTevstr->AmbCol.b; + ambcol.a = roomTevstr->AmbCol.a; + GXSetChanAmbColor(GX_COLOR0A0, ambcol); + GXSetChanMatColor(GX_COLOR0A0, g_whiteColor); + + dKy_setLight_again(); + dKy_GxFog_tevstr_set(roomTevstr); + J3DShape::resetVcdVatCache(); + + material_c** material = mpMaterials; + for (int i = 64; i > 0; i--) { + if (*material != NULL) { + (*material)->draw(); + } + material++; + } +} + +void dBgp_c::packet_c::reset() { + material_c** material = mpMaterials; + for (int i = 64; i > 0; i--) { + *material = NULL; + material++; + } +} + +void dBgp_c::packet_c::entryMaterial(dBgp_c::material_c* i_material, u32 i_id) { + i_material->setNext(mpMaterials[i_id]); + mpMaterials[i_id] = i_material; +} + +void dBgp_c::packet_c::entryModel(dBgp_c::modelMaterial_c* i_modelMaterial) { + u16 id = i_modelMaterial->getMaterialID() & 0x3F; + if (mpMaterials[id] != NULL) { + material_c* material = mpMaterials[id]; + do { + if (material->isSame(i_modelMaterial)) { + material->addChild(i_modelMaterial); + return; + } + + material = material->getNext(); + } while (material != NULL); + } + + entryMaterial(i_modelMaterial, id); + i_modelMaterial->setChild(NULL); +} + +void dBgp_c::packet_c::entryShare(dBgp_c::modelMaterial_c* i_modelMaterial) { + u16 id = i_modelMaterial->getMaterialID() & 0x3F; + if (mpMaterials[id] != NULL) { + material_c** ppmaterial = &mpMaterials[id]; + modelMaterial_c* modelMaterial = (modelMaterial_c*)*ppmaterial; + do { + if (modelMaterial->isSame(i_modelMaterial)) { + i_modelMaterial->setChild(modelMaterial); + i_modelMaterial->setNext(modelMaterial->getNext()); + modelMaterial->setNext(NULL); + *ppmaterial = i_modelMaterial; + return; + } + + ppmaterial = modelMaterial->getNext_p(); + modelMaterial = (modelMaterial_c*)*ppmaterial; + } while (modelMaterial != NULL); + } +} + +dBgp_c::share_c::share_c() { + mStatus = -1; + mCount = 0; +} + +JKRSolidHeap* dBgp_c::mShareHeap; +dBgp_c::share_c* dBgp_c::mShare; + +void dBgp_c::share_c::set(u16 i_id) { + JUT_ASSERT(441, mCount != static_cast(~0)); + + if (mCount++ == 0) { + mStatus = 1; + mId = i_id; + + int rt = dComIfG_setObjectRes(getArcName(), 0, (JKRHeap*)NULL); + JUT_ASSERT(446, rt != 0); + } +} + +void dBgp_c::share_c::reset() { + JUT_ASSERT(460, mCount); + + if (--mCount == 0) { + for (u16 i = 0; i < mModelData->getMaterialNum(); i++) { + J3DMaterial* material = mModelData->getMaterialNodePointer(i); + if (material->getMaterialAnm() != NULL) { + delete material->getMaterialAnm(); + } + } + + delete[] mMaterial; + + dComIfG_deleteObjectResMain(getArcName()); + mStatus = -1; + } +} + +const char* dBgp_c::share_c::getArcName() { + static char arcName[8]; + sprintf(arcName, "@mt%04x", mId); + return arcName; +} + +static BOOL createMatAnm(J3DModelData* i_modelData, u16 i_materialId) { + if (i_materialId != 0xFFFF) { + J3DMaterial* material = i_modelData->getMaterialNodePointer(i_materialId); + if (material->getMaterialAnm() == NULL) { + J3DMaterialAnm* anm = new J3DMaterialAnm(); + if (anm == NULL) { + return FALSE; + } + + material->setMaterialAnm(anm); + } + } + + return TRUE; +} + +int dBgp_c::share_c::execute() { + if (mStatus != 0) { + mStatus = dComIfG_syncObjectRes(getArcName()); + JUT_ASSERT(527, mStatus >= 0); + if (mStatus > 0) { + return 0; + } + + mModelData = (J3DModelData*)dComIfG_getObjectRes(getArcName(), "model.bmdl"); + JUT_ASSERT(542, mModelData != NULL); + + JUT_ASSERT(544, mModelData->getMaterialNum() != 0); + + mMaterial = new modelMaterial_c[mModelData->getMaterialNum()]; + JUT_ASSERT(546, mMaterial != NULL); + + for (u16 i = 0; i < mModelData->getMaterialNum(); i++) { + J3DMaterial* material = mModelData->getMaterialNodePointer(i); + mMaterial[i].set(mModelData, material, cMtx_getIdentity()); + + J3DShape* shape = material->getShape(); + shape->hide(); + + JUTNameTab* nametab = mModelData->getMaterialName(); + char* name = (char*)nametab->getName(material->getIndex()); + name[0] = ' '; + name[1] = ' '; + } + + field_0x1 = 0; + + J3DAnmTextureSRTKey* btk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(getArcName(), "model.btk"); + if (btk != NULL) { + int rt = mBtk.init(mModelData, btk, TRUE, 2, 1.0f, 0, -1); + JUT_ASSERT(568, rt); + + for (u16 i = 0; i < btk->getUpdateMaterialNum(); i++) { + rt = createMatAnm(mModelData, btk->getUpdateMaterialID(i)); + JUT_ASSERT(571, rt); + } + + mBtk.entry(mModelData); + field_0x1 |= (u8)1; + } + + J3DAnmTevRegKey* brk = (J3DAnmTevRegKey*)dComIfG_getObjectRes(getArcName(), "model.brk"); + if (brk != NULL) { + int rt = mBrk.init(mModelData, brk, TRUE, 2, 1.0f, 0, -1); + JUT_ASSERT(582, rt); + + for (u16 i = 0; i < brk->getCRegUpdateMaterialNum(); i++) { + rt = createMatAnm(mModelData, brk->getCRegUpdateMaterialID(i)); + JUT_ASSERT(585, rt); + } + + for (u16 i = 0; i < brk->getKRegUpdateMaterialNum(); i++) { + rt = createMatAnm(mModelData, brk->getKRegUpdateMaterialID(i)); + JUT_ASSERT(589, rt); + } + + mBrk.entry(mModelData); + field_0x1 |= (u8)2; + } + + if (mId == 0x8000) { + setCallback(&share_c::cbConveyor); + } else { + setCallback(&share_c::cbNormal); + } + } + + (this->*mCallback)(); + return 1; +} + +void dBgp_c::share_c::draw() { + if (mStatus == 0 && field_0x1 != 0) { + mModelData->simpleCalcMaterial((MtxP)j3dDefaultMtx); + j3dSys.setTexture(mModelData->getTexture()); + + for (u16 i = 0; i < mModelData->getMaterialNum(); i++) { + J3DMaterial* material = mModelData->getMaterialNodePointer(i); + J3DDisplayListObj* dlobj = material->getSharedDisplayListObj(); + dlobj->beginDL(); + + if (field_0x1 & 1) { + material->getTexGenBlock()->patch(); + } + + if (field_0x1 & 2) { + material->getTevBlock()->patch(); + } + + dlobj->endPatch(); + } + } +} + +void dBgp_c::share_c::entry(dBgp_c::packet_c* i_packet) { + if (mStatus == 0) { + modelMaterial_c* modelMaterial = mMaterial; + for (int i = modelMaterial->getModelData()->getMaterialNum() - 1; i >= 0; i--) { + i_packet->entryShare(modelMaterial); + modelMaterial++; + } + } +} + +void dBgp_c::share_c::cbNormal() { + if (field_0x1 & 1) { + mBtk.play(); + mBtk.entryFrame(); + } + + if (field_0x1 & 2) { + mBrk.play(); + mBrk.entryFrame(); + } +} + +void dBgp_c::share_c::cbConveyor() { + if (IREG_S(0) == 0) { + if (mBtk.getFrame() > 30.0f) { + mBtk.setEndFrame(80.0f); + } else { + mBtk.setEndFrame(30.0f); + } + + mBtk.setLoopFrame(0.0f); + } else { + mBtk.setEndFrame(70.0f); + mBtk.setLoopFrame(40.0f); + } + + mBtk.play(); + mBtk.entryFrame(); +} + +dBgp_c::dBgp_c() { + mPointer = NULL; + mHeap = NULL; + mHeap2 = NULL; + mBgWork = NULL; + mModel = NULL; +} + +dBgp_c::packet_c::~packet_c() {} + +dBgp_c::packet_c::packet_c() { + reset(); +} + +void dBgp_c::create(s8 i_roomNo, void* i_data) { + mPointer = i_data; + mPacket.setRoomNo(i_roomNo); + strcpy(mArcName, dComIfG_getRoomArcName(i_roomNo)); + + if (mPointer != NULL) { + JKRExpHeap* block = dStage_roomControl_c::getMemoryBlock(i_roomNo); + JKRExpHeap* parentHeap; + if (block != NULL) { + parentHeap = block; + } else { + parentHeap = mDoExt_getGameHeap(); + } + + mHeap = JKRCreateSolidHeap(0xFFFFFFFF, parentHeap, false); + JUT_ASSERT(882, mHeap != NULL); + + JKRHeap* prevHeap = mDoExt_setCurrentHeap(mHeap); + + mModel = new model_c[((stage_map_unit_class*)mPointer)->num]; + JUT_ASSERT(886, mModel != NULL); + + unit_class* mapUnit = (unit_class*)((stage_map_unit_class*)mPointer)->entries; + mBgWork = new dBgW[mapUnit->num]; + JUT_ASSERT(890, mBgWork != NULL); + + dBgW* bgw = mBgWork; + unit_group_class* unitGroup = mapUnit->groups; + for (int i = 0; i < mapUnit->num; i++) { + char resName[16]; + sprintf(resName, "bp%04d.dzb", i); + + cBgD_t* dzb = (cBgD_t*)dComIfG_getStageRes(mArcName, resName); + if (dzb != NULL) { + bool rt; + if (unitGroup->switchNo == 0xFF) { + rt = bgw->Set(dzb, 0x20, NULL); + } else { + rt = bgw->Set(dzb, 1, (Mtx*)cMtx_getIdentity()); + } + JUT_ASSERT(911, !rt); + + bgw->SetPriority(dBgW::PRIORITY_0); + bgw->SetRoomId(mPacket.getRoomNo()); + } + + bgw++; + unitGroup++; + } + + unit_unk_data2_class* unitData = ((stage_map_unit_class*)mPointer)->entries->unk_0xc; + for (int i = 0; i < ((stage_map_unit_class*)mPointer)->num; i++) { + u16 id = getId(unitData->field_0x0); + int rt = dComIfG_setObjectRes(getArcName(unitData->field_0x0), 0, (JKRHeap*)NULL); + JUT_ASSERT(927, rt); + unitData++; + } + + field_0x130 = 0; + mDoExt_setCurrentHeap(prevHeap); + u32 heapSize = mHeap->adjustSize(); + printf("Room%02d Unit Memory <%d>\n", mPacket.getRoomNo(), heapSize); + } +} + +int dBgp_c::remove() { + if (mPointer != NULL) { + if (!executeShare()) { + return 0; + } + + if (mHeap != NULL) { + if (field_0x130 < ((stage_map_unit_class*)mPointer)->num) { + execute(true); + return 0; + } + + unit_class* mapUnit = (unit_class*)((stage_map_unit_class*)mPointer)->entries; + for (int i = 0; i < mapUnit->num; i++) { + releaseBg(i); + } + + unit_unk_data2_class* unitData = mapUnit->unk_0xc; + model_c* model = mModel; + for (int i = 0; i < ((stage_map_unit_class*)mPointer)->num; i++) { + model->remove(); + dComIfG_deleteObjectResMain(getArcName(unitData->field_0x0)); + + unitData++; + model++; + } + + mDoExt_destroySolidHeap(mHeap); + mHeap = NULL; + } + + if (mHeap2 != NULL) { + mDoExt_destroySolidHeap(mHeap2); + mHeap2 = NULL; + } + } + + return 1; +} + +const char* dBgp_c::getArcName(u16 i_id, u16 i_arg) { + static char arcName[8]; + sprintf(arcName, "@%03x%03x", i_id, i_arg); + return arcName; +} + +BOOL dBgp_c::isSwitch(dBgp_c::unit_group_class* i_group) { + if (i_group->switchNo == 0xFF) { + return false; + } + + if (!(i_group->unk_0x0 & 0x80)) { + return dComIfGs_isSwitch(i_group->switchNo, mPacket.getRoomNo()); + } + + return !dComIfGs_isSwitch(i_group->switchNo, mPacket.getRoomNo()); +} + +void dBgp_c::registBg(fopAc_ac_c* i_actor) { + if (mPointer != NULL) { + unit_class* mapUnit = (unit_class*)((stage_map_unit_class*)mPointer)->entries; + unit_group_class* unitGroup = mapUnit->groups; + for (int i = 0; i < mapUnit->num; i++) { + registBg(i, i_actor); + } + } } void dBgp_c::releaseBg() { - // NONMATCHING + if (mPointer != NULL) { + unit_class* mapUnit = (unit_class*)((stage_map_unit_class*)mPointer)->entries; + unit_group_class* unitGroup = mapUnit->groups; + for (int i = 0; i < mapUnit->num; i++) { + releaseBg(i); + } + } } -static void dummy() { - ((J3DAnmTextureSRTKey*)0)->getUpdateMaterialID(0); - ((J3DAnmTextureSRTKey*)0)->getUpdateMaterialNum(); - ((J3DAnmTevRegKey*)0)->getKRegUpdateMaterialID(0); - ((J3DAnmTevRegKey*)0)->getKRegUpdateMaterialNum(); - ((J3DAnmTevRegKey*)0)->getCRegUpdateMaterialID(0); - ((J3DAnmTevRegKey*)0)->getCRegUpdateMaterialNum(); +int dBgp_c::registBg(int i_no, fopAc_ac_c* i_actor) { + if (!mBgWork[i_no].ChkUsed() && mBgWork[i_no].GetBgd() != NULL) { + if (dComIfG_Bgsp().Regist(&mBgWork[i_no], i_actor)) { + return 0; + } + } + + return 1; +} + +void dBgp_c::releaseBg(int i_no) { + if (mBgWork[i_no].ChkUsed()) { + dComIfG_Bgsp().Release(&mBgWork[i_no]); + } +} + +int dBgp_c::execute(bool param_0) { + if (mPointer != NULL) { + if (field_0x130 < ((stage_map_unit_class*)mPointer)->num) { + unit_unk_data2_class* unitData = &((stage_map_unit_class*)mPointer)->entries->unk_0xc[field_0x130]; + do { + u16 id = getId(unitData->field_0x0); + u16 arg = getArg0(unitData->field_0x0); + const char* arcName = getArcName(id, arg); + int rt = dComIfG_syncObjectRes(arcName); + JUT_ASSERT(1117, rt >= 0); + if (rt > 0) { + return 0; + } + + unitData++; + } while (++field_0x130 < ((stage_map_unit_class*)mPointer)->num); + + if (param_0) { + return 1; + } + + s8 roomNo = mPacket.getRoomNo(); + JKRExpHeap* block = dStage_roomControl_c::getMemoryBlock(roomNo); + JKRExpHeap* parentHeap; + if (block != NULL) { + parentHeap = block; + } else { + parentHeap = mDoExt_getGameHeap(); + } + + mHeap2 = JKRCreateSolidHeap(0xFFFFFFFF, parentHeap, false); + JUT_ASSERT(1145, mHeap2 != NULL); + + JKRHeap* prevHeap = mDoExt_setCurrentHeap(mHeap2); + + unit_class* mapUnit = ((stage_map_unit_class*)mPointer)->entries; + model_c* model = mModel; + unitData = mapUnit->unk_0xc; + for (int i = 0; i < ((stage_map_unit_class*)mPointer)->num; i++) { + J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(getArcName(unitData->field_0x0), "model.bmdl"); + if (modelData != NULL) { + mDoMtx_stack_c::transS(unitData->pos.x, unitData->pos.y, unitData->pos.z); + mDoMtx_stack_c::YrotM(unitData->angle); + model->create(modelData, mDoMtx_stack_c::get()); + } + + unitData++; + model++; + } + + mDoExt_setCurrentHeap(prevHeap); + u32 heapSize = mHeap2->adjustSize(); + printf("Room%02d Unit Memory <%d>\n", mPacket.getRoomNo(), heapSize); + } + + if (!param_0) { + unit_unk_data2_class* unitData = ((stage_map_unit_class*)mPointer)->entries->unk_0xc; + for (int i = 0; i < ((stage_map_unit_class*)mPointer)->num; i++) { + u16 id = getId(unitData->field_0x0); + u16 arg = getArg0(unitData->field_0x0); + const char* arcName = getArcName(id, arg); + if (dComIfG_getObjectResInfo(arcName)->getResNum() != 6) { + OS_REPORT("特殊オブジェクト<%s>セット!!\n", arcName); + cXyz pos(unitData->pos); + csXyz angle(0, unitData->angle, 0); + cXyz size(1.0f, 1.0f, 1.0f); + + u32 parameters = id << 12 | arg; + parameters |= unitData->field_0x15 << 21; + parameters |= 0x80000000; + + angle.x = (unitData->field_0x14 << 8) | unitData->field_0x5; + angle.z = (unitData->field_0x4 << 8) | unitData->field_0x3; + + fopAcM_create(PROC_SET_BG_OBJ, parameters, &pos, mPacket.getRoomNo(), &angle, &size, -1); + } + unitData++; + } + } + } + + return 1; +} + +void dBgp_c::draw(fopAc_ac_c* i_actor) { + if (mPointer == NULL || field_0x130 != ((stage_map_unit_class*)mPointer)->num) { + return; + } + + mPacket.reset(); + mDoLib_clipper::changeFar(100000.0f); + + camera_class* sp30 = dComIfGp_getCamera(0); + dCamera_c* camera = &sp30->mCamera; + JUT_ASSERT(1287, camera != NULL) + + static u16 l_dispBitTable[] = { + 0x4000, + 0xC000, + 0x8000, + 0x9000, + 0x1000, + 0x3000, + 0x2000, + 0x6000, + }; + + u16 spE = 0; + if (camera->HideBGPartsOk()) { + u16 spC = dCam_getAngleY(sp30) + 0x1000; + spE = l_dispBitTable[spC >> 13]; + } + + unit_class* mapUnit = ((stage_map_unit_class*)mPointer)->entries; + unit_group_class* unitGroup = mapUnit->groups; + + for (int i = 0; i < mapUnit->num; i++) { + if (isSwitch(unitGroup)) { + releaseBg(i); + } else { + registBg(i, i_actor); + + unit_unk_data_class* unitData = &mapUnit->unk_0x8[unitGroup->unk_0x2]; + for (int j = (unitGroup->unk_0x0 & ~0x80); j > 0; j--) { + if ((unitData->field_0x0 & spE) == 0) { + model_c* model = &mModel[unitData->field_0x2]; + for (int k = (unitData->field_0x0 & ~0xF000); k > 0; k--) { + modelMaterial_c* modelMaterial = model->getMaterial(); + if (modelMaterial != NULL) { + J3DModelData* modelData = modelMaterial->getModelData(); + J3DJoint* joint = modelData->getJointNodePointer(0); + + Mtx m; + cMtx_concat(j3dSys.getViewMtx(), model->getBaseTRMtx(), m); + + if (!mDoLib_clipper::clip(m, joint->getMax(), joint->getMin())) { + entryModel(model); + } + } + + model++; + } + } + + unitData++; + } + } + + unitGroup++; + } + + mDoLib_clipper::resetFar(); + entryPacket(); +} + +void dBgp_c::setPointer(void* i_pointer) { + stage_map_unit_class* var_r29 = (stage_map_unit_class*)i_pointer; + if (var_r29 != NULL) { + unit_class* mapUnit = var_r29->entries; + if ((uintptr_t)mapUnit->groups < 0x80000000) { + mapUnit->groups = (unit_group_class*)((uintptr_t)mapUnit + (uintptr_t)mapUnit->groups); + mapUnit->unk_0x8 = (unit_unk_data_class*)((uintptr_t)mapUnit + (uintptr_t)mapUnit->unk_0x8); + mapUnit->unk_0xc = (unit_unk_data2_class*)((uintptr_t)mapUnit + (uintptr_t)mapUnit->unk_0xc); + } + } +} + +void dBgp_c::createShare() { + if (mShareHeap == NULL) { + mShareHeap = mDoExt_createSolidHeapFromGameToCurrent(0, 0x20); + JUT_ASSERT(1409, mShareHeap != NULL); + + mShare = new share_c[16]; + JUT_ASSERT(1411, mShare != NULL); + + u32 heapSize = mDoExt_adjustSolidHeapToSystem(mShareHeap); + printf("Share Memory <%d>\n", heapSize); + } +} + +void dBgp_c::removeShare() { + if (mShareHeap != NULL) { + cutShare(0); + mDoExt_destroySolidHeap(mShareHeap); + mShareHeap = NULL; + } +} + +void dBgp_c::addShare(u16 i_id) { + JUT_ASSERT(1455, mShare != NULL); + + share_c* share = mShare; + share_c* freeShare = NULL; + + for (int i = 0; i < 16; i++) { + if (share->getCount() == 0) { + freeShare = share; + } else if (i_id == share->getId()) { + share->set(i_id); + return; + } + + share++; + } + + JUT_ASSERT(1469, freeShare != NULL); + freeShare->set(i_id); +} + +void dBgp_c::cutShare(u16 i_id) { + share_c* share = mShare; + for (int i = 0; i < 16; i++) { + if (share->getCount() != 0 && i_id == share->getId()) { + share->reset(); + } + + share++; + } +} + +bool dBgp_c::executeShare() { + bool rt = true; + share_c* share = mShare; + for (int i = 0; i < 16; i++) { + if (share->isUsed() && !share->execute()) { + rt = false; + } + + share++; + } + + return rt; +} + +void dBgp_c::drawShare() { + share_c* share = mShare; + for (int i = 0; i < 16; i++) { + if (share->isDraw()) { + share->draw(); + } + + share++; + } +} + +void dBgp_c::entryShare(dBgp_c::packet_c* i_packet) { + share_c* share = mShare; + for (int i = 0; i < 16; i++) { + share->entry(i_packet); + share++; + } } diff --git a/src/d/d_com_inf_actor.cpp b/src/d/d_com_inf_actor.cpp index f3d2a98e6a..e9f7bd97f9 100644 --- a/src/d/d_com_inf_actor.cpp +++ b/src/d/d_com_inf_actor.cpp @@ -6,7 +6,7 @@ #include "d/dolzel.h" // IWYU pragma: keep #include "d/d_com_inf_actor.h" -#include "dolphin/types.h" +#include dComIfAc_info_c g_dComIfAc_gameInfo = { 0, // field_0x0 diff --git a/src/d/d_debug_pad.cpp b/src/d/d_debug_pad.cpp new file mode 100644 index 0000000000..23a31edcd3 --- /dev/null +++ b/src/d/d_debug_pad.cpp @@ -0,0 +1,90 @@ +#include "d/d_debug_pad.h" +#include "m_Do/m_Do_controller_pad.h" +#include "JSystem/JUtility/JUTDbPrint.h" +#include "JSystem/JUtility/JUTReport.h" +#include "f_ap/f_ap_game.h" + +dDebugPad_c::dDebugPad_c() { + mIsActive = false; + mMode = MODE_CAMERA_e; + mTrigger = false; +} + +const char dDebugPad_c::mode_name[MODE_MAX_e][9] = { + "CAMERA", + "BsLight", + "WindTest", + "SDCARD", +}; + +bool dDebugPad_c::Update() { + mTrigger = false; + + if (mDoCPd_c::getTrigStart(PAD_3)) { + mIsActive = mIsActive ? false : true; + mTrigger = true; + } + + if (mIsActive) { + if (mDoCPd_c::getTrigZ(PAD_3)) { + mMode = (mMode + 1) % MODE_MAX_e; + } + + int x = 10; + int y = 40; + int line_height = 15; + JUtility::TColor sp40(0xC8, 0x80, 0xFF, 0xC0); + JUtility::TColor sp3C(0xFF, 0xC0, 0xC0, 0xFF); + + Report(x, y, sp40, "+-DEBUG-PAD-+"); + + int i; + for (i = 0; i < MODE_MAX_e; i++) { + y += line_height; + + if (i == mMode) { + Report(x, y, sp40, "| |"); + Report(x, y, sp3C, " @%-8s ", mode_name[i]); + } else { + Report(x, y, sp40, "| %-8s |", mode_name[i]); + } + } + + for (i = 0; i < 1; i++) { + y += line_height; + Report(x, y, sp40, "| |"); + } + + y += line_height; + Report(x, y, sp40, "+-----------+"); + } + + return mIsActive; +} + +bool dDebugPad_c::Report(int x, int y, JUtility::TColor color, const char* message, ...) { + char buffer[256]; + + static JUtility::TColor ShadowDarkColor(0, 0, 0, 0x80); + + if (mIsActive) { + va_list list; + va_start(list, message); + vsnprintf(buffer, sizeof(buffer), message, list); + va_end(list); + + JUTDbPrint::getManager()->flush(); + JUTDbPrint::getManager()->setCharColor(ShadowDarkColor); + JUTReport(x + 2, y + 2, buffer); + JUTDbPrint::getManager()->flush(); + JUTDbPrint::getManager()->setCharColor(color); + JUTReport(x, y, buffer); + JUTDbPrint::getManager()->flush(); + JUTDbPrint::getManager()->setCharColor(g_HIO.mColor); + return true; + } + + return false; +} + +dDebugPad_c dDebugPad; diff --git a/src/d/d_jcam_editor.cpp b/src/d/d_jcam_editor.cpp new file mode 100644 index 0000000000..4700fdbe10 --- /dev/null +++ b/src/d/d_jcam_editor.cpp @@ -0,0 +1,89 @@ +#include "d/d_jcam_editor.h" +#include "m_Do/m_Do_hostIO.h" +#include "m_Do/m_Do_ext.h" + +dJcame_c* dJcame_c::m_myObj; + +dJcame_c::dJcame_c(const JStage::TSystem* i_system, f32 param_1, JUTGamePad& i_pad) { + mOrthoGraph = new J2DOrthoGraph(0.0f, 0.0f, 608.0f, 448.0f, -1.0f, 1.0f); + mFont = new JUTResFont((ResFONT*)JUTResFONT_Ascfont_fix12, NULL); + + mHeap = JKRExpHeap::create(0x100000, JKRHeap::getRootHeap2(), false); + JUT_ASSERT(54, mHeap != NULL); + + mControl = new JStudioCameraEditor::TControl(); + mHioId = mDoHIO_createChild("JStudioCameraEditor", mControl); + JUT_ASSERT(57, mControl != NULL); + + i_pad.setButtonRepeat((PAD_BUTTON_A | PAD_BUTTON_UP | PAD_BUTTON_DOWN | PAD_BUTTON_LEFT | PAD_BUTTON_RIGHT), 30, 5); + mControl->interface_setPad(&i_pad); + mControl->show_setRender(mOrthoGraph, mFont); + mControl->jstudio_setSecondPerFrame(param_1); + + mAdaptor = NULL; + mSystem = i_system; + mIsAdaptorSet = false; + + m_myObj = this; +} + +dJcame_c::~dJcame_c() { + if (mAdaptor != NULL) { + delete mAdaptor; + } + + mControl->jstudio_setAdaptor(NULL); + mDoHIO_deleteChild(mHioId); + + delete mControl; + mHeap->destroy(); + delete mFont; + delete mOrthoGraph; + + m_myObj = NULL; +} + +void dJcame_c::create(const JStage::TSystem* i_system, f32 param_1, JUTGamePad& i_pad) { + JUT_ASSERT(109, m_myObj == NULL); + new dJcame_c(i_system, param_1, i_pad); + JUT_ASSERT(111, m_myObj != NULL); +} + +void dJcame_c::remove() { + JUT_ASSERT(126, m_myObj != NULL); + delete m_myObj; +} + +void dJcame_c::update() { + if (!mIsAdaptorSet) { + if (mAdaptor == NULL) { + JStage::TObject* object; + int rt = mSystem->JSGFindObject(&object, "EditCam", JStage::OBJECT_CAMERA); + if (object == NULL) { + return; + } + + mAdaptor = new JStudio_JStage::TAdaptor_camera(mSystem, (JStage::TCamera*)object); + JUT_ASSERT(155, mAdaptor != NULL); + + mControl->jstudio_setAdaptor(mAdaptor); + mIsAdaptorSet = true; + } + } else if (isEnabled()) { + JKRHeap* heap = mDoExt_setCurrentHeap(mHeap); + mControl->update(); + mDoExt_setCurrentHeap(heap); + } +} + +void dJcame_c::show3D(Mtx i_mtx) { + if (mIsAdaptorSet) { + mControl->show3D(i_mtx); + } +} + +void dJcame_c::show2D() { + if (mIsAdaptorSet) { + mControl->show2D(); + } +} diff --git a/src/d/d_kyeff.cpp b/src/d/d_kyeff.cpp index f3c4839002..d3223fd46c 100644 --- a/src/d/d_kyeff.cpp +++ b/src/d/d_kyeff.cpp @@ -9,13 +9,62 @@ #include "d/d_com_inf_game.h" #include "d/d_kankyo_wether.h" +#if DEBUG +class dKyeff_HIO_c : public JORReflexible { +public: + dKyeff_HIO_c(); + virtual ~dKyeff_HIO_c(); + + void genMessage(JORMContext*); + + /* 0x04 */ cXyz camera_eye; + /* 0x10 */ cXyz camera_cnt; + /* 0x1C */ f32 wind_power; + /* 0x20 */ f32 time_speed; + /* 0x24 */ s8 id; +}; + +dKyeff_HIO_c g_kyeffHIO; + +dKyeff_HIO_c::~dKyeff_HIO_c() {} + +dKyeff_HIO_c::dKyeff_HIO_c() { + g_kyeffHIO.camera_eye.x = 9377.0f; + g_kyeffHIO.camera_eye.y = 0.0f; + g_kyeffHIO.camera_eye.z = 7644.0f; + + g_kyeffHIO.camera_cnt.x = 4300.0f; + g_kyeffHIO.camera_cnt.y = 4800.0f; + g_kyeffHIO.camera_cnt.z = 1000.0f; + + g_kyeffHIO.wind_power = 0.5f; + g_kyeffHIO.time_speed = 0.03f; +} + +void dKyeff_HIO_c::genMessage(JORMContext* mctx) { + mctx->genSlider("時刻経過スピード", &time_speed, 0.0f, 100.0f); + + mctx->genSlider("Camera Eye X", &camera_eye.x, -10000.0f, 10000.0f); + mctx->genSlider(" Y", &camera_eye.y, -10000.0f, 10000.0f); + mctx->genSlider(" Z", &camera_eye.z, -10000.0f, 10000.0f); + + mctx->genSlider("Camera Cnt X", &camera_cnt.x, -10000.0f, 10000.0f); + mctx->genSlider(" Y", &camera_cnt.y, -10000.0f, 10000.0f); + mctx->genSlider(" Z", &camera_cnt.z, -10000.0f, 10000.0f); + + mctx->genSlider("風力", &wind_power, 0.0f, 1.0f); +} +#endif + static int dKyeff_Draw(dKyeff_c* i_this) { + UNUSED(i_this); + dKyw_wether_draw(); return 1; } int dKyeff_c::execute() { - if (strcmp(dComIfGp_getStartStageName(), "Name")) { + if (strcmp(dComIfGp_getStartStageName(), "Name") != 0) { dKyw_wether_move(); } @@ -29,12 +78,21 @@ static int dKyeff_Execute(dKyeff_c* i_this) { return i_this->execute(); } -static int dKyeff_IsDelete(dKyeff_c* i_this) { +static int dKyeff_IsDelete(dKyeff_c*) { return 1; } static int dKyeff_Delete(dKyeff_c* i_this) { + UNUSED(i_this); + dKyw_wether_delete(); + + #if DEBUG + if (strcmp(dComIfGp_getStartStageName(), "Name") == 0) { + mDoHIO_deleteChild(g_kyeffHIO.id); + } + #endif + return 1; } @@ -52,22 +110,35 @@ static f32 dummyLiteralOrder3(s32 hours) { } static int dKyeff_Create(kankyo_class* i_this) { - OSCalendarTime time; + UNUSED(i_this); + OSCalendarTime calendar; dKyw_wether_init(); - if (!strcmp(dComIfGp_getStartStageName(), "Name")) { - OSTicksToCalendarTime(OSGetTime(), &time); - g_env_light.global_wind_influence.vec.set(1.0f, 0.0f, 0.0f); + + if (strcmp(dComIfGp_getStartStageName(), "Name") == 0) { + camera_class* camera = dComIfGp_getCamera(0); + OSTime time = OSGetTime(); + OSTicksToCalendarTime(time, &calendar); + + g_env_light.global_wind_influence.vec.x = 1.0f; + g_env_light.global_wind_influence.vec.y = 0.0f; + g_env_light.global_wind_influence.vec.z = 0.0f; g_env_light.global_wind_influence.pow = 0.7f; - g_env_light.daytime = time.hour * 15.0f; + g_env_light.daytime = calendar.hour * 15.0f; + + #if DEBUG + g_kyeffHIO.id = mDoHIO_createChild("VR-BOX", &g_kyeffHIO); + #endif } return cPhs_COMPLEATE_e; } static leafdraw_method_class l_dKyeff_Method = { - (process_method_func)dKyeff_Create, (process_method_func)dKyeff_Delete, - (process_method_func)dKyeff_Execute, (process_method_func)dKyeff_IsDelete, + (process_method_func)dKyeff_Create, + (process_method_func)dKyeff_Delete, + (process_method_func)dKyeff_Execute, + (process_method_func)dKyeff_IsDelete, (process_method_func)dKyeff_Draw, }; diff --git a/src/d/d_menu_collect.cpp b/src/d/d_menu_collect.cpp index 400a00544f..6ff1a50c7f 100644 --- a/src/d/d_menu_collect.cpp +++ b/src/d/d_menu_collect.cpp @@ -27,7 +27,7 @@ #include "d/d_item.h" #include "d/d_lib.h" #include "d/d_meter2_info.h" -#include "dolphin/os.h" +#include #include "m_Do/m_Do_graphic.h" #include "m_Do/m_Do_mtx.h" #include "JSystem/J2DGraph/J2DAnmLoader.h" diff --git a/src/d/d_menu_letter.cpp b/src/d/d_menu_letter.cpp index 95c2d0ae65..faf96802cb 100644 --- a/src/d/d_menu_letter.cpp +++ b/src/d/d_menu_letter.cpp @@ -10,7 +10,7 @@ #include "d/d_meter2_info.h" #include "d/d_meter_HIO.h" #include "d/d_msg_string.h" -#include "dolphin/types.h" +#include #include "m_Do/m_Do_controller_pad.h" #include "m_Do/m_Do_graphic.h" #include "d/d_msg_scrn_arrow.h" diff --git a/src/d/d_menu_option.cpp b/src/d/d_menu_option.cpp index 647638768c..269bef1849 100644 --- a/src/d/d_menu_option.cpp +++ b/src/d/d_menu_option.cpp @@ -18,7 +18,7 @@ #include "d/d_meter_haihai.h" #include "d/d_msg_string.h" #include "d/d_select_cursor.h" -#include "dolphin/types.h" +#include #include "f_op/f_op_msg_mng.h" #include "m_Do/m_Do_controller_pad.h" #include "m_Do/m_Do_graphic.h" diff --git a/src/d/d_menu_quit.cpp b/src/d/d_menu_quit.cpp new file mode 100644 index 0000000000..6ad35a184b --- /dev/null +++ b/src/d/d_menu_quit.cpp @@ -0,0 +1,153 @@ +#include "d/dolzel.h" // IWYU pragma: keep + +#include "d/d_menu_quit.h" +#include "d/d_lib.h" + +dMq_HIO_c g_mqHIO; + +dMq_HIO_c::~dMq_HIO_c() {} + +dMq_HIO_c::dMq_HIO_c() {} + +void dMq_HIO_c::genMessage(JORMContext*) {} + +typedef void (dMenu_Quit_c::*moveProc)(); +static moveProc move_process[] = { + &dMenu_Quit_c::select1_proc, + &dMenu_Quit_c::select2_proc, + &dMenu_Quit_c::messageChange, +}; + +// stripped, but based on asserts it was likely the constructor goes here +dMenu_Quit_c::dMenu_Quit_c() { + JUT_ASSERT(0, mStick != NULL); + JUT_ASSERT(0, mpScrnExplain != NULL); +} + +dMenu_Quit_c::~dMenu_Quit_c() { + delete mStick; + delete mpScrnExplain; + mpScrnExplain = NULL; +} + +void dMenu_Quit_c::select1_init() { + field_0x14 = 1; + field_0x1c = 1; + msgTxtSet(0x4B2, false); // "Continue?" + field_0x12 = 0; +} + +void dMenu_Quit_c::select1_proc() { + bool isSelect = YesNoSelect(); + if (isSelect) { + if (field_0x14 == 1 || field_0x14 == 2) { + field_0x10 = 0; + field_0x11 = 1; + } else { + select2_init(); + } + } +} + +void dMenu_Quit_c::select2_init() { + field_0x14 = 0; + field_0x1c = 1; + msgTxtSet(0x4B3, false); // "Really quit?" + field_0x12 = 1; +} + +void dMenu_Quit_c::select2_proc() { + bool isSelect = YesNoSelect(); + if (isSelect) { + if (field_0x14 == 1) { + mDoAud_bgmStop(30); + dComIfGp_setNextStage("name", 0, 0, 0); + } else { + select1_init(); + } + } +} + +void dMenu_Quit_c::messageChange() { + bool rt; + + if (mpScrnExplain->getStatus() != dMsgScrnExplain_c::STATUS_WAIT_e) { + if (mpScrnExplain->getStatus() == dMsgScrnExplain_c::STATUS_MOVE_e || mpScrnExplain->getStatus() == dMsgScrnExplain_c::STATUS_MOVE_SELECT_e) { + mpScrnExplain->onForceSelect(); + } + + mpScrnExplain->move(); + } else { + if (field_0x1c == 1) { + rt = mpScrnExplain->openExplain(mMsgId, 1, field_0x14 != 0 ? 0 : 1, 0xFF, field_0x20); + } else { + rt = mpScrnExplain->openExplain(mMsgId, 0, 0, 0xFF, true); + } + + if (rt == 1) { + field_0x12 = field_0x13; + } + } +} + +bool dMenu_Quit_c::YesNoSelect() { + bool rt = false; + if (mpScrnExplain->getStatus() == dMsgScrnExplain_c::STATUS_WAIT_e) { + rt = true; + field_0x1c = 0; + } + + if (field_0x22 == 4) { + switch (mpScrnExplain->getSelectCursor()) { + case 0: + field_0x14 = 1; + break; + case 1: + field_0x14 = 0; + break; + case 0xFF: + field_0x14 = 2; + break; + } + } + + if (field_0x22 == 4 && mpScrnExplain->getStatus() == dMsgScrnExplain_c::STATUS_CLOSE_e) { + if (field_0x12 == 0) { + mDoAud_seStart(Z2SE_SY_CURSOR_OK, NULL, 0, 0); + } else if (field_0x12 == 1) { + if (field_0x14 == 1) { + mDoAud_seStart(Z2SE_QUIT_GAME, NULL, 0, 0); + } else { + mDoAud_seStart(Z2SE_SY_CURSOR_CANCEL, NULL, 0, 0); + } + } + } + + return rt; +} + +void dMenu_Quit_c::msgTxtSet(u16 i_msgId, bool param_1) { + param_1 = true; + + if (i_msgId != 0xFFFF) { + bool rt; + if (field_0x1c == 1) { + rt = mpScrnExplain->openExplain(i_msgId, 1, field_0x14 != 0 ? 0 : 1, 0xFF, param_1); + } else { + rt = mpScrnExplain->openExplain(i_msgId, 0, 0, 0xFF, true); + } + + if (!rt) { + field_0x20 = param_1; + mMsgId = i_msgId; + field_0x13 = field_0x12; + field_0x12 = 2; + } + } + + field_0x21 = 0; +} + +void dDlst_MenuQuitExplain_c::draw() { + mpExplain->draw((J2DOrthoGraph*)dComIfGp_getCurrentGrafPort()); +} diff --git a/src/d/d_msg_scrn_3select.cpp b/src/d/d_msg_scrn_3select.cpp index 557ed12cd9..f8c9167be1 100644 --- a/src/d/d_msg_scrn_3select.cpp +++ b/src/d/d_msg_scrn_3select.cpp @@ -210,7 +210,7 @@ dMsgScrn3Select_c::dMsgScrn3Select_c() { field_0x10c = 0; field_0x112 = 0; mProcess = PROC_MAX_e; - field_0x115 = 0xFF; + mDPDPoint = 0xFF; field_0x116 = 0xFF; field_0x117 = 0; diff --git a/src/d/d_msg_scrn_explain.cpp b/src/d/d_msg_scrn_explain.cpp index 3df29b4e11..60d1379b50 100644 --- a/src/d/d_msg_scrn_explain.cpp +++ b/src/d/d_msg_scrn_explain.cpp @@ -31,44 +31,64 @@ static dMsgScrnExplain_c::ProcFunc move_process[] = { &dMsgScrnExplain_c::move_select_proc, &dMsgScrnExplain_c::close_proc, }; -dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_2, u8 param_3) { +dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool i_isUseBackTex, u8 param_3) { mpStick = i_stick; - field_0x54 = 0; + mOpenMsgId = 0; field_0x5c = 0; field_0x64 = 0; mSelCursor = 0; field_0x62 = 0xff; field_0x63 = 0; - mStatus = 0; + mStatus = STATUS_WAIT_e; field_0x5a = 0; mForceSelect = 0; - field_0x58 = 1; + field_0x58 = true; field_0x66 = param_1; mKeyWaitTimer = 0; field_0x67 = param_3; mpString_c = new dMsgString_c(); + JUT_ASSERT(79, mpString_c != NULL); mpOutFont = new COutFont_c(0); + JUT_ASSERT(83, mpOutFont != NULL); mpOutFont->createPane(); mpScreen = new J2DScreen(); - mpScreen->setPriority("zelda_message_window_new.blo", 0x20000, dComIfGp_getMsgArchive(1)); + JUT_ASSERT(88, mpScreen != NULL); + + #if PLATFORM_GCN + #define MSG_WINDOW_BLO_FILENAME "zelda_message_window_new.blo" + #else + #define MSG_WINDOW_BLO_FILENAME "zelda_message_window_new_revo.blo" + #endif + + bool fg = mpScreen->setPriority(MSG_WINDOW_BLO_FILENAME, 0x20000, dComIfGp_getMsgArchive(1)); + JUT_ASSERT(98, fg != false); dPaneClass_showNullPane(mpScreen); mpTxScreen = new J2DScreen(); + JUT_ASSERT(102, mpTxScreen != NULL); field_0x48 = 608.0f; if (param_1 == 1 || param_1 == 3) { - mpTxScreen->setPriority("zelda_message_window_text_save_road.blo", 0x20000, - dComIfGp_getMsgCommonArchive()); + #if PLATFORM_GCN + #define MSG_WINDOW_TXT_SAVEROAD_BLO_FILENAME "zelda_message_window_text_save_road.blo" + #else + #define MSG_WINDOW_TXT_SAVEROAD_BLO_FILENAME "zelda_message_window_save_road_text_revo.blo" + #endif + fg = mpTxScreen->setPriority(MSG_WINDOW_TXT_SAVEROAD_BLO_FILENAME, 0x20000, dComIfGp_getMsgCommonArchive()); + JUT_ASSERT(119, fg != false); dPaneClass_showNullPane(mpTxScreen); mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3line', 0, NULL); - mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3_s', 0, NULL); + JUT_ASSERT(124, mpTm_c[0] != NULL); - field_0x10[0] = NULL; - field_0x10[1] = NULL; + mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3_s', 0, NULL); + JUT_ASSERT(127, mpTm_c[1] != NULL); + + mpTmr_c[0] = NULL; + mpTmr_c[1] = NULL; mpTxScreen->search('n_3line')->show(); mpTxScreen->search('n_3fline')->hide(); @@ -81,8 +101,9 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_ #endif field_0x4c = 0.0f; } else { - mpTxScreen->setPriority("zelda_message_window_text.blo", 0x20000, - dComIfGp_getMsgCommonArchive()); + fg = mpTxScreen->setPriority("zelda_message_window_text.blo", 0x20000, + dComIfGp_getMsgCommonArchive()); + JUT_ASSERT(153, fg != false); dPaneClass_showNullPane(mpTxScreen); mpScreen->search('n_all')->scale(g_MsgObject_HIO_c.mBoxTalkScaleX, @@ -94,8 +115,8 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_ mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3flin', 0, NULL); mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3f_s', 0, NULL); - field_0x10[0] = new CPaneMgr(mpTxScreen, 'mg_3f', 0, NULL); - field_0x10[1] = new CPaneMgr(mpTxScreen, 'mg_3f_s', 0, NULL); + mpTmr_c[0] = new CPaneMgr(mpTxScreen, 'mg_3f', 0, NULL); + mpTmr_c[1] = new CPaneMgr(mpTxScreen, 'mg_3f_s', 0, NULL); mpTxScreen->search('n_3line')->hide(); mpTxScreen->search('n_3fline')->show(); @@ -104,8 +125,8 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_ mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3line', 0, NULL); mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3_s', 0, NULL); - field_0x10[0] = NULL; - field_0x10[1] = NULL; + mpTmr_c[0] = NULL; + mpTmr_c[1] = NULL; mpTxScreen->search('n_3line')->show(); mpTxScreen->search('n_3fline')->hide(); @@ -115,10 +136,13 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_ field_0x50 = -10.0f; mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_e4lin', 0, NULL); - mpTm_c[1] = new CPaneMgr(mpTxScreen, 't4_s', 0, NULL); + JUT_ASSERT(162, mpTm_c[0] != NULL); - field_0x10[0] = NULL; - field_0x10[1] = NULL; + mpTm_c[1] = new CPaneMgr(mpTxScreen, 't4_s', 0, NULL); + JUT_ASSERT(165, mpTm_c[1] != NULL); + + mpTmr_c[0] = NULL; + mpTmr_c[1] = NULL; mpTxScreen->search('n_3line')->hide(); mpTxScreen->search('n_3fline')->hide(); @@ -142,14 +166,14 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_ #endif ((J2DTextBox*)mpTm_c[i]->getPanePtr())->setLineSpace(lineSpace); - if (field_0x10[i] != NULL) { - ((J2DTextBox*)field_0x10[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); + if (mpTmr_c[i] != NULL) { + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont()); #if VERSION == VERSION_GCN_JPN - ((J2DTextBox*)field_0x10[i]->getPanePtr())->setString(0x210, ""); + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, ""); #else - ((J2DTextBox*)field_0x10[i]->getPanePtr())->setString(0x200, ""); + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x200, ""); #endif - ((J2DTextBox*)field_0x10[i]->getPanePtr())->setLineSpace(lineSpace); + ((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setLineSpace(lineSpace); } } @@ -158,15 +182,24 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_ g_MsgObject_HIO_c.mTextPosY + mpScreen->search('mg_null')->getBounds().i.y); mpArw_c = new CPaneMgr(mpScreen, 'set_ya_n', 0, NULL); - mpMg_c[0] = new CPaneMgr(mpScreen, 'mg_null', 0, NULL); - mpMg_c[1] = new CPaneMgr(mpTxScreen, 'mg_null', 0, NULL); - mpRoot_c[0] = new CPaneMgr(mpScreen, 'ROOT', 2, NULL); - mpRoot_c[1] = new CPaneMgr(mpTxScreen, 'ROOT', 2, NULL); + JUT_ASSERT(241, mpArw_c != NULL); - if (param_2 == true) { - ResTIMG* texResource = - (ResTIMG*)dComIfGp_getMain2DArchive()->getResource('TIMG', "tt_block8x8.bti"); + mpMg_c[0] = new CPaneMgr(mpScreen, 'mg_null', 0, NULL); + JUT_ASSERT(244, mpMg_c[0] != NULL); + + mpMg_c[1] = new CPaneMgr(mpTxScreen, 'mg_null', 0, NULL); + JUT_ASSERT(247, mpMg_c[1] != NULL); + + mpRoot_c[0] = new CPaneMgr(mpScreen, 'ROOT', 2, NULL); + JUT_ASSERT(250, mpRoot_c[0] != NULL); + + mpRoot_c[1] = new CPaneMgr(mpTxScreen, 'ROOT', 2, NULL); + JUT_ASSERT(253, mpRoot_c[1] != NULL); + + if (i_isUseBackTex == true) { + ResTIMG* texResource = (ResTIMG*)dComIfGp_getMain2DArchive()->getResource('TIMG', "tt_block8x8.bti"); mpBackTex = new J2DPicture(texResource); + JUT_ASSERT(259, mpBackTex != NULL); mpBackTex->setBlackWhite(JUtility::TColor(0, 0, 0, 0), JUtility::TColor(0, 0, 0, 0xff)); mpBackTex->setAlpha(0); @@ -175,17 +208,19 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_ } mpArrow_c = new dMsgScrnArrow_c(); + JUT_ASSERT(269, mpArrow_c != NULL); if (i_stick != NULL) { mpSelect_c = new dMsgScrn3Select_c(); + JUT_ASSERT(274, mpSelect_c != NULL); } else { mpSelect_c = NULL; } - Vec vtxCenter = mpArw_c->getGlobalVtxCenter(mpArw_c->mPane, false, 0); + Vec vtxCenter = mpArw_c->getGlobalVtxCenter(false, 0); mpArrow_c->setPos(vtxCenter.x, vtxCenter.y); - Vec vtxCenter2 = mpMg_c[0]->getGlobalVtxCenter(mpMg_c[0]->mPane, false, 0); + Vec vtxCenter2 = mpMg_c[0]->getGlobalVtxCenter(false, 0); mpMg_c[1]->translate(vtxCenter2.x + field_0x50, vtxCenter2.y); } @@ -209,9 +244,9 @@ dMsgScrnExplain_c::~dMsgScrnExplain_c() { delete mpTm_c[i]; mpTm_c[i] = NULL; - if (field_0x10[i] != NULL) { - delete field_0x10[i]; - field_0x10[i] = NULL; + if (mpTmr_c[i] != NULL) { + delete mpTmr_c[i]; + mpTmr_c[i] = NULL; } delete mpMg_c[i]; @@ -265,7 +300,7 @@ void dMsgScrnExplain_c::move() { } void dMsgScrnExplain_c::draw(J2DOrthoGraph* i_graf) { - if (mStatus == 0 || mStatus == 1) { + if (mStatus == STATUS_WAIT_e || mStatus == STATUS_OPEN_REQ_e) { return; } @@ -282,9 +317,9 @@ void dMsgScrnExplain_c::draw(J2DOrthoGraph* i_graf) { mpTxScreen->draw(0.0f, 0.0f, (J2DGrafContext*)i_graf); #if VERSION == VERSION_GCN_JPN - mpString_c->getString(field_0x54, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 12); + mpString_c->getString(mOpenMsgId, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 12); #else - mpString_c->getString(field_0x54, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 8); + mpString_c->getString(mOpenMsgId, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 8); #endif mpString_c->drawOutFont((J2DTextBox*)mpTm_c[0]->getPanePtr(), -1.0f); @@ -313,26 +348,26 @@ void dMsgScrnExplain_c::wait_proc() {} void dMsgScrnExplain_c::open_request_init() {} void dMsgScrnExplain_c::open_request_proc() { - J2DTextBox* uVar1; - J2DTextBox* uVar6 = NULL; + J2DTextBox* tbox = NULL; + J2DTextBox* rubyTbox = NULL; - uVar1 = (J2DTextBox*)mpTm_c[0]->getPanePtr(); - if (field_0x10[0] != NULL) { - uVar6 = (J2DTextBox*)field_0x10[0]->getPanePtr(); + tbox = (J2DTextBox*)mpTm_c[0]->getPanePtr(); + if (mpTmr_c[0] != NULL) { + rubyTbox = (J2DTextBox*)mpTmr_c[0]->getPanePtr(); } - char acStack_220[STR_BUF_LEN]; - char acStack_420[STR_BUF_LEN]; - char acStack_620[STR_BUF_LEN]; + char text[STR_BUF_LEN]; + char ruby[STR_BUF_LEN]; + char textShadow[STR_BUF_LEN]; - if (dMsgObject_getString(field_0x54, uVar1, uVar6, mDoExt_getMesgFont(), mpOutFont, acStack_220, - acStack_420, acStack_620, &field_0x5c) != 0) - { - strcpy(((J2DTextBox*)mpTm_c[0]->getPanePtr())->getStringPtr(), acStack_220); - strcpy(((J2DTextBox*)mpTm_c[1]->getPanePtr())->getStringPtr(), acStack_620); + bool rt = dMsgObject_getString(mOpenMsgId, tbox, rubyTbox, mDoExt_getMesgFont(), mpOutFont, text, + ruby, textShadow, &field_0x5c); + if (rt) { + strcpy(((J2DTextBox*)mpTm_c[0]->getPanePtr())->getStringPtr(), text); + strcpy(((J2DTextBox*)mpTm_c[1]->getPanePtr())->getStringPtr(), textShadow); for (int i = 0; i < 2; i++) { - if (field_0x10[i] != NULL) { - strcpy(((J2DTextBox*)field_0x10[i]->getPanePtr())->getStringPtr(), acStack_420); + if (mpTmr_c[i] != NULL) { + strcpy(((J2DTextBox*)mpTmr_c[i]->getPanePtr())->getStringPtr(), ruby); } } @@ -340,7 +375,7 @@ void dMsgScrnExplain_c::open_request_proc() { Z2GetSpeechMgr2()->setTextCount(0); } - mStatus = 2; + mStatus = STATUS_OPEN_e; } } @@ -350,7 +385,7 @@ void dMsgScrnExplain_c::open_init() { for (int i = 0; i < 2; i++) { mpRoot_c[i]->setAlphaRate(0.0f); } - mDoAud_seStart(Z2SE_SY_EXP_WIN_OPEN, 0, 0, 0); + mDoAud_seStart(Z2SE_SY_EXP_WIN_OPEN, NULL, 0, 0); } void dMsgScrnExplain_c::open_proc() { @@ -358,9 +393,9 @@ void dMsgScrnExplain_c::open_proc() { if (field_0x5a >= 5) { field_0x5a = 5; if (field_0x64 == 1 || field_0x64 == 2) { - mStatus = 4; + mStatus = STATUS_MOVE_SELECT_e; } else { - mStatus = 3; + mStatus = STATUS_MOVE_e; } } @@ -385,14 +420,14 @@ void dMsgScrnExplain_c::move_proc() { } if (mDoCPd_c::getTrigA(PAD_1) || - ((field_0x58 != 0x0 && + ((field_0x58 && (mDoCPd_c::getTrigB(PAD_1) || mDoCPd_c::getTrigZ(PAD_1) || mDoCPd_c::getTrigX(PAD_1) || mDoCPd_c::getTrigY(PAD_1) || mDoCPd_c::getTrigStart(PAD_1) || mDoCPd_c::getTrigR(PAD_1) || mDoCPd_c::getTrigL(PAD_1) || mForceSelect)))) { - mStatus = 5; + mStatus = STATUS_CLOSE_e; dMeter2Info_set2DVibrationM(); - mDoAud_seStart(Z2SE_SY_EXP_WIN_CLOSE, 0, 0, 0); + mDoAud_seStart(Z2SE_SY_EXP_WIN_CLOSE, NULL, 0, 0); } } @@ -402,6 +437,10 @@ void dMsgScrnExplain_c::move_select_init() { char string_buf_yes[20]; char string_buf_no[20]; + f32 var_f31 = 0.0f; + f32 yes_str_len = 0.0f; + f32 no_str_len = 0.0f; + msg_buf_yes[0] = 0; msg_buf_no[0] = 0; string_buf_yes[0] = 0; @@ -415,36 +454,38 @@ void dMsgScrnExplain_c::move_select_init() { dMeter2Info_getString(0x520, msg_buf_no, NULL); // "NO" } - f32 yes_str_len = dMeter2Info_getStringLength(mDoExt_getMesgFont(), mpSelect_c->getFontSize(), - mpSelect_c->getCharSpace(), msg_buf_yes); - f32 no_str_len = dMeter2Info_getStringLength(mDoExt_getMesgFont(), mpSelect_c->getFontSize(), - mpSelect_c->getCharSpace(), msg_buf_no); - f32 dVar13; + yes_str_len = dMeter2Info_getStringLength(mDoExt_getMesgFont(), mpSelect_c->getFontSize(), + mpSelect_c->getCharSpace(), msg_buf_yes); + no_str_len = dMeter2Info_getStringLength(mDoExt_getMesgFont(), mpSelect_c->getFontSize(), + mpSelect_c->getCharSpace(), msg_buf_no); + if (yes_str_len < no_str_len) { - dVar13 = no_str_len; + var_f31 = no_str_len; } else { - dVar13 = yes_str_len; + var_f31 = yes_str_len; } - f32 tbox_width = mpSelect_c->getTextBoxWidth(); - if (dVar13 < tbox_width) { - dVar13 = mpSelect_c->getTextBoxWidth(); + if (var_f31 < mpSelect_c->getTextBoxWidth()) { + var_f31 = mpSelect_c->getTextBoxWidth(); } + f32 var_f28 = 0.5f * (var_f31 - yes_str_len); + f32 var_f27 = 0.5f * (var_f31 - no_str_len); + snprintf(string_buf_yes, 20, "\x1B" "CR[%d]", - (int)(0.5f * (dVar13 - yes_str_len))); + (int)var_f28); strcat(string_buf_yes, msg_buf_yes); snprintf(string_buf_no, 20, "\x1B" "CR[%d]", - (int)(0.5f * (dVar13 - no_str_len))); + (int)var_f27); strcat(string_buf_no, msg_buf_no); mpSelect_c->setString("", string_buf_yes, string_buf_no); mpSelect_c->setRubyString("", "", ""); - mpSelect_c->selAnimeInit(2, mSelCursor + 1, 0, dVar13, 0); + mpSelect_c->selAnimeInit(2, mSelCursor + 1, 0, var_f31, 0); mpArrow_c->arwAnimeInit(); } @@ -468,7 +509,7 @@ void dMsgScrnExplain_c::move_select_proc() { mDoAud_seStart(Z2SE_SY_TALK_CURSOR_OK, NULL, 0, 0); } - mStatus = 5; + mStatus = STATUS_CLOSE_e; mDoAud_seStart(Z2SE_SY_EXP_WIN_CLOSE, NULL, 0, 0); } else if (field_0x58 && (checkTriggerB() || mForceSelect)) { if (field_0x64 == 2) { @@ -482,7 +523,7 @@ void dMsgScrnExplain_c::move_select_proc() { } } - mStatus = 5; + mStatus = STATUS_CLOSE_e; mDoAud_seStart(Z2SE_SY_EXP_WIN_CLOSE, NULL, 0, 0); } else if (mpSelect_c->isSelect() && mpStick->checkUpTrigger()) { if (mSelCursor == 1) { @@ -490,14 +531,28 @@ void dMsgScrnExplain_c::move_select_proc() { Z2GetAudioMgr()->seStart(Z2SE_SY_MENU_CURSOR_COMMON, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0); } - } else if (mpSelect_c->isSelect() && mpStick->checkDownTrigger() && mSelCursor == 0) { - mSelCursor = 1; - Z2GetAudioMgr()->seStart(Z2SE_SY_MENU_CURSOR_COMMON, NULL, 0, 0, 1.0f, 1.0f, -1.0f, - -1.0f, 0); + } else if (mpSelect_c->isSelect() && mpStick->checkDownTrigger()) { + if (mSelCursor == 0) { + mSelCursor = 1; + Z2GetAudioMgr()->seStart(Z2SE_SY_MENU_CURSOR_COMMON, NULL, 0, 0, 1.0f, 1.0f, -1.0f, + -1.0f, 0); + } } + #if !PLATFORM_GCN + else if (mpSelect_c->getDPDPoint() != 0xFF) { + if (mSelCursor != mpSelect_c->getDPDPoint() && field_0x62 != mpSelect_c->getDPDPoint()) { + mSelCursor = mpSelect_c->getDPDPoint(); + Z2GetAudioMgr()->seStart(Z2SE_SY_MENU_CURSOR_COMMON, NULL, 1, 0, 1.0f, 1.0f, -1.0f, + -1.0f, 0); + dMeter2Info_set2DVibration(); + } + } + + field_0x62 = mpSelect_c->getDPDPoint(); + #endif } - if (mStatus == 4) { + if (mStatus == STATUS_MOVE_SELECT_e) { mpSelect_c->selAnimeMove(2, mSelCursor + 1, false); } else { mpSelect_c->selAnimeEnd(); @@ -509,7 +564,7 @@ void dMsgScrnExplain_c::close_init() { } void dMsgScrnExplain_c::close_proc() { - bool iVar1; + bool iVar1 = false; if (mpSelect_c != NULL) { iVar1 = mpSelect_c->selAnimeEnd(); } else { @@ -520,7 +575,7 @@ void dMsgScrnExplain_c::close_proc() { if (field_0x5a <= 0) { field_0x5a = 0; if (iVar1) { - mStatus = 0; + mStatus = STATUS_WAIT_e; } } @@ -534,21 +589,21 @@ void dMsgScrnExplain_c::close_proc() { } } -bool dMsgScrnExplain_c::openExplain(u32 param_0, u8 param_1, u8 param_2, u8 param_3, bool param_4) { +bool dMsgScrnExplain_c::openExplain(u32 i_msgId, u8 param_1, u8 i_cursorSel, u8 param_3, bool param_4) { bool rv = false; if (g_MsgObject_HIO_c.mSaveSeqMsgDebug) { - param_0 = g_MsgObject_HIO_c.mSaveSeqMsgIndex; + i_msgId = g_MsgObject_HIO_c.mSaveSeqMsgIndex; } - if (mStatus == 0) { - field_0x54 = param_0; + if (mStatus == STATUS_WAIT_e) { + mOpenMsgId = i_msgId; field_0x64 = param_1; - mSelCursor = param_2; + mSelCursor = i_cursorSel; field_0x63 = param_3; mForceSelect = 0; field_0x58 = param_4; - mStatus = 1; + mStatus = STATUS_OPEN_REQ_e; open_request_init(); rv = true; } @@ -557,21 +612,39 @@ bool dMsgScrnExplain_c::openExplain(u32 param_0, u8 param_1, u8 param_2, u8 para } f32 dMsgScrnExplain_c::getAlphaRatio() { + f32 ratio; + f32 var_f30; + f32 var_f29; switch (mStatus) { - case 2: - case 5: - return 1.0f - (field_0x5a / 5.0f); - case 0: - return 1.0f; + case STATUS_OPEN_e: + case STATUS_CLOSE_e: + var_f29 = field_0x5a; + var_f30 = 5.0f; + ratio = 1.0f - (var_f29 / var_f30); + break; + case STATUS_WAIT_e: + ratio = 1.0f; + break; default: - return 0.0f; + ratio = 0.0f; + break; } + + return ratio; } bool dMsgScrnExplain_c::checkTriggerA() { - return mDoCPd_c::getTrigA(PAD_1); + if (mDoCPd_c::getTrigA(PAD_1)) { + return true; + } else { + return false; + } } bool dMsgScrnExplain_c::checkTriggerB() { - return mDoCPd_c::getTrigB(PAD_1); + if (mDoCPd_c::getTrigB(PAD_1)) { + return true; + } else { + return false; + } } diff --git a/src/d/d_s_room.cpp b/src/d/d_s_room.cpp index 836a9a1a18..6a46024e97 100644 --- a/src/d/d_s_room.cpp +++ b/src/d/d_s_room.cpp @@ -9,6 +9,7 @@ #include "d/d_com_inf_game.h" #include "d/d_s_play.h" #include "d/d_s_room.h" +#include "d/d_bg_parts.h" #include "m_Do/m_Do_Reset.h" #include @@ -342,20 +343,32 @@ static int phase_1(room_of_scene_class* i_this) { static int phase_2(room_of_scene_class* i_this) { const char* arcName = setArcName(i_this); - int phase = dComIfG_syncStageRes(arcName); + int rt = dComIfG_syncStageRes(arcName); - if (phase < 0) { + if (rt < 0) { #if VERSION == VERSION_WII_USA_R0 dStage_escapeRestart(); #endif return cPhs_ERROR_e; } - if (phase != 0) { + JUT_ASSERT(750, rt >= 0); + if (rt != 0) { return cPhs_INIT_e; } int roomNo = fopScnM_GetParam(i_this); + + #if DEBUG + JKRExpHeap* block = dStage_roomControl_c::getMemoryBlock(roomNo); + OS_REPORT("*************************************** room%d <%x> <%x : %x>\n", + roomNo, + block, + block != NULL ? block->getTotalFreeSize() : 0, + block != NULL ? block->getFreeSize() : 0 + ); + #endif + if (dComIfGp_roomControl_getZoneNo(roomNo) < 0) { dComIfGp_roomControl_setZoneNo(roomNo, dComIfGs_createZone(roomNo)); } @@ -375,6 +388,17 @@ static int phase_2(room_of_scene_class* i_this) { old_heap = mDoExt_setCurrentHeap(heap); } + #if DEBUG + void* mpat = dComIfGp_roomControl_getStatusRoomDt(roomNo)->getMapPath(); + if (mpat != NULL) { + dBgp_c* bgp = new dBgp_c(); + JUT_ASSERT(786, bgp != NULL); + + bgp->create(roomNo, mpat); + dStage_roomControl_c::setBgp(roomNo, bgp); + } + #endif + if (old_heap != NULL) { mDoExt_setCurrentHeap(old_heap); } diff --git a/src/d/d_stage.cpp b/src/d/d_stage.cpp index b00b4ec845..22d3b156fb 100644 --- a/src/d/d_stage.cpp +++ b/src/d/d_stage.cpp @@ -12,6 +12,7 @@ #include "d/d_path.h" #include "d/d_save_HIO.h" #include "d/d_stage.h" +#include "d/d_bg_parts.h" #include "f_ap/f_ap_game.h" #include "f_op/f_op_kankyo_mng.h" #include "f_op/f_op_msg_mng.h" diff --git a/src/dolphin/os/__ppc_eabi_init.cpp b/src/dolphin/os/__ppc_eabi_init.cpp index 7ca9e181d9..b91519376c 100644 --- a/src/dolphin/os/__ppc_eabi_init.cpp +++ b/src/dolphin/os/__ppc_eabi_init.cpp @@ -2,7 +2,7 @@ // __ppc_eabi_init // -#include "dolphin/base/PPCArch.h" +#include #ifdef __cplusplus extern "C" { diff --git a/src/f_op/f_op_scene_req.cpp b/src/f_op/f_op_scene_req.cpp index 8c98a1693c..17dd3c4059 100644 --- a/src/f_op/f_op_scene_req.cpp +++ b/src/f_op/f_op_scene_req.cpp @@ -10,46 +10,28 @@ #include "f_pc/f_pc_executor.h" #include "f_pc/f_pc_manager.h" -static cPhs__Step fopScnRq_phase_ClearOverlap(scene_request_class* i_sceneReq) { - cPhs__Step rv; - if (fopOvlpM_ClearOfReq() == 1) { - rv = cPhs_NEXT_e; - } else { - rv = cPhs_INIT_e; - } - return rv; +static cPhs_Step fopScnRq_phase_ClearOverlap(scene_request_class* i_sceneReq) { + return fopOvlpM_ClearOfReq() == 1 ? cPhs_NEXT_e : cPhs_INIT_e; UNUSED(i_sceneReq); } -static cPhs__Step fopScnRq_phase_Execute(scene_request_class* i_sceneReq) { - return (cPhs__Step)fpcNdRq_Execute(&i_sceneReq->create_request); +static cPhs_Step fopScnRq_phase_Execute(scene_request_class* i_sceneReq) { + return fpcNdRq_Execute(&i_sceneReq->create_request); } -static cPhs__Step fopScnRq_phase_IsDoingOverlap(scene_request_class* i_sceneReq) { - cPhs__Step rv; - if (fopOvlpM_IsDoingReq() == 1) { - rv = cPhs_NEXT_e; - } else { - rv = cPhs_INIT_e; - } - return rv; +static cPhs_Step fopScnRq_phase_IsDoingOverlap(scene_request_class* i_sceneReq) { + return fopOvlpM_IsDoingReq() == 1 ? cPhs_NEXT_e : cPhs_INIT_e; UNUSED(i_sceneReq); } -static cPhs__Step fopScnRq_phase_IsDoneOverlap(scene_request_class* i_sceneReq) { - cPhs__Step rv; - if (fopOvlpM_IsDone() == 1) { - rv = cPhs_NEXT_e; - } else { - rv = cPhs_INIT_e; - } - return rv; +static cPhs_Step fopScnRq_phase_IsDoneOverlap(scene_request_class* i_sceneReq) { + return fopOvlpM_IsDone() == 1 ? cPhs_NEXT_e : cPhs_INIT_e; UNUSED(i_sceneReq); } static BOOL l_fopScnRq_IsUsingOfOverlap; -static cPhs__Step fopScnRq_phase_Done(scene_request_class* i_sceneReq) { +static cPhs_Step fopScnRq_phase_Done(scene_request_class* i_sceneReq) { if (i_sceneReq->create_request.parameters != 1) { scene_class* scene = (scene_class*)fpcM_SearchByID(i_sceneReq->create_request.creating_id); @@ -61,8 +43,8 @@ static cPhs__Step fopScnRq_phase_Done(scene_request_class* i_sceneReq) { return cPhs_NEXT_e; } -static cPhs__Step fopScnRq_Execute(scene_request_class* i_sceneReq) { - cPhs__Step phase_state = (cPhs__Step)cPhs_Do(&i_sceneReq->phase_request, i_sceneReq); +static cPhs_Step fopScnRq_Execute(scene_request_class* i_sceneReq) { + cPhs_Step phase_state = cPhs_Do(&i_sceneReq->phase_request, i_sceneReq); switch (phase_state) { case cPhs_NEXT_e: diff --git a/src/m_Do/m_Do_Reset.cpp b/src/m_Do/m_Do_Reset.cpp index 5d7fc36d88..fd478e51a1 100644 --- a/src/m_Do/m_Do_Reset.cpp +++ b/src/m_Do/m_Do_Reset.cpp @@ -8,14 +8,14 @@ #include "JSystem/JUtility/JUTGamePad.h" #include "JSystem/JUtility/JUTXfb.h" #include "SSystem/SComponent/c_API_controller_pad.h" -#include "dolphin/gx.h" +#include #include "m_Do/m_Do_audio.h" #include "m_Do/m_Do_DVDError.h" #include "m_Do/m_Do_ext.h" #include "m_Do/m_Do_MemCard.h" #if !PLATFORM_GCN -#include "revolution/os.h" +#include #endif static void my_OSCancelAlarmAll() {} diff --git a/src/m_Do/m_Do_lib.cpp b/src/m_Do/m_Do_lib.cpp index dc1b789d7a..8876beb12d 100644 --- a/src/m_Do/m_Do_lib.cpp +++ b/src/m_Do/m_Do_lib.cpp @@ -8,7 +8,7 @@ #include "JSystem/J3DGraphBase/J3DMatBlock.h" #include "SSystem/SComponent/c_math.h" #include "d/d_com_inf_game.h" -#include "dolphin/types.h" +#include u32 mDoLib_setResTimgObj(ResTIMG const* i_img, GXTexObj* o_texObj, u32 tlut_name, GXTlutObj* o_tlutObj) { diff --git a/src/m_Do/m_Do_machine.cpp b/src/m_Do/m_Do_machine.cpp index 30977fa34d..08ede9161a 100644 --- a/src/m_Do/m_Do_machine.cpp +++ b/src/m_Do/m_Do_machine.cpp @@ -29,8 +29,8 @@ #include "DynamicLink.h" #if !PLATFORM_GCN -#include "revolution/sc.h" -#include "revolution/wpad.h" +#include +#include #endif #if PLATFORM_GCN diff --git a/src/odemuexi2/DebuggerDriver.c b/src/odemuexi2/DebuggerDriver.c index d1c96b98b8..fef3707d92 100644 --- a/src/odemuexi2/DebuggerDriver.c +++ b/src/odemuexi2/DebuggerDriver.c @@ -1,5 +1,5 @@ #include -#include "dolphin/os.h" +#include typedef void (*MTRCallbackType)(int); diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/arcResourceAccessor.h b/src/revolution/homebuttonLib/nw4hbm/lyt/arcResourceAccessor.h index b3e3d43e43..ed5d472819 100644 --- a/src/revolution/homebuttonLib/nw4hbm/lyt/arcResourceAccessor.h +++ b/src/revolution/homebuttonLib/nw4hbm/lyt/arcResourceAccessor.h @@ -1,9 +1,9 @@ #ifndef NW4HBM_LYT_ARC_RESOURCE_ACCESSOR_H #define NW4HBM_LYT_ARC_RESOURCE_ACCESSOR_H -#include "revolution/types.h" +#include -#include "revolution/arc.h" +#include #include "../ut/Font.h" #include "../ut/LinkList.h" diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/common.h b/src/revolution/homebuttonLib/nw4hbm/lyt/common.h index 4f235556ef..c72da38682 100644 --- a/src/revolution/homebuttonLib/nw4hbm/lyt/common.h +++ b/src/revolution/homebuttonLib/nw4hbm/lyt/common.h @@ -1,8 +1,8 @@ #ifndef NW4HBM_LYT_COMMON_H #define NW4HBM_LYT_COMMON_H -#include "revolution/tpl.h" -#include "revolution/types.h" +#include +#include #include "../ut/Color.h" diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_types.h b/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_types.h index effcb1f1f8..7a9701e9c8 100644 --- a/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_types.h +++ b/src/revolution/homebuttonLib/nw4hbm/lyt/lyt_types.h @@ -1,7 +1,7 @@ #ifndef NW4HBM_LYT_TYPES_H #define NW4HBM_LYT_TYPES_H -#include "revolution/types.h" +#include #include diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/pane.h b/src/revolution/homebuttonLib/nw4hbm/lyt/pane.h index a8106c2ac9..64567bddd9 100644 --- a/src/revolution/homebuttonLib/nw4hbm/lyt/pane.h +++ b/src/revolution/homebuttonLib/nw4hbm/lyt/pane.h @@ -1,7 +1,7 @@ #ifndef NW4HBM_LYT_PANE_H #define NW4HBM_LYT_PANE_H -#include "revolution/types.h" +#include #include "../ut/Color.h" #include "../ut/LinkList.h" diff --git a/src/revolution/homebuttonLib/nw4hbm/lyt/resourceAccessor.h b/src/revolution/homebuttonLib/nw4hbm/lyt/resourceAccessor.h index 11bd30d2d7..0a20102a17 100644 --- a/src/revolution/homebuttonLib/nw4hbm/lyt/resourceAccessor.h +++ b/src/revolution/homebuttonLib/nw4hbm/lyt/resourceAccessor.h @@ -1,7 +1,7 @@ #ifndef NW4HBM_LYT_RESOURCE_ACCESSOR_H #define NW4HBM_LYT_RESOURCE_ACCESSOR_H -#include "revolution/types.h" +#include namespace nw4hbm { diff --git a/src/revolution/os/__start.c b/src/revolution/os/__start.c index 245e8e0027..e64be20cec 100644 --- a/src/revolution/os/__start.c +++ b/src/revolution/os/__start.c @@ -1,5 +1,5 @@ -#include "revolution/revolution.h" -#include "revolution/os/OSHardware.h" +#include +#include #include "__ppc_eabi_linker.h" extern void InitMetroTRK(); From 7cce77d9e1d30c690914e53e366af570466bd058 Mon Sep 17 00:00:00 2001 From: Jcw87 Date: Sun, 25 Jan 2026 21:17:59 -0800 Subject: [PATCH 3/5] d_map debug (#3066) --- config/RZDE01_00/symbols.txt | 4 +- config/RZDE01_02/symbols.txt | 4 +- config/RZDJ01/symbols.txt | 4 +- config/RZDP01/symbols.txt | 4 +- config/Shield/symbols.txt | 4 +- config/ShieldD/symbols.txt | 4 +- include/d/d_map.h | 142 ++++-- include/d/d_map_path.h | 96 +++- include/d/d_map_path_dmap.h | 4 +- include/d/d_stage.h | 4 +- include/d/d_tresure.h | 23 +- src/d/d_map.cpp | 930 +++++++++++++++++++++++++++-------- src/d/d_map_path.cpp | 45 +- src/d/d_tresure.cpp | 11 +- 14 files changed, 992 insertions(+), 287 deletions(-) diff --git a/config/RZDE01_00/symbols.txt b/config/RZDE01_00/symbols.txt index 3622853600..a6b7ac287f 100644 --- a/config/RZDE01_00/symbols.txt +++ b/config/RZDE01_00/symbols.txt @@ -28251,9 +28251,9 @@ lbl_8053AA90 = .sbss:0x8053AA90; // type:object size:0x1 data:byte lbl_8053AA91 = .sbss:0x8053AA91; // type:object size:0x1 data:byte it$98928 = .sbss:0x8053AA94; // type:object size:0x4 scope:local align:4 data:4byte lbl_8053AA98 = .sbss:0x8053AA98; // type:object size:0x8 data:byte -lbl_8053AAA0 = .sbss:0x8053AAA0; // type:object size:0x1 data:byte +mNowStayFloorNo__10dMapInfo_c = .sbss:0x8053AAA0; // type:object size:0x1 data:byte mNowStayRoomNo__10dMapInfo_c = .sbss:0x8053AAA4; // type:object size:0x4 scope:global align:4 data:4byte -lbl_8053AAA8 = .sbss:0x8053AAA8; // type:object size:0x1 data:byte +mNowStayFloorNoDecisionFlg__10dMapInfo_c = .sbss:0x8053AAA8; // type:object size:0x1 data:byte mLayerList__8dMpath_c = .sbss:0x8053AAAC; // type:object size:0x4 scope:global align:4 data:4byte mAllCenterX__8dMpath_c = .sbss:0x8053AAB0; // type:object size:0x4 scope:global align:4 data:float mAllCenterZ__8dMpath_c = .sbss:0x8053AAB4; // type:object size:0x4 scope:global align:4 data:float diff --git a/config/RZDE01_02/symbols.txt b/config/RZDE01_02/symbols.txt index 92a073689e..eadd9d0d4d 100644 --- a/config/RZDE01_02/symbols.txt +++ b/config/RZDE01_02/symbols.txt @@ -27776,9 +27776,9 @@ lbl_80520A98 = .sbss:0x80520A98; // type:object size:0x1 data:byte lbl_80520A99 = .sbss:0x80520A99; // type:object size:0x1 data:byte it$98965 = .sbss:0x80520A9C; // type:object size:0x4 scope:global align:4 data:4byte lbl_80520AA0 = .sbss:0x80520AA0; // type:object size:0x8 data:byte -lbl_80520AA8 = .sbss:0x80520AA8; // type:object size:0x1 data:byte +mNowStayFloorNo__10dMapInfo_c = .sbss:0x80520AA8; // type:object size:0x1 data:byte mNowStayRoomNo__10dMapInfo_c = .sbss:0x80520AAC; // type:object size:0x4 scope:global align:4 data:4byte -lbl_80520AB0 = .sbss:0x80520AB0; // type:object size:0x1 data:byte +mNowStayFloorNoDecisionFlg__10dMapInfo_c = .sbss:0x80520AB0; // type:object size:0x1 data:byte mLayerList__8dMpath_c = .sbss:0x80520AB4; // type:object size:0x4 scope:global align:4 data:4byte mAllCenterX__8dMpath_c = .sbss:0x80520AB8; // type:object size:0x4 scope:global align:4 data:float mAllCenterZ__8dMpath_c = .sbss:0x80520ABC; // type:object size:0x4 scope:global align:4 data:float diff --git a/config/RZDJ01/symbols.txt b/config/RZDJ01/symbols.txt index 00357054ee..c4fe2be4bc 100644 --- a/config/RZDJ01/symbols.txt +++ b/config/RZDJ01/symbols.txt @@ -27782,9 +27782,9 @@ lbl_8051E918 = .sbss:0x8051E918; // type:object size:0x1 data:byte lbl_8051E919 = .sbss:0x8051E919; // type:object size:0x1 data:byte it$98965 = .sbss:0x8051E91C; // type:object size:0x4 scope:local align:4 data:4byte lbl_8051E920 = .sbss:0x8051E920; // type:object size:0x8 data:byte -lbl_8051E928 = .sbss:0x8051E928; // type:object size:0x1 data:byte +mNowStayFloorNo__10dMapInfo_c = .sbss:0x8051E928; // type:object size:0x1 data:byte mNowStayRoomNo__10dMapInfo_c = .sbss:0x8051E92C; // type:object size:0x4 scope:global align:4 data:4byte -lbl_8051E930 = .sbss:0x8051E930; // type:object size:0x1 data:byte +mNowStayFloorNoDecisionFlg__10dMapInfo_c = .sbss:0x8051E930; // type:object size:0x1 data:byte mLayerList__8dMpath_c = .sbss:0x8051E934; // type:object size:0x4 scope:global align:4 data:4byte mAllCenterX__8dMpath_c = .sbss:0x8051E938; // type:object size:0x4 scope:global align:4 data:float mAllCenterZ__8dMpath_c = .sbss:0x8051E93C; // type:object size:0x4 scope:global align:4 data:float diff --git a/config/RZDP01/symbols.txt b/config/RZDP01/symbols.txt index f0e971c366..94dab2fdfd 100644 --- a/config/RZDP01/symbols.txt +++ b/config/RZDP01/symbols.txt @@ -27667,9 +27667,9 @@ lbl_80521258 = .sbss:0x80521258; // type:object size:0x1 data:byte lbl_80521259 = .sbss:0x80521259; // type:object size:0x1 data:byte it$98965 = .sbss:0x8052125C; // type:object size:0x4 scope:local align:4 data:4byte lbl_80521260 = .sbss:0x80521260; // type:object size:0x8 data:byte -lbl_80521268 = .sbss:0x80521268; // type:object size:0x1 data:byte +mNowStayFloorNo__10dMapInfo_c = .sbss:0x80521268; // type:object size:0x1 data:byte mNowStayRoomNo__10dMapInfo_c = .sbss:0x8052126C; // type:object size:0x4 scope:global align:4 data:4byte -lbl_80521270 = .sbss:0x80521270; // type:object size:0x1 data:byte +mNowStayFloorNoDecisionFlg__10dMapInfo_c = .sbss:0x80521270; // type:object size:0x1 data:byte mLayerList__8dMpath_c = .sbss:0x80521274; // type:object size:0x4 scope:global align:4 data:4byte mAllCenterX__8dMpath_c = .sbss:0x80521278; // type:object size:0x4 scope:global align:4 data:float mAllCenterZ__8dMpath_c = .sbss:0x8052127C; // type:object size:0x4 scope:global align:4 data:float diff --git a/config/Shield/symbols.txt b/config/Shield/symbols.txt index f79dab20f7..a80d8b0f8e 100644 --- a/config/Shield/symbols.txt +++ b/config/Shield/symbols.txt @@ -25340,9 +25340,9 @@ lbl_80508C71 = .sbss:0x80508C71; // type:object size:0x1 data:byte hash:0x7EAE93 @LOCAL@getDemoIDData__13dDemo_actor_cFPiPiPiPUsPUc@it@0 = .sbss:0x80508C74; // type:object size:0x4 scope:local data:4byte hash:0x7437A06F dhash:0xD35046F1 lbl_80508C78 = .sbss:0x80508C78; // type:object size:0x1 data:byte hash:0xCB27AC4D dhash:0x3A9725EA sDrawStage = .sbss:0x80508C80; // type:object size:0x4 scope:global data:4byte hash:0x32D6CDF2 -lbl_80508C88 = .sbss:0x80508C88; // type:object size:0x1 data:byte hash:0xBAF1AF73 dhash:0x8E0D0072 +mNowStayFloorNo__10dMapInfo_c = .sbss:0x80508C88; // type:object size:0x1 data:byte hash:0xBAF1AF73 dhash:0x8E0D0072 mNowStayRoomNo__10dMapInfo_c = .sbss:0x80508C8C; // type:object size:0x4 scope:global data:4byte hash:0xAB465BF4 dhash:0xA4A954B5 -lbl_80508C90 = .sbss:0x80508C90; // type:object size:0x1 data:byte hash:0x991A382E dhash:0x1A2339EF +mNowStayFloorNoDecisionFlg__10dMapInfo_c = .sbss:0x80508C90; // type:object size:0x1 data:byte hash:0x991A382E dhash:0x1A2339EF mLayerList__8dMpath_c = .sbss:0x80508C94; // type:object size:0x4 scope:global data:4byte hash:0x10631C09 dhash:0x89F28E31 mAllCenterX__8dMpath_c = .sbss:0x80508C98; // type:object size:0x4 scope:global align:4 data:float hash:0x4FEB5F9A dhash:0x67799F02 mAllCenterZ__8dMpath_c = .sbss:0x80508C9C; // type:object size:0x4 scope:global align:4 data:float hash:0x1B7B1558 dhash:0x67799F00 diff --git a/config/ShieldD/symbols.txt b/config/ShieldD/symbols.txt index 13235f88d5..d4bb01c40a 100644 --- a/config/ShieldD/symbols.txt +++ b/config/ShieldD/symbols.txt @@ -64390,9 +64390,9 @@ lbl_8074C6B3 = .sbss:0x8074C6B3; // type:object size:0x1 data:byte hash:0x7EAE93 lbl_8074C6B8 = .sbss:0x8074C6B8; // type:object size:0x8 data:byte hash:0xCB27AC4D dhash:0x3A9725EA lbl_8074C6C0 = .sbss:0x8074C6C0; // type:object size:0x1 data:byte hash:0x04D34995 mMySelfPointer__14dMapInfo_HIO_c = .sbss:0x8074C6C8; // type:object size:0x4 scope:global data:4byte hash:0x42174B45 dhash:0x5B0F4B00 -lbl_8074C6CC = .sbss:0x8074C6CC; // type:object size:0x1 data:byte hash:0xBAF1AF73 dhash:0x8E0D0072 +mNowStayFloorNo__10dMapInfo_c = .sbss:0x8074C6CC; // type:object size:0x1 data:byte hash:0xBAF1AF73 dhash:0x8E0D0072 mNowStayRoomNo__10dMapInfo_c = .sbss:0x8074C6D0; // type:object size:0x4 scope:global data:4byte hash:0xAB465BF4 dhash:0xA4A954B5 -lbl_8074C6D4 = .sbss:0x8074C6D4; // type:object size:0x1 data:byte hash:0x991A382E dhash:0x1A2339EF +mNowStayFloorNoDecisionFlg__10dMapInfo_c = .sbss:0x8074C6D4; // type:object size:0x1 data:byte hash:0x991A382E dhash:0x1A2339EF mLayerList__8dMpath_c = .sbss:0x8074C6D8; // type:object size:0x4 scope:global data:4byte hash:0x10631C09 dhash:0x89F28E31 mAllCenterX__8dMpath_c = .sbss:0x8074C6DC; // type:object size:0x4 scope:global align:4 data:float hash:0x4FEB5F9A dhash:0x67799F02 mAllCenterZ__8dMpath_c = .sbss:0x8074C6E0; // type:object size:0x4 scope:global align:4 data:float hash:0x1B7B1558 dhash:0x67799F00 diff --git a/include/d/d_map.h b/include/d/d_map.h index 0b055dd7a4..bbd21787ca 100644 --- a/include/d/d_map.h +++ b/include/d/d_map.h @@ -4,33 +4,45 @@ #include "d/d_map_path_dmap.h" #include "JSystem/JHostIO/JORReflexible.h" -struct dMap_HIO_prm_res_src_s { - -}; - -class dMap_HIO_list_c : public dMpath_HIO_n::hioList_c { -public: - virtual void copySrcToHio(); - virtual void copyHioToDst(); - virtual void copyBufToHio(const char*); -}; - -class dMap_HIO_c : public dMpath_HIO_file_base_c { -public: - dMap_HIO_c(); - virtual void listenPropertyEvent(const JORPropertyEvent*); - virtual void genMessage(JORMContext*); - virtual u32 addString(char*, u32, u32); - virtual u32 addData(char*, u32, u32); - virtual void copyReadBufToData(const char*, s32); - virtual u32 addStringBinary(char*, u32, u32); - - /* 0x04 */ u8 field_0x4[0x08 - 0x04]; - /* 0x08 */ dMap_HIO_list_c mList; - - static dMap_HIO_c* mMySelfPointer; - static dMpath_HIO_n::list_s l_list; - static dMap_HIO_prm_res_src_s* m_res_src_p; +struct dMap_HIO_prm_other_s { + /* 0x00 */ u8 field_0x0; + /* 0x04 */ f32 field_0x4; + /* 0x08 */ u8 field_0x8; + /* 0x0C */ f32 field_0xc; + /* 0x10 */ u8 field_0x10; + /* 0x11 */ u8 field_0x11; + /* 0x12 */ u8 field_0x12; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ f32 field_0x18; + /* 0x1C */ u8 field_0x1c; + /* 0x1D */ u8 field_0x1d; + /* 0x1E */ u8 field_0x1e; + /* 0x1F */ u8 field_0x1f; + /* 0x20 */ u8 field_0x20; + /* 0x21 */ u8 field_0x21; + /* 0x22 */ u8 field_0x22; + /* 0x23 */ u8 field_0x23; + /* 0x24 */ u8 field_0x24[0x2C - 0x24]; + /* 0x2C */ u8 field_0x2c; + /* 0x30 */ f32 field_0x30; + /* 0x34 */ u8 field_0x34; + /* 0x35 */ u8 field_0x35; + /* 0x36 */ s16 field_0x36; + /* 0x38 */ u8 field_0x38; + /* 0x38 */ s16 field_0x3a; + /* 0x3C */ u8 field_0x3c; + /* 0x3D */ u8 field_0x3d; + /* 0x3E */ s16 field_0x3e; + /* 0x40 */ u8 field_0x40; + /* 0x41 */ u8 field_0x41[0x44 - 0x41]; + /* 0x44 */ f32 field_0x44[17]; + /* 0x88 */ u8 field_0x88; + /* 0x89 */ u8 field_0x89; + /* 0x8A */ u8 field_0x8a; + /* 0x8C */ f32 field_0x8c[17]; + /* 0xD0 */ u8 field_0xd0[0x114 - 0xD0]; + /* 0x114 */ dTres_c::typeGroupData_c field_0x114[1]; + /* 0x130 */ u8 field_0x130[0x2f0 - 0x130]; }; struct dMap_prm_res_s { @@ -63,8 +75,19 @@ struct dMap_prm_res_s { /* 0x1B8 */ f32 cursor_size; }; +struct dMap_prm_hio_s { + /* 0x00 */ GXColor field_0x0[51]; + /* 0xCC */ u8 field_0xcc[0x24]; + /* 0xF0 */ dMap_HIO_prm_other_s field_0xf0; +}; + +struct dMap_HIO_prm_res_src_s { + static const u8 m_other[0x2f0]; +}; + struct dMap_HIO_prm_res_dst_s { static dMap_prm_res_s* m_res; + static dMap_HIO_prm_other_s m_other; }; class renderingAmap_c : public renderingPlusDoorAndCursor_c { @@ -104,7 +127,11 @@ public: virtual void setAmapPaletteColor(int, u8, u8, u8, u8) = 0; virtual bool isSpecialOutline() = 0; +#if DEBUG + static const int PALETTE_NUMBER = 51; +#else static const int PALETTE_NUMBER = 50; +#endif private: /* 0x34 */ s32 m_outSideBlackLineCnt; @@ -130,7 +157,12 @@ public: void _move(f32, f32, int, f32); void _draw(); - virtual ~dMap_c() { _remove(); } + virtual ~dMap_c() { +#if DEBUG + m_mySelfPointer = NULL; +#endif + _remove(); + } virtual bool isDrawType(int); virtual const GXColor* getColor(int); virtual bool isRendAllRoom() const; @@ -143,6 +175,11 @@ public: virtual void setAmapPaletteColor(int, u8, u8, u8, u8); virtual bool isSpecialOutline(); +#if DEBUG + virtual bool isSwitch(const dDrawPath_c::group_class*); + virtual void beforeDrawPath(); +#endif + bool isDraw() const { return renderingDAmap_c::isDraw(); } ResTIMG* getResTIMGPointer() { return mResTIMG; } @@ -150,7 +187,7 @@ public: f32 getPackPlusZ() { return mPackPlusZ; } f32 getPackZ() const { return mPackZ; } f32 getTexelPerCm() const { return 1.0f / field_0x58; } - u16 getTexSizeY() const { return mTexSizeH; } + u16 getTexSizeY() const { return mTexSizeY; } f32 getRightEdgePlus() { return mRightEdgePlus; } f32 getPackX() const { return mPackX; } int getStayRoomNo() const { return mStayRoomNo; } @@ -173,8 +210,8 @@ private: /* 0x6C */ f32 mRightEdgePlus; /* 0x70 */ f32 mTopEdgePlus; /* 0x74 */ int field_0x74; - /* 0x78 */ u16 mTexSizeW; - /* 0x7A */ u16 mTexSizeH; + /* 0x78 */ u16 mTexSizeX; + /* 0x7A */ u16 mTexSizeY; /* 0x7C */ int mStayRoomNo; /* 0x80 */ int field_0x80; /* 0x84 */ int field_0x84; @@ -184,17 +221,44 @@ private: /* 0x8E */ u8 field_0x8e; /* 0x8F */ u8 field_0x8f; /* 0x90 */ u8 field_0x90; + /* 0x91 */ u8 field_0x91; }; // Size: 0x94 -#if DEBUG -class dMpath_RGBA_c { +class dMap_HIO_list_c : public dMpath_HIO_n::hioList_c { public: - GXColor getGXColor() { return mColor; } - - GXColor mColor; - - virtual ~dMpath_RGBA_c() {} + virtual void copySrcToHio(); + virtual void copyHioToDst(); + virtual void copyBufToHio(const char*); +}; + +class dMap_HIO_c : public dMpath_HIO_file_base_c { +public: + dMap_HIO_c(); + virtual void listenPropertyEvent(const JORPropertyEvent*); + virtual void genMessage(JORMContext*); + virtual u32 addString(char* param_1, u32 param_2, u32 param_3) { return mList.addString(param_1, param_2, param_3); } + virtual u32 addData(char* param_1, u32 param_2, u32 param_3) { + UNUSED(param_2); + UNUSED(param_3); + memcpy(param_1, dMap_HIO_prm_res_dst_s::m_res, 0x1bc); + return 0x1bc; + } + virtual void copyReadBufToData(const char* param_1, s32 param_2) { + UNUSED(param_2); + mList.copyBufToHio(param_1); + } + virtual u32 addStringBinary(char* param_1, u32 param_2, u32 param_3) { + return mList.addStringBinary(param_1, param_2, param_3); + } + + /* 0x04 */ u8 field_0x4[0x08 - 0x04]; + /* 0x08 */ dMap_HIO_list_c mList; + + static dMap_HIO_c* mMySelfPointer; + static const u8 l_listData[]; + static const dMpath_HIO_n::list_s l_list; + static dMap_prm_res_s* m_res_src_p; + static dMap_prm_hio_s m_prm_hio; }; -#endif #endif /* D_MAP_D_MAP_H */ diff --git a/include/d/d_map_path.h b/include/d/d_map_path.h index d461783150..a082a3c2e7 100644 --- a/include/d/d_map_path.h +++ b/include/d/d_map_path.h @@ -4,22 +4,50 @@ #include "d/d_drawlist.h" #include "JSystem/JHostIO/JORMContext.h" +struct dMpath_RGB5A3_s { + u16 color; +}; + +namespace dMpath_ColorCnv_n { + void convertRGB5A3_To_GXColor(_GXColor&, const dMpath_RGB5A3_s&); +} + +struct dMpath_RGB5A3_palDt_s { + /* 0x0 */ dMpath_RGB5A3_s field_0x0; + /* 0x2 */ dMpath_RGB5A3_s field_0x2; + /* 0x4 */ dMpath_RGB5A3_s field_0x4; + /* 0x6 */ dMpath_RGB5A3_s field_0x6; +}; + +class dMpath_RGBA_c { +public: + GXColor mColor; + + dMpath_RGBA_c() {} + virtual ~dMpath_RGBA_c() {} + GXColor getGXColor() const { return mColor; } + void setGXColor(const GXColor&); + void setRGB5A3_palDt(const dMpath_RGB5A3_palDt_s&); +}; + namespace dMpath_HIO_n { struct list_s { - /* 0x00 */ void* field_0x0; + /* 0x00 */ const void* field_0x0; /* 0x04 */ u32 field_0x4; }; - class hioList_c { - public: - /* 0x00 */ list_s mList; + struct resData_s {}; + struct hioList_s : public list_s, resData_s {}; + // RTTI does not match debug + class hioList_c : public hioList_s { + public: virtual ~hioList_c() {} virtual void copySrcToHio() = 0; virtual void copyHioToDst() = 0; virtual void copyBufToHio(const char*) = 0; - void set(const list_s& param_1) { mList = param_1; } + void set(const list_s& param_1) { *static_cast(this) = param_1; } void gen(JORMContext*); void update(JORMContext*); u32 addString(char*, u32, u32) const; @@ -44,6 +72,42 @@ public: bool readBinaryFile(const char*); }; +class dMpath_RGB5A3_c { +public: + dMpath_RGB5A3_s mColor; + + dMpath_RGB5A3_c(GXColor c) { set(c); } + virtual ~dMpath_RGB5A3_c() {} + void set(u8 r, u8 g, u8 b, u8 a) { + u32 color; + if (a >= 224) { + color = (r & 0xf8) << 7 | (g & 0xf8) << 2 | (b & 0xf8) >> 3 | 0x8000; + } else { + color = (r & 0xf0) << 4 | g & 0xf0 | (b & 0xf0) >> 4 | (a & 0xe0) << 7; + } + mColor.color = color; + } + void set(const GXColor& c) { set(c.r, c.g, c.b, c.a); } + const dMpath_RGB5A3_s& getRGB5A3() const { return mColor; } +}; + +class dMpath_RGB5A3_palDt_c { +public: + dMpath_RGB5A3_palDt_s field_0x0; + + dMpath_RGB5A3_palDt_c() {} + virtual ~dMpath_RGB5A3_palDt_c() {} + dMpath_RGB5A3_palDt_s& getRGB5A3_palDt_s() { return field_0x0; } + + void setGXColor(const GXColor& c) { + dMpath_RGB5A3_c rgb5a3(c); + field_0x0.field_0x0 = rgb5a3.getRGB5A3(); + field_0x0.field_0x2 = rgb5a3.getRGB5A3(); + field_0x0.field_0x4 = rgb5a3.getRGB5A3(); + field_0x0.field_0x6 = rgb5a3.getRGB5A3(); + } +}; + class dDrawPath_c : public dDlst_base_c { public: struct line_class { @@ -176,19 +240,24 @@ public: struct dMpath_n { class dTexObjAggregate_c { public: + static const int TEX_OBJ_NUMBER = 7; + void create(); void remove(); ~dTexObjAggregate_c() { remove(); }; - GXTexObj* getTexObjPointer(int i_no) { return mp_texObj[i_no]; } + GXTexObj* getTexObjPointer(int i_no) { + JUT_ASSERT(44, i_no >= 0 && i_no < TEX_OBJ_NUMBER); + return mp_texObj[i_no]; + } dTexObjAggregate_c() { - for (int i = 0; i < 7; i++) { + for (int i = 0; i < TEX_OBJ_NUMBER; i++) { mp_texObj[i] = NULL; } } - /* 0x0 */ GXTexObj* mp_texObj[7]; + /* 0x0 */ GXTexObj* mp_texObj[TEX_OBJ_NUMBER]; }; static dTexObjAggregate_c m_texObjAgg; @@ -196,15 +265,4 @@ struct dMpath_n { STATIC_ASSERT(sizeof(dMpath_n::dTexObjAggregate_c) == 28); -struct dMpath_RGB5A3_s { - u16 color; -}; - -struct dMpath_RGB5A3_palDt_s { - /* 0x0 */ dMpath_RGB5A3_s field_0x0; - /* 0x2 */ dMpath_RGB5A3_s field_0x2; - /* 0x4 */ dMpath_RGB5A3_s field_0x4; - /* 0x6 */ dMpath_RGB5A3_s field_0x6; -}; - #endif /* D_MAP_D_MAP_PATH_H */ diff --git a/include/d/d_map_path_dmap.h b/include/d/d_map_path_dmap.h index 9176860b49..c66d4861f8 100644 --- a/include/d/d_map_path_dmap.h +++ b/include/d/d_map_path_dmap.h @@ -74,9 +74,9 @@ public: static void remove(); static s8 getNowStayFloorNo() { - JUT_ASSERT(0, mNowStayFloorNoDecisionFlg); - s8 floor_no = 0; + JUT_ASSERT(195, mNowStayFloorNoDecisionFlg); + if (mNowStayFloorNoDecisionFlg) { floor_no = mNowStayFloorNo; } diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 87c6cec2bb..9d9c1b3633 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -1543,11 +1543,11 @@ inline u16 dStage_FileList_dt_GetMsg(dStage_FileList_dt_c* p_fList) { return p_fList->mMsg; } -inline f32 dStage_FileList2_dt_GetLeftRmX(dStage_FileList2_dt_c* p_fList2) { +inline f32 dStage_FileList2_dt_GetLeftRmX(const dStage_FileList2_dt_c* p_fList2) { return p_fList2->mLeftRmX; } -inline f32 dStage_FileList2_dt_GetRightRmX(dStage_FileList2_dt_c* p_fList2) { +inline f32 dStage_FileList2_dt_GetRightRmX(const dStage_FileList2_dt_c* p_fList2) { return p_fList2->mRightRmX; } diff --git a/include/d/d_tresure.h b/include/d/d_tresure.h index 73375e461f..53315bacdc 100644 --- a/include/d/d_tresure.h +++ b/include/d/d_tresure.h @@ -5,6 +5,8 @@ class dTres_c { public: + static const int TYPE_GROUP_ENUM_NUMBER = 17; + struct data_s { /* 0x00 */ u8 mNo; /* 0x01 */ s8 mRoomNo; @@ -21,18 +23,25 @@ public: public: data_s* getDataPointer() { return (data_s*)this; } const data_s* getConstDataPointer() const { return (data_s*)this; } - typeGroupData_c* getNextDataPointer() const { return mNextData; } - void setNextDataPointer(typeGroupData_c* data) { mNextData = data; } - void setTypeGroupNo(u8 no) { mTypeGroupNo = no; } u8 getNo() const { return mNo; } + void setNo(u8 no) { mNo = no; } + s8 getRoomNo() const { return mRoomNo; } + void setRoomNo(s8 roomNo) { mRoomNo = roomNo; } u8 getStatus() const { return mStatus; } void setStatus(u8 status) { mStatus = status; } - void setRoomNo(s8 roomNo) { mRoomNo = roomNo; } - s8 getRoomNo() const { return mRoomNo; } + void setArg1(u8 arg1) { mArg1 = arg1; } + const Vec* getPos() const { return &mPos; } void setPos(const Vec& pos) { mPos = pos; } u8 getSwBit() const { return mSwBit; } - const Vec* getPos() const { return &mPos; } + void setSwBit(u8 swBit) { mSwBit = swBit; } + void setType(u8 type) { mType = type; } + void setArg2(u8 arg2) { mArg2 = arg2; } int getAngleY() const { return mAngleY; } + void setAngleY(s8 angleY) { mAngleY = angleY; } + typeGroupData_c* getNextDataPointer() const { return mNextData; } + void setNextDataPointer(typeGroupData_c* data) { mNextData = data; } + u8 getTypeGroupNo() { return mTypeGroupNo; } + void setTypeGroupNo(u8 no) { mTypeGroupNo = no; } /* 0x14 */ typeGroupData_c* mNextData; /* 0x18 */ u8 mTypeGroupNo; @@ -63,7 +72,7 @@ public: static typeGroupData_c* getNextData(dTres_c::typeGroupData_c*); static typeGroupData_c* getNextData(dTres_c::typeGroupData_c const*); static void setPosition(int, u8, Vec const*, int); - static int getTypeGroupNoToType(u8); + static u8 getTypeGroupNoToType(u8); static u8 getTypeToTypeGroupNo(u8); static int getTypeGroupNumber(int index) { diff --git a/src/d/d_map.cpp b/src/d/d_map.cpp index 783b83fcae..6678e6d9af 100644 --- a/src/d/d_map.cpp +++ b/src/d/d_map.cpp @@ -11,11 +11,10 @@ #include "JSystem/JUtility/JUTTexture.h" #include "SSystem/SComponent/c_counter.h" #include "SSystem/SComponent/c_math.h" +#include "d/actor/d_a_player.h" #include "d/d_com_inf_game.h" #if DEBUG -dMap_HIO_c g_dMap_HIO; - void dMap_HIO_c::genMessage(JORMContext* mctx) { mctx->genLabel("エリアマップ パスマップ 調整項目", 0); mctx->genLabel("初期化等は 下位フォルダ[パレット]込み です", 0); @@ -39,101 +38,299 @@ void dMap_HIO_c::listenPropertyEvent(const JORPropertyEvent* evt) { // DEBUG NONMATCHING JORReflexible::listenPropertyEvent(evt); - if (dMap_HIO_prm_res_dst_s::m_res != NULL) { - JORFile jorFile; - switch ((u32)evt->id) { - case 0x4000002: - if (dMap_c::m_mySelfPointer != NULL) { - f32 packX, packZ; - dMap_c::m_mySelfPointer->getPack(dMap_c::m_mySelfPointer->getStayRoomNo(), &packX, &packZ); - OS_REPORT("mNowCenterRoomNo<%d>packX<%11.3f>packZ<%11.3f>\n", packX, packZ, dMap_c::m_mySelfPointer->getStayRoomNo()); - } - break; + if (!dMap_HIO_prm_res_dst_s::m_res) { + return; + } - case 0x4000004: - writeHostioTextFile(NULL); - break; - - case 0x4000005: - writeBinaryTextFile(NULL); - break; - - case 0x4000006: - writeBinaryFile(NULL); - break; - - case 0x4000007: { - readBinaryFile(NULL); - JORMContext* ctx_p = attachJORMContext(8); - ctx_p->startUpdateNode(this); - mList.update(ctx_p); - ctx_p->endUpdateNode(); - releaseJORMContext(ctx_p); - break; + JORFile jorFile; + JORMContext* ctx_p; + switch ((u32)evt->id) { + case 0x4000002: + if (dMap_c::m_mySelfPointer != NULL) { + f32 packX, packZ; + dMap_c::m_mySelfPointer->getPack(dMap_c::m_mySelfPointer->getStayRoomNo(), &packX, &packZ); + OS_REPORT("mNowCenterRoomNo<%d>packX<%11.3f>packZ<%11.3f>\n", packX, packZ, dMap_c::m_mySelfPointer->getStayRoomNo()); } + break; - case 0x4000003: { - JORMContext* ctx_p = attachJORMContext(8); - ctx_p->startUpdateNode(this); - mList.update(ctx_p); - ctx_p->endUpdateNode(); - releaseJORMContext(ctx_p); - break; - } + case 0x4000004: + writeHostioTextFile(NULL); + break; - case 0x4000008: - binaryDump(dMap_HIO_prm_res_dst_s::m_res, 0x1BC); - break; + case 0x4000005: + writeBinaryTextFile(NULL); + break; - case 0x4000009: - if (dMap_c::m_mySelfPointer != NULL) { - f32 stageTexelMinZ = -3.4028235e38f; - f32 stageTexelMaxZ = -3.4028235e38f; - for (int i = 0; i < 64; i++) { - dStage_FileList2_dt_c* fileList2_p = dStage_roomControl_c::getFileList2(i); - if (fileList2_p != NULL) { - f32 texelMaxZ = dStage_FileList2_dt_GetInnerRmZ(fileList2_p); - f32 frontRmZ = dStage_FileList2_dt_GetFrontRmZ(fileList2_p); - f32 cmPerTexel = dMap_c::m_mySelfPointer->getCmPerTexel(); - f32 texelMinZ = (dMap_c::m_mySelfPointer->getCenterZ() - texelMaxZ) / cmPerTexel; - texelMaxZ = dMap_c::m_mySelfPointer->getCmPerTexel(); - texelMaxZ = (frontRmZ - dMap_c::m_mySelfPointer->getCenterZ()) / texelMaxZ; - OS_REPORT("<%2d>texelMinZ<%10.3f>texelMaxZ<%10.3f>\n", texelMinZ, texelMaxZ, i); + case 0x4000006: + writeBinaryFile(NULL); + break; - if (texelMinZ > stageTexelMinZ) { - stageTexelMinZ = texelMinZ; - } + case 0x4000007: { + readBinaryFile(NULL); + ctx_p = attachJORMContext(8); + ctx_p->startUpdateNode(this); + mList.update(ctx_p); + ctx_p->endUpdateNode(); + releaseJORMContext(ctx_p); + break; + } - if (texelMaxZ > stageTexelMaxZ) { - stageTexelMaxZ = texelMaxZ; - } + case 0x4000003: { + mList.copySrcToHio(); + ctx_p = attachJORMContext(8); + ctx_p->startUpdateNode(this); + mList.update(ctx_p); + ctx_p->endUpdateNode(); + releaseJORMContext(ctx_p); + break; + } + + case 0x4000008: + binaryDump(dMap_HIO_prm_res_dst_s::m_res, 0x1BC); + break; + + case 0x4000009: + if (dMap_c::m_mySelfPointer != NULL) { + f32 stageTexelMinZ = -3.4028235e38f; + f32 stageTexelMaxZ = -3.4028235e38f; + for (int i = 0; i < 64; i++) { + dStage_FileList2_dt_c* fileList2_p = dStage_roomControl_c::getFileList2(i); + if (fileList2_p != NULL) { + f32 innerRmZ = dStage_FileList2_dt_GetInnerRmZ(fileList2_p); + f32 frontRmZ = dStage_FileList2_dt_GetFrontRmZ(fileList2_p); + f32 texelMinZ = (dMap_c::m_mySelfPointer->getCenterZ() - innerRmZ) / dMap_c::m_mySelfPointer->getCmPerTexel(); + f32 texelMaxZ = (frontRmZ - dMap_c::m_mySelfPointer->getCenterZ()) / dMap_c::m_mySelfPointer->getCmPerTexel(); + OS_REPORT("<%2d>texelMinZ<%10.3f>texelMaxZ<%10.3f>\n", i, texelMinZ, texelMaxZ); + + if (texelMinZ > stageTexelMinZ) { + stageTexelMinZ = texelMinZ; + } + + if (texelMaxZ > stageTexelMaxZ) { + stageTexelMaxZ = texelMaxZ; } } - - OS_REPORT("stageTexelMinZ<%10.3f>\n", stageTexelMinZ); } - } + + OS_REPORT("stageTexelMinZ<%10.3f>\n", stageTexelMinZ); + } + } + mList.copyHioToDst(); +} + +static void dummy() { + DEAD_STRING("リソース[パレット]"); + DEAD_STRING("■背景■"); + DEAD_STRING("■背景[アイコン]■"); + DEAD_STRING("・背景<アイコン>"); + DEAD_STRING("■背景[ダンジョン]■"); + DEAD_STRING("・背景<ダンジョン時>"); + DEAD_STRING("■背景[フィールド]■"); + DEAD_STRING("・背景<フィールド時>"); + DEAD_STRING("■未到達部屋■"); + DEAD_STRING("・黒<奈落>"); + DEAD_STRING("・入禁<進入禁止>"); + DEAD_STRING("・ライン<領域色には含まれません>"); + DEAD_STRING("■到達部屋■"); + DEAD_STRING("■プレイヤー在籍部屋■"); + DEAD_STRING("■ドア <プレイヤー在籍部屋>■"); + DEAD_STRING("■ドア <プレイヤー在籍部屋以外>■"); + DEAD_STRING("■宝箱■"); + DEAD_STRING("・本体<プレイヤー在籍部屋以外>"); + DEAD_STRING("■プレイヤーカーソル■"); + DEAD_STRING("・カーソル"); + DEAD_STRING("■入室位置■"); + DEAD_STRING("・入室位置"); + DEAD_STRING("・入室位置<プレイヤー在籍部屋以外>"); + DEAD_STRING("・鍵[本体]"); + DEAD_STRING("■ボス■"); + DEAD_STRING("・ボス[本体]"); + DEAD_STRING("・NPC[本体]"); + DEAD_STRING("■目的地■"); + DEAD_STRING("・目的地[本体]"); + DEAD_STRING("■ステージ出入り口■"); + DEAD_STRING("■ステージ出入り口LV8■"); + DEAD_STRING("・はぐれ天空人[本体]"); + DEAD_STRING("■ナイトストーカ結界■"); + DEAD_STRING("■ナイトストーカ結界<実際にはこのパレット色は未使用>■"); + DEAD_STRING("・境界線0"); + DEAD_STRING("・境界線1"); + DEAD_STRING("■フィールドマップ時縁取り■"); + DEAD_STRING("パレット"); + DEAD_STRING("リソース[パレット以外]"); + DEAD_STRING("■枠線の縁取り■\r\n"); + DEAD_STRING("・枠線の縁取りの線の本数"); + DEAD_STRING("・枠線の縁取りの線の太さ"); + DEAD_STRING(" 枠線に対しての加算値になっています。ただし0=描画無し"); + DEAD_STRING(" 値は1/6ピクセル単位です"); + DEAD_STRING(" 外枠は自分の居る場所が12それ以外は6です"); + DEAD_STRING("↓下になるほど描画優先順位が高くなります"); + DEAD_STRING("■フィールドマップの縁取り0■"); + DEAD_STRING("■フィールドマップの縁取り1■"); + DEAD_STRING("■フィールドマップの縁取り2■"); + DEAD_STRING("■フィールドマップの縁取り3■"); + DEAD_STRING("■カーソルの大きさ調節■"); + DEAD_STRING("みかけ上のドットの大きさを指定できます"); + DEAD_STRING("mCursorSize"); + DEAD_STRING("■ナイトストーカー結界■"); + DEAD_STRING("■ナイトストーカー結界1"); + DEAD_STRING("点滅周期"); + DEAD_STRING("■ナイトストーカー結界2"); + DEAD_STRING("■■エリアマップ関連[リソース以外]■■"); + DEAD_STRING("■スイッチ地形の強制ONOFF■\r\n"); + DEAD_STRING("・ONで↓有効"); + DEAD_STRING("・強制的にON,OFF"); + DEAD_STRING("■地形位置確認用■\r\n"); + DEAD_STRING("・ONで有効"); + DEAD_STRING("■マップOFFSET変更■\r\n"); + DEAD_STRING("■テスト■\r\n"); + DEAD_STRING("■フィールド屋外部屋切り替えスムーススクロール■\r\n"); + DEAD_STRING("・以下フレーム数\r\n"); + DEAD_STRING("・ウエイト"); + DEAD_STRING("・縁取り消失"); + DEAD_STRING("・スクロール"); + DEAD_STRING("・縁取り出現"); + DEAD_STRING("■デバック用全部屋表示スイッチ■\r\n"); + DEAD_STRING("ONで有効"); + DEAD_STRING("■マップの表示範囲調整■"); + DEAD_STRING("・フィールドマップ時"); + DEAD_STRING("表示範囲を調整するときはONにする"); + DEAD_STRING("・ダンジョンマップ時"); + DEAD_STRING("■マップデバック用■"); + DEAD_STRING("マップの中心をプレイヤーの座標にする"); + DEAD_STRING("■マップサイズチェック用■"); + DEAD_STRING("ラインの太さ"); + DEAD_STRING("■ステージサイズチェック用■"); + DEAD_STRING("■部屋サイズチェック用■"); + DEAD_STRING("■アイコンサイズ■"); + DEAD_STRING("ダンジョン出入り口"); + DEAD_STRING("小さな鍵"); + DEAD_STRING("ダンジョン出入口LV8"); + DEAD_STRING("あやつり石像"); + DEAD_STRING("はぐれ天空人"); + DEAD_STRING("部屋単独描画チェック"); + DEAD_STRING("部屋番号"); + DEAD_STRING("■アイコン優先順位チェック■"); + DEAD_STRING("ステージ出入り口"); + DEAD_STRING("Lv8出入り口"); + DEAD_STRING(""); + DEAD_STRING("・床1"); + DEAD_STRING("・床2"); + DEAD_STRING("・水"); + DEAD_STRING("・毒"); + DEAD_STRING("・炎"); + DEAD_STRING("・背景"); + DEAD_STRING("・本体"); + DEAD_STRING("■鍵■"); + DEAD_STRING("■NPC■"); + DEAD_STRING("・色1"); + DEAD_STRING("・色2"); + DEAD_STRING("・黒縁0"); + DEAD_STRING("・黒縁1"); + DEAD_STRING("・黒縁2"); + DEAD_STRING("・黒縁3"); + DEAD_STRING("0"); + DEAD_STRING("1"); + DEAD_STRING("2"); + DEAD_STRING("3"); + DEAD_STRING("・線1"); + DEAD_STRING("線太さ"); + DEAD_STRING("・色0"); + DEAD_STRING("・線2"); + DEAD_STRING("太さ"); + DEAD_STRING("・right"); + DEAD_STRING("・top"); + DEAD_STRING("宝箱"); + DEAD_STRING("ボス"); + DEAD_STRING("光の雫"); + DEAD_STRING("目的地"); + DEAD_STRING("NPC(猿)"); + DEAD_STRING("馬車"); + DEAD_STRING("鉄玉"); + DEAD_STRING("光の玉"); + DEAD_STRING("雪男"); + DEAD_STRING("雪女"); +} + +dMap_prm_hio_s dMap_HIO_c::m_prm_hio; +dMap_HIO_c g_dMap_HIO; +dMap_HIO_prm_other_s dMap_HIO_prm_res_dst_s::m_other; +dMap_HIO_c* dMap_HIO_c::mMySelfPointer; +dMap_prm_res_s* dMap_HIO_c::m_res_src_p; +dMap_c* dMap_c::m_mySelfPointer; + +const u8 dMap_HIO_prm_res_src_s::m_other[0x2f0] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x05, 0x14, + 0x05, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x9C, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x28, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, + 0x00, 0x00, 0x00, 0x00, 0x41, 0x40, 0x00, 0x00, 0x41, 0x40, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, + 0x41, 0x40, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x41, 0x80, 0x00, 0x00, 0x41, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x41, 0x40, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, + 0x41, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, + 0x41, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +const dMpath_HIO_n::list_s dMap_HIO_c::l_list = {dMap_HIO_c::l_listData, 0xb1}; + +void dMap_HIO_list_c::copySrcToHio() { + if (!dMap_HIO_c::m_res_src_p) { + return; + } + + dMpath_RGBA_c color; + for (int i = 0; i < 51; i++) { + color.setRGB5A3_palDt(dMap_HIO_c::m_res_src_p->palette_data[i]); + dMap_HIO_c::m_prm_hio.field_0x0[i] = color.getGXColor(); + } + memcpy(dMap_HIO_c::m_prm_hio.field_0xcc, &dMap_HIO_c::m_res_src_p->field_0x198, 0x24); + memcpy(&dMap_HIO_c::m_prm_hio.field_0xf0, &dMap_HIO_prm_res_src_s::m_other, 0x2f0); +} + +void dMap_HIO_list_c::copyHioToDst() { + if (!dMap_HIO_prm_res_dst_s::m_res) { + return; + } + + dMpath_RGB5A3_palDt_c pal_data; + for (int i = 0; i < 51; i++) { + pal_data.setGXColor(dMap_HIO_c::m_prm_hio.field_0x0[i]); + dMap_HIO_prm_res_dst_s::m_res->palette_data[i] = pal_data.getRGB5A3_palDt_s(); + } + memcpy(&dMap_HIO_prm_res_dst_s::m_res->field_0x198, dMap_HIO_c::m_prm_hio.field_0xcc, 0x24); + memcpy(&dMap_HIO_prm_res_dst_s::m_other, &dMap_HIO_c::m_prm_hio.field_0xf0, 0x2f0); + if (dMap_c::m_mySelfPointer && dMap_c::m_mySelfPointer->getStayType() == 0) { + pal_data.setGXColor(dMap_HIO_c::m_prm_hio.field_0x0[44]); + dMap_HIO_prm_res_dst_s::m_res->palette_data[1] = pal_data.getRGB5A3_palDt_s(); } } -void dMap_HIO_list_c::copySrcToHio() { - // DEBUG NONMATCHING - if (dMap_HIO_c::m_res_src_p != NULL) { - dMpath_RGBA_c color; - for (int i = 0; i < 51; i++) { - - } +void dMap_HIO_list_c::copyBufToHio(const char* param_1) { + dMap_prm_res_s* r29 = dMap_HIO_prm_res_dst_s::m_res; + memcpy(r29, param_1, 0x1bc); + dMpath_RGBA_c color; + for (int i = 0; i < 51; i++) { + color.setRGB5A3_palDt(r29->palette_data[i]); + dMap_HIO_c::m_prm_hio.field_0x0[i] = color.getGXColor(); } + memcpy(dMap_HIO_c::m_prm_hio.field_0xcc, &r29->field_0x198, 0x24); } #endif -f32 renderingAmap_c::getIconSize(u8 i_icon) const { +f32 renderingAmap_c::getIconSize(u8 i_typeGroup) const { static f32 const l_iconSize[] = { 0.12f, 0.12f, 0.08f, 0.12f, 0.08f, 0.16f, 0.12f, 0.0f, 0.12f, 0.08f, 0.08f, 0.08f, 0.08f, 0.08f, 0.08f, 0.08f, 0.08f, }; - return l_iconSize[i_icon]; + JUT_ASSERT(1012, (i_typeGroup >= 0) && (i_typeGroup < dTres_c::TYPE_GROUP_ENUM_NUMBER)); + + f32 iconSize = l_iconSize[i_typeGroup]; +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x40) { + iconSize = dMap_HIO_prm_res_dst_s::m_other.field_0x44[i_typeGroup] / 100.0f; + } +#endif + return iconSize; } dMap_prm_res_s* dMap_HIO_prm_res_dst_s::m_res; @@ -147,35 +344,35 @@ void renderingAmap_c::draw() { (f32)dMap_HIO_prm_res_dst_s::m_res->field_0x1aa); tmp = tmp; - f32 temp_f1 = 0.5f + ((0.5f * cM_ssin(65536.0f * tmp - 32768.0f))); + tmp = 0.5f + ((0.5f * cM_ssin(65536.0f * tmp - 32768.0f))); u8 temp_r31 = twoValueLineInterpolation(dMap_HIO_prm_res_dst_s::m_res->field_0x198, - dMap_HIO_prm_res_dst_s::m_res->field_0x19c, temp_f1); + dMap_HIO_prm_res_dst_s::m_res->field_0x19c, tmp); u8 temp_r30 = twoValueLineInterpolation(dMap_HIO_prm_res_dst_s::m_res->field_0x199, - dMap_HIO_prm_res_dst_s::m_res->field_0x19d, temp_f1); + dMap_HIO_prm_res_dst_s::m_res->field_0x19d, tmp); u8 temp_r29 = twoValueLineInterpolation(dMap_HIO_prm_res_dst_s::m_res->field_0x19a, - dMap_HIO_prm_res_dst_s::m_res->field_0x19e, temp_f1); + dMap_HIO_prm_res_dst_s::m_res->field_0x19e, tmp); u8 temp_r28 = twoValueLineInterpolation(dMap_HIO_prm_res_dst_s::m_res->field_0x19b, - dMap_HIO_prm_res_dst_s::m_res->field_0x19f, temp_f1); + dMap_HIO_prm_res_dst_s::m_res->field_0x19f, tmp); setAmapPaletteColor(0x2D, temp_r31, temp_r30, temp_r29, temp_r28); - f32 tmp2 = (f32)(g_Counter.mCounter0 % dMap_HIO_prm_res_dst_s::m_res->field_0x1ac) / + tmp = (f32)(g_Counter.mCounter0 % dMap_HIO_prm_res_dst_s::m_res->field_0x1ac) / (f32)dMap_HIO_prm_res_dst_s::m_res->field_0x1ac; - tmp2 = tmp2; + tmp = tmp; - f32 temp_f1_2 = 0.5f + (0.5f * cM_ssin(65536.0f * tmp2 - 32768.0f)); - u8 temp_r31_2 = + tmp = 0.5f + (0.5f * cM_ssin(65536.0f * tmp - 32768.0f)); + temp_r31 = twoValueLineInterpolation(dMap_HIO_prm_res_dst_s::m_res->field_0x1a0, - dMap_HIO_prm_res_dst_s::m_res->field_0x1a4, temp_f1_2); - u8 temp_r30_2 = + dMap_HIO_prm_res_dst_s::m_res->field_0x1a4, tmp); + temp_r30 = twoValueLineInterpolation(dMap_HIO_prm_res_dst_s::m_res->field_0x1a1, - dMap_HIO_prm_res_dst_s::m_res->field_0x1a5, temp_f1_2); - u8 temp_r29_2 = + dMap_HIO_prm_res_dst_s::m_res->field_0x1a5, tmp); + temp_r29 = twoValueLineInterpolation(dMap_HIO_prm_res_dst_s::m_res->field_0x1a2, - dMap_HIO_prm_res_dst_s::m_res->field_0x1a6, temp_f1_2); - u8 temp_r28_2 = + dMap_HIO_prm_res_dst_s::m_res->field_0x1a6, tmp); + temp_r28 = twoValueLineInterpolation(dMap_HIO_prm_res_dst_s::m_res->field_0x1a3, - dMap_HIO_prm_res_dst_s::m_res->field_0x1a7, temp_f1_2); - setAmapPaletteColor(0x2E, temp_r31_2, temp_r30_2, temp_r29_2, temp_r28_2); + dMap_HIO_prm_res_dst_s::m_res->field_0x1a7, tmp); + setAmapPaletteColor(0x2E, temp_r31, temp_r30, temp_r29, temp_r28); renderingDAmap_c::draw(); } @@ -183,7 +380,11 @@ void renderingAmap_c::draw() { int renderingAmap_c::getDispType() const { int disp_type; - switch (dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo())) { + s32 upButton = dStage_stagInfo_GetUpButton(dComIfGp_getStage()->getStagInfo()); + switch (upButton) { + default: + JUT_ASSERT(1075, FALSE); + break; case 7: disp_type = 1; break; @@ -206,15 +407,20 @@ int renderingAmap_c::getDispType() const { case 6: disp_type = 5; break; - default: - JUT_ASSERT(0, FALSE); - break; } return disp_type; } void renderingAmap_c::beforeDrawPath() { + static const GXColor roomSizeColor = {92, 0, 0, 0}; + +#if DEBUG + if (!dMap_HIO_prm_res_dst_s::m_other.field_0x22) { + field_0x38 = 2; + return; + } +#endif if (isDrawOutSideTrim()) { field_0x38 = 0; getOutSideBlackLineNumber(); @@ -225,6 +431,38 @@ void renderingAmap_c::beforeDrawPath() { field_0x38 = 2; } +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x34) { + GXSetMisc(GX_MT_XF_FLUSH, 0); + f32 f31 = dMpath_c::getMinX(); + f32 f30 = dMpath_c::getMinZ(); + f32 f29 = dMpath_c::getMaxX(); + f32 f28 = dMpath_c::getMaxZ(); + if (getStayType() == 0 && dMap_HIO_prm_res_dst_s::m_res->field_0x1ae > 0) { + f31 -= dMap_HIO_prm_res_dst_s::m_res->field_0x1b0 / 12 * mCmPerTexel; + f30 -= dMap_HIO_prm_res_dst_s::m_res->field_0x1b0 / 12 * mCmPerTexel; + f29 += dMap_HIO_prm_res_dst_s::m_res->field_0x1b0 / 12 * mCmPerTexel; + f28 += dMap_HIO_prm_res_dst_s::m_res->field_0x1b0 / 12 * mCmPerTexel; + } + setTevSettingNonTextureDirectColor(); + GXClearVtxDesc(); + GXSetVtxDesc(GX_VA_POS,GX_DIRECT); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_F32, 0); + GXSetLineWidth(dMap_HIO_prm_res_dst_s::m_other.field_0x36, GX_TO_ZERO); + GXSetTevColor(GX_TEVREG0, roomSizeColor); + GXBegin(GX_LINESTRIP, GX_VTXFMT0, 5); + GXPosition2f32(f31, f30); + GXPosition2f32(f29, f30); + GXPosition2f32(f29, f28); + GXPosition2f32(f31, f28); + GXPosition2f32(f31, f30); + GXEnd(); + GXClearVtxDesc(); + GXSetVtxDesc(GX_VA_POS, GX_INDEX16); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_F32, 0); + GXSetMisc(GX_MT_XF_FLUSH, 8); + } +#endif } void renderingAmap_c::afterDrawPath() { @@ -232,6 +470,34 @@ void renderingAmap_c::afterDrawPath() { } void renderingAmap_c::rendering(dDrawPath_c::room_class const* i_room) { + static const GXColor roomSizeColor = {92, 0, 0, 0}; +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x3c) { + GXSetMisc(GX_MT_XF_FLUSH, 0); + dStage_FileList2_dt_c* fileList = dStage_roomControl_c::getFileList2(mRoomNo); + f32 f31 = dStage_FileList2_dt_GetLeftRmX(fileList); + f32 f30 = dStage_FileList2_dt_GetInnerRmZ(fileList); + f32 f29 = dStage_FileList2_dt_GetRightRmX(fileList); + f32 f28 = dStage_FileList2_dt_GetFrontRmZ(fileList); + setTevSettingNonTextureDirectColor(); + GXClearVtxDesc(); + GXSetVtxDesc(GX_VA_POS, GX_DIRECT); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_F32, 0); + GXSetLineWidth(dMap_HIO_prm_res_dst_s::m_other.field_0x3e, GX_TO_ZERO); + GXSetTevColor(GX_TEVREG0, roomSizeColor); + GXBegin(GX_LINESTRIP, GX_VTXFMT0, 5); + GXPosition2f32(f31, f30); + GXPosition2f32(f29, f30); + GXPosition2f32(f29, f28); + GXPosition2f32(f31, f28); + GXPosition2f32(f31, f30); + GXEnd(); + GXClearVtxDesc(); + GXSetVtxDesc(GX_VA_POS, GX_INDEX16); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_F32, 0); + GXSetMisc(GX_MT_XF_FLUSH, 8); + } +#endif dDrawPath_c::rendering(i_room); } @@ -279,6 +545,11 @@ bool renderingAmap_c::isDrawOutSideTrim() { getDispType() == 5) { rt = dMap_HIO_prm_res_dst_s::m_res->field_0x1ae > 0; +#if DEBUG + if (!dMap_HIO_prm_res_dst_s::m_other.field_0x22) { + rt = 0; + } +#endif } return rt; @@ -313,6 +584,11 @@ int renderingAmap_c::getLineWidthSub(int i_no) { pat = l_lineWidthPatOn; } +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x38 && i_no == 3) { + return dMap_HIO_prm_res_dst_s::m_other.field_0x3a; + } +#endif return pat[i_no]; } @@ -345,6 +621,9 @@ s32 renderingAmap_c::getDecorationLineWidth(int param_0) { case 3: var_r31 = dMap_HIO_prm_res_dst_s::m_res->field_0x1b6; break; + default: + JUT_ASSERT(1484, FALSE); + break; } if (var_r31 > 0) { @@ -359,7 +638,12 @@ s32 renderingAmap_c::getDecorationLineWidth(int param_0) { } int renderingAmap_c::getLineWidth(int i_no) { - return getLineWidthSub(i_no); + int r30 = 0; + int r31 = 0; + if (r30 == 0) { + r31 = getLineWidthSub(i_no); + } + return r31; } const GXColor* dMap_c::getColor(int i_no) { @@ -406,21 +690,20 @@ const GXColor* dMap_c::getColor(int i_no) { GXColor* renderingAmap_c::getLineColor(int param_0, int param_1) { static GXColor backColor = {0x04, 0x00, 0x00, 0x00}; - static const GXColor borderColor0 = {0xB4, 0x00, 0x00, 0x00}; - static const GXColor borderColor1 = {0xB8, 0x00, 0x00, 0x00}; - GXColor* color = &backColor; if (param_1 == 4) { switch (field_0x3c) { case 0: + static const GXColor borderColor0 = {0xB4, 0x00, 0x00, 0x00}; *color = borderColor0; break; case 1: + static const GXColor borderColor1 = {0xB8, 0x00, 0x00, 0x00}; *color = borderColor1; break; default: - JUT_ASSERT(0, FALSE); + JUT_ASSERT(1636, FALSE); break; } } else { @@ -431,36 +714,50 @@ GXColor* renderingAmap_c::getLineColor(int param_0, int param_1) { } const GXColor* renderingAmap_c::getDecoLineColor(int param_0, int param_1) { - static GXColor const colorTable[] = { - {0xBC, 0x00, 0x00, 0x00}, - {0xC0, 0x00, 0x00, 0x00}, - {0xC4, 0x00, 0x00, 0x00}, - {0xC8, 0x00, 0x00, 0x00}, - }; - - const GXColor* color; if (isDrawOutSideTrim() && field_0x38 != 2) { - JUT_ASSERT(0, m_outSideBlackLineCnt < ARRAY_SIZEU(colorTable)); - color = &colorTable[m_outSideBlackLineCnt]; + static GXColor const colorTable[] = { + {0xBC, 0x00, 0x00, 0x00}, + {0xC0, 0x00, 0x00, 0x00}, + {0xC4, 0x00, 0x00, 0x00}, + {0xC8, 0x00, 0x00, 0x00}, + }; + JUT_ASSERT(1690, m_outSideBlackLineCnt < ARRAY_SIZEU(colorTable)); + return &colorTable[m_outSideBlackLineCnt]; } else { - color = getLineColor(param_0, param_1); + return getLineColor(param_0, param_1); } - - return color; } const Vec* dMap_c::getIconPosition(dTres_c::typeGroupData_c* i_data) const { +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x8a && i_data) { + u8 r29 = i_data->getTypeGroupNo(); + if (r29 < 17) { + Vec local_24 = *i_data->getPos(); + local_24.x += dMap_HIO_prm_res_dst_s::m_other.field_0x8c[r29]; + i_data->setPos(local_24); + } + } +#endif return renderingPlusDoorAndCursor_c::getIconPosition(i_data); } int renderingAmap_c::getIconGroupNumber(u8 param_0) const { - return renderingDAmap_c::getIconGroupNumber(param_0); + if (DEBUG && dMap_HIO_prm_res_dst_s::m_other.field_0x8a) { + return true; + } else { + return renderingDAmap_c::getIconGroupNumber(param_0); + } } bool renderingAmap_c::hasMap() const { int stay_type = getStayType(); - return stay_type == 1 && dMapInfo_n::chkGetMap(); + bool result = false; + if (stay_type == 1 && dMapInfo_n::chkGetMap()) { + result = true; + } + return result; } bool renderingAmap_c::isRendDoor() const { @@ -481,19 +778,51 @@ bool renderingAmap_c::isRendCursor() const { } bool renderingAmap_c::isRendAllRoom() const { +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x21) { + return true; + } +#endif int disp_type = getDispType(); - return disp_type != 2 && disp_type != 3 && disp_type != 5; + bool result = disp_type != 2 && disp_type != 3 && disp_type != 5; + return result; } +#if DEBUG +bool dMap_c::isSwitch(const dDrawPath_c::group_class* group) { + if (group->mSwbit == 0xff) { + return true; + } + if (dMap_HIO_prm_res_dst_s::m_other.field_0x10) { + if (group->mSwbit == 0xb2 && getStayType() == 0 && dComIfGs_isSaveDunSwitch(0x32)) { + if (!strcmp(dComIfGp_getStartStageName(), "F_SP121")) { + return renderingDAmap_c::isSwitch(group); + } + } + return dMap_HIO_prm_res_dst_s::m_other.field_0x11; + } + return renderingDAmap_c::isSwitch(group); +} +#endif + +const int MAP_DISP_TYPE_ENUM_END = 7; + int renderingAmap_c::getStayType() const { static int const l_stayType[] = {0, 1, 0, 0, 0, 0, 0}; - return l_stayType[getDispType()]; + int mapDispType = getDispType(); + JUT_ASSERT(1825, mapDispType < MAP_DISP_TYPE_ENUM_END); + return l_stayType[mapDispType]; } bool renderingAmap_c::isDrawIconSingle2(dTres_c::data_s const* i_data, bool param_1, bool param_2, int param_3) const { - JUT_ASSERT(0, i_data != NULL); +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x8a) { + return true; + } +#endif + JUT_ASSERT(1869, i_data != NULL); bool var_r31 = false; int disp_type = getDispType(); @@ -507,9 +836,12 @@ bool renderingAmap_c::isDrawIconSingle2(dTres_c::data_s const* i_data, bool para } switch (group_no) { + default: + JUT_ASSERT(1884, FALSE); + break; case 0: if (stay_type == 1) { - JUT_ASSERT(0, i_data->mNo != 255); + JUT_ASSERT(1888, i_data->mNo != 255); if (var_r23 && i_data->mNo != 255 && !dComIfGs_isTbox(i_data->mNo) && param_1) { var_r31 = true; @@ -559,7 +891,7 @@ bool renderingAmap_c::isDrawIconSingle2(dTres_c::data_s const* i_data, bool para } if (temp_r23_2) { - JUT_ASSERT(0, i_data->mNo != 255); + JUT_ASSERT(1982, i_data->mNo != 255); bool temp_r23_3 = false; if (i_data->mNo != 255 && !dComIfGs_isTbox(i_data->mNo)) { temp_r23_3 = true; @@ -658,15 +990,68 @@ bool renderingAmap_c::isDrawIconSingle2(dTres_c::data_s const* i_data, bool para var_r31 = true; } break; - default: - JUT_ASSERT(0, FALSE); + case 6: + case 7: break; } return var_r31; } +#if DEBUG +void dMap_c::beforeDrawPath() { + if (dMap_HIO_c::m_prm_hio.field_0xf0.field_0x0) { + static const GXColor roomSizeColor = {92, 0, 0, 0}; + GXSetMisc(GX_MT_XF_FLUSH,0); + f32 f31 = dMap_HIO_c::m_prm_hio.field_0xf0.field_0x4; + f32 f29 = dMpath_c::getMinZ(); + f32 f28 = dMpath_c::getMaxZ(); + setTevSettingNonTextureDirectColor(); + GXClearVtxDesc(); + GXSetVtxDesc(GX_VA_POS, GX_DIRECT); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_F32, 0); + GXSetLineWidth(dMap_HIO_prm_res_dst_s::m_other.field_0x36, GX_TO_ZERO); + GXSetTevColor(GX_TEVREG0, roomSizeColor); + GXBegin(GX_LINES, GX_VTXFMT0, 2); + GXPosition2f32(f31, f29); + GXPosition2f32(f31, f28); + GXEnd(); + GXClearVtxDesc(); + GXSetVtxDesc(GX_VA_POS, GX_INDEX16); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_F32, 0); + GXSetMisc(GX_MT_XF_FLUSH, 8); + } + if (dMap_HIO_c::m_prm_hio.field_0xf0.field_0x8) { + static const GXColor roomSizeColor = {92, 0, 0, 0}; + GXSetMisc(GX_MT_XF_FLUSH,0); + f32 f30 = dMap_HIO_c::m_prm_hio.field_0xf0.field_0xc; + f32 f27 = dMpath_c::getMinX(); + f32 f26 = dMpath_c::getMaxX(); + setTevSettingNonTextureDirectColor(); + GXClearVtxDesc(); + GXSetVtxDesc(GX_VA_POS, GX_DIRECT); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_F32, 0); + GXSetLineWidth(dMap_HIO_prm_res_dst_s::m_other.field_0x36, GX_TO_ZERO); + GXSetTevColor(GX_TEVREG0, roomSizeColor); + GXBegin(GX_LINESTRIP, GX_VTXFMT0, 2); + GXPosition2f32(f27, f30); + GXPosition2f32(f26, f30); + GXEnd(); + GXClearVtxDesc(); + GXSetVtxDesc(GX_VA_POS, GX_INDEX16); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_F32, 0); + GXSetMisc(GX_MT_XF_FLUSH, 8); + } + renderingAmap_c::beforeDrawPath(); +} +#endif + bool dMap_c::isDrawType(int param_0) { +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x1c) { + return false; + } +#endif return (param_0 & 0x80) == 0; } @@ -684,7 +1069,7 @@ bool dMap_c::isSpecialOutline() { } void dMap_c::copyPalette() { - JUT_ASSERT(0, m_res != NULL); + JUT_ASSERT(2435, m_res != NULL); cLib_memCpy(m_res, m_res_src, sizeof(dMap_HIO_prm_res_dst_s::m_res->palette_data)); if (getStayType() == 0) { @@ -726,8 +1111,8 @@ dMap_c::dMap_c(int param_0, int param_1, int param_2, int param_3) { mTopEdgePlus = 0.0f; field_0x74 = 0; - mTexSizeW = 0; - mTexSizeH = 0; + mTexSizeX = 0; + mTexSizeY = 0; mStayRoomNo = -1; field_0x80 = -1; field_0x84 = -1; @@ -739,16 +1124,50 @@ dMap_c::dMap_c(int param_0, int param_1, int param_2, int param_3) { field_0x8f = 0; field_0x90 = 0; +#if DEBUG + field_0x91 = 0; + m_mySelfPointer = this; +#endif + m_res = new (0x20) dMap_prm_res_s; - JUT_ASSERT(0, m_res != NULL); + JUT_ASSERT(2559, m_res != NULL); dMap_HIO_prm_res_dst_s::m_res = m_res; +#if DEBUG + int stayNo = dComIfGp_roomControl_getStayNo(); + if (stayNo != 50 && stayNo != 51 && getDispType() == 1) { + f32 f31 = 0.0f; + stage_stag_info_class* stageInfo = dComIfGp_getStage()->getStagInfo(); + if (stageInfo) { + f31 = stageInfo->field_0x20; + } + if (f31 == 0.0f) { + const char* stageName = dComIfGp_getStartStageName(); + char buf[3]; + buf[0] = stageName[0]; + buf[1] = stageName[1]; + buf[2] = 0; + if (strcmp(buf, "T_")) { + JUT_WARN(2585, "Area map disp area size zero."); + } + } + } +#endif + m_res_src = (dMap_prm_res_s*)dComIfG_getObjectRes("Always", 0x45); + +#if DEBUG + cLib_memCpy(&dMap_HIO_prm_res_dst_s::m_other, &dMap_HIO_prm_res_src_s::m_other, 0x2f0); + dMap_HIO_c::m_res_src_p = m_res_src; + g_dMap_HIO.mList.copySrcToHio(); + g_dMap_HIO.mList.copyHioToDst(); +#endif + resCopy(); - mTexSizeW = param_0; - mTexSizeH = param_1; + mTexSizeX = param_0; + mTexSizeY = param_1; if (dMap_HIO_prm_res_dst_s::m_res->field_0x1ae > 0) { field_0x74 = dMap_HIO_prm_res_dst_s::m_res->field_0x1b0 / 6; @@ -756,14 +1175,14 @@ dMap_c::dMap_c(int param_0, int param_1, int param_2, int param_3) { int buffer_size = GXGetTexBufferSize(param_2, param_3, 9, GX_FALSE, 0); mImage_p = new (0x20) u8[buffer_size]; - JUT_ASSERT(0, mImage_p != NULL); + JUT_ASSERT(2638, mImage_p != NULL); - renderingDAmap_c::init(mImage_p, mTexSizeW, mTexSizeH, mTexSizeW, mTexSizeH); + renderingDAmap_c::init(mImage_p, mTexSizeX, mTexSizeY, mTexSizeX, mTexSizeY); mResTIMG = new (0x20) ResTIMG; - JUT_ASSERT(0, mResTIMG != NULL); + JUT_ASSERT(2647, mResTIMG != NULL); - makeResTIMG(mResTIMG, mTexSizeW, mTexSizeH, mImage_p, (u8*)m_res, 0x33); + makeResTIMG(mResTIMG, mTexSizeX, mTexSizeY, mImage_p, (u8*)m_res, 0x33); } #if DEBUG @@ -771,16 +1190,16 @@ void dMap_c::changeTextureSize(int param_1, int param_2, int param_3) { JUT_ASSERT(2672, mImage_p != NULL); JUT_ASSERT(2673, mResTIMG != NULL); - mTexSizeW = param_1 >> param_3; - mTexSizeH = param_2 >> param_3; + mTexSizeX = param_1 >> param_3; + mTexSizeY = param_2 >> param_3; - u32 imageSize = GXGetTexBufferSize(mTexSizeW, mTexSizeH, 9, 0, 0); - OS_REPORT("imageSize<%d> <%d kbyte>mTexSizeW<%d>mTexSizeH<%d>\n", imageSize, imageSize * (1.0f / 1024.f), mTexSizeW, mTexSizeH); + u32 imageSize = GXGetTexBufferSize(mTexSizeX, mTexSizeY, 9, 0, 0); + OS_REPORT("imageSize<%d> <%d kbyte>mTexSizeW<%d>mTexSizeH<%d>\n", imageSize, int(imageSize * (1.0f / 1024.f)), mTexSizeX, mTexSizeY); JUT_ASSERT(2682, mImage_p != NULL); - - init(mImage_p, mTexSizeW, mTexSizeH, param_1, param_2); - makeResTIMG(mResTIMG, mTexSizeW, mTexSizeH, mImage_p, (u8*)m_res, 0x33); + + init(mImage_p, mTexSizeX, mTexSizeY, param_1, param_2); + makeResTIMG(mResTIMG, mTexSizeX, mTexSizeY, mImage_p, (u8*)m_res, 0x33); } #endif @@ -807,7 +1226,7 @@ void dMap_c::getMapMinMaxXZ(int i_roomNo, f32* param_1, f32* param_2, f32* param f32 var_f2 = 0.0f; f32 var_f3 = 0.0f; - JUT_ASSERT(0, i_roomNo >= 0); + JUT_ASSERT(2749, i_roomNo >= 0); if (i_roomNo >= 0) { f32 temp_f31 = dMpath_c::getMinX(); @@ -821,7 +1240,7 @@ void dMap_c::getMapMinMaxXZ(int i_roomNo, f32* param_1, f32* param_2, f32* param f32 sp8 = 0.0f; dStage_FileList2_dt_c* fileList2_p = dStage_roomControl_c::getFileList2(i_roomNo); - JUT_ASSERT(0, fileList2_p != NULL); + JUT_ASSERT(2766, fileList2_p != NULL); if (fileList2_p != NULL) { dMapInfo_n::getRoomMinMaxXZ(i_roomNo, &sp14, &sp10, &spC, &sp8); @@ -829,7 +1248,7 @@ void dMap_c::getMapMinMaxXZ(int i_roomNo, f32* param_1, f32* param_2, f32* param switch (getDispType()) { default: - JUT_ASSERT(0, FALSE); + JUT_ASSERT(2773, FALSE); case 4: case 0: var_f0 = temp_f31; @@ -914,7 +1333,7 @@ void dMap_c::calcMapCenterXZ(int i_roomNo, f32* param_1, f32* param_2) { f32 var_f31 = 0.0f; f32 var_f30 = 0.0f; - JUT_ASSERT(0, i_roomNo >= 0); + JUT_ASSERT(2892, i_roomNo >= 0); if (i_roomNo >= 0) { f32 sp14 = 0.0f; @@ -937,11 +1356,11 @@ void dMap_c::calcMapCenterXZ(int i_roomNo, f32* param_1, f32* param_2) { } void dMap_c::calcMapCmPerTexel(int i_roomNo, f32* ip_cmPerTexel) { - JUT_ASSERT(0, i_roomNo >= 0); - JUT_ASSERT(0, ip_cmPerTexel != NULL); + JUT_ASSERT(2928, i_roomNo >= 0); + JUT_ASSERT(2929, ip_cmPerTexel != NULL); f32 cmPerTexel = 0.0f; - JUT_ASSERT(0, mTexSizeH != 0); + JUT_ASSERT(2931, mTexSizeY != 0); if (i_roomNo >= 0) { if (getStayType() == 0) { @@ -960,12 +1379,12 @@ void dMap_c::calcMapCmPerTexel(int i_roomNo, f32* ip_cmPerTexel) { var_f3 = temp_f0; } - cmPerTexel = var_f3 / ((f32)mTexSizeH - (f32)(field_0x74 + 4)); + cmPerTexel = var_f3 / ((f32)mTexSizeY - (f32)(field_0x74 + 4)); } else { f32 var_f31 = 0.0f; stage_stag_info_class* pstag = dComIfGp_getStage()->getStagInfo(); - JUT_ASSERT(0, pstag != NULL); + JUT_ASSERT(2952, pstag != NULL); if (pstag != NULL) { var_f31 = pstag->field_0x20; @@ -973,13 +1392,18 @@ void dMap_c::calcMapCmPerTexel(int i_roomNo, f32* ip_cmPerTexel) { if (var_f31 == 0.0f) { var_f31 = 10800.0f; +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x2c) { + var_f31 = dMap_HIO_prm_res_dst_s::m_other.field_0x30; + } +#endif } - cmPerTexel = var_f31 / (f32)mTexSizeH; + cmPerTexel = var_f31 / (f32)mTexSizeY; } } - JUT_ASSERT(0, cmPerTexel != 0.0f); + JUT_ASSERT(2967, cmPerTexel != 0.0f); if (ip_cmPerTexel != NULL) { *ip_cmPerTexel = cmPerTexel; @@ -995,15 +1419,22 @@ inline void getRGBA_RGB5A3(const dMpath_RGB5A3_palDt_s& palette, u8& r, u8& g, u temp_r0 = palette.field_0x0.color; if (temp_r0 & 0x8000) { - t_r = ((temp_r0 >> 7) & 0xF8) | (r >> 5); - t_g = ((temp_r0 >> 2) & 0xF8) | (g >> 5); - t_b = ((temp_r0 << 3) & 0xF8) | (b >> 5); + t_r = (temp_r0 >> 7) & 0xF8; + t_r |= r >> 5; + t_g = (temp_r0 >> 2) & 0xF8; + t_g |= g >> 5; + t_b = (temp_r0 << 3) & 0xF8; + t_b |= b >> 5; t_a = 0xFF; } else { - t_r = ((temp_r0 >> 4) & 0xF0) | (r >> 4); - t_g = ((temp_r0 >> 0) & 0xF0) | (g >> 4); - t_b = ((temp_r0 << 4) & 0xF0) | (b >> 4); - t_a = ((temp_r0 >> 7) & 0xE0) | (a >> 3) | (a >> 6); + t_r = (temp_r0 >> 4) & 0xF0; + t_r |= r >> 4; + t_g = (temp_r0 >> 0) & 0xF0; + t_g |= g >> 4; + t_b = (temp_r0 << 4) & 0xF0; + t_b |= b >> 4; + t_a = (temp_r0 >> 7) & 0xE0; + t_a |= a >> 3 | a >> 6; } r = t_r; @@ -1013,38 +1444,38 @@ inline void getRGBA_RGB5A3(const dMpath_RGB5A3_palDt_s& palette, u8& r, u8& g, u } void dMap_c::setMapPaletteColorAlphaPer(int i_paletteNo, f32 param_1) { - JUT_ASSERT(0, i_paletteNo < renderingAmap_c::PALETTE_NUMBER); + JUT_ASSERT(3027, i_paletteNo < renderingAmap_c::PALETTE_NUMBER); int pixel; - u8 scaled_a = 0; u8 r = 0; u8 g = 0; u8 b = 0; u8 a = 0; - dMpath_RGB5A3_palDt_s& temp_r31 = dMap_HIO_prm_res_dst_s::m_res->palette_data[i_paletteNo]; - getRGBA_RGB5A3(m_res_src->palette_data[i_paletteNo], r, g, b, a); + int paletteNo = i_paletteNo; + dMpath_RGB5A3_palDt_s& temp_r31 = dMap_HIO_prm_res_dst_s::m_res->palette_data[paletteNo]; + getRGBA_RGB5A3(m_res_src->palette_data[paletteNo], r, g, b, a); - scaled_a = a * param_1; - if (scaled_a >= 0xE0) { - pixel = ((r & 0xF8) << 7) | ((g & 0xF8) << 2) | ((b & 0xF8) >> 3) | 0x8000; + a = a * param_1; + if (a >= 0xE0) { + pixel = (r & 0xF8) << 7 | (g & 0xF8) << 2 | (b & 0xF8) >> 3 | 0x8000; } else { - pixel = ((r & 0xF0) << 4) | (g & 0xF0) | ((b & 0xF0) >> 4) | ((scaled_a & 0xE0) << 7); + pixel = (r & 0xF0) << 4 | (g & 0xF0) | (b & 0xF0) >> 4 | (a & 0xE0) << 7; } - temp_r31.field_0x0.color = pixel; - temp_r31.field_0x2.color = pixel; - temp_r31.field_0x4.color = pixel; - temp_r31.field_0x6.color = pixel; - DCStoreRange(&dMap_HIO_prm_res_dst_s::m_res->palette_data[i_paletteNo], + u16 r30 = pixel; + temp_r31.field_0x0.color = r30; + temp_r31.field_0x2.color = r30; + temp_r31.field_0x4.color = r30; + temp_r31.field_0x6.color = r30; + DCStoreRange(&dMap_HIO_prm_res_dst_s::m_res->palette_data[paletteNo], sizeof(dMpath_RGB5A3_palDt_s)); } void dMap_c::copyPalette(int i_dstPaletteNo, int i_srcPaletteNo, f32 param_2) { - JUT_ASSERT(0, i_dstPaletteNo < renderingAmap_c::PALETTE_NUMBER); - JUT_ASSERT(0, i_srcPaletteNo < renderingAmap_c::PALETTE_NUMBER); + JUT_ASSERT(3052, i_srcPaletteNo < renderingAmap_c::PALETTE_NUMBER); + JUT_ASSERT(3053, i_dstPaletteNo < renderingAmap_c::PALETTE_NUMBER); int pixel; - u8 scaled_a = 0; u8 r = 0; u8 g = 0; u8 b = 0; @@ -1052,23 +1483,24 @@ void dMap_c::copyPalette(int i_dstPaletteNo, int i_srcPaletteNo, f32 param_2) { dMpath_RGB5A3_palDt_s& temp_r31 = dMap_HIO_prm_res_dst_s::m_res->palette_data[i_dstPaletteNo]; getRGBA_RGB5A3(m_res_src->palette_data[i_srcPaletteNo], r, g, b, a); - scaled_a = a * param_2; - if (scaled_a >= 0xE0) { + a = a * param_2; + if (a >= 0xE0) { pixel = ((r & 0xF8) << 7) | ((g & 0xF8) << 2) | ((b & 0xF8) >> 3) | 0x8000; } else { - pixel = ((r & 0xF0) << 4) | (g & 0xF0) | ((b & 0xF0) >> 4) | ((scaled_a & 0xE0) << 7); + pixel = ((r & 0xF0) << 4) | (g & 0xF0) | ((b & 0xF0) >> 4) | ((a & 0xE0) << 7); } - temp_r31.field_0x0.color = pixel; - temp_r31.field_0x2.color = pixel; - temp_r31.field_0x4.color = pixel; - temp_r31.field_0x6.color = pixel; + u16 r30 = pixel; + temp_r31.field_0x0.color = r30; + temp_r31.field_0x2.color = r30; + temp_r31.field_0x4.color = r30; + temp_r31.field_0x6.color = r30; DCStoreRange(&dMap_HIO_prm_res_dst_s::m_res->palette_data[i_dstPaletteNo], sizeof(dMpath_RGB5A3_palDt_s)); } void dMap_c::setAmapPaletteColor(int i_paletteNo, u8 i_r, u8 i_g, u8 i_b, u8 i_scaledA) { - JUT_ASSERT(0, i_paletteNo < renderingAmap_c::PALETTE_NUMBER); + JUT_ASSERT(3088, i_paletteNo < renderingAmap_c::PALETTE_NUMBER); int pixel; if (i_scaledA >= 0xE0) { @@ -1078,11 +1510,12 @@ void dMap_c::setAmapPaletteColor(int i_paletteNo, u8 i_r, u8 i_g, u8 i_b, u8 i_s ((i_r & 0xF0) << 4) | (i_g & 0xF0) | ((i_b & 0xF0) >> 4) | ((i_scaledA & 0xE0) << 7); } + u16 r30 = pixel; dMpath_RGB5A3_palDt_s& temp_r31 = dMap_HIO_prm_res_dst_s::m_res->palette_data[i_paletteNo]; - temp_r31.field_0x0.color = pixel; - temp_r31.field_0x2.color = pixel; - temp_r31.field_0x4.color = pixel; - temp_r31.field_0x6.color = pixel; + temp_r31.field_0x0.color = r30; + temp_r31.field_0x2.color = r30; + temp_r31.field_0x4.color = r30; + temp_r31.field_0x6.color = r30; DCStoreRange(&dMap_HIO_prm_res_dst_s::m_res->palette_data[i_paletteNo], sizeof(dMpath_RGB5A3_palDt_s)); } @@ -1092,15 +1525,24 @@ int dMap_c::getDispType() const { } bool dMap_c::isDrawRoom(int param_0, int param_1) const { +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x88) { + if (!dMap_HIO_prm_res_dst_s::m_other.field_0x89) { + return true; + } else { + return false; + } + } +#endif if (field_0x8e == 2) { if (field_0x8f >= 3 && field_0x8f <= 3) { return param_0 == field_0x84 || param_0 == field_0x88; } else { return param_0 == field_0x80; } - } else { - return renderingDAmap_c::isDrawRoom(param_0, param_1); } + + return renderingDAmap_c::isDrawRoom(param_0, param_1); } int dMap_c::getRoomNoSingle() { @@ -1146,11 +1588,19 @@ void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) { if (getStayType() == 0 && dComIfGs_isSaveDunSwitch(0x32) && strcmp(dComIfGp_getStartStageName(), "F_SP121") == 0) { +#if DEBUG + field_0x64 = 33830.0f; +#else field_0x64 = 0.0f; +#endif mPackPlusZ = -3710.0f; f32 temp = (field_0x58 * (f32)(field_0x74 + 4)) * 0.5f; +#if DEBUG + mRightEdgePlus = -(((dMpath_c::getMinZ() - (-127103.67f)) - temp) / field_0x58); +#else mRightEdgePlus = 0.0f; +#endif mTopEdgePlus = ((-22397.0f - dMpath_c::getMinZ()) - temp) / field_0x58; } else { mRightEdgePlus = 0.0f; @@ -1165,8 +1615,7 @@ void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) { switch (getDispType()) { default: - case 0: - JUT_ASSERT(0, FALSE); + JUT_ASSERT(3384, FALSE); break; case 5: field_0x8e = 2; @@ -1174,6 +1623,11 @@ void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) { case 1: field_0x8e = 1; break; + case 0: + case 2: + case 3: + case 4: + break; } switch (field_0x8e) { @@ -1217,9 +1671,20 @@ void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) { if (field_0x80 != dMapInfo_c::getNextRoomNoForMapPat0()) { field_0x84 = (s8)dMapInfo_c::getNextRoomNoForMapPat0(); field_0x88 = field_0x80; +#if DEBUG + field_0x90 = dMap_HIO_prm_res_dst_s::m_other.field_0x1d; + if (!dMap_HIO_prm_res_dst_s::m_other.field_0x1d) { + field_0x8f = 2; + field_0x90 = dMap_HIO_prm_res_dst_s::m_other.field_0x1e; + } else { + field_0x8f = 1; + field_0x90 = dMap_HIO_prm_res_dst_s::m_other.field_0x1d; + } +#else field_0x90 = 30; field_0x8f = 1; field_0x90 = 30; +#endif } break; case 1: @@ -1229,14 +1694,22 @@ void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) { if (field_0x90 == 0 && mStayRoomNo != field_0x88) { field_0x8f = 2; +#if DEBUG + field_0x90 = dMap_HIO_prm_res_dst_s::m_other.field_0x1e; +#else field_0x90 = 5; +#endif } break; case 2: field_0x90--; if (field_0x90 == 0) { field_0x8f = 3; +#if DEBUG + field_0x90 = dMap_HIO_prm_res_dst_s::m_other.field_0x1f; +#else field_0x90 = 20; +#endif } break; case 3: @@ -1251,7 +1724,11 @@ void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) { mCenterX += mPackX; mCenterZ -= mPackZ; field_0x8f = 4; +#if DEBUG + field_0x90 = dMap_HIO_prm_res_dst_s::m_other.field_0x20; +#else field_0x90 = 5; +#endif } break; case 4: @@ -1292,10 +1769,16 @@ void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) { break; case 2: switch (field_0x8f) { + case 1: + break; case 2: { - f32 temp_f31 = (f32)field_0x90 / 5.0f; - setMapPaletteColorAlphaPer(0x2F, 0x32, temp_f31); - setMapPaletteColorAlphaPer(0x21, 0x2B, temp_f31); +#if DEBUG + f32 local_68 = f32(field_0x90) / dMap_HIO_prm_res_dst_s::m_other.field_0x1e; +#else + f32 local_68 = f32(field_0x90) / 5.0f; +#endif + setMapPaletteColorAlphaPer(0x2F, 0x32, local_68); + setMapPaletteColorAlphaPer(0x21, 0x2B, local_68); break; } case 3: { @@ -1303,7 +1786,11 @@ void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) { f32 sp24, sp20; calcMapCenterXZ(field_0x84, &sp24, &sp20); - f32 temp_f31_2 = 1.0f - ((f32)field_0x90 / 20.0f); +#if DEBUG + f32 temp_f31_2 = 1.0f - (f32(field_0x90) / dMap_HIO_prm_res_dst_s::m_other.field_0x1f); +#else + f32 temp_f31_2 = 1.0f - (f32(field_0x90) / 20.0f); +#endif mCenterX += temp_f31_2 * (sp24 - mCenterX); mCenterZ += temp_f31_2 * (sp20 - mCenterZ); @@ -1331,9 +1818,13 @@ void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) { break; } case 4: { - f32 temp_f31_3 = 1.0f - ((f32)field_0x90 / 5.0f); - setMapPaletteColorAlphaPer(0x2F, 0x32, temp_f31_3); - setMapPaletteColorAlphaPer(0x21, 0x2B, temp_f31_3); +#if DEBUG + f32 local_8c = 1.0f - (f32(field_0x90) / dMap_HIO_prm_res_dst_s::m_other.field_0x20); +#else + f32 local_8c = 1.0f - (f32(field_0x90) / 5.0f); +#endif + setMapPaletteColorAlphaPer(0x2F, 0x32, local_8c); + setMapPaletteColorAlphaPer(0x21, 0x2B, local_8c); break; } case 6: @@ -1344,19 +1835,60 @@ void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) { } field_0x8d = 1; +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x23) { + mCenterX = i_centerX; + mCenterZ = i_centerZ; + } + if (dMap_HIO_c::m_prm_hio.field_0xf0.field_0x12) { + calcMapCenterXZ(field_0x80, &mCenterX, &mCenterZ); + calcMapCmPerTexel(field_0x80, &field_0x58); + f32 local_90, local_94; + getPack(field_0x80, &local_90, &local_94); + local_90 += dMap_HIO_c::m_prm_hio.field_0xf0.field_0x14; + local_94 += dMap_HIO_c::m_prm_hio.field_0xf0.field_0x18; + mCenterX += local_90; + mCenterZ -= local_94; + OS_REPORT("mCenterX<%10.3f>mCenterZ<%10.3f>\n", mCenterX, mCenterZ); + } +#endif } void dMap_c::_draw() { if (mStayRoomNo >= 0 && field_0x8d != 0) { - s8 floor_no = dMapInfo_c::getNowStayFloorNo(); - entry(mCenterX, mCenterZ, field_0x58, mStayRoomNo, floor_no); + entry(mCenterX, mCenterZ, field_0x58, mStayRoomNo, dMapInfo_c::getNowStayFloorNo()); +#if DEBUG + field_0x91 = 0; +#endif } } dTres_c::typeGroupData_c* dMap_c::getFirstData(u8 param_0) { +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x8a) { + dTres_c::typeGroupData_c* typeGroupData = &dMap_HIO_prm_res_dst_s::m_other.field_0x114[param_0]; + typeGroupData->setNo(0); + typeGroupData->setRoomNo(dComIfGp_roomControl_getStayNo()); + typeGroupData->setStatus(0); + typeGroupData->setArg1(0); + typeGroupData->setPos(daPy_getPlayerActorClass()->current.pos); + typeGroupData->setSwBit(0xff); + typeGroupData->setType(dTres_c::getTypeGroupNoToType(param_0)); + typeGroupData->setArg2(0xff); + typeGroupData->setAngleY(0); + typeGroupData->setTypeGroupNo(param_0); + typeGroupData->setNextDataPointer(NULL); + return typeGroupData; + } +#endif return renderingPlusDoorAndCursor_c::getFirstData(param_0); } dTres_c::typeGroupData_c* dMap_c::getNextData(dTres_c::typeGroupData_c* param_0) { +#if DEBUG + if (dMap_HIO_prm_res_dst_s::m_other.field_0x8a) { + return NULL; + } +#endif return renderingPlusDoorAndCursor_c::getNextData(param_0); } diff --git a/src/d/d_map_path.cpp b/src/d/d_map_path.cpp index d34b981e89..ca95a043fd 100644 --- a/src/d/d_map_path.cpp +++ b/src/d/d_map_path.cpp @@ -36,6 +36,43 @@ void dMpath_n::dTexObjAggregate_c::remove() { } } +void dMpath_ColorCnv_n::convertRGB5A3_To_GXColor(_GXColor& color32, const dMpath_RGB5A3_s& color16) { + int r, g, b, a; + u16 color = color16.color; + if (color & 0x8000) { + r = color16.color >> 7 & 0xf8; + r |= r >> 5; + g = color16.color >> 2 & 0xf8; + g |= g >> 5; + b = color16.color << 3 & 0xf8; + b |= b >> 5; + a = 255; + } else { + r = color16.color >> 4 & 0xf0; + r |= r >> 4; + g = color16.color & 0xf0; + g |= g >> 4; + b = color16.color << 4 & 0xf0; + b |= b >> 4; + a = color16.color >> 7 & 0xe0; + a |= a >> 3 | a >> 6; + } + color32.r = r; + color32.g = g; + color32.b = b; + color32.a = a; +} + +void dMpath_RGBA_c::setGXColor(const GXColor& color) { + mColor = color; +} + +void dMpath_RGBA_c::setRGB5A3_palDt(const dMpath_RGB5A3_palDt_s& pal_data) { + GXColor color; + dMpath_ColorCnv_n::convertRGB5A3_To_GXColor(color, pal_data.field_0x0); + setGXColor(color); +} + #if DEBUG void dMpath_HIO_n::hioList_c::gen(JORMContext* mctx) { static const char* number[] = { @@ -381,7 +418,7 @@ void dRenderingFDAmap_c::preRenderingMap() { Mtx44 matrix; C_MTXOrtho(matrix, top, -top, -right, right, 0.0f, 10000.0f); GXSetProjection(matrix, GX_ORTHOGRAPHIC); - GXLoadPosMtxImm(g_mDoMtx_identity, GX_PNMTX0); + GXLoadPosMtxImm(cMtx_getIdentity(), GX_PNMTX0); GXSetCurrentMtx(0); drawBack(); } @@ -418,7 +455,7 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_F32, 0); GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_POS_XYZ, GX_F32, 0); GXSetNumTevStages(1); - GXLoadTexObj(dMpath_n::m_texObjAgg.mp_texObj[6], GX_TEXMAP0); + GXLoadTexObj(dMpath_n::m_texObjAgg.getTexObjPointer(6), GX_TEXMAP0); u16* data_p = p_line->mpData; s32 data_num = p_line->mDataNum; @@ -429,7 +466,7 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li lineColor.r = lineColor.r - 4; GXSetTevColor(GX_TEVREG1, lineColor); - for (int i = 0; i < data_num; data_p++, i++) { + for (int i = 0; i < data_num; i++) { #ifndef HYRULE_FIELD_SPEEDHACK if (i < data_num - 1) { GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO, GX_CC_C0); @@ -443,6 +480,7 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li GXTexCoord2f32(0, 0); GXPosition1x16(data_p[1]); GXTexCoord2f32(0, 0); + GXEnd(); } GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_KONST, GX_CC_TEXC, GX_CC_C1); GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV); @@ -453,6 +491,7 @@ void dRenderingFDAmap_c::renderingDecoration(dDrawPath_c::line_class const* p_li GXPosition1x16(data_p[0]); GXTexCoord2f32(0, 0); GXEnd(); + data_p++; } setTevSettingNonTextureDirectColor(); diff --git a/src/d/d_tresure.cpp b/src/d/d_tresure.cpp index bf4150d3ce..b6083b6294 100644 --- a/src/d/d_tresure.cpp +++ b/src/d/d_tresure.cpp @@ -235,18 +235,21 @@ u8 const dTres_c::typeToTypeGroup[17][2] = { {0x83, 0x0C}, {0x84, 0x0D}, {0x85, 0x0E}, {0x87, 0x0F}, {0x88, 0x10}, }; -int dTres_c::getTypeGroupNoToType(u8 i_typeGroupNo) { +u8 dTres_c::getTypeGroupNoToType(u8 i_typeGroupNo) { + JUT_ASSERT(651, i_typeGroupNo < TYPE_GROUP_ENUM_NUMBER); return typeToTypeGroup[i_typeGroupNo][0]; } u8 dTres_c::getTypeToTypeGroupNo(u8 i_type) { - int groupNo = 17; + int rt = 17; for (int i = 0; i < 17; i++) { if (i_type == typeToTypeGroup[i][0]) { - groupNo = typeToTypeGroup[i][1]; + rt = typeToTypeGroup[i][1]; break; } } - return groupNo; + JUT_ASSERT(674, rt < TYPE_GROUP_ENUM_NUMBER); + + return rt; } From 6e1fcd4dcf89c880b913bedb0c2678b0ec1c1417 Mon Sep 17 00:00:00 2001 From: hatal175 Date: Mon, 26 Jan 2026 07:20:02 +0200 Subject: [PATCH 4/5] Work on d_jdpreviwer (#3067) --- configure.py | 2 +- include/JSystem/JHostIO/JORServer.h | 4 + .../JStudio/JStudio_JPreviewer/control.h | 51 +++++++++++ include/d/d_jpreviewer.h | 9 +- .../JStudio/JStudioPreviewer/control.cpp | 8 ++ src/d/d_jpreviewer.cpp | 85 +++++++++++++++++++ src/f_op/f_op_scene.cpp | 4 + 7 files changed, 160 insertions(+), 3 deletions(-) create mode 100644 include/JSystem/JStudio/JStudio_JPreviewer/control.h create mode 100644 src/d/d_jpreviewer.cpp diff --git a/configure.py b/configure.py index 1cf2b54d5b..d5ad356688 100755 --- a/configure.py +++ b/configure.py @@ -621,7 +621,7 @@ config.libs = [ Object(MatchingFor(ALL), "f_op/f_op_overlap.cpp"), Object(MatchingFor(ALL_GCN, ALL_WII, "Shield"), "f_op/f_op_overlap_mng.cpp"), Object(MatchingFor(ALL_GCN, ALL_WII, "ShieldD"), "f_op/f_op_overlap_req.cpp"), - Object(MatchingFor(ALL_GCN, ALL_WII, "Shield"), "f_op/f_op_scene.cpp"), + Object(MatchingFor(ALL), "f_op/f_op_scene.cpp"), Object(MatchingFor(ALL_GCN, "ShieldD"), "f_op/f_op_scene_iter.cpp"), Object(MatchingFor(ALL), "f_op/f_op_scene_mng.cpp"), Object(MatchingFor(ALL), "f_op/f_op_scene_req.cpp"), diff --git a/include/JSystem/JHostIO/JORServer.h b/include/JSystem/JHostIO/JORServer.h index a695fd5faa..d92e588117 100644 --- a/include/JSystem/JHostIO/JORServer.h +++ b/include/JSystem/JHostIO/JORServer.h @@ -187,4 +187,8 @@ inline void JORReleaseMContext(JORMContext* mctx) { JORServer::getInstance()->releaseMCTX(mctx); } +inline void JOR_ENABLEEVENTCALLBACKLIST(bool enable) { + JORServer::getInstance()->enableEventCallbackList(enable); +} + #endif /* JORSERVER_H */ diff --git a/include/JSystem/JStudio/JStudio_JPreviewer/control.h b/include/JSystem/JStudio/JStudio_JPreviewer/control.h new file mode 100644 index 0000000000..5d19028ca9 --- /dev/null +++ b/include/JSystem/JStudio/JStudio_JPreviewer/control.h @@ -0,0 +1,51 @@ +#ifndef JSYSTEM_JSTUDIO_JSTUDIO_JPREVIEWER_CONTROL_H +#define JSYSTEM_JSTUDIO_JSTUDIO_JPREVIEWER_CONTROL_H + +#include "JSystem/JHostIO/JORReflexible.h" +#include "JSystem/JHostIO/JORServer.h" +#include "JSystem/JStudio/JStudioToolLibrary/interface.h" +#include "JSystem/JStudio/JStudioToolLibrary/visual.h" + +class J2DOrthoGraph; +class JUTFont; +class JUTGamePad; + +namespace JStudio { + class TControl; + class TParse; +}; + +namespace JStudioPreviewer { + class TControl : public JORReflexible, public JOREventCallbackListNode { + public: + TControl(); + virtual ~TControl() {} + void genMessage(JORMContext*); + + void interface_setPad(const JUTGamePad* pPad) { + mPad.setPad(pPad); + } + + void show_setRender(J2DOrthoGraph* pGraph, JUTFont* pFont) { + field_0x128.setRender(pGraph); + field_0x12c.setFont(pFont); + } + + void jstudio_setControl(JStudio::TControl*); + void jstudio_setParse(JStudio::TParse*); + + virtual void update(); + virtual void show2D(); + virtual void show3D(Mtx mtx); + virtual int JORAct(u32, const char*); + + private: + /* 0x018 */ u8 field_0x18[0xf8 - 0x18]; + /* 0x0F8 */ JStudioToolLibrary::TPad mPad; + /* 0x018 */ u8 field_0xfc[0x128 - 0xfc]; + /* 0x128 */ JStudioToolLibrary::TDrawPrimitive2D field_0x128; + /* 0x12C */ JStudioToolLibrary::TPrint field_0x12c; + }; +}; + +#endif diff --git a/include/d/d_jpreviewer.h b/include/d/d_jpreviewer.h index 98079c6eb4..b34880c1c0 100644 --- a/include/d/d_jpreviewer.h +++ b/include/d/d_jpreviewer.h @@ -2,6 +2,7 @@ #define D_JPREVIEWER_H #include +#include "JSystem/JStudio/JStudio_JPreviewer/control.h" namespace JStudio { class TControl; @@ -13,7 +14,7 @@ class JUTGamePad; class JUTResFont; class tParse_; -class dJprevCtrl_c /* : public JStudioPreviewer::TControl */ { +class dJprevCtrl_c : public JStudioPreviewer::TControl { public: }; @@ -21,9 +22,13 @@ public: class dJprev_c { public: dJprev_c(JStudio::TControl*, const JUTGamePad&); + ~dJprev_c(); void show3D(Mtx); void show2D(); + void create(JStudio::TControl* pControl, const JUTGamePad& pad); + void remove(); + void update(); static dJprev_c* get() { return m_myObj; } @@ -34,7 +39,7 @@ public: /* 0x08 */ JKRExpHeap* mHeap; /* 0x0C */ tParse_* m_parse; /* 0x10 */ dJprevCtrl_c* mControl; - /* 0x14 */ u8 field_0x14; + /* 0x14 */ s8 mHIOId; }; #endif /* D_JPREVIEWER_H */ diff --git a/src/JSystem/JStudio/JStudioPreviewer/control.cpp b/src/JSystem/JStudio/JStudioPreviewer/control.cpp index e69de29bb2..e04e7e50eb 100644 --- a/src/JSystem/JStudio/JStudioPreviewer/control.cpp +++ b/src/JSystem/JStudio/JStudioPreviewer/control.cpp @@ -0,0 +1,8 @@ +#include "JSystem/JSystem.h" // IWYU pragma: keep + +#include "JSystem/JStudio/JStudio_JPreviewer/control.h" + + +JStudioPreviewer::TControl::TControl() : JOREventCallbackListNode(0xc0000000,0xc00000ff,false) { + +} diff --git a/src/d/d_jpreviewer.cpp b/src/d/d_jpreviewer.cpp new file mode 100644 index 0000000000..5321d02f89 --- /dev/null +++ b/src/d/d_jpreviewer.cpp @@ -0,0 +1,85 @@ +#include "d/dolzel.h" // IWYU pragma: keep + +#include "d/d_jpreviewer.h" +#include "JSystem/JStudio/JStudio/jstudio-control.h" +#include "JSystem/J2DGraph/J2DOrthoGraph.h" +#include "JSystem/JUtility/JUTResFont.h" +#include "JSystem/JKernel/JKRHeap.h" +#include "JSystem/JKernel/JKRExpHeap.h" +#include "JSystem/JHostIO/JORServer.h" + +class tParse_ : public JStudio::TParse { +public: + tParse_() : JStudio::TParse(NULL) {} + + bool parseBlock_object(const JStudio::stb::data::TParse_TBlock_object& param_1, u32 param_2) { + u32 type = param_1.get_type(); + switch(type) { + case 'JMSG': + case -1: { + char acStack_20[10]; + JStudio::stb::data::toString_block(acStack_20, type); + + const void* id = param_1.get_ID(); + // Ignoring demo object: (%s) %s\n + OS_REPORT("デモオブジェクト無視 : (%s) %s\n", acStack_20, id); + return 1; + } + } + + return JStudio::stb::TParse::parseBlock_object(param_1, param_2); + } +}; + +dJprev_c::dJprev_c(JStudio::TControl* param_1, const JUTGamePad& param_2) { + mOrthoGraph = new J2DOrthoGraph(0.0f, 0.0f, 640.0f, 480.0f, -1.0f, 1.0f); + JUT_ASSERT(72, mOrthoGraph != NULL) + mFont = new JUTResFont((ResFONT*)JUTResFONT_Ascfont_fix12, NULL); + JUT_ASSERT(74, mFont != NULL) + m_parse = new tParse_(); + JUT_ASSERT(76, m_parse != NULL) + mHeap = JKRExpHeap::create(0x100000, JKRHeap::getRootHeap2(), NULL); + JUT_ASSERT(82, mHeap != NULL) + mControl = new dJprevCtrl_c(); + JUT_ASSERT(86, mControl != NULL) + mHIOId = mDoHIO_createChild("JStudioPreviewer", mControl); + mControl->interface_setPad(¶m_2); + mControl->show_setRender(mOrthoGraph, mFont); + mControl->jstudio_setControl(param_1); + mControl->jstudio_setParse(m_parse); + JOR_ENABLEEVENTCALLBACKLIST(1); + m_myObj = this; +} + +dJprev_c::~dJprev_c() { + mDoHIO_deleteChild(mHIOId); + delete mControl; + mHeap->destroy(); + delete m_parse; + delete mFont; + delete mOrthoGraph; + m_myObj = NULL; +} + +void dJprev_c::create(JStudio::TControl* pControl, const JUTGamePad& pad) { + JUT_ASSERT(130, m_myObj == NULL); + new dJprev_c(pControl, pad); + JUT_ASSERT(132, m_myObj != NULL); +} + +void dJprev_c::remove() { + JUT_ASSERT(147, m_myObj != NULL); + delete m_myObj; +} + +void dJprev_c::update() { + mControl->update(); +} + +void dJprev_c::show3D(Mtx mtx) { + mControl->show3D(mtx); +} + +void dJprev_c::show2D() { + mControl->show2D(); +} diff --git a/src/f_op/f_op_scene.cpp b/src/f_op/f_op_scene.cpp index 304a734577..ba1a8e0175 100644 --- a/src/f_op/f_op_scene.cpp +++ b/src/f_op/f_op_scene.cpp @@ -8,6 +8,10 @@ #include "f_op/f_op_scene_mng.h" #include "m_Do/m_Do_hostIO.h" +#if DEBUG +#pragma nosyminline on +#endif + static int fopScn_Draw(scene_class* i_this) { int ret = fpcNd_DrawMethod((nodedraw_method_class*)i_this->submethod, i_this); return ret; From a4246921a3f88de480199091385d10b41443e888 Mon Sep 17 00:00:00 2001 From: kipcode66 Date: Mon, 26 Jan 2026 17:20:19 -0500 Subject: [PATCH 5/5] Std7 (#3068) * fix standard compiler error for d_a_tag_TWgate * fix standard compiler errors for J3DJoint * fix regression in ShieldD --- include/JSystem/J3DGraphAnimator/J3DJoint.h | 1 + src/d/actor/d_a_tag_TWgate.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h index eeecdabbd4..4482e5d618 100644 --- a/include/JSystem/J3DGraphAnimator/J3DJoint.h +++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h @@ -1,6 +1,7 @@ #ifndef J3DJOINT_H #define J3DJOINT_H +#include "JSystem/J3DGraphAnimator/J3DAnimation.h" #include "JSystem/J3DGraphBase/J3DTransform.h" #include "JSystem/J3DGraphBase/J3DMaterial.h" diff --git a/src/d/actor/d_a_tag_TWgate.cpp b/src/d/actor/d_a_tag_TWgate.cpp index 85084747c9..75d949d4d9 100644 --- a/src/d/actor/d_a_tag_TWgate.cpp +++ b/src/d/actor/d_a_tag_TWgate.cpp @@ -356,9 +356,16 @@ void daTagTWGate_c::executeDemoFilone3() { } } +#ifndef __MWERKS__ + int modelSts; +#endif switch (*cutName) { case 0x30303031: +#ifndef __MWERKS__ + modelSts = downloadModels(); +#else int modelSts = downloadModels(); +#endif if (modelSts == 1) { eventManager.cutEnd(staffId); } else if (modelSts == -1) {