diff options
| author | Max Roncace <me@caseif.net> | 2026-02-28 15:13:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-28 12:13:57 -0800 |
| commit | ebe7c7aabc32e0842aaaf1c5cf1ab6cf5737417f (patch) | |
| tree | 25fb02da5b81be6ed97f3eccc2964a076d49daf4 /include | |
| parent | c900a043b89786d5e594ec883d9acd92e0db6bc7 (diff) | |
ShieldD: Clean up a bunch of 99% matching TUs (#3113)
* d_a_npc_ks debug code 100%
* d_a_npc_rafrel debug code 100%
* d_a_npc_inko minor improvements
* d_a_npc_gro debug code 100%
* d_a_npc_pachi_taro debug code 100%
* d_a_npc_passer debug code 100%
* d_a_npc_pachi_maro debug code 100%
* d_a_npc_post debug code 100%
* d_a_obj_bemos debug improvements
* d_a_obj_scannon_ten debug code 100%
* d_a_b_mgn debug code 100%
* d_a_e_fb debug code 100%
* d_a_e_gb debug code 100%
* d_a_e_hz debug code 100%
* d_a_e_cr_egg debug code 100%
* d_a_e_md debug code 100%
* d_a_e_wb debug code 100%
* d_a_obj_mirror_6pole debug code 100%
* d_a_obj_spinLift debug data fixes
* d_a_obj_pdwall debug data fixes
* d_a_obj_ss_drink debug code almost matching
* d_a_obj_poFire debug code 100%
* d_a_obj_picture debug code 100%
* d_a_obj_dust debug code 100%
* d_a_obj_fallobj debug code 100%
* d_a_obj_itamato debug code almost matching
* d_a_obj_syRock debug code 100%
* d_a_obj_katatsumuri debug code 100%
* d_a_obj_wood_statue debug code 100%
* d_a_obj_lv6egate debug code 100%
* d_a_tag_qs minor debug symbol fixes
* d_a_obj_twGate debug code 100%
* d_a_obj_lv6SwGate debug code 100%
* d_a_obj_lv6swturn debug code 100%
* d_a_obj_lv6Tenbin debug code 100%
* d_a_obj_kwheel01 debug code 100%
* Fix RTTI order regression (cM3dGCyl vs cBgS_*)
Diffstat (limited to 'include')
| -rw-r--r-- | include/d/actor/d_a_e_md.h | 2 | ||||
| -rw-r--r-- | include/d/actor/d_a_itembase.h | 1 | ||||
| -rw-r--r-- | include/d/actor/d_a_obj_itamato.h | 32 | ||||
| -rw-r--r-- | include/d/actor/d_a_obj_katatsumuri.h | 19 | ||||
| -rw-r--r-- | include/d/actor/d_a_obj_mirror_6pole.h | 10 | ||||
| -rw-r--r-- | include/d/actor/d_a_obj_scannon_ten.h | 6 | ||||
| -rw-r--r-- | include/d/actor/d_a_obj_twGate.h | 10 | ||||
| -rw-r--r-- | include/d/d_attention.h | 6 | ||||
| -rw-r--r-- | include/d/d_bg_w.h | 2 | ||||
| -rw-r--r-- | include/d/d_com_inf_game.h | 6 | ||||
| -rw-r--r-- | include/d/d_s_play.h | 1 | ||||
| -rw-r--r-- | include/d/dolzel_base.pch | 1 | ||||
| -rw-r--r-- | include/f_op/f_op_actor_mng.h | 1 | ||||
| -rw-r--r-- | include/f_op/f_op_scene_tag.h | 1 | ||||
| -rw-r--r-- | include/f_pc/f_pc_create_req.h | 7 | ||||
| -rw-r--r-- | include/f_pc/f_pc_stdcreate_req.h | 20 |
16 files changed, 56 insertions, 69 deletions
diff --git a/include/d/actor/d_a_e_md.h b/include/d/actor/d_a_e_md.h index 440b22b477..0c52030a77 100644 --- a/include/d/actor/d_a_e_md.h +++ b/include/d/actor/d_a_e_md.h @@ -23,7 +23,7 @@ public: void CheckHit(); void WaitAction(); void HalfBreakAction(); - bool VibAction(); + u8 VibAction(); void DummyAction(); void RealAction(); void Action(); diff --git a/include/d/actor/d_a_itembase.h b/include/d/actor/d_a_itembase.h index ccac214e45..fa4d246062 100644 --- a/include/d/actor/d_a_itembase.h +++ b/include/d/actor/d_a_itembase.h @@ -6,6 +6,7 @@ #include "d/d_a_itembase_static.h" #include "f_op/f_op_actor_mng.h" #include "m_Do/m_Do_ext.h" +#include "SSystem/SComponent/c_phase.h" struct daItemBase_data { /* 0x00 */ f32 mGravity; diff --git a/include/d/actor/d_a_obj_itamato.h b/include/d/actor/d_a_obj_itamato.h index cb358289eb..0aece512cd 100644 --- a/include/d/actor/d_a_obj_itamato.h +++ b/include/d/actor/d_a_obj_itamato.h @@ -15,11 +15,39 @@ * */ -class daObj_ItaMato_HIO_c; +struct daObj_ItaMato_HIOParam { + /* 0x00 */ f32 attn_offset; + /* 0x04 */ f32 gravity; + /* 0x08 */ f32 scale; + /* 0x0C */ f32 real_shadow_size; + /* 0x10 */ f32 shake_pow; +}; + +class daObj_ItaMato_Param_c { +public: + virtual ~daObj_ItaMato_Param_c() {} + + static daObj_ItaMato_HIOParam const m; +}; + +#if DEBUG +#define OBJ_ITAMATO_HIO_CLASS daObj_ItaMato_HIO_c + +class daObj_ItaMato_HIO_c : public mDoHIO_entry_c { +public: + daObj_ItaMato_HIO_c(); + void genMessage(JORMContext* ctx); + void listenPropertyEvent(const JORPropertyEvent*); + + /* 0x8 */ daObj_ItaMato_HIOParam m; +}; +#else +#define OBJ_ITAMATO_HIO_CLASS daObj_ItaMato_Param_c +#endif class daObj_ItaMato_c : public fopAc_ac_c { private: - /* 0x568 */ daObj_ItaMato_HIO_c* mHIO; + /* 0x568 */ OBJ_ITAMATO_HIO_CLASS* mHIO; /* 0x56C */ request_of_phase_process_class mPhase; /* 0x574 */ J3DModel* mpModels[2]; /* 0x57C */ dBgS_ObjAcch mBgc; diff --git a/include/d/actor/d_a_obj_katatsumuri.h b/include/d/actor/d_a_obj_katatsumuri.h index 9a49e04a0c..e481d3eb3a 100644 --- a/include/d/actor/d_a_obj_katatsumuri.h +++ b/include/d/actor/d_a_obj_katatsumuri.h @@ -93,23 +93,4 @@ private: STATIC_ASSERT(sizeof(daObjKAT_c) == 0xa74); -class daObj_KatHIO_c : public JORReflexible { -public: - daObj_KatHIO_c(); - virtual ~daObj_KatHIO_c() {} - - void genMessage(JORMContext* ctx) { - // Golden Snail - ctx->genLabel("黄金蟲(カタツムリ)", 0x80000001); - // Model scale (male) - ctx->genSlider("モデルスケール(オス)", &this->mScaleMale, 0.1f, 4.0f); - // Model scale (female) - ctx->genSlider("モデルスケール(メス)", &this->mScaleFemale, 0.1f, 4.0f); - } - - s8 field_0x4; - f32 mScaleFemale; - f32 mScaleMale; -}; - #endif /* D_A_OBJ_KATATSUMURI_H */ diff --git a/include/d/actor/d_a_obj_mirror_6pole.h b/include/d/actor/d_a_obj_mirror_6pole.h index 99ccd3f82f..702b1cb66b 100644 --- a/include/d/actor/d_a_obj_mirror_6pole.h +++ b/include/d/actor/d_a_obj_mirror_6pole.h @@ -43,11 +43,11 @@ public: void setAnmSpeed(f32 speed) { mpBck->setPlaySpeed(speed); } bool isSwitch() { - return fopAcM_isSwitch(this, getSwitchNo()) || - /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ - dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) || - /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ - dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354]); + return (fopAcM_isSwitch(this, getSwitchNo()) || + /* dSv_event_flag_c::F_0361 - Arbiter's Grounds - Spun the spinning pillars */ + dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[361]) || + /* dSv_event_flag_c::F_0354 - Cutscene - [cutscene] Mirror complete */ + dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[354])) != false; } inline void setAction(Mode_e i_action); diff --git a/include/d/actor/d_a_obj_scannon_ten.h b/include/d/actor/d_a_obj_scannon_ten.h index 6847257840..503a1e0522 100644 --- a/include/d/actor/d_a_obj_scannon_ten.h +++ b/include/d/actor/d_a_obj_scannon_ten.h @@ -13,6 +13,8 @@ */ class daObjSCannonTen_c : public fopAc_ac_c, public request_of_phase_process_class { public: + typedef void (daObjSCannonTen_c::*ExeProc)(void); + enum daSCannonTen_exeMode { MODE_WAIT, MODE_ORDER_EVT, @@ -55,8 +57,8 @@ public: void exeEmtLine(); void delEmtAll(); - static void (daObjSCannonTen_c::*s_exeProc[])(); - static void (daObjSCannonTen_c::*s_demoExeProc[][2])(); + static const ExeProc s_exeProc[]; + static const ExeProc s_demoExeProc[][2]; private: /* 0x574 */ J3DModel* mpModel; diff --git a/include/d/actor/d_a_obj_twGate.h b/include/d/actor/d_a_obj_twGate.h index 5ba018a2e0..683a7f18fb 100644 --- a/include/d/actor/d_a_obj_twGate.h +++ b/include/d/actor/d_a_obj_twGate.h @@ -34,14 +34,4 @@ private: STATIC_ASSERT(sizeof(daTwGate_c) == 0x5fc); -class daTwGate_HIO_c : public fOpAcm_HIO_entry_c { -public: - daTwGate_HIO_c(); - ~daTwGate_HIO_c() {} - - void genMessage(JORMContext* ctx); - - /* 0x4 */ f32 mRange; -}; - #endif /* D_A_OBJ_TWGATE_H */ diff --git a/include/d/d_attention.h b/include/d/d_attention.h index 61b640d4ff..455516e54f 100644 --- a/include/d/d_attention.h +++ b/include/d/d_attention.h @@ -271,10 +271,10 @@ public: } fopAc_ac_c* getCatghTarget() { return mCatghTarget.getCatghTarget(); } u8 getCatchChgItem() { return mCatghTarget.getChangeItem(); } - void CatchRequest(fopAc_ac_c* param_0, u8 param_1, f32 i_horizontalDist, f32 i_upDist, + int CatchRequest(fopAc_ac_c* param_0, u8 param_1, f32 i_horizontalDist, f32 i_upDist, f32 i_downDist, s16 i_angle, int param_5) { - mCatghTarget.request(param_0, param_1, i_horizontalDist, i_upDist, i_downDist, i_angle, - param_5); + return mCatghTarget.request(param_0, param_1, i_horizontalDist, i_upDist, i_downDist, + i_angle, param_5); } fopAc_ac_c* getLookTarget() { return mLookTarget.getLookTarget(); diff --git a/include/d/d_bg_w.h b/include/d/d_bg_w.h index f7f38688f7..bf65baccdf 100644 --- a/include/d/d_bg_w.h +++ b/include/d/d_bg_w.h @@ -220,7 +220,7 @@ public: bool ChkNoCalcVtx() { return mFlags & NO_CALC_VTX_e; } bool ChkFlush() { return field_0x91 & 8; } void SetLock() { mFlags |= (u8)LOCK_e; } - void OffRoofRegist() { field_0x91 |= 0x4; } + void OffRoofRegist() { field_0x91 |= (u8)0x4; } void OnRoofRegist() { field_0x91 &= ~0x04; } bool ChkRoofRegist() { return field_0x91 & 4;} cBgD_Vtx_t* GetVtxTbl() const { return pm_vtx_tbl; } diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index c4278cb3cb..20101bc074 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -2761,10 +2761,10 @@ inline u8 dComIfGp_att_getCatchChgItem() { return dComIfGp_getAttention()->getCatchChgItem(); } -inline void dComIfGp_att_CatchRequest(fopAc_ac_c* param_0, u8 param_1, f32 i_horizontalDist, +inline int dComIfGp_att_CatchRequest(fopAc_ac_c* param_0, u8 param_1, f32 i_horizontalDist, f32 i_upDist, f32 i_downDist, s16 i_angle, int param_5) { - dComIfGp_getAttention()->CatchRequest(param_0, param_1, i_horizontalDist, i_upDist, i_downDist, - i_angle, param_5); + return dComIfGp_getAttention()->CatchRequest(param_0, param_1, i_horizontalDist, i_upDist, + i_downDist, i_angle, param_5); } inline fopAc_ac_c* dComIfGp_att_getLookTarget() { diff --git a/include/d/d_s_play.h b/include/d/d_s_play.h index 6698a628e9..7181cf0b60 100644 --- a/include/d/d_s_play.h +++ b/include/d/d_s_play.h @@ -4,6 +4,7 @@ #include "d/d_s_play_env.h" #include "f_op/f_op_scene.h" #include "m_Do/m_Do_hostIO.h" +#include "SSystem/SComponent/c_phase.h" class mDoDvdThd_mountXArchive_c; class mDoDvdThd_toMainRam_c; diff --git a/include/d/dolzel_base.pch b/include/d/dolzel_base.pch index f360763e7c..ac45474890 100644 --- a/include/d/dolzel_base.pch +++ b/include/d/dolzel_base.pch @@ -36,6 +36,7 @@ #include "SSystem/SComponent/c_bg_s_poly_info.h" // IWYU pragma: export #include "SSystem/SComponent/c_bg_s_gnd_chk.h" // IWYU pragma: export #include "SSystem/SComponent/c_m3d_g_cyl.h" // IWYU pragma: export +#include "SSystem/SComponent/c_phase.h" // IWYU pragma: export #include "m_Do/m_Do_hostIO.h" // IWYU pragma: export #include "f_op/f_op_actor.h" // IWYU pragma: export #include "JSystem/JParticle/JPAEmitter.h" // IWYU pragma: export diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index 868671d2d8..83f009a41e 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -11,6 +11,7 @@ #include "f_op/f_op_draw_tag.h" #include "f_pc/f_pc_manager.h" #include "m_Do/m_Do_hostIO.h" +#include "SSystem/SComponent/c_phase.h" #define fopAcM_ct(ptr, ClassName) \ if (!fopAcM_CheckCondition(ptr, fopAcCnd_INIT_e)) { \ diff --git a/include/f_op/f_op_scene_tag.h b/include/f_op/f_op_scene_tag.h index f96ab41f48..ad26ab3564 100644 --- a/include/f_op/f_op_scene_tag.h +++ b/include/f_op/f_op_scene_tag.h @@ -2,7 +2,6 @@ #define F_F_OP_SCENE_TAG_H_ #include "f_pc/f_pc_node.h" -#include "SSystem/SComponent/c_phase.h" class scene_tag_class { public: diff --git a/include/f_pc/f_pc_create_req.h b/include/f_pc/f_pc_create_req.h index fa8dd1b6ae..eaff9ed3a6 100644 --- a/include/f_pc/f_pc_create_req.h +++ b/include/f_pc/f_pc_create_req.h @@ -2,7 +2,6 @@ #ifndef F_PC_CREATE_REQ_H_ #define F_PC_CREATE_REQ_H_ -#include "SSystem/SComponent/c_phase.h" #include "f_pc/f_pc_create_tag.h" #include "f_pc/f_pc_method.h" #include "f_pc/f_pc_method_tag.h" @@ -11,8 +10,12 @@ typedef struct base_process_class base_process_class; typedef struct layer_class layer_class; +// declare our own typedef instead of cPhs__Handler to avoid pulling in c_phase.h +// (which causes RTTI ordering issues in relation to cM3dGCyl) +typedef int (*fpcCtRq_phase_handler)(void*); + typedef struct create_request_method_class { - /* 0x0 */ cPhs__Handler phase_handler; + /* 0x0 */ fpcCtRq_phase_handler phase_handler; /* 0x4 */ process_method_func cancel_method; /* 0x8 */ process_method_func delete_method; } create_request_method_class; diff --git a/include/f_pc/f_pc_stdcreate_req.h b/include/f_pc/f_pc_stdcreate_req.h index 5c561f8bdc..8037f1bfcd 100644 --- a/include/f_pc/f_pc_stdcreate_req.h +++ b/include/f_pc/f_pc_stdcreate_req.h @@ -7,26 +7,6 @@ typedef struct layer_class layer_class; typedef int (*stdCreateFunc)(void*, void*); -typedef struct standard_create_request_class { - /* 0x00 */ create_request base; - /* 0x48 */ request_of_phase_process_class phase_request; - /* 0x50 */ s16 process_name; - /* 0x54 */ void* process_append; - /* 0x58 */ stdCreateFunc create_post_method; - /* 0x5C */ void* unk_0x5C; -#if DEBUG - /* 0x60 */ int unk_0x60; -#endif -} standard_create_request_class; - -int fpcSCtRq_phase_CreateProcess(standard_create_request_class* i_request); -int fpcSCtRq_phase_SubCreateProcess(standard_create_request_class* i_request); -int fpcSCtRq_phase_IsComplete(standard_create_request_class* i_request); -int fpcSCtRq_phase_PostMethod(standard_create_request_class* i_request); -int fpcSCtRq_phase_Done(standard_create_request_class* i_request); -int fpcSCtRq_Handler(standard_create_request_class* i_request); -int fpcSCtRq_Delete(standard_create_request_class* i_request); -int fpcSCtRq_Cancel(standard_create_request_class* i_request); fpc_ProcID fpcSCtRq_Request(layer_class* i_layer, s16 i_procName, stdCreateFunc i_createFunc, void* param_4, void* i_append); |
