mirror of
https://github.com/zeldaret/ss
synced 2026-09-07 03:00:21 -04:00
More deposit
This commit is contained in:
@@ -26,6 +26,9 @@ public:
|
||||
void setVisible(bool val) {
|
||||
mVisible = val;
|
||||
}
|
||||
bool isVisible() const {
|
||||
return mVisible;
|
||||
}
|
||||
void setDrawDirectly(bool val) {
|
||||
mDrawDirectly = val;
|
||||
}
|
||||
@@ -52,6 +55,14 @@ public:
|
||||
mCursorStick.setShouldBeOn(visible);
|
||||
}
|
||||
|
||||
void setCursorStickPriority(u8 priority) {
|
||||
mCursorStick.setPriority(priority);
|
||||
}
|
||||
|
||||
void setCursorStickPriority2(u8 priority) {
|
||||
mCursorStick.setPriority2(priority);
|
||||
}
|
||||
|
||||
bool isCursorStickVisible() const {
|
||||
return mCursorStick.getShouldBeOn();
|
||||
}
|
||||
|
||||
@@ -19,6 +19,10 @@ bool isItemShield(s32 item);
|
||||
u8 adventurePouchFindItemSlot(ITEM_ID item);
|
||||
u32 adventurePouchCountItem(ITEM_ID itemId);
|
||||
|
||||
bool swapAdventurePouchItems(s32 slot1, s32 slot2);
|
||||
bool swapStockAndPouchItems(s32 pouchSlot, s32 stockSlot);
|
||||
bool swapStockItems(s32 slot1, s32 slot2);
|
||||
|
||||
#define ITEM_CHECK_SLOT_NONE 60
|
||||
|
||||
u16 itemCheckFindItemSlot(ITEM_ID item);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// vtable order
|
||||
#include "d/d_cursor_hit_check.h"
|
||||
// clang-format on
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/lyt/lyt_bounding.h"
|
||||
#include "s/s_State.hpp"
|
||||
|
||||
@@ -59,9 +60,9 @@ public:
|
||||
mBackwards = b;
|
||||
}
|
||||
bool fn_80168760();
|
||||
void setTranslate(const mVec2_c *);
|
||||
|
||||
private:
|
||||
void setTranslate(const Vec *);
|
||||
void displayElement(s32, f32);
|
||||
void unbindAt(s32);
|
||||
void tickDown(d2d::AnmGroup_c *);
|
||||
|
||||
@@ -23,6 +23,9 @@ public:
|
||||
static bool drawDirectly();
|
||||
|
||||
void setPriority(u8 priority);
|
||||
void setPriority2(u8 priority) {
|
||||
mLyt.setPriority(priority);
|
||||
}
|
||||
void setTargetPane(const nw4r::lyt::Pane *pane);
|
||||
|
||||
void setShouldBeOn(bool value) {
|
||||
|
||||
@@ -23,18 +23,71 @@ public:
|
||||
}
|
||||
|
||||
bool build(d2d::ResAccIf_c *resAcc);
|
||||
bool execute();
|
||||
bool draw();
|
||||
bool remove();
|
||||
|
||||
void setModeNone();
|
||||
void setModeIn();
|
||||
void setModeCheck();
|
||||
void setModeChange(bool unk);
|
||||
void setModeArrangement();
|
||||
|
||||
bool isSellableItem() const {
|
||||
return field_0x19524 && mItemSellValue > 0;
|
||||
}
|
||||
|
||||
s32 getArrowDirection() const {
|
||||
return mStock[STOCK_ACTIVE].getArrowDirection();
|
||||
}
|
||||
|
||||
void setField_0x1952C(bool b) {
|
||||
field_0x1952C = b;
|
||||
}
|
||||
|
||||
s32 getStateStep() const {
|
||||
return mStateStep;
|
||||
}
|
||||
|
||||
bool isIdle() const {
|
||||
return mIsIdle;
|
||||
}
|
||||
|
||||
private:
|
||||
static const s32 NUM_STOCKS = 3;
|
||||
static const s32 STOCK_ACTIVE = 0;
|
||||
|
||||
static const s32 RING_NUM_ITEMS = 8;
|
||||
|
||||
static const s32 SLOT_STOCK_OFFSET = 8;
|
||||
|
||||
static const s32 NUM_ICONS_PER_PAGE = 12;
|
||||
static const s32 NUM_PAGES = 5;
|
||||
|
||||
void setPouchItemsVisible(bool visible);
|
||||
void fn_802AA7E0();
|
||||
void fn_802AD370();
|
||||
void fn_802A9E80();
|
||||
|
||||
void fn_802AAFC0();
|
||||
void fn_802AB210();
|
||||
void fn_802ACAF0();
|
||||
void checkForItemPickupOrDrop();
|
||||
void fn_802ABB60();
|
||||
|
||||
void fn_802AB080();
|
||||
void fn_802AC3C0();
|
||||
void fn_802AD4C0();
|
||||
void loadItemText(s32 itemId, s32 where);
|
||||
void fn_802AC670();
|
||||
void fn_802AC290(s32);
|
||||
void fn_802AD460();
|
||||
void loadItems(s32 hiddenSlot);
|
||||
s32 getItemSellValueFrame(s32 value);
|
||||
void fn_802AC0E0(s32);
|
||||
void fn_802AAEC0(s32);
|
||||
void fn_8018ADA0(s32);
|
||||
void fn_802AAB30();
|
||||
void fn_802AD400();
|
||||
|
||||
STATE_FUNC_DECLARE(dLytDepositMain_c, ModeNone);
|
||||
STATE_FUNC_DECLARE(dLytDepositMain_c, ModeIn);
|
||||
STATE_FUNC_DECLARE(dLytDepositMain_c, ModeCheck);
|
||||
@@ -65,15 +118,15 @@ private:
|
||||
|
||||
u8 _0x00002[0x8];
|
||||
|
||||
/* 0x00A7C */ dLytDepositStock_c mStock[3];
|
||||
/* 0x00A7C */ dLytDepositStock_c mStock[NUM_STOCKS];
|
||||
/* 0x143F0 */ dLytDepositBoxCursor_c mCursor;
|
||||
/* 0x14D48 */ dLytCommonIconItem_c mPouchItems[8];
|
||||
/* 0x14D48 */ dLytCommonIconItem_c mPouchItems[RING_NUM_ITEMS];
|
||||
/* 0x18D88 */ dLytCommonArrow_c mArrow;
|
||||
/* 0x19458 */ d2d::SubPaneList mSubpaneList1;
|
||||
/* 0x19464 */ d2d::SubPaneListNode mNodes1[3];
|
||||
/* 0x19494 */ d2d::SubPaneList mSubpaneList2;
|
||||
/* 0x194A0 */ d2d::SubPaneListNode mNodes2[8];
|
||||
/* 0x19520 */ bool field_0x19520;
|
||||
/* 0x19458 */ d2d::SubPaneList mStockList;
|
||||
/* 0x19464 */ d2d::SubPaneListNode mStockNodes[NUM_STOCKS];
|
||||
/* 0x19494 */ d2d::SubPaneList mRingList;
|
||||
/* 0x194A0 */ d2d::SubPaneListNode mRingNodes[RING_NUM_ITEMS];
|
||||
/* 0x19520 */ bool mIsIdle;
|
||||
/* 0x19521 */ bool field_0x19521;
|
||||
/* 0x19522 */ bool field_0x19522;
|
||||
/* 0x19523 */ bool field_0x19523;
|
||||
@@ -82,32 +135,44 @@ private:
|
||||
/* 0x19526 */ bool field_0x19526;
|
||||
/* 0x19527 */ bool field_0x19527;
|
||||
/* 0x19528 */ bool field_0x19528;
|
||||
/* 0x19529 */ bool field_0x19529;
|
||||
/* 0x19529 */ bool mHasScrolledOtherStocks;
|
||||
/* 0x1952A */ bool field_0x1952A;
|
||||
/* 0x1952B */ bool field_0x1952B;
|
||||
/* 0x1952C */ bool field_0x1952C;
|
||||
/* 0x19530 */ UNKWORD field_0x19530;
|
||||
/* 0x19534 */ UNKWORD field_0x19534;
|
||||
/* 0x19538 */ UNKWORD field_0x19538;
|
||||
/* 0x1953C */ UNKWORD field_0x1953C;
|
||||
/* 0x19530 */ s32 mCurrentPouchNavTarget;
|
||||
/* 0x19534 */ s32 mCurrentlyHoldingItemSlot;
|
||||
/* 0x19538 */ s32 mStateStep;
|
||||
/* 0x1953C */ s32 mCursorLocation;
|
||||
/* 0x19540 */ UNKWORD field_0x19540;
|
||||
/* 0x19544 */ UNKWORD field_0x19544;
|
||||
/* 0x19544 */ s32 mItemSellValue;
|
||||
/* 0x19548 */ UNKWORD field_0x19548;
|
||||
/* 0x1954C */ UNKWORD field_0x1954C;
|
||||
/* 0x19550 */ UNKWORD field_0x19550;
|
||||
/* 0x19554 */ UNKWORD field_0x19554;
|
||||
/* 0x19558 */ u8 mPouchItemIds[8];
|
||||
/* 0x19558 */ u8 mPouchItemIds[RING_NUM_ITEMS];
|
||||
};
|
||||
|
||||
class dLytDeposit_c : public dLytBase_c {
|
||||
public:
|
||||
dLytDeposit_c() : mStateMgr(*this) {}
|
||||
virtual ~dLytDeposit_c() {
|
||||
removeLyt();
|
||||
}
|
||||
|
||||
static dLytDeposit_c *GetInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
virtual bool build() override;
|
||||
virtual int create() override;
|
||||
virtual int execute() override;
|
||||
virtual int draw() override;
|
||||
virtual int doDelete() override;
|
||||
|
||||
private:
|
||||
bool checkForNavRight();
|
||||
bool checkForNavLeft();
|
||||
|
||||
static dLytDeposit_c *sInstance;
|
||||
|
||||
STATE_FUNC_DECLARE(dLytDeposit_c, None);
|
||||
@@ -124,6 +189,9 @@ private:
|
||||
/* 0x08C */ UI_STATE_MGR_DECLARE(dLytDeposit_c);
|
||||
/* 0x0C8 */ d2d::ResAccIf_c mResAcc;
|
||||
/* 0x438 */ dLytDepositMain_c mMain;
|
||||
/* 0x19998 */ bool field_0x19998;
|
||||
/* 0x19999 */ bool field_0x19999;
|
||||
/* 0x1999A */ bool field_0x1999A;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,7 @@ class dLytDepositBoxCursor_c : public d2d::dSubPane {
|
||||
public:
|
||||
enum ItemLocation_e {
|
||||
LOC_POUCH,
|
||||
LOC_DEPOSIT,
|
||||
LOC_STOCK,
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -36,6 +36,14 @@ public:
|
||||
void updateSlot(s32 location, s32 slot, s32 unk, bool unk2);
|
||||
void fn_801580A0();
|
||||
|
||||
bool isVisible() const {
|
||||
return mIsVisible;
|
||||
}
|
||||
|
||||
void setVisible(bool b) {
|
||||
mIsVisible = b;
|
||||
}
|
||||
|
||||
private:
|
||||
void initIcon();
|
||||
void realizeNav();
|
||||
|
||||
@@ -67,7 +67,67 @@ public:
|
||||
return mCurrentNavTarget;
|
||||
}
|
||||
|
||||
private:
|
||||
bool isModeSort() const {
|
||||
return mIsModeSort;
|
||||
}
|
||||
|
||||
bool isModePouch() const {
|
||||
return mIsModePouch;
|
||||
}
|
||||
|
||||
bool isModeSell() const {
|
||||
return mIsModeSell;
|
||||
}
|
||||
|
||||
void disableModeSort() {
|
||||
mIsModeSort = false;
|
||||
}
|
||||
|
||||
void disableModePouch() {
|
||||
mIsModePouch = false;
|
||||
}
|
||||
|
||||
void disableModeSell() {
|
||||
mIsModeSell = false;
|
||||
}
|
||||
|
||||
void returnToNormalMode() {
|
||||
mIsModeFinish = false;
|
||||
mIsModeSell = false;
|
||||
mIsModeSort = false;
|
||||
mIsModePouch = false;
|
||||
mSavedArrowDirection = ARROW_NONE;
|
||||
}
|
||||
|
||||
u8 getItem(s32 idx) const {
|
||||
return mItemIds[idx];
|
||||
}
|
||||
|
||||
u8 getPage() const {
|
||||
return mItemPage;
|
||||
}
|
||||
|
||||
void setPage(u8 page) {
|
||||
mItemPage = page;
|
||||
}
|
||||
|
||||
s32 getActiveItem() const {
|
||||
return mItemIds[mCurrentNavTarget];
|
||||
}
|
||||
|
||||
void setSellBlocked(bool v) {
|
||||
mIsSellBlocked = v;
|
||||
}
|
||||
|
||||
void setSortBlocked(bool v) {
|
||||
mIsSortBlocked = v;
|
||||
}
|
||||
|
||||
s32 getArrowDirection() const {
|
||||
return mArrowDirection;
|
||||
}
|
||||
|
||||
//private:
|
||||
static const s32 NUM_ICONS_PER_PAGE = 12;
|
||||
static const s32 NUM_PAGES = 5;
|
||||
|
||||
@@ -93,12 +153,12 @@ private:
|
||||
/* 0x6778 */ d2d::SubPaneList mSubpaneList;
|
||||
/* 0x6784 */ d2d::SubPaneListNode mNodes[NUM_ICONS_PER_PAGE];
|
||||
/* 0x6844 */ bool field_0x6844;
|
||||
/* 0x6845 */ bool field_0x6845;
|
||||
/* 0x6846 */ bool field_0x6846;
|
||||
/* 0x6847 */ bool field_0x6847;
|
||||
/* 0x6848 */ bool field_0x6848;
|
||||
/* 0x6849 */ bool field_0x6849;
|
||||
/* 0x684A */ bool field_0x684A;
|
||||
/* 0x6845 */ bool mIsModePouch;
|
||||
/* 0x6846 */ bool mIsModeSell;
|
||||
/* 0x6847 */ bool mIsModeSort;
|
||||
/* 0x6848 */ bool mIsModeFinish;
|
||||
/* 0x6849 */ bool mIsSellBlocked;
|
||||
/* 0x684A */ bool mIsSortBlocked;
|
||||
/* 0x684B */ bool field_0x684B;
|
||||
/* 0x684C */ bool field_0x684C;
|
||||
/* 0x684D */ bool field_0x684D;
|
||||
|
||||
@@ -18,6 +18,8 @@ enum SongLifeTreeSeedStatus_e {
|
||||
SONG_LIFETREE_HAS_SOTH = 2,
|
||||
};
|
||||
|
||||
s32 convertLytPouchSlot2(s32 fileSlot);
|
||||
|
||||
u8 getSongLifeTreeStatus();
|
||||
|
||||
/** 0: no sword, 6: TMS */
|
||||
|
||||
Reference in New Issue
Block a user