Compare commits

...

1 Commits

Author SHA1 Message Date
coah
48dfeacdfa cleanup(iplDate): name focus state, pending cmd, point count
Rename Date focus SM fields used by onCmdRecv / pointer enter-leave.
2026-10-01 19:08:45 -05:00
2 changed files with 22 additions and 22 deletions

View File

@@ -68,8 +68,8 @@ namespace ipl {
vBOOL mbAppearMsg; // 0x0C vBOOL mbAppearMsg; // 0x0C
private: private:
u32 unk_0x10; u32 mFocusState;
int unk_0x14; int mPendingFocusCmd;
layout::Object* mpLayout; // 0x18 layout::Object* mpLayout; // 0x18
gui::PaneManager* mpGui; // 0x1C gui::PaneManager* mpGui; // 0x1C
layout::PaneAnimator* mpCurrentPaneAnim; // 0x20 layout::PaneAnimator* mpCurrentPaneAnim; // 0x20
@@ -77,7 +77,7 @@ namespace ipl {
public: public:
utility::Date* mpDate; // 0x38 utility::Date* mpDate; // 0x38
u32 unk_0x3C; u32 mPointCount;
static const char* mscAnimPanes[ANIM_PANE_MAX]; static const char* mscAnimPanes[ANIM_PANE_MAX];

View File

@@ -67,7 +67,7 @@ namespace ipl {
DECOMP_FORCE_ACTIVE(iplDate_cpp, padding); DECOMP_FORCE_ACTIVE(iplDate_cpp, padding);
Date::Date(EGG::Heap* heap, nand::LayoutFile* file, const char* layoutFolder, const char* layoutFileName) Date::Date(EGG::Heap* heap, nand::LayoutFile* file, const char* layoutFolder, const char* layoutFileName)
: ::gui::EventHandler(), mbAppearMsg(0), unk_0x10(0), unk_0x14(0), mpLayout(NULL), mpCurrentPaneAnim(0), unk_0x3C(0) { : ::gui::EventHandler(), mbAppearMsg(0), mFocusState(0), mPendingFocusCmd(0), mpLayout(NULL), mpCurrentPaneAnim(0), mPointCount(0) {
// Layout // Layout
mpLayout = new layout::Object(heap, file, layoutFolder, layoutFileName); mpLayout = new layout::Object(heap, file, layoutFolder, layoutFileName);
@@ -103,16 +103,16 @@ namespace ipl {
onCmdRecv(3); onCmdRecv(3);
} }
onCmdRecv(unk_0x14); onCmdRecv(mPendingFocusCmd);
} }
void Date::draw(bool unk) { void Date::draw(bool unk) {
if (unk) { if (unk) {
if (unk_0x3C != 0) { if (mPointCount != 0) {
mpLayout->draw(); mpLayout->draw();
} }
} else { } else {
if (unk_0x3C == 0) { if (mPointCount == 0) {
mpLayout->draw(); mpLayout->draw();
} }
} }
@@ -210,7 +210,7 @@ namespace ipl {
void Date::start_point_event(const char* paneName, controller::Interface* con) { void Date::start_point_event(const char* paneName, controller::Interface* con) {
if (strcmp(paneName, scB_Cal) == 0) { if (strcmp(paneName, scB_Cal) == 0) {
if (unk_0x3C == 0) { if (mPointCount == 0) {
static_cast<Calendar*>(System::getScene(SCENE_CALENDAR))->onPointDate(this); static_cast<Calendar*>(System::getScene(SCENE_CALENDAR))->onPointDate(this);
onCmdRecv(1); onCmdRecv(1);
@@ -221,16 +221,16 @@ namespace ipl {
} }
} }
} }
unk_0x3C++; mPointCount++;
} }
} }
void Date::start_left_event(const char* paneName) { void Date::start_left_event(const char* paneName) {
if (strcmp(paneName, scB_Cal) == 0) { if (strcmp(paneName, scB_Cal) == 0) {
if (unk_0x3C == 1) { if (mPointCount == 1) {
onCmdRecv(2); onCmdRecv(2);
} }
unk_0x3C--; mPointCount--;
} }
} }
@@ -268,35 +268,35 @@ namespace ipl {
void Date::onCmdRecv(int cmd) { void Date::onCmdRecv(int cmd) {
if (cmd == 1 || cmd == 2) { if (cmd == 1 || cmd == 2) {
unk_0x14 = cmd; mPendingFocusCmd = cmd;
} }
switch (unk_0x10) { switch (mFocusState) {
case 0: { case 0: {
if (cmd == 1) { if (cmd == 1) {
mpCurrentPaneAnim = doAnim(IDANIM_FOCUS_IN); mpCurrentPaneAnim = doAnim(IDANIM_FOCUS_IN);
unk_0x10 = 1; mFocusState = 1;
} else if (cmd == 2) { } else if (cmd == 2) {
mpCurrentPaneAnim = doAnim(IDANIM_FOCUS_OUT); mpCurrentPaneAnim = doAnim(IDANIM_FOCUS_OUT);
unk_0x10 = 2; mFocusState = 2;
} }
break; break;
} }
case 1: { case 1: {
if (cmd == 3) { if (cmd == 3) {
if (unk_0x14 == 1) { if (mPendingFocusCmd == 1) {
unk_0x14 = 0; mPendingFocusCmd = 0;
} }
unk_0x10 = 0; mFocusState = 0;
} }
break; break;
} }
case 2: { case 2: {
if (cmd == 3) { if (cmd == 3) {
if (unk_0x14 == 2) { if (mPendingFocusCmd == 2) {
unk_0x14 = 0; mPendingFocusCmd = 0;
} }
unk_0x10 = 0; mFocusState = 0;
} }
break; break;
} }
@@ -306,7 +306,7 @@ namespace ipl {
void Date::initEvent() { void Date::initEvent() {
mpGui->init(); mpGui->init();
mpPaneAnims[ANIM_PANE_BTN_HOVER]->initAnmFrame(0.0f); mpPaneAnims[ANIM_PANE_BTN_HOVER]->initAnmFrame(0.0f);
unk_0x3C = 0; mPointCount = 0;
onCmdRecv(3); onCmdRecv(3);
} }