d_lyt_meter stuff

This commit is contained in:
robojumper
2025-04-09 01:53:57 +02:00
parent 7fa483e850
commit 7ac3f3cd03
18 changed files with 1837 additions and 367 deletions
+9
View File
@@ -21,6 +21,15 @@
#define ALIGN_DECL(ALIGNMENT) __attribute__((aligned(ALIGNMENT)))
// static_assert from TP
#ifdef __MWERKS__
#define GLUE(a, b) a##b
#define GLUE2(a, b) GLUE(a, b)
#define STATIC_ASSERT(cond) typedef char GLUE2(static_assertion_failed, __LINE__)[(cond) ? 1 : -1]
#else
#define STATIC_ASSERT(...)
#endif
// To remove some warnings
#ifdef __MWERKS__
#define DECL_SECTION(x) __declspec(section x)
+14 -2
View File
@@ -230,9 +230,13 @@ public:
/* vt 0x314 */ virtual void vt_0x314();
/* vt 0x318 */ virtual void vt_0x318();
/* 0x330 */ u8 unk_0x330[0x340 - 0x330];
/* 0x330 */ u8 unk_0x330[0x339 - 0x330];
/* 0x339 */ u8 mRidingActorType;
/* 0x33A */ u8 unk_0x33A[0x340 - 0x33A];
/* 0x340 */ u32 someFlags_0x340;
/* 0x344 */ u8 unk_0x344[0x350 - 0x344];
/* 0x344 */ u8 unk_0x344[0x348 - 0x344];
/* 0x348 */ u32 mSwordAndMoreStates;
/* 0x34C */ u8 unk_0x34C[0x350 - 0x34C];
/* 0x350 */ u32 someFlags_0x350;
u8 UNK_0x354[0x35C - 0x354];
/* 0x35C */ u32 mForceOrPreventActionFlags;
@@ -263,6 +267,10 @@ public:
return mCurrentAction == action;
}
inline bool checkSwordAndMoreStates(u32 mask) const {
return (mSwordAndMoreStates & mask) != 0;
}
inline bool checkActionFlags(u32 mask) const {
return (mActionFlags & mask) != 0;
}
@@ -270,6 +278,10 @@ public:
return (mActionFlagsCont & mask) != 0;
}
inline u8 getRidingActorType() const {
return mRidingActorType;
}
static nw4r::g3d::ResFile getItemResFile(const char *name, mAllocator_c &allocator);
static const dAcPy_c *GetLink() {
+1 -1
View File
@@ -46,7 +46,7 @@ public:
virtual ~Multi_c() {}
/* vt 0x0C */ virtual void draw() override;
/* vt 0x10 */ virtual void animate();
/* vt 0x18 */ virtual void calc();
/* vt 0x14 */ virtual void calc();
/* vt 0x18 */ virtual bool build(const char *name, m2d::ResAccIf_c *acc);
void calcBefore();
+6
View File
@@ -213,6 +213,12 @@ private:
*/
class dLytCommonIconItem_c : public d2d::dSubPane {
public:
enum Variant_e {
B_WHEEL,
POUCH,
DOWSING,
};
dLytCommonIconItem_c() : mStateMgr(*this, sStateID::null), mPart(3) {}
~dLytCommonIconItem_c() {}
+9 -1
View File
@@ -18,9 +18,17 @@ public:
bool remove();
bool draw();
static dLytDobutton_c *sInstance;
static dLytDobutton_c *GetInstance() {
return sInstance;
}
s32 getField0x47C() const {
return field_0x47C;
}
private:
static dLytDobutton_c *sInstance;
STATE_FUNC_DECLARE(dLytDobutton_c, InvisibleWait);
STATE_FUNC_DECLARE(dLytDobutton_c, InvisibleTimeCnt);
STATE_FUNC_DECLARE(dLytDobutton_c, In);
+90 -2
View File
@@ -8,9 +8,97 @@ public:
dLytMeterConfiguration_c();
virtual ~dLytMeterConfiguration_c();
static dLytMeterConfiguration_c *sInstance;
f32 field_0x04[0x7A - 0x01];
/* 0x004 */ u8 field_0x004;
/* 0x005 */ u8 field_0x005;
/* 0x006 */ u8 field_0x006;
/* 0x007 */ u8 field_0x007;
/* 0x008 */ u8 field_0x008;
/* 0x009 */ u8 field_0x009;
/* 0x00A */ u8 field_0x00A;
/* 0x00B */ u8 field_0x00B;
/* 0x00C */ f32 field_0x00C;
/* 0x010 */ u8 field_0x010;
/* 0x011 */ u8 field_0x011;
/* 0x012 */ u8 field_0x012;
/* 0x013 */ u8 field_0x013;
/* 0x014 */ f32 field_0x014;
/* 0x018 */ f32 field_0x018;
/* 0x01C */ u8 field_0x01C;
/* 0x01D */ u8 field_0x01D;
/* 0x01E */ u8 field_0x01E;
/* 0x01F */ u8 field_0x01F;
/* 0x020 */ s32 field_0x020;
/* 0x024 */ s32 field_0x024;
/* 0x028 */ u8 field_0x028;
/* 0x029 */ u8 field_0x029;
/* 0x02A */ u8 field_0x02A;
/* 0x02B */ u8 field_0x02B;
/* 0x02C */ s32 field_0x02C[16];
/* 0x06C */ s32 field_0x06C[16];
/* 0x0AC */ f32 field_0x0AC[16];
/* 0x0EC */ u8 field_0x0EC[16];
/* 0x0FC */ u8 field_0x0FC;
/* 0x0FD */ u8 field_0x0FD;
/* 0x0FE */ u8 field_0x0FE;
/* 0x0FF */ u8 field_0x0FF;
/* 0x100 */ s32 field_0x100[8];
/* 0x121 */ u8 field_0x121;
/* 0x124 */ f32 field_0x124;
/* 0x128 */ f32 field_0x128;
/* 0x12C */ f32 field_0x12C;
/* 0x130 */ f32 field_0x130;
/* 0x134 */ u8 field_0x134;
/* 0x135 */ u8 field_0x135;
/* 0x138 */ f32 field_0x138;
/* 0x13C */ u8 field_0x13C;
/* 0x140 */ f32 field_0x140;
/* 0x144 */ f32 field_0x144;
/* 0x148 */ f32 field_0x148;
/* 0x14C */ f32 field_0x14C;
/* 0x150 */ f32 field_0x150;
/* 0x154 */ f32 field_0x154;
/* 0x158 */ f32 field_0x158;
/* 0x15C */ f32 field_0x15C;
/* 0x160 */ f32 field_0x160;
/* 0x164 */ u8 field_0x164;
/* 0x168 */ f32 field_0x168;
/* 0x16C */ f32 field_0x16C;
/* 0x170 */ f32 field_0x170;
/* 0x174 */ f32 field_0x174;
/* 0x178 */ f32 field_0x178;
/* 0x17C */ f32 field_0x17C;
/* 0x180 */ f32 field_0x180;
/* 0x184 */ f32 field_0x184;
/* 0x188 */ f32 field_0x188;
/* 0x18C */ f32 field_0x18C;
/* 0x190 */ f32 field_0x190;
/* 0x194 */ f32 field_0x194;
/* 0x198 */ f32 field_0x198;
/* 0x19C */ f32 field_0x19C;
/* 0x1A0 */ f32 field_0x1A0;
/* 0x1A4 */ f32 field_0x1A4;
/* 0x1A8 */ f32 field_0x1A8;
/* 0x1AC */ f32 field_0x1AC;
/* 0x1B0 */ u8 field_0x1B0;
/* 0x1B1 */ u8 field_0x1B1;
/* 0x1B4 */ f32 field_0x1B4;
/* 0x1B8 */ f32 field_0x1B8;
/* 0x1BC */ u8 field_0x1BC;
/* 0x1C0 */ f32 field_0x1C0;
/* 0x1C4 */ f32 field_0x1C4;
/* 0x1C8 */ u32 field_0x1C8;
/* 0x1CC */ f32 field_0x1CC;
/* 0x1D0 */ f32 field_0x1D0;
/* 0x1D4 */ u8 field_0x1D4;
/* 0x1D5 */ u8 field_0x1D5;
/* 0x1D6 */ u8 field_0x1D6;
/* 0x1D7 */ u8 field_0x1D7;
/* 0x1D8 */ s32 field_0x1D8;
/* 0x1D8 */ s32 field_0x1DC;
/* 0x1D8 */ s32 field_0x1E0;
/* 0x1D8 */ s32 field_0x1E4;
};
#endif
+18 -2
View File
@@ -11,10 +11,26 @@ public:
bool build(d2d::ResAccIf_c *resAcc);
bool remove();
static LytDoButtonRelated *sInstance;
static LytDoButtonRelated *GetInstance() {
return sInstance;
}
void set0x08(s32 value) {
field_0x08 = value;
field_0x35 = 1;
}
s32 get0x08() {
return field_0x08;
}
private:
u8 field_0x04[0x40 - 0x04];
static LytDoButtonRelated *sInstance;
/* 0x04 */ u8 field_0x04[0x08 - 0x04];
/* 0x08 */ s32 field_0x08;
/* 0x0C */ u8 _0x08[0x35 - 0x0C];
/* 0x35 */ u8 field_0x35;
};
// size 0x27C
+24 -88
View File
@@ -2,6 +2,7 @@
#define D_LYT_METER_H
// TODO sort includes for vtable order
// clang-format off
#include "common.h"
#include "d/lyt/d2d.h"
#include "d/lyt/d_lyt_do_button.h"
#include "d/lyt/meter/d_lyt_meter_shield_gauge.h"
@@ -21,94 +22,7 @@
#include "d/lyt/meter/d_lyt_meter_event_skip.h"
#include "d/lyt/meter/d_lyt_meter_item_select.h"
// clang-format on
class dLytMeter1Button_c : public d2d::dSubPane {
public:
dLytMeter1Button_c() : mStateMgr(*this, sStateID::null) {}
virtual ~dLytMeter1Button_c() {}
virtual bool build(d2d::ResAccIf_c *resAcc) override;
virtual bool remove() override;
virtual bool execute() 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();
}
private:
STATE_FUNC_DECLARE(dLytMeter1Button_c, Wait);
STATE_FUNC_DECLARE(dLytMeter1Button_c, ToUse);
STATE_FUNC_DECLARE(dLytMeter1Button_c, ToUnuse);
STATE_FUNC_DECLARE(dLytMeter1Button_c, Unuse);
UI_STATE_MGR_DECLARE(dLytMeter1Button_c);
d2d::dLytSub mLyt;
d2d::AnmGroup_c mAnmGroups[3];
/* 0x198 */ dWindow_c *mpWindow;
/* 0x19C */ dTextBox_c *mpTextbox;
/* 0x1A0 */ u32 field_0x1A0;
/* 0x1A4 */ s32 field_0x1A4;
/* 0x1A8 */ s32 field_0x1A8;
/* 0x1AC */ u8 field_0x1AC;
/* 0x1AD */ u8 field_0x1AD;
};
class dLytMeter2Button_c : public d2d::dSubPane {
public:
dLytMeter2Button_c() : mStateMgr(*this, sStateID::null) {}
virtual ~dLytMeter2Button_c() {}
virtual bool build(d2d::ResAccIf_c *resAcc) override;
virtual bool remove() override;
virtual bool execute() 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();
}
private:
STATE_FUNC_DECLARE(dLytMeter2Button_c, Wait);
STATE_FUNC_DECLARE(dLytMeter2Button_c, ToUse);
STATE_FUNC_DECLARE(dLytMeter2Button_c, ToUnuse);
STATE_FUNC_DECLARE(dLytMeter2Button_c, Unuse);
UI_STATE_MGR_DECLARE(dLytMeter2Button_c);
d2d::dLytSub mLyt;
d2d::AnmGroup_c mAnmGroups[3];
/* 0x198 */ dWindow_c *mpWindow;
/* 0x19C */ dTextBox_c *mpTextbox;
/* 0x1A0 */ u32 field_0x1A0;
/* 0x1A4 */ s32 field_0x1A4;
/* 0x1A8 */ s32 field_0x1A8;
/* 0x1AC */ u8 field_0x1AC;
/* 0x1AD */ u8 field_0x1AD;
};
class dLytMeterParts_c {
public:
dLytMeterParts_c() : mStateMgr(*this, sStateID::null) {}
private:
STATE_FUNC_DECLARE(dLytMeterParts_c, Invisible);
STATE_FUNC_DECLARE(dLytMeterParts_c, In);
STATE_FUNC_DECLARE(dLytMeterParts_c, Visible);
STATE_FUNC_DECLARE(dLytMeterParts_c, Out);
UI_STATE_MGR_DECLARE(dLytMeterParts_c);
u8 field_0x3C[0x10];
};
// TODO sort includes for vtable order
// clang-format off
#include "d/lyt/meter/d_lyt_meter_parts.h"
#include "d/lyt/meter/d_lyt_meter_key.h"
#include "d/lyt/d_lyt_unknowns.h"
@@ -179,6 +93,21 @@ public:
/* 0x13B38 */ u32 field_0x13B38;
};
STATIC_ASSERT(offsetof(dLytMeter_c, mGanbariGauge) == 0x00C8C);
STATIC_ASSERT(offsetof(dLytMeter_c, mRupy) == 0x011E8);
STATIC_ASSERT(offsetof(dLytMeter_c, mItemSelect) == 0x01A98);
STATIC_ASSERT(offsetof(dLytMeter_c, mCrossBtn) == 0x07260);
STATIC_ASSERT(offsetof(dLytMeter_c, mPlusBtn) == 0x078A0);
STATIC_ASSERT(offsetof(dLytMeter_c, mMinusBtn) == 0x07A64);
STATIC_ASSERT(offsetof(dLytMeter_c, mDowsing) == 0x0C928);
STATIC_ASSERT(offsetof(dLytMeter_c, mABtn) == 0x11E34);
STATIC_ASSERT(offsetof(dLytMeter_c, mZBtn) == 0x12000);
STATIC_ASSERT(offsetof(dLytMeter_c, mNunStk) == 0x121C8);
STATIC_ASSERT(offsetof(dLytMeter_c, mRemoCon) == 0x12350);
STATIC_ASSERT(offsetof(dLytMeter_c, mNunBg) == 0x12440);
STATIC_ASSERT(offsetof(dLytMeter_c, mHeart) == 0x12608);
STATIC_ASSERT(offsetof(dLytMeter_c, mShield) == 0x12DA4);
// made up name
class dLytMeterContainer_c {
public:
@@ -200,6 +129,10 @@ public:
return sInstance;
}
bool checkAllFlags(u32 mask) const {
return (mFlags & mask) == mask;
}
private:
/* 0x00004 */ d2d::ResAccIf_c mResAcc;
/* 0x00374 */ dLytMeterEventSkip_c *mpEventSkip;
@@ -208,8 +141,11 @@ private:
/* 0x13B40 */ LytDoButtonRelated *mpDoButtonRelated;
/* 0x13B44 */ LytBirdButtonRelated *mpBirdRelated;
/* 0x13B48 */ bool mVisible;
/* 0x13B49 */ u8 _0x13B49[0x13B50 - 0x13B49];
/* 0x13B50 */ s32 mFlags;
static dLytMeterContainer_c *sInstance;
};
#endif
+2 -2
View File
@@ -45,8 +45,8 @@ private:
/* 0x1A0 */ nw4r::lyt::Pane *mpPane;
/* 0x1A4 */ void *field_0x1A4;
/* 0x1A8 */ dTextBox_c *mpTextBoxes[2];
/* 0x1B0 */ dWindow_c *mpWindow;
/* 0x1B4 */ dTextBox_c *mpSizeBox;
/* 0x1B0 */ dWindow_c *mpWindow[1];
/* 0x1B4 */ dTextBox_c *mpSizeBox[1];
/* 0x1B8 */ u32 field_0x1B8;
/* 0x1BC */ u32 field_0x1BC;
/* 0x1C0 */ u32 field_0x1C0;
@@ -1,22 +1,36 @@
#ifndef D_LYT_METER_GANBARI_GAUGE_H
#define D_LYT_METER_GANBARI_GAUGE_H
#include "common.h"
#include "d/lyt/d2d.h"
#include "m/m_vec.h"
#include "nw4r/lyt/lyt_pane.h"
#include "s/s_State.hpp"
#include "s/s_StateMgr.hpp"
class dLytMeterGanbariGauge_c : public d2d::dSubPane {
public:
dLytMeterGanbariGauge_c() : mStateMgr1(*this, sStateID::null), mStateMgr2(*this, sStateID::null) {}
dLytMeterGanbariGauge_c() : mStateMgrMain(*this, sStateID::null), mStateMgrWheel(*this, sStateID::null) {}
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 ~dLytMeterGanbariGauge_c() {}
private:
void realizeAnimState();
static bool swimmingRelated();
static bool fn_801034B0(f32);
static bool fn_80103520(f32);
STATE_FUNC_DECLARE(dLytMeterGanbariGauge_c, InvisibleWait);
STATE_FUNC_DECLARE(dLytMeterGanbariGauge_c, In);
STATE_FUNC_DECLARE(dLytMeterGanbariGauge_c, Wait);
@@ -31,13 +45,33 @@ private:
STATE_FUNC_DECLARE(dLytMeterGanbariGauge_c, Recovery);
STATE_FUNC_DECLARE(dLytMeterGanbariGauge_c, ToMax);
STATE_MGR(dLytMeterGanbariGauge_c) mStateMgr1;
STATE_MGR(dLytMeterGanbariGauge_c) mStateMgr2;
STATE_MGR(dLytMeterGanbariGauge_c) mStateMgrMain;
STATE_MGR(dLytMeterGanbariGauge_c) mStateMgrWheel;
/* 0x080 */ d2d::dLytSub mLyt;
/* 0x114 */ d2d::AnmGroup_c mAnmGroups[16];
/* 0x??? */ u8 padding[0x11E8 - 0x11A0];
/* 0x114 */ d2d::AnmGroup_c mAnm[16];
/* 0x514 */ nw4r::lyt::Pane *mpPane;
/* 0x518 */ f32 field_0x518;
/* 0x51C */ f32 field_0x51C;
/* 0x520 */ u8 _0x520[0x524 - 0x520];
/* 0x524 */ mVec3_c field_0x524;
/* 0x530 */ u8 field_0x530;
/* 0x534 */ s32 field_0x534;
/* 0x538 */ u32 field_0x538;
/* 0x53C */ s32 mOutWaitTimer;
/* 0x540 */ u32 field_0x540;
/* 0x544 */ u32 field_0x544;
/* 0x548 */ u32 field_0x548;
/* 0x54C */ f32 field_0x54C;
/* 0x550 */ f32 field_0x550;
/* 0x554 */ f32 field_0x554;
u8 field_0x558;
u8 field_0x559;
u8 field_0x55A;
u8 field_0x55B;
};
STATIC_ASSERT(sizeof(dLytMeterGanbariGauge_c) == 0x55C);
#endif
+172 -47
View File
@@ -3,51 +3,118 @@
#include "d/lyt/d2d.h"
#include "d/lyt/d_lyt_common_icon_item.h"
#include "toBeSorted/effects_struct.h"
#include "d/lyt/d_textbox.h"
#include "d/lyt/d_window.h"
#include "nw4r/lyt/lyt_pane.h"
#include "s/s_State.hpp"
#include "s/s_StateMgr.hpp"
#include "toBeSorted/effects_struct.h"
class dLytMeterItemSelectIcon_c {
public:
dLytMeterItemSelectIcon_c(): mStateMgr(*this, sStateID::null) {}
dLytMeterItemSelectIcon_c() : mStateMgr(*this, sStateID::null) {}
~dLytMeterItemSelectIcon_c() {}
private:
UI_STATE_MGR_DECLARE(dLytMeterItemSelectIcon_c);
u32 padding;
u32 padding2;
void init();
void execute();
void setAnm(d2d::AnmGroup_c *anim) {
mpAnm = anim;
}
private:
STATE_FUNC_DECLARE(dLytMeterItemSelectIcon_c, Wait);
STATE_FUNC_DECLARE(dLytMeterItemSelectIcon_c, On);
STATE_FUNC_DECLARE(dLytMeterItemSelectIcon_c, Select);
STATE_FUNC_DECLARE(dLytMeterItemSelectIcon_c, Off);
/* 0x00 */ UI_STATE_MGR_DECLARE(dLytMeterItemSelectIcon_c);
/* 0x3C */ d2d::AnmGroup_c *mpAnm;
/* 0x40 */ u32 padding2;
};
class dLytMeterItemSelectBlink_c {
public:
dLytMeterItemSelectBlink_c(): mStateMgr(*this, sStateID::null) {}
dLytMeterItemSelectBlink_c() : mStateMgr(*this, sStateID::null) {}
~dLytMeterItemSelectBlink_c() {}
private:
UI_STATE_MGR_DECLARE(dLytMeterItemSelectBlink_c);
u32 padding;
u32 padding2;
void init();
void execute();
void setAnm(d2d::AnmGroup_c *anim) {
mpAnm = anim;
}
private:
STATE_FUNC_DECLARE(dLytMeterItemSelectBlink_c, Wait);
STATE_FUNC_DECLARE(dLytMeterItemSelectBlink_c, On);
STATE_FUNC_DECLARE(dLytMeterItemSelectBlink_c, Select);
STATE_FUNC_DECLARE(dLytMeterItemSelectBlink_c, Off);
/* 0x00 */ UI_STATE_MGR_DECLARE(dLytMeterItemSelectBlink_c);
/* 0x3C */ d2d::AnmGroup_c *mpAnm;
/* 0x40 */ u32 padding2;
};
class dLytMeterItemSelectText_c {
public:
dLytMeterItemSelectText_c(): mStateMgr(*this, sStateID::null) {}
dLytMeterItemSelectText_c() : mStateMgr(*this, sStateID::null) {}
~dLytMeterItemSelectText_c() {}
private:
UI_STATE_MGR_DECLARE(dLytMeterItemSelectText_c);
u32 padding;
u32 padding2;
void init();
void execute();
void setAnm(d2d::AnmGroup_c *anim) {
mpAnm = anim;
}
private:
STATE_FUNC_DECLARE(dLytMeterItemSelectText_c, Wait);
STATE_FUNC_DECLARE(dLytMeterItemSelectText_c, On);
STATE_FUNC_DECLARE(dLytMeterItemSelectText_c, Select);
STATE_FUNC_DECLARE(dLytMeterItemSelectText_c, Off);
/* 0x00 */ UI_STATE_MGR_DECLARE(dLytMeterItemSelectText_c);
/* 0x3C */ d2d::AnmGroup_c *mpAnm;
/* 0x40 */ u32 padding2;
};
class dLytMeterItemSelectBtn_c {
public:
dLytMeterItemSelectBtn_c(): mStateMgr(*this, sStateID::null) {}
dLytMeterItemSelectBtn_c() : mStateMgr(*this, sStateID::null) {}
~dLytMeterItemSelectBtn_c() {}
private:
UI_STATE_MGR_DECLARE(dLytMeterItemSelectBtn_c);
u8 padding[0x58 - 0x3C];
void init(s32 i, d2d::dLytSub *lyt, nw4r::lyt::Pane *pane);
void fn_800E9E00(u8, u8);
void fn_800E9E30(u8);
void execute();
void setAnm(d2d::AnmGroup_c *anim) {
mpAnm = anim;
}
u8 getField_0x57() const {
return field_0x57;
}
void setField_0x57(u8 val) {
field_0x57 = val;
}
private:
STATE_FUNC_DECLARE(dLytMeterItemSelectBtn_c, Invisible);
STATE_FUNC_DECLARE(dLytMeterItemSelectBtn_c, On);
STATE_FUNC_DECLARE(dLytMeterItemSelectBtn_c, Visible);
STATE_FUNC_DECLARE(dLytMeterItemSelectBtn_c, Off);
/* 0x00 */ UI_STATE_MGR_DECLARE(dLytMeterItemSelectBtn_c);
/* 0x3C */ u8 _0x3C[0x40 - 0x3C];
/* 0x40 */ d2d::AnmGroup_c *mpAnm;
/* 0x44 */ u8 padding[0x57 - 0x44];
/* 0x57 */ u8 field_0x57;
};
class dLytMeterItemSelect_c : public d2d::dSubPane {
@@ -61,7 +128,17 @@ public:
virtual const char *getName() const override;
virtual ~dLytMeterItemSelect_c() {}
private:
void fn_800F0680(u8);
s32 fn_800F0990(u8);
s32 fn_800F07D0(s32);
void fn_800EFAD0(s32, bool);
void fn_800EF7C0();
void fn_800EF8C0(u8);
bool fn_800F09E0();
void fn_800F0440(s32);
STATE_FUNC_DECLARE(dLytMeterItemSelect_c, InitWait);
STATE_FUNC_DECLARE(dLytMeterItemSelect_c, Wait);
STATE_FUNC_DECLARE(dLytMeterItemSelect_c, SelectIn);
@@ -85,35 +162,83 @@ private:
STATE_FUNC_DECLARE(dLytMeterItemSelect_c, FrameOffMove);
STATE_FUNC_DECLARE(dLytMeterItemSelect_c, FrameOffOut);
dLytMeterItemSelectIcon_c mIcon[8];
dLytMeterItemSelectBlink_c mBlink;
dLytMeterItemSelectText_c mText[2];
dLytMeterItemSelectBtn_c mBtn[4];
UI_STATE_MGR_DECLARE(dLytMeterItemSelect_c);
/* 0x0008 */ dLytMeterItemSelectIcon_c mIcon[8];
/* 0x0228 */ dLytMeterItemSelectBlink_c mBlink;
/* 0x026C */ dLytMeterItemSelectText_c mText[2];
/* 0x02F4 */ dLytMeterItemSelectBtn_c mBtn[4];
/* 0x0454 */ UI_STATE_MGR_DECLARE(dLytMeterItemSelect_c);
/* 0x0490 */ d2d::dLytSub mLyt;
/* 0x0524 */ d2d::AnmGroup_c mAnm[34];
/* 0x490 */ d2d::dLytSub mLyt;
/* 0x0DA4 */ nw4r::lyt::Pane *mpPanes[17];
/* 0x524 */ d2d::AnmGroup_c mAnmGroups[34];
/* 0x0DE8 */ nw4r::lyt::Pane *mpSomePane;
/* 0x0DEC */ dTextBox_c *mpTextBoxes[10];
/* 0x0E14 */ dWindow_c *mpWindows[4];
/* 0x0E24 */ dTextBox_c *mpSizeBoxes[4];
/* 0x0E34 */ dLytCommonIconItem_c mItemIcons[9];
/* 0x567C */ d2d::SubPaneList mSubpaneList;
/* 0x5688 */ d2d::SubPaneListNode mSubpanes[9];
/* 0x5718 */ EffectsStruct mEffects;
// What is here?
u8 padding2[0xE34 - 0xDA4];
/* 0xE34 */ dLytCommonIconItem_c mItemIcons[9];
d2d::SubPaneList mNodeList;
d2d::SubPaneListNode mNodes[9];
EffectsStruct mEffects;
s32 field_0x574C;
s32 field_0x5750;
s32 field_0x5754;
s32 field_0x5758;
s32 field_0x575C;
s32 field_0x5760;
s32 field_0x5764;
s32 field_0x5768;
/* 0x??? */ u8 padding[0x7260 - 0x7204];
/* 0x574C */ s32 field_0x574C;
/* 0x5750 */ s32 field_0x5750;
/* 0x5754 */ s32 field_0x5754;
/* 0x5758 */ s32 field_0x5758;
/* 0x575C */ s32 field_0x575C;
/* 0x5760 */ s32 field_0x5760;
/* 0x5764 */ s32 field_0x5764;
/* 0x5768 */ s32 field_0x5768;
/* 0x576C */ s32 field_0x576C;
/* 0x5770 */ s32 field_0x5770;
/* 0x5774 */ s32 field_0x5774;
/* 0x5778 */ f32 field_0x5778;
/* 0x577C */ f32 field_0x577C;
/* 0x5780 */ s32 field_0x5780;
/* 0x5784 */ f32 field_0x5784;
/* 0x5788 */ s32 field_0x5788;
/* 0x578C */ s32 field_0x578C;
/* 0x5790 */ s32 field_0x5790;
/* 0x5794 */ u8 field_0x5794;
/* 0x5795 */ u8 field_0x5795;
/* 0x5796 */ u8 field_0x5796;
/* 0x5797 */ u8 field_0x5797;
/* 0x5798 */ u8 field_0x5798;
/* 0x5799 */ u8 field_0x5799;
/* 0x579A */ u8 field_0x579A;
/* 0x579B */ u8 field_0x579B;
/* 0x579C */ u8 field_0x579C;
/* 0x579C */ u8 field_0x579D;
/* 0x579C */ u8 field_0x579E;
/* 0x579C */ u8 field_0x579F;
/* 0x57A0 */ u8 field_0x57A0;
/* 0x57A1 */ u8 field_0x57A1;
/* 0x57A2 */ u8 field_0x57A2;
/* 0x57A4 */ s32 field_0x57A4;
/* 0x57A8 */ s32 field_0x57A8;
/* 0x57AC */ s32 field_0x57AC;
/* 0x57B0 */ u8 field_0x57B0;
/* 0x57B1 */ u8 field_0x57B1;
/* 0x57B2 */ u8 field_0x57B2;
/* 0x57B3 */ u8 field_0x57B3;
/* 0x57B4 */ u8 field_0x57B4;
/* 0x57B5 */ u8 field_0x57B5;
/* 0x57B6 */ bool field_0x57B6;
/* 0x57B7 */ bool field_0x57B7;
/* 0x57B8 */ u8 field_0x57B8;
/* 0x57B9 */ u8 field_0x57B9;
/* 0x57BA */ u8 field_0x57BA;
/* 0x57BB */ u8 field_0x57BB;
/* 0x57BC */ u8 field_0x57BC;
/* 0x57BD */ u8 field_0x57BD;
/* 0x57BE */ u8 field_0x57BE;
/* 0x57BF */ u8 field_0x57BF;
/* 0x57C0 */ u8 field_0x57C0;
/* 0x57C1 */ u8 field_0x57C1;
/* 0x57C2 */ u8 field_0x57C2;
/* 0x57C3 */ u8 field_0x57C3;
/* 0x57C4 */ u8 field_0x57C4;
/* 0x57C5 */ u8 field_0x57C5;
};
#endif
+91
View File
@@ -0,0 +1,91 @@
#ifndef D_LYT_METER_PARTS_H
#define D_LYT_METER_PARTS_H
#include "d/lyt/d2d.h"
#include "s/s_State.hpp"
class dLytMeter1Button_c : public d2d::dSubPane {
public:
dLytMeter1Button_c() : mStateMgr(*this, sStateID::null) {}
virtual ~dLytMeter1Button_c() {}
virtual bool build(d2d::ResAccIf_c *resAcc) override;
virtual bool remove() override;
virtual bool execute() 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();
}
private:
STATE_FUNC_DECLARE(dLytMeter1Button_c, Wait);
STATE_FUNC_DECLARE(dLytMeter1Button_c, ToUse);
STATE_FUNC_DECLARE(dLytMeter1Button_c, ToUnuse);
STATE_FUNC_DECLARE(dLytMeter1Button_c, Unuse);
UI_STATE_MGR_DECLARE(dLytMeter1Button_c);
d2d::dLytSub mLyt;
d2d::AnmGroup_c mAnmGroups[3];
/* 0x198 */ dWindow_c *mpWindow;
/* 0x19C */ dTextBox_c *mpTextbox;
/* 0x1A0 */ u32 field_0x1A0;
/* 0x1A4 */ s32 field_0x1A4;
/* 0x1A8 */ s32 field_0x1A8;
/* 0x1AC */ u8 field_0x1AC;
/* 0x1AD */ u8 field_0x1AD;
};
class dLytMeter2Button_c : public d2d::dSubPane {
public:
dLytMeter2Button_c() : mStateMgr(*this, sStateID::null) {}
virtual ~dLytMeter2Button_c() {}
virtual bool build(d2d::ResAccIf_c *resAcc) override;
virtual bool remove() override;
virtual bool execute() 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();
}
private:
STATE_FUNC_DECLARE(dLytMeter2Button_c, Wait);
STATE_FUNC_DECLARE(dLytMeter2Button_c, ToUse);
STATE_FUNC_DECLARE(dLytMeter2Button_c, ToUnuse);
STATE_FUNC_DECLARE(dLytMeter2Button_c, Unuse);
UI_STATE_MGR_DECLARE(dLytMeter2Button_c);
d2d::dLytSub mLyt;
d2d::AnmGroup_c mAnmGroups[3];
/* 0x198 */ dWindow_c *mpWindow;
/* 0x19C */ dTextBox_c *mpTextbox;
/* 0x1A0 */ u32 field_0x1A0;
/* 0x1A4 */ s32 field_0x1A4;
/* 0x1A8 */ s32 field_0x1A8;
/* 0x1AC */ u8 field_0x1AC;
/* 0x1AD */ u8 field_0x1AD;
};
class dLytMeterParts_c {
public:
dLytMeterParts_c() : mStateMgr(*this, sStateID::null) {}
private:
STATE_FUNC_DECLARE(dLytMeterParts_c, Invisible);
STATE_FUNC_DECLARE(dLytMeterParts_c, In);
STATE_FUNC_DECLARE(dLytMeterParts_c, Visible);
STATE_FUNC_DECLARE(dLytMeterParts_c, Out);
UI_STATE_MGR_DECLARE(dLytMeterParts_c);
u8 field_0x3C[0x10];
};
#endif
+4
View File
@@ -71,6 +71,10 @@ public:
mTranslate = value;
}
void SetRotate(const nw4r::math::VEC3 &value) {
mRotate = value;
}
const math::MTX34 &GetGlobalMtx() const {
return mGlbMtx;
}