mirror of
https://github.com/zeldaret/tww.git
synced 2026-09-04 02:09:50 -04:00
d_shop matching
This commit is contained in:
@@ -216,7 +216,7 @@ struct J3DColorChanInfo {
|
||||
};
|
||||
|
||||
struct J3DZModeInfo {
|
||||
/* 0x0 */ u8 mCompareEnable;
|
||||
/* 0x0 */ u8 mCompareEnable __attribute__((aligned(4)));
|
||||
/* 0x1 */ u8 mFunc;
|
||||
/* 0x2 */ u8 mUpdateEnable;
|
||||
};
|
||||
|
||||
@@ -843,6 +843,10 @@ inline u8 dComIfGs_getReserveNum(int i_idx) {
|
||||
return g_dComIfG_gameInfo.save.getPlayer().getBagItemRecord().getReserveNum(i_idx);
|
||||
}
|
||||
|
||||
inline bool dComIfGs_checkReserveItemEmpty() {
|
||||
return g_dComIfG_gameInfo.save.getPlayer().getBagItem().checkReserveItemEmpty();
|
||||
}
|
||||
|
||||
inline void dComIfGs_setReserveItemEmpty() {
|
||||
g_dComIfG_gameInfo.save.getPlayer().getBagItem().setReserveItemEmpty();
|
||||
}
|
||||
@@ -1198,6 +1202,10 @@ inline void dComIfGs_onGetBottleItem(u8 i_itemNo) {
|
||||
g_dComIfG_gameInfo.save.getPlayer().getGetItem().onBottleItem(i_itemNo);
|
||||
}
|
||||
|
||||
inline BOOL dComIfGs_checkEmptyBottle() {
|
||||
return g_dComIfG_gameInfo.save.getPlayer().getItem().checkEmptyBottle();
|
||||
}
|
||||
|
||||
inline void dComIfGs_setEmptyBottle() {
|
||||
g_dComIfG_gameInfo.save.getPlayer().getItem().setEmptyBottle();
|
||||
}
|
||||
@@ -1206,6 +1214,16 @@ inline void dComIfGs_setEmptyBottleItemIn(u8 i_itemNo) {
|
||||
g_dComIfG_gameInfo.save.getPlayer().getItem().setEmptyBottleItemIn(i_itemNo);
|
||||
}
|
||||
|
||||
inline BOOL dComIfGs_checkGetBottle() {
|
||||
u8 bottleCount = 0;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (dComIfGs_getItem(0xE + i) != 0xFF) {
|
||||
bottleCount++;
|
||||
}
|
||||
}
|
||||
return bottleCount != 0;
|
||||
}
|
||||
|
||||
inline s16 dComIfGs_getWindY() {
|
||||
return g_dComIfG_gameInfo.save.getPlayer().getPlayerStatusB().getWindY();
|
||||
}
|
||||
|
||||
+5
-5
@@ -15,11 +15,11 @@ public:
|
||||
void Yinit();
|
||||
void getValueStick();
|
||||
void getAngleStick();
|
||||
void checkTrigger();
|
||||
void checkLeftTrigger();
|
||||
void checkRightTrigger();
|
||||
void checkUpTrigger();
|
||||
void checkDownTrigger();
|
||||
bool checkTrigger();
|
||||
bool checkLeftTrigger();
|
||||
bool checkRightTrigger();
|
||||
bool checkUpTrigger();
|
||||
bool checkDownTrigger();
|
||||
|
||||
/* 0x00 */ void* vtbl;
|
||||
/* 0x04 */ f32 field_0x04;
|
||||
|
||||
+59
-36
@@ -34,6 +34,19 @@ struct __shop_items_set_data {
|
||||
/* 0x10 */ int mCount;
|
||||
};
|
||||
|
||||
struct ShopItems_c__select_list_data {
|
||||
/* 0x00 */ s16 mLeftIdx;
|
||||
/* 0x02 */ s16 mRightIdx;
|
||||
/* 0x04 */ s16 mUpIdx;
|
||||
/* 0x06 */ s16 mDownIdx;
|
||||
};
|
||||
|
||||
struct ShopItems_c__shop_cam_data {
|
||||
/* 0x00 */ Vec m00;
|
||||
/* 0x0C */ Vec m0C;
|
||||
/* 0x18 */ f32 m18;
|
||||
};
|
||||
|
||||
class ShopCam_action_c {
|
||||
public:
|
||||
typedef int (ShopCam_action_c::*ActionFunc)();
|
||||
@@ -41,33 +54,35 @@ public:
|
||||
ShopCam_action_c() {}
|
||||
|
||||
void SetSelectIdx(s16) {}
|
||||
void setCamAction(ActionFunc) {}
|
||||
void checkCamAction(ActionFunc) {}
|
||||
void getItemZoomPos(f32) {}
|
||||
void setCamDataIdx(int) {}
|
||||
void setCamAction(ActionFunc func) { mCurrActionFunc = func; }
|
||||
BOOL checkCamAction(ActionFunc func) { return mCurrActionFunc == func; }
|
||||
void getItemZoomPos(f32) {
|
||||
|
||||
}
|
||||
void setCamDataIdx(int idx) { mCamDataIdx = idx; }
|
||||
|
||||
void shop_cam_action_init();
|
||||
void shop_cam_action();
|
||||
void rsh_talk_cam_action_init(fopAc_ac_c*, cXyz, cXyz, f32);
|
||||
void rsh_talk_cam_action();
|
||||
void ds_normal_cam_action_init();
|
||||
void ds_normal_cam_action();
|
||||
BOOL shop_cam_action_init();
|
||||
int shop_cam_action();
|
||||
BOOL rsh_talk_cam_action_init(fopAc_ac_c*, cXyz, cXyz, f32);
|
||||
int rsh_talk_cam_action();
|
||||
BOOL ds_normal_cam_action_init();
|
||||
int ds_normal_cam_action();
|
||||
void Save();
|
||||
void Reset();
|
||||
void move();
|
||||
|
||||
public:
|
||||
/* 0x00 */ u8 m00[0x18 - 0x00];
|
||||
/* 0x18 */ f32 m18;
|
||||
/* 0x1C */ f32 m1C;
|
||||
/* 0x20 */ f32 m20;
|
||||
/* 0x24 */ f32 m24;
|
||||
/* 0x28 */ f32 m28;
|
||||
/* 0x2C */ f32 m2C;
|
||||
/* 0x00 */ ActionFunc mCurrActionFunc;
|
||||
/* 0x0C */ u8 m00[0x18 - 0x0C];
|
||||
/* 0x18 */ cXyz m18;
|
||||
/* 0x24 */ cXyz m24;
|
||||
/* 0x30 */ f32 m30;
|
||||
/* 0x34 */ u8 m34[0x54 - 0x34];
|
||||
/* 0x34 */ cXyz mOrigCenter;
|
||||
/* 0x40 */ cXyz mOrigEye;
|
||||
/* 0x4C */ f32 mOrigFovy;
|
||||
/* 0x50 */ u8 m50[0x54 - 0x50];
|
||||
/* 0x54 */ s16 m54;
|
||||
/* 0x56 */ s16 m56;
|
||||
/* 0x56 */ s16 mCamDataIdx;
|
||||
};
|
||||
|
||||
class ShopItems_c {
|
||||
@@ -76,12 +91,14 @@ public:
|
||||
~ShopItems_c() {}
|
||||
|
||||
BOOL isSoldOutItem(s16 i) { return m28[i] == 1; }
|
||||
BOOL isHide() {}
|
||||
s16 getItemDataIdx() {}
|
||||
void setItemDataIdx(s16) {}
|
||||
BOOL isHide() { return mbIsHide; }
|
||||
s16 getItemDataIdx() { return mItemSetListGlobalIdx; }
|
||||
void setItemDataIdx(s16 idx) { mItemSetListGlobalIdx = idx; }
|
||||
void setItemSum(s16) {}
|
||||
void init() {}
|
||||
|
||||
void createItem(int, int);
|
||||
void Item_Select(int);
|
||||
BOOL Item_Select(int);
|
||||
BOOL Item_Wait(int);
|
||||
BOOL Item_ZoomUp(cXyz&);
|
||||
BOOL Item_Move();
|
||||
@@ -108,7 +125,7 @@ public:
|
||||
/* 0x2C */ u8 m2C[0x30 - 0x2C];
|
||||
/* 0x30 */ cXyz m30;
|
||||
/* 0x3C */ s16 m3C;
|
||||
/* 0x3E */ s16 m3E;
|
||||
/* 0x3E */ s16 mbIsHide;
|
||||
/* 0x40 */ s16 mNumItems;
|
||||
/* 0x42 */ s16 mItemSetListGlobalIdx;
|
||||
};
|
||||
@@ -117,11 +134,17 @@ class ShopCursor_c {
|
||||
public:
|
||||
ShopCursor_c(J3DModelData*, J3DAnmTevRegKey*, f32);
|
||||
|
||||
void getModel(int) {}
|
||||
void getBrk() {}
|
||||
void hide() {}
|
||||
void show() {}
|
||||
void setScale(f32, f32, f32, f32, f32) {}
|
||||
J3DModel* getModel(int idx) { return mpModels[idx]; }
|
||||
J3DAnmTevRegKey* getBrk() { return mpBrkData; }
|
||||
void hide() { m54 = 0; }
|
||||
void show() { m54 = 1; }
|
||||
void setScale(f32 param_1, f32 param_2, f32 param_3, f32 param_4, f32 param_5) {
|
||||
m48 = param_1;
|
||||
m4C = param_2;
|
||||
m50 = param_3;
|
||||
m38 = param_4;
|
||||
m3C = param_5;
|
||||
}
|
||||
|
||||
void anm_play();
|
||||
void draw();
|
||||
@@ -135,18 +158,18 @@ public:
|
||||
/* 0x38 */ f32 m38;
|
||||
/* 0x3C */ f32 m3C;
|
||||
/* 0x40 */ f32 m40;
|
||||
/* 0x44 */ u16 m44;
|
||||
/* 0x44 */ s16 m44;
|
||||
/* 0x46 */ u8 m46[0x48 - 0x46];
|
||||
/* 0x48 */ f32 m48;
|
||||
/* 0x4C */ f32 m4C;
|
||||
/* 0x50 */ f32 m50;
|
||||
/* 0x54 */ u32 m54;
|
||||
/* 0x54 */ s32 m54;
|
||||
};
|
||||
|
||||
static void dShop_get_next_select(int, ShopItems_c*);
|
||||
static void dShop_now_triggercheck(msg_class*, STControl*, ShopItems_c*, u32*, dShop_DefaultMsgCallback, void*);
|
||||
static void dShop_maxCheck(int, int);
|
||||
static void dShop_BoughtErrorStatus(ShopItems_c*, int, int);
|
||||
static void ShopCursor_create(J3DModelData*, J3DAnmTevRegKey*, f32);
|
||||
s16 dShop_get_next_select(int, ShopItems_c*);
|
||||
BOOL dShop_now_triggercheck(msg_class*, STControl*, ShopItems_c*, u32*, dShop_DefaultMsgCallback, void*);
|
||||
BOOL dShop_maxCheck(int, int);
|
||||
u8 dShop_BoughtErrorStatus(ShopItems_c*, int, int);
|
||||
ShopCursor_c* ShopCursor_create(J3DModelData*, J3DAnmTevRegKey*, f32);
|
||||
|
||||
#endif /* D_SHOP_H */
|
||||
|
||||
@@ -240,6 +240,19 @@ public:
|
||||
|
||||
public:
|
||||
void ForceLockOff(unsigned int pcId);
|
||||
void Reset(cXyz, cXyz, f32, s16);
|
||||
void Set(cXyz, cXyz, f32, s16);
|
||||
void Stay();
|
||||
void SetTrimSize(s32);
|
||||
|
||||
void CStickUse() {}
|
||||
void CStickUseless() {}
|
||||
void Center() {}
|
||||
void Eye() {}
|
||||
void StickUse() {}
|
||||
void StickUseless() {}
|
||||
void clrFlag(u32) {}
|
||||
void setFlag(u32) {}
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(dCamera_c) == 0x800);
|
||||
|
||||
Reference in New Issue
Block a user