mirror of
https://github.com/zeldaret/tww.git
synced 2026-06-07 20:01:27 -04:00
d_a_npc_rsh1 matching (#927)
* Initial work * 14% matching in .text - Add some of the static data - Match sinit function - Match HIO constructor - Match _create - Match some other trivial functions * Match CreateHeap * 20% matching in .text * 31% matching in .text * 34% matching in .text * 38% matching in .text * 51% matching in .text * createShopList work * More createShopList work * 54% matching in .text: Match createShopList * 57% matching in .text * 68% matching in .text * Variable name updates * 75% matching in .text * 81% matching in .text * Match lookBack * d_a_npc_rsh1 100% for demo and retail * Replace magic constants with applicable enums * Give some member fields trivial names and name some method parameters * Fix a few renaming errors * More renaming work * Rename HIO fields and rest of actor fields * Replace magic numbers associated with mItemNo
This commit is contained in:
+1
-1
@@ -1664,7 +1664,7 @@ config.libs = [
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_npc_photo"),
|
||||
ActorRel(NonMatching, "d_a_npc_pm1"),
|
||||
ActorRel(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "d_a_npc_roten"),
|
||||
ActorRel(NonMatching, "d_a_npc_rsh1"),
|
||||
ActorRel(Matching, "d_a_npc_rsh1"),
|
||||
ActorRel(NonMatching, "d_a_npc_sarace"),
|
||||
ActorRel(NonMatching, "d_a_npc_sv"),
|
||||
ActorRel(NonMatching, "d_a_npc_tc"),
|
||||
|
||||
+121
-51
@@ -1,82 +1,152 @@
|
||||
#ifndef D_A_NPC_RSH1_H
|
||||
#define D_A_NPC_RSH1_H
|
||||
|
||||
#include "d/d_lib.h"
|
||||
#include "d/d_npc.h"
|
||||
#include "d/d_shop.h"
|
||||
#include "f_op/f_op_actor.h"
|
||||
|
||||
class ShopItems_c;
|
||||
|
||||
class daNpc_Rsh1_c : public fopAc_ac_c {
|
||||
public:
|
||||
void chkAction(int (daNpc_Rsh1_c::*)(void*)) {}
|
||||
void getBackboneJntNum() {}
|
||||
void getBackbone_x() {}
|
||||
void getBackbone_y() {}
|
||||
void getHeadJntNum() {}
|
||||
void getHead_x() {}
|
||||
void getHead_y() {}
|
||||
typedef BOOL (daNpc_Rsh1_c::*ProcFunc)(void*);
|
||||
static char m_arcname[];
|
||||
public:
|
||||
bool chkAction(ProcFunc i_funcP) { return mCurrProc == i_funcP; }
|
||||
s8 getBackboneJntNum() { return m_backbone_jnt_num; }
|
||||
s16 getBackbone_x() { return mJntCtrl.getBackbone_x(); }
|
||||
s16 getBackbone_y() { return mJntCtrl.getBackbone_y(); }
|
||||
s8 getHeadJntNum() { return m_head_jnt_num; }
|
||||
s16 getHead_x() { return mJntCtrl.getHead_x(); }
|
||||
s16 getHead_y() { return mJntCtrl.getHead_y(); }
|
||||
void incAttnSetCount() {}
|
||||
void setAction(int (daNpc_Rsh1_c::*)(void*), void*) {}
|
||||
void setAttentionBasePos(cXyz) {}
|
||||
void setEyePos(cXyz) {}
|
||||
void setAction(ProcFunc i_funcP, void* i_actParam) {
|
||||
if (mCurrProc != i_funcP) {
|
||||
if (mCurrProc) {
|
||||
mActionStatus = -1;
|
||||
(this->*mCurrProc)(NULL);
|
||||
}
|
||||
mCurrProc = i_funcP;
|
||||
mActionStatus = 0;
|
||||
(this->*mCurrProc)(i_actParam);
|
||||
}
|
||||
}
|
||||
void setAttentionBasePos(cXyz i_attnBasePos) { mAttnBasePos = i_attnBasePos; }
|
||||
void setEyePos(cXyz i_eyePos) { eyePos = i_eyePos; }
|
||||
void setShopIdx(int) {}
|
||||
|
||||
void checkCreateInShopPlayer();
|
||||
void initTexPatternAnm(bool);
|
||||
BOOL checkCreateInShopPlayer();
|
||||
BOOL initTexPatternAnm(bool);
|
||||
void playTexPatternAnm();
|
||||
void setAnm(signed char);
|
||||
void setTexAnm(signed char);
|
||||
void setAnmFromMsgTag();
|
||||
void chkAttention(cXyz, short);
|
||||
bool chkAttention(cXyz, short);
|
||||
void eventOrder();
|
||||
void checkOrder();
|
||||
void next_msgStatus(unsigned long*);
|
||||
void getMsg();
|
||||
u16 next_msgStatus(unsigned long*);
|
||||
u32 getMsg();
|
||||
void setCollision();
|
||||
void talkInit();
|
||||
void normal_talk();
|
||||
void shop_talk();
|
||||
void talk();
|
||||
void CreateInit();
|
||||
u16 normal_talk();
|
||||
u16 shop_talk();
|
||||
u16 talk();
|
||||
BOOL CreateInit();
|
||||
void createShopList();
|
||||
void setAttention();
|
||||
void lookBack();
|
||||
void pathGet();
|
||||
void getAimShopPosIdx();
|
||||
void shopPosMove();
|
||||
void pathMove(int*);
|
||||
void wait01();
|
||||
void talk01();
|
||||
void getdemo_action(void*);
|
||||
void wait_action(void*);
|
||||
void pl_shop_out_action(void*);
|
||||
void evn_setAnm_init(int);
|
||||
void evn_talk_init(int);
|
||||
void evn_continue_talk_init(int);
|
||||
void evn_talk();
|
||||
void evn_turn_init(int);
|
||||
void evn_turn();
|
||||
void privateCut();
|
||||
void event_action(void*);
|
||||
void dummy_action(void*);
|
||||
bool pathGet();
|
||||
int getAimShopPosIdx();
|
||||
BOOL shopPosMove();
|
||||
BOOL pathMove(int*);
|
||||
bool wait01();
|
||||
bool talk01();
|
||||
BOOL getdemo_action(void*);
|
||||
BOOL wait_action(void*);
|
||||
BOOL pl_shop_out_action(void*);
|
||||
bool evn_setAnm_init(int);
|
||||
bool evn_talk_init(int);
|
||||
bool evn_continue_talk_init(int);
|
||||
BOOL evn_talk();
|
||||
bool evn_turn_init(int);
|
||||
BOOL evn_turn();
|
||||
bool privateCut();
|
||||
BOOL event_action(void*);
|
||||
BOOL dummy_action(void*);
|
||||
BOOL _draw();
|
||||
BOOL _execute();
|
||||
BOOL _delete();
|
||||
cPhs_State _create();
|
||||
void CreateHeap();
|
||||
BOOL CreateHeap();
|
||||
void set_mtx();
|
||||
|
||||
public:
|
||||
/* 0x290 */ u8 m290[0x810 - 0x290];
|
||||
/* 0x290 */ request_of_phase_process_class mPhs;
|
||||
/* 0x298 */ mDoExt_McaMorf* mpMorf;
|
||||
/* 0x29C */ u32 mShadowID;
|
||||
/* 0x2A0 */ u8 m2A0[0x2A4 - 0x2A0];
|
||||
/* 0x2A4 */ J3DAnmTexPattern* m_head_tex_pattern;
|
||||
/* 0x2A8 */ mDoExt_btpAnm mBtpAnm;
|
||||
/* 0x2BC */ u8 mBtpFrame;
|
||||
/* 0x2BD */ u8 m2BD[0x2BE - 0x2BD];
|
||||
/* 0x2BE */ s16 mTimer;
|
||||
/* 0x2C0 */ u8 m2C0[0x2C4 - 0x2C0];
|
||||
/* 0x2C4 */ dBgS_ObjAcch mAcch;
|
||||
/* 0x488 */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x4C8 */ dCcD_Stts mStts;
|
||||
/* 0x504 */ dCcD_Cyl mCyl;
|
||||
/* 0x634 */ s8 m_head_jnt_num;
|
||||
/* 0x635 */ s8 m_backbone_jnt_num;
|
||||
/* 0x636 */ u8 m636[0x638 - 0x636];
|
||||
/* 0x638 */ dNpc_JntCtrl_c mJntCtrl;
|
||||
/* 0x66C */ dNpc_EventCut_c mEventCut;
|
||||
/* 0x6D8 */ STControl mSTControl;
|
||||
/* 0x700 */ dPath* mpPath;
|
||||
/* 0x704 */ s8 m704;
|
||||
/* 0x705 */ u8 m705[0x708 - 0x705];
|
||||
/* 0x708 */ cXyz mPathPointPos[5];
|
||||
/* 0x744 */ s8 m744[5];
|
||||
/* 0x749 */ s8 m749;
|
||||
/* 0x74A */ u8 m74A[0x758 - 0x74A];
|
||||
/* 0x758 */ cXyz mAttnBasePos;
|
||||
/* 0x764 */ s16 mLookAtMaxVel;
|
||||
/* 0x766 */ csXyz mActorAngle;
|
||||
/* 0x76C */ u8 m76C[0x76E - 0x76C];
|
||||
/* 0x76E */ s8 mMorfIsStop;
|
||||
/* 0x76F */ u8 m76F;
|
||||
/* 0x770 */ bool mbAttention;
|
||||
/* 0x771 */ u8 m771;
|
||||
/* 0x772 */ u8 m772[0x774 - 0x772];
|
||||
/* 0x774 */ f32 mMorfPrevFrame;
|
||||
/* 0x778 */ u32 m778;
|
||||
/* 0x77C */ u32 m77C;
|
||||
/* 0x780 */ u32 m780;
|
||||
/* 0x784 */ u32 m784;
|
||||
/* 0x788 */ int mShopIdx;
|
||||
/* 0x78C */ s32 m78C;
|
||||
/* 0x790 */ s16 mShopOutEventIdx;
|
||||
/* 0x792 */ u8 mShopSelectItemNo;
|
||||
/* 0x793 */ bool m793;
|
||||
/* 0x794 */ cXyz m794;
|
||||
/* 0x7A0 */ cXyz m7A0;
|
||||
/* 0x7AC */ ProcFunc mCurrProc;
|
||||
/* 0x7B8 */ ShopCam_action_c mShopCamAct;
|
||||
/* 0x810 */ ShopItems_c* mpShopItems;
|
||||
/* 0x814 */ u8 m814[0x968 - 0x814];
|
||||
};
|
||||
|
||||
class daNpc_Rsh1_HIO_c {
|
||||
public:
|
||||
daNpc_Rsh1_HIO_c();
|
||||
|
||||
public:
|
||||
/* Place member variables here */
|
||||
};
|
||||
/* 0x814 */ ShopItems_c mShopItemsArr[4];
|
||||
/* 0x924 */ __shop_items_set_data* mShopItemDataPtrs[12];
|
||||
/* 0x954 */ ShopCursor_c* mpShopCursor;
|
||||
/* 0x958 */ s8 m958;
|
||||
/* 0x959 */ s8 m959;
|
||||
/* 0x95A */ s8 m95A;
|
||||
/* 0x95B */ s8 m95B;
|
||||
/* 0x95C */ s8 m95C;
|
||||
/* 0x95D */ u8 m95D;
|
||||
/* 0x95E */ s8 m95E;
|
||||
/* 0x95F */ u8 m95F[0x960 - 0x95F];
|
||||
/* 0x960 */ s8 mActionStatus;
|
||||
/* 0x961 */ s8 m961;
|
||||
/* 0x962 */ s8 m962;
|
||||
/* 0x963 */ u8 mItemNo;
|
||||
/* 0x964 */ u8 m964[0x968 - 0x964];
|
||||
}; // Size: 0x968
|
||||
|
||||
#endif /* D_A_NPC_RSH1_H */
|
||||
|
||||
@@ -1086,6 +1086,12 @@ inline void dComIfGs_onGetItemReserve(int i_no) {
|
||||
g_dComIfG_gameInfo.save.getPlayer().getGetBagItem().onReserve(i_no);
|
||||
}
|
||||
|
||||
#if VERSION == VERSION_DEMO
|
||||
inline void dComIfGs_offGetItemReserve(u8 i_no) {
|
||||
g_dComIfG_gameInfo.save.getPlayer().getGetBagItem().offReserve(i_no);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline BOOL dComIfGs_isGetCollectMap(int i_no) {
|
||||
return g_dComIfG_gameInfo.save.getPlayer().getMap().isGetMap(i_no - 1);
|
||||
}
|
||||
|
||||
@@ -229,6 +229,9 @@ public:
|
||||
void onBait(u8);
|
||||
BOOL isBait(u8);
|
||||
void onReserve(u8);
|
||||
#if VERSION == VERSION_DEMO
|
||||
void offReserve(u8);
|
||||
#endif
|
||||
BOOL isReserve(u8);
|
||||
|
||||
/* 0x0 */ u32 mReserveFlags;
|
||||
|
||||
+5
-1
@@ -120,7 +120,11 @@ public:
|
||||
s16 getItemDataIdx() { return mItemSetListGlobalIdx; }
|
||||
void setItemDataIdx(s16 idx) { mItemSetListGlobalIdx = idx; }
|
||||
void setItemSum(s16 count) { mNumItems = count; }
|
||||
void init() {}
|
||||
void init() {
|
||||
mSelectedItemIdx = - 1;
|
||||
m3C = 0;
|
||||
mbIsHide = false;
|
||||
}
|
||||
|
||||
void createItem(int, int);
|
||||
BOOL Item_Select(int);
|
||||
|
||||
+1697
-92
File diff suppressed because it is too large
Load Diff
@@ -696,6 +696,13 @@ void dSv_player_get_bag_item_c::onReserve(u8 i_no) {
|
||||
mReserveFlags |= (1 << i_no);
|
||||
}
|
||||
|
||||
#if VERSION == VERSION_DEMO
|
||||
void dSv_player_get_bag_item_c::offReserve(u8 i_no) {
|
||||
JUT_ASSERT(1334, 0 <= i_no && i_no < 32);
|
||||
mReserveFlags &= ~(1 << i_no);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 8005ABB4-8005AC48 .text isReserve__25dSv_player_get_bag_item_cFUc */
|
||||
BOOL dSv_player_get_bag_item_c::isReserve(u8 i_no) {
|
||||
JUT_ASSERT(DEMO_SELECT(1349, 1355), 0 <= i_no && i_no < 32);
|
||||
|
||||
Reference in New Issue
Block a user