summaryrefslogtreecommitdiff
path: root/include/d
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-05-16 01:21:45 +0200
committerrobojumper <robojumper@gmail.com>2025-05-16 01:21:45 +0200
commitdf17fa201a9ff8fcc46c3de9fc5fccfef3975f97 (patch)
tree17d2458b53bbedd6b4ed327f3a899f0c31a6d1a8 /include/d
parentc5e28a00bfeec92866d67e5adf38070526c6b419 (diff)
dLytDoButton_c OK
Diffstat (limited to 'include/d')
-rw-r--r--include/d/a/d_a_player.h2
-rw-r--r--include/d/lyt/d2d.h4
-rw-r--r--include/d/lyt/d_lyt_do_button.h69
-rw-r--r--include/d/lyt/d_lyt_unknowns.h1
4 files changed, 71 insertions, 5 deletions
diff --git a/include/d/a/d_a_player.h b/include/d/a/d_a_player.h
index ed043bff..522b09fd 100644
--- a/include/d/a/d_a_player.h
+++ b/include/d/a/d_a_player.h
@@ -340,6 +340,8 @@ public:
static s32 getCurrentBugNetType();
static s32 getCurrentlyEquippedShieldType();
+ static bool isInBambooCuttingMinigame();
+
static bool isItemRestrictedByBokoBase(ITEM_ID item);
static u32 getCurrentHealthCapacity();
diff --git a/include/d/lyt/d2d.h b/include/d/lyt/d2d.h
index c4e3e533..fc19bfb9 100644
--- a/include/d/lyt/d2d.h
+++ b/include/d/lyt/d2d.h
@@ -230,6 +230,10 @@ struct AnmGroupBase_c {
mpFrameCtrl->setRate(rate);
}
+ inline f32 getRate() const {
+ return mpFrameCtrl->getRate();
+ }
+
inline bool isEnabled() const {
return (mFlags & ANMGROUP_FLAG_ENABLE) != 0;
}
diff --git a/include/d/lyt/d_lyt_do_button.h b/include/d/lyt/d_lyt_do_button.h
index efe6d25e..5893f817 100644
--- a/include/d/lyt/d_lyt_do_button.h
+++ b/include/d/lyt/d_lyt_do_button.h
@@ -9,6 +9,58 @@
class dLytDobutton_c {
public:
+ // TODO: figure out that these mean. The two pane arrays in d_lyt_do_button.cpp might help
+ enum Icon_e {
+ ICON_0 = 0,
+ ICON_1 = 1,
+ ICON_2 = 2,
+ ICON_3 = 3,
+ ICON_4 = 4,
+ ICON_5 = 5,
+ ICON_6 = 6,
+ ICON_7 = 7,
+ ICON_8 = 8,
+ ICON_9 = 9,
+ ICON_10 = 10,
+ ICON_11 = 11,
+ ICON_12 = 12,
+ ICON_13 = 13,
+ ICON_14 = 14,
+ ICON_15 = 15,
+ ICON_16 = 16,
+ ICON_17 = 17,
+ ICON_18 = 18,
+ ICON_19 = 19,
+ ICON_20 = 20,
+ ICON_21 = 21,
+ ICON_22 = 22,
+ ICON_23 = 23,
+ ICON_24 = 24,
+ ICON_25 = 25,
+ ICON_26 = 26,
+ ICON_27 = 27,
+ ICON_28 = 28,
+ ICON_29 = 29,
+ ICON_30 = 30,
+ ICON_31 = 31,
+ ICON_32 = 32,
+ ICON_33 = 33,
+ ICON_34 = 34,
+ ICON_35 = 35,
+ ICON_36 = 36,
+ ICON_37 = 37,
+ ICON_38 = 38,
+ ICON_39 = 39,
+ ICON_40 = 40,
+
+ ICON_NONE = 41,
+ };
+
+ // 001-Action.msbt - Enum for ACT_DO
+ // This is actually just the first part of ACT_INFO, but
+ // LytDoButtonRelated has a full conversion table
+ // from Act_IE_e -> Act_Do_e
+
enum Act_Do_e {
ACT_DO_CLIMB_UP = 0,
ACT_DO_JUMP = 1,
@@ -104,6 +156,7 @@ public:
ACT_DO_LEAN = 91,
ACT_DO_PRESS = 92,
+ // why two of them?
ACT_DO_NONE = 93,
ACT_DO_INVALID = 94,
};
@@ -136,7 +189,7 @@ public:
if (sInstance != nullptr) {
return sInstance->field_0x480;
} else {
- return 0x29;
+ return ICON_NONE;
}
}
@@ -144,7 +197,8 @@ public:
if (sInstance != nullptr) {
return sInstance->mNextDoActionToShow;
} else {
- return 0x29;
+ // @bug (?) should this be ACT_DO_INVALID?
+ return ICON_NONE;
}
}
@@ -152,7 +206,7 @@ public:
if (sInstance != nullptr) {
return sInstance->fn_8010E5E0();
} else {
- return 0x29;
+ return ICON_NONE;
}
}
@@ -177,6 +231,11 @@ private:
void fn_8010E3D0(bool);
void realize();
+ void set_0x47C_0x480(s32 v1, s32 v2) {
+ field_0x47C = v1;
+ field_0x480 = v2;
+ }
+
static dLytDobutton_c *sInstance;
STATE_FUNC_DECLARE(dLytDobutton_c, InvisibleWait);
@@ -187,7 +246,7 @@ private:
STATE_MGR_DEFINE_UTIL_CHANGESTATE(dLytDobutton_c);
- UI_STATE_MGR_DECLARE(dLytDobutton_c);
+ /* 0x000 */ UI_STATE_MGR_DECLARE(dLytDobutton_c);
/* 0x040 */ d2d::dLytSub mLyt;
/* 0x0D4 */ d2d::AnmGroup_c mAnmGroups[12];
/* 0x3D4 */ nw4r::lyt::Pane *mpPanes[37];
@@ -202,7 +261,7 @@ private:
/* 0x48C */ s32 field_0x48C;
/* 0x490 */ u8 field_0x490;
/* 0x491 */ u8 field_0x491;
- /* 0x492 */ u8 field_0x492;
+ /* 0x492 */ bool mSavedIsInEvent;
};
#endif
diff --git a/include/d/lyt/d_lyt_unknowns.h b/include/d/lyt/d_lyt_unknowns.h
index 36022564..0d885967 100644
--- a/include/d/lyt/d_lyt_unknowns.h
+++ b/include/d/lyt/d_lyt_unknowns.h
@@ -17,6 +17,7 @@ public:
return sInstance;
}
+ // 001-Action.msbt - Unified enum for ACT_INFO and ACT_ETC
enum Act_IE_e {
ACT_IE_INFO_CLIMB_UP = 0,
ACT_IE_INFO_JUMP = 1,