mirror of
https://github.com/zeldaret/ss
synced 2026-06-14 06:14:12 -04:00
Progress
This commit is contained in:
@@ -4460,7 +4460,7 @@ remove__18dLytMeter1Button_cFv = .text:0x800C8DC0; // type:function size:0x58
|
||||
execute__18dLytMeter1Button_cFv = .text:0x800C8E20; // type:function size:0x268
|
||||
getStateID__87sStateMgr_c<18dLytMeter1Button_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x800C9090; // type:function size:0x10
|
||||
executeState__87sStateMgr_c<18dLytMeter1Button_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x800C90A0; // type:function size:0x10
|
||||
shouldButton1Beep = .text:0x800C90B0; // type:function size:0x84
|
||||
shouldCall__18dLytMeter1Button_cCFv = .text:0x800C90B0; // type:function size:0x84
|
||||
initializeState_Wait__18dLytMeter2Button_cFv = .text:0x800C9140; // type:function size:0x4
|
||||
executeState_Wait__18dLytMeter2Button_cFv = .text:0x800C9150; // type:function size:0x34
|
||||
changeState__87sStateMgr_c<18dLytMeter2Button_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x800C9190; // type:function size:0x10
|
||||
@@ -4479,7 +4479,7 @@ remove__18dLytMeter2Button_cFv = .text:0x800C9560; // type:function size:0x58
|
||||
execute__18dLytMeter2Button_cFv = .text:0x800C95C0; // type:function size:0x298
|
||||
getStateID__87sStateMgr_c<18dLytMeter2Button_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x800C9860; // type:function size:0x10
|
||||
executeState__87sStateMgr_c<18dLytMeter2Button_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x800C9870; // type:function size:0x10
|
||||
fn_800C9880 = .text:0x800C9880; // type:function size:0x84
|
||||
shouldCall__18dLytMeter2Button_cCFv = .text:0x800C9880; // type:function size:0x84
|
||||
initializeState_Invisible__16dLytMeterParts_cFv = .text:0x800C9910; // type:function size:0x4
|
||||
executeState_Invisible__16dLytMeterParts_cFv = .text:0x800C9920; // type:function size:0x130
|
||||
changeState__85sStateMgr_c<16dLytMeterParts_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x800C9A50; // type:function size:0x10
|
||||
@@ -4493,8 +4493,8 @@ finalizeState_Visible__16dLytMeterParts_cFv = .text:0x800C9D00; // type:function
|
||||
initializeState_Out__16dLytMeterParts_cFv = .text:0x800C9D10; // type:function size:0x4
|
||||
executeState_Out__16dLytMeterParts_cFv = .text:0x800C9D20; // type:function size:0x194
|
||||
finalizeState_Out__16dLytMeterParts_cFv = .text:0x800C9EC0; // type:function size:0x4
|
||||
fn_800C9ED0 = .text:0x800C9ED0; // type:function size:0x24
|
||||
thisFadesUIInAndOut = .text:0x800C9F00; // type:function size:0x10
|
||||
build__16dLytMeterParts_cFl = .text:0x800C9ED0; // type:function size:0x24
|
||||
execute__16dLytMeterParts_cFv = .text:0x800C9F00; // type:function size:0x10
|
||||
executeState__85sStateMgr_c<16dLytMeterParts_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x800C9F10; // type:function size:0x10
|
||||
fn_800C9F20 = .text:0x800C9F20; // type:function size:0x44
|
||||
fn_800C9F70 = .text:0x800C9F70; // type:function size:0x70
|
||||
@@ -4796,11 +4796,11 @@ getName__16dLytMeterDrink_cFv = .text:0x800D9870; // type:function size:0x8
|
||||
getLyt__16dLytMeterDrink_cFv = .text:0x800D9880; // type:function size:0x8
|
||||
changeState__85sStateMgr_c<16dLytMeterDrink_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x800D9890; // type:function size:0x10
|
||||
changeState__90sStateMgr_c<21dLytMeterDrinkParts_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x800D98A0; // type:function size:0x10
|
||||
fn_800D98B0 = .text:0x800D98B0; // type:function size:0x8
|
||||
fn_800D98C0 = .text:0x800D98C0; // type:function size:0x8
|
||||
getName__19dLytMeterSmallKey_cCFv = .text:0x800D98B0; // type:function size:0x8
|
||||
getLyt__19dLytMeterSmallKey_cFv = .text:0x800D98C0; // type:function size:0x8
|
||||
changeState__88sStateMgr_c<19dLytMeterSmallKey_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x800D98D0; // type:function size:0x10
|
||||
fn_800D98E0 = .text:0x800D98E0; // type:function size:0x8
|
||||
fn_800D98F0 = .text:0x800D98F0; // type:function size:0x8
|
||||
getName__18dLytMeterBossKey_cCFv = .text:0x800D98E0; // type:function size:0x8
|
||||
getLyt__18dLytMeterBossKey_cFv = .text:0x800D98F0; // type:function size:0x8
|
||||
changeState__87sStateMgr_c<18dLytMeterBossKey_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x800D9900; // type:function size:0x10
|
||||
changeState__89sStateMgr_c<20dLytMeterKakeraKey_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x800D9910; // type:function size:0x10
|
||||
__dt__20dLytMeterContainer_cFv = .text:0x800D9920; // type:function size:0xBD0
|
||||
@@ -10938,7 +10938,7 @@ fn_801B2BD0 = .text:0x801B2BD0; // type:function size:0x10
|
||||
fn_801B2BE0 = .text:0x801B2BE0; // type:function size:0x40
|
||||
fn_801B2C20 = .text:0x801B2C20; // type:function size:0x30
|
||||
executeMinigame__10dMessage_cFv = .text:0x801B2C50; // type:function size:0xC0
|
||||
fn_801B2D10 = .text:0x801B2D10; // type:function size:0x4C
|
||||
init__10dMessage_cFv = .text:0x801B2D10; // type:function size:0x4C
|
||||
reset__10dMessage_cFv = .text:0x801B2D60; // type:function size:0x44
|
||||
getLanguageIdentifier__10dMessage_cFv = .text:0x801B2DB0; // type:function size:0x1B0
|
||||
getArcNameByIndex__10dMessage_cFlb = .text:0x801B2F60; // type:function size:0x4
|
||||
|
||||
@@ -75,6 +75,7 @@ public:
|
||||
TRIAL_FARON,
|
||||
TRIAL_ELDIN,
|
||||
TRIAL_LANAYRU,
|
||||
TRIAL_NONE,
|
||||
};
|
||||
|
||||
static Trial_e getCurrentTrial();
|
||||
|
||||
@@ -30,12 +30,21 @@ public:
|
||||
return sTagProcessor;
|
||||
}
|
||||
|
||||
void init();
|
||||
void reset();
|
||||
|
||||
bool getField_0x329() const {
|
||||
return field_0x329;
|
||||
}
|
||||
|
||||
s32 getField_0x2FC() const {
|
||||
return field_0x2FC;
|
||||
}
|
||||
|
||||
void setField_0x2FC(s32 val) {
|
||||
field_0x2FC = val;
|
||||
}
|
||||
|
||||
s32 getField_0x32C() const {
|
||||
return field_0x32C;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,26 @@
|
||||
#include "d/lyt/d_lyt_bird_gauge.h"
|
||||
#include "d/lyt/d_lyt_boss_gauge.h"
|
||||
#include "d/lyt/d_lyt_sky_gauge.h"
|
||||
#include "m/m_vec.h"
|
||||
|
||||
enum Meter_e {
|
||||
METER_GANBARI = 0,
|
||||
METER_RUPY = 1,
|
||||
METER_ITEM_SELECT = 2,
|
||||
METER_CROSS_BTN = 3,
|
||||
METER_PLUS_BTN = 4,
|
||||
METER_MINUS_BTN = 5,
|
||||
METER_A_BTN = 6,
|
||||
METER_DOWSING = 7,
|
||||
METER_Z_BTN = 8,
|
||||
METER_NUN_STK = 9,
|
||||
METER_REMOCON_BG = 10,
|
||||
METER_NUN_BG = 11,
|
||||
METER_HEART = 12,
|
||||
METER_SHIELD = 13,
|
||||
METER_1_BTN = 14,
|
||||
METER_2_BTN = 15,
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
|
||||
@@ -55,11 +75,11 @@ public:
|
||||
u8 getUiMode();
|
||||
|
||||
u8 getField_0x13792() const {
|
||||
return field_0x13792;
|
||||
return field_0x13792[0];
|
||||
}
|
||||
|
||||
u8 getField_0x13793() const {
|
||||
return field_0x13793;
|
||||
return field_0x13792[1];
|
||||
}
|
||||
|
||||
u8 getField_0x1377E() const {
|
||||
@@ -116,19 +136,26 @@ public:
|
||||
/* 0x1373C */ mVec3_c mPos2;
|
||||
/* 0x13748 */ u8 field_0x13748[0x13750 - 0x13748];
|
||||
/* 0x13750 */ s32 field_0x13750;
|
||||
/* 0x13754 */ u8 field_0x13754[0x13770 - 0x13754];
|
||||
/* 0x13754 */ s32 field_0x13754;
|
||||
/* 0x13758 */ s32 field_0x13758;
|
||||
/* 0x1375C */ s32 field_0x1375C;
|
||||
/* 0x13760 */ s32 field_0x13760;
|
||||
/* 0x13764 */ s32 field_0x13764;
|
||||
/* 0x13768 */ s32 field_0x13768;
|
||||
/* 0x1376C */ s32 field_0x1376C;
|
||||
/* 0x13770 */ u8 field_0x13770;
|
||||
/* 0x13771 */ u8 field_0x13771[0x13774 - 0x13771];
|
||||
/* 0x13771 */ u8 field_0x13771;
|
||||
/* 0x13772 */ u8 field_0x13772;
|
||||
/* 0x13773 */ u8 field_0x13773;
|
||||
/* 0x13774 */ u8 field_0x13774;
|
||||
/* 0x13775 */ u8 field_0x13775[0x1377E - 0x13775];
|
||||
/* 0x1377E */ u8 field_0x1377E;
|
||||
/* 0x1377F */ u8 field_0x1377F;
|
||||
/* 0x13780 */ u8 field_0x13780[0x13792 - 0x13780];
|
||||
/* 0x13792 */ u8 field_0x13792;
|
||||
/* 0x13793 */ u8 field_0x13793;
|
||||
/* 0x13794 */ u8 field_0x13794[0x1379A - 0x13794];
|
||||
/* 0x1379A */ u8 field_0x1379A;
|
||||
/* 0x1379B */ u8 field_0x1379B[0x137B4 - 0x1379B];
|
||||
/* 0x13780 */ u8 field_0x13780[0x13782 - 0x13780];
|
||||
/* 0x13782 */ u8 field_0x13782[16];
|
||||
/* 0x13792 */ u8 field_0x13792[16];
|
||||
/* 0x137A2 */ u8 field_0x137A2[16];
|
||||
/* 0x137B2 */ u8 field_0x137B2;
|
||||
/* 0x137B4 */ mVec3_c mPos3;
|
||||
/* 0x137C0 */ u32 field_0x137C0;
|
||||
};
|
||||
@@ -193,7 +220,7 @@ public:
|
||||
}
|
||||
|
||||
u8 getMeterField_0x1379A() const {
|
||||
return mMeter.field_0x1379A;
|
||||
return mMeter.field_0x13792[8];
|
||||
}
|
||||
|
||||
bool checkAllFlags(u32 mask) const {
|
||||
@@ -220,7 +247,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static u8 getField_0x13B63() {
|
||||
static u8 getField_0x13B63() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->field_0x13B63;
|
||||
} else {
|
||||
@@ -228,19 +255,52 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static void setField_0x13B61(u8 val) {
|
||||
static void setRupyField_0x8A9(u8 val) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->mMeter.mRupy.setField_0x8A9(val);
|
||||
}
|
||||
}
|
||||
|
||||
static void setRupyField_0x8AA(u8 val) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->mMeter.mRupy.setField_0x8AA(val);
|
||||
}
|
||||
}
|
||||
|
||||
static void setRupyField_0x8AC(u8 val) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->mMeter.mRupy.setField_0x8AC(val);
|
||||
}
|
||||
}
|
||||
|
||||
static u8 getRupyField_0x8AC() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->mMeter.mRupy.getField_0x8AC();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static s32 getHeartField_0x78C() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->mMeter.mHeart.getField_0x78C();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void setField_0x13B61(u8 val) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->field_0x13B61 = val;
|
||||
}
|
||||
}
|
||||
|
||||
static void setField_0x13B64(u8 val) {
|
||||
static void setField_0x13B64(u8 val) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->field_0x13B64 = val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static u8 getDowsing0x550A() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->mMeter.mDowsing.getField_0x550A();
|
||||
@@ -275,11 +335,15 @@ private:
|
||||
/* 0x13B48 */ bool mVisible;
|
||||
/* 0x13B49 */ u8 _0x13B49[0x13B50 - 0x13B49];
|
||||
/* 0x13B50 */ s32 mFlags;
|
||||
/* 0x13B54 */ u8 _0x13B54[0x13B61 - 0x13B54];
|
||||
/* 0x13B54 */ s32 field_0x13B54;
|
||||
/* 0x13B58 */ u8 _0x13B58[0x13B60 - 0x13B58];
|
||||
/* 0x13B60 */ u8 field_0x13B60;
|
||||
/* 0x13B61 */ u8 field_0x13B61;
|
||||
/* 0x13B62 */ u8 field_0x13B62;
|
||||
/* 0x13B63 */ u8 field_0x13B63;
|
||||
/* 0x13B64 */ u8 field_0x13B64;
|
||||
/* 0x13B65 */ u8 field_0x13B65;
|
||||
/* 0x13B66 */ u8 field_0x13B66;
|
||||
|
||||
static dLytMeterContainer_c *sInstance;
|
||||
};
|
||||
|
||||
@@ -26,6 +26,10 @@ public:
|
||||
mpContainerAnmGroup2 = g2;
|
||||
}
|
||||
|
||||
void setOwnerPane(nw4r::lyt::Pane *pane) {
|
||||
mpOwnerPane = pane;
|
||||
}
|
||||
|
||||
private:
|
||||
void setMessage(s32 id);
|
||||
|
||||
|
||||
@@ -156,6 +156,10 @@ public:
|
||||
return field_0x550A;
|
||||
}
|
||||
|
||||
void setOwnerPane(nw4r::lyt::Pane *pane) {
|
||||
mpOwnerPane = pane;
|
||||
}
|
||||
|
||||
private:
|
||||
void setItemName(s32 id);
|
||||
void setMessage(s32 id);
|
||||
|
||||
@@ -27,6 +27,10 @@ public:
|
||||
|
||||
bool fn_80104760() const;
|
||||
|
||||
void setOwnerPane(nw4r::lyt::Pane *pane) {
|
||||
mpOwnerPane = pane;
|
||||
}
|
||||
|
||||
private:
|
||||
void realizeAnimState();
|
||||
static bool isStaminaLow(f32);
|
||||
@@ -56,7 +60,7 @@ private:
|
||||
|
||||
/* 0x080 */ d2d::dLytSub mLyt;
|
||||
/* 0x114 */ d2d::AnmGroup_c mAnm[16];
|
||||
/* 0x514 */ nw4r::lyt::Pane *mpPane;
|
||||
/* 0x514 */ nw4r::lyt::Pane *mpOwnerPane;
|
||||
/* 0x518 */ f32 field_0x518;
|
||||
/* 0x51C */ f32 field_0x51C;
|
||||
/* 0x520 */ u8 _0x520[0x524 - 0x520];
|
||||
|
||||
@@ -21,6 +21,10 @@ public:
|
||||
}
|
||||
|
||||
virtual ~dLytMeterHeart_c() {}
|
||||
|
||||
s32 getField_0x78C() const {
|
||||
return field_0x78C;
|
||||
}
|
||||
|
||||
private:
|
||||
u8 getCurrentHealth() const;
|
||||
|
||||
@@ -47,8 +47,12 @@ public:
|
||||
dLytMeterBossKey_c() : mStateMgr(*this, sStateID::null) {}
|
||||
~dLytMeterBossKey_c() {}
|
||||
|
||||
virtual void BossKey0x8() {}
|
||||
virtual void BossKey0xC() {}
|
||||
virtual d2d::LytBase_c *getLyt() {
|
||||
return &mLyt;
|
||||
}
|
||||
virtual const char *getName() const {
|
||||
return mLyt.getName();
|
||||
}
|
||||
|
||||
bool build(d2d::ResAccIf_c *);
|
||||
bool remove();
|
||||
@@ -82,8 +86,12 @@ public:
|
||||
dLytMeterSmallKey_c() : mStateMgr(*this, sStateID::null) {}
|
||||
~dLytMeterSmallKey_c() {}
|
||||
|
||||
virtual void SmallKey0x8() {}
|
||||
virtual void SmallKey0xC() {}
|
||||
virtual d2d::LytBase_c *getLyt() {
|
||||
return &mLyt;
|
||||
}
|
||||
virtual const char *getName() const {
|
||||
return mLyt.getName();
|
||||
}
|
||||
|
||||
bool build(d2d::ResAccIf_c *);
|
||||
bool remove();
|
||||
|
||||
@@ -122,6 +122,10 @@ public:
|
||||
|
||||
bool demoRelated(s32 arg);
|
||||
|
||||
void setOwnerPane(nw4r::lyt::Pane *pane) {
|
||||
mpOwnerPane = pane;
|
||||
}
|
||||
|
||||
private:
|
||||
bool shouldCall() const;
|
||||
bool fn_800F75E0() const;
|
||||
|
||||
@@ -27,6 +27,10 @@ public:
|
||||
|
||||
virtual ~dLytMeterNunStk_c() {}
|
||||
|
||||
void setOwnerPane(nw4r::lyt::Pane *pane) {
|
||||
mpOwnerPane = pane;
|
||||
}
|
||||
|
||||
private:
|
||||
void setMessage(s32 id);
|
||||
|
||||
|
||||
@@ -22,6 +22,10 @@ public:
|
||||
|
||||
virtual ~dLytMeterNunchakuBg_c() {}
|
||||
|
||||
void setOwnerPane(nw4r::lyt::Pane *pane) {
|
||||
mpOwnerPane = pane;
|
||||
}
|
||||
|
||||
private:
|
||||
void setMessage(s32 id);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define D_LYT_METER_PARTS_H
|
||||
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "nw4r/lyt/lyt_pane.h"
|
||||
#include "s/s_State.hpp"
|
||||
|
||||
class dLytMeter1Button_c : public d2d::dSubPane {
|
||||
@@ -21,6 +22,12 @@ public:
|
||||
return mLyt.getName();
|
||||
}
|
||||
|
||||
bool shouldCall() const;
|
||||
|
||||
void setOwnerPane(nw4r::lyt::Pane *pane) {
|
||||
mpOwnerPane = pane;
|
||||
}
|
||||
|
||||
private:
|
||||
STATE_FUNC_DECLARE(dLytMeter1Button_c, Wait);
|
||||
STATE_FUNC_DECLARE(dLytMeter1Button_c, ToUse);
|
||||
@@ -29,14 +36,14 @@ private:
|
||||
|
||||
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;
|
||||
d2d::AnmGroup_c mAnm[3];
|
||||
/* 0x198 */ dWindow_c *mpWindow[1];
|
||||
/* 0x19C */ dTextBox_c *mpSizeBox[1];
|
||||
/* 0x1A0 */ nw4r::lyt::Pane *mpOwnerPane;
|
||||
/* 0x1A4 */ s32 mUnuseDelay;
|
||||
/* 0x1A8 */ s32 mCallCount;
|
||||
/* 0x1AC */ bool mShouldCall;
|
||||
/* 0x1AD */ bool mHasInitedCall;
|
||||
};
|
||||
|
||||
class dLytMeter2Button_c : public d2d::dSubPane {
|
||||
@@ -56,6 +63,12 @@ public:
|
||||
return mLyt.getName();
|
||||
}
|
||||
|
||||
bool shouldCall() const;
|
||||
|
||||
void setOwnerPane(nw4r::lyt::Pane *pane) {
|
||||
mpOwnerPane = pane;
|
||||
}
|
||||
|
||||
private:
|
||||
STATE_FUNC_DECLARE(dLytMeter2Button_c, Wait);
|
||||
STATE_FUNC_DECLARE(dLytMeter2Button_c, ToUse);
|
||||
@@ -64,28 +77,39 @@ private:
|
||||
|
||||
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;
|
||||
d2d::AnmGroup_c mAnm[3];
|
||||
/* 0x198 */ dWindow_c *mpWindow[1];
|
||||
/* 0x19C */ dTextBox_c *mpSizeBox[1];
|
||||
/* 0x1A0 */ nw4r::lyt::Pane *mpOwnerPane;
|
||||
/* 0x1A4 */ s32 mUnuseDelay;
|
||||
/* 0x1A8 */ s32 mCallCount;
|
||||
/* 0x1AC */ bool mShouldCall;
|
||||
/* 0x1AD */ bool mHasInitedCall;
|
||||
};
|
||||
|
||||
class dLytMeterParts_c {
|
||||
public:
|
||||
dLytMeterParts_c() : mStateMgr(*this, sStateID::null) {}
|
||||
|
||||
void build(s32 index);
|
||||
void execute();
|
||||
|
||||
void setAnmGroups(d2d::AnmGroup_c *inAnm, d2d::AnmGroup_c *outAnm) {
|
||||
mpAnm1 = inAnm;
|
||||
mpAnm2 = outAnm;
|
||||
}
|
||||
|
||||
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];
|
||||
/* 0x00 */ UI_STATE_MGR_DECLARE(dLytMeterParts_c);
|
||||
/* 0x3C */ d2d::AnmGroup_c *mpAnm1;
|
||||
/* 0x40 */ d2d::AnmGroup_c *mpAnm2;
|
||||
/* 0x44 */ s32 mIndex;
|
||||
/* 0x48 */ u8 mShouldBeVisible;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,10 @@ public:
|
||||
bool isCalling() const;
|
||||
void setCall(bool shouldCall);
|
||||
|
||||
void setOwnerPane(nw4r::lyt::Pane *pane) {
|
||||
mpOwnerPane = pane;
|
||||
}
|
||||
|
||||
private:
|
||||
void setMessage(s32 id);
|
||||
bool isMapOpen() const;
|
||||
|
||||
@@ -89,6 +89,22 @@ public:
|
||||
|
||||
mVec3_c getLastVisibleDigitPosition();
|
||||
|
||||
void setField_0x8A9(u8 val) {
|
||||
field_0x8A9 = val;
|
||||
}
|
||||
|
||||
void setField_0x8AA(u8 val) {
|
||||
field_0x8AA = val;
|
||||
}
|
||||
|
||||
u8 getField_0x8AC() const {
|
||||
return field_0x8AC;
|
||||
}
|
||||
|
||||
void setField_0x8AC(u8 val) {
|
||||
field_0x8AC = val;
|
||||
}
|
||||
|
||||
private:
|
||||
bool updateDisplayedAmount(bool suppressSound);
|
||||
bool hasChangeInRupees() const;
|
||||
|
||||
@@ -27,6 +27,10 @@ public:
|
||||
mpContainerAnmGroup = g;
|
||||
}
|
||||
|
||||
void setOwnerPane(nw4r::lyt::Pane *pane) {
|
||||
mpOwnerPane = pane;
|
||||
}
|
||||
|
||||
private:
|
||||
s32 getLytFrameForShield(s32) const;
|
||||
void setLevel(f32 level);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef D_LYT_METER_TIMER_H
|
||||
#define D_LYT_METER_TIMER_H
|
||||
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_item.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "m/m_color.h"
|
||||
@@ -9,7 +10,8 @@
|
||||
|
||||
class LytMeterTimerPart1_c : public d2d::dSubPane {
|
||||
public:
|
||||
LytMeterTimerPart1_c() {
|
||||
LytMeterTimerPart1_c()
|
||||
: mActualTearCount(0), mDisplayedTearCount(0), field_0x760(0), mTrial(dAcItem_c::TRIAL_NONE), field_0x780(0) {
|
||||
sInstance = this;
|
||||
}
|
||||
virtual bool build(d2d::ResAccIf_c *resAcc) override;
|
||||
@@ -95,7 +97,7 @@ private:
|
||||
|
||||
class LytMeterTimerPart2_c : public d2d::dSubPane {
|
||||
public:
|
||||
LytMeterTimerPart2_c() {
|
||||
LytMeterTimerPart2_c(): mNumPetals(0), mTrial(dAcItem_c::TRIAL_NONE), mVisible(true), mFlowerLoopFrame(0.0f) {
|
||||
sInstance = this;
|
||||
}
|
||||
virtual bool build(d2d::ResAccIf_c *resAcc) override;
|
||||
@@ -223,7 +225,22 @@ private:
|
||||
|
||||
class dLytMeterTimer_c {
|
||||
public:
|
||||
dLytMeterTimer_c() : mStateMgr(*this, sStateID::null) {}
|
||||
dLytMeterTimer_c()
|
||||
: mStateMgr(*this, sStateID::null),
|
||||
mpPart1(nullptr),
|
||||
mpPart2(nullptr),
|
||||
field_0x48(0),
|
||||
field_0x49(0),
|
||||
mActualTime(0),
|
||||
mLastTime(0),
|
||||
field_0x54(0),
|
||||
field_0x55(0),
|
||||
field_0x56(8),
|
||||
field_0x57(8),
|
||||
field_0x58(0),
|
||||
field_0x59(0),
|
||||
field_0x5C(0),
|
||||
field_0x60(0) {}
|
||||
virtual ~dLytMeterTimer_c() {}
|
||||
bool build();
|
||||
bool remove();
|
||||
@@ -267,6 +284,7 @@ private:
|
||||
/* 0x40 */ LytMeterTimerPart1_c *mpPart1;
|
||||
/* 0x44 */ LytMeterTimerPart2_c *mpPart2;
|
||||
/* 0x48 */ u8 field_0x48;
|
||||
/* 0x49 */ u8 field_0x49;
|
||||
/* 0x4C */ s32 mActualTime;
|
||||
/* 0x50 */ s32 mLastTime;
|
||||
/* 0x54 */ u8 field_0x54;
|
||||
|
||||
@@ -28,6 +28,10 @@ public:
|
||||
|
||||
bool isCalling() const;
|
||||
|
||||
void setOwnerPane(nw4r::lyt::Pane *pane) {
|
||||
mpOwnerPane = pane;
|
||||
}
|
||||
|
||||
private:
|
||||
void setMessage(s32 id);
|
||||
|
||||
|
||||
+432
-113
@@ -6,10 +6,14 @@
|
||||
#include "d/d_stage_mgr.h"
|
||||
#include "d/flag/storyflag_manager.h"
|
||||
#include "d/lyt/d_lyt_area_caption.h"
|
||||
#include "d/lyt/d_lyt_control_game.h"
|
||||
#include "d/lyt/d_lyt_meter_configuration.h"
|
||||
#include "d/lyt/d_window.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/lyt/lyt_group.h"
|
||||
#include "toBeSorted/arc_managers/layout_arc_manager.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
// clang-format on
|
||||
|
||||
static dLytMeterConfiguration_c sConf;
|
||||
@@ -39,53 +43,53 @@ void dLytMeter1Button_c::executeState_Wait() {
|
||||
void dLytMeter1Button_c::finalizeState_Wait() {}
|
||||
|
||||
void dLytMeter1Button_c::initializeState_ToUse() {
|
||||
mAnmGroups[0].setBackwardsOnce();
|
||||
mAnmGroups[0].setToStart();
|
||||
mAnmGroups[0].setAnimEnable(true);
|
||||
mAnm[0].setBackwardsOnce();
|
||||
mAnm[0].setToStart();
|
||||
mAnm[0].setAnimEnable(true);
|
||||
}
|
||||
void dLytMeter1Button_c::executeState_ToUse() {
|
||||
if (mAnmGroups[0].isStop2()) {
|
||||
if (mAnm[0].isStop2()) {
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
}
|
||||
|
||||
if (mAnmGroups[0].isEnabled()) {
|
||||
mAnmGroups[0].play();
|
||||
if (mAnm[0].isEnabled()) {
|
||||
mAnm[0].play();
|
||||
}
|
||||
}
|
||||
void dLytMeter1Button_c::finalizeState_ToUse() {
|
||||
mAnmGroups[0].setAnimEnable(false);
|
||||
mAnm[0].setAnimEnable(false);
|
||||
}
|
||||
|
||||
void dLytMeter1Button_c::initializeState_ToUnuse() {
|
||||
mAnmGroups[0].setForwardOnce();
|
||||
mAnmGroups[0].setToStart();
|
||||
mAnmGroups[0].setAnimEnable(true);
|
||||
mAnm[0].setForwardOnce();
|
||||
mAnm[0].setToStart();
|
||||
mAnm[0].setAnimEnable(true);
|
||||
}
|
||||
void dLytMeter1Button_c::executeState_ToUnuse() {
|
||||
if (mAnmGroups[0].isStop2()) {
|
||||
if (mAnm[0].isStop2()) {
|
||||
mStateMgr.changeState(StateID_Unuse);
|
||||
}
|
||||
|
||||
if (mAnmGroups[0].isEnabled()) {
|
||||
mAnmGroups[0].play();
|
||||
if (mAnm[0].isEnabled()) {
|
||||
mAnm[0].play();
|
||||
}
|
||||
}
|
||||
void dLytMeter1Button_c::finalizeState_ToUnuse() {
|
||||
mAnmGroups[0].setAnimEnable(false);
|
||||
mAnm[0].setAnimEnable(false);
|
||||
}
|
||||
|
||||
void dLytMeter1Button_c::initializeState_Unuse() {
|
||||
field_0x1A4 = 15;
|
||||
mUnuseDelay = 15;
|
||||
}
|
||||
void dLytMeter1Button_c::executeState_Unuse() {
|
||||
if (dLytMeterContainer_c::GetInstance()->checkAllFlags(0x80)) {
|
||||
if (!(field_0x1A4 > 0)) {
|
||||
if (!(mUnuseDelay > 0)) {
|
||||
mStateMgr.changeState(StateID_ToUse);
|
||||
return;
|
||||
}
|
||||
field_0x1A4 -= 1;
|
||||
mUnuseDelay -= 1;
|
||||
} else {
|
||||
field_0x1A4 = 15;
|
||||
mUnuseDelay = 15;
|
||||
}
|
||||
}
|
||||
void dLytMeter1Button_c::finalizeState_Unuse() {}
|
||||
@@ -96,50 +100,114 @@ static const d2d::LytBrlanMapping btn1BrlanMap[] = {
|
||||
{ "remoConBtn_04_loop.brlan", "G_loop_00"},
|
||||
};
|
||||
|
||||
static char *sWindowName1 = "W_bgP_00";
|
||||
#define BUTTON_1_ANIM_INPUT 0
|
||||
#define BUTTON_1_ANIM_CALL 1
|
||||
#define BUTTON_1_ANIM_LOOP 2
|
||||
|
||||
#define BUTTON_1_NUM_ANIMS 3
|
||||
|
||||
static char *sWindowName1[] = {"W_bgP_00"};
|
||||
|
||||
bool dLytMeter1Button_c::build(d2d::ResAccIf_c *resAcc) {
|
||||
mLyt.setResAcc(resAcc);
|
||||
mLyt.build("remoConBtn_04.brlyt", nullptr);
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
mAnmGroups[i].init(btn1BrlanMap[i].mFile, resAcc, mLyt.getLayout(), btn1BrlanMap[i].mName);
|
||||
mAnmGroups[i].bind(false);
|
||||
mAnmGroups[i].setAnimEnable(false);
|
||||
for (int i = 0; i < BUTTON_1_NUM_ANIMS; i++) {
|
||||
mAnm[i].init(btn1BrlanMap[i].mFile, resAcc, mLyt.getLayout(), btn1BrlanMap[i].mName);
|
||||
mAnm[i].bind(false);
|
||||
mAnm[i].setAnimEnable(false);
|
||||
}
|
||||
// TODO
|
||||
|
||||
mLyt.fn_800AB9A0(mLyt.getTextBox("T_sabBtnS_00"), 0);
|
||||
mLyt.fn_800AB9A0(mLyt.getTextBox("T_sabBtn_00"), 0);
|
||||
mpWindow = mLyt.getWindow(sWindowName1);
|
||||
mpTextbox = mLyt.getSizeBoxInWindow(sWindowName1);
|
||||
mpWindow->UpdateSize(mpTextbox, 32.0f);
|
||||
field_0x1A4 = 15;
|
||||
field_0x1AC = 0;
|
||||
field_0x1AD = 0;
|
||||
field_0x1A8 = 0;
|
||||
mAnmGroups[1].setToEnd();
|
||||
mAnmGroups[1].setAnimEnable(true);
|
||||
mAnmGroups[2].setAnimEnable(true);
|
||||
for (int i = 0; i < 1; i++) {
|
||||
mpWindow[i] = mLyt.getWindow(sWindowName1[i]);
|
||||
mpSizeBox[i] = mLyt.getSizeBoxInWindow(sWindowName1[i]);
|
||||
mpWindow[i]->UpdateSize(mpSizeBox[i], 32.0f);
|
||||
}
|
||||
mUnuseDelay = 15;
|
||||
mShouldCall = false;
|
||||
mHasInitedCall = false;
|
||||
mCallCount = false;
|
||||
mAnm[BUTTON_1_ANIM_CALL].setToEnd();
|
||||
mAnm[BUTTON_1_ANIM_CALL].setAnimEnable(true);
|
||||
mAnm[BUTTON_1_ANIM_LOOP].setAnimEnable(true);
|
||||
mLyt.calc();
|
||||
mAnmGroups[1].setAnimEnable(false);
|
||||
mAnm[BUTTON_1_ANIM_CALL].setAnimEnable(false);
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dLytMeter1Button_c::remove() {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
mAnmGroups[i].unbind();
|
||||
mAnmGroups[i].remove();
|
||||
for (int i = 0; i < BUTTON_1_NUM_ANIMS; i++) {
|
||||
mAnm[i].unbind();
|
||||
mAnm[i].remove();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dLytMeter1Button_c::execute() {
|
||||
if (*mStateMgr.getStateID() == StateID_ToUnuse) {
|
||||
// TODO
|
||||
} else {
|
||||
mStateMgr.executeState();
|
||||
dLytMeterContainer_c *container = dLytMeterContainer_c::GetInstance();
|
||||
if (mpOwnerPane == nullptr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mpOwnerPane->IsVisible()) {
|
||||
if (*mStateMgr.getStateID() == StateID_ToUnuse) {
|
||||
mAnm[BUTTON_1_ANIM_INPUT].setToEnd2();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
mStateMgr.executeState();
|
||||
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal()) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(571)) {
|
||||
mShouldCall = true;
|
||||
}
|
||||
} else {
|
||||
mShouldCall = false;
|
||||
}
|
||||
|
||||
if (mShouldCall && container->checkAllFlags(0x80)) {
|
||||
if (!mHasInitedCall) {
|
||||
mAnm[BUTTON_1_ANIM_CALL].setToEnd();
|
||||
mAnm[BUTTON_1_ANIM_CALL].setAnimEnable(true);
|
||||
mHasInitedCall = true;
|
||||
}
|
||||
|
||||
if (mAnm[BUTTON_1_ANIM_CALL].isEnabled()) {
|
||||
mAnm[BUTTON_1_ANIM_CALL].play();
|
||||
if (container->checkAllFlags(0x80) && mCallCount < 3 && mAnm[BUTTON_1_ANIM_CALL].getFrame() == 1.0f) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_1_BUTTON_BLINK);
|
||||
mCallCount++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (mHasInitedCall == true) {
|
||||
mAnm[BUTTON_1_ANIM_CALL].setToEnd();
|
||||
} else if (mAnm[BUTTON_1_ANIM_CALL].isEnabled()) {
|
||||
mAnm[BUTTON_1_ANIM_CALL].setAnimEnable(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (!mShouldCall) {
|
||||
mHasInitedCall = mShouldCall;
|
||||
}
|
||||
|
||||
mShouldCall = false;
|
||||
if (mAnm[BUTTON_1_ANIM_LOOP].isEnabled()) {
|
||||
mAnm[BUTTON_1_ANIM_LOOP].play();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dLytMeter1Button_c::shouldCall() const {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() && StoryflagManager::sInstance->getCounterOrFlag(571)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void dLytMeter2Button_c::initializeState_Wait() {}
|
||||
@@ -152,53 +220,53 @@ void dLytMeter2Button_c::executeState_Wait() {
|
||||
void dLytMeter2Button_c::finalizeState_Wait() {}
|
||||
|
||||
void dLytMeter2Button_c::initializeState_ToUse() {
|
||||
mAnmGroups[0].setBackwardsOnce();
|
||||
mAnmGroups[0].setToStart();
|
||||
mAnmGroups[0].setAnimEnable(true);
|
||||
mAnm[0].setBackwardsOnce();
|
||||
mAnm[0].setToStart();
|
||||
mAnm[0].setAnimEnable(true);
|
||||
}
|
||||
void dLytMeter2Button_c::executeState_ToUse() {
|
||||
if (mAnmGroups[0].isStop2()) {
|
||||
if (mAnm[0].isStop2()) {
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
}
|
||||
|
||||
if (mAnmGroups[0].isEnabled()) {
|
||||
mAnmGroups[0].play();
|
||||
if (mAnm[0].isEnabled()) {
|
||||
mAnm[0].play();
|
||||
}
|
||||
}
|
||||
void dLytMeter2Button_c::finalizeState_ToUse() {
|
||||
mAnmGroups[0].setAnimEnable(false);
|
||||
mAnm[0].setAnimEnable(false);
|
||||
}
|
||||
|
||||
void dLytMeter2Button_c::initializeState_ToUnuse() {
|
||||
mAnmGroups[0].setForwardOnce();
|
||||
mAnmGroups[0].setToStart();
|
||||
mAnmGroups[0].setAnimEnable(true);
|
||||
mAnm[0].setForwardOnce();
|
||||
mAnm[0].setToStart();
|
||||
mAnm[0].setAnimEnable(true);
|
||||
}
|
||||
void dLytMeter2Button_c::executeState_ToUnuse() {
|
||||
if (mAnmGroups[0].isStop2()) {
|
||||
if (mAnm[0].isStop2()) {
|
||||
mStateMgr.changeState(StateID_Unuse);
|
||||
}
|
||||
|
||||
if (mAnmGroups[0].isEnabled()) {
|
||||
mAnmGroups[0].play();
|
||||
if (mAnm[0].isEnabled()) {
|
||||
mAnm[0].play();
|
||||
}
|
||||
}
|
||||
void dLytMeter2Button_c::finalizeState_ToUnuse() {
|
||||
mAnmGroups[0].setAnimEnable(false);
|
||||
mAnm[0].setAnimEnable(false);
|
||||
}
|
||||
|
||||
void dLytMeter2Button_c::initializeState_Unuse() {
|
||||
field_0x1A4 = 15;
|
||||
mUnuseDelay = 15;
|
||||
}
|
||||
void dLytMeter2Button_c::executeState_Unuse() {
|
||||
if (dLytMeterContainer_c::GetInstance()->checkAllFlags(0x100)) {
|
||||
if (!(field_0x1A4 > 0)) {
|
||||
if (!(mUnuseDelay > 0)) {
|
||||
mStateMgr.changeState(StateID_ToUse);
|
||||
return;
|
||||
}
|
||||
field_0x1A4 -= 1;
|
||||
mUnuseDelay -= 1;
|
||||
} else {
|
||||
field_0x1A4 = 15;
|
||||
mUnuseDelay = 15;
|
||||
}
|
||||
}
|
||||
void dLytMeter2Button_c::finalizeState_Unuse() {}
|
||||
@@ -209,65 +277,222 @@ static const d2d::LytBrlanMapping btn2BrlanMap[] = {
|
||||
{ "remoConBtn_05_loop.brlan", "G_loop_00"},
|
||||
};
|
||||
|
||||
static char *sWindowName2 = "W_bgP_00";
|
||||
#define BUTTON_2_ANIM_INPUT 0
|
||||
#define BUTTON_2_ANIM_CALL 1
|
||||
#define BUTTON_2_ANIM_LOOP 2
|
||||
|
||||
#define BUTTON_2_NUM_ANIMS 3
|
||||
|
||||
static char *sWindowName2[] = {"W_bgP_00"};
|
||||
|
||||
bool dLytMeter2Button_c::build(d2d::ResAccIf_c *resAcc) {
|
||||
mLyt.setResAcc(resAcc);
|
||||
mLyt.build("remoConBtn_05.brlyt", nullptr);
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
mAnmGroups[i].init(btn2BrlanMap[i].mFile, resAcc, mLyt.getLayout(), btn2BrlanMap[i].mName);
|
||||
mAnmGroups[i].bind(false);
|
||||
mAnmGroups[i].setAnimEnable(false);
|
||||
for (int i = 0; i < BUTTON_2_NUM_ANIMS; i++) {
|
||||
mAnm[i].init(btn2BrlanMap[i].mFile, resAcc, mLyt.getLayout(), btn2BrlanMap[i].mName);
|
||||
mAnm[i].bind(false);
|
||||
mAnm[i].setAnimEnable(false);
|
||||
}
|
||||
mpWindow = mLyt.getWindow(sWindowName2);
|
||||
mpTextbox = mLyt.getSizeBoxInWindow(sWindowName2);
|
||||
mpWindow->UpdateSize(mpTextbox, 32.0f);
|
||||
field_0x1A4 = 15;
|
||||
field_0x1AC = 0;
|
||||
field_0x1AD = 0;
|
||||
field_0x1A8 = 0;
|
||||
mAnmGroups[1].setToEnd();
|
||||
mAnmGroups[1].setAnimEnable(true);
|
||||
mAnmGroups[2].setAnimEnable(true);
|
||||
for (int i = 0; i < 1; i++) {
|
||||
mpWindow[i] = mLyt.getWindow(sWindowName2[i]);
|
||||
mpSizeBox[i] = mLyt.getSizeBoxInWindow(sWindowName2[i]);
|
||||
mpWindow[i]->UpdateSize(mpSizeBox[i], 32.0f);
|
||||
}
|
||||
mUnuseDelay = 15;
|
||||
mShouldCall = 0;
|
||||
mHasInitedCall = 0;
|
||||
mCallCount = 0;
|
||||
mAnm[BUTTON_2_ANIM_CALL].setToEnd();
|
||||
mAnm[BUTTON_2_ANIM_CALL].setAnimEnable(true);
|
||||
mAnm[BUTTON_2_ANIM_LOOP].setAnimEnable(true);
|
||||
mLyt.calc();
|
||||
mAnmGroups[1].setAnimEnable(false);
|
||||
mAnm[BUTTON_2_ANIM_CALL].setAnimEnable(false);
|
||||
mStateMgr.changeState(StateID_Wait);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dLytMeter2Button_c::remove() {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
mAnmGroups[i].unbind();
|
||||
mAnmGroups[i].remove();
|
||||
mAnm[i].unbind();
|
||||
mAnm[i].remove();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dLytMeter2Button_c::execute() {
|
||||
if (*mStateMgr.getStateID() == StateID_ToUnuse) {
|
||||
// TODO
|
||||
} else {
|
||||
mStateMgr.executeState();
|
||||
dLytMeterContainer_c *container = dLytMeterContainer_c::GetInstance();
|
||||
if (container->getMeterField_0x13774()) {
|
||||
StoryflagManager::sInstance->unsetFlag(832);
|
||||
}
|
||||
if (mpOwnerPane == nullptr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mpOwnerPane->IsVisible()) {
|
||||
if (*mStateMgr.getStateID() == StateID_ToUnuse) {
|
||||
mAnm[BUTTON_1_ANIM_INPUT].setToEnd2();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
mStateMgr.executeState();
|
||||
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal()) {
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(832)) {
|
||||
mShouldCall = true;
|
||||
}
|
||||
} else {
|
||||
mShouldCall = false;
|
||||
}
|
||||
|
||||
if (mShouldCall && container->checkAllFlags(0x100)) {
|
||||
if (!mHasInitedCall) {
|
||||
mAnm[BUTTON_1_ANIM_CALL].setToEnd();
|
||||
mAnm[BUTTON_1_ANIM_CALL].setAnimEnable(true);
|
||||
mHasInitedCall = true;
|
||||
}
|
||||
|
||||
if (mAnm[BUTTON_1_ANIM_CALL].isEnabled()) {
|
||||
mAnm[BUTTON_1_ANIM_CALL].play();
|
||||
if (container->checkAllFlags(0x100) && mCallCount < 3 && mAnm[BUTTON_1_ANIM_CALL].getFrame() == 1.0f) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_2_BUTTON_BLINK);
|
||||
mCallCount++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (mHasInitedCall == true) {
|
||||
mAnm[BUTTON_1_ANIM_CALL].setToEnd();
|
||||
} else if (mAnm[BUTTON_1_ANIM_CALL].isEnabled()) {
|
||||
mAnm[BUTTON_1_ANIM_CALL].setAnimEnable(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (!mShouldCall) {
|
||||
mHasInitedCall = mShouldCall;
|
||||
}
|
||||
|
||||
mShouldCall = false;
|
||||
if (mAnm[BUTTON_1_ANIM_LOOP].isEnabled()) {
|
||||
mAnm[BUTTON_1_ANIM_LOOP].play();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dLytMeter2Button_c::shouldCall() const {
|
||||
if (dLytControlGame_c::getInstance()->isStateNormal() && StoryflagManager::sInstance->getCounterOrFlag(832)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void dLytMeterParts_c::initializeState_Invisible() {}
|
||||
void dLytMeterParts_c::executeState_Invisible() {}
|
||||
void dLytMeterParts_c::executeState_Invisible() {
|
||||
if (mShouldBeVisible) {
|
||||
if (mIndex == METER_SHIELD) {
|
||||
mpAnm1->setForwardOnce();
|
||||
if (dMessage_c::getInstance()->getField_0x2FC() != 0) {
|
||||
mpAnm1->setToEnd();
|
||||
dLytMeterContainer_c::setRupyField_0x8A9(1);
|
||||
} else {
|
||||
mpAnm1->setFrame(0.0f);
|
||||
dLytMeterContainer_c::setRupyField_0x8A9(2);
|
||||
}
|
||||
mpAnm1->setAnimEnable(true);
|
||||
} else {
|
||||
mpAnm1->setForwardOnce();
|
||||
mpAnm1->setFrame(0.0f);
|
||||
mpAnm1->setAnimEnable(true);
|
||||
}
|
||||
mStateMgr.changeState(StateID_In);
|
||||
}
|
||||
}
|
||||
void dLytMeterParts_c::finalizeState_Invisible() {}
|
||||
|
||||
void dLytMeterParts_c::initializeState_In() {}
|
||||
void dLytMeterParts_c::executeState_In() {}
|
||||
void dLytMeterParts_c::executeState_In() {
|
||||
if (mpAnm1->isEndReached()) {
|
||||
mpAnm1->setAnimEnable(false);
|
||||
mStateMgr.changeState(StateID_Visible);
|
||||
}
|
||||
|
||||
if (mpAnm1->isEnabled()) {
|
||||
mpAnm1->play();
|
||||
}
|
||||
}
|
||||
void dLytMeterParts_c::finalizeState_In() {}
|
||||
|
||||
void dLytMeterParts_c::initializeState_Visible() {}
|
||||
void dLytMeterParts_c::executeState_Visible() {}
|
||||
void dLytMeterParts_c::executeState_Visible() {
|
||||
if (!mShouldBeVisible) {
|
||||
if (mIndex == METER_SHIELD) {
|
||||
mpAnm2->setForwardOnce();
|
||||
if (dLytMeterContainer_c::getRupyField_0x8AC()) {
|
||||
mpAnm2->setToEnd();
|
||||
if (dLytMeterContainer_c::getHeartField_0x78C() == 0) {
|
||||
dLytMeterContainer_c::setRupyField_0x8AA(1);
|
||||
} else {
|
||||
dLytMeterContainer_c::setRupyField_0x8AA(3);
|
||||
}
|
||||
dLytMeterContainer_c::setRupyField_0x8AC(0);
|
||||
} else {
|
||||
mpAnm2->setFrame(0.0f);
|
||||
if (dLytMeterContainer_c::getHeartField_0x78C() == 0) {
|
||||
dLytMeterContainer_c::setRupyField_0x8AA(2);
|
||||
} else {
|
||||
dLytMeterContainer_c::setRupyField_0x8AA(4);
|
||||
}
|
||||
}
|
||||
mpAnm2->setAnimEnable(true);
|
||||
} else {
|
||||
mpAnm2->setForwardOnce();
|
||||
mpAnm2->setFrame(0.0f);
|
||||
mpAnm2->setAnimEnable(true);
|
||||
}
|
||||
mStateMgr.changeState(StateID_Out);
|
||||
}
|
||||
}
|
||||
void dLytMeterParts_c::finalizeState_Visible() {}
|
||||
|
||||
void dLytMeterParts_c::initializeState_Out() {}
|
||||
void dLytMeterParts_c::executeState_Out() {}
|
||||
void dLytMeterParts_c::executeState_Out() {
|
||||
dLytMeterContainer_c *container = dLytMeterContainer_c::GetInstance();
|
||||
if (mpAnm2->isEndReached()) {
|
||||
if (mIndex == METER_SHIELD && dMessage_c::getInstance()->getField_0x2FC() == -2) {
|
||||
dMessage_c::getInstance()->setField_0x2FC(0);
|
||||
}
|
||||
mpAnm2->setAnimEnable(false);
|
||||
mStateMgr.changeState(StateID_Invisible);
|
||||
}
|
||||
|
||||
if (mpAnm2->isEnabled()) {
|
||||
mpAnm2->play();
|
||||
}
|
||||
|
||||
switch (mIndex) {
|
||||
case 1: container->clearFlags(0x40); break;
|
||||
case 4: container->clearFlags(0x80); break;
|
||||
case 3: container->clearFlags(0x1 | 0x2 | 0x4 | 0x8); break;
|
||||
case 5: container->clearFlags(0x100); break;
|
||||
case 6: container->clearFlags(0x200); break;
|
||||
case 8: container->clearFlags(0x400); break;
|
||||
case 9: container->clearFlags(0x1000); break;
|
||||
case 10: container->clearFlags(0x200); break;
|
||||
}
|
||||
}
|
||||
void dLytMeterParts_c::finalizeState_Out() {}
|
||||
|
||||
void dLytMeterParts_c::build(s32 index) {
|
||||
mIndex = index;
|
||||
mShouldBeVisible = false;
|
||||
mStateMgr.changeState(StateID_Invisible);
|
||||
}
|
||||
|
||||
void dLytMeterParts_c::execute() {
|
||||
mStateMgr.executeState();
|
||||
}
|
||||
|
||||
void floats() {
|
||||
32.0f;
|
||||
1.0f;
|
||||
@@ -335,11 +560,23 @@ static const d2d::LytBrlanMapping meterBrlanMap[] = {
|
||||
{"basicPosition_00_rupyPosition.brlan", "G_rupyPosi_00"},
|
||||
};
|
||||
|
||||
#define METER_ANIM_POSITION_IN_OFFSET 0
|
||||
#define METER_ANIM_POSITION_OUT_OFFSET 16
|
||||
#define METER_ANIM_POSITION 32
|
||||
#define METER_ANIM_RUPY_POSITION 33
|
||||
|
||||
#define METER_NUM_ANIMS 34
|
||||
|
||||
#define METER_NUM_PANES 16
|
||||
|
||||
static const char *sGroupName = "G_ref_00";
|
||||
|
||||
bool dLytMeter_c::build(d2d::ResAccIf_c *resAcc) {
|
||||
mLyt.setResAcc(resAcc);
|
||||
mLyt.build("basicPosition_00.brlyt", nullptr);
|
||||
mLyt.setPriority(0x8A);
|
||||
for (int i = 0; i < 34; i++) {
|
||||
|
||||
for (int i = 0; i < METER_NUM_ANIMS; i++) {
|
||||
mAnmGroups[i].init(meterBrlanMap[i].mFile, resAcc, mLyt.getLayout(), meterBrlanMap[i].mName);
|
||||
mAnmGroups[i].bind(false);
|
||||
mAnmGroups[i].setAnimEnable(false);
|
||||
@@ -358,41 +595,55 @@ bool dLytMeter_c::build(d2d::ResAccIf_c *resAcc) {
|
||||
mp2Button = nullptr;
|
||||
}
|
||||
|
||||
mNodes[0].mpLytPane = &mGanbariGauge;
|
||||
mNodes[1].mpLytPane = &mRupy;
|
||||
mNodes[2].mpLytPane = &mItemSelect;
|
||||
mNodes[3].mpLytPane = &mCrossBtn;
|
||||
mNodes[4].mpLytPane = &mPlusBtn;
|
||||
mNodes[5].mpLytPane = &mMinusBtn;
|
||||
mNodes[6].mpLytPane = &mABtn;
|
||||
mNodes[7].mpLytPane = &mDowsing;
|
||||
mNodes[8].mpLytPane = &mZBtn;
|
||||
mNodes[9].mpLytPane = &mNunStk;
|
||||
mNodes[10].mpLytPane = &mRemoCon;
|
||||
mNodes[11].mpLytPane = &mNunBg;
|
||||
mNodes[12].mpLytPane = &mHeart;
|
||||
mNodes[13].mpLytPane = &mShield;
|
||||
mNodes[14].mpLytPane = mp1Button;
|
||||
mNodes[15].mpLytPane = mp2Button;
|
||||
mPosArray1[0] = mLyt.findPane("N_shield_00")->GetTranslate();
|
||||
mPosArray1[1] = mLyt.findPane("N_shield_01")->GetTranslate();
|
||||
mNodes[METER_GANBARI].mpLytPane = &mGanbariGauge;
|
||||
mNodes[METER_RUPY].mpLytPane = &mRupy;
|
||||
mNodes[METER_ITEM_SELECT].mpLytPane = &mItemSelect;
|
||||
mNodes[METER_CROSS_BTN].mpLytPane = &mCrossBtn;
|
||||
mNodes[METER_PLUS_BTN].mpLytPane = &mPlusBtn;
|
||||
mNodes[METER_MINUS_BTN].mpLytPane = &mMinusBtn;
|
||||
mNodes[METER_A_BTN].mpLytPane = &mABtn;
|
||||
mNodes[METER_DOWSING].mpLytPane = &mDowsing;
|
||||
mNodes[METER_Z_BTN].mpLytPane = &mZBtn;
|
||||
mNodes[METER_NUN_STK].mpLytPane = &mNunStk;
|
||||
mNodes[METER_REMOCON_BG].mpLytPane = &mRemoCon;
|
||||
mNodes[METER_NUN_BG].mpLytPane = &mNunBg;
|
||||
mNodes[METER_HEART].mpLytPane = &mHeart;
|
||||
mNodes[METER_SHIELD].mpLytPane = &mShield;
|
||||
mNodes[METER_1_BTN].mpLytPane = mp1Button;
|
||||
mNodes[METER_2_BTN].mpLytPane = mp2Button;
|
||||
|
||||
mPosArray1[0].copyFrom(mLyt.findPane("N_shield_00")->GetTranslate());
|
||||
mPosArray1[1].copyFrom(mLyt.findPane("N_shield_01")->GetTranslate());
|
||||
|
||||
field_0x13758 = 0;
|
||||
field_0x13768 = 0;
|
||||
field_0x13764 = 0;
|
||||
// TODO
|
||||
mPos1 = mPosArray1[0];
|
||||
mPos2 = mPosArray1[1];
|
||||
|
||||
mLyt.findPane("N_rupyAll_00")->SetVisible(true);
|
||||
mAnmGroups[33].setAnimEnable(true);
|
||||
mAnmGroups[METER_ANIM_RUPY_POSITION].setAnimEnable(true);
|
||||
|
||||
// Advance through some anim's keyframes and store positions in mPosArray2
|
||||
for (int i = 0; i < 7; i++) {
|
||||
mAnmGroups[33].setFrame(i);
|
||||
mAnmGroups[METER_ANIM_RUPY_POSITION].setFrame(i);
|
||||
mLyt.calc();
|
||||
mPosArray2[i].copyFrom(mLyt.findPane("N_rupy_00")->GetTranslate());
|
||||
}
|
||||
|
||||
mAnmGroups[33].setAnimEnable(false);
|
||||
mAnmGroups[METER_ANIM_RUPY_POSITION].setAnimEnable(false);
|
||||
mLyt.findPane("N_rupyAll_00")->SetVisible(false);
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
field_0x1375C = 0;
|
||||
field_0x1376C = 0;
|
||||
field_0x13760 = 0;
|
||||
|
||||
// TODO
|
||||
mPos2 = mPosArray2[0];
|
||||
mPos3.x = mPos3.y = mPos3.z = 0.0f;
|
||||
field_0x137C0 = 0;
|
||||
|
||||
for (int i = 0; i < METER_NUM_PANES; i++) {
|
||||
if (mNodes[i].mpLytPane != nullptr) {
|
||||
mNodes[i].mpLytPane->build(resAcc);
|
||||
mMeters.PushBack(&mNodes[i]);
|
||||
@@ -463,11 +714,70 @@ bool dLytMeter_c::build(d2d::ResAccIf_c *resAcc) {
|
||||
mpDrink = new dLytMeterDrink_c();
|
||||
mpDrink->build(resAcc);
|
||||
}
|
||||
|
||||
mItemSelect.setOwnerPane(mLyt.findPane("N_remoConBtn_00"));
|
||||
mCrossBtn.setOwnerPane(mLyt.findPane("N_remoConBtn_03"));
|
||||
mPlusBtn.setOwnerPane(mLyt.findPane("N_remoConBtn_02"));
|
||||
mMinusBtn.setOwnerPane(mLyt.findPane("N_remoConBtn_01"));
|
||||
mDowsing.setOwnerPane(mLyt.findPane("N_nunBtn_03"));
|
||||
mABtn.setOwnerPane(mLyt.findPane("N_remoConBtn_06"));
|
||||
mZBtn.setOwnerPane(mLyt.findPane("N_nunBtn_01"));
|
||||
mNunStk.setOwnerPane(mLyt.findPane("N_nunBtn_02"));
|
||||
mNunBg.setOwnerPane(mLyt.findPane("N_nunBg_00"));
|
||||
if (mp1Button != nullptr) {
|
||||
mp1Button->setOwnerPane(mLyt.findPane("N_remoConBtn_04"));
|
||||
}
|
||||
if (mp2Button != nullptr) {
|
||||
mp2Button->setOwnerPane(mLyt.findPane("N_remoConBtn_05"));
|
||||
}
|
||||
|
||||
mGanbariGauge.setOwnerPane(mLyt.findPane("N_gutsAlpha"));
|
||||
mShield.setOwnerPane(mLyt.findPane("N_shieldAll_00"));
|
||||
|
||||
if (mLyt.getLayout()->GetGroupContainer() != nullptr) {
|
||||
nw4r::lyt::Group *g = mLyt.getLayout()->GetGroupContainer()->FindGroupByName(sGroupName);
|
||||
if (g != nullptr) {
|
||||
d2d::dSubPane::linkMeters(g, &mMeters);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < METER_NUM_PANES; i++) {
|
||||
if (mNodes[i].mpLytPane != nullptr) {
|
||||
mNodes[i].mpPane->SetVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < METER_NUM_PANES; i++) {
|
||||
mAnmGroups[i + METER_ANIM_POSITION_IN_OFFSET].setAnimEnable(true);
|
||||
mAnmGroups[i + METER_ANIM_POSITION_IN_OFFSET].setToStart();
|
||||
}
|
||||
|
||||
mLyt.calc();
|
||||
|
||||
for (int i = 0; i < METER_NUM_PANES; i++) {
|
||||
mAnmGroups[i + METER_ANIM_POSITION_IN_OFFSET].setAnimEnable(false);
|
||||
}
|
||||
|
||||
mAnmGroups[METER_ANIM_POSITION].setAnimEnable(false);
|
||||
field_0x13771 = 0;
|
||||
|
||||
for (int i = 0; i < METER_NUM_PANES; i++) {
|
||||
mParts[i].setAnmGroups(
|
||||
&mAnmGroups[i + METER_ANIM_POSITION_IN_OFFSET], &mAnmGroups[i + METER_ANIM_POSITION_OUT_OFFSET]
|
||||
);
|
||||
mParts[i].build(i);
|
||||
field_0x13782[i] = 0;
|
||||
field_0x13792[i] = 1;
|
||||
field_0x137A2[i] = 0;
|
||||
}
|
||||
|
||||
field_0x137B2 = 1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dLytMeter_c::remove() {
|
||||
for (int i = 0; i < 34; i++) {
|
||||
for (int i = 0; i < METER_NUM_ANIMS; i++) {
|
||||
mAnmGroups[i].remove();
|
||||
}
|
||||
|
||||
@@ -478,7 +788,7 @@ bool dLytMeter_c::remove() {
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
for (int i = 0; i < METER_NUM_PANES; i++) {
|
||||
if (mNodes[i].mpLytPane != nullptr) {
|
||||
mNodes[i].mpLytPane->remove();
|
||||
}
|
||||
@@ -638,7 +948,16 @@ bool dLytMeterContainer_c::build() {
|
||||
|
||||
fn_800D97E0(0xb);
|
||||
fn_800D9800(1);
|
||||
dMessage_c::getInstance()->reset();
|
||||
dMessage_c::getInstance()->init();
|
||||
mFlags = 0xFFFFFFFF;
|
||||
field_0x13B54 = 0xFFFFFFFF;
|
||||
field_0x13B60 = 0;
|
||||
field_0x13B61 = 0;
|
||||
field_0x13B62 = 0;
|
||||
field_0x13B63 = 0;
|
||||
field_0x13B64 = 0;
|
||||
field_0x13B65 = 0;
|
||||
field_0x13B66 = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ bool dLytMeterGanbariGauge_c::build(d2d::ResAccIf_c *resAcc) {
|
||||
field_0x558 = 0;
|
||||
field_0x559 = 0;
|
||||
field_0x55B = 0;
|
||||
mpPane = nullptr;
|
||||
mpOwnerPane = nullptr;
|
||||
field_0x55A = 0;
|
||||
|
||||
field_0x554 = 0.0f;
|
||||
@@ -382,11 +382,11 @@ bool dLytMeterGanbariGauge_c::remove() {
|
||||
}
|
||||
|
||||
bool dLytMeterGanbariGauge_c::execute() {
|
||||
if (mpPane == nullptr) {
|
||||
if (mpOwnerPane == nullptr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!mpPane->IsVisible()) {
|
||||
if (!mpOwnerPane->IsVisible()) {
|
||||
if (*mStateMgrMain.getStateID() != StateID_InvisibleWait) {
|
||||
mStateMgrMain.changeState(StateID_InvisibleWait);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user