summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-05-15 22:32:05 +0200
committerrobojumper <robojumper@gmail.com>2025-05-15 22:32:05 +0200
commitc5e28a00bfeec92866d67e5adf38070526c6b419 (patch)
treee26f538b4d6e0b8f6567264698fc58c6d30bb2e0 /src
parentd19aad44d13a7e17a3615b25d9368ff15069a395 (diff)
dLytDoButton_c cleanup start
Diffstat (limited to 'src')
-rw-r--r--src/d/lyt/d_lyt_common_arrow.cpp6
-rw-r--r--src/d/lyt/d_lyt_do_button.cpp252
-rw-r--r--src/d/lyt/d_lyt_do_button_related.cpp2
-rw-r--r--src/d/lyt/d_lyt_pause_disp_00.cpp2
-rw-r--r--src/d/lyt/meter/d_lyt_meter.cpp42
-rw-r--r--src/d/lyt/meter/d_lyt_meter_a_btn.cpp40
-rw-r--r--src/d/lyt/meter/d_lyt_meter_action_table.inc157
-rw-r--r--src/d/lyt/meter/d_lyt_meter_cross_btn.cpp44
-rw-r--r--src/d/lyt/meter/d_lyt_meter_dowsing.cpp18
-rw-r--r--src/d/lyt/meter/d_lyt_meter_item_select.cpp56
-rw-r--r--src/d/lyt/meter/d_lyt_meter_nun_stk.cpp22
-rw-r--r--src/d/lyt/meter/d_lyt_meter_nunchaku_bg.cpp20
-rw-r--r--src/d/lyt/meter/d_lyt_meter_plus_btn.cpp14
-rw-r--r--src/d/lyt/meter/d_lyt_meter_remocon_bg.cpp6
-rw-r--r--src/d/lyt/meter/d_lyt_meter_z_btn.cpp18
-rw-r--r--src/m/m2d.cpp4
16 files changed, 546 insertions, 157 deletions
diff --git a/src/d/lyt/d_lyt_common_arrow.cpp b/src/d/lyt/d_lyt_common_arrow.cpp
index 1aeb988b..1b9d859d 100644
--- a/src/d/lyt/d_lyt_common_arrow.cpp
+++ b/src/d/lyt/d_lyt_common_arrow.cpp
@@ -42,7 +42,7 @@ bool dLytCommonArrow_c::build() {
void *data = LayoutArcManager::GetInstance()->getLoadedData("CommonArrow");
mResAcc.attach(data, "");
mLytBase.build("commonArrow_00.brlyt", &mResAcc);
- mLytBase.mPriority = 0x86;
+ mLytBase.setPriority(0x86);
for (int i = 0; i < 9; i++) {
mAnmGroups[i].init(brlanMap[i].mFile, &mResAcc, mLytBase.getLayout(), brlanMap[i].mName);
@@ -87,9 +87,9 @@ bool dLytCommonArrow_c::draw() {
void dLytCommonArrow_c::setState(s32 state) {
mType = state;
if (state == 0) {
- mLytBase.mPriority = 0x86;
+ mLytBase.setPriority(0x86);
} else {
- mLytBase.mPriority = 0x80;
+ mLytBase.setPriority(0x80);
}
}
diff --git a/src/d/lyt/d_lyt_do_button.cpp b/src/d/lyt/d_lyt_do_button.cpp
index 052d71e3..c71d47d6 100644
--- a/src/d/lyt/d_lyt_do_button.cpp
+++ b/src/d/lyt/d_lyt_do_button.cpp
@@ -1,5 +1,9 @@
#include "d/lyt/d_lyt_do_button.h"
+#include "common.h"
+#include "sized_string.h"
+#include "toBeSorted/small_sound_mgr.h"
+
struct DoButtonClass {
DoButtonClass();
virtual ~DoButtonClass();
@@ -51,6 +55,8 @@ STATE_DEFINE(dLytDobutton_c, Out);
#define DO_BUTTON_ANIM_MOVE_OUT 10
#define DO_BUTTON_ANIM_LOOP_BG 11
+#define DO_BUTTON_NUM_ANIM 12
+
static const d2d::LytBrlanMapping brlanMap[] = {
{ "basicInfo_00_in.brlan", "G_inOut_00"},
{ "basicInfo_00_basicInfo.brlan", "G_basicInfo_00"},
@@ -66,6 +72,24 @@ static const d2d::LytBrlanMapping brlanMap[] = {
{ "basicInfo_00_loopBg.brlan", "G_loopBg_00"},
};
+static const char *sPaneNames[] = {
+ "N_infoAll_00", "N_infoAll_01", "N_bg_00", "W_bgP_00", "W_bgP_01", "N_infoText_00", "N_aBtn_00",
+ "N_aBtn_01", "N_bBtn_00", "N_cBtn_00", "N_cBtn_01", "N_nunchaku_01", "N_nunchaku_02", "N_nunchaku_03",
+ "N_upSwing_00", "N_downSwing_00", "N_swing_00", "N_rotate_00", "N_nunRimo_00", "N_nunDrag_00", "N_aBtnDown_00",
+ "N_aBtnDown_01", "N_draw_00", "N_play_00", "N_swing_01", "N_swing_03", "N_upset_00", "N_stab_00",
+ "N_pullOut_01", "N_bBtn_01", "N_twist_00", "N_zBtn_00", "N_zBtn_01", "N_crossBtn_00", "N_plusAll_00",
+ "N_upSwing_01", "N_aBtnDown_02",
+};
+
+#define DO_BUTTON_NUM_PANES 37
+
+static const char *sTextBoxNames[] = {
+ "T_infoText_00",
+ "T_infoTextS_00",
+};
+
+#define DO_BUTTON_NUM_TEXT_BOXES 2
+
void dLytDobutton_c::initializeState_InvisibleWait() {}
void dLytDobutton_c::executeState_InvisibleWait() {
if (field_0x488 == field_0x474 && mNextDoActionToShow == mDoActionToShow) {
@@ -172,6 +196,230 @@ void dLytDobutton_c::executeState_Out() {
}
void dLytDobutton_c::finalizeState_Out() {}
-bool dLytDobutton_c::init(m2d::ResAccIf_c *resAcc) {
- return brlanMap[0].mFile[0] != '\0' && sDoButtonClass.field_0x04;
+bool dLytDobutton_c::build(m2d::ResAccIf_c *resAcc) {
+ mLyt.setResAcc(resAcc);
+ mLyt.build("basicInfo_00.brlyt", nullptr);
+ mLyt.setPriority(0x8A);
+
+ for (int i = 0; i < DO_BUTTON_NUM_ANIM; i++) {
+ mAnmGroups[i].init(brlanMap[i].mFile, resAcc, mLyt.getLayout(), brlanMap[i].mName);
+ mAnmGroups[i].bind(false);
+ mAnmGroups[i].setAnimEnable(false);
+ }
+
+ for (int i = 0; i < DO_BUTTON_NUM_PANES; i++) {
+ mpPanes[i] = mLyt.findPane(sPaneNames[i]);
+ }
+
+ for (int i = 0; i < DO_BUTTON_NUM_TEXT_BOXES; i++) {
+ mpTextBoxes[i] = mLyt.getTextBox(sTextBoxNames[i]);
+ }
+
+ mDoActionToShow = 0x5E;
+ field_0x474 = 0x29;
+ field_0x478 = 0x29;
+ mNextDoActionToShow = 0x5E;
+ field_0x488 = 0x29;
+ field_0x490 = 0;
+ field_0x47C = 0x5E;
+ field_0x480 = 0x29;
+ field_0x491 = 0;
+ field_0x492 = 0;
+
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_NUN].setAnimEnable(true);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_BG].setAnimEnable(true);
+ mAnmGroups[DO_BUTTON_ANIM_IN].setAnimEnable(true);
+ mAnmGroups[DO_BUTTON_ANIM_IN].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_MOVE_OUT].setAnimEnable(false);
+ mLyt.calc();
+ mAnmGroups[DO_BUTTON_ANIM_IN].setAnimEnable(false);
+
+ mStateMgr.changeState(StateID_InvisibleWait);
+ field_0x48C = 0;
+ return true;
+}
+
+bool dLytDobutton_c::remove() {
+ for (int i = 0; i < DO_BUTTON_NUM_ANIM; i++) {
+ mAnmGroups[i].remove();
+ }
+ return true;
+}
+
+bool dLytDobutton_c::draw() {
+ mLyt.addToDrawList();
+ return true;
+}
+
+static const s32 sActDoIds[] = {
+ 1, // ACT_DO_CLIMB_UP
+ 2, // ACT_DO_JUMP
+ 3, // ACT_DO_DROP_DOWN
+ 4, // ACT_DO_LET_GO
+ 5, // ACT_DO_OPEN
+ 6, // ACT_DO_PUT_DOWN
+ 7, // ACT_DO_THROW
+ 8, // ACT_DO_BURROW
+ 9, // ACT_DO_ROLL
+ 10, // ACT_DO_9
+ 11, // ACT_DO_MOVE
+ 12, // ACT_DO_GRAB
+ 13, // ACT_DO_SHOOT
+ 14, // ACT_DO_13
+ 15, // ACT_DO_14
+ 16, // ACT_DO_15
+ 17, // ACT_DO_TALK
+ 18, // ACT_DO_EXAMINE
+ 19, // ACT_DO_DRAW
+ 20, // ACT_DO_19
+ 21, // ACT_DO_BLOW
+ 22, // ACT_DO_21
+ 23, // ACT_DO_22
+ 24, // ACT_DO_SWIM
+ 25, // ACT_DO_LEAP
+ 26, // ACT_DO_DASH
+ 27, // ACT_DO_GET_OUT
+ 28, // ACT_DO_27
+ 29, // ACT_DO_PICK_UP
+ 30, // ACT_DO_SIT
+ 31, // ACT_DO_STAND
+ 32, // ACT_DO_DIG
+ 33, // ACT_DO_32
+ 34, // ACT_DO_33
+ 35, // ACT_DO_BREAK_FREE
+ 36, // ACT_DO_35
+ 37, // ACT_DO_36
+ 38, // ACT_DO_PLANT
+ 39, // ACT_DO_CATCH
+ 40, // ACT_DO_SPEED_UP
+ 41, // ACT_DO_SAILCLOTH
+ 42, // ACT_DO_PUT_AWAY
+ 43, // ACT_DO_EMERGE
+ 44, // ACT_DO_INSERT
+ 45, // ACT_DO_44
+ 46, // ACT_DO_TURN
+ 47, // ACT_DO_PUSH_IN
+ 48, // ACT_DO_47
+ 49, // ACT_DO_DRAW_BOW
+ 50, // ACT_DO_49
+ 51, // ACT_DO_50
+ 52, // ACT_DO_51
+ 53, // ACT_DO_SWING
+ 54, // ACT_DO_BALANCE
+ 55, // ACT_DO_JOSTLE
+ 56, // ACT_DO_55
+ 57, // ACT_DO_SLEEP
+ 58, // ACT_DO_DROP
+ 59, // ACT_DO_LAUNCH
+ 60, // ACT_DO_READ
+ 61, // ACT_DO_WHIP
+ 62, // ACT_DO_PULL
+ 63, // ACT_DO_DRINK
+ 64, // ACT_DO_63
+ 65, // ACT_DO_GET_IN
+ 66, // ACT_DO_FIRE
+ 67, // ACT_DO_ATTACK
+ 68, // ACT_DO_FATAL_BLOW
+ 69, // ACT_DO_JUMP_DOWN
+ 70, // ACT_DO_STRUM
+ 71, // ACT_DO_70
+ 72, // ACT_DO_RELEASE
+ 73, // ACT_DO_GRAB_2
+ 74, // ACT_DO_READY_STANCE
+ 75, // ACT_DO_REMOVE
+ 76, // ACT_DO_READY_SWORD
+ 77, // ACT_DO_THRUST_SWORD
+ 78, // ACT_DO_USE
+ 79, // ACT_DO_SCOOP
+ 80, // ACT_DO_79
+ 81, // ACT_DO_80
+ 82, // ACT_DO_LOOK
+ 83, // ACT_DO_DOWSE
+ 84, // ACT_DO_PILOT
+ 85, // ACT_DO_LOOK_DOWN
+ 86, // ACT_DO_DIVE
+ 87, // ACT_DO_SELECT
+ 88, // ACT_DO_GRAB_3
+ 89, // ACT_DO_MOVE_2
+ 90, // ACT_DO_ACCELERATE
+ 91, // ACT_DO_CHARGE
+ 92, // ACT_DO_LEAN
+ 93, // ACT_DO_PRESS
+};
+
+void dLytDobutton_c::realize() {
+ // TODO: what?
+ s32 i1 = field_0x478;
+ s32 i2 = field_0x474;
+ if ((i1 == 11 && i2 == 26) || (i1 == 11 && i2 == 27) || (i1 == 11 && i2 == 28) || (i1 == 11 && i2 == 29) ||
+ (i1 == 8 && i2 == 30) || (i1 == 8 && i2 == 31) || (i1 == 36 && i2 == 32) || (i1 == 11 && i2 == 33) ||
+ (i1 == 11 && i2 == 34) || (i1 == 11 && i2 == 35)) {
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_BTN].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_BTN_Z].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_NUN].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_REMO_CON].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_RECOVER].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_ROTATE].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_MOVE_INFO].setForwardOnce();
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_MOVE_INFO].setAnimEnable(true);
+ mAnmGroups[DO_BUTTON_ANIM_MOVE_ALPHA].setForwardOnce();
+ mAnmGroups[DO_BUTTON_ANIM_MOVE_ALPHA].setAnimEnable(true);
+ } else if ((i1 == 26 && i2 == 11) || (i1 == 27 && i2 == 11) || (i1 == 28 && i2 == 11) || (i1 == 29 && i2 == 11) ||
+ (i1 == 30 && i2 == 8) || (i1 == 31 && i2 == /* this one is changed 8 -> 11 */ 11) ||
+ (i1 == 32 && i2 == 36) || (i1 == 33 && i2 == 11) || (i1 == 34 && i2 == 11) || (i1 == 35 && i2 == 11)) {
+ // Same conditions as above, but inverted (with one exception. Is that exception a bug?)
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_MOVE_INFO].setBackwardsOnce();
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_MOVE_INFO].setAnimEnable(true);
+ mAnmGroups[DO_BUTTON_ANIM_MOVE_ALPHA].setBackwardsOnce();
+ mAnmGroups[DO_BUTTON_ANIM_MOVE_ALPHA].setAnimEnable(true);
+ i2 = field_0x478;
+ } else if (i2 >= 26 && i2 < 36) {
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_BTN].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_BTN_Z].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_NUN].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_REMO_CON].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_RECOVER].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_ROTATE].setFrame(0.0f);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_MOVE_INFO].setForwardOnce();
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_MOVE_INFO].setAnimEnable(true);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_MOVE_INFO].setToEnd2();
+ mAnmGroups[DO_BUTTON_ANIM_MOVE_ALPHA].setForwardOnce();
+ mAnmGroups[DO_BUTTON_ANIM_MOVE_ALPHA].setAnimEnable(true);
+ mAnmGroups[DO_BUTTON_ANIM_MOVE_ALPHA].setToEnd2();
+ } else {
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_MOVE_INFO].setBackwardsOnce();
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_MOVE_INFO].setAnimEnable(true);
+ mAnmGroups[DO_BUTTON_ANIM_LOOP_MOVE_INFO].setToEnd2();
+ if (field_0x474 == 11 || field_0x474 == 8) {
+ mAnmGroups[DO_BUTTON_ANIM_MOVE_ALPHA].setBackwardsOnce();
+ } else {
+ mAnmGroups[DO_BUTTON_ANIM_MOVE_ALPHA].setForwardOnce();
+ }
+ mAnmGroups[DO_BUTTON_ANIM_MOVE_ALPHA].setAnimEnable(true);
+ mAnmGroups[DO_BUTTON_ANIM_MOVE_ALPHA].setToEnd2();
+ }
+
+ mAnmGroups[DO_BUTTON_ANIM].setAnimEnable(true);
+ mAnmGroups[DO_BUTTON_ANIM].setFrame(i2);
+ if (mDoActionToShow != ACT_DO_NONE) {
+ SizedString<16> buf;
+ buf.sprintf("ACT_DO_%03d", sActDoIds[mDoActionToShow]);
+ mpTextBoxes[0]->setMessageWithGlobalTextProcessor2(buf, nullptr);
+ mpTextBoxes[1]->setMessageWithGlobalTextProcessor2(buf, nullptr);
+ fn_8010E3D0(true);
+ } else {
+ wchar_t buf1[2];
+ buf1[0] = buf1[1] = 0;
+ mpTextBoxes[0]->setTextWithGlobalTextProcessor(buf1, nullptr);
+ mpTextBoxes[1]->setTextWithGlobalTextProcessor(buf1, nullptr);
+ fn_8010E3D0(false);
+ }
+
+ if (mDoActionToShow == ACT_DO_CATCH) {
+ SmallSoundManager::GetInstance()->playSound(SE_S_CALL_BIRD_CATCH);
+ }
+}
+
+s32 dLytDobutton_c::getActionInternal() const {
+ return mDoActionToShow;
}
diff --git a/src/d/lyt/d_lyt_do_button_related.cpp b/src/d/lyt/d_lyt_do_button_related.cpp
index 457407ce..502a3d13 100644
--- a/src/d/lyt/d_lyt_do_button_related.cpp
+++ b/src/d/lyt/d_lyt_do_button_related.cpp
@@ -7,7 +7,7 @@ LytDoButtonRelated::LytDoButtonRelated() {
bool LytDoButtonRelated::build(d2d::ResAccIf_c *resAcc) {
for (int i = 0; i < 12; i++) {
- field_0x04[i] = DO_NONE;
+ field_0x04[i] = ACT_IE_NONE;
field_0x34[i] = 0;
}
diff --git a/src/d/lyt/d_lyt_pause_disp_00.cpp b/src/d/lyt/d_lyt_pause_disp_00.cpp
index 9f88dca6..43c176cd 100644
--- a/src/d/lyt/d_lyt_pause_disp_00.cpp
+++ b/src/d/lyt/d_lyt_pause_disp_00.cpp
@@ -20,7 +20,7 @@ dLytPauseDisp00_c::dLytPauseDisp00_c() : mStateMgr(*this, sStateID::null) {}
void dLytPauseDisp00_c::init() {
mLytBase.build("pause_00.brlyt", nullptr);
- mLytBase.mPriority = 0x86;
+ mLytBase.setPriority(0x86);
for (int i = 0; i < 0x7E; i++) {
field_0x00D0[i].init(S_MAPPINGS[i].mFile, nullptr, mLytBase.getLayout(), S_MAPPINGS[i].mName);
diff --git a/src/d/lyt/meter/d_lyt_meter.cpp b/src/d/lyt/meter/d_lyt_meter.cpp
index f4f5c0db..0f466304 100644
--- a/src/d/lyt/meter/d_lyt_meter.cpp
+++ b/src/d/lyt/meter/d_lyt_meter.cpp
@@ -996,9 +996,9 @@ void dLytMeterMain_c::fn_800D5290() {
meter->setFlags(METER_BTN_PLUS);
}
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_PLUS, LytDoButtonRelated::DO_0x74);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_PLUS, LytDoButtonRelated::ACT_IE_ETC_BACK_2);
meter->clearFlags(METER_BTN_MINUS | METER_BTN_1 | METER_BTN_2);
- if (LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == LytDoButtonRelated::DO_NONE) {
+ if (LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == LytDoButtonRelated::ACT_IE_NONE) {
meter->clearFlags(METER_BTN_C);
}
}
@@ -1134,10 +1134,10 @@ void dLytMeterMain_c::checkPaneVisibility() {
dLytDobutton_c::setActionTextStuff(0x29, 0x5E, true);
}
if (LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_A) != 0x12) {
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_NONE);
}
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_C, LytDoButtonRelated::DO_NONE);
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_C, LytDoButtonRelated::ACT_IE_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::ACT_IE_NONE);
}
}
@@ -1156,16 +1156,16 @@ void dLytMeterMain_c::checkPaneVisibility() {
}
if ((!StoryflagManager::sInstance->getCounterOrFlag(58) &&
- ((LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::DO_NONE &&
+ ((LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::ACT_IE_NONE &&
mItemSelect.getField_0x5794() != 2 &&
(!EventManager::isInEvent() || !EventManager::isCurrentEvent("ItemGetGorgeous")))))
|| (dStageMgr_c::GetInstance()->isAreaTypeHouse() &&
- LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::DO_NONE &&
+ LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::ACT_IE_NONE &&
!MinigameManager::isInMinigameState(MinigameManager::HOUSE_CLEANING) && !mItemSelect.fn_800F02F0())
||
- (isSilentRealm() && LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::DO_NONE &&
+ (isSilentRealm() && LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::ACT_IE_NONE &&
!mItemSelect.fn_800F02F0())
|| ((dAcPy_c::GetLink()->checkActionFlagsCont(0x400000) || fn_800D5420() ||
@@ -1175,7 +1175,7 @@ void dLytMeterMain_c::checkPaneVisibility() {
MinigameManager::isInMinigameState(MinigameManager::BAMBOO_CUTTING)))
|| (MinigameManager::isInMinigameState(MinigameManager::TRIAL_TIME_ATTACK) &&
- LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::DO_NONE) ||
+ LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::ACT_IE_NONE) ||
(dLytMeter_c::getField_0x13B66() || (fn_800D56B0() && !mItemSelect.fn_800F02F0() && !fn_800D53D0()) ||
fn_800D5650() || fn_800D5680())) {
mPanesVisible[METER_ANIM_ITEM_SELECT] = false;
@@ -1379,7 +1379,7 @@ void dLytMeterMain_c::checkPaneVisibility() {
if (dAcPy_c::GetLink()->getRidingActorType() != dAcPy_c::RIDING_LOFTWING || !field_0x13780 ||
- (dLytDobutton_c::getFn0x8010E5D0() != 0x5E || fn_800D56B0() || dLytMeter_c::getField_0x13B66() ||
+ (dLytDobutton_c::getAction() != dLytDobutton_c::ACT_DO_INVALID || fn_800D56B0() || dLytMeter_c::getField_0x13B66() ||
fn_800D5420() || fn_800D5650() || fn_800D5680())) {
mBirdGaugeVisible = false;
}
@@ -1653,19 +1653,19 @@ bool dLytMeterMain_c::execute() {
}
meter->resetFlags();
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::DO_NONE);
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_B, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_B, LytDoButtonRelated::ACT_IE_NONE);
- LytDoButtonRelated::fn_8010EC10(LytDoButtonRelated::DO_NONE, true);
- LytDoButtonRelated::fn_8010ED50(LytDoButtonRelated::DO_NONE, true);
+ LytDoButtonRelated::fn_8010EC10(LytDoButtonRelated::ACT_IE_NONE, true);
+ LytDoButtonRelated::fn_8010ED50(LytDoButtonRelated::ACT_IE_NONE, true);
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_L, LytDoButtonRelated::DO_NONE);
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_R, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_L, LytDoButtonRelated::ACT_IE_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_R, LytDoButtonRelated::ACT_IE_NONE);
- LytDoButtonRelated::reset(LytDoButtonRelated::DO_BUTTON_C, LytDoButtonRelated::DO_NONE);
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::DO_NONE);
- LytDoButtonRelated::reset(LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::DO_NONE);
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_BG, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::reset(LytDoButtonRelated::DO_BUTTON_C, LytDoButtonRelated::ACT_IE_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::ACT_IE_NONE);
+ LytDoButtonRelated::reset(LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::ACT_IE_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_BG, LytDoButtonRelated::ACT_IE_NONE);
if (mpTimer != nullptr) {
mpTimer->execute();
@@ -1769,7 +1769,7 @@ bool dLytMeter_c::build() {
}
if (mpDoButton != nullptr) {
- mpDoButton->init(&mResAcc);
+ mpDoButton->build(&mResAcc);
}
if (mpDoButtonRelated != nullptr) {
mpDoButtonRelated->build(&mResAcc);
diff --git a/src/d/lyt/meter/d_lyt_meter_a_btn.cpp b/src/d/lyt/meter/d_lyt_meter_a_btn.cpp
index 9e0c1ceb..be4861ef 100644
--- a/src/d/lyt/meter/d_lyt_meter_a_btn.cpp
+++ b/src/d/lyt/meter/d_lyt_meter_a_btn.cpp
@@ -81,7 +81,7 @@ void dLytMeterABtn_c::executeState_Wait() {
}
if (field_0x1C0) {
- if (field_0x1BC != LytDoButtonRelated::DO_NONE) {
+ if (field_0x1BC != LytDoButtonRelated::ACT_IE_NONE) {
mAnm[A_BTN_ANIM_INPUT].setBackwardsOnce();
mAnm[A_BTN_ANIM_INPUT].setToStart();
mAnm[A_BTN_ANIM_INPUT].setAnimEnable(true);
@@ -90,7 +90,7 @@ void dLytMeterABtn_c::executeState_Wait() {
}
field_0x1B8 = field_0x1BC;
} else {
- if (field_0x1BC != LytDoButtonRelated::DO_NONE) {
+ if (field_0x1BC != LytDoButtonRelated::ACT_IE_NONE) {
setMessage(field_0x1BC);
}
field_0x1B8 = field_0x1BC;
@@ -110,7 +110,7 @@ void dLytMeterABtn_c::finalizeState_On() {}
void dLytMeterABtn_c::initializeState_Active() {}
void dLytMeterABtn_c::executeState_Active() {
if (field_0x1BC != field_0x1B8 || !field_0x1C0) {
- if (field_0x1BC == LytDoButtonRelated::DO_NONE || !field_0x1C0) {
+ if (field_0x1BC == LytDoButtonRelated::ACT_IE_NONE || !field_0x1C0) {
mAnm[A_BTN_ANIM_INPUT].setForwardOnce();
mAnm[A_BTN_ANIM_INPUT].setFrame(0.0f);
mAnm[A_BTN_ANIM_INPUT].setAnimEnable(true);
@@ -122,7 +122,7 @@ void dLytMeterABtn_c::executeState_Active() {
setMessage(field_0x1BC);
}
field_0x1B8 = field_0x1BC;
- } else if (field_0x1B8 == LytDoButtonRelated::DO_NONE) {
+ } else if (field_0x1B8 == LytDoButtonRelated::ACT_IE_NONE) {
mAnm[A_BTN_ANIM_INPUT].setForwardOnce();
mAnm[A_BTN_ANIM_INPUT].setFrame(0.0f);
mAnm[A_BTN_ANIM_INPUT].setAnimEnable(true);
@@ -170,9 +170,9 @@ bool dLytMeterABtn_c::build(d2d::ResAccIf_c *resAcc) {
mpSizeBox[i] = mLyt.getSizeBoxInWindow(sWindows[i]);
}
- field_0x1C4 = LytDoButtonRelated::DO_DASH;
- field_0x1B8 = LytDoButtonRelated::DO_DASH;
- field_0x1BC = LytDoButtonRelated::DO_DASH;
+ field_0x1C4 = LytDoButtonRelated::ACT_IE_ETC_DASH;
+ field_0x1B8 = LytDoButtonRelated::ACT_IE_ETC_DASH;
+ field_0x1BC = LytDoButtonRelated::ACT_IE_ETC_DASH;
field_0x1C8 = 0;
field_0x1CA = 0;
field_0x1C9 = 0;
@@ -211,17 +211,17 @@ bool dLytMeterABtn_c::execute() {
mAnm[A_BTN_ANIM_INPUT].setToEnd2();
}
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_NONE);
return true;
}
if (dLytMeter_c::GetInstance()->getMeterField_0x13750() == 0) {
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_NONE);
- if (field_0x1BC != LytDoButtonRelated::DO_NONE) {
- field_0x1BC = LytDoButtonRelated::DO_NONE;
- field_0x1B8 = LytDoButtonRelated::DO_NONE;
+ if (field_0x1BC != LytDoButtonRelated::ACT_IE_NONE) {
+ field_0x1BC = LytDoButtonRelated::ACT_IE_NONE;
+ field_0x1B8 = LytDoButtonRelated::ACT_IE_NONE;
}
setMessage(field_0x1BC);
}
@@ -230,10 +230,10 @@ bool dLytMeterABtn_c::execute() {
if (EventManager::isInEvent() && !dLytMeter_c::GetInstance()->fn_800D5670() &&
dLytMeter_c::GetMain()->getField_0x1377E() == 0 && !checkIsInSkykeepPuzzle() &&
- LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_A) == LytDoButtonRelated::DO_NONE) {
+ LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_A) == LytDoButtonRelated::ACT_IE_NONE) {
field_0x1C9 = 0;
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, LytDoButtonRelated::ACT_IE_NONE);
} else {
field_0x1C9 = 1;
}
@@ -256,7 +256,7 @@ bool dLytMeterABtn_c::execute() {
case 0x23:
case 0x27:
case 0x28: {
- LytDoButtonRelated::Action_e action = LytDoButtonRelated::convertDoButton(dLytDobutton_c::getField0x47C());
+ LytDoButtonRelated::Act_IE_e action = LytDoButtonRelated::convertDoButton(dLytDobutton_c::getField0x47C());
if (action >= 0) {
state = true;
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_A, action);
@@ -305,21 +305,21 @@ void dLytMeterABtn_c::setMessage(s32 id) {
buf[i] = 0;
}
- if (id < LytDoButtonRelated::DO_NONE) {
- if (id < 0x5D) {
+ if (id < LytDoButtonRelated::ACT_IE_NONE) {
+ if (id < LytDoButtonRelated::ACT_IE_SEPARATOR) {
sprintf(buf, "ACT_INFO_%03d", sActIds[id]);
- } else if (id == 0x5D) {
+ } else if (id == LytDoButtonRelated::ACT_IE_SEPARATOR) {
wchar_t b2[2];
b2[0] = b2[1] = 0;
for (int i = 0; i < 2; i++) {
mpTextBoxes[i]->setTextWithGlobalTextProcessor(b2);
}
} else {
- s32 id2 = id - 0x5E;
+ s32 id2 = id - LytDoButtonRelated::ACT_IE_SEPARATOR - 1;
sprintf(buf, "ACT_ETC_%03d", sActIds[id2]);
}
- if (id != 0x5D) {
+ if (id != LytDoButtonRelated::ACT_IE_SEPARATOR) {
for (int i = 0; i < 2; i++) {
mpTextBoxes[i]->SetVisible(true);
mpTextBoxes[i]->setMessageWithGlobalTextProcessor2(buf, nullptr);
diff --git a/src/d/lyt/meter/d_lyt_meter_action_table.inc b/src/d/lyt/meter/d_lyt_meter_action_table.inc
index 6ca2e66f..8f8f38cb 100644
--- a/src/d/lyt/meter/d_lyt_meter_action_table.inc
+++ b/src/d/lyt/meter/d_lyt_meter_action_table.inc
@@ -1,10 +1,151 @@
+// 001-Action.msbt
static const s32 sActIds[] = {
- 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF, 0x10, 0x11, 0x12, 0x13,
- 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26,
- 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
- 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C,
- 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, -1, 0x1,
- 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB, 0xC, 0xD, 0xE, 0xF, 0x10, 0x11, 0x12, 0x13, 0x14,
- 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
- 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x0, 0x0, 0x0, 0x0, 0x0
+ 1, // ACT_IE_INFO_CLIMB_UP
+ 2, // ACT_IE_INFO_JUMP
+ 3, // ACT_IE_INFO_DROP_DOWN
+ 4, // ACT_IE_INFO_LET_GO
+ 5, // ACT_IE_INFO_OPEN
+ 6, // ACT_IE_INFO_DROP
+ 7, // ACT_IE_INFO_THROW
+ 8, // ACT_IE_INFO_BURROW
+ 9, // ACT_IE_INFO_ROLL
+ 10, // ACT_IE_INFO_9
+ 11, // ACT_IE_INFO_MOVE
+ 12, // ACT_IE_INFO_GRAB
+ 13, // ACT_IE_INFO_SHOOT
+ 14, // ACT_IE_INFO_13
+ 15, // ACT_IE_INFO_14
+ 16, // ACT_IE_INFO_15
+ 17, // ACT_IE_INFO_TALK
+ 18, // ACT_IE_INFO_EXAMINE
+ 19, // ACT_IE_INFO_DRAW
+ 20, // ACT_IE_INFO_19
+ 21, // ACT_IE_INFO_BLOW
+ 22, // ACT_IE_INFO_21
+ 23, // ACT_IE_INFO_22
+ 24, // ACT_IE_INFO_SWIM
+ 25, // ACT_IE_INFO_LEAP
+ 26, // ACT_IE_INFO_DASH
+ 27, // ACT_IE_INFO_GET_OUT
+ 28, // ACT_IE_INFO_27
+ 29, // ACT_IE_INFO_PICK_UP
+ 30, // ACT_IE_INFO_SIT
+ 31, // ACT_IE_INFO_STAND
+ 32, // ACT_IE_INFO_DIG
+ 33, // ACT_IE_INFO_32
+ 34, // ACT_IE_INFO_33
+ 35, // ACT_IE_INFO_BREAK_FREE
+ 36, // ACT_IE_INFO_35
+ 37, // ACT_IE_INFO_36
+ 38, // ACT_IE_INFO_PLANT
+ 39, // ACT_IE_INFO_CATCH
+ 40, // ACT_IE_INFO_SPEED_UP
+ 41, // ACT_IE_INFO_SAILCLOTH
+ 42, // ACT_IE_INFO_PUT_AWAY
+ 43, // ACT_IE_INFO_EMERGE
+ 44, // ACT_IE_INFO_INSERT
+ 45, // ACT_IE_INFO_44
+ 46, // ACT_IE_INFO_TURN
+ 47, // ACT_IE_INFO_ALIGN
+ 48, // ACT_IE_INFO_47
+ 49, // ACT_IE_INFO_DRAW_BOW
+ 50, // ACT_IE_INFO_49
+ 51, // ACT_IE_INFO_50
+ 52, // ACT_IE_INFO_51
+ 53, // ACT_IE_INFO_SWING
+ 54, // ACT_IE_INFO_BALANCE
+ 55, // ACT_IE_INFO_JOSTLE
+ 56, // ACT_IE_INFO_55
+ 57, // ACT_IE_INFO_SLEEP
+ 58, // ACT_IE_INFO_DROP_2
+ 59, // ACT_IE_INFO_LAUNCH
+ 60, // ACT_IE_INFO_READ
+ 61, // ACT_IE_INFO_WHIP
+ 62, // ACT_IE_INFO_PULL
+ 63, // ACT_IE_INFO_DRINK
+ 64, // ACT_IE_INFO_63
+ 65, // ACT_IE_INFO_GET_IN
+ 66, // ACT_IE_INFO_FIRE
+ 67, // ACT_IE_INFO_ATTACK
+ 68, // ACT_IE_INFO_FATAL_BLOW
+ 69, // ACT_IE_INFO_JUMP_DOWN
+ 70, // ACT_IE_INFO_STRUM
+ 71, // ACT_IE_INFO_70
+ 72, // ACT_IE_INFO_RELEASE
+ 73, // ACT_IE_INFO_GRAB_2
+ 74, // ACT_IE_INFO_READY_STANCE
+ 75, // ACT_IE_INFO_REMOVE
+ 76, // ACT_IE_INFO_READY_SWORD
+ 77, // ACT_IE_INFO_THRUST_SWORD
+ 78, // ACT_IE_INFO_USE
+ 79, // ACT_IE_INFO_SCOOP
+ 80, // ACT_IE_INFO_79
+ 81, // ACT_IE_INFO_80
+ 82, // ACT_IE_INFO_LOOK
+ 83, // ACT_IE_INFO_DOWSE
+ 84, // ACT_IE_INFO_PILOT
+ 85, // ACT_IE_INFO_LOOK_DOWN
+ 86, // ACT_IE_INFO_DIVE
+ 87, // ACT_IE_INFO_SELECT
+ 88, // ACT_IE_INFO_GRAB_3
+ 89, // ACT_IE_INFO_MOVE_1
+ 90, // ACT_IE_INFO_ACCELERATE
+ 91, // ACT_IE_INFO_CHARGE
+ 92, // ACT_IE_INFO_LEAN
+ 93, // ACT_IE_INFO_PRESS
+ -1, // ACT_IE_SEPARATOR
+ 1, // ACT_IE_ETC_LOCK_ON
+ 2, // ACT_IE_ETC_DASH
+ 3, // ACT_IE_ETC_RAISE_SHIELD
+ 4, // ACT_IE_ETC_97
+ 5, // ACT_IE_ETC_SHIELD_BASH
+ 6, // ACT_IE_ETC_99
+ 7, // ACT_IE_ETC_ROLL
+ 8, // ACT_IE_ETC_DODGE
+ 9, // ACT_IE_ETC_102
+ 10, // ACT_IE_ETC_VIEW_SURFACE
+ 11, // ACT_IE_ETC_PUT_AWAY
+ 12, // ACT_IE_ETC_105
+ 13, // ACT_IE_ETC_106
+ 14, // ACT_IE_ETC_CENTER
+ 15, // ACT_IE_ETC_BACK
+ 16, // ACT_IE_ETC_WORLD_MAP
+ 17, // ACT_IE_ETC_ZOOM_OUT
+ 18, // ACT_IE_ETC_ZOOM_IN
+ 19, // ACT_IE_ETC_SCROLL
+ 20, // ACT_IE_ETC_CURRENT_LOCATION
+ 21, // ACT_IE_ETC_114
+ 22, // ACT_IE_ETC_115
+ 23, // ACT_IE_ETC_BACK_2
+ 24, // ACT_IE_ETC_ADD_BEACON
+ 25, // ACT_IE_ETC_REMOVE_BEACON
+ 26, // ACT_IE_ETC_ROTATE_MAP
+ 27, // ACT_IE_ETC_ROTATE_MAP_2
+ 28, // ACT_IE_ETC_121
+ 29, // ACT_IE_ETC_122
+ 30, // ACT_IE_ETC_123
+ 31, // ACT_IE_ETC_124
+ 32, // ACT_IE_ETC_GET_OFF
+ 33, // ACT_IE_ETC_STORE
+ 34, // ACT_IE_ETC_RETURN
+ 35, // ACT_IE_ETC_MOVE
+ 36, // ACT_IE_ETC_VIEW_LOCK
+ 37, // ACT_IE_ETC_RESET_POSITION
+ 38, // ACT_IE_ETC_CANCEL
+ 39, // ACT_IE_ETC_STOP
+ 40, // ACT_IE_ETC_ITEMS
+ 41, // ACT_IE_ETC_SPIN
+ 42, // ACT_IE_ETC_DONE
+ 43, // ACT_IE_ETC_RESET_PANELS
+ 44, // ACT_IE_ETC_BACK_3
+ 45, // ACT_IE_ETC_SLOW_DOWN
+ 46, // ACT_IE_ETC_DISPLAY
+ 47, // ACT_IE_ETC_SELECT_FLOOR
+ 48, // ACT_IE_ETC_SHOW_ISLAND_NAME
+ 49, // ACT_IE_ETC_HIDE_ISLAND_NAME
+ 50, // ACT_IE_ETC_READY_CANNON
+ 51, // ACT_IE_ETC_STOW_CANNON
+ 52, // ACT_IE_ETC_SAILCLOTH
+ 53, // ACT_IE_ETC_RETURN_2
+ 0, 0, 0, 0, 0,
};
diff --git a/src/d/lyt/meter/d_lyt_meter_cross_btn.cpp b/src/d/lyt/meter/d_lyt_meter_cross_btn.cpp
index 427cda47..912014eb 100644
--- a/src/d/lyt/meter/d_lyt_meter_cross_btn.cpp
+++ b/src/d/lyt/meter/d_lyt_meter_cross_btn.cpp
@@ -33,7 +33,7 @@ void dLytMeterCrossBtnParts_c::executeState_Wait() {
if (field_0x7C) {
if (field_0x68) {
bool bDoUpdate = true;
- if (field_0x64 != LytDoButtonRelated::DO_NONE || field_0x70 != field_0x74) {
+ if (field_0x64 != LytDoButtonRelated::ACT_IE_NONE || field_0x70 != field_0x74) {
if (timer <= 0) {
mStateMgr.changeState(StateID_On);
setMessage(field_0x64);
@@ -47,7 +47,7 @@ void dLytMeterCrossBtnParts_c::executeState_Wait() {
field_0x70 = field_0x74;
}
} else {
- if (field_0x64 != LytDoButtonRelated::DO_NONE || field_0x70 != field_0x74) {
+ if (field_0x64 != LytDoButtonRelated::ACT_IE_NONE || field_0x70 != field_0x74) {
setMessage(field_0x64);
}
field_0x60 = field_0x64;
@@ -77,7 +77,7 @@ void dLytMeterCrossBtnParts_c::finalizeState_On() {}
void dLytMeterCrossBtnParts_c::initializeState_Active() {}
void dLytMeterCrossBtnParts_c::executeState_Active() {
if (field_0x64 != field_0x60 || !field_0x68 || field_0x70 != field_0x74) {
- if ((field_0x64 == LytDoButtonRelated::DO_NONE && field_0x74 == 6) || !field_0x68) {
+ if ((field_0x64 == LytDoButtonRelated::ACT_IE_NONE && field_0x74 == 6) || !field_0x68) {
if (field_0x60 != field_0x6C) {
field_0x64 = field_0x6C;
}
@@ -87,7 +87,7 @@ void dLytMeterCrossBtnParts_c::executeState_Active() {
}
field_0x60 = field_0x64;
field_0x70 = field_0x74;
- } else if (field_0x60 == LytDoButtonRelated::DO_NONE && field_0x74 == 6) {
+ } else if (field_0x60 == LytDoButtonRelated::ACT_IE_NONE && field_0x74 == 6) {
mStateMgr.changeState(StateID_Off);
}
}
@@ -107,15 +107,15 @@ void dLytMeterCrossBtnParts_c::executeState_Off() {
void dLytMeterCrossBtnParts_c::finalizeState_Off() {}
void dLytMeterCrossBtnParts_c::init() {
- field_0x6C = LytDoButtonRelated::DO_NONE;
- field_0x60 = LytDoButtonRelated::DO_NONE;
- field_0x64 = LytDoButtonRelated::DO_NONE;
+ field_0x6C = LytDoButtonRelated::ACT_IE_NONE;
+ field_0x60 = LytDoButtonRelated::ACT_IE_NONE;
+ field_0x64 = LytDoButtonRelated::ACT_IE_NONE;
field_0x7C = false;
field_0x70 = 6;
field_0x68 = 1;
mOnDelay = 15;
mpOwnerPane = 0;
- setMessage(LytDoButtonRelated::DO_NONE);
+ setMessage(LytDoButtonRelated::ACT_IE_NONE);
mStateMgr.changeState(StateID_Wait);
}
@@ -142,18 +142,18 @@ void dLytMeterCrossBtnParts_c::execute(bool bIsVisible) {
if (dLytMeter_c::GetInstance()->getMeterField_0x13750() == 0) {
if (mIndex == 0) {
- LytDoButtonRelated::fn_8010EC10(LytDoButtonRelated::DO_NONE, true);
+ LytDoButtonRelated::fn_8010EC10(LytDoButtonRelated::ACT_IE_NONE, true);
} else if (mIndex == 1) {
- LytDoButtonRelated::fn_8010ED50(LytDoButtonRelated::DO_NONE, true);
+ LytDoButtonRelated::fn_8010ED50(LytDoButtonRelated::ACT_IE_NONE, true);
} else if (mIndex == 2) {
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_L, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_L, LytDoButtonRelated::ACT_IE_NONE);
} else if (mIndex == 3) {
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_R, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_R, LytDoButtonRelated::ACT_IE_NONE);
}
- if (field_0x64 != LytDoButtonRelated::DO_NONE) {
- field_0x64 = LytDoButtonRelated::DO_NONE;
- field_0x60 = LytDoButtonRelated::DO_NONE;
+ if (field_0x64 != LytDoButtonRelated::ACT_IE_NONE) {
+ field_0x64 = LytDoButtonRelated::ACT_IE_NONE;
+ field_0x60 = LytDoButtonRelated::ACT_IE_NONE;
}
setMessage(field_0x64);
}
@@ -169,13 +169,13 @@ void dLytMeterCrossBtnParts_c::execute(bool bIsVisible) {
field_0x7C = 0;
if (mIndex == 0) {
- LytDoButtonRelated::fn_8010EC10(LytDoButtonRelated::DO_NONE, true);
+ LytDoButtonRelated::fn_8010EC10(LytDoButtonRelated::ACT_IE_NONE, true);
} else if (mIndex == 1) {
- LytDoButtonRelated::fn_8010ED50(LytDoButtonRelated::DO_NONE, true);
+ LytDoButtonRelated::fn_8010ED50(LytDoButtonRelated::ACT_IE_NONE, true);
} else if (mIndex == 2) {
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_L, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_L, LytDoButtonRelated::ACT_IE_NONE);
} else if (mIndex == 3) {
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_R, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_CROSS_R, LytDoButtonRelated::ACT_IE_NONE);
}
} else {
field_0x7C = 1;
@@ -258,11 +258,11 @@ void dLytMeterCrossBtnParts_c::setMessage(s32 id) {
mpLyt->getLayout()->Animate(0);
mpLyt->calc();
mpAnm[1]->setAnimEnable(false);
- } else if (id < LytDoButtonRelated::DO_NONE) {
- if (id < 0x5D) {
+ } else if (id < LytDoButtonRelated::ACT_IE_NONE) {
+ if (id < LytDoButtonRelated::ACT_IE_SEPARATOR) {
sprintf(buf, "ACT_INFO_%03d", sActIds[id]);
} else {
- s32 id2 = id - 0x5E;
+ s32 id2 = id - LytDoButtonRelated::ACT_IE_SEPARATOR - 1;
sprintf(buf, "ACT_ETC_%03d", sActIds[id2]);
}
diff --git a/src/d/lyt/meter/d_lyt_meter_dowsing.cpp b/src/d/lyt/meter/d_lyt_meter_dowsing.cpp
index f7850755..7b5adc59 100644
--- a/src/d/lyt/meter/d_lyt_meter_dowsing.cpp
+++ b/src/d/lyt/meter/d_lyt_meter_dowsing.cpp
@@ -830,9 +830,9 @@ bool dLytMeterDowsing_c::build(d2d::ResAccIf_c *resAcc) {
field_0x54F8 = -1;
mDemoFrame = 0;
field_0x5500 = 0;
- field_0x54F0 = LytDoButtonRelated::DO_NONE;
- field_0x54E4 = LytDoButtonRelated::DO_NONE;
- field_0x54E8 = LytDoButtonRelated::DO_NONE;
+ field_0x54F0 = LytDoButtonRelated::ACT_IE_NONE;
+ field_0x54E4 = LytDoButtonRelated::ACT_IE_NONE;
+ field_0x54E8 = LytDoButtonRelated::ACT_IE_NONE;
field_0x54D8 = 15;
field_0x5505 = 0;
field_0x54EC = 1;
@@ -901,7 +901,7 @@ bool dLytMeterDowsing_c::remove() {
bool dLytMeterDowsing_c::execute() {
if (dLytControlGame_c::getInstance()->isStateNormal()) {
if (StoryflagManager::sInstance->getCounterOrFlag(566) &&
- LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) != LytDoButtonRelated::DO_NONE) {
+ LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) != LytDoButtonRelated::ACT_IE_NONE) {
if (dLytMeter_c::GetMain()->fn_800D5380(0)) {
field_0x5508 = 0;
StoryflagManager::sInstance->unsetFlag(566);
@@ -971,7 +971,7 @@ bool dLytMeterDowsing_c::execute() {
bool state = false;
s32 action = dLytDobutton_c::getFn0x8010E5E0();
if (action == 8 || action == 10 || action == 30) {
- LytDoButtonRelated::Action_e action = LytDoButtonRelated::convertDoButton(dLytDobutton_c::getFn0x8010E5D0());
+ LytDoButtonRelated::Act_IE_e action = LytDoButtonRelated::convertDoButton(dLytDobutton_c::getAction());
if (action >= 0) {
state = true;
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_C, action);
@@ -1230,11 +1230,11 @@ void dLytMeterDowsing_c::setMessage(s32 id) {
buf[i] = 0;
}
- if (id < LytDoButtonRelated::DO_NONE) {
- if (id < 0x5D) {
+ if (id < LytDoButtonRelated::ACT_IE_NONE) {
+ if (id < LytDoButtonRelated::ACT_IE_SEPARATOR) {
sprintf(buf, "ACT_INFO_%03d", sActIds[id]);
} else {
- s32 id2 = id - 0x5E;
+ s32 id2 = id - LytDoButtonRelated::ACT_IE_SEPARATOR - 1;
sprintf(buf, "ACT_ETC_%03d", sActIds[id2]);
}
@@ -1269,7 +1269,7 @@ s32 dLytMeterDowsing_c::fn_800FE9C0(s32 unkId) const {
bool dLytMeterDowsing_c::shouldCall() const {
if (dLytControlGame_c::getInstance()->isStateNormal() &&
((StoryflagManager::sInstance->getCounterOrFlag(566) &&
- LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) != LytDoButtonRelated::DO_NONE) ||
+ LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) != LytDoButtonRelated::ACT_IE_NONE) ||
(StoryflagManager::sInstance->getCounterOrFlag(818) &&
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_C) == 0x52))) {
return true;
diff --git a/src/d/lyt/meter/d_lyt_meter_item_select.cpp b/src/d/lyt/meter/d_lyt_meter_item_select.cpp
index 7055a566..38abda5b 100644
--- a/src/d/lyt/meter/d_lyt_meter_item_select.cpp
+++ b/src/d/lyt/meter/d_lyt_meter_item_select.cpp
@@ -666,7 +666,7 @@ void dLytMeterItemSelect_c::initializeState_Wait() {
}
void dLytMeterItemSelect_c::executeState_Wait() {
if (field_0x57B3 == 1 && (field_0x5794 == I_INVALID || LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) ==
- LytDoButtonRelated::DO_STOP)) {
+ LytDoButtonRelated::ACT_IE_ETC_STOP)) {
mStateMgr.changeState(StateID_SetNone);
} else if (field_0x57B3 == 0 && field_0x5794 == I_INVALID &&
(field_0x579A == I_SAILCLOTH || field_0x579A == I_BOAT_CANNON || field_0x579A == I_HARP)) {
@@ -687,10 +687,10 @@ void dLytMeterItemSelect_c::executeState_Wait() {
} else if (!dLytMeter_c::GetInstance()->checkAllFlags(METER_BTN_B)) {
mStateMgr.changeState(StateID_ToUnuse);
} else if (!dLytMeter_c::GetMain()->fn_800D5650() && !dLytMeter_c::GetMain()->fn_800D5680() &&
- LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) != LytDoButtonRelated::DO_ITEMS &&
- LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) != LytDoButtonRelated::DO_RETURN &&
- LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) != LytDoButtonRelated::DO_DONE &&
- LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) != LytDoButtonRelated::DO_STOP &&
+ LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) != LytDoButtonRelated::ACT_IE_ETC_ITEMS &&
+ LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) != LytDoButtonRelated::ACT_IE_ETC_RETURN &&
+ LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) != LytDoButtonRelated::ACT_IE_ETC_DONE &&
+ LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) != LytDoButtonRelated::ACT_IE_ETC_STOP &&
(field_0x5794 != I_BOAT_CANNON && field_0x5794 != I_HARP && field_0x5794 != I_INVALID &&
field_0x5794 != I_SAILCLOTH)) {
mStateMgr.changeState(StateID_ResetIn);
@@ -1122,10 +1122,10 @@ void dLytMeterItemSelect_c::executeState_Reset() {
fn_800F0310();
} else if (field_0x5794 == I_SAILCLOTH || field_0x5794 == I_BOAT_CANNON || field_0x5794 == I_HARP) {
mStateMgr.changeState(StateID_SetSpecialItemIn);
- } else if (LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::DO_ITEMS ||
- LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::DO_RETURN ||
- LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::DO_DONE ||
- LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::DO_STOP ||
+ } else if (LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::ACT_IE_ETC_ITEMS ||
+ LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::ACT_IE_ETC_RETURN ||
+ LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::ACT_IE_ETC_DONE ||
+ LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_B) == LytDoButtonRelated::ACT_IE_ETC_STOP ||
field_0x5794 == I_INVALID || !dLytMeter_c::GetInstance()->checkAllFlags(METER_BTN_B) ||
field_0x5754 == 1) {
mStateMgr.changeState(StateID_ResetOut);
@@ -1789,10 +1789,10 @@ bool dLytMeterItemSelect_c::build(d2d::ResAccIf_c *resAcc) {
field_0x57BB = 0;
field_0x57BC = 0;
field_0x5774 = 0;
- mLastDoButtonRelatedAction = LytDoButtonRelated::DO_NONE;
+ mLastDoButtonRelatedAction = LytDoButtonRelated::ACT_IE_NONE;
field_0x5770 = 5;
- setBtnText(LytDoButtonRelated::DO_NONE);
+ setBtnText(LytDoButtonRelated::ACT_IE_NONE);
mStateMgr.changeState(StateID_InitWait);
@@ -2203,12 +2203,12 @@ bool dLytMeterItemSelect_c::execute() {
}
if (field_0x5794 == I_SAILCLOTH) {
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_B, LytDoButtonRelated::DO_SAILCLOTH);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_B, LytDoButtonRelated::ACT_IE_ETC_SAILCLOTH);
} else if (field_0x5794 == I_BOAT_CANNON) {
if (field_0x57B3 != 0) {
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_B, LytDoButtonRelated::DO_STOW_CANNON);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_B, LytDoButtonRelated::ACT_IE_ETC_STOW_CANNON);
} else {
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_B, LytDoButtonRelated::DO_READY_CANNON);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_B, LytDoButtonRelated::ACT_IE_ETC_READY_CANNON);
}
}
@@ -2220,8 +2220,8 @@ bool dLytMeterItemSelect_c::execute() {
setBtnText(mLastDoButtonRelatedAction);
}
} else {
- if (mLastDoButtonRelatedAction != LytDoButtonRelated::DO_NONE) {
- mLastDoButtonRelatedAction = LytDoButtonRelated::DO_NONE;
+ if (mLastDoButtonRelatedAction != LytDoButtonRelated::ACT_IE_NONE) {
+ mLastDoButtonRelatedAction = LytDoButtonRelated::ACT_IE_NONE;
setBtnText(mLastDoButtonRelatedAction);
}
@@ -2230,7 +2230,7 @@ bool dLytMeterItemSelect_c::execute() {
}
}
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_B, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_B, LytDoButtonRelated::ACT_IE_NONE);
}
field_0x57C1 = isWheelBlockedByCurrentAction();
@@ -2580,26 +2580,26 @@ void dLytMeterItemSelect_c::fn_800F0310() {
#include "d/lyt/meter/d_lyt_meter_action_table.inc"
-void dLytMeterItemSelect_c::setBtnText(s32 unkId) {
- SizedString<16> id;
- if (unkId < LytDoButtonRelated::DO_NONE) {
+void dLytMeterItemSelect_c::setBtnText(s32 id) {
+ SizedString<16> buf;
+ if (id < LytDoButtonRelated::ACT_IE_NONE) {
mpTextBoxes[8]->SetVisible(true);
mpTextBoxes[9]->SetVisible(true);
mpWindows[0]->SetVisible(true);
mpTextBoxes[4]->SetVisible(true);
mpTextBoxes[5]->SetVisible(true);
mpWindows[3]->SetVisible(true);
- if (unkId < 0x5D) {
- id.sprintf("ACT_INFO_%03d", sActIds[unkId]);
+ if (id < LytDoButtonRelated::ACT_IE_SEPARATOR) {
+ buf.sprintf("ACT_INFO_%03d", sActIds[id]);
} else {
- unkId -= 0x5E;
- id.sprintf("ACT_ETC_%03d", sActIds[unkId]);
+ s32 tempId = id - LytDoButtonRelated::ACT_IE_SEPARATOR - 1;
+ buf.sprintf("ACT_ETC_%03d", sActIds[tempId]);
}
- mpTextBoxes[8]->setMessageWithGlobalTextProcessor2(id, nullptr);
- mpTextBoxes[9]->setMessageWithGlobalTextProcessor2(id, nullptr);
+ mpTextBoxes[8]->setMessageWithGlobalTextProcessor2(buf, nullptr);
+ mpTextBoxes[9]->setMessageWithGlobalTextProcessor2(buf, nullptr);
mpWindows[0]->UpdateSize(mpSizeBoxes[0], 32.0f);
- mpTextBoxes[4]->setMessageWithGlobalTextProcessor2(id, nullptr);
- mpTextBoxes[5]->setMessageWithGlobalTextProcessor2(id, nullptr);
+ mpTextBoxes[4]->setMessageWithGlobalTextProcessor2(buf, nullptr);
+ mpTextBoxes[5]->setMessageWithGlobalTextProcessor2(buf, nullptr);
mpWindows[3]->UpdateSize(mpSizeBoxes[3], 32.0f);
} else {
const wchar_t *empty = L"";
diff --git a/src/d/lyt/meter/d_lyt_meter_nun_stk.cpp b/src/d/lyt/meter/d_lyt_meter_nun_stk.cpp
index 7b9468d2..a44d6584 100644
--- a/src/d/lyt/meter/d_lyt_meter_nun_stk.cpp
+++ b/src/d/lyt/meter/d_lyt_meter_nun_stk.cpp
@@ -27,7 +27,7 @@ void dLytMeterNunStk_c::executeState_Wait() {
if (field_0x184) {
if (field_0x178) {
bool bDoUpdate = true;
- if (field_0x174 != LytDoButtonRelated::DO_NONE) {
+ if (field_0x174 != LytDoButtonRelated::ACT_IE_NONE) {
if (timer <= 0) {
mAnm[NUN_STK_ANIM_INPUT].setBackwardsOnce();
mAnm[NUN_STK_ANIM_INPUT].setToStart();
@@ -43,7 +43,7 @@ void dLytMeterNunStk_c::executeState_Wait() {
field_0x170 = field_0x174;
}
} else {
- if (field_0x174 != LytDoButtonRelated::DO_NONE) {
+ if (field_0x174 != LytDoButtonRelated::ACT_IE_NONE) {
setMessage(field_0x174);
}
field_0x170 = field_0x174;
@@ -68,7 +68,7 @@ void dLytMeterNunStk_c::finalizeState_On() {}
void dLytMeterNunStk_c::initializeState_Active() {}
void dLytMeterNunStk_c::executeState_Active() {
if (field_0x174 != field_0x170 || !field_0x178) {
- if (field_0x174 == LytDoButtonRelated::DO_NONE || !field_0x178) {
+ if (field_0x174 == LytDoButtonRelated::ACT_IE_NONE || !field_0x178) {
mAnm[NUN_STK_ANIM_INPUT].setForwardOnce();
mAnm[NUN_STK_ANIM_INPUT].setFrame(0.0f);
mAnm[NUN_STK_ANIM_INPUT].setAnimEnable(true);
@@ -80,7 +80,7 @@ void dLytMeterNunStk_c::executeState_Active() {
setMessage(field_0x174);
}
field_0x170 = field_0x174;
- } else if (field_0x170 == LytDoButtonRelated::DO_NONE) {
+ } else if (field_0x170 == LytDoButtonRelated::ACT_IE_NONE) {
mAnm[NUN_STK_ANIM_INPUT].setForwardOnce();
mAnm[NUN_STK_ANIM_INPUT].setFrame(0.0f);
mAnm[NUN_STK_ANIM_INPUT].setAnimEnable(true);
@@ -127,9 +127,9 @@ bool dLytMeterNunStk_c::build(d2d::ResAccIf_c *resAcc) {
mpSizeBox[i] = mLyt.getSizeBoxInWindow(sWindows[i]);
}
- mDisplayedAction = LytDoButtonRelated::DO_NONE;
- field_0x170 = LytDoButtonRelated::DO_NONE;
- field_0x174 = LytDoButtonRelated::DO_NONE;
+ mDisplayedAction = LytDoButtonRelated::ACT_IE_NONE;
+ field_0x170 = LytDoButtonRelated::ACT_IE_NONE;
+ field_0x174 = LytDoButtonRelated::ACT_IE_NONE;
field_0x184 = true;
field_0x178 = true;
@@ -173,7 +173,7 @@ bool dLytMeterNunStk_c::execute() {
mAnm[NUN_STK_ANIM_INPUT].setAnimEnable(false);
mStateMgr.changeState(StateID_Wait);
}
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_STK, LytDoButtonRelated::ACT_IE_NONE);
field_0x174 = LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_NUN_STK);
setMessage(field_0x174);
return true;
@@ -202,11 +202,11 @@ void dLytMeterNunStk_c::setMessage(s32 id) {
buf[i] = 0;
}
- if (id < LytDoButtonRelated::DO_NONE) {
- if (id < 0x5D) {
+ if (id < LytDoButtonRelated::ACT_IE_NONE) {
+ if (id < LytDoButtonRelated::ACT_IE_SEPARATOR) {
sprintf(buf, "ACT_INFO_%03d", sActIds[id]);
} else {
- s32 id2 = id - 0x5E;
+ s32 id2 = id - LytDoButtonRelated::ACT_IE_SEPARATOR - 1;
sprintf(buf, "ACT_ETC_%03d", sActIds[id2]);
}
diff --git a/src/d/lyt/meter/d_lyt_meter_nunchaku_bg.cpp b/src/d/lyt/meter/d_lyt_meter_nunchaku_bg.cpp
index 582cba17..dc6275f7 100644
--- a/src/d/lyt/meter/d_lyt_meter_nunchaku_bg.cpp
+++ b/src/d/lyt/meter/d_lyt_meter_nunchaku_bg.cpp
@@ -30,7 +30,7 @@ void dLytMeterNunchakuBg_c::executeState_Wait() {
if (field_0x1C4) {
if (field_0x1B8) {
bool bDoUpdate = true;
- if (field_0x1B4 != LytDoButtonRelated::DO_NONE) {
+ if (field_0x1B4 != LytDoButtonRelated::ACT_IE_NONE) {
if (timer <= 0) {
mAnm[NUN_BG_ANIM_INPUT].setBackwardsOnce();
mAnm[NUN_BG_ANIM_INPUT].setToStart();
@@ -46,7 +46,7 @@ void dLytMeterNunchakuBg_c::executeState_Wait() {
field_0x1B0 = field_0x1B4;
}
} else {
- if (field_0x1B4 != LytDoButtonRelated::DO_NONE) {
+ if (field_0x1B4 != LytDoButtonRelated::ACT_IE_NONE) {
setMessage(field_0x1B4);
}
field_0x1B0 = field_0x1B4;
@@ -71,7 +71,7 @@ void dLytMeterNunchakuBg_c::finalizeState_On() {}
void dLytMeterNunchakuBg_c::initializeState_Active() {}
void dLytMeterNunchakuBg_c::executeState_Active() {
if (field_0x1B4 != field_0x1B0 || !field_0x1B8) {
- if (field_0x1B4 == LytDoButtonRelated::DO_NONE || !field_0x1B8) {
+ if (field_0x1B4 == LytDoButtonRelated::ACT_IE_NONE || !field_0x1B8) {
mAnm[NUN_BG_ANIM_INPUT].setForwardOnce();
mAnm[NUN_BG_ANIM_INPUT].setFrame(0.0f);
mAnm[NUN_BG_ANIM_INPUT].setAnimEnable(true);
@@ -83,7 +83,7 @@ void dLytMeterNunchakuBg_c::executeState_Active() {
setMessage(field_0x1B4);
}
field_0x1B0 = field_0x1B4;
- } else if (field_0x1B0 == LytDoButtonRelated::DO_NONE) {
+ } else if (field_0x1B0 == LytDoButtonRelated::ACT_IE_NONE) {
mAnm[NUN_BG_ANIM_INPUT].setForwardOnce();
mAnm[NUN_BG_ANIM_INPUT].setFrame(0.0f);
mAnm[NUN_BG_ANIM_INPUT].setAnimEnable(true);
@@ -180,7 +180,7 @@ bool dLytMeterNunchakuBg_c::execute() {
mAnm[NUN_BG_ANIM_INPUT].setAnimEnable(false);
mStateMgr.changeState(StateID_Wait);
}
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_BG, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_BG, LytDoButtonRelated::ACT_IE_NONE);
field_0x1B4 = LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_NUN_STK);
setMessage(field_0x1B4);
return true;
@@ -188,14 +188,14 @@ bool dLytMeterNunchakuBg_c::execute() {
if (EventManager::isInEvent()) {
field_0x1C4 = false;
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_BG, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_BG, LytDoButtonRelated::ACT_IE_NONE);
} else {
field_0x1C4 = true;
}
s32 d = dLytDobutton_c::getFn0x8010E5E0();
if (d == 6 || d == 9) {
- LytDoButtonRelated::Action_e a = LytDoButtonRelated::convertDoButton(dLytDobutton_c::getFn0x8010E5D0());
+ LytDoButtonRelated::Act_IE_e a = LytDoButtonRelated::convertDoButton(dLytDobutton_c::getAction());
if (a >= 0) {
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_NUN_BG, a);
}
@@ -245,11 +245,11 @@ void dLytMeterNunchakuBg_c::setMessage(s32 id) {
buf[i] = 0;
}
- if (id < LytDoButtonRelated::DO_NONE) {
- if (id < 0x5D) {
+ if (id < LytDoButtonRelated::ACT_IE_NONE) {
+ if (id < LytDoButtonRelated::ACT_IE_SEPARATOR) {
sprintf(buf, "ACT_INFO_%03d", sActIds[id]);
} else {
- s32 id2 = id - 0x5E;
+ s32 id2 = id - LytDoButtonRelated::ACT_IE_SEPARATOR - 1;
sprintf(buf, "ACT_ETC_%03d", sActIds[id2]);
}
diff --git a/src/d/lyt/meter/d_lyt_meter_plus_btn.cpp b/src/d/lyt/meter/d_lyt_meter_plus_btn.cpp
index 4c2cfb9e..ba9c4b7d 100644
--- a/src/d/lyt/meter/d_lyt_meter_plus_btn.cpp
+++ b/src/d/lyt/meter/d_lyt_meter_plus_btn.cpp
@@ -121,10 +121,10 @@ bool dLytMeterPlusBtn_c::build(d2d::ResAccIf_c *resAcc) {
mpWindow[i]->UpdateSize(mpSizeBox[i], 32.0f);
}
- field_0x1B0 = LytDoButtonRelated::DO_NONE;
- field_0x1B4 = LytDoButtonRelated::DO_NONE;
+ field_0x1B0 = LytDoButtonRelated::ACT_IE_NONE;
+ field_0x1B4 = LytDoButtonRelated::ACT_IE_NONE;
- setMessage(LytDoButtonRelated::DO_NONE);
+ setMessage(LytDoButtonRelated::ACT_IE_NONE);
field_0x1C0 = 0;
field_0x1C1 = StoryflagManager::sInstance->getCounterOrFlag(212);
@@ -218,7 +218,7 @@ bool dLytMeterPlusBtn_c::execute() {
mStateMgr.executeState();
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_PLUS, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_PLUS, LytDoButtonRelated::ACT_IE_NONE);
if (mAnm[PLUS_BTN_ANIM_LOOP].isEnabled()) {
mAnm[PLUS_BTN_ANIM_LOOP].play();
@@ -313,11 +313,11 @@ void dLytMeterPlusBtn_c::setMessage(s32 id) {
buf[i] = 0;
}
- if (id < LytDoButtonRelated::DO_NONE) {
- if (id < 0x5D) {
+ if (id < LytDoButtonRelated::ACT_IE_NONE) {
+ if (id < LytDoButtonRelated::ACT_IE_SEPARATOR) {
sprintf(buf, "ACT_INFO_%03d", sActIds[id]);
} else {
- s32 id2 = id - 0x5E;
+ s32 id2 = id - LytDoButtonRelated::ACT_IE_SEPARATOR - 1;
sprintf(buf, "ACT_ETC_%03d", sActIds[id2]);
}
diff --git a/src/d/lyt/meter/d_lyt_meter_remocon_bg.cpp b/src/d/lyt/meter/d_lyt_meter_remocon_bg.cpp
index 0986a7bc..b2818006 100644
--- a/src/d/lyt/meter/d_lyt_meter_remocon_bg.cpp
+++ b/src/d/lyt/meter/d_lyt_meter_remocon_bg.cpp
@@ -50,13 +50,13 @@ bool dLytMeterRemoconBg_c::remove() {
bool dLytMeterRemoconBg_c::execute() {
if (EventManager::isInEvent() || dLytMeter_c::getItemSelect0x75A2() != 0) {
field_0xEC = 0;
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_REMOCON_BG, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_REMOCON_BG, LytDoButtonRelated::ACT_IE_NONE);
} else {
field_0xEC = 1;
}
s32 d = dLytDobutton_c::getFn0x8010E5E0();
if (d == 1 || d == 2 || d == 3 || d == 4 || d == 12 || d == 13 || d == 14 || d == 6) {
- LytDoButtonRelated::Action_e a = LytDoButtonRelated::convertDoButton(dLytDobutton_c::getFn0x8010E5D0());
+ LytDoButtonRelated::Act_IE_e a = LytDoButtonRelated::convertDoButton(dLytDobutton_c::getAction());
if (a >= 0) {
LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_REMOCON_BG, a);
}
@@ -65,6 +65,6 @@ bool dLytMeterRemoconBg_c::execute() {
field_0xE0 = LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_REMOCON_BG);
field_0xE4 = LytDoButtonRelated::getHas(LytDoButtonRelated::DO_BUTTON_REMOCON_BG);
mStateMgr.executeState();
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_REMOCON_BG, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_REMOCON_BG, LytDoButtonRelated::ACT_IE_NONE);
return true;
}
diff --git a/src/d/lyt/meter/d_lyt_meter_z_btn.cpp b/src/d/lyt/meter/d_lyt_meter_z_btn.cpp
index 31dca491..3058e83f 100644
--- a/src/d/lyt/meter/d_lyt_meter_z_btn.cpp
+++ b/src/d/lyt/meter/d_lyt_meter_z_btn.cpp
@@ -35,7 +35,7 @@ void dLytMeterZBtn_c::executeState_Wait() {
if (field_0x1C4) {
if (field_0x1B8) {
bool bDoUpdate = true;
- if (field_0x1B4 != LytDoButtonRelated::DO_NONE) {
+ if (field_0x1B4 != LytDoButtonRelated::ACT_IE_NONE) {
if (timer <= 0) {
mAnm[Z_BTN_ANIM_INPUT].setBackwardsOnce();
mAnm[Z_BTN_ANIM_INPUT].setToStart();
@@ -51,7 +51,7 @@ void dLytMeterZBtn_c::executeState_Wait() {
field_0x1B0 = field_0x1B4;
}
} else {
- if (field_0x1B4 != LytDoButtonRelated::DO_NONE) {
+ if (field_0x1B4 != LytDoButtonRelated::ACT_IE_NONE) {
setMessage(field_0x1B4);
}
field_0x1B0 = field_0x1B4;
@@ -76,7 +76,7 @@ void dLytMeterZBtn_c::finalizeState_On() {}
void dLytMeterZBtn_c::initializeState_Active() {}
void dLytMeterZBtn_c::executeState_Active() {
if (field_0x1B4 != field_0x1B0 || !field_0x1B8) {
- if (field_0x1B4 == LytDoButtonRelated::DO_NONE || !field_0x1B8) {
+ if (field_0x1B4 == LytDoButtonRelated::ACT_IE_NONE || !field_0x1B8) {
mAnm[Z_BTN_ANIM_INPUT].setForwardOnce();
mAnm[Z_BTN_ANIM_INPUT].setFrame(0.0f);
mAnm[Z_BTN_ANIM_INPUT].setAnimEnable(true);
@@ -88,7 +88,7 @@ void dLytMeterZBtn_c::executeState_Active() {
setMessage(field_0x1B4);
}
field_0x1B0 = field_0x1B4;
- } else if (field_0x1B0 == LytDoButtonRelated::DO_NONE) {
+ } else if (field_0x1B0 == LytDoButtonRelated::ACT_IE_NONE) {
mAnm[Z_BTN_ANIM_INPUT].setForwardOnce();
mAnm[Z_BTN_ANIM_INPUT].setFrame(0.0f);
mAnm[Z_BTN_ANIM_INPUT].setAnimEnable(true);
@@ -182,14 +182,14 @@ bool dLytMeterZBtn_c::execute() {
mAnm[Z_BTN_ANIM_INPUT].setAnimEnable(true);
mStateMgr.changeState(StateID_Off);
}
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::ACT_IE_NONE);
return true;
}
field_0x1C4 = true;
if ((!fn_80081FE0(dScGame_c::getCamera(0)->getField_0xD98(), "mogu") || AttentionManager::GetInstance()->checkLink2()) &&
LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_Z) == 0x67) {
field_0x1C4 = false;
- LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::DO_NONE);
+ LytDoButtonRelated::set(LytDoButtonRelated::DO_BUTTON_Z, LytDoButtonRelated::ACT_IE_NONE);
}
field_0x1B4 = LytDoButtonRelated::get(LytDoButtonRelated::DO_BUTTON_Z);
field_0x1B8 = LytDoButtonRelated::getHas(LytDoButtonRelated::DO_BUTTON_Z) &&
@@ -249,11 +249,11 @@ void dLytMeterZBtn_c::setMessage(s32 id) {
buf[i] = 0;
}
- if (id < LytDoButtonRelated::DO_NONE) {
- if (id < 0x5D) {
+ if (id < LytDoButtonRelated::ACT_IE_NONE) {
+ if (id < LytDoButtonRelated::ACT_IE_SEPARATOR) {
sprintf(buf, "ACT_INFO_%03d", sActIds[id]);
} else {
- s32 id2 = id - 0x5E;
+ s32 id2 = id - LytDoButtonRelated::ACT_IE_SEPARATOR - 1;
sprintf(buf, "ACT_ETC_%03d", sActIds[id2]);
}
diff --git a/src/m/m2d.cpp b/src/m/m2d.cpp
index ed5a306f..5de7dd37 100644
--- a/src/m/m2d.cpp
+++ b/src/m/m2d.cpp
@@ -46,7 +46,7 @@ void defaultSet() {
void draw(u8 priority) {
for (Base_c *base = static_cast<Base_c *>(nw4r::ut::List_GetFirst(&l_list)); base != nullptr;
base = static_cast<Base_c *>(nw4r::ut::List_GetNext(&l_list, base))) {
- if (base->mPriority >= priority) {
+ if (base->getPriority() >= priority) {
break;
}
base->draw();
@@ -56,7 +56,7 @@ void draw(u8 priority) {
void drawBefore(u8 priority) {
for (Base_c *base = static_cast<Base_c *>(nw4r::ut::List_GetFirst(&l_list)); base != nullptr;
base = static_cast<Base_c *>(nw4r::ut::List_GetNext(&l_list, base))) {
- if (base->mPriority > priority) {
+ if (base->getPriority() > priority) {
base->draw();
}
}