npc_kakashi done (#2651)

This commit is contained in:
TakaRikka
2025-09-12 14:29:20 -07:00
committed by GitHub
parent 8a3a6d2997
commit f91257cc62
49 changed files with 1390 additions and 1705 deletions
+2
View File
@@ -790,6 +790,8 @@ BOOL daNpcT_chkTmpBit(u32 i_idx);
BOOL daNpcT_getPlayerInfoFromPlayerList(int param_0, int i_roomNo, cXyz* o_spawnPos,
csXyz* o_angle);
int daNpcT_judgeRace(dPath* i_path, fopAc_ac_c** param_1, daNpcT_pntData_c* i_pntData, int param_3, int* param_4);
BOOL daNpcT_chkActorInScreen(fopAc_ac_c* i_ActorP, f32 param_1, f32 param_2, f32 param_3,
f32 param_4, f32 param_5, f32 param_6, f32 param_7, int param_8);
class daBaseNpc_matAnm_c : public J3DMaterialAnm {
public:
+95 -42
View File
@@ -11,63 +11,116 @@
* @details
*
*/
class daNpc_Kakashi_c : public fopAc_ac_c {
class daNpc_Kakashi_c : public daNpcT_c {
public:
/* 8054B36C */ ~daNpc_Kakashi_c();
/* 8054B4E8 */ void create();
/* 8054B7D8 */ void CreateHeap();
/* 8054B908 */ void Delete();
/* 8054B93C */ void Execute();
/* 8054B994 */ void Draw();
/* 8054B9D8 */ void ctrlJoint(J3DJoint*, J3DModel*);
/* 8054BB34 */ void createHeapCallBack(fopAc_ac_c*);
/* 8054BB54 */ void ctrlJointCallBack(J3DJoint*, int);
/* 8054BBAC */ void getType();
/* 8054BC10 */ void isDelete();
typedef int (daNpc_Kakashi_c::*ActionFunc)(void*);
/* 8054B4E8 */ int create();
/* 8054B7D8 */ int CreateHeap();
/* 8054B908 */ int Delete();
/* 8054B93C */ int Execute();
/* 8054B994 */ int Draw();
/* 8054BB34 */ static int createHeapCallBack(fopAc_ac_c*);
/* 8054BB54 */ static int ctrlJointCallBack(J3DJoint*, int);
/* 8054BBAC */ int getType();
/* 8054BC10 */ int isDelete();
/* 8054BC98 */ void reset();
/* 8054BEA8 */ void setParam();
/* 8054BF88 */ void srchActors();
/* 8054BF8C */ void checkChangeEvt();
/* 8054C034 */ void evtTalk();
/* 8054C0D4 */ void evtEndProc();
/* 8054C0E8 */ void evtCutProc();
/* 8054C1B0 */ void action();
/* 8054C268 */ void beforeMove();
/* 8054C2E0 */ void setAttnPos();
/* 8054C584 */ void setCollision();
/* 8054C924 */ bool drawDbgInfo();
/* 8054C92C */ void selectAction();
/* 8054CA1C */ void chkAction(int (daNpc_Kakashi_c::*)(void*));
/* 8054CA48 */ void setAction(int (daNpc_Kakashi_c::*)(void*));
/* 8054CAF0 */ void hitChk();
/* 8054C92C */ int selectAction();
/* 8054CA1C */ BOOL chkAction(ActionFunc);
/* 8054CA48 */ int setAction(ActionFunc);
/* 8054CAF0 */ fopAc_ac_c* hitChk();
/* 8054CEA0 */ void setStaggerParam(fopAc_ac_c*);
/* 8054D26C */ void setPrtcls(int);
/* 8054D374 */ void judgeSwdTutorial();
/* 8054D490 */ void cutSwdTutorial(int);
/* 8054D57C */ void cutGetWoodSwd(int);
/* 8054D604 */ void cutMarosWhisper(int);
/* 8054D668 */ void wait(void*);
/* 8054D694 */ void swdTutorial(void*);
/* 8054D8BC */ void talk(void*);
/* 8054E804 */ daNpc_Kakashi_c(daNpcT_faceMotionAnmData_c const*, daNpcT_motionAnmData_c const*,
daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
daNpcT_MotionSeqMngr_c::sequenceStepData_c const*, int,
daNpcT_evtData_c const*, char**);
/* 8054D374 */ int judgeSwdTutorial();
/* 8054D490 */ int cutSwdTutorial(int);
/* 8054D57C */ int cutGetWoodSwd(int);
/* 8054D604 */ int cutMarosWhisper(int);
/* 8054D668 */ int wait(void*);
/* 8054D694 */ int swdTutorial(void*);
/* 8054D8BC */ int talk(void*);
static void* mCutNameList[4];
static u8 mCutList[48];
/* 8054E804 */ daNpc_Kakashi_c(daNpcT_faceMotionAnmData_c const* i_faceMotionAnmData,
daNpcT_motionAnmData_c const* i_motionAnmData,
daNpcT_MotionSeqMngr_c::sequenceStepData_c const* i_faceMotionSequenceData,
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,
i_faceMotionStepNum, i_motionSequenceData, i_motionStepNum, i_evtData,
i_arcNames)
{
OS_REPORT("|%06d:%x|daNpc_Kakashi_c -> コンストラクト\n", g_Counter.mCounter0, this);
}
/* 8054B36C */ virtual ~daNpc_Kakashi_c();
/* 8054B9D8 */ virtual int ctrlJoint(J3DJoint*, J3DModel*);
/* 8054BEA8 */ virtual void setParam();
/* 8054BF8C */ virtual BOOL checkChangeEvt();
/* 8054C034 */ virtual BOOL evtTalk();
/* 8054C0D4 */ virtual BOOL evtEndProc();
/* 8054C0E8 */ virtual BOOL evtCutProc();
/* 8054C1B0 */ virtual void action();
/* 8054C268 */ virtual void beforeMove();
/* 8054C2E0 */ virtual void setAttnPos();
/* 8054C584 */ virtual void setCollision();
/* 8054C924 */ virtual int drawDbgInfo();
int getFlowNodeNo() {
u16 prm = home.angle.x;
return prm == 0xFFFF ? -1 : prm;
}
u8 getTalkPattern() {
u8 var_r31 = (fopAcM_GetParam(this) & 0xF0000000) >> 0x1C;
if (var_r31 == 15) {
var_r31 = 0;
}
return var_r31;
}
u8 getBitSW() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
u8 getBitSW2() { return (fopAcM_GetParam(this) & 0xFF0000) >> 16; }
static char* mCutNameList[4];
static int (daNpc_Kakashi_c::*mCutList[])(int);
private:
/* 0x568 */ u8 field_0x568[0x1398 - 0x568];
/* 0x0E40 */ u8 field_0xE40[0xE44 - 0xE40];
/* 0x0E44 */ Z2SoundObjSimple mSound;
/* 0x0E64 */ dCcD_Cyl mCcCyl;
/* 0x0FA0 */ dCcD_Sph mCcSph[3];
/* 0x1348 */ u8 mType;
/* 0x134C */ ActionFunc mSelectAction;
/* 0x1358 */ ActionFunc mAction;
/* 0x1364 */ csXyz field_0x1364[3];
/* 0x1378 */ f32 field_0x1378[3];
/* 0x1384 */ s16 field_0x1384[3];
/* 0x138A */ u8 field_0x138A[0x138C - 0x138A];
/* 0x138C */ s16 field_0x138c;
/* 0x138E */ u8 field_0x138e;
/* 0x138F */ u8 field_0x138f;
/* 0x1390 */ u8 field_0x1390;
/* 0x1391 */ u8 field_0x1391;
/* 0x1392 */ u8 field_0x1392;
/* 0x1393 */ u8 field_0x1393;
/* 0x1394 */ u8 field_0x1394;
};
STATIC_ASSERT(sizeof(daNpc_Kakashi_c) == 0x1398);
struct daNpc_Kakashi_HIOParam {
/* 0x00 */ daNpcT_HIOParam common;
/* 0x8C */ f32 field_0x8c;
/* 0x90 */ f32 field_0x90;
/* 0x94 */ f32 field_0x94;
};
class daNpc_Kakashi_Param_c {
public:
/* 8054EA58 */ ~daNpc_Kakashi_Param_c();
/* 8054EA58 */ virtual ~daNpc_Kakashi_Param_c() {}
static u8 const m[152];
static const daNpc_Kakashi_HIOParam m;
};
+3 -1
View File
@@ -6,9 +6,11 @@
u8 daNpcKakashi_getSwdTutorialStep();
void daNpcKakashi_setSwdTutorialStep(u8 iEvtNum);
bool daNpcKakashi_getSwdTutorialResult();
BOOL daNpcKakashi_chkSwdTutorialStage();
u8 daNpcKakashi_chkSwdTutorialStage();
u8 daNpcKakashi_getSuccessCount();
void daNpcKakashi_clrSuccessCount();
void daNpcKakashi_setSwdTutorialResult(bool param_0);
void daNpcKakashi_incSuccessCount();
int daNpcMsg_setEvtNum(u8 iEvtNum);
#endif /* D_COM_D_COM_STATIC_H */
+30 -29
View File
@@ -114,35 +114,36 @@ struct DOUBLE_POS {
};
enum fopAcM_STATUS {
/* 0x0000001 */ fopAcM_STATUS_UNK_000001 = 1 << 0,
/* 0x0000002 */ fopAcM_STATUS_UNK_000002 = 1 << 1,
/* 0x0000004 */ fopAcM_STATUS_UNK_000004 = 1 << 2,
/* 0x0000008 */ fopAcM_STATUS_UNK_000008 = 1 << 3,
/* 0x0000010 */ fopAcM_STATUS_UNK_000010 = 1 << 4,
/* 0x0000020 */ fopAcM_STATUS_UNK_000020 = 1 << 5,
/* 0x0000040 */ fopAcM_STATUS_UNK_000040 = 1 << 6,
/* 0x0000080 */ fopAcM_STATUS_UNK_000080 = 1 << 7,
/* 0x0000100 */ fopAcM_STATUS_UNK_000100 = 1 << 8,
/* 0x0000200 */ fopAcM_STATUS_UNK_000200 = 1 << 9,
/* 0x0000400 */ fopAcM_STATUS_UNK_000400 = 1 << 10,
/* 0x0000800 */ fopAcM_STATUS_UNK_000800 = 1 << 11,
/* 0x0001000 */ fopAcM_STATUS_UNK_001000 = 1 << 12,
/* 0x0002000 */ fopAcM_STATUS_CARRY_NOW = 1 << 13,
/* 0x0004000 */ fopAcM_STATUS_UNK_004000 = 1 << 14,
/* 0x0008000 */ fopAcM_STATUS_UNK_008000 = 1 << 15,
/* 0x0010000 */ fopAcM_STATUS_UNK_010000 = 1 << 16,
/* 0x0020000 */ fopAcM_STATUS_UNK_200000 = 1 << 17,
/* 0x0040000 */ fopAcM_STATUS_UNK_400000 = 1 << 18,
/* 0x0080000 */ fopAcM_STATUS_UNK_800000 = 1 << 19,
/* 0x0100000 */ fopAcM_STATUS_HOOK_CARRY_NOW = 1 << 20,
/* 0x0200000 */ fopAcM_STATUS_UNK_2000000 = 1 << 21,
/* 0x0400000 */ fopAcM_STATUS_UNK_4000000 = 1 << 22,
/* 0x0800000 */ fopAcM_STATUS_UNK_8000000 = 1 << 23,
/* 0x1000000 */ fopAcM_STATUS_UNK_10000000 = 1 << 24,
/* 0x2000000 */ fopAcM_STATUS_UNK_20000000 = 1 << 25,
/* 0x4000000 */ fopAcM_STATUS_UNK_40000000 = 1 << 26,
/* 0x8000000 */ fopAcM_STATUS_UNK_80000000 = 1 << 27,
/* 0x8000000 */ fopAcM_STATUS_HAWK_CARRY_NOW = 1 << 31,
/* 0x00000001 */ fopAcM_STATUS_UNK_0x1 = 1 << 0,
/* 0x00000002 */ fopAcM_STATUS_UNK_0x2 = 1 << 1,
/* 0x00000004 */ fopAcM_STATUS_UNK_0x4 = 1 << 2,
/* 0x00000008 */ fopAcM_STATUS_UNK_0x8 = 1 << 3,
/* 0x00000010 */ fopAcM_STATUS_UNK_0x10 = 1 << 4,
/* 0x00000020 */ fopAcM_STATUS_UNK_0x20 = 1 << 5,
/* 0x00000040 */ fopAcM_STATUS_UNK_0x40 = 1 << 6,
/* 0x00000080 */ fopAcM_STATUS_UNK_0x80 = 1 << 7,
/* 0x00000100 */ fopAcM_STATUS_UNK_0x100 = 1 << 8,
/* 0x00000200 */ fopAcM_STATUS_UNK_0x200 = 1 << 9,
/* 0x00000400 */ fopAcM_STATUS_UNK_0x400 = 1 << 10,
/* 0x00000800 */ fopAcM_STATUS_UNK_0x800 = 1 << 11,
/* 0x00001000 */ fopAcM_STATUS_UNK_0x1000 = 1 << 12,
/* 0x00002000 */ fopAcM_STATUS_CARRY_NOW = 1 << 13,
/* 0x00004000 */ fopAcM_STATUS_UNK_0x4000 = 1 << 14,
/* 0x00008000 */ fopAcM_STATUS_UNK_0x8000 = 1 << 15,
/* 0x00010000 */ fopAcM_STATUS_UNK_0x10000 = 1 << 16,
/* 0x00020000 */ fopAcM_STATUS_UNK_0x20000 = 1 << 17,
/* 0x00040000 */ fopAcM_STATUS_UNK_0x40000 = 1 << 18,
/* 0x00080000 */ fopAcM_STATUS_UNK_0x80000 = 1 << 19,
/* 0x00100000 */ fopAcM_STATUS_HOOK_CARRY_NOW = 1 << 20,
/* 0x00200000 */ fopAcM_STATUS_UNK_0x200000 = 1 << 21,
/* 0x00400000 */ fopAcM_STATUS_UNK_0x400000 = 1 << 22,
/* 0x00800000 */ fopAcM_STATUS_UNK_0x800000 = 1 << 23,
/* 0x01000000 */ fopAcM_STATUS_UNK_0x1000000 = 1 << 24,
/* 0x02000000 */ fopAcM_STATUS_UNK_0x2000000 = 1 << 25,
/* 0x04000000 */ fopAcM_STATUS_UNK_0x4000000 = 1 << 26,
/* 0x08000000 */ fopAcM_STATUS_UNK_0x8000000 = 1 << 27,
/* 0x80000000 */ fopAcM_STATUS_HAWK_CARRY_NOW = 1 << 31,
};
inline s8 fopAcM_GetRoomNo(const fopAc_ac_c* i_actor) {