From 657ea580235246455b6fefde212654ea9d830ed9 Mon Sep 17 00:00:00 2001 From: TakaRikka <38417346+TakaRikka@users.noreply.github.com> Date: Fri, 25 Apr 2025 10:53:30 -0700 Subject: d_a_bg mostly matching. update version symbols / add platform macros (#2410) * d_a_bg mostly matching * update version symbols from new dtk * add version platform macros * small fix --- include/d/actor/d_a_bg.h | 21 ++++++++++----------- include/d/d_stage.h | 5 ++++- include/global.h | 15 ++++++++++++++- 3 files changed, 28 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/d/actor/d_a_bg.h b/include/d/actor/d_a_bg.h index dd6f7dc1af..3f8431bd34 100644 --- a/include/d/actor/d_a_bg.h +++ b/include/d/actor/d_a_bg.h @@ -31,12 +31,12 @@ public: /* 0x4 */ u8 field_0x4; }; -struct daBg_unkData { - /* 0x00 */ J3DModel* mpBgModel; - /* 0x04 */ daBg_btkAnm_c* mpBgBtk; - /* 0x08 */ daBg_brkAnm_c* mpBgBrk; - /* 0x0C */ dKy_tevstr_c* mpTevStr; - /* 0x10 */ f32 mBtkAnmSpeed; +struct daBg_Part { + /* 0x00 */ J3DModel* model; + /* 0x04 */ daBg_btkAnm_c* btk; + /* 0x08 */ daBg_brkAnm_c* brk; + /* 0x0C */ dKy_tevstr_c* tevstr; + /* 0x10 */ f32 btk_speed; }; // Size: 0x14 /** @@ -50,16 +50,15 @@ struct daBg_unkData { class daBg_c : public fopAc_ac_c { public: /* 80457BF8 */ const char* setArcName(); - /* 804582B8 */ int createHeap(); + /* 804582B8 */ inline int createHeap(); /* 80458788 */ ~daBg_c(); - /* 804588C4 */ int draw(); - /* 8045906C */ int create(); - + /* 804588C4 */ inline int draw(); + /* 8045906C */ inline int create(); inline int execute(); private: /* 0x568 */ u8 field_0x568[0x570 - 0x568]; - /* 0x570 */ daBg_unkData mBgData[6]; + /* 0x570 */ daBg_Part mBgParts[6]; /* 0x5E8 */ dBgW* mpBgW; /* 0x5EC */ dBgWKCol* mpKCol; /* 0x5F0 */ u8 field_0x5f0; diff --git a/include/d/d_stage.h b/include/d/d_stage.h index 7656b16e70..e5dc1e0ff5 100644 --- a/include/d/d_stage.h +++ b/include/d/d_stage.h @@ -1074,7 +1074,10 @@ public: static s8 getStayNo() { return mStayNo; } static u8 getRegionNo(int i_roomNo) { return mStatus[i_roomNo].mRegionNo; } static s8 getMemoryBlockID(int i_roomNo) { return mStatus[i_roomNo].mMemBlockID; } - dKy_tevstr_c* getTevStr(int i_roomNo) { return &mStatus[i_roomNo].mKyTevStr; } + dKy_tevstr_c* getTevStr(int i_roomNo) { + JUT_ASSERT(2675, 0 <= i_roomNo && i_roomNo < 64); + return &mStatus[i_roomNo].mKyTevStr; + } void setStatusFlag(int i_roomNo, u8 flag) { JUT_ASSERT(2679, 0 <= i_roomNo && i_roomNo < 64); mStatus[i_roomNo].mFlag = flag; diff --git a/include/global.h b/include/global.h index a5b3b6ea9a..fde8844360 100644 --- a/include/global.h +++ b/include/global.h @@ -6,7 +6,20 @@ #define VERSION_GCN_USA 0 #define VERSION_GCN_PAL 1 #define VERSION_GCN_JPN 2 -#define VERSION_SHIELD_DEBUG 3 +#define VERSION_WII_USA_R0 3 +#define VERSION_WII_USA_R2 4 +#define VERSION_WII_PAL 5 +#define VERSION_WII_JPN 6 +#define VERSION_WII_KOR 7 +#define VERSION_WII_USA_KIOSK 8 +#define VERSION_WII_PAL_KIOSK 9 +#define VERSION_SHIELD 10 +#define VERSION_SHIELD_PROD 11 +#define VERSION_SHIELD_DEBUG 12 + +#define PLATFORM_GCN (VERSION >= VERSION_GCN_USA && VERSION <= VERSION_GCN_JPN) +#define PLATFORM_WII (VERSION >= VERSION_WII_USA_R0 && VERSION <= VERSION_WII_PAL_KIOSK) +#define PLATFORM_SHIELD (VERSION >= VERSION_SHIELD && VERSION <= VERSION_SHIELD_DEBUG) #define ALIGN_DECL(ALIGNMENT) __attribute__((aligned(ALIGNMENT))) -- cgit v1.2.3