Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ def MatchingFor(*versions) -> bool:
ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_npc_fairy_seirei"),
ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_npc_fish"),
ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_npc_henna"),
ActorRel(NonMatching, "d_a_npc_kakashi"),
ActorRel(MatchingFor("GZ2E01"), "d_a_npc_kakashi"),
ActorRel(NonMatching, "d_a_npc_kkri"),
ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_npc_kolin"),
ActorRel(MatchingFor("GZ2E01", "GZ2J01"), "d_a_npc_maro"),
Expand Down
2 changes: 2 additions & 0 deletions include/d/actor/d_a_npc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
137 changes: 95 additions & 42 deletions include/d/actor/d_a_npc_kakashi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};


Expand Down
4 changes: 3 additions & 1 deletion include/d/d_com_static.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
59 changes: 30 additions & 29 deletions include/f_op/f_op_actor_mng.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
10 changes: 5 additions & 5 deletions src/d/actor/d_a_cow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,7 @@ void daCow_c::executeCrazyWait() {

mAcchCir.SetWall(100.0f, 110.0f);
mTimer1 = 30;
fopAcM_OffStatus(this, fopAcM_STATUS_UNK_000100);
fopAcM_OffStatus(this, fopAcM_STATUS_UNK_0x100);
}
}

Expand Down Expand Up @@ -2471,7 +2471,7 @@ void daCow_c::executeCrazyBack() {
}
break;
case daCow_c::Action_4:
fopAcM_OnStatus(this, fopAcM_STATUS_UNK_000100);
fopAcM_OnStatus(this, fopAcM_STATUS_UNK_0x100);
if (fopAcM_CheckCondition(this, fopAcCnd_NODRAW_e)) {
fopAcM_delete(this);
}
Expand Down Expand Up @@ -2547,19 +2547,19 @@ void daCow_c::action_crazy() {

dComIfGoat_SetThrow(this);
mMode = daCow_c::Mode_1;
fopAcM_OnStatus(this, fopAcM_STATUS_UNK_000100);
fopAcM_OnStatus(this, fopAcM_STATUS_UNK_0x100);
break;
case daCow_c::Mode_1:
TICK_TIMER(mForgetCowPTimer);
TICK_TIMER(mTimer1);

fopAcM_OnStatus(this, fopAcM_STATUS_UNK_004000);
fopAcM_OnStatus(this, fopAcM_STATUS_UNK_0x4000);
if (dComIfGp_event_runCheck() &&
strcmp(dComIfGp_getEventManager().getRunEventName(), "WILDGOAT") &&
strcmp(dComIfGp_getEventManager().getRunEventName(), "WILDGOAT_SUCCESS") &&
strcmp(dComIfGp_getEventManager().getRunEventName(), "WILDGOAT_FAILURE"))
{
fopAcM_OffStatus(this, fopAcM_STATUS_UNK_004000);
fopAcM_OffStatus(this, fopAcM_STATUS_UNK_0x4000);
}

switch (mCrazy) {
Expand Down
2 changes: 1 addition & 1 deletion src/d/actor/d_a_e_bi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ static int daE_BI_Execute(e_bi_class* i_this) {
a_this->attention_info.position.y += KREG_F(3) + 45.0f;

f32 fVar1 = 0.0f;
if (dComIfGp_checkPlayerStatus0(0, fopAcM_STATUS_UNK_800000)) {
if (dComIfGp_checkPlayerStatus0(0, fopAcM_STATUS_UNK_0x80000)) {
fVar1 = 100.0f;
}

Expand Down
4 changes: 2 additions & 2 deletions src/d/actor/d_a_e_dn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3372,7 +3372,7 @@ static cPhs__Step daE_DN_Create(fopAc_ac_c* a_this) {
l_HIO.field_0x4 = -1;
}

fopAcM_OnStatus(a_this, fopAcM_STATUS_UNK_000100);
fopAcM_OnStatus(a_this, fopAcM_STATUS_UNK_0x100);
a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e;
fopAcM_SetMtx(a_this, i_this->mpModelMorf->getModel()->getBaseTRMtx());
fopAcM_SetMin(a_this, -200.0f, -200.0f, -200.0f);
Expand Down Expand Up @@ -3444,7 +3444,7 @@ static cPhs__Step daE_DN_Create(fopAc_ac_c* a_this) {
if ((i_this->field_0x5b6 == 13 || i_this->field_0x5b6 == 14) || (i_this->field_0x5b6 == 15 || i_this->field_0x5b6 == 16)) {
i_this->field_0x10d8 = 1;
i_this->mAction = ACTION_REG;
fopAcM_OnStatus(a_this, fopAcM_STATUS_UNK_004000);
fopAcM_OnStatus(a_this, fopAcM_STATUS_UNK_0x4000);
i_this->mAcchCir.SetWall(80.0f, 2.0f);
}

Expand Down
2 changes: 1 addition & 1 deletion src/d/actor/d_a_e_fz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ s32 daE_FZ_c::create() {
speedF = rng + 4.0f;
field_0x6fc = rng + 4.0f;
if (field_0x714 == 1) {
fopAcM_OnStatus(this,fopAcM_STATUS_UNK_004000);
fopAcM_OnStatus(this,fopAcM_STATUS_UNK_0x4000);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/d/actor/d_a_e_mf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3234,7 +3234,7 @@ static cPhs__Step daE_MF_Create(fopAc_ac_c* a_this) {
l_HIO.field_0x4 = -1;
}

fopAcM_OnStatus(a_this, fopAcM_STATUS_UNK_000100);
fopAcM_OnStatus(a_this, fopAcM_STATUS_UNK_0x100);
a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e;
fopAcM_SetMtx(a_this, i_this->mpModelMorf->getModel()->getBaseTRMtx());
fopAcM_SetMin(a_this, -200.0f, -200.0f, -200.0f);
Expand Down Expand Up @@ -3302,7 +3302,7 @@ static cPhs__Step daE_MF_Create(fopAc_ac_c* a_this) {
i_this->mAtInfo.mpSound = &i_this->mSound;

if (strcmp(dComIfGp_getStartStageName(), "D_MN09") == 0) {
fopAcM_OnStatus(a_this, fopAcM_STATUS_UNK_004000);
fopAcM_OnStatus(a_this, fopAcM_STATUS_UNK_0x4000);
}

c_start = 1;
Expand Down
6 changes: 3 additions & 3 deletions src/d/actor/d_a_e_po.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ static void e_po_limbering(e_po_class* i_this) {
dComIfGp_event_reset();
daPy_getPlayerActorClass()->cancelOriginalDemo();
mRollDemoFlag = 2;
fopAcM_OffStatus(a_this, fopAcM_STATUS_UNK_004000);
fopAcM_OffStatus(a_this, fopAcM_STATUS_UNK_0x4000);
i_this->field_0x74A[2] = 0;
i_this->mActionID = ACT_ROLL_MOVE;
i_this->mType = 0;
Expand Down Expand Up @@ -1571,7 +1571,7 @@ static void e_po_roll_move(e_po_class* i_this) {
if (mRollDemoFlag != 0) {
anm_init(i_this, ANM_WAIT02, 10.0f, 2, 1.0f);
i_this->field_0x74A[1] = 2;
fopAcM_OffStatus(a_this, fopAcM_STATUS_UNK_004000);
fopAcM_OffStatus(a_this, fopAcM_STATUS_UNK_0x4000);
} else {
anm_init(i_this, ANM_RUN_AFTER2, 10.0f, 2, 1.0f);
i_this->field_0x74A[1] = 20;
Expand Down Expand Up @@ -1602,7 +1602,7 @@ static void e_po_roll_move(e_po_class* i_this) {
if (mRollPlus != 0) {
if (i_this->mAnmID == ANM_AWAKE) {
anm_init(i_this, ANM_WAIT02, 10.0f, 2, 1.0f);
fopAcM_OffStatus(a_this, fopAcM_STATUS_UNK_004000);
fopAcM_OffStatus(a_this, fopAcM_STATUS_UNK_0x4000);
}
i_this->field_0x7D4 = 0.0f;
i_this->mType = 2;
Expand Down
Loading