mirror of
https://github.com/zeldaret/ss
synced 2026-07-09 14:15:23 -04:00
Merge pull request #166 from robojumper/lyt_do_button_cleanup
dLytDoButton_c OK
This commit is contained in:
@@ -340,6 +340,8 @@ public:
|
||||
static s32 getCurrentBugNetType();
|
||||
static s32 getCurrentlyEquippedShieldType();
|
||||
|
||||
static bool isInBambooCuttingMinigame();
|
||||
|
||||
static bool isItemRestrictedByBokoBase(ITEM_ID item);
|
||||
|
||||
static u32 getCurrentHealthCapacity();
|
||||
|
||||
@@ -230,6 +230,10 @@ struct AnmGroupBase_c {
|
||||
mpFrameCtrl->setRate(rate);
|
||||
}
|
||||
|
||||
inline f32 getRate() const {
|
||||
return mpFrameCtrl->getRate();
|
||||
}
|
||||
|
||||
inline bool isEnabled() const {
|
||||
return (mFlags & ANMGROUP_FLAG_ENABLE) != 0;
|
||||
}
|
||||
|
||||
+186
-21
@@ -3,10 +3,164 @@
|
||||
|
||||
#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:
|
||||
// TODO: figure out that these mean. The two pane arrays in d_lyt_do_button.cpp might help
|
||||
enum Icon_e {
|
||||
ICON_0 = 0,
|
||||
ICON_1 = 1,
|
||||
ICON_2 = 2,
|
||||
ICON_3 = 3,
|
||||
ICON_4 = 4,
|
||||
ICON_5 = 5,
|
||||
ICON_6 = 6,
|
||||
ICON_7 = 7,
|
||||
ICON_8 = 8,
|
||||
ICON_9 = 9,
|
||||
ICON_10 = 10,
|
||||
ICON_11 = 11,
|
||||
ICON_12 = 12,
|
||||
ICON_13 = 13,
|
||||
ICON_14 = 14,
|
||||
ICON_15 = 15,
|
||||
ICON_16 = 16,
|
||||
ICON_17 = 17,
|
||||
ICON_18 = 18,
|
||||
ICON_19 = 19,
|
||||
ICON_20 = 20,
|
||||
ICON_21 = 21,
|
||||
ICON_22 = 22,
|
||||
ICON_23 = 23,
|
||||
ICON_24 = 24,
|
||||
ICON_25 = 25,
|
||||
ICON_26 = 26,
|
||||
ICON_27 = 27,
|
||||
ICON_28 = 28,
|
||||
ICON_29 = 29,
|
||||
ICON_30 = 30,
|
||||
ICON_31 = 31,
|
||||
ICON_32 = 32,
|
||||
ICON_33 = 33,
|
||||
ICON_34 = 34,
|
||||
ICON_35 = 35,
|
||||
ICON_36 = 36,
|
||||
ICON_37 = 37,
|
||||
ICON_38 = 38,
|
||||
ICON_39 = 39,
|
||||
ICON_40 = 40,
|
||||
|
||||
ICON_NONE = 41,
|
||||
};
|
||||
|
||||
// 001-Action.msbt - Enum for ACT_DO
|
||||
// This is actually just the first part of ACT_INFO, but
|
||||
// LytDoButtonRelated has a full conversion table
|
||||
// from Act_IE_e -> Act_Do_e
|
||||
|
||||
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,
|
||||
|
||||
// why two of them?
|
||||
ACT_DO_NONE = 93,
|
||||
ACT_DO_INVALID = 94,
|
||||
};
|
||||
|
||||
dLytDobutton_c() : mStateMgr(*this, sStateID::null) {
|
||||
sInstance = this;
|
||||
}
|
||||
@@ -14,7 +168,7 @@ public:
|
||||
sInstance = nullptr;
|
||||
}
|
||||
|
||||
bool init(m2d::ResAccIf_c *resAcc);
|
||||
bool build(m2d::ResAccIf_c *resAcc);
|
||||
bool remove();
|
||||
bool execute();
|
||||
bool draw();
|
||||
@@ -23,11 +177,11 @@ public:
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
static s32 getField0x47C() {
|
||||
static Act_Do_e getField0x47C() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->field_0x47C;
|
||||
} else {
|
||||
return 0x5E;
|
||||
return ACT_DO_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,15 +189,16 @@ public:
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->field_0x480;
|
||||
} else {
|
||||
return 0x29;
|
||||
return ICON_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
static s32 getNextActionToShow() {
|
||||
static Act_Do_e getNextActionToShow() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->mNextDoActionToShow;
|
||||
} else {
|
||||
return 0x29;
|
||||
// @bug (?) should this be ACT_DO_INVALID?
|
||||
return (Act_Do_e)ICON_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,28 +206,35 @@ public:
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->fn_8010E5E0();
|
||||
} else {
|
||||
return 0x29;
|
||||
return ICON_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
static s32 getFn0x8010E5D0() {
|
||||
static Act_Do_e 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) {
|
||||
|
||||
static void setActionTextStuff(s32 p1, Act_Do_e p2, bool p3) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->setActionTextStuffInternal(p1, p2, p3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
void setActionTextStuffInternal(s32, s32, bool);
|
||||
s32 fn_8010E5D0() const;
|
||||
void setActionTextStuffInternal(s32, Act_Do_e, bool);
|
||||
Act_Do_e getActionInternal() const;
|
||||
s32 fn_8010E5E0() const;
|
||||
void fn_8010E3D0(bool);
|
||||
void realize();
|
||||
|
||||
void set_0x47C_0x480(Act_Do_e v1, s32 v2) {
|
||||
field_0x47C = v1;
|
||||
field_0x480 = v2;
|
||||
}
|
||||
|
||||
static dLytDobutton_c *sInstance;
|
||||
|
||||
@@ -84,19 +246,22 @@ private:
|
||||
|
||||
STATE_MGR_DEFINE_UTIL_CHANGESTATE(dLytDobutton_c);
|
||||
|
||||
UI_STATE_MGR_DECLARE(dLytDobutton_c);
|
||||
/* 0x000 */ UI_STATE_MGR_DECLARE(dLytDobutton_c);
|
||||
/* 0x040 */ d2d::dLytSub mLyt;
|
||||
/* 0x0D4 */ d2d::AnmGroup_c mAnmGroups[12];
|
||||
/* 0x3D4 */ u8 field_0x3D4[0x470 - 0x3D4];
|
||||
/* 0x470 */ s32 mDoActionToShow;
|
||||
/* 0x3D4 */ nw4r::lyt::Pane *mpPanes[37];
|
||||
/* 0x468 */ dTextBox_c *mpTextBoxes[2];
|
||||
/* 0x470 */ Act_Do_e mDoActionToShow;
|
||||
/* 0x474 */ s32 field_0x474;
|
||||
/* 0x478 */ s32 field_0x478;
|
||||
/* 0x47C */ s32 field_0x47C;
|
||||
/* 0x47C */ Act_Do_e field_0x47C;
|
||||
/* 0x480 */ s32 field_0x480;
|
||||
/* 0x484 */ s32 mNextDoActionToShow;
|
||||
/* 0x484 */ Act_Do_e mNextDoActionToShow;
|
||||
/* 0x488 */ s32 field_0x488;
|
||||
/* 0x48C */ s32 field_0x48C;
|
||||
/* 0x490 */ s32 field_0x490;
|
||||
/* 0x490 */ u8 field_0x490;
|
||||
/* 0x491 */ u8 field_0x491;
|
||||
/* 0x492 */ bool mSavedIsInEvent;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#ifndef D_LYT_TARGET_BIRD_H
|
||||
#define D_LYT_TARGET_BIRD_H
|
||||
|
||||
#include "d/lyt/d2d.h"
|
||||
|
||||
// size 0x27C
|
||||
class dLytTargetBird_c {
|
||||
public:
|
||||
dLytTargetBird_c() {
|
||||
sInstance = this;
|
||||
}
|
||||
~dLytTargetBird_c() {
|
||||
sInstance = nullptr;
|
||||
}
|
||||
bool build(d2d::ResAccIf_c *resAcc);
|
||||
bool remove();
|
||||
bool execute();
|
||||
bool draw();
|
||||
|
||||
static dLytTargetBird_c *sInstance;
|
||||
|
||||
private:
|
||||
d2d::LytBase_c mLyt;
|
||||
d2d::AnmGroup_c mAnmGroups[7];
|
||||
/* 0x250 */ u8 field_0x250[0x27C - 0x250];
|
||||
};
|
||||
|
||||
#endif
|
||||
+164
-51
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "common.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_lyt_do_button.h"
|
||||
|
||||
class LytDoButtonRelated {
|
||||
public:
|
||||
@@ -17,19 +18,163 @@ public:
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
enum Action_e {
|
||||
DO_DASH = 0x5F,
|
||||
// 001-Action.msbt - Unified enum for ACT_INFO and ACT_ETC
|
||||
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,
|
||||
ACT_IE_147 = 147,
|
||||
ACT_IE_148 = 148,
|
||||
ACT_IE_149 = 149,
|
||||
ACT_IE_150 = 150,
|
||||
ACT_IE_151 = 151,
|
||||
|
||||
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 +194,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 +202,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 +210,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,47 +227,15 @@ public:
|
||||
}
|
||||
|
||||
|
||||
static Action_e get0x08() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->field_0x04[1];
|
||||
} else {
|
||||
return DO_NONE;
|
||||
}
|
||||
}
|
||||
static Act_IE_e convertDoButton(dLytDobutton_c::Act_Do_e);
|
||||
|
||||
static Action_e convertDoButton(s32);
|
||||
static void setCrossTop(Act_IE_e, bool);
|
||||
static void setCrossDown(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];
|
||||
};
|
||||
|
||||
// size 0x27C
|
||||
class LytBirdButtonRelated {
|
||||
public:
|
||||
LytBirdButtonRelated() {
|
||||
sInstance = this;
|
||||
}
|
||||
~LytBirdButtonRelated() {
|
||||
sInstance = nullptr;
|
||||
}
|
||||
bool build(d2d::ResAccIf_c *resAcc);
|
||||
bool remove();
|
||||
bool execute();
|
||||
bool draw();
|
||||
|
||||
static LytBirdButtonRelated *sInstance;
|
||||
|
||||
|
||||
private:
|
||||
d2d::LytBase_c mLyt;
|
||||
d2d::AnmGroup_c mAnmGroups[7];
|
||||
/* 0x250 */ u8 field_0x250[0x27C - 0x250];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "d/lyt/meter/d_lyt_meter_item_select.h"
|
||||
#include "d/lyt/meter/d_lyt_meter_parts.h"
|
||||
#include "d/lyt/d_lyt_unknowns.h"
|
||||
#include "d/lyt/d_lyt_target_bird.h"
|
||||
|
||||
#include "m/m_vec.h"
|
||||
// clang-format on
|
||||
@@ -59,7 +60,6 @@ enum MeterFlag_e {
|
||||
METER_BTN_Z = 0x800,
|
||||
METER_BTN_0x1000 = 0x1000,
|
||||
|
||||
|
||||
METER_BTN_CROSS = METER_BTN_CROSS_UP | METER_BTN_CROSS_DOWN | METER_BTN_CROSS_LEFT | METER_BTN_CROSS_RIGHT,
|
||||
};
|
||||
|
||||
@@ -67,6 +67,11 @@ class dLytMeterMain_c {
|
||||
friend class dLytMeter_c;
|
||||
|
||||
public:
|
||||
enum BasicPosition_e {
|
||||
POSITION_NORMAL = 0,
|
||||
POSITION_MAP = 1,
|
||||
};
|
||||
|
||||
dLytMeterMain_c();
|
||||
virtual ~dLytMeterMain_c() {}
|
||||
|
||||
@@ -168,8 +173,8 @@ private:
|
||||
/* 0x136DC */ mVec3_c mRupyPositions[7];
|
||||
/* 0x13730 */ mVec3_c mShieldPos;
|
||||
/* 0x1373C */ mVec3_c mRupyPos;
|
||||
/* 0x13748 */ s32 field_0x13748;
|
||||
/* 0x1374C */ s32 field_0x1374C;
|
||||
/* 0x13748 */ s32 mBasicPosition;
|
||||
/* 0x1374C */ s32 mSavedBasicPosition;
|
||||
/* 0x13750 */ s32 field_0x13750;
|
||||
/* 0x13754 */ s32 field_0x13754;
|
||||
/* 0x13758 */ s32 mShieldPosIndex;
|
||||
@@ -263,6 +268,14 @@ public:
|
||||
return mMain.field_0x13770;
|
||||
}
|
||||
|
||||
bool getMeterField_0x13773() const {
|
||||
return mMain.field_0x13773;
|
||||
}
|
||||
|
||||
void setMeterField_0x13773(bool value) {
|
||||
mMain.field_0x13773 = value;
|
||||
}
|
||||
|
||||
bool getMeterField_0x13774() const {
|
||||
return mMain.field_0x13774;
|
||||
}
|
||||
@@ -291,11 +304,23 @@ public:
|
||||
mFlags = 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
static s32 getCrossBtn0x7BF8() {
|
||||
static dLytMeterCrossBtn_c::CrossIcon_e getCrossIconDown() {
|
||||
if (sInstance != nullptr) {
|
||||
return sInstance->mMain.mCrossBtn.getField_0x620();
|
||||
return sInstance->mMain.mCrossBtn.getIconDown();
|
||||
} else {
|
||||
return 6;
|
||||
return dLytMeterCrossBtn_c::CROSS_ICON_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
static void setCrossIconDown(dLytMeterCrossBtn_c::CrossIcon_e icon) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->mMain.mCrossBtn.setIconDown(icon);
|
||||
}
|
||||
}
|
||||
|
||||
static void setCrossIconTop(dLytMeterCrossBtn_c::CrossIcon_e icon) {
|
||||
if (sInstance != nullptr) {
|
||||
sInstance->mMain.mCrossBtn.setIconTop(icon);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,13 +462,21 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
dLytMeterMain_c::BasicPosition_e getBasicPosition() const {
|
||||
return (dLytMeterMain_c::BasicPosition_e)mMain.mBasicPosition;
|
||||
}
|
||||
|
||||
void setBasicPosition(dLytMeterMain_c::BasicPosition_e pos) {
|
||||
mMain.mBasicPosition = pos;
|
||||
}
|
||||
|
||||
private:
|
||||
/* 0x00004 */ d2d::ResAccIf_c mResAcc;
|
||||
/* 0x00374 */ dLytMeterEventSkip_c *mpEventSkip;
|
||||
/* 0x00378 */ dLytMeterMain_c mMain;
|
||||
/* 0x13B3C */ dLytDobutton_c *mpDoButton;
|
||||
/* 0x13B40 */ LytDoButtonRelated *mpDoButtonRelated;
|
||||
/* 0x13B44 */ LytBirdButtonRelated *mpBirdRelated;
|
||||
/* 0x13B44 */ dLytTargetBird_c *mpTargetBird;
|
||||
/* 0x13B48 */ bool mVisible;
|
||||
/* 0x13B49 */ u8 _0x13B49[0x13B50 - 0x13B49];
|
||||
/* 0x13B50 */ s32 mFlags;
|
||||
|
||||
@@ -41,18 +41,30 @@ private:
|
||||
/* 0x54 */ dTextBox_c *mpSizeBox;
|
||||
/* 0x58 */ nw4r::lyt::Pane *mpOwnerPane;
|
||||
/* 0x5C */ s32 mIndex;
|
||||
/* 0x60 */ s32 field_0x60;
|
||||
/* 0x64 */ s32 field_0x64;
|
||||
/* 0x60 */ s32 mSavedMessage;
|
||||
/* 0x64 */ s32 mMessage;
|
||||
/* 0x68 */ s32 field_0x68;
|
||||
/* 0x6C */ s32 field_0x6C;
|
||||
/* 0x70 */ s32 field_0x70;
|
||||
/* 0x74 */ s32 field_0x74;
|
||||
/* 0x70 */ s32 mSavedIcon;
|
||||
/* 0x74 */ s32 mCurrentIcon;
|
||||
/* 0x78 */ s32 mOnDelay;
|
||||
/* 0x7C */ u8 field_0x7C;
|
||||
};
|
||||
|
||||
class dLytMeterCrossBtn_c : public d2d::dSubPane {
|
||||
public:
|
||||
enum CrossIcon_e {
|
||||
CROSS_ICON_TOP_1 = 1,
|
||||
CROSS_ICON_TOP_3 = 3,
|
||||
CROSS_ICON_TOP_4 = 4,
|
||||
|
||||
CROSS_ICON_DOWN_0 = 0,
|
||||
CROSS_ICON_DOWN_2 = 2,
|
||||
CROSS_ICON_DOWN_5 = 5,
|
||||
|
||||
CROSS_ICON_NONE = 6,
|
||||
};
|
||||
|
||||
dLytMeterCrossBtn_c() : mStateMgr(*this, sStateID::null) {}
|
||||
virtual bool build(d2d::ResAccIf_c *resAcc) override;
|
||||
virtual bool remove() override;
|
||||
@@ -69,8 +81,16 @@ public:
|
||||
|
||||
virtual ~dLytMeterCrossBtn_c() {}
|
||||
|
||||
s32 getField_0x620() const {
|
||||
return field_0x620;
|
||||
CrossIcon_e getIconDown() const {
|
||||
return mIconDown;
|
||||
}
|
||||
|
||||
void setIconDown(CrossIcon_e icon) {
|
||||
mIconDown = icon;
|
||||
}
|
||||
|
||||
void setIconTop(CrossIcon_e icon) {
|
||||
mIconTop = icon;
|
||||
}
|
||||
|
||||
void setOwnerPane(nw4r::lyt::Pane *pane);
|
||||
@@ -93,8 +113,8 @@ private:
|
||||
/* 0x400 */ dWindow_c *mpWindows[4];
|
||||
/* 0x410 */ dTextBox_c *mpSizeBoxes[4];
|
||||
/* 0x420 */ dLytMeterCrossBtnParts_c mParts[4];
|
||||
/* 0x620 */ s32 field_0x620;
|
||||
/* 0x624 */ s32 field_0x624;
|
||||
/* 0x620 */ CrossIcon_e mIconDown;
|
||||
/* 0x624 */ CrossIcon_e mIconTop;
|
||||
/* 0x628 */ u16 mSavedFiFlow;
|
||||
/* 0x62C */ s32 mCallCount0;
|
||||
/* 0x630 */ s32 mCallCount1;
|
||||
|
||||
@@ -25,6 +25,34 @@ struct dLytMsgWindowCharData;
|
||||
|
||||
class dLytMsgWindow_c {
|
||||
public:
|
||||
enum MsgWindow_e {
|
||||
MSG_WINDOW_0 = 0,
|
||||
MSG_WINDOW_1 = 1,
|
||||
|
||||
MSG_WINDOW_SWORD_FI = 2,
|
||||
MSG_WINDOW_SWORD_GHIRAHIM = 3,
|
||||
MSG_WINDOW_SWORD_LASTBOSS = 4,
|
||||
MSG_WINDOW_GET = 5,
|
||||
MSG_WINDOW_WOOD = 6,
|
||||
MSG_WINDOW_STONE = 7,
|
||||
|
||||
MSG_WINDOW_8 = 8,
|
||||
|
||||
MSG_WINDOW_LINK = 9,
|
||||
|
||||
MSG_WINDOW_10 = 10,
|
||||
|
||||
MSG_WINDOW_22 = 22,
|
||||
|
||||
MSG_WINDOW_DEMO = 30,
|
||||
MSG_WINDOW_31 = 31,
|
||||
|
||||
MSG_WINDOW_34 = 34,
|
||||
|
||||
// Maybe none
|
||||
MSG_WINDOW_36 = 36,
|
||||
};
|
||||
|
||||
dLytMsgWindow_c() : mStateMgr(*this) {}
|
||||
virtual ~dLytMsgWindow_c() {}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
return *mStateMgr.getStateID() == StateID_Wait;
|
||||
}
|
||||
|
||||
private:
|
||||
protected:
|
||||
s32 fn_8011FE50();
|
||||
|
||||
STATE_FUNC_DECLARE(dLytMsgWindowSelectBtn_c, Wait);
|
||||
|
||||
+11
-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 {
|
||||
@@ -60,6 +61,10 @@ public:
|
||||
return mCurrFrame;
|
||||
}
|
||||
|
||||
inline f32 getRate() const {
|
||||
return mRate;
|
||||
}
|
||||
|
||||
inline void setCurrFrame(f32 arg) {
|
||||
mCurrFrame = arg;
|
||||
}
|
||||
@@ -183,9 +188,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 +228,6 @@ private:
|
||||
u32 field_0x94;
|
||||
};
|
||||
|
||||
|
||||
void getAllocator();
|
||||
|
||||
} // namespace m2d
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#ifndef MISC_ACTOR_H
|
||||
#define MISC_ACTOR_H
|
||||
|
||||
bool checkIsInSkykeepPuzzle();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user