mirror of
https://github.com/zeldaret/ss
synced 2026-05-24 15:20:58 -04:00
Fix variable ownership
This commit is contained in:
@@ -24,18 +24,6 @@ public:
|
||||
return mLyt.getName();
|
||||
}
|
||||
|
||||
void openMaybe() {
|
||||
field_0x1B0 = 1;
|
||||
}
|
||||
|
||||
void closeMaybe() {
|
||||
field_0x1B0 = 0;
|
||||
}
|
||||
|
||||
u8 shouldBeOpen() const {
|
||||
return field_0x1B0;
|
||||
}
|
||||
|
||||
u8 isDoneOut() const {
|
||||
return mIsDoneOut;
|
||||
}
|
||||
@@ -59,7 +47,6 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
enum OutState {
|
||||
OUT_STATE_DECIDING,
|
||||
OUT_STATE_GOTO_OUT,
|
||||
@@ -70,12 +57,12 @@ private:
|
||||
void setState(ABtnState state);
|
||||
|
||||
void runExecuteFunc();
|
||||
|
||||
|
||||
void executeStateInvisible();
|
||||
void executeStateIn();
|
||||
void executeStateVisible();
|
||||
void executeStateDecideOut();
|
||||
|
||||
|
||||
void gotoStateInvisible();
|
||||
void gotoStateIn();
|
||||
void goToStateVisible();
|
||||
@@ -97,7 +84,6 @@ private:
|
||||
/* 0x1AD */ bool mNoDecide;
|
||||
/* 0x1AE */ u8 field_0x1AE;
|
||||
/* 0x1AF */ u8 field_0x1AF;
|
||||
/* 0x1B0 */ u8 field_0x1B0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,10 +12,10 @@ public:
|
||||
/* vt 0x10 */ virtual bool build(void *unk, d2d::ResAccIf_c *resAcc, dTagProcessor_c *tagProcessor);
|
||||
/* vt 0x14 */ virtual bool remove();
|
||||
/* vt 0x18 */ virtual bool execute();
|
||||
/* vt 0x1C */ virtual void vt_0x1C();
|
||||
/* vt 0x20 */ virtual bool vt_0x20() const;
|
||||
/* vt 0x24 */ virtual void vt_0x24();
|
||||
/* vt 0x28 */ virtual bool vt_0x28() const;
|
||||
/* vt 0x1C */ virtual void open();
|
||||
/* vt 0x20 */ virtual bool isOpening() const;
|
||||
/* vt 0x24 */ virtual void close();
|
||||
/* vt 0x28 */ virtual bool isClosing() const;
|
||||
/* vt 0x2C */ virtual bool setText(const wchar_t *text);
|
||||
/* vt 0x30 */ virtual dTextBox_c *vt_0x30();
|
||||
/* vt 0x34 */ virtual void vt_0x34();
|
||||
|
||||
@@ -16,10 +16,10 @@ public:
|
||||
/* vt 0x10 */ virtual bool build(void *unk, d2d::ResAccIf_c *resAcc, dTagProcessor_c *tagProcessor) override;
|
||||
/* vt 0x14 */ virtual bool remove() override;
|
||||
/* vt 0x18 */ virtual bool execute() override;
|
||||
/* vt 0x1C */ virtual void vt_0x1C() override;
|
||||
/* vt 0x20 */ virtual bool vt_0x20() const override;
|
||||
/* vt 0x24 */ virtual void vt_0x24() override;
|
||||
/* vt 0x28 */ virtual bool vt_0x28() const override;
|
||||
/* vt 0x1C */ virtual void open() override;
|
||||
/* vt 0x20 */ virtual bool isOpening() const override;
|
||||
/* vt 0x24 */ virtual void close() override;
|
||||
/* vt 0x28 */ virtual bool isClosing() const override;
|
||||
/* vt 0x2C */ virtual bool setText(const wchar_t *text) override;
|
||||
/* vt 0x30 */ virtual dTextBox_c *vt_0x30() override {
|
||||
return mpTextboxes[0];
|
||||
@@ -50,6 +50,7 @@ private:
|
||||
/* 0x530 */ nw4r::lyt::Pane *mpPanes[2];
|
||||
/* 0x538 */ dTagProcessor_c *mpTagProcessor;
|
||||
/* 0x53C */ dLytCommonABtn_c mCommon;
|
||||
/* 0x6EC */ bool mShouldBeOpen;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -110,7 +110,7 @@ void dLytMsgWindowWood_c::initializeState_Invisible() {
|
||||
mCommon.resetToInvisble();
|
||||
}
|
||||
void dLytMsgWindowWood_c::executeState_Invisible() {
|
||||
if (mCommon.shouldBeOpen()) {
|
||||
if (mShouldBeOpen) {
|
||||
mStateMgr.changeState(StateID_In);
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,7 @@ void dLytMsgWindowWood_c::finalizeState_In() {}
|
||||
|
||||
void dLytMsgWindowWood_c::initializeState_Visible() {}
|
||||
void dLytMsgWindowWood_c::executeState_Visible() {
|
||||
if (!mCommon.shouldBeOpen()) {
|
||||
if (!mShouldBeOpen) {
|
||||
mStateMgr.changeState(StateID_Out);
|
||||
}
|
||||
}
|
||||
@@ -166,19 +166,19 @@ void dLytMsgWindowWood_c::draw() {
|
||||
mLyt.draw();
|
||||
}
|
||||
|
||||
void dLytMsgWindowWood_c::vt_0x1C() {
|
||||
mCommon.openMaybe();
|
||||
void dLytMsgWindowWood_c::open() {
|
||||
mShouldBeOpen = true;
|
||||
}
|
||||
|
||||
bool dLytMsgWindowWood_c::vt_0x20() const {
|
||||
bool dLytMsgWindowWood_c::isOpening() const {
|
||||
return !(*mStateMgr.getStateID() == StateID_In);
|
||||
}
|
||||
|
||||
void dLytMsgWindowWood_c::vt_0x24() {
|
||||
mCommon.closeMaybe();
|
||||
void dLytMsgWindowWood_c::close() {
|
||||
mShouldBeOpen = false;
|
||||
}
|
||||
|
||||
bool dLytMsgWindowWood_c::vt_0x28() const {
|
||||
bool dLytMsgWindowWood_c::isClosing() const {
|
||||
return !(*mStateMgr.getStateID() == StateID_Out);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user