summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/d/actor/d_a_npc.h18
-rw-r--r--include/d/actor/d_a_npc_maro.h198
-rw-r--r--include/d/d_attention.h5
-rw-r--r--include/d/d_shop_camera.h4
-rw-r--r--include/d/d_shop_system.h11
5 files changed, 179 insertions, 57 deletions
diff --git a/include/d/actor/d_a_npc.h b/include/d/actor/d_a_npc.h
index faa906644a..da96b83fd0 100644
--- a/include/d/actor/d_a_npc.h
+++ b/include/d/actor/d_a_npc.h
@@ -286,6 +286,24 @@ public:
}
setDirect(i_direct);
}
+
+ void sorasu1(cXyz *arg0, u8 arg1) {
+ BOOL diff_ptrs = mAttnPosP != arg0;
+ if (setMode(5, diff_ptrs) != 0) {
+ mAttnPosP = arg0;
+ }
+
+ setDirect(arg1);
+ }
+
+ void sorasu2(cXyz *arg0, u8 arg1) {
+ BOOL diff_ptrs = mAttnPosP != arg0;
+ if (setMode(6, diff_ptrs) != 0) {
+ mAttnPosP = arg0;
+ }
+
+ setDirect(arg1);
+ }
};
class daNpcT_DmgStagger_c {
diff --git a/include/d/actor/d_a_npc_maro.h b/include/d/actor/d_a_npc_maro.h
index c1e961bd3c..0883942344 100644
--- a/include/d/actor/d_a_npc_maro.h
+++ b/include/d/actor/d_a_npc_maro.h
@@ -3,6 +3,7 @@
#include "SSystem/SComponent/c_counter.h"
#include "d/actor/d_a_npc.h"
+#include "d/d_shop_system.h"
/**
* @ingroup actors-npcs
@@ -12,24 +13,45 @@
* @details
*
*/
-class daNpc_Maro_c : public daNpcT_c {
+class daNpc_Maro_c : public dShopSystem_c {
public:
- typedef void (daNpc_Maro_c::*actionFunc)(void*);
+ typedef int (daNpc_Maro_c::*actionFunc)(void*);
+ typedef int (daNpc_Maro_c::*cutFunc)(int);
+
+ enum Type {
+ TYPE_0,
+ TYPE_1,
+ TYPE_2,
+ TYPE_3,
+ TYPE_4,
+ TYPE_5,
+ TYPE_6,
+ TYPE_7,
+ TYPE_8,
+ TYPE_9,
+ TYPE_10,
+ TYPE_11,
+ TYPE_12,
+ TYPE_13,
+ TYPE_14,
+ TYPE_15,
+ TYPE_16,
+ };
/* 8055B58C */ ~daNpc_Maro_c();
- /* 8055B6E0 */ void create();
- /* 8055B9A8 */ void CreateHeap();
- /* 8055BDE8 */ void Delete();
- /* 8055BE1C */ void Execute();
- /* 8055BF0C */ void Draw();
- /* 8055BFA0 */ void createHeapCallBack(fopAc_ac_c*);
- /* 8055BFC0 */ void ctrlJointCallBack(J3DJoint*, int);
- /* 8055C018 */ void srchArrow(void*, void*);
- /* 8055C0B4 */ void getArrowP();
- /* 8055C1AC */ void srchItaMato(void*, void*);
- /* 8055C248 */ void getItaMatoP(int);
- /* 8055C330 */ void getType();
- /* 8055C3E0 */ void isDelete();
+ /* 8055B6E0 */ int create();
+ /* 8055B9A8 */ int CreateHeap();
+ /* 8055BDE8 */ int Delete();
+ /* 8055BE1C */ int Execute();
+ /* 8055BF0C */ int Draw();
+ /* 8055BFA0 */ static int createHeapCallBack(fopAc_ac_c*);
+ /* 8055BFC0 */ static int ctrlJointCallBack(J3DJoint*, int);
+ /* 8055C018 */ static void* srchArrow(void*, void*);
+ /* 8055C0B4 */ fopAc_ac_c* getArrowP();
+ /* 8055C1AC */ static void* srchItaMato(void*, void*);
+ /* 8055C248 */ fopAc_ac_c* getItaMatoP(int);
+ /* 8055C330 */ u8 getType();
+ /* 8055C3E0 */ int isDelete();
/* 8055C614 */ void reset();
/* 8055C834 */ void afterJntAnm(int);
/* 8055C8B0 */ void setParam();
@@ -47,33 +69,33 @@ public:
/* 8055DA78 */ void drawOtherMdl();
/* 8055DAD8 */ daNpcT_faceMotionAnmData_c getFaceMotionAnm(daNpcT_faceMotionAnmData_c);
/* 8055DB64 */ daNpcT_motionAnmData_c getMotionAnm(daNpcT_motionAnmData_c);
- /* 8055DBF0 */ void selectAction();
- /* 8055DD08 */ void chkAction(int (daNpc_Maro_c::*)(void*));
- /* 8055DD34 */ void setAction(int (daNpc_Maro_c::*)(void*));
- /* 8055DDDC */ void cutConversationAboutPachinko(int);
- /* 8055DF7C */ void cutConversationAboutWoodSwd(int);
- /* 8055E124 */ void cutSwdTutorial(int);
- /* 8055E414 */ void cutHail(int);
- /* 8055E578 */ void cutFindMonkey(int);
- /* 8055E968 */ void cutGiveMeWoodSwd(int);
- /* 8055ECF4 */ void cutGetWoodSwd(int);
- /* 8055F508 */ void cutConversationWithMaro(int);
- /* 8055F634 */ void cutCacaricoConversation(int);
- /* 8055F82C */ void cutSurprise(int);
- /* 8055FAF0 */ void cutArrowTutorial(int);
- /* 805611E0 */ void cutBokinTalk(int);
- /* 80561328 */ void cutMarosWhisper(int);
- /* 80561614 */ void cutTagPush1(int);
- /* 8056178C */ void cutNotGonnaLet(int);
- /* 80561E70 */ void cutTalkToKakashi(int);
- /* 80562174 */ void wait(void*);
- /* 805629A4 */ void swdTutorial(void*);
- /* 80562B14 */ void talk_withTaro(void*);
- /* 80562CA4 */ void choccai(void*);
- /* 80562EC8 */ void tend(void*);
- /* 8056319C */ void arrowTutorial(void*);
- /* 8056342C */ void talk(void*);
- /* 80563660 */ void shop(void*);
+ /* 8055DBF0 */ int selectAction();
+ /* 8055DD08 */ int chkAction(int (daNpc_Maro_c::*)(void*));
+ /* 8055DD34 */ int setAction(int (daNpc_Maro_c::*)(void*));
+ /* 8055DDDC */ int cutConversationAboutPachinko(int);
+ /* 8055DF7C */ int cutConversationAboutWoodSwd(int);
+ /* 8055E124 */ int cutSwdTutorial(int);
+ /* 8055E414 */ int cutHail(int);
+ /* 8055E578 */ int cutFindMonkey(int);
+ /* 8055E968 */ int cutGiveMeWoodSwd(int);
+ /* 8055ECF4 */ int cutGetWoodSwd(int);
+ /* 8055F508 */ int cutConversationWithMaro(int);
+ /* 8055F634 */ int cutCacaricoConversation(int);
+ /* 8055F82C */ int cutSurprise(int);
+ /* 8055FAF0 */ int cutArrowTutorial(int);
+ /* 805611E0 */ int cutBokinTalk(int);
+ /* 80561328 */ int cutMarosWhisper(int);
+ /* 80561614 */ int cutTagPush1(int);
+ /* 8056178C */ int cutNotGonnaLet(int);
+ /* 80561E70 */ int cutTalkToKakashi(int);
+ /* 80562174 */ int wait(void*);
+ /* 805629A4 */ int swdTutorial(void*);
+ /* 80562B14 */ int talk_withTaro(void*);
+ /* 80562CA4 */ int choccai(void*);
+ /* 80562EC8 */ int tend(void*);
+ /* 8056319C */ int arrowTutorial(void*);
+ /* 8056342C */ int talk(void*);
+ /* 80563660 */ int shop(void*);
/* 805648A4 */ daNpc_Maro_c(
daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
daNpcT_motionAnmData_c const* i_motionAnmData,
@@ -81,7 +103,7 @@ public:
int i_faceMotionStepNum,
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_motionSequenceData, int i_motionStepNum,
daNpcT_evtData_c const* i_evtData, char** i_arcNames)
- : daNpcT_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
+ : dShopSystem_c(i_faceMotionAnmData, i_motionAnmData, i_faceMotionSequenceData,
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
i_arcNames) {
OS_REPORT("|%06d:%x|daNpc_Maro_c -> コンストラクト\n", g_Counter.mCounter0, this);
@@ -90,8 +112,10 @@ public:
/* 80564978 */ s32 getHeadJointNo();
/* 80564980 */ s32 getNeckJointNo();
/* 80564988 */ s32 getBackboneJointNo();
- /* 80564990 */ BOOL checkChangeJoint(int);
- /* 805649A0 */ BOOL checkRemoveJoint(int);
+ /* 80564990 */ BOOL checkChangeJoint(int arg0) { return arg0 == 4; };
+ /* 805649A0 */ BOOL checkRemoveJoint(int arg0) { return arg0 == 6; };
+
+ u8 getBitSW() { return (fopAcM_GetParam(this) & 0xFF0000) >> 16; }
void lostPlayer() { mPlayerActorMngr.remove(); }
BOOL checkNowMotionIsChoccai() {
@@ -113,22 +137,94 @@ public:
void startChoccai() { field_0x1134 = 1; }
void endChoccai() { field_0x1134 = 0; }
- static void* mCutNameList[17];
- static u8 mCutList[204];
+ static char* mCutNameList[17];
+ static cutFunc mCutList[17];
+
+ int getFlowNodeNo() {
+ u16 nodeNo = home.angle.x;
+ if (nodeNo == 0xffff) {
+ return -1;
+ }
+ return nodeNo;
+ }
+
+ u8 getMaxNumItem() {
+ return (fopAcM_GetParam(this) & 0xf000000) >> 0x18;
+ }
private:
- /* 0x0E40 */ u8 field_0xe40[0x1134 - 0xe40];
+ /* 0x0F7C */ int field_0xf7c;
+ /* 0x0F80 */ dCcD_Cyl mCyl1;
+ /* 0x10BC */ int field_0x10bc;
+ /* 0x10C0 */ u8 mType;
+ /* 0x10C4 */ daNpcT_ActorMngr_c mActorMngr[9];
+ /* 0x110C */ actionFunc field_0x110c;
+ /* 0x110C */ actionFunc field_0x1118;
+ /* 0x1124 */ u8 field_0x1124[0x1128 - 0x1124];
+ /* 0x1128 */ int field_0x1128;
+ /* 0x112C */ int field_0x112c;
+ /* 0x1130 */ u8 field_0x1130;
+ /* 0x1131 */ u8 field_0x1131;
+ /* 0x1132 */ u8 field_0x1132;
+ /* 0x1134 */ u8 field_0x1133;
/* 0x1134 */ u8 field_0x1134;
- /* 0x1135 */ u8 field_0x1135[0x1140 - 0x1135];
+ /* 0x1135 */ u8 field_0x1135;
+ /* 0x1136 */ u8 field_0x1136;
+ /* 0x1137 */ u8 field_0x1137;
+ /* 0x1138 */ u8 field_0x1138;
+ /* 0x1139 */ u8 field_0x1139;
+ /* 0x113A */ u8 field_0x113a[0x113C - 0x113A];
+ /* 0x113C */ u8 field_0x113C[0x1140 - 0x113C];
};
STATIC_ASSERT(sizeof(daNpc_Maro_c) == 0x1140);
class daNpc_Maro_Param_c {
public:
- /* 805649B0 */ ~daNpc_Maro_Param_c();
+ /* 805649B0 */ virtual ~daNpc_Maro_Param_c() {}
+
+ struct Data {
+ /* 0x00 */ f32 field_0x00;
+ /* 0x04 */ f32 field_0x04;
+ /* 0x08 */ f32 field_0x08;
+ /* 0x0C */ f32 field_0x0c;
+ /* 0x10 */ f32 field_0x10;
+ /* 0x14 */ f32 field_0x14;
+ /* 0x18 */ f32 field_0x18;
+ /* 0x1C */ f32 field_0x1c;
+ /* 0x20 */ f32 field_0x20;
+ /* 0x24 */ f32 field_0x24;
+ /* 0x28 */ f32 field_0x28;
+ /* 0x2C */ f32 field_0x2c;
+ /* 0x30 */ f32 field_0x30;
+ /* 0x34 */ f32 field_0x34;
+ /* 0x38 */ f32 field_0x38;
+ /* 0x3C */ f32 field_0x3c;
+ /* 0x40 */ f32 field_0x40;
+ /* 0x44 */ f32 field_0x44;
+ /* 0x48 */ s16 field_0x48;
+ /* 0x4A */ s16 field_0x4a;
+ /* 0x4C */ s16 field_0x4c;
+ /* 0x4E */ s16 field_0x4e;
+ /* 0x50 */ f32 field_0x50;
+ /* 0x54 */ u32 field_0x54;
+ /* 0x58 */ u32 field_0x58;
+ /* 0x5C */ u32 field_0x5c;
+ /* 0x60 */ u32 field_0x60;
+ /* 0x64 */ u32 field_0x64;
+ /* 0x68 */ u32 field_0x68;
+ /* 0x6C */ f32 field_0x6c;
+ /* 0x70 */ f32 field_0x70;
+ /* 0x74 */ f32 field_0x74;
+ /* 0x78 */ f32 field_0x78;
+ /* 0x7C */ f32 field_0x7c;
+ /* 0x80 */ f32 field_0x80;
+ /* 0x84 */ f32 field_0x84;
+ /* 0x88 */ f32 field_0x88;
+ /* 0x8C */ u32 field_0x8c;
+ };
- static u8 const m[144];
+ static const Data m;
};
diff --git a/include/d/d_attention.h b/include/d/d_attention.h
index 20884a94a6..188102f919 100644
--- a/include/d/d_attention.h
+++ b/include/d/d_attention.h
@@ -264,6 +264,11 @@ public:
mPadNo = i_padNo;
}
+ void offAttnDraw() {
+ draw[0].field_0x173 = 3;
+ draw[1].field_0x173 = 3;
+ }
+
static type_tbl_entry loc_type_tbl[3];
static type_tbl_entry act_type_tbl[5];
static dist_entry dist_table[234];
diff --git a/include/d/d_shop_camera.h b/include/d/d_shop_camera.h
index b2cc26ca44..da7d7884cc 100644
--- a/include/d/d_shop_camera.h
+++ b/include/d/d_shop_camera.h
@@ -36,6 +36,8 @@ struct ShopCam_action_c {
setCameraSpeed(0.25f, 20.0f, 0.25f, 5.0f);
}
+ void setCamDataIdx(int data_idx) { mCamDataIdx = data_idx; }
+
/* 0x00 */ ShopCamFunc mCamAction;
/* 0x0c */ u8 field_0xc[0x18 - 0xc];
/* 0x18 */ fopAc_ac_c* field_0x18;
@@ -67,7 +69,7 @@ struct ShopCam_action_c {
/* 0xD0 */ s16 field_0xd0;
/* 0xD2 */ s16 field_0xd2;
/* 0xD4 */ s16 field_0xd4;
- /* 0xD6 */ s16 field_0xd6;
+ /* 0xD6 */ s16 mCamDataIdx;
/* 0xD8 */ s16 field_0xd8;
/* 0xDA */ bool field_0xda;
};
diff --git a/include/d/d_shop_system.h b/include/d/d_shop_system.h
index 21c2e539bf..049e0744ec 100644
--- a/include/d/d_shop_system.h
+++ b/include/d/d_shop_system.h
@@ -41,7 +41,7 @@ public:
mShopCamAction.field_0xd0 = 0;
mShopCamAction.field_0xd2 = 0;
mShopCamAction.field_0xd4 = -1;
- mShopCamAction.field_0xd6 = 0;
+ mShopCamAction.mCamDataIdx = 0;
mShopCamAction.field_0x7c.x = 0.0f;
mShopCamAction.field_0x7c.y = 0.0f;
mShopCamAction.field_0x7c.z = 0.0f;
@@ -103,10 +103,10 @@ public:
/* 8019A364 */ void setSoldOut();
/* 8019A4F4 */ void setSoldOutItemHide();
/* 8019A564 */ void deleteObject();
- /* 8019A5D0 */ int searchItemActor();
+ /* 8019A5D0 */ bool searchItemActor();
/* 8019AB00 */ int getFlowNodeNum();
/* 8019AB1C */ void setSellItemMax(u8);
- /* 8019AB24 */ bool checkShopOpen();
+ /* 8019AB24 */ BOOL checkShopOpen();
/* 8019AB60 */ bool checkLeftTrigger(STControl*);
/* 8019AB84 */ bool checkRightTrigger(STControl*);
/* 8019ABA8 */ bool dpdMove();
@@ -122,8 +122,9 @@ public:
void offSpMode() { mSpMode = 0; }
u8 getEventParamU8(int param_0) { return (mEventParam >> (3 - param_0) * 8) & 0xFF; }
void setEventParam(u32 param) { mEventParam = param; }
+ void setMasterType(u8 master_type) { mMasterType = master_type; }
-private:
+public:
/* 0xE40 */ STControl* mpStick;
/* 0xE44 */ dSelect_cursor_c* mpDrawCursor;
/* 0xE48 */ dShopItemCtrl_c mItemCtrl;
@@ -145,7 +146,7 @@ private:
/* 0xF74 */ u8 mSoldOutItemFlags;
/* 0xF75 */ u8 mSpMode;
/* 0xF76 */ u8 field_0xf76;
- /* 0xF77 */ u8 field_0xf77;
+ /* 0xF77 */ u8 mMasterType;
/* 0xF78 */ u8 field_0xf78;
/* 0xF79 */ u8 field_0xf79;
/* 0xF7A */ u8 field_0xf7a;