mirror of
https://github.com/zeldaret/ss
synced 2026-07-11 06:45:20 -04:00
dLytDoButton_c cleanup start
This commit is contained in:
@@ -691,6 +691,7 @@ d/lyt/d_lyt_do_button.cpp:
|
||||
.ctors start:0x804DB728 end:0x804DB72C
|
||||
.rodata start:0x804E6D60 end:0x804E7080
|
||||
.data start:0x8051A5A8 end:0x8051AC00
|
||||
.sdata start:0x80572520 end:0x80572530
|
||||
.sbss start:0x80575468 end:0x80575470
|
||||
.bss start:0x805ACE10 end:0x805ACF78
|
||||
|
||||
|
||||
@@ -6065,7 +6065,7 @@ executeState_Off__24dLytMeterCrossBtnParts_cFv = .text:0x800F9170; // type:funct
|
||||
finalizeState_Off__24dLytMeterCrossBtnParts_cFv = .text:0x800F91E0; // type:function size:0x4
|
||||
init__24dLytMeterCrossBtnParts_cFv = .text:0x800F91F0; // type:function size:0x80
|
||||
execute__24dLytMeterCrossBtnParts_cFb = .text:0x800F9270; // type:function size:0x4C8
|
||||
setMessage__24dLytMeterCrossBtnParts_cFl = .text:0x800F9740; // type:function size:0x508
|
||||
setMessage__24dLytMeterCrossBtnParts_cFQ218LytDoButtonRelated8Act_IE_e = .text:0x800F9740; // type:function size:0x508
|
||||
initializeState_Wait__19dLytMeterCrossBtn_cFv = .text:0x800F9C50; // type:function size:0x4
|
||||
executeState_Wait__19dLytMeterCrossBtn_cFv = .text:0x800F9C60; // type:function size:0x4
|
||||
finalizeState_Wait__19dLytMeterCrossBtn_cFv = .text:0x800F9C70; // type:function size:0x4
|
||||
@@ -6526,14 +6526,14 @@ finalizeState_Wait__14dLytDobutton_cFv = .text:0x8010D350; // type:function size
|
||||
initializeState_Out__14dLytDobutton_cFv = .text:0x8010D360; // type:function size:0x88
|
||||
executeState_Out__14dLytDobutton_cFv = .text:0x8010D3F0; // type:function size:0x8C
|
||||
finalizeState_Out__14dLytDobutton_cFv = .text:0x8010D480; // type:function size:0x4
|
||||
init__14dLytDobutton_cFPQ23m2d10ResAccIf_c = .text:0x8010D490; // type:function size:0x1D4
|
||||
build__14dLytDobutton_cFPQ23m2d10ResAccIf_c = .text:0x8010D490; // type:function size:0x1D4
|
||||
remove__14dLytDobutton_cFv = .text:0x8010D670; // type:function size:0x50
|
||||
execute__14dLytDobutton_cFv = .text:0x8010D6C0; // type:function size:0x80C
|
||||
draw__14dLytDobutton_cFv = .text:0x8010DED0; // type:function size:0x28
|
||||
fn_8010DF00 = .text:0x8010DF00; // type:function size:0x4CC
|
||||
realize__14dLytDobutton_cFv = .text:0x8010DF00; // type:function size:0x4CC
|
||||
fn_8010E3D0 = .text:0x8010E3D0; // type:function size:0x1F0
|
||||
setActionTextStuffInternal__14dLytDobutton_cFllb = .text:0x8010E5C0; // type:function size:0x10
|
||||
fn_8010E5D0__14dLytDobutton_cCFv = .text:0x8010E5D0; // type:function size:0x8
|
||||
getActionInternal__14dLytDobutton_cCFv = .text:0x8010E5D0; // type:function size:0x8
|
||||
fn_8010E5E0__14dLytDobutton_cCFv = .text:0x8010E5E0; // type:function size:0x1C
|
||||
__sinit_\d_lyt_do_button_cpp = .text:0x8010E600; // type:function size:0x410 scope:local
|
||||
__dt__29sFStateID_c<14dLytDobutton_c>Fv = .text:0x8010EA10; // type:function size:0x58
|
||||
@@ -6543,8 +6543,8 @@ fn_8010EB30 = .text:0x8010EB30; // type:function size:0x40
|
||||
__ct__18LytDoButtonRelatedFv = .text:0x8010EB70; // type:function size:0x14
|
||||
build__18LytDoButtonRelatedFPQ23d2d10ResAccIf_c = .text:0x8010EB90; // type:function size:0x70
|
||||
remove__18LytDoButtonRelatedFv = .text:0x8010EC00; // type:function size:0x8
|
||||
fn_8010EC10__18LytDoButtonRelatedFQ218LytDoButtonRelated8Action_eb = .text:0x8010EC10; // type:function size:0x134
|
||||
fn_8010ED50__18LytDoButtonRelatedFQ218LytDoButtonRelated8Action_eb = .text:0x8010ED50; // type:function size:0x110
|
||||
fn_8010EC10__18LytDoButtonRelatedFQ218LytDoButtonRelated8Act_IE_eb = .text:0x8010EC10; // type:function size:0x134
|
||||
fn_8010ED50__18LytDoButtonRelatedFQ218LytDoButtonRelated8Act_IE_eb = .text:0x8010ED50; // type:function size:0x110
|
||||
convertDoButton__18LytDoButtonRelatedFl = .text:0x8010EE60; // type:function size:0xE8
|
||||
fn_8010EF50 = .text:0x8010EF50; // type:function size:0x3C
|
||||
build__16dLytCommonABtn_cFPQ23d2d10ResAccIf_c = .text:0x8010EF90; // type:function size:0xAC
|
||||
|
||||
+116
-10
@@ -3,10 +3,111 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_textbox.h"
|
||||
#include "nw4r/lyt/lyt_pane.h"
|
||||
#include "s/s_State.hpp"
|
||||
|
||||
class dLytDobutton_c {
|
||||
public:
|
||||
enum Act_Do_e {
|
||||
ACT_DO_CLIMB_UP = 0,
|
||||
ACT_DO_JUMP = 1,
|
||||
ACT_DO_DROP_DOWN = 2,
|
||||
ACT_DO_LET_GO = 3,
|
||||
ACT_DO_OPEN = 4,
|
||||
ACT_DO_PUT_DOWN = 5,
|
||||
ACT_DO_THROW = 6,
|
||||
ACT_DO_BURROW = 7,
|
||||
ACT_DO_ROLL = 8,
|
||||
ACT_DO_9 = 9,
|
||||
ACT_DO_MOVE = 10,
|
||||
ACT_DO_GRAB = 11,
|
||||
ACT_DO_SHOOT = 12,
|
||||
ACT_DO_13 = 13,
|
||||
ACT_DO_14 = 14,
|
||||
ACT_DO_15 = 15,
|
||||
ACT_DO_TALK = 16,
|
||||
ACT_DO_EXAMINE = 17,
|
||||
ACT_DO_DRAW = 18,
|
||||
ACT_DO_19 = 19,
|
||||
ACT_DO_BLOW = 20,
|
||||
ACT_DO_21 = 21,
|
||||
ACT_DO_22 = 22,
|
||||
ACT_DO_SWIM = 23,
|
||||
ACT_DO_LEAP = 24,
|
||||
ACT_DO_DASH = 25,
|
||||
ACT_DO_GET_OUT = 26,
|
||||
ACT_DO_27 = 27,
|
||||
ACT_DO_PICK_UP = 28,
|
||||
ACT_DO_SIT = 29,
|
||||
ACT_DO_STAND = 30,
|
||||
ACT_DO_DIG = 31,
|
||||
ACT_DO_32 = 32,
|
||||
ACT_DO_33 = 33,
|
||||
ACT_DO_BREAK_FREE = 34,
|
||||
ACT_DO_35 = 35,
|
||||
ACT_DO_36 = 36,
|
||||
ACT_DO_PLANT = 37,
|
||||
ACT_DO_CATCH = 38,
|
||||
ACT_DO_SPEED_UP = 39,
|
||||
ACT_DO_SAILCLOTH = 40,
|
||||
ACT_DO_PUT_AWAY = 41,
|
||||
ACT_DO_EMERGE = 42,
|
||||
ACT_DO_INSERT = 43,
|
||||
ACT_DO_44 = 44,
|
||||
ACT_DO_TURN = 45,
|
||||
ACT_DO_PUSH_IN = 46,
|
||||
ACT_DO_47 = 47,
|
||||
ACT_DO_DRAW_BOW = 48,
|
||||
ACT_DO_49 = 49,
|
||||
ACT_DO_50 = 50,
|
||||
ACT_DO_51 = 51,
|
||||
ACT_DO_SWING = 52,
|
||||
ACT_DO_BALANCE = 53,
|
||||
ACT_DO_JOSTLE = 54,
|
||||
ACT_DO_55 = 55,
|
||||
ACT_DO_SLEEP = 56,
|
||||
ACT_DO_DROP = 57,
|
||||
ACT_DO_LAUNCH = 58,
|
||||
ACT_DO_READ = 59,
|
||||
ACT_DO_WHIP = 60,
|
||||
ACT_DO_PULL = 61,
|
||||
ACT_DO_DRINK = 62,
|
||||
ACT_DO_63 = 63,
|
||||
ACT_DO_GET_IN = 64,
|
||||
ACT_DO_FIRE = 65,
|
||||
ACT_DO_ATTACK = 66,
|
||||
ACT_DO_FATAL_BLOW = 67,
|
||||
ACT_DO_JUMP_DOWN = 68,
|
||||
ACT_DO_STRUM = 69,
|
||||
ACT_DO_70 = 70,
|
||||
ACT_DO_RELEASE = 71,
|
||||
ACT_DO_GRAB_2 = 72,
|
||||
ACT_DO_READY_STANCE = 73,
|
||||
ACT_DO_REMOVE = 74,
|
||||
ACT_DO_READY_SWORD = 75,
|
||||
ACT_DO_THRUST_SWORD = 76,
|
||||
ACT_DO_USE = 77,
|
||||
ACT_DO_SCOOP = 78,
|
||||
ACT_DO_79 = 79,
|
||||
ACT_DO_80 = 80,
|
||||
ACT_DO_LOOK = 81,
|
||||
ACT_DO_DOWSE = 82,
|
||||
ACT_DO_PILOT = 83,
|
||||
ACT_DO_LOOK_DOWN = 84,
|
||||
ACT_DO_DIVE = 85,
|
||||
ACT_DO_SELECT = 86,
|
||||
ACT_DO_GRAB_3 = 87,
|
||||
ACT_DO_MOVE_2 = 88,
|
||||
ACT_DO_ACCELERATE = 89,
|
||||
ACT_DO_CHARGE = 90,
|
||||
ACT_DO_LEAN = 91,
|
||||
ACT_DO_PRESS = 92,
|
||||
|
||||
ACT_DO_NONE = 93,
|
||||
ACT_DO_INVALID = 94,
|
||||
};
|
||||
|
||||
dLytDobutton_c() : mStateMgr(*this, sStateID::null) {
|
||||
sInstance = this;
|
||||
}
|
||||
@@ -14,7 +115,7 @@ public:
|
||||
sInstance = nullptr;
|
||||
}
|
||||
|
||||
bool init(m2d::ResAccIf_c *resAcc);
|
||||
bool build(m2d::ResAccIf_c *resAcc);
|
||||
bool remove();
|
||||
bool execute();
|
||||
bool draw();
|
||||
@@ -27,7 +128,7 @@ public:
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->field_0x47C;
|
||||
} else {
|
||||
return 0x5E;
|
||||
return ACT_DO_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,24 +156,26 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static s32 getFn0x8010E5D0() {
|
||||
static s32 getAction() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->fn_8010E5D0();
|
||||
return sInstance->getActionInternal();
|
||||
} else {
|
||||
return 0x5E;
|
||||
return ACT_DO_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void setActionTextStuff(s32 p1, s32 p2, bool p3) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->setActionTextStuffInternal(p1, p2, p3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
void setActionTextStuffInternal(s32, s32, bool);
|
||||
s32 fn_8010E5D0() const;
|
||||
s32 getActionInternal() const;
|
||||
s32 fn_8010E5E0() const;
|
||||
void fn_8010E3D0(bool);
|
||||
void realize();
|
||||
|
||||
static dLytDobutton_c *sInstance;
|
||||
|
||||
@@ -87,7 +190,8 @@ private:
|
||||
UI_STATE_MGR_DECLARE(dLytDobutton_c);
|
||||
/* 0x040 */ d2d::dLytSub mLyt;
|
||||
/* 0x0D4 */ d2d::AnmGroup_c mAnmGroups[12];
|
||||
/* 0x3D4 */ u8 field_0x3D4[0x470 - 0x3D4];
|
||||
/* 0x3D4 */ nw4r::lyt::Pane *mpPanes[37];
|
||||
/* 0x468 */ dTextBox_c *mpTextBoxes[2];
|
||||
/* 0x470 */ s32 mDoActionToShow;
|
||||
/* 0x474 */ s32 field_0x474;
|
||||
/* 0x478 */ s32 field_0x478;
|
||||
@@ -96,7 +200,9 @@ private:
|
||||
/* 0x484 */ s32 mNextDoActionToShow;
|
||||
/* 0x488 */ s32 field_0x488;
|
||||
/* 0x48C */ s32 field_0x48C;
|
||||
/* 0x490 */ s32 field_0x490;
|
||||
/* 0x490 */ u8 field_0x490;
|
||||
/* 0x491 */ u8 field_0x491;
|
||||
/* 0x492 */ u8 field_0x492;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+157
-30
@@ -17,19 +17,156 @@ public:
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
enum Action_e {
|
||||
DO_DASH = 0x5F,
|
||||
enum Act_IE_e {
|
||||
ACT_IE_INFO_CLIMB_UP = 0,
|
||||
ACT_IE_INFO_JUMP = 1,
|
||||
ACT_IE_INFO_DROP_DOWN = 2,
|
||||
ACT_IE_INFO_LET_GO = 3,
|
||||
ACT_IE_INFO_OPEN = 4,
|
||||
ACT_IE_INFO_DROP = 5,
|
||||
ACT_IE_INFO_THROW = 6,
|
||||
ACT_IE_INFO_BURROW = 7,
|
||||
ACT_IE_INFO_ROLL = 8,
|
||||
ACT_IE_INFO_9 = 9,
|
||||
ACT_IE_INFO_MOVE = 10,
|
||||
ACT_IE_INFO_GRAB = 11,
|
||||
ACT_IE_INFO_SHOOT = 12,
|
||||
ACT_IE_INFO_13 = 13,
|
||||
ACT_IE_INFO_14 = 14,
|
||||
ACT_IE_INFO_15 = 15,
|
||||
ACT_IE_INFO_TALK = 16,
|
||||
ACT_IE_INFO_EXAMINE = 17,
|
||||
ACT_IE_INFO_DRAW = 18,
|
||||
ACT_IE_INFO_19 = 19,
|
||||
ACT_IE_INFO_BLOW = 20,
|
||||
ACT_IE_INFO_21 = 21,
|
||||
ACT_IE_INFO_22 = 22,
|
||||
ACT_IE_INFO_SWIM = 23,
|
||||
ACT_IE_INFO_LEAP = 24,
|
||||
ACT_IE_INFO_DASH = 25,
|
||||
ACT_IE_INFO_GET_OUT = 26,
|
||||
ACT_IE_INFO_27 = 27,
|
||||
ACT_IE_INFO_PICK_UP = 28,
|
||||
ACT_IE_INFO_SIT = 29,
|
||||
ACT_IE_INFO_STAND = 30,
|
||||
ACT_IE_INFO_DIG = 31,
|
||||
ACT_IE_INFO_32 = 32,
|
||||
ACT_IE_INFO_33 = 33,
|
||||
ACT_IE_INFO_BREAK_FREE = 34,
|
||||
ACT_IE_INFO_35 = 35,
|
||||
ACT_IE_INFO_36 = 36,
|
||||
ACT_IE_INFO_PLANT = 37,
|
||||
ACT_IE_INFO_CATCH = 38,
|
||||
ACT_IE_INFO_SPEED_UP = 39,
|
||||
ACT_IE_INFO_SAILCLOTH = 40,
|
||||
ACT_IE_INFO_PUT_AWAY = 41,
|
||||
ACT_IE_INFO_EMERGE = 42,
|
||||
ACT_IE_INFO_INSERT = 43,
|
||||
ACT_IE_INFO_44 = 44,
|
||||
ACT_IE_INFO_TURN = 45,
|
||||
ACT_IE_INFO_ALIGN = 46,
|
||||
ACT_IE_INFO_47 = 47,
|
||||
ACT_IE_INFO_DRAW_BOW = 48,
|
||||
ACT_IE_INFO_49 = 49,
|
||||
ACT_IE_INFO_50 = 50,
|
||||
ACT_IE_INFO_51 = 51,
|
||||
ACT_IE_INFO_SWING = 52,
|
||||
ACT_IE_INFO_BALANCE = 53,
|
||||
ACT_IE_INFO_JOSTLE = 54,
|
||||
ACT_IE_INFO_55 = 55,
|
||||
ACT_IE_INFO_SLEEP = 56,
|
||||
ACT_IE_INFO_DROP_2 = 57,
|
||||
ACT_IE_INFO_LAUNCH = 58,
|
||||
ACT_IE_INFO_READ = 59,
|
||||
ACT_IE_INFO_WHIP = 60,
|
||||
ACT_IE_INFO_PULL = 61,
|
||||
ACT_IE_INFO_DRINK = 62,
|
||||
ACT_IE_INFO_63 = 63,
|
||||
ACT_IE_INFO_GET_IN = 64,
|
||||
ACT_IE_INFO_FIRE = 65,
|
||||
ACT_IE_INFO_ATTACK = 66,
|
||||
ACT_IE_INFO_FATAL_BLOW = 67,
|
||||
ACT_IE_INFO_JUMP_DOWN = 68,
|
||||
ACT_IE_INFO_STRUM = 69,
|
||||
ACT_IE_INFO_70 = 70,
|
||||
ACT_IE_INFO_RELEASE = 71,
|
||||
ACT_IE_INFO_GRAB_2 = 72,
|
||||
ACT_IE_INFO_READY_STANCE = 73,
|
||||
ACT_IE_INFO_REMOVE = 74,
|
||||
ACT_IE_INFO_READY_SWORD = 75,
|
||||
ACT_IE_INFO_THRUST_SWORD = 76,
|
||||
ACT_IE_INFO_USE = 77,
|
||||
ACT_IE_INFO_SCOOP = 78,
|
||||
ACT_IE_INFO_79 = 79,
|
||||
ACT_IE_INFO_80 = 80,
|
||||
ACT_IE_INFO_LOOK = 81,
|
||||
ACT_IE_INFO_DOWSE = 82,
|
||||
ACT_IE_INFO_PILOT = 83,
|
||||
ACT_IE_INFO_LOOK_DOWN = 84,
|
||||
ACT_IE_INFO_DIVE = 85,
|
||||
ACT_IE_INFO_SELECT = 86,
|
||||
ACT_IE_INFO_GRAB_3 = 87,
|
||||
ACT_IE_INFO_MOVE_1 = 88,
|
||||
ACT_IE_INFO_ACCELERATE = 89,
|
||||
ACT_IE_INFO_CHARGE = 90,
|
||||
ACT_IE_INFO_LEAN = 91,
|
||||
ACT_IE_INFO_PRESS = 92,
|
||||
ACT_IE_SEPARATOR = 93,
|
||||
ACT_IE_ETC_LOCK_ON = 94,
|
||||
ACT_IE_ETC_DASH = 95,
|
||||
ACT_IE_ETC_RAISE_SHIELD = 96,
|
||||
ACT_IE_ETC_97 = 97,
|
||||
ACT_IE_ETC_SHIELD_BASH = 98,
|
||||
ACT_IE_ETC_99 = 99,
|
||||
ACT_IE_ETC_ROLL = 100,
|
||||
ACT_IE_ETC_DODGE = 101,
|
||||
ACT_IE_ETC_102 = 102,
|
||||
ACT_IE_ETC_VIEW_SURFACE = 103,
|
||||
ACT_IE_ETC_PUT_AWAY = 104,
|
||||
ACT_IE_ETC_105 = 105,
|
||||
ACT_IE_ETC_106 = 106,
|
||||
ACT_IE_ETC_CENTER = 107,
|
||||
ACT_IE_ETC_BACK = 108,
|
||||
ACT_IE_ETC_WORLD_MAP = 109,
|
||||
ACT_IE_ETC_ZOOM_OUT = 110,
|
||||
ACT_IE_ETC_ZOOM_IN = 111,
|
||||
ACT_IE_ETC_SCROLL = 112,
|
||||
ACT_IE_ETC_CURRENT_LOCATION = 113,
|
||||
ACT_IE_ETC_114 = 114,
|
||||
ACT_IE_ETC_115 = 115,
|
||||
ACT_IE_ETC_BACK_2 = 116,
|
||||
ACT_IE_ETC_ADD_BEACON = 117,
|
||||
ACT_IE_ETC_REMOVE_BEACON = 118,
|
||||
ACT_IE_ETC_ROTATE_MAP = 119,
|
||||
ACT_IE_ETC_ROTATE_MAP_2 = 120,
|
||||
ACT_IE_ETC_121 = 121,
|
||||
ACT_IE_ETC_122 = 122,
|
||||
ACT_IE_ETC_123 = 123,
|
||||
ACT_IE_ETC_124 = 124,
|
||||
ACT_IE_ETC_GET_OFF = 125,
|
||||
ACT_IE_ETC_STORE = 126,
|
||||
ACT_IE_ETC_RETURN = 127,
|
||||
ACT_IE_ETC_MOVE = 128,
|
||||
ACT_IE_ETC_VIEW_LOCK = 129,
|
||||
ACT_IE_ETC_RESET_POSITION = 130,
|
||||
ACT_IE_ETC_CANCEL = 131,
|
||||
ACT_IE_ETC_STOP = 132,
|
||||
ACT_IE_ETC_ITEMS = 133,
|
||||
ACT_IE_ETC_SPIN = 134,
|
||||
ACT_IE_ETC_DONE = 135,
|
||||
ACT_IE_ETC_RESET_PANELS = 136,
|
||||
ACT_IE_ETC_BACK_3 = 137,
|
||||
ACT_IE_ETC_SLOW_DOWN = 138,
|
||||
ACT_IE_ETC_DISPLAY = 139,
|
||||
ACT_IE_ETC_SELECT_FLOOR = 140,
|
||||
ACT_IE_ETC_SHOW_ISLAND_NAME = 141,
|
||||
ACT_IE_ETC_HIDE_ISLAND_NAME = 142,
|
||||
ACT_IE_ETC_READY_CANNON = 143,
|
||||
ACT_IE_ETC_STOW_CANNON = 144,
|
||||
ACT_IE_ETC_SAILCLOTH = 145,
|
||||
ACT_IE_ETC_RETURN_2 = 146,
|
||||
|
||||
DO_0x74 = 0x74,
|
||||
|
||||
DO_RETURN = 0x7F,
|
||||
DO_STOP = 0x84,
|
||||
DO_ITEMS = 0x85,
|
||||
DO_DONE = 0x87,
|
||||
DO_READY_CANNON = 0x8F,
|
||||
DO_STOW_CANNON = 0x90,
|
||||
DO_SAILCLOTH = 0x91,
|
||||
DO_NONE = 0x98,
|
||||
ACT_IE_NONE = 152,
|
||||
};
|
||||
|
||||
enum DoButton_e {
|
||||
@@ -49,7 +186,7 @@ public:
|
||||
DO_BUTTON_PLUS = 11,
|
||||
};
|
||||
|
||||
static void set(DoButton_e button, Action_e value) {
|
||||
static void set(DoButton_e button, Act_IE_e value) {
|
||||
if (sInstance != nullptr) {
|
||||
LytDoButtonRelated *b = sInstance;
|
||||
b->field_0x04[button] = value;
|
||||
@@ -57,7 +194,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static void reset(DoButton_e button, Action_e value) {
|
||||
static void reset(DoButton_e button, Act_IE_e value) {
|
||||
LytDoButtonRelated *b = sInstance;
|
||||
if (b != nullptr) {
|
||||
b->field_0x04[button] = value;
|
||||
@@ -65,11 +202,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static Action_e get(DoButton_e button) {
|
||||
static Act_IE_e get(DoButton_e button) {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->field_0x04[button];
|
||||
} else {
|
||||
return DO_NONE;
|
||||
return ACT_IE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,23 +219,14 @@ public:
|
||||
}
|
||||
|
||||
|
||||
static Action_e get0x08() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->field_0x04[1];
|
||||
} else {
|
||||
return DO_NONE;
|
||||
}
|
||||
}
|
||||
static Act_IE_e convertDoButton(s32);
|
||||
|
||||
static Action_e convertDoButton(s32);
|
||||
static void fn_8010EC10(Act_IE_e, bool);
|
||||
static void fn_8010ED50(Act_IE_e, bool);
|
||||
|
||||
static void fn_8010EC10(Action_e, bool);
|
||||
static void fn_8010ED50(Action_e, bool);
|
||||
|
||||
private:
|
||||
|
||||
static LytDoButtonRelated *sInstance;
|
||||
/* 0x04 */ Action_e field_0x04[12];
|
||||
/* 0x04 */ Act_IE_e field_0x04[12];
|
||||
/* 0x34 */ bool field_0x34[12];
|
||||
};
|
||||
|
||||
@@ -118,7 +246,6 @@ public:
|
||||
|
||||
static LytBirdButtonRelated *sInstance;
|
||||
|
||||
|
||||
private:
|
||||
d2d::LytBase_c mLyt;
|
||||
d2d::AnmGroup_c mAnmGroups[7];
|
||||
|
||||
+7
-2
@@ -6,6 +6,7 @@
|
||||
#include "nw4r/lyt/lyt_arcResourceAccessor.h"
|
||||
#include "nw4r/lyt/lyt_drawInfo.h"
|
||||
#include "nw4r/lyt/lyt_layout.h"
|
||||
|
||||
#include "nw4r/ut.h" // IWYU pragma: export
|
||||
|
||||
namespace m2d {
|
||||
@@ -183,9 +184,14 @@ public:
|
||||
mPriority = p;
|
||||
}
|
||||
|
||||
/* 0x0C */ u8 mPriority;
|
||||
u8 getPriority() const {
|
||||
return mPriority;
|
||||
}
|
||||
|
||||
void addToDrawList();
|
||||
|
||||
protected:
|
||||
/* 0x0C */ u8 mPriority;
|
||||
};
|
||||
|
||||
class Simple_c : public Base_c {
|
||||
@@ -218,7 +224,6 @@ private:
|
||||
u32 field_0x94;
|
||||
};
|
||||
|
||||
|
||||
void getAllocator();
|
||||
|
||||
} // namespace m2d
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"";
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user