From 89ccf4c7ef3dee9fd488eac19ccc2f62c920c28a Mon Sep 17 00:00:00 2001 From: Max Roncace Date: Sat, 29 Nov 2025 15:11:21 -0500 Subject: d_a_bg debug work + matching for retail (#2890) --- include/d/actor/d_a_bg.h | 1 + include/d/actor/d_a_suspend.h | 3 +-- include/d/d_bg_parts.h | 14 ++++++++++++ include/d/d_stage.h | 50 ++++++++++++++++++++++++++----------------- 4 files changed, 46 insertions(+), 22 deletions(-) create mode 100644 include/d/d_bg_parts.h (limited to 'include/d') diff --git a/include/d/actor/d_a_bg.h b/include/d/actor/d_a_bg.h index 3f8431bd34..ec59849c76 100644 --- a/include/d/actor/d_a_bg.h +++ b/include/d/actor/d_a_bg.h @@ -55,6 +55,7 @@ public: /* 804588C4 */ inline int draw(); /* 8045906C */ inline int create(); inline int execute(); + inline int isDelete(); private: /* 0x568 */ u8 field_0x568[0x570 - 0x568]; diff --git a/include/d/actor/d_a_suspend.h b/include/d/actor/d_a_suspend.h index fc4657a3e7..a19b8d8eab 100644 --- a/include/d/actor/d_a_suspend.h +++ b/include/d/actor/d_a_suspend.h @@ -58,8 +58,7 @@ public: /* 804D5118 */ int create(); static void reset(int roomNo) { - room_c* room = (room_c*)mRoom; // tmp - room[roomNo].reset(); + mRoom[roomNo].reset(); } u32 getScale() { return fopAcM_GetParam(this) >> 0x1E; } diff --git a/include/d/d_bg_parts.h b/include/d/d_bg_parts.h new file mode 100644 index 0000000000..e1dee27800 --- /dev/null +++ b/include/d/d_bg_parts.h @@ -0,0 +1,14 @@ +#ifndef D_D_BG_PARTS +#define D_D_BG_PARTS + +#include "f_op/f_op_actor.h" + +class dBgp_c { +public: + int registBg(fopAc_ac_c*); + void draw(fopAc_ac_c*); + int execute(bool); + void releaseBg(); +}; + +#endif /* D_D_BG_PARTS */ diff --git a/include/d/d_stage.h b/include/d/d_stage.h index a9df8d063f..94b9d0dc3c 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -2,6 +2,7 @@ #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" @@ -1019,7 +1020,7 @@ public: /* 0x68 */ int mVrboxcolNumInfo; }; // Size: 0x6C -class dBgW_base; +class dBgW_Base; class dStage_roomStatus_c { public: @@ -1032,7 +1033,7 @@ public: /* 0x3F8 */ s8 mMemBlockID; /* 0x3F9 */ u8 mRegionNo; /* 0x3FC */ int mProcID; - /* 0x400 */ dBgW_base* mpBgW; + /* 0x400 */ dBgW_Base* mpBgW; int getZoneNo() const { return mZoneNo; } }; // Size: 0x404 @@ -1090,6 +1091,13 @@ public: /* 80024954 */ static bool resetArchiveBank(int); /* 80024DB0 */ static void SetTimePass(int i_TimePass) { m_time_pass = i_TimePass; } /* 8025BAAC */ static void setZoneNo(int, int); + static dBgp_c* getBgp(int i_roomNo) { +#ifdef DEBUG + // NONMATCHING +#else + return NULL; +#endif + } static BOOL GetTimePass() { return m_time_pass; } static s8 getStayNo() { return mStayNo; } @@ -1120,14 +1128,19 @@ public: static void setStatusProcID(int i_roomNo, fpc_ProcID i_id) { mStatus[i_roomNo].mProcID = i_id; } static int getStatusProcID(int i_roomNo) { return mStatus[i_roomNo].mProcID; } static void setRegionNo(int i_roomNo, u8 i_regionNo) { mStatus[i_roomNo].mRegionNo = i_regionNo; } - static void setZoneCount(int i_roomNo, int count) { - JUT_ASSERT(2737, 0 <= i_roomNo && i_roomNo < 64); - mStatus[i_roomNo].mZoneCount = count; + + u8 checkStatusFlag(int i_roomNo, u8 flag) const { + return cLib_checkBit(mStatus[i_roomNo].mFlag, flag); } - static void setMemoryBlockID(int i_roomNo, int i_blockID) { - JUT_ASSERT(2753, 0 <= i_roomNo && i_roomNo < 64); - mStatus[i_roomNo].mMemBlockID = i_blockID; + void onStatusFlag(int i_roomNo, u8 flag) { + JUT_ASSERT(2691, 0 <= i_roomNo && i_roomNo < 64); + return cLib_onBit(mStatus[i_roomNo].mFlag, flag); + } + + void offStatusFlag(int i_roomNo, u8 flag) { + JUT_ASSERT(2695, 0 <= i_roomNo && i_roomNo < 64); + return cLib_offBit(mStatus[i_roomNo].mFlag, flag); } static void setFileList2(int i_roomNo, dStage_FileList2_dt_c* list) { @@ -1135,22 +1148,19 @@ public: mStatus[i_roomNo].mRoomDt.setFileList2Info(list); } - static void setBgW(int param_0, dBgW_base* i_bgw) { - mStatus[param_0].mpBgW = i_bgw; - } - - u8 checkStatusFlag(int i_roomNo, u8 flag) const { - return cLib_checkBit(mStatus[i_roomNo].mFlag, flag); + static void setZoneCount(int i_roomNo, int count) { + JUT_ASSERT(2737, 0 <= i_roomNo && i_roomNo < 64); + mStatus[i_roomNo].mZoneCount = count; } - void offStatusFlag(int i_roomNo, u8 flag) { - JUT_ASSERT(2695, 0 <= i_roomNo && i_roomNo < 64); - return cLib_offBit(mStatus[i_roomNo].mFlag, flag); + static void setMemoryBlockID(int i_roomNo, int i_blockID) { + JUT_ASSERT(2753, 0 <= i_roomNo && i_roomNo < 64); + mStatus[i_roomNo].mMemBlockID = i_blockID; } - void onStatusFlag(int i_roomNo, u8 flag) { - JUT_ASSERT(2691, 0 <= i_roomNo && i_roomNo < 64); - return cLib_onBit(mStatus[i_roomNo].mFlag, flag); + static void setBgW(int i_roomNo, dBgW_Base* i_bgw) { + JUT_ASSERT(2778, 0 <= i_roomNo && i_roomNo < 64); + mStatus[i_roomNo].mpBgW = i_bgw; } static JKRExpHeap* getMemoryBlockHeap(int i_no) { return mMemoryBlock[i_no]; } -- cgit v1.2.3