d_lyt_do_button_related OK

This commit is contained in:
robojumper
2025-05-16 11:18:43 +02:00
parent df17fa201a
commit 96264ddedc
16 changed files with 412 additions and 154 deletions
+11 -11
View File
@@ -177,7 +177,7 @@ public:
return sInstance;
}
static s32 getField0x47C() {
static Act_Do_e getField0x47C() {
if (sInstance != nullptr) {
return sInstance->field_0x47C;
} else {
@@ -193,12 +193,12 @@ public:
}
}
static s32 getNextActionToShow() {
static Act_Do_e getNextActionToShow() {
if (sInstance != nullptr) {
return sInstance->mNextDoActionToShow;
} else {
// @bug (?) should this be ACT_DO_INVALID?
return ICON_NONE;
return (Act_Do_e)ICON_NONE;
}
}
@@ -210,7 +210,7 @@ public:
}
}
static s32 getAction() {
static Act_Do_e getAction() {
if (sInstance != nullptr) {
return sInstance->getActionInternal();
} else {
@@ -218,20 +218,20 @@ public:
}
}
static void setActionTextStuff(s32 p1, s32 p2, bool p3) {
static void setActionTextStuff(s32 p1, Act_Do_e p2, bool p3) {
if (sInstance != nullptr) {
sInstance->setActionTextStuffInternal(p1, p2, p3);
}
}
private:
void setActionTextStuffInternal(s32, s32, bool);
s32 getActionInternal() const;
void setActionTextStuffInternal(s32, Act_Do_e, bool);
Act_Do_e getActionInternal() const;
s32 fn_8010E5E0() const;
void fn_8010E3D0(bool);
void realize();
void set_0x47C_0x480(s32 v1, s32 v2) {
void set_0x47C_0x480(Act_Do_e v1, s32 v2) {
field_0x47C = v1;
field_0x480 = v2;
}
@@ -251,12 +251,12 @@ private:
/* 0x0D4 */ d2d::AnmGroup_c mAnmGroups[12];
/* 0x3D4 */ nw4r::lyt::Pane *mpPanes[37];
/* 0x468 */ dTextBox_c *mpTextBoxes[2];
/* 0x470 */ s32 mDoActionToShow;
/* 0x470 */ Act_Do_e mDoActionToShow;
/* 0x474 */ s32 field_0x474;
/* 0x478 */ s32 field_0x478;
/* 0x47C */ s32 field_0x47C;
/* 0x47C */ Act_Do_e field_0x47C;
/* 0x480 */ s32 field_0x480;
/* 0x484 */ s32 mNextDoActionToShow;
/* 0x484 */ Act_Do_e mNextDoActionToShow;
/* 0x488 */ s32 field_0x488;
/* 0x48C */ s32 field_0x48C;
/* 0x490 */ u8 field_0x490;
+28
View File
@@ -0,0 +1,28 @@
#ifndef D_LYT_TARGET_BIRD_H
#define D_LYT_TARGET_BIRD_H
#include "d/lyt/d2d.h"
// size 0x27C
class dLytTargetBird_c {
public:
dLytTargetBird_c() {
sInstance = this;
}
~dLytTargetBird_c() {
sInstance = nullptr;
}
bool build(d2d::ResAccIf_c *resAcc);
bool remove();
bool execute();
bool draw();
static dLytTargetBird_c *sInstance;
private:
d2d::LytBase_c mLyt;
d2d::AnmGroup_c mAnmGroups[7];
/* 0x250 */ u8 field_0x250[0x27C - 0x250];
};
#endif
+10 -25
View File
@@ -3,6 +3,7 @@
#include "common.h"
#include "d/lyt/d2d.h"
#include "d/lyt/d_lyt_do_button.h"
class LytDoButtonRelated {
public:
@@ -167,6 +168,12 @@ public:
ACT_IE_ETC_SAILCLOTH = 145,
ACT_IE_ETC_RETURN_2 = 146,
ACT_IE_147 = 147,
ACT_IE_148 = 148,
ACT_IE_149 = 149,
ACT_IE_150 = 150,
ACT_IE_151 = 151,
ACT_IE_NONE = 152,
};
@@ -220,10 +227,10 @@ public:
}
static Act_IE_e convertDoButton(s32);
static Act_IE_e convertDoButton(dLytDobutton_c::Act_Do_e);
static void fn_8010EC10(Act_IE_e, bool);
static void fn_8010ED50(Act_IE_e, bool);
static void setCrossTop(Act_IE_e, bool);
static void setCrossDown(Act_IE_e, bool);
private:
static LytDoButtonRelated *sInstance;
@@ -231,26 +238,4 @@ private:
/* 0x34 */ bool field_0x34[12];
};
// size 0x27C
class LytBirdButtonRelated {
public:
LytBirdButtonRelated() {
sInstance = this;
}
~LytBirdButtonRelated() {
sInstance = nullptr;
}
bool build(d2d::ResAccIf_c *resAcc);
bool remove();
bool execute();
bool draw();
static LytBirdButtonRelated *sInstance;
private:
d2d::LytBase_c mLyt;
d2d::AnmGroup_c mAnmGroups[7];
/* 0x250 */ u8 field_0x250[0x27C - 0x250];
};
#endif
+17 -4
View File
@@ -25,6 +25,7 @@
#include "d/lyt/meter/d_lyt_meter_item_select.h"
#include "d/lyt/meter/d_lyt_meter_parts.h"
#include "d/lyt/d_lyt_unknowns.h"
#include "d/lyt/d_lyt_target_bird.h"
#include "m/m_vec.h"
// clang-format on
@@ -291,11 +292,23 @@ public:
mFlags = 0xFFFFFFFF;
}
static s32 getCrossBtn0x7BF8() {
static dLytMeterCrossBtn_c::CrossIcon_e getCrossIconDown() {
if (sInstance != nullptr) {
return sInstance->mMain.mCrossBtn.getField_0x620();
return sInstance->mMain.mCrossBtn.getIconDown();
} else {
return 6;
return dLytMeterCrossBtn_c::CROSS_ICON_NONE;
}
}
static void setCrossIconDown(dLytMeterCrossBtn_c::CrossIcon_e icon) {
if (sInstance != nullptr) {
sInstance->mMain.mCrossBtn.setIconDown(icon);
}
}
static void setCrossIconTop(dLytMeterCrossBtn_c::CrossIcon_e icon) {
if (sInstance != nullptr) {
sInstance->mMain.mCrossBtn.setIconTop(icon);
}
}
@@ -443,7 +456,7 @@ private:
/* 0x00378 */ dLytMeterMain_c mMain;
/* 0x13B3C */ dLytDobutton_c *mpDoButton;
/* 0x13B40 */ LytDoButtonRelated *mpDoButtonRelated;
/* 0x13B44 */ LytBirdButtonRelated *mpBirdRelated;
/* 0x13B44 */ dLytTargetBird_c *mpTargetBird;
/* 0x13B48 */ bool mVisible;
/* 0x13B49 */ u8 _0x13B49[0x13B50 - 0x13B49];
/* 0x13B50 */ s32 mFlags;
+28 -8
View File
@@ -41,18 +41,30 @@ private:
/* 0x54 */ dTextBox_c *mpSizeBox;
/* 0x58 */ nw4r::lyt::Pane *mpOwnerPane;
/* 0x5C */ s32 mIndex;
/* 0x60 */ s32 field_0x60;
/* 0x64 */ s32 field_0x64;
/* 0x60 */ s32 mSavedMessage;
/* 0x64 */ s32 mMessage;
/* 0x68 */ s32 field_0x68;
/* 0x6C */ s32 field_0x6C;
/* 0x70 */ s32 field_0x70;
/* 0x74 */ s32 field_0x74;
/* 0x70 */ s32 mSavedIcon;
/* 0x74 */ s32 mCurrentIcon;
/* 0x78 */ s32 mOnDelay;
/* 0x7C */ u8 field_0x7C;
};
class dLytMeterCrossBtn_c : public d2d::dSubPane {
public:
enum CrossIcon_e {
CROSS_ICON_TOP_1 = 1,
CROSS_ICON_TOP_3 = 3,
CROSS_ICON_TOP_4 = 4,
CROSS_ICON_DOWN_0 = 0,
CROSS_ICON_DOWN_2 = 2,
CROSS_ICON_DOWN_5 = 5,
CROSS_ICON_NONE = 6,
};
dLytMeterCrossBtn_c() : mStateMgr(*this, sStateID::null) {}
virtual bool build(d2d::ResAccIf_c *resAcc) override;
virtual bool remove() override;
@@ -69,8 +81,16 @@ public:
virtual ~dLytMeterCrossBtn_c() {}
s32 getField_0x620() const {
return field_0x620;
CrossIcon_e getIconDown() const {
return mIconDown;
}
void setIconDown(CrossIcon_e icon) {
mIconDown = icon;
}
void setIconTop(CrossIcon_e icon) {
mIconTop = icon;
}
void setOwnerPane(nw4r::lyt::Pane *pane);
@@ -93,8 +113,8 @@ private:
/* 0x400 */ dWindow_c *mpWindows[4];
/* 0x410 */ dTextBox_c *mpSizeBoxes[4];
/* 0x420 */ dLytMeterCrossBtnParts_c mParts[4];
/* 0x620 */ s32 field_0x620;
/* 0x624 */ s32 field_0x624;
/* 0x620 */ CrossIcon_e mIconDown;
/* 0x624 */ CrossIcon_e mIconTop;
/* 0x628 */ u16 mSavedFiFlow;
/* 0x62C */ s32 mCallCount0;
/* 0x630 */ s32 mCallCount1;
+6
View File
@@ -0,0 +1,6 @@
#ifndef MISC_ACTOR_H
#define MISC_ACTOR_H
bool checkIsInSkykeepPuzzle();
#endif