diff options
| author | robojumper <robojumper@gmail.com> | 2026-01-29 23:33:34 +0100 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2026-01-30 23:38:28 +0100 |
| commit | 75f3be60d26e205f1681afb44a3b4d5a72f75d80 (patch) | |
| tree | 2e399dc27bddb24282a0b6714367e6678fce97de /include/d | |
| parent | 62fc066b605680af84cc921aba070b62e7df8ff7 (diff) | |
A start
Diffstat (limited to 'include/d')
| -rw-r--r-- | include/d/flag/storyflag_map.h | 2 | ||||
| -rw-r--r-- | include/d/lyt/d2d.h | 4 | ||||
| -rw-r--r-- | include/d/lyt/d_lyt_note.h | 4 | ||||
| -rw-r--r-- | include/d/lyt/d_lyt_suiryu_score.h | 148 | ||||
| -rw-r--r-- | include/d/lyt/meter/d_lyt_meter.h | 20 | ||||
| -rw-r--r-- | include/d/lyt/meter/d_lyt_meter_ganbari_gauge.h | 13 | ||||
| -rw-r--r-- | include/d/t/d_t_clef_game.h | 17 |
7 files changed, 195 insertions, 13 deletions
diff --git a/include/d/flag/storyflag_map.h b/include/d/flag/storyflag_map.h index 9f82fc70..4feeed1f 100644 --- a/include/d/flag/storyflag_map.h +++ b/include/d/flag/storyflag_map.h @@ -427,7 +427,7 @@ enum StoryFlags_e { /** [Music Scroll for Tadtones (sets before the collecting, unsets when collecting is done)] * Story Flag #82 (0x0052) - JP 805ACD6B 0x08 / US 805A9AEB 0x08 */ - STORYFLAG_82, + STORYFLAG_HAS_TADTONE_SCROLL, /** [Ghirahim 1 defeated (Skyview Spring layer 1 / Skyview Boss Room layer 1)] * Story Flag #83 (0x0053) - JP 805ACD69 0x80 / US 805A9AE9 0x80 diff --git a/include/d/lyt/d2d.h b/include/d/lyt/d2d.h index d650ee9e..fcf416ef 100644 --- a/include/d/lyt/d2d.h +++ b/include/d/lyt/d2d.h @@ -245,6 +245,10 @@ struct AnmGroupBase_c { return mpFrameCtrl->isEndReached(); } + inline bool isStartReached() const { + return mpFrameCtrl->isStartReached(); + } + inline void setRate(f32 rate) { mpFrameCtrl->setRate(rate); } diff --git a/include/d/lyt/d_lyt_note.h b/include/d/lyt/d_lyt_note.h index 1e437031..138f6254 100644 --- a/include/d/lyt/d_lyt_note.h +++ b/include/d/lyt/d_lyt_note.h @@ -20,6 +20,10 @@ public: f32 getField0x260() const; void setFrame(f32); + bool isStateWait() const { + return mStateMgr.isState(StateID_Wait); + } + private: STATE_FUNC_DECLARE(dLytNote_c, Wait); STATE_FUNC_DECLARE(dLytNote_c, In); diff --git a/include/d/lyt/d_lyt_suiryu_score.h b/include/d/lyt/d_lyt_suiryu_score.h new file mode 100644 index 00000000..758c541d --- /dev/null +++ b/include/d/lyt/d_lyt_suiryu_score.h @@ -0,0 +1,148 @@ +#ifndef D_LYT_SUIRYU_SCORE_H +#define D_LYT_SUIRYU_SCORE_H + +#include "d/d_base.h" +#include "d/lyt/d2d.h" +#include "d/lyt/d_lyt_note.h" +#include "m/m_vec.h" +#include "nw4r/lyt/lyt_pane.h" +#include "s/s_State.hpp" + +struct dLytNote2_c { + /* 0x000 */ dLytNote_c mNote; + /* 0x278 */ UNKWORD field_0x278; +}; + +class dLytMeterSuiryuScoreBase_c { +public: + dLytMeterSuiryuScoreBase_c() + : mStateMgr(*this), field_0x2250(0), field_0x2262(0), field_0x2263(0), field_0x2264(0) {} + virtual ~dLytMeterSuiryuScoreBase_c() {} + + bool build(d2d::ResAccIf_c *resAcc); + bool remove(); + bool execute(); + bool draw(); + + void startIn(); + void startOut(); + void setColor0(s32 idx); + void setColor1(s32 idx); + void alphaForwards(s32 idx, f32 rate); + void alphaBackwards(s32 idx, f32 rate); + void stopMove(); + + void fn_802978F0(u8); + + nw4r::lyt::Pane *getInOutAllPane() const { + return mLyt.findPane("N_inOutAll_00"); + } + +private: + STATE_FUNC_DECLARE(dLytMeterSuiryuScoreBase_c, None); + STATE_FUNC_DECLARE(dLytMeterSuiryuScoreBase_c, In); + STATE_FUNC_DECLARE(dLytMeterSuiryuScoreBase_c, Wait); + STATE_FUNC_DECLARE(dLytMeterSuiryuScoreBase_c, Out); + + void initAnm(); + bool fn_80298600(); + void fn_80298B10(); + + /* 0x0004 */ UI_STATE_MGR_DECLARE(dLytMeterSuiryuScoreBase_c); + /* 0x0040 */ d2d::LytBase_c mLyt; + /* 0x00D0 */ d2d::AnmGroup_c mAnm[129]; + /* 0x2110 */ nw4r::lyt::Pane *mpPanes[77]; + /* 0x2244 */ nw4r::lyt::Pane *mpPaneInOutAll; + /* 0x2248 */ mVec2_c mMainTranslate; + + /* 0x2250 */ u8 field_0x2250; + /* 0x2251 */ u8 field_0x2251[17]; + + /* 0x2262 */ u8 field_0x2262; + /* 0x2263 */ u8 field_0x2263; + /* 0x2264 */ UNKWORD field_0x2264; +}; + +class dLytMeterClefMain_c { +private: + static const s32 NUM_TADTONE_GROUPS = 17; + +public: + dLytMeterClefMain_c() + : mStateMgr(*this), + field_0x0040(0), + field_0x5E4C(0), + field_0x5E4D(0), + field_0x5F35(0), + field_0x5F36(0), + field_0x5F38(0), + field_0x5F3C(0), + field_0x5F40(0) {} + virtual ~dLytMeterClefMain_c() {} + + bool build(d2d::ResAccIf_c *resAcc); + bool remove(); + bool execute(); + bool draw(); + +private: + void startIn(); + void startOut(); + void fn_80299DF0(); + void fn_80299E30(); + void fn_8029A050(); + void fn_8029A200(); + void fn_8029A260(); + void fn_8029A2C0(); + void fn_8029A3B0(); + void fn_8029A440(); + + STATE_FUNC_DECLARE(dLytMeterClefMain_c, None); + STATE_FUNC_DECLARE(dLytMeterClefMain_c, In); + STATE_FUNC_DECLARE(dLytMeterClefMain_c, Wait); + STATE_FUNC_DECLARE(dLytMeterClefMain_c, Out); + + /* 0x0004 */ UI_STATE_MGR_DECLARE(dLytMeterClefMain_c); + /* 0x0040 */ u8 field_0x0040; + /* 0x0044 */ dLytMeterSuiryuScoreBase_c mBase; + /* 0x22AC */ dLytNote2_c mNotes[24]; + /* 0x5E4C */ u8 field_0x5E4C; + /* 0x5E4D */ u8 field_0x5E4D; + + /* 0x5E4E */ u8 field_0x5E4E[NUM_TADTONE_GROUPS]; + /* 0x5E5F */ u8 field_0x5E5F[NUM_TADTONE_GROUPS]; + /* 0x5E70 */ u8 field_0x5E70[NUM_TADTONE_GROUPS]; + /* 0x5E81 */ u8 field_0x5E81[NUM_TADTONE_GROUPS]; + /* 0x5E92 */ u8 field_0x5E92[NUM_TADTONE_GROUPS]; + /* 0x5EA4 */ UNKWORD field_0x5EA4[NUM_TADTONE_GROUPS]; + /* 0x5EE8 */ u8 field_0x5EE8[77]; + + /* 0x5F35 */ u8 field_0x5F35; + /* 0x5F36 */ u8 field_0x5F36; + + /* 0x5F38 */ UNKWORD field_0x5F38; + /* 0x5F3C */ UNKWORD field_0x5F3C; + /* 0x5F40 */ UNKWORD field_0x5F40; +}; + +// Alternative name ideas: dLytMeterClef_c, dLytMeterSuiryuScore_c +// The profile name is LYT_SUIRYU_SCORE so I went with that class name, +// but the fact that it contains a dLytMeterClefMain_c (known name) is suspicious... +class dLytSuiryuScore_c : public dBase_c { +public: + dLytSuiryuScore_c() {} + virtual ~dLytSuiryuScore_c() {} + + virtual int create() override; + virtual int doDelete() override; + virtual int execute() override; + virtual int draw() override; + +private: + static dLytSuiryuScore_c *sInstance; + + /* 0x0060 */ d2d::ResAccIf_c mResAcc; + /* 0x03D8 */ dLytMeterClefMain_c mMain; +}; + +#endif diff --git a/include/d/lyt/meter/d_lyt_meter.h b/include/d/lyt/meter/d_lyt_meter.h index 972144d7..d5eebc37 100644 --- a/include/d/lyt/meter/d_lyt_meter.h +++ b/include/d/lyt/meter/d_lyt_meter.h @@ -91,7 +91,7 @@ public: bool isNotSilentRealmOrLoftwing(); - bool fn_800C9F70(); + bool shouldHideLytClef(); bool fn_800C9FE0(); bool isPopupOpen(); @@ -102,7 +102,7 @@ public: void fn_800D5630(); bool isInModeMap(); bool isInModePause(); - bool fn_800D56B0(); + bool shouldBeHiddenGeneral(); void checkPaneVisibility(); bool execute(); @@ -198,7 +198,7 @@ private: /* 0x13772 */ bool field_0x13772; /* 0x13773 */ bool field_0x13773; /* 0x13774 */ bool mHelpOpen; - /* 0x13775 */ bool field_0x13775; + /* 0x13775 */ bool mIsCollectingTadtoneScroll; /* 0x13776 */ bool mTimerVisible; /* 0x13777 */ bool mBirdGaugeVisible; /* 0x13778 */ bool mSkyGaugeVisible; @@ -310,8 +310,8 @@ public: mMain.mHelpOpen = val; } - void setMeterField_0x13775(bool val) { - mMain.field_0x13775 = val; + void setIsCollectingTadtoneScroll(bool val) { + mMain.mIsCollectingTadtoneScroll = val; } bool getMeterField_0x1377F() const { @@ -334,6 +334,12 @@ public: mFlags = 0xFFFFFFFF; } + static void setGanbariClefRelated(bool arg) { + if (sInstance != nullptr) { + sInstance->mMain.mGanbariGauge.setClefRelated(arg); + } + } + static dLytMeterCrossBtn_c::CrossIcon_e getCrossIconDown() { if (sInstance != nullptr) { return sInstance->mMain.mCrossBtn.getIconDown(); @@ -452,9 +458,9 @@ public: } } - static bool getfn_800C9F70() { + static bool shouldHideLytClef() { if (sInstance != nullptr) { - return sInstance->mMain.fn_800C9F70(); + return sInstance->mMain.shouldHideLytClef(); } else { return false; } diff --git a/include/d/lyt/meter/d_lyt_meter_ganbari_gauge.h b/include/d/lyt/meter/d_lyt_meter_ganbari_gauge.h index 2356a36f..4140f60d 100644 --- a/include/d/lyt/meter/d_lyt_meter_ganbari_gauge.h +++ b/include/d/lyt/meter/d_lyt_meter_ganbari_gauge.h @@ -35,6 +35,10 @@ public: mStaminaPercent = value; } + void setClefRelated(bool v) { + mClefRelated = v; + } + void setField_0x539(bool v) { field_0x539 = v; } @@ -87,12 +91,11 @@ private: /* 0x548 */ s32 field_0x548; /* 0x54C */ f32 field_0x54C; /* 0x550 */ f32 field_0x550; - /* 0x554 */ f32 field_0x554; - u8 field_0x558; - u8 field_0x559; - bool field_0x55A; - u8 field_0x55B; + /* 0x558 */ u8 field_0x558; + /* 0x559 */ bool mClefRelated; + /* 0x55A */ bool field_0x55A; + /* 0x55B */ u8 field_0x55B; }; STATIC_ASSERT(sizeof(dLytMeterGanbariGauge_c) == 0x55C); diff --git a/include/d/t/d_t_clef_game.h b/include/d/t/d_t_clef_game.h index 2864ad10..5f95745c 100644 --- a/include/d/t/d_t_clef_game.h +++ b/include/d/t/d_t_clef_game.h @@ -8,7 +8,24 @@ public: dTgClefGame_c() {} virtual ~dTgClefGame_c() {} + static dTgClefGame_c *GetInstance() { + return sInstance; + } + + u8 getField_0x14C(s32 idx) const { + return field_0x14C[idx]; + } + + u8 getField_0x15D(s32 idx) const { + return field_0x15D[idx]; + } + private: + static dTgClefGame_c *sInstance; + + /* 0x0FC */ u8 _0x0FC[0x14C - 0x0FC]; + /* 0x14C */ u8 field_0x14C[17]; + /* 0x15D */ u8 field_0x15D[17]; }; #endif |
