diff options
| author | robojumper <robojumper@gmail.com> | 2025-04-16 22:43:03 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-04-21 21:51:03 +0200 |
| commit | e8e3de41a17a4dccf258937661e1b06fcdfee8cf (patch) | |
| tree | 5ae81bc0c40d3297ab9205c0061af14ddff56b73 /include | |
| parent | 2d4c0f046847397c1e77fe871082dc4ab2294b7e (diff) | |
d_lyt_meter_heart halfway
Diffstat (limited to 'include')
| -rw-r--r-- | include/d/a/d_a_player.h | 8 | ||||
| -rw-r--r-- | include/d/lyt/meter/d_lyt_meter_heart.h | 43 | ||||
| -rw-r--r-- | include/d/lyt/meter/d_lyt_meter_key.h | 6 | ||||
| -rw-r--r-- | include/d/lyt/meter/d_lyt_meter_timer.h | 2 | ||||
| -rw-r--r-- | include/toBeSorted/file_manager.h | 20 |
5 files changed, 65 insertions, 14 deletions
diff --git a/include/d/a/d_a_player.h b/include/d/a/d_a_player.h index 2adfe26a..692bb763 100644 --- a/include/d/a/d_a_player.h +++ b/include/d/a/d_a_player.h @@ -251,6 +251,12 @@ public: /* 0x3C8 */ nw4r::g3d::ResFile mSwordRes; /* 0x3CC */ u8 _0x3CC[0x5B4 - 0x3CC]; /* 0x5B4 */ m3d::anmMatClr_c mAnmMatClr; + /* 0x5E0 */ u8 _0x5E0[0x4564 - 0x5E0]; + /* 0x4564 */ f32 field_0x4564; + + f32 getField_0x4564() const { + return field_0x4564; + } f32 getAnmMatClrFrame() const { return mAnmMatClr.getFrame(0); @@ -310,6 +316,8 @@ public: static s32 getCurrentBugNetType(); static bool isItemRestrictedByBokoBase(ITEM_ID item); + + static u32 getCurrentHealthCapacity(); }; #endif diff --git a/include/d/lyt/meter/d_lyt_meter_heart.h b/include/d/lyt/meter/d_lyt_meter_heart.h index 9fa52725..c1e60d93 100644 --- a/include/d/lyt/meter/d_lyt_meter_heart.h +++ b/include/d/lyt/meter/d_lyt_meter_heart.h @@ -2,6 +2,7 @@ #define D_LYT_METER_HEART_H #include "d/lyt/d2d.h" +#include "nw4r/lyt/lyt_pane.h" class dLytMeterHeart_c : public d2d::dSubPane { public: @@ -9,16 +10,46 @@ public: virtual bool build(d2d::ResAccIf_c *resAcc) override; virtual bool remove() override; virtual bool execute() override; - virtual nw4r::lyt::Pane *getPane() override; - virtual d2d::LytBase_c *getLyt() override; - virtual const char *getName() const override; + virtual nw4r::lyt::Pane *getPane() override { + return mLyt.getLayout()->GetRootPane(); + } + virtual d2d::LytBase_c *getLyt() override { + return &mLyt; + } + virtual const char *getName() const override { + return mLyt.getName(); + } virtual ~dLytMeterHeart_c() {} + private: + u8 getCurrentHealth() const; + u8 getCurrentHealthCapacity() const; + void realizeHeartsState(); + void executeInternal(); + s32 getNumDisplayedHearts() const; + s32 getDisplayedHealthCapacity() const; - d2d::dLytSub mLyt; - /* 0xD8 */ d2d::AnmGroup_c mAnm[26]; - /* 0x??? */ u8 padding[0x12DA4 - 0x12D24]; + /* 0x008 */ d2d::dLytSub mLyt; + /* 0x09C */ d2d::AnmGroup_c mAnm[26]; + /* 0x71C */ nw4r::lyt::Pane *mpHeartPanes[20]; + /* 0x76C */ nw4r::lyt::Pane *mpAlphaPane; + /* 0x770 */ nw4r::lyt::Pane *mpMainPane; + /* 0x774 */ s32 mCurrentHealth; + /* 0x778 */ s32 mCurrentHealthCapacity; + /* 0x77C */ s32 mStoredHealth; + /* 0x780 */ s32 mStoredHealthCapacity; + /* 0x784 */ s32 field_0x784; + /* 0x788 */ s32 field_0x788; + /* 0x78C */ s32 field_0x78C; + /* 0x790 */ s32 field_0x790; + /* 0x794 */ u8 field_0x794; + /* 0x795 */ u8 field_0x795; + /* 0x796 */ u8 field_0x796; + /* 0x797 */ u8 field_0x797; + /* 0x798 */ u8 field_0x798; + /* 0x799 */ u8 field_0x799; + /* 0x79A */ u8 field_0x79A; }; #endif diff --git a/include/d/lyt/meter/d_lyt_meter_key.h b/include/d/lyt/meter/d_lyt_meter_key.h index 57a5c05a..e6f444b2 100644 --- a/include/d/lyt/meter/d_lyt_meter_key.h +++ b/include/d/lyt/meter/d_lyt_meter_key.h @@ -26,6 +26,8 @@ private: STATE_FUNC_DECLARE(dLytMeterKakeraKey_c, Active); STATE_FUNC_DECLARE(dLytMeterKakeraKey_c, Off); + STATE_MGR_DEFINE_UTIL_CHANGESTATE(dLytMeterKakeraKey_c); + /* 0x000 */ UI_STATE_MGR_DECLARE(dLytMeterKakeraKey_c); /* 0x03C */ d2d::dLytSub mLyt; /* 0x0D0 */ d2d::AnmGroup_c mAnm[8]; @@ -61,6 +63,8 @@ private: STATE_FUNC_DECLARE(dLytMeterBossKey_c, Active); STATE_FUNC_DECLARE(dLytMeterBossKey_c, Off); + STATE_MGR_DEFINE_UTIL_CHANGESTATE(dLytMeterBossKey_c); + /* 0x004 */ UI_STATE_MGR_DECLARE(dLytMeterBossKey_c); /* 0x040 */ d2d::dLytSub mLyt; /* 0x0D4 */ d2d::AnmGroup_c mAnm[5]; @@ -94,6 +98,8 @@ private: STATE_FUNC_DECLARE(dLytMeterSmallKey_c, Active); STATE_FUNC_DECLARE(dLytMeterSmallKey_c, Off); + STATE_MGR_DEFINE_UTIL_CHANGESTATE(dLytMeterSmallKey_c); + /* 0x004 */ UI_STATE_MGR_DECLARE(dLytMeterSmallKey_c); /* 0x040 */ d2d::dLytSub mLyt; /* 0x0D4 */ d2d::AnmGroup_c mAnm[5]; diff --git a/include/d/lyt/meter/d_lyt_meter_timer.h b/include/d/lyt/meter/d_lyt_meter_timer.h index 3630de19..6e4fe817 100644 --- a/include/d/lyt/meter/d_lyt_meter_timer.h +++ b/include/d/lyt/meter/d_lyt_meter_timer.h @@ -4,8 +4,6 @@ #include "d/lyt/d2d.h" #include "m/m_color.h" #include "s/s_State.hpp" -#include "s/s_StateMgr.hpp" - class LytMeterTimerPart1_c : public d2d::dSubPane { public: diff --git a/include/toBeSorted/file_manager.h b/include/toBeSorted/file_manager.h index ca69b908..28750912 100644 --- a/include/toBeSorted/file_manager.h +++ b/include/toBeSorted/file_manager.h @@ -149,17 +149,17 @@ public: /* 8000B6A0 */ u8 getShieldPouchSlot(); /* 8000B6F0 */ void setAirPotionTimer(u16 time); - /* 8000B720 */ u16 getAirPotionTimer(); + /* 8000B720 */ u16 getAirPotionTimer() const; /* 8000B770 */ void setAirPotionPlusTimer(u16 time); - /* 8000B7A0 */ u16 getAirPotionPlusTimer(); + /* 8000B7A0 */ u16 getAirPotionPlusTimer() const; /* 8000B7F0 */ void setStaminaPotionTimer(u16 time); - /* 8000B820 */ u16 getStaminaPotionTimer(); + /* 8000B820 */ u16 getStaminaPotionTimer() const; /* 8000B870 */ void setStaminaPotionPlusTimer(u16 time); - /* 8000B8A0 */ u16 getStaminaPotionPlusTimer(); + /* 8000B8A0 */ u16 getStaminaPotionPlusTimer() const; /* 8000B8F0 */ void setGuardianPotionTimer(u16 time); - /* 8000B920 */ u16 getGuardianPotionTimer(); + /* 8000B920 */ u16 getGuardianPotionTimer() const; /* 8000B970 */ void setGuardianPotionPlusTimer(u16 time); - /* 8000B9A0 */ u16 getGuardianPotionPlusTimer(); + /* 8000B9A0 */ u16 getGuardianPotionPlusTimer() const; /* 8000B9F0 */ void setDowsingSlotIdx(u8 idx); /* 8000BA20 */ u8 getDowsingSlotIdx(); @@ -285,6 +285,14 @@ public: return sInstance; } + bool hasGuardianPotionPlus() const { + return getGuardianPotionPlusTimer() != 0; + } + + bool hasGuardianPotionNormal() const { + return getGuardianPotionTimer() != 0; + } + private: static FileManager *sInstance; }; |
