mirror of
https://github.com/zeldaret/tww.git
synced 2026-05-23 06:54:16 -04:00
fix everything in d_a_npc_bs1
This commit is contained in:
@@ -11,56 +11,57 @@
|
||||
|
||||
class daNpc_Bs1_c : public fopAc_ac_c {
|
||||
public:
|
||||
typedef BOOL (daNpc_Bs1_c::*ActionFunc)(void*);
|
||||
|
||||
enum Animation {
|
||||
ANM_UNK_0 = 0,
|
||||
ANM_UNK_1 = 1,
|
||||
ANM_UNK_2 = 2,
|
||||
ANM_UNK_3 = 3,
|
||||
ANM_UNK_4 = 4,
|
||||
ANM_UNK_5 = 5,
|
||||
ANM_UNK_6 = 6,
|
||||
ANM_UNK_7 = 7,
|
||||
ANM_UNK_8 = 8,
|
||||
ANM_UNK_9 = 9,
|
||||
ANM_UNK_A = 0xA,
|
||||
ANM_UNK_B = 0xB,
|
||||
enum ActionStatus {
|
||||
ACTION_STARTING = 0,
|
||||
ACTION_ONGOING = 1,
|
||||
ACTION_ENDING = -1,
|
||||
};
|
||||
|
||||
daNpc_Bs1_c();
|
||||
int getBackboneJntNum() { return m_backbone_jnt_num; }
|
||||
int getBackbone_x() { return mJntCtrl.getBackbone_x(); }
|
||||
int getBackbone_y() { return mJntCtrl.getBackbone_y(); }
|
||||
s8 getBackboneJntNum() { return m_backbone_jnt_num; }
|
||||
s16 getBackbone_x() { return mJntCtrl.getBackbone_x(); }
|
||||
s16 getBackbone_y() { return mJntCtrl.getBackbone_y(); }
|
||||
void getBuyItem() {}
|
||||
void getBuyItemMax() {}
|
||||
int getHeadJntNum() { return m_head_jnt_num; }
|
||||
int getHead_x() { return mJntCtrl.getHead_x(); }
|
||||
int getHead_y() { return mJntCtrl.getHead_y(); }
|
||||
s16 getHead_x() { return mJntCtrl.getHead_x(); }
|
||||
s16 getHead_y() { return mJntCtrl.getHead_y(); }
|
||||
void getPayRupee() {}
|
||||
void incAttnSetCount() {}
|
||||
void setAction(int (daNpc_Bs1_c::*)(void*), void*) {}
|
||||
void setAction(ActionFunc func, void* arg) {
|
||||
if (mCurrActionFunc != func) {
|
||||
if (mCurrActionFunc) {
|
||||
mActionStatus = ACTION_ENDING;
|
||||
(this->*mCurrActionFunc)(NULL);
|
||||
}
|
||||
mCurrActionFunc = func;
|
||||
mActionStatus = ACTION_STARTING;
|
||||
(this->*mCurrActionFunc)(arg);
|
||||
}
|
||||
}
|
||||
void setAttentionBasePos(cXyz value) { m718 = value;}
|
||||
void setBuyItem(unsigned char) {}
|
||||
void setBuyItemMax(unsigned char) {}
|
||||
void setBuyItem(u8) {}
|
||||
void setBuyItemMax(u8) {}
|
||||
void setEyePos(cXyz other) { eyePos = other; }
|
||||
void setPayRupee(short) {}
|
||||
void setPayRupee(s16) {}
|
||||
|
||||
s16 XyEventCB(int);
|
||||
BOOL initTexPatternAnm(bool);
|
||||
void playTexPatternAnm();
|
||||
void setAnm(signed char);
|
||||
void setTexAnm(signed char);
|
||||
void setAnm(s8);
|
||||
void setTexAnm(s8);
|
||||
void setAnmFromMsgTag();
|
||||
BOOL chkAttention(cXyz, short);
|
||||
BOOL chkAttention(cXyz, s16);
|
||||
void eventOrder();
|
||||
void checkOrder();
|
||||
u16 next_msgStatus(unsigned long*);
|
||||
u16 next_msgStatus(u32*);
|
||||
void getMsg();
|
||||
void setCollision();
|
||||
void talkInit();
|
||||
u32 shopMsgCheck(unsigned long);
|
||||
BOOL shopMsgCheck(u32);
|
||||
void getDefaultMsg();
|
||||
void shopStickMoveMsgCheck(unsigned long);
|
||||
void shopStickMoveMsgCheck(u32);
|
||||
BOOL checkBeastItemSellMsg(u32);
|
||||
void normal_talk();
|
||||
void shop_talk();
|
||||
@@ -70,8 +71,8 @@ public:
|
||||
BOOL CreateInit();
|
||||
void setAttention(bool);
|
||||
void lookBack();
|
||||
BOOL wait01();
|
||||
BOOL talk01();
|
||||
bool wait01();
|
||||
bool talk01();
|
||||
BOOL wait_action(void*);
|
||||
BOOL getdemo_action(void*);
|
||||
BOOL evn_talk_init(int);
|
||||
@@ -91,28 +92,25 @@ public:
|
||||
s32 _create();
|
||||
BOOL CreateHeap();
|
||||
|
||||
typedef BOOL (daNpc_Bs1_c::*ActionFunc)(void*);
|
||||
|
||||
public:
|
||||
/* 0x290 */ request_of_phase_process_class mphs;
|
||||
/* 0x290 */ request_of_phase_process_class mPhase;
|
||||
/* 0x298 */ mDoExt_McaMorf* mpMorf;
|
||||
/* 0x29C */ u32 m29C;
|
||||
/* 0x2A0 */ J3DModel* mpModelArr[3];
|
||||
/* 0x2A0 */ J3DModel* mpSoldSignModels[3];
|
||||
/* 0x2AC */ J3DAnmTexPattern* m_head_tex_pattern;
|
||||
/* 0x2B0 */ mDoExt_btpAnm mBtpAnm;
|
||||
/* 0x2C4 */ u8 mFrame;
|
||||
/* 0x2C5 */ u8 m2C5;
|
||||
/* 0x2C6 */ s16 m2C6;
|
||||
/* 0x2C8 */ J3DModel* mpModel;
|
||||
/* 0x2CC */ dBgS_Acch mAcch;
|
||||
/* 0x2C8 */ J3DModel* mpHelmetModel;
|
||||
/* 0x2CC */ dBgS_ObjAcch mAcch;
|
||||
/* 0x490 */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x4D0 */ cXyz m4D0;
|
||||
/* 0x4D0 */ u8 m2CC[0x63C - 0x4DC];
|
||||
/* 0x4D0 */ dCcD_Stts mStts;
|
||||
/* 0x50C */ dCcD_Cyl mCyl;
|
||||
/* 0x63C */ s8 m_head_jnt_num;
|
||||
/* 0x63D */ s8 m_backbone_jnt_num;
|
||||
/* 0x63E */ s16 m63E;
|
||||
/* 0x640 */ char* m640;
|
||||
/* 0x644 */ u8 m644[0x6AC - 0x644];
|
||||
/* 0x640 */ dNpc_EventCut_c mEventCut;
|
||||
/* 0x6AC */ dNpc_JntCtrl_c mJntCtrl;
|
||||
/* 0x6E0 */ STControl mStickControl;
|
||||
/* 0x708 */ u8 m708[0x718 - 0x708];
|
||||
@@ -132,9 +130,9 @@ public:
|
||||
/* 0x740 */ u32 m740;
|
||||
/* 0x744 */ u32 m744;
|
||||
/* 0x748 */ cXyz mItemPosOffsets[3];
|
||||
/* 0x76C */ u8 m76C;
|
||||
/* 0x76D */ u8 m76D[0x770 - 0x76D];
|
||||
/* 0x770 */ ActionFunc m770;
|
||||
/* 0x76C */ u8 m76C[3];
|
||||
/* 0x76F */ u8 m76D[0x770 - 0x76F];
|
||||
/* 0x770 */ ActionFunc mCurrActionFunc;
|
||||
/* 0x77C */ ShopCam_action_c mShopCamAction;
|
||||
/* 0x7D4 */ ShopItems_c mShopItems;
|
||||
/* 0x818 */ ShopCursor_c* mpShopCursor;
|
||||
@@ -143,50 +141,45 @@ public:
|
||||
/* 0x829 */ s8 m829;
|
||||
/* 0x82A */ s8 m82A;
|
||||
/* 0x82B */ s8 m82B;
|
||||
/* 0x82C */ s16 m82C;
|
||||
/* 0x82E */ s16 m82E;
|
||||
/* 0x830 */ s8 m830; // Unknown usage
|
||||
/* 0x831 */ u8 m831; // Unknown usage
|
||||
/* 0x832 */ s8 mLHioChildIdx; // Used in createShopList
|
||||
/* 0x82C */ s16 mEventIdxs[2];
|
||||
/* 0x830 */ s8 m830;
|
||||
/* 0x831 */ u8 m831;
|
||||
/* 0x832 */ s8 mType;
|
||||
/* 0x833 */ u8 mShopIndex;
|
||||
/* 0x834 */ s8 m834;
|
||||
/* 0x834 */ s8 mActionStatus;
|
||||
/* 0x835 */ u8 m835;
|
||||
/* 0x836 */ u8 m836[0x83A - 0x836];
|
||||
/* 0x83A */ s16 m83A;
|
||||
/* 0x83C */ u8 m83C[0x844 - 0x83C];
|
||||
};
|
||||
}; // Size: 0x844
|
||||
|
||||
class daNpc_Bs1_childHIO_c {
|
||||
public:
|
||||
daNpc_Bs1_childHIO_c();
|
||||
virtual ~daNpc_Bs1_childHIO_c();
|
||||
virtual ~daNpc_Bs1_childHIO_c() {}
|
||||
|
||||
public:
|
||||
/* Place member variables here */
|
||||
/* 0x000 */ // this.__vt
|
||||
/* 0x004 */ dNpc_HIO_c mHIO;
|
||||
/* 0x02C */ u8 m2C; // Isolating at u8 based on stb in Constructor
|
||||
/* 0x000 */ // this.__vt
|
||||
/* 0x004 */ dNpc_HIO_c mNpc;
|
||||
/* 0x02C */ u8 m2C;
|
||||
/* 0x02D */ u8 m2D[0x3];
|
||||
/* 0x030 */ f32 m30;
|
||||
/* 0x034 */ f32 m34;
|
||||
/* 0x038 */ f32 m38;
|
||||
/* 0x03C */ f32 m3C;
|
||||
/* 0x040 */ f32 m40;
|
||||
};
|
||||
}; // Size: 0x44
|
||||
|
||||
class daNpc_Bs1_HIO_c : public JORReflexible {
|
||||
public:
|
||||
daNpc_Bs1_HIO_c();
|
||||
virtual ~daNpc_Bs1_HIO_c();
|
||||
virtual ~daNpc_Bs1_HIO_c() {}
|
||||
|
||||
public:
|
||||
/* 0x000 */ // this.__vt
|
||||
/* 0x000 */ // this.__vt
|
||||
/* 0x004 */ s8 mChildId;
|
||||
/* 0x008 */ int m8;
|
||||
/* 0x00C */ daNpc_Bs1_childHIO_c mpChildArray[2];
|
||||
};
|
||||
/* 0x00C */ daNpc_Bs1_childHIO_c mChild[2];
|
||||
}; // Size: 0x94
|
||||
|
||||
STATIC_ASSERT(sizeof(daNpc_Bs1_c) == 0x844);
|
||||
STATIC_ASSERT(sizeof(daNpc_Bs1_HIO_c) == 0x94);
|
||||
STATIC_ASSERT(sizeof(daNpc_Bs1_childHIO_c) == 0x44);
|
||||
#endif /* D_A_NPC_BS1_H */
|
||||
|
||||
@@ -15,15 +15,15 @@ public:
|
||||
};
|
||||
|
||||
void getAttentionBasePos() {}
|
||||
void setAction(ActionFunc func, void*) {
|
||||
void setAction(ActionFunc func, void* arg) {
|
||||
if (mCurrActionFunc != func) {
|
||||
if (mCurrActionFunc) {
|
||||
mActionStatus = ACTION_ENDING;
|
||||
(this->*mCurrActionFunc)(NULL);
|
||||
(this->*mCurrActionFunc)(arg);
|
||||
}
|
||||
mCurrActionFunc = func;
|
||||
mActionStatus = ACTION_STARTING;
|
||||
(this->*mCurrActionFunc)(NULL);
|
||||
(this->*mCurrActionFunc)(arg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,10 @@ extern Quaternion ZeroQuat;
|
||||
|
||||
class STControl {
|
||||
public:
|
||||
STControl() {
|
||||
setWaitParm(0xF, 0xF, 0, 0, 0.9f, 0.5f, 0, 0x2000);
|
||||
init();
|
||||
}
|
||||
STControl(s16, s16, s16, s16, f32, f32, s16, s16);
|
||||
void setWaitParm(s16, s16, s16, s16, f32, f32, s16, s16);
|
||||
void init();
|
||||
|
||||
+98
-12
@@ -35,13 +35,6 @@ struct __shop_items_set_data {
|
||||
/* 0x10 */ int mCount;
|
||||
};
|
||||
|
||||
extern __shop_items_set_data shopItems_setData_Bomb30Bs2;
|
||||
extern __shop_items_set_data shopItems_setData_arrow30Bs2;
|
||||
extern __shop_items_set_data shopItems_setData_red_bottleBs2;
|
||||
extern __shop_items_set_data shopItems_setData_emptybottle;
|
||||
extern __shop_items_set_data shopItems_setData_kakera_heart;
|
||||
extern __shop_items_set_data shopItems_setData_map;
|
||||
|
||||
struct ShopItems_c__select_list_data {
|
||||
/* 0x00 */ s16 mLeftIdx;
|
||||
/* 0x02 */ s16 mRightIdx;
|
||||
@@ -59,13 +52,26 @@ class ShopCam_action_c {
|
||||
public:
|
||||
typedef int (ShopCam_action_c::*ActionFunc)();
|
||||
|
||||
ShopCam_action_c() {}
|
||||
ShopCam_action_c() {
|
||||
m50 = 0;
|
||||
m52 = 0;
|
||||
m54 = -1;
|
||||
setCamDataIdx(0);
|
||||
m18.setall(0.0f);
|
||||
m24.set(0.0f, 0.0f, 100.0f);
|
||||
m30 = 60.0f;
|
||||
}
|
||||
|
||||
void SetSelectIdx(s16) {}
|
||||
void setCamAction(ActionFunc func) { mCurrActionFunc = func; }
|
||||
BOOL checkCamAction(ActionFunc func) { return mCurrActionFunc == func; }
|
||||
void getItemZoomPos(f32) {
|
||||
|
||||
cXyz getItemZoomPos(f32 f31) {
|
||||
cXyz sp38 = m18 - m24;
|
||||
if (!sp38.normalizeRS()) {
|
||||
sp38.set(0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
cXyz sp2C = m24 + sp38 * f31;
|
||||
return sp2C;
|
||||
}
|
||||
void setCamDataIdx(int idx) { mCamDataIdx = idx; }
|
||||
|
||||
@@ -88,7 +94,7 @@ public:
|
||||
/* 0x34 */ cXyz mOrigCenter;
|
||||
/* 0x40 */ cXyz mOrigEye;
|
||||
/* 0x4C */ f32 mOrigFovy;
|
||||
/* 0x50 */ u16 m50; // Per daNpc_Bs1_c::constructor
|
||||
/* 0x50 */ u16 m50;
|
||||
/* 0x52 */ u16 m52;
|
||||
/* 0x54 */ s16 m54;
|
||||
/* 0x56 */ s16 mCamDataIdx;
|
||||
@@ -96,7 +102,17 @@ public:
|
||||
|
||||
class ShopItems_c {
|
||||
public:
|
||||
ShopItems_c() {}
|
||||
ShopItems_c() {
|
||||
mSelectedItemIdx = -1;
|
||||
m3C = 0;
|
||||
mbIsHide = 0;
|
||||
mNumItems = 0;
|
||||
mItemSetListGlobalIdx = 0;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
mItemActorProcessIds[i] = fpcM_ERROR_PROCESS_ID_e;
|
||||
m28[i] = 0;
|
||||
}
|
||||
}
|
||||
~ShopItems_c() {}
|
||||
|
||||
BOOL isSoldOutItem(s16 i) { return m28[i] == 1; }
|
||||
@@ -181,4 +197,74 @@ BOOL dShop_maxCheck(int, int);
|
||||
u8 dShop_BoughtErrorStatus(ShopItems_c*, int, int);
|
||||
ShopCursor_c* ShopCursor_create(J3DModelData*, J3DAnmTevRegKey*, f32);
|
||||
|
||||
extern ShopItems_c__ItemData shopItemData_Feedbag;
|
||||
extern ShopItems_c__ItemData shopItemData_FoodAll;
|
||||
extern ShopItems_c__ItemData shopItemData_FoodHyoi;
|
||||
extern ShopItems_c__ItemData shopItemData_arrow10;
|
||||
extern ShopItems_c__ItemData shopItemData_arrow30;
|
||||
extern ShopItems_c__ItemData shopItemData_red_bottle;
|
||||
extern ShopItems_c__ItemData shopItemData_blue_bottle;
|
||||
extern ShopItems_c__ItemData shopItemData_green_bottle;
|
||||
extern ShopItems_c__ItemData shopItemData_bomb10;
|
||||
extern ShopItems_c__ItemData shopItemData_bomb20;
|
||||
extern ShopItems_c__ItemData shopItemData_bomb30;
|
||||
extern ShopItems_c__ItemData shopItemData_emptybottle;
|
||||
extern ShopItems_c__ItemData shopItemData_kakera_heart;
|
||||
extern ShopItems_c__ItemData shopItemData_map;
|
||||
extern ShopItems_c__ItemData shopItemData_RotenItem0;
|
||||
extern ShopItems_c__ItemData shopItemData_RotenItem1;
|
||||
extern ShopItems_c__ItemData shopItemData_RotenItem2;
|
||||
extern ShopItems_c__ItemData shopItemData_RotenItem3;
|
||||
extern ShopItems_c__ItemData shopItemData_RotenItem4;
|
||||
extern ShopItems_c__ItemData shopItemData_RotenItem5;
|
||||
extern ShopItems_c__ItemData shopItemData_RotenItem6;
|
||||
extern ShopItems_c__ItemData shopItemData_RotenItem7;
|
||||
extern ShopItems_c__ItemData shopItemData_RotenItem8;
|
||||
extern ShopItems_c__ItemData shopItemData_RotenItem9;
|
||||
extern ShopItems_c__ItemData shopItemData_RotenItem10;
|
||||
extern ShopItems_c__ItemData shopItemData_RotenItem11;
|
||||
extern __shop_items_set_data shopItems_setData_Bomb10_exp;
|
||||
extern __shop_items_set_data shopItems_setData_Bomb20_exp;
|
||||
extern __shop_items_set_data shopItems_setData_Bomb30_exp;
|
||||
extern __shop_items_set_data shopItems_setData_Bomb10;
|
||||
extern __shop_items_set_data shopItems_setData_Bomb20;
|
||||
extern __shop_items_set_data shopItems_setData_Bomb30;
|
||||
extern __shop_items_set_data shopItems_setData_Feedbag;
|
||||
extern __shop_items_set_data shopItems_setData_FoodAll;
|
||||
extern __shop_items_set_data shopItems_setData_FoodHyoi;
|
||||
extern __shop_items_set_data shopItems_setData_Bomb30Bs;
|
||||
extern __shop_items_set_data shopItems_setData_arrow10;
|
||||
extern __shop_items_set_data shopItems_setData_arrow30;
|
||||
extern __shop_items_set_data shopItems_setData_red_bottleBs;
|
||||
extern __shop_items_set_data shopItems_setData_Bomb30Bs2;
|
||||
extern __shop_items_set_data shopItems_setData_arrow30Bs2;
|
||||
extern __shop_items_set_data shopItems_setData_red_bottleBs2;
|
||||
extern __shop_items_set_data shopItems_setData_emptybottle;
|
||||
extern __shop_items_set_data shopItems_setData_kakera_heart;
|
||||
extern __shop_items_set_data shopItems_setData_map;
|
||||
extern __shop_items_set_data shopItems_setData_red_bottleDs;
|
||||
extern __shop_items_set_data shopItems_setData_green_bottleDs;
|
||||
extern __shop_items_set_data shopItems_setData_blue_bottleDs;
|
||||
extern __shop_items_set_data shopItems_setData_RotenItem0;
|
||||
extern __shop_items_set_data shopItems_setData_RotenItem1;
|
||||
extern __shop_items_set_data shopItems_setData_RotenItem2;
|
||||
extern __shop_items_set_data shopItems_setData_RotenItem3;
|
||||
extern __shop_items_set_data shopItems_setData_RotenItem4;
|
||||
extern __shop_items_set_data shopItems_setData_RotenItem5;
|
||||
extern __shop_items_set_data shopItems_setData_RotenItem6;
|
||||
extern __shop_items_set_data shopItems_setData_RotenItem7;
|
||||
extern __shop_items_set_data shopItems_setData_RotenItem8;
|
||||
extern __shop_items_set_data shopItems_setData_RotenItem9;
|
||||
extern __shop_items_set_data shopItems_setData_RotenItem10;
|
||||
extern __shop_items_set_data shopItems_setData_RotenItem11;
|
||||
extern __shop_items_set_data* Item_setData_rshop[];
|
||||
extern __shop_items_set_data* Item_set_data_dshop[];
|
||||
extern __shop_items_set_data* Item_set_data_bmshop1[];
|
||||
extern __shop_items_set_data* Item_set_data_bmshop2[];
|
||||
extern __shop_items_set_data* Item_set_data_bshop_3[];
|
||||
extern __shop_items_set_data* Item_set_data_bshop_4[];
|
||||
extern __shop_items_set_data* Item_set_data_bshop_5[];
|
||||
extern __shop_items_set_data* Item_set_data_bshop_6[];
|
||||
extern __shop_items_set_data** Item_set_data_tbl[];
|
||||
|
||||
#endif /* D_SHOP_H */
|
||||
|
||||
+1
-1
@@ -133,7 +133,7 @@ enum {
|
||||
/* 0x7D */ DSNAP_TYPE_UNK7D,
|
||||
/* 0x7E */ DSNAP_TYPE_UNK7E,
|
||||
/* 0x7F */ DSNAP_TYPE_UNK7F,
|
||||
/* 0x80 */ DSNAP_TYPE_UNK80,
|
||||
/* 0x80 */ DSNAP_TYPE_BS,
|
||||
/* 0x81 */ DSNAP_TYPE_UNK81,
|
||||
/* 0x82 */ DSNAP_TYPE_UNK82,
|
||||
/* 0x83 */ DSNAP_TYPE_UNK83,
|
||||
|
||||
+459
-410
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user