diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2026-03-06 22:30:25 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-06 22:30:25 -0800 |
| commit | 30e839c28be83fb07bfbe008d3eb9eb9127e3801 (patch) | |
| tree | 5b63a788dcbc6cbefc46ca6a9c2f2a3248be1dfe /include/d | |
| parent | 6c72b91f8e477ee94ccdc56b94605140e9f2abd6 (diff) | |
d_s_room / d_s_name / d_a_title debug work (#3123)
* d_s_room / d_s_name debug work
* camera_class rtti fix
* d_a_title debug / handle shield rel changes
* fix shield build
* fix regressions
Diffstat (limited to 'include/d')
| -rw-r--r-- | include/d/actor/d_a_title.h | 9 | ||||
| -rw-r--r-- | include/d/d_bg_parts.h | 2 | ||||
| -rw-r--r-- | include/d/d_bright_check.h | 6 | ||||
| -rw-r--r-- | include/d/d_com_inf_game.h | 29 | ||||
| -rw-r--r-- | include/d/d_drawlist.h | 4 | ||||
| -rw-r--r-- | include/d/d_file_select.h | 10 | ||||
| -rw-r--r-- | include/d/d_menu_collect.h | 4 | ||||
| -rw-r--r-- | include/d/d_s_name.h | 71 | ||||
| -rw-r--r-- | include/d/d_s_room.h | 8 | ||||
| -rw-r--r-- | include/d/d_stage.h | 42 | ||||
| -rw-r--r-- | include/d/dolzel_rel.h | 16 |
11 files changed, 113 insertions, 88 deletions
diff --git a/include/d/actor/d_a_title.h b/include/d/actor/d_a_title.h index 2e498c8d2e..465fe689c1 100644 --- a/include/d/actor/d_a_title.h +++ b/include/d/actor/d_a_title.h @@ -25,7 +25,6 @@ class CPaneMgrAlpha; */ class daTitle_c : public fopAc_ac_c { public: - //daTitle_c() {} int CreateHeap(); int create(); static int createHeapCallBack(fopAc_ac_c*); @@ -47,6 +46,10 @@ public: int Draw(); int Delete(); + #if VERSION == VERSION_SHIELD_DEBUG + void KeyWaitPosMove(); + #endif + private: /* 0x568 */ request_of_phase_process_class mPhaseReq; /* 0x570 */ JKRHeap* mpHeap; @@ -60,11 +63,11 @@ private: /* 0x5E4 */ dDlst_daTitle_c mTitle; /* 0x5EC */ JUTFont* mpFont; /* 0x5F0 */ u8 field_0x5f0[8]; - /* 0x5F8 */ u8 field_0x5f8; + /* 0x5F8 */ u8 mIsDispLogo; /* 0x5F9 */ u8 field_0x5f9; /* 0x5FA */ u8 field_0x5fa; /* 0x5FB */ u8 mProcID; - /* 0x5FC */ u8 field_0x5fc; + /* 0x5FC */ u8 mWaitTimer; /* 0x600 */ CPaneMgrAlpha* field_0x600; /* 0x604 */ u8 field_0x604; }; // Size: 0x608 diff --git a/include/d/d_bg_parts.h b/include/d/d_bg_parts.h index adfb97d2b9..a8dba41165 100644 --- a/include/d/d_bg_parts.h +++ b/include/d/d_bg_parts.h @@ -189,7 +189,7 @@ public: }; dBgp_c(); - ~dBgp_c(); + ~dBgp_c() {} void create(s8, void*); int remove(); diff --git a/include/d/d_bright_check.h b/include/d/d_bright_check.h index d3f48ce9a7..d8686944e6 100644 --- a/include/d/d_bright_check.h +++ b/include/d/d_bright_check.h @@ -31,6 +31,12 @@ public: void modeMove(); void _draw(); + void draw() { + _draw(); + } + + u8 isEnd() { return mCompleteCheck; } + /* 0x04 */ JKRArchive* mArchive; /* 0x08 */ dDlst_BrightCheck_c mBrightCheck; /* 0x18 */ u8 mMode; diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index d8556e2fde..18165eb628 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -213,6 +213,7 @@ public: }; class camera_class; +class camera_process_class; class dComIfG_camera_info_class { public: dComIfG_camera_info_class() {} @@ -949,12 +950,7 @@ public: class dComIfG_inf_c { public: - dComIfG_inf_c() { this->ct(); } - ~dComIfG_inf_c() {} - void ct(); - static void createBaseCsr(); - -#if PLATFORM_WII || VERSION == VERSION_SHIELD_DEBUG +#if PLATFORM_WII || PLATFORM_SHIELD class baseCsr_c : public mDoGph_gInf_c::csr_c { public: class navi_c { @@ -987,6 +983,9 @@ public: static void particleExecute(); static navi_c* getNavi() { return m_navi; } + dDlst_blo_c* getCsr() { return &field_0x8; } + void onNavi() { field_0x13d = 1; } + /* 0x008 */ dDlst_blo_c field_0x8; /* 0x130 */ dDlst_blo_c::anm_c anm; /* 0x13C */ u8 field_0x13c; @@ -1007,6 +1006,18 @@ public: }; #endif + dComIfG_inf_c() { this->ct(); } + ~dComIfG_inf_c() {} + void ct(); + +#if PLATFORM_WII || PLATFORM_SHIELD + static void createBaseCsr(); + + static baseCsr_c* getBaseCsr() { + return m_baseCsr; + } +#endif + /* 0x00000 */ dSv_info_c info; /* 0x00F38 */ dComIfG_play_c play; /* 0x05F64 */ dDlst_list_c drawlist; @@ -1027,7 +1038,7 @@ public: #endif static __d_timer_info_c dComIfG_mTimerInfo; - #if PLATFORM_WII || VERSION == VERSION_SHIELD_DEBUG + #if PLATFORM_WII || PLATFORM_SHIELD static baseCsr_c* m_baseCsr; #endif }; // Size: 0x1DE10 @@ -3319,8 +3330,8 @@ inline void dComIfGp_setWindow(u8 i, f32 param_1, f32 param_2, f32 param_3, f32 camID, mode); } -inline camera_class* dComIfGp_getCamera(int idx) { - return g_dComIfG_gameInfo.play.getCamera(idx); +inline camera_process_class* dComIfGp_getCamera(int idx) { + return (camera_process_class*)g_dComIfG_gameInfo.play.getCamera(idx); } inline void dComIfGp_setCamera(int i, camera_class* cam) { diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h index c287b16ce9..04369d346d 100644 --- a/include/d/d_drawlist.h +++ b/include/d/d_drawlist.h @@ -67,6 +67,8 @@ public: } + void setBlackColor(u64 i_tag, JUtility::TColor i_color); + class anm_c { public: inline anm_c() { @@ -325,7 +327,7 @@ public: private: /* 0x00 */ view_port_class mViewport; /* 0x28 */ s8 mCameraID; - /* 0x29 */ s8 mMode; + /* 0x29 */ u8 mMode; }; STATIC_ASSERT(sizeof(dDlst_window_c) == 0x2C); diff --git a/include/d/d_file_select.h b/include/d/d_file_select.h index db10b927e2..8cf8aa7dbc 100644 --- a/include/d/d_file_select.h +++ b/include/d/d_file_select.h @@ -452,10 +452,14 @@ public: void errorMsgCheck(); #endif - bool getFadeFlag() { return mFadeFlag; } + void draw() { + _draw(); + } + + u8 getFadeFlag() { return mFadeFlag; } int isDataNew(u8 i) { return mIsDataNew[i]; } int isSelectEnd() { return mIsSelectEnd; } - u8 getSelectNum() { return mSelectNum; } + int getSelectNum() { return mSelectNum; } void setUseType(u8 type) { mUseType = type; } /* 0x0004 */ u8 field_0x04[4]; @@ -663,7 +667,7 @@ public: /* 0x03B2 */ u16 field_0x03b2; /* 0x03B4 */ s32 field_0x03b4; /* 0x03B8 */ SaveDataBuf mSaveData[SAVEDATA_NUM]; - /* 0x2374 */ bool mFadeFlag; + /* 0x2374 */ u8 mFadeFlag; /* 0x2375 */ bool mHasDrawn; #if PLATFORM_GCN diff --git a/include/d/d_menu_collect.h b/include/d/d_menu_collect.h index 127ae7ee2b..01ee32f6d4 100644 --- a/include/d/d_menu_collect.h +++ b/include/d/d_menu_collect.h @@ -209,6 +209,10 @@ public: virtual ~dMenu_Collect3D_c(); + static void setViewPortOffsetY(f32 i_offset) { + mViewOffsetY = i_offset; + } + static f32 mViewOffsetY; private: diff --git a/include/d/d_s_name.h b/include/d/d_s_name.h index 0c55f40930..73d3d703be 100644 --- a/include/d/d_s_name.h +++ b/include/d/d_s_name.h @@ -4,66 +4,37 @@ #include "f_op/f_op_camera_mng.h" #include "f_op/f_op_scene.h" -class dSn_HIO_c { +#include "d/d_file_select.h" +#include "d/d_bright_check.h" + +class dSn_HIO_c : public JORReflexible { public: dSn_HIO_c(); virtual ~dSn_HIO_c() {} - /* 0x4 */ s8 field_0x4; + void genMessage(JORMContext*); + + /* 0x4 */ s8 id; /* 0x5 */ u8 mFileSelWaitTime; }; -class dScnName_camera_c : public camera_process_class { +class dScnName_camera_c : public camera_class { public: dScnName_camera_c() { field_0x22f = 84; } virtual ~dScnName_camera_c() {} }; -// remove later and use header instead -class dFile_select_c { -public: - dFile_select_c(JKRArchive*); - virtual ~dFile_select_c(); - void _create(); - void _move(); - void _draw(); - - bool getFadeFlag() { return mFadeFlag; } - int isDataNew(u8 i) { return mDataNew[i]; } - int isSelectEnd() { return mSelectEnd; } - u8 getSelectNum() { return mSelectNum; } - void setUseType(u8 type) { mUseType = type; } - -private: - u8 field_0x4[0x254]; - /* 0x0258 */ u8 mDataNew[3]; - /* 0x025B */ u8 field_0x25b[0x265 - 0x25b]; - /* 0x0265 */ u8 mSelectNum; - /* 0x0266 */ u8 field_0x266[0x270 - 0x266]; - /* 0x0270 */ bool mSelectEnd; - /* 0x0271 */ u8 field_0x271[0x3b0 - 0x271]; - /* 0x03B0 */ u8 mUseType; - /* 0x03B1 */ u8 field_0x3b1[0x2374 - 0x3b1]; - /* 0x2374 */ bool mFadeFlag; - /* 0x2375 */ u8 field_0x2375[0x237c - 0x2375]; -}; - -// remove later and use header instead -class dBrightCheck_c { -public: - dBrightCheck_c(JKRArchive*); - virtual ~dBrightCheck_c(); - void _move(); - void _draw(); - - bool isEnd() { return mEnd; } - - u8 field_0x4[0x15]; - /* 0x19 */ bool mEnd; -}; - class dScnName_c : public scene_class { public: + enum dScnName_PROC { + dScnName_PROC_FileSelectOpen, + dScnName_PROC_FileSelectMain, + dScnName_PROC_FileSelectClose, + dScnName_PROC_BrightCheckOpen, + dScnName_PROC_BrightCheck, + dScnName_PROC_ChangeGameScene, + }; + dScnName_c() {} s32 create(); @@ -88,15 +59,15 @@ private: #if VERSION == VERSION_GCN_PAL u8 field_0x1c4_pal[0x28]; #endif - /* 0x1C4 */ request_of_phase_process_class field_0x1c4; + /* 0x1C4 */ request_of_phase_process_class phase; /* 0x1CC */ JKRExpHeap* mHeap; /* 0x1D0 */ JKRExpHeap* field_0x1d0; /* 0x1D4 */ dScnName_camera_c mCamera; /* 0x414 */ dFile_select_c* dFs_c; /* 0x418 */ dBrightCheck_c* mBrightCheck; - /* 0x41C */ u8 field_0x41c; - /* 0x41D */ u8 field_0x41d; - /* 0x41E */ u8 field_0x41e; + /* 0x41C */ u8 mDrawProc; + /* 0x41D */ u8 mProc; + /* 0x41E */ u8 mWaitTimer; /* 0x41F */ u8 field_0x41f; /* 0x420 */ u8 field_0x420; }; diff --git a/include/d/d_s_room.h b/include/d/d_s_room.h index d261bda101..cc50b3cad7 100644 --- a/include/d/d_s_room.h +++ b/include/d/d_s_room.h @@ -7,12 +7,12 @@ class dStage_roomDt_c; class room_of_scene_class : public scene_class { public: - /* 0x1C4 */ request_of_phase_process_class field_0x1c4; - /* 0x1CC */ void* mpDzrRes; - /* 0x1D0 */ dStage_roomDt_c* mpRoomDt; + /* 0x1C4 */ request_of_phase_process_class phase; + /* 0x1CC */ void* roomInfo; + /* 0x1D0 */ dStage_roomDt_c* roomDt; /* 0x1D4 */ s8 field_0x1d4; /* 0x1D5 */ u8 field_0x1d5; - /* 0x1D6 */ u8 field_0x1d6[2]; + /* 0x1D6 */ u8 unk_0x1d6[0x1D8 - 0x1D6]; /* 0x1D8 */ u8 field_0x1d8; }; diff --git a/include/d/d_stage.h b/include/d/d_stage.h index a4b72182bb..d18be4f09f 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -1084,20 +1084,32 @@ public: /* 0x04 */ void** m_dzs; }; - struct nameData { - /* 0x0 */ s8 m_num; - /* 0x1 */ char m_names[32][10]; // ? + /** + * dStage_bankName (made up name) + * - Represent's Stage resource "name.bin" + */ + struct dStage_bankName { + /* 0x0 */ u8 m_num; // number of name entries + /* 0x1 */ char m_names[1][10]; // variable number of name entries (up to 32 max), each 10 characters long }; - struct bankDataEntry { - u8 field_0x0; - u8 mLayerNo; - u8 field_0x2[0x20]; + /** + * dStage_bankDataEntry (made up name) + * - Entry that goes into dStage_bankData + */ + struct dStage_bankDataEntry { + u8 roomNo; // required room ID for the bank + u8 layerNo; // required layer for the bank + u8 nameIDs[32]; // indexes into dStage_bankName m_names list. 0xFF used for unused entries }; - struct bankData { + /** + * dStage_bankData (made up name) + * - Represent's Stage resource "bank.bin" + */ + struct dStage_bankData { /* 0x0 */ u8 m_num; - /* 0x1 */ bankDataEntry m_entries[32]; // ? + /* 0x1 */ dStage_bankDataEntry m_entries[1]; // variable number of entries }; dStage_roomControl_c() {} @@ -1124,8 +1136,8 @@ public: static int getNextStayNo() { return mNextStayNo; } static BOOL GetTimePass() { return m_time_pass; } static void SetTimePass(int i_TimePass) { m_time_pass = i_TimePass; } - static nameData* getArcBankName() { return mArcBankName; } - static bankData* getArcBankData() { return mArcBankData; } + static dStage_bankName* getArcBankName() { return mArcBankName; } + static dStage_bankData* getArcBankData() { return mArcBankData; } static void createRoomDzs(u8 i_num) { m_roomDzs.create(i_num); } static void removeRoomDzs() { m_roomDzs.remove(); } static void* addRoomDzs(u8 i_num, u8 roomNo) { return m_roomDzs.add(i_num, roomNo); } @@ -1214,7 +1226,9 @@ public: static void onNoChangeRoom() { mNoChangeRoom = true; } #if DEBUG - static void setBgp(int, void*); + static void setBgp(int i_roomNo, void* i_bgp) { + mBgp[i_roomNo] = i_bgp; + } #endif static const int MEMORY_BLOCK_MAX = 19; @@ -1224,8 +1238,8 @@ public: static dStage_roomStatus_c mStatus[0x40]; static char mDemoArcName[10]; static fpc_ProcID mProcID; - static nameData* mArcBankName; - static bankData* mArcBankData; + static dStage_bankName* mArcBankName; + static dStage_bankData* mArcBankData; static roomDzs_c m_roomDzs; static s8 mStayNo; static s8 mOldStayNo; diff --git a/include/d/dolzel_rel.h b/include/d/dolzel_rel.h index 6e08fbd66e..c925632315 100644 --- a/include/d/dolzel_rel.h +++ b/include/d/dolzel_rel.h @@ -1,10 +1,20 @@ #ifndef DOLZEL_REL_H #define DOLZEL_REL_H -#if __MWERKS__ && !defined(DECOMPCTX) -#include "d/dolzel_rel.mch" +// Shield versions move some RELs into the DOL, so need a way to switch which +// precompiled headers are being used depending on some variable +#if __FORCE_REL_IN_DOL__ + #if __MWERKS__ && !defined(DECOMPCTX) + #include "d/dolzel.mch" + #else + #include "d/dolzel.pch" + #endif #else -#include "d/dolzel_rel.pch" + #if __MWERKS__ && !defined(DECOMPCTX) + #include "d/dolzel_rel.mch" + #else + #include "d/dolzel_rel.pch" + #endif #endif #endif // DOLZEL_REL_H |
