diff --git a/include/d/actor/d_a_e_ym.h b/include/d/actor/d_a_e_ym.h index bf35c6e76dc..a6fc0dd1a29 100644 --- a/include/d/actor/d_a_e_ym.h +++ b/include/d/actor/d_a_e_ym.h @@ -134,6 +134,7 @@ public: void setFriendFlag(u8 i_flag) { mFriendFlag |= i_flag; } u8 getFriendFlag() { return mFriendFlag; } u8 getSwitchBit() { return mSwitchBit; } + u8 isHide() { return mIsHide; } private: /* 0x5AC */ request_of_phase_process_class mPhase; diff --git a/include/d/actor/d_a_npc_ks.h b/include/d/actor/d_a_npc_ks.h index 55c6d55c58e..e826de4941f 100644 --- a/include/d/actor/d_a_npc_ks.h +++ b/include/d/actor/d_a_npc_ks.h @@ -4,6 +4,7 @@ #include "d/actor/d_a_npc.h" #include "d/actor/d_a_obj_so.h" #include "d/actor/d_a_obj_sw.h" +#include "f_op/f_op_actor_mng.h" /** * @ingroup actors-npcs @@ -15,16 +16,14 @@ */ class npc_ks_class { public: - /* 0x000 */ fopAc_ac_c actor; - /* 0x568 */ u8 field_0x568[0x570 - 0x568]; - /* 0x570 */ u8 field_0x570; - /* 0x571 */ u8 field_0x571[0x5b4 - 0x571]; + /* 0x000 */ fopEn_enemy_c actor; + /* 0x5AC */ request_of_phase_process_class mPhase; /* 0x5B4 */ u8 mRoomMonkeyID; /* 0x5B5 */ u8 field_0x5b5; /* 0x5B6 */ u8 field_0x5b6; /* 0x5B7 */ u8 field_0x5b7; /* 0x5B8 */ int field_0x5b8; - /* 0x5BC */ int field_0x5bc; + /* 0x5BC */ int bitTRB; /* 0x5C0 */ char* mResName; /* 0x5C4 */ f32 field_0x5c4; /* 0x5C8 */ s16 field_0x5c8; @@ -34,7 +33,7 @@ public: /* 0x5D8 */ mDoExt_btpAnm* mBtp1; /* 0x5DC */ mDoExt_btpAnm* mBtp2; /* 0x5E0 */ s16 field_0x5e0; - /* 0x5E2 */ u8 field_0x5e2[2]; + /* 0x5E2 */ s16 field_0x5e2; /* 0x5E4 */ s8 field_0x5e4; /* 0x5E5 */ u8 field_0x5e5; /* 0x5E6 */ s16 field_0x5e6; @@ -56,7 +55,7 @@ public: /* 0x610 */ s16 field_0x610; /* 0x614 */ cXyz field_0x614; /* 0x620 */ s8 field_0x620; - /* 0x621 */ u8 field_0x621; + /* 0x621 */ s8 field_0x621; /* 0x622 */ u8 field_0x622; /* 0x623 */ u8 field_0x623; /* 0x624 */ cXyz field_0x624; @@ -89,7 +88,9 @@ public: /* 0x98C */ dCcD_Cyl field_0x98c; /* 0xAC8 */ u8 field_0xac8[0xaec - 0xac8]; /* 0xAEC */ s8 field_0xaec; - /* 0xAED */ u8 field_0xaed[0xaf4 - 0xaed]; + /* 0xAED */ u8 field_0xaed; + /* 0xAEE */ s16 field_0xaee; + /* 0xAF0 */ s16 field_0xaf0; /* 0xAF4 */ dMsgFlow_c mMsgFlow; /* 0xB40 */ u8 field_0xb40; /* 0xB41 */ u8 field_0xb41; @@ -126,9 +127,16 @@ public: /* 0xBFC */ J3DModel* field_0xbfc; /* 0xC00 */ J3DModel* field_0xc00; /* 0xC04 */ cXyz field_0xc04; - /* 0xC10 */ u8 field_0xc10[0xc17 - 0xc10]; + /* 0xC10 */ f32 field_0xc10; + /* 0xC14 */ s16 field_0xc14; + /* 0xC16 */ s8 field_0xc16; /* 0xC17 */ s8 field_0xc17; - /* 0xC18 */ u8 field_0xc18[0xc20 - 0xc18]; + /* 0xC18 */ dPath* field_0xc18; + /* 0xC1C */ u8 field_0xc1c; + + u32 fopAcM_checkHawkCarryNow(fopAc_ac_c* param_1) { + return fopAcM_checkStatus(param_1, 0x80000000); + } }; STATIC_ASSERT(sizeof(npc_ks_class) == 0xc20); diff --git a/include/d/actor/d_a_npc_saru.h b/include/d/actor/d_a_npc_saru.h index 3368596c0b5..2c879f996c2 100644 --- a/include/d/actor/d_a_npc_saru.h +++ b/include/d/actor/d_a_npc_saru.h @@ -6,70 +6,156 @@ /** * @ingroup actors-npcs * @class daNpc_Saru_c - * @brief Monkey (Ook?) + * @brief Monkey NPC * * @details * */ -class daNpc_Saru_c : public fopAc_ac_c { + +#ifdef DEBUG +class daNpc_Saru_HIO_c : public mDoHIO_entry_c { + +}; +#endif + +class daNpc_Saru_Param_c { public: + /* 80AC448C */ virtual ~daNpc_Saru_Param_c() {}; + + struct Data { + /* 0x00 */ f32 field_0x00; + /* 0x04 */ f32 mGravity; + /* 0x08 */ f32 field_0x08; + /* 0x0C */ f32 field_0x0c; + /* 0x10 */ f32 mWeight; + /* 0x14 */ f32 mCylH; + /* 0x18 */ f32 mWallH; + /* 0x1C */ f32 mWallR; + /* 0x20 */ f32 mBodyDownAngle; + /* 0x24 */ f32 mBodyUpAngle; + /* 0x28 */ f32 mBodyRightAngle; + /* 0x2C */ f32 mBodyLeftAngle; + /* 0x30 */ f32 mHeadDownAngle; + /* 0x34 */ f32 mHeadUpAngle; + /* 0x38 */ f32 mHeadRightAngle; + /* 0x3C */ f32 mHeadLeftAngle; + /* 0x40 */ f32 field_0x40; + /* 0x44 */ f32 mMorfFrames; + /* 0x48 */ s16 field_0x48; + /* 0x4A */ s16 field_0x4a; + /* 0x4C */ s16 field_0x4c; + /* 0x4E */ s16 field_0x4e; + /* 0x50 */ f32 mAttnFovy; + /* 0x54 */ f32 field_0x54; + /* 0x58 */ f32 field_0x58; + /* 0x5C */ f32 field_0x5c; + /* 0x60 */ s16 field_0x60; + /* 0x62 */ s16 field_0x62; + /* 0x64 */ f32 field_0x64; + /* 0x68 */ f32 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 */ s16 field_0x8c; + /* 0x8E */ s16 field_0x8e; + }; + + static const Data m; +}; + +class daNpc_Saru_c : public daNpcT_c { +public: + typedef int (daNpc_Saru_c::*cutFunc)(int); + typedef int (daNpc_Saru_c::*actionFunc)(void*); + + enum Type { + TYPE_0, + TYPE_1, + TYPE_2, + TYPE_3, + }; + /* 80AC042C */ ~daNpc_Saru_c(); - /* 80AC0578 */ void create(); - /* 80AC082C */ void CreateHeap(); - /* 80AC0A54 */ void Delete(); - /* 80AC0A88 */ void Execute(); - /* 80AC0AA8 */ void Draw(); - /* 80AC0AEC */ void createHeapCallBack(fopAc_ac_c*); - /* 80AC0B0C */ void ctrlJointCallBack(J3DJoint*, int); - /* 80AC0B64 */ void srchYm(void*, void*); - /* 80AC0C0C */ void getType(); - /* 80AC0C58 */ void isDelete(); + /* 80AC0578 */ int create(); + /* 80AC082C */ int CreateHeap(); + /* 80AC0A54 */ int Delete(); + /* 80AC0A88 */ int Execute(); + /* 80AC0AA8 */ int Draw(); + /* 80AC0AEC */ static int createHeapCallBack(fopAc_ac_c*); + /* 80AC0B0C */ static int ctrlJointCallBack(J3DJoint*, int); + /* 80AC0B64 */ static void* srchYm(void*, void*); + /* 80AC0C0C */ u8 getType(); + /* 80AC0C58 */ int isDelete(); /* 80AC0CE8 */ void reset(); /* 80AC0EA4 */ void afterJntAnm(int); - /* 80AC0F28 */ void checkChangeEvt(); + /* 80AC0F28 */ BOOL checkChangeEvt(); /* 80AC0FDC */ void setParam(); /* 80AC1110 */ void setAfterTalkMotion(); /* 80AC1170 */ void srchActors(); - /* 80AC11D4 */ void evtTalk(); - /* 80AC1274 */ void evtCutProc(); + /* 80AC11D4 */ BOOL evtTalk(); + /* 80AC1274 */ BOOL evtCutProc(); /* 80AC133C */ void action(); /* 80AC14E4 */ void beforeMove(); /* 80AC15B4 */ void setAttnPos(); /* 80AC18A0 */ void setCollision(); - /* 80AC1A20 */ bool drawDbgInfo(); + /* 80AC1A20 */ int drawDbgInfo(); /* 80AC1A28 */ void drawOtherMdl(); - /* 80AC1B30 */ void selectAction(); - /* 80AC1B78 */ void chkAction(int (daNpc_Saru_c::*)(void*)); - /* 80AC1BA4 */ void setAction(int (daNpc_Saru_c::*)(void*)); + /* 80AC1B30 */ int selectAction(); + /* 80AC1B78 */ BOOL chkAction(int (daNpc_Saru_c::*)(void*)); + /* 80AC1BA4 */ int setAction(int (daNpc_Saru_c::*)(void*)); /* 80AC1C4C */ void setSe(); - /* 80AC216C */ void cutFindMonkey(int); - /* 80AC2368 */ void cutHelpMe(int); - /* 80AC2598 */ void cutYmLook(int); - /* 80AC28A4 */ void wait(void*); - /* 80AC2FD8 */ void talk(void*); - /* 80AC4394 */ daNpc_Saru_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**); + /* 80AC216C */ int cutFindMonkey(int); + /* 80AC2368 */ int cutHelpMe(int); + /* 80AC2598 */ int cutYmLook(int); + /* 80AC28A4 */ int wait(void*); + /* 80AC2FD8 */ int talk(void*); + /* 80AC4394 */ daNpc_Saru_c(daNpcT_faceMotionAnmData_c const* param_1, daNpcT_motionAnmData_c const* param_2, + daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_3, int param_4, + daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_5, int param_6, + daNpcT_evtData_c const* param_7, char** param_8) : + daNpcT_c(param_1, param_2, param_3, param_4, param_5, param_6, param_7, param_8) + {} /* 80AC4474 */ s32 getHeadJointNo(); /* 80AC447C */ s32 getNeckJointNo(); - /* 80AC4484 */ bool getBackboneJointNo(); + /* 80AC4484 */ s32 getBackboneJointNo(); - static void* mCutNameList[4]; - static u8 mCutList[48]; + u32 getFlowNodeNo() { + u16 rv = home.angle.x; + if (rv == 0xffff) { + return -1; + } + return rv; + } + + u8 getPathID() { return (fopAcM_GetParam(this) & 0xff0000) >> 16; } + u8 getBitSW() { return (fopAcM_GetParam(this) & 0xff00) >> 8; } + + static char* mCutNameList[4]; + static cutFunc mCutList[4]; private: - /* 0x568 */ u8 field_0x568[0xfe0 - 0x568]; + #ifdef DEBUG + /* 0xE90 */ daNpc_Saru_HIO_c* field_0xe90; + #endif + /* 0xE40 */ u8 field_0xe40[0xe44 - 0xe40]; + /* 0xE44 */ J3DModel* field_0xe44[2]; + /* 0xE4C */ dCcD_Cyl field_0xe4c; + /* 0xF88 */ u8 mType; + /* 0xF8C */ daNpcT_ActorMngr_c mActrMngr[1]; + /* 0xF94 */ daNpcT_Path_c mPath; + /* 0xFBC */ actionFunc field_0xfbc; + /* 0xFC8 */ actionFunc field_0xfc8; + /* 0xFD4 */ int field_0xfd4; + /* 0xFD8 */ u8 field_0xfd8; + /* 0xFD9 */ u8 field_0xfd9; + /* 0xFDC */ int field_0xfdc; }; STATIC_ASSERT(sizeof(daNpc_Saru_c) == 0xfe0); -class daNpc_Saru_Param_c { -public: - /* 80AC448C */ ~daNpc_Saru_Param_c(); - - static u8 const m[144]; -}; - - #endif /* D_A_NPC_SARU_H */ diff --git a/include/d/actor/d_a_obj_kago.h b/include/d/actor/d_a_obj_kago.h index c9bc9d68fcb..9d70650cc56 100644 --- a/include/d/actor/d_a_obj_kago.h +++ b/include/d/actor/d_a_obj_kago.h @@ -1,6 +1,9 @@ #ifndef D_A_OBJ_KAGO_H #define D_A_OBJ_KAGO_H +#include "SSystem/SComponent/c_math.h" +#include "d/d_bg_s_acch.h" +#include "d/d_cc_d.h" #include "f_op/f_op_actor_mng.h" /** @@ -13,34 +16,151 @@ */ class daObj_Kago_c : public fopAc_ac_c { public: - /* 80C31AEC */ ~daObj_Kago_c(); - /* 80C31D5C */ void create(); - /* 80C323D0 */ void CreateHeap(); - /* 80C324B0 */ void Delete(); - /* 80C324E4 */ void Execute(); - /* 80C332D0 */ void Draw(); - /* 80C333F0 */ void createHeapCallBack(fopAc_ac_c*); - /* 80C33410 */ void isDelete(); + /* 80C31D5C */ cPhs__Step create(); + /* 80C323D0 */ int CreateHeap(); + /* 80C324B0 */ int Delete(); + /* 80C324E4 */ int Execute(); + /* 80C332D0 */ int Draw(); + /* 80C333F0 */ static int createHeapCallBack(fopAc_ac_c*); + /* 80C33410 */ BOOL isDelete(); /* 80C334B4 */ void setEnvTevColor(); /* 80C33510 */ void setRoomNo(); /* 80C33554 */ void reset(); /* 80C3359C */ void setMtx(); - /* 80C33620 */ void getWallAngle(s16, s16*); + /* 80C33620 */ int getWallAngle(s16, s16*); /* 80C337B0 */ void setGoalPosAndAngle(); /* 80C338D0 */ void setSmokePrtcl(); /* 80C33958 */ void setWaterPrtcl(); /* 80C33A58 */ void setHamonPrtcl(); + + u8 getType() { + int iVar1 = fopAcM_GetParam(this) & 0xFF; + u8 rv; + + switch ((subtype & 127)) { + case 0: + switch (iVar1) { + case 0: + return 0; + } + break; + + case 1: + switch (iVar1) { + case 0: + return 1; + + case 1: + return 2; + + case 2: + return 3; + } + } + + return 4; + } + + void setMtx(Mtx param_1) { + cXyz sp18; + field_0xba2 = 1; + mDoMtx_stack_c::copy(param_1); + mDoMtx_stack_c::multVecZero(&sp18); + current.pos = sp18; + old.pos = current.pos; + field_0x574->setBaseTRMtx(param_1); + } + + u32 fopAcM_checkHawkCarryNow(fopAc_ac_c* actor) { + return fopAcM_checkStatus(actor, 0x80000000); + } + + void popup(f32 param_1, f32 param_2, cXyz* param_3) { + if (param_3 != NULL) { + current.pos = *param_3; + old.pos = current.pos; + } + + int iVar1 = cM_deg2s(param_2); + speed.setall(0.0f); + speed.y = param_1 * cM_ssin(iVar1); + speedF = param_1 * cM_scos(iVar1); + field_0xb44 = 6; + field_0xb70 = 0x4000; + field_0xb9e = 1; + field_0xb68 = 0.0f; + } + private: - /* 0x568 */ u8 field_0x568[0xba8 - 0x568]; + /* 0x568 */ u8 field_0x568[0x56c - 0x568]; + /* 0x56C */ request_of_phase_process_class mPhase; + /* 0x574 */ J3DModel* field_0x574; + /* 0x578 */ dBgS_ObjAcch mObjAcch; + /* 0x750 */ dCcD_Stts mStts; + /* 0x78C */ dBgS_AcchCir mAcchCir; + /* 0x7CC */ cBgS_GndChk field_0x7cc; + /* 0x808 */ dCcD_Cyl field_0x808[2]; + /* 0xA80 */ cM3dGLin field_0xa80; + /* 0xA9C */ dBgS_LinChk field_0xa9c; + /* 0xB0C */ f32 field_0xb0c; + /* 0xB10 */ u8 mType; + /* 0xB14 */ cXyz field_0xb14; + /* 0xB20 */ cXyz field_0xb20; + /* 0xB2C */ csXyz field_0xb2c; + /* 0xB32 */ u8 field_0xb32[0xb44 - 0xb32]; + /* 0xB44 */ int field_0xb44; + /* 0xB48 */ int field_0xb48; + /* 0xB4C */ int field_0xb4c; + /* 0xB50 */ f32 field_0xb50; + /* 0xB54 */ f32 mGroundH; + /* 0xB58 */ f32 mWaterY; + /* 0xB5C */ u8 field_0xb5c[0xb64 - 0xb5c]; + /* 0xB64 */ f32 field_0xb64; + /* 0xB68 */ f32 field_0xb68; + /* 0xB6C */ s16 field_0xb6c; + /* 0xB6E */ s16 field_0xb6e; + /* 0xB70 */ s16 field_0xb70; + /* 0xB72 */ u8 field_0xb72[0xb74 - 0xb72]; + /* 0xB74 */ s16 field_0xb74; + /* 0xB76 */ s16 field_0xb76; + /* 0xB78 */ u32 field_0xb78; + /* 0xB7C */ u32 mWaterPrtcls[4]; + /* 0xB8C */ u32 mHamonPrtcl; + /* 0xB90 */ u8 field_0xb90[0xb94 - 0xb90]; + /* 0xB94 */ u32 field_0xb94; + /* 0xB98 */ u32 field_0xb98; + /* 0xB9C */ u8 field_0xb9c; + /* 0xB9D */ u8 field_0xb9d; + /* 0xB9E */ u8 field_0xb9e; + /* 0xB9F */ u8 field_0xb9f; + /* 0xBA0 */ u8 field_0xba0; + /* 0xBA1 */ u8 field_0xba1; + /* 0xBA2 */ u8 field_0xba2; + /* 0xBA3 */ u8 field_0xba3; + // vtable + /* 80C31AEC */ virtual ~daObj_Kago_c(); }; STATIC_ASSERT(sizeof(daObj_Kago_c) == 0xba8); class daObj_Kago_Param_c { public: - /* 80C33C14 */ ~daObj_Kago_Param_c(); + /* 80C33C14 */ virtual ~daObj_Kago_Param_c() {} - static u8 const m[44]; + struct Data { + /* 0x00 */ f32 field_0x00; + /* 0x04 */ f32 mGravity; + /* 0x08 */ f32 field_0x08; + /* 0x0C */ f32 field_0x0c; + /* 0x10 */ f32 mWeight; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ f32 mWallH; + /* 0x1C */ f32 mWallR; + /* 0x20 */ f32 field_0x20; + /* 0x24 */ f32 field_0x24; + /* 0x28 */ f32 field_0x28; + }; + static const Data m; }; diff --git a/include/d/actor/d_a_obj_so.h b/include/d/actor/d_a_obj_so.h index dfa01c4b60c..5b43356ae74 100644 --- a/include/d/actor/d_a_obj_so.h +++ b/include/d/actor/d_a_obj_so.h @@ -1,6 +1,9 @@ #ifndef D_A_OBJ_SO_H #define D_A_OBJ_SO_H +#include "d/d_bg_s_acch.h" +#include "d/d_cc_d.h" +#include "d/d_cc_uty.h" #include "f_op/f_op_actor_mng.h" /** @@ -11,28 +14,79 @@ * @details * */ -class obj_so_class : public fopAc_ac_c { +class obj_so_class { public: - /* 0x0568 */ u8 field_0x568[0x8fc - 0x568]; - /* 0x08FC */ f32 field_0x8fc; - /* 0x0900 */ f32 field_0x900; - /* 0x0904 */ u8 field_0x904[0x91c - 0x904]; - /* 0x091C */ int field_0x91c; - /* 0x0920 */ cXyz field_0x920[12]; - /* 0x09B0 */ u8 field_0x9b0[0xdac - 0x9b0]; + /* 0x0000 */ fopAc_ac_c actor; + /* 0x0568 */ request_of_phase_process_class mPhase; + /* 0x0570 */ u8 field_0x570; + /* 0x0571 */ u8 field_0x571; + /* 0x0574 */ J3DModel* field_0x574; + /* 0x0578 */ u8 field_0x578[0x594 - 0x578]; + /* 0x0594 */ J3DModel* field_0x594[26]; + /* 0x05FC */ s8 field_0x5fc[26]; + /* 0x0618 */ cXyz field_0x618[26]; + /* 0x0750 */ f32 field_0x750[26]; + /* 0x07B8 */ cXyz field_0x7b8[26]; + /* 0x08F0 */ cXyz field_0x8f0[26]; + /* 0x0A28 */ csXyz field_0xa28[26]; + /* 0x0AC4 */ csXyz field_0xac4[26]; + /* 0x0B60 */ s16 field_0xb60[2]; + /* 0x0B64 */ u8 field_0xb64[0xb94 - 0xb64]; + /* 0x0B94 */ s16 field_0xb94[2]; + /* 0x0B98 */ u8 field_0xb98[0xbc8 - 0xb98]; + /* 0x0BC8 */ s16 field_0xbc8[2]; + /* 0x0BCC */ u8 field_0xbcc[0xbfc - 0xbcc]; + /* 0x0BFC */ s16 field_0xbfc[2]; + /* 0x0C00 */ u8 field_0xc00[0xc30 - 0xc00]; + /* 0x0C30 */ s8 field_0xc30[26]; + /* 0x0C4C */ u32 field_0xc4c[26]; + /* 0x0CB4 */ u32 field_0xcb4[26]; + /* 0x0D1C */ Z2Creature mSound; /* 0x0DAC */ s16 field_0xdac; /* 0x0DAE */ s16 field_0xdae; - /* 0x0DB0 */ u8 field_0xdb0[0xdc4 - 0xdb0]; + /* 0x0DB0 */ s16 field_0xdb0; + /* 0x0DB2 */ s16 field_0xdb2[2]; + /* 0x0DB6 */ s16 field_0xdb6; + /* 0x0DB8 */ s16 field_0xdb8; + /* 0x0DBA */ s16 field_0xdba; + /* 0x0DBC */ s16 field_0xdbc; + /* 0x0DBE */ s16 field_0xdbe; + /* 0x0DC0 */ s16 field_0xdc0; + /* 0x0DC2 */ s16 field_0xdc2; /* 0x0DC4 */ s8 field_0xdc4; - /* 0x0DC5 */ u8 field_0xdc5[0xdc8 - 0xdc5]; /* 0x0DC8 */ f32 field_0xdc8; - /* 0x0DCC */ u8 field_0xdcc[0x1054 - 0xdcc]; + /* 0x0DCC */ dBgS_AcchCir mAcchCir; + /* 0x0E0C */ dBgS_ObjAcch mObjAcch; + /* 0x0FE4 */ u8 field_0xfe4[0xfec - 0xfe4]; + /* 0x0FEC */ Mtx mBgMtx[2]; + /* 0x104C */ dBgW* mBgW[2]; /* 0x1054 */ s8 field_0x1054; - /* 0x1055 */ u8 field_0x1055[0x1a98 - 0x1055]; - /* 0x1A98 */ s8 field_0x1a98[7]; - /* 0x1A9F */ u8 field_0x1a9f[0x1bd0 - 0x1a9f]; + /* 0x1056 */ s16 field_0x1056; + /* 0x1058 */ dCcD_Stts mStts; + /* 0x1094 */ dCcU_AtInfo mAtInfo; + /* 0x10B8 */ dCcD_Cyl field_0x10b8[8]; + /* 0x1A98 */ s8 field_0x1a98[8]; + /* 0x1AA0 */ J3DModel* field_0x1aa0[8]; + /* 0x1AC0 */ cXyz field_0x1ac0[8]; + /* 0x1B20 */ s16 field_0x1b20[8]; + /* 0x1B30 */ s16 field_0x1b30[8]; + /* 0x1B40 */ s16 field_0x1b40[8]; + /* 0x1B50 */ s16 field_0x1b50[8]; + /* 0x1B60 */ s8 field_0x1b60; + /* 0x1B64 */ Mtx mMtx; + /* 0x1B94 */ fpc_ProcID field_0x1b94; + /* 0x1B98 */ u32 field_0x1b98; + /* 0x1B9C */ u32 field_0x1b9c; + /* 0x1BA0 */ s16 mDemoMode; + /* 0x1BA2 */ s16 field_0x1ba2; + /* 0x1BA4 */ cXyz mDemoCamEye; + /* 0x1BB0 */ cXyz mDemoCamCenter; + /* 0x1BBC */ f32 mDemoCamFovy; + /* 0x1BC0 */ f32 field_0x1bc0; + /* 0x1BC4 */ u8 field_0x1bc4[0x1bcc - 0x1bc4]; + /* 0x1BCC */ u8 field_0x1bcc; - bool partBreak() { + u8 partBreak() { for (int i = 0; i < 8; i++) { if (field_0x1a98[i] == 2) return 1; } @@ -42,10 +96,15 @@ public: STATIC_ASSERT(sizeof(obj_so_class) == 0x1bd0); -class daObj_So_HIO_c { +class daObj_So_HIO_c : public JORReflexible { public: /* 80CE03CC */ daObj_So_HIO_c(); - /* 80CE3928 */ ~daObj_So_HIO_c(); + /* 80CE3928 */ virtual ~daObj_So_HIO_c() {} + + void genMessage(JORMContext*); + + /* 0x04 */ s8 field_0x4; + /* 0x08 */ f32 mScale; }; diff --git a/include/d/d_com_inf_game.h b/include/d/d_com_inf_game.h index d87ccdf5cb9..b9e5461a052 100644 --- a/include/d/d_com_inf_game.h +++ b/include/d/d_com_inf_game.h @@ -1058,6 +1058,7 @@ u8 dComIfGs_getSelectMixItemNoArrowIndex(int i_selmixItemIdx); BOOL dComIfGs_isStageTbox(int i_stageNo, int i_no); s8 dComIfGs_PolyDamageOff_Check(); void dComIfGs_shake_kandelaar(); +int dComIfGs_shake_kandelaar_check(); void dComIfGs_Grass_hide_Set(s8 param_0); void dComIfGs_onGetMagicUseFlag(); void dComIfG_playerStatusD(); diff --git a/src/d/actor/d_a_npc_ks.cpp b/src/d/actor/d_a_npc_ks.cpp index 9c2a7044277..641e7596da0 100644 --- a/src/d/actor/d_a_npc_ks.cpp +++ b/src/d/actor/d_a_npc_ks.cpp @@ -4,8 +4,8 @@ */ #include "d/actor/d_a_npc_ks.h" +#include "d/actor/d_a_obj_kago.h" #include "d/d_cc_d.h" -#include "dol2asm.h" #include "d/d_camera.h" #include "d/d_com_inf_game.h" #include "d/d_bomb.h" @@ -23,6 +23,7 @@ #include "d/d_meter2_info.h" #include "cmath.h" #include "d/actor/d_a_e_oc.h" +#include "d/d_stage.h" #include "Z2AudioLib/Z2Instances.h" UNK_REL_DATA; @@ -32,425 +33,171 @@ static npc_ks_class* saru_p[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +struct path { + int field_0x0; + f32 field_0x4; + f32 field_0x8; + f32 field_0xc; + u32 field_0x10; + u32 field_0x14; + u32 field_0x18; + u32 field_0x1c; + u32 field_0x20; + u32 field_0x24; + u32 field_0x28; + u32 field_0x2c; + u32 field_0x30; +}; + /* 80A5E4D0-80A5E63C 000078 016C+00 1/1 0/0 0/0 .data guide_path_04 */ -static f32 guide_path_04[91] = { - // 0, -4554.0f, 3893.0f, -2377.0f, 0, 0, 0 - // 0, 0, 0, 0, 0, 0, 1, - // -3379.0f, 3944.0f, -2314.0f, 0, 0, 0, 0, - // 0, 0, 0, 0, 0, 1, -1887.0f, - // 3944.0f, -2184.0f, 0, 0, 0, 0, 0, - // 0, 0, 0, 0, 1, -912.0f, 3907.0f, - // -2243.0f, 0, 0, 0, 0, 0, 0, - // 0, 0, 0, 0, 100.0f, 3900.0f, -2536.0f, - // 0, 0, 0, 0, 0, 0, 0, - // 0, 0, 1, 519.0f, 4590.0f, -2889.0f, 0, - // 0, 0, 0, 0, 0, 0, 0, - // 0, -1, 0, 0, 0, 0, 0, - // 0, 0, 0, 0, 0, 0, 0, - 0x00000000, 0xC58E5000, 0x45735000, 0xC5149000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, - 0xC5533000, 0x45768000, 0xC510A000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0xC4EBE000, - 0x45768000, 0xC5088000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0xC4640000, 0x45743000, - 0xC50C3000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x42C80000, 0x4573C000, 0xC51E8000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000001, 0x4401C000, 0x458F7000, 0xC5349000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, +static path guide_path_04[7] = { + { 0, -4554.0f, 3893.0f, -2377.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, -3379.0f, 3944.0f, -2314.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, -1887.0f, 3944.0f, -2184.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, -912.0f, 3907.0f, -2243.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 100.0f, 3900.0f, -2536.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 519.0f, 4590.0f, -2889.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; /* 80A5E67C-80A5E780 000224 0104+00 1/1 0/0 0/0 .data move_path_02 */ -static f32 move_path_02[65] = { - 0x00000000, 0x462A7800, 0x456A4000, 0x4590B000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x462BE800, 0x456A4000, - 0x457F5000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x46334800, - 0x456A4000, 0x4567D000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x463B9C00, 0x45672000, 0x455E1000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x463D1C00, 0x4544C000, 0x4594C000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, +static path move_path_02[5] = { + { 0, 10910.0f, 3748.0f, 4630.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 11002.0f, 3748.0f, 4085.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 11474.0f, 3748.0f, 3709.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 12007.0f, 3698.0f, 3553.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 12103.0f, 3148.0f, 4760.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; /* 80A5E948-80A5E94C 0004F0 0004+00 1/1 0/0 0/0 .data yuka_jump_x */ static f32 yuka_jump_x = 80.0f; /* 80A5EA24-80A5EC2C 0005CC 0208+00 1/1 0/0 0/0 .data guide_path_00 */ -static u8 guide_path_00[520] = { - 0x00, 0x00, 0x00, 0x00, 0x42, 0x58, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0xA6, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x1C, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, - 0x45, 0xAE, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x70, 0x00, 0x00, - 0x45, 0x4C, 0xC0, 0x00, 0x45, 0xB6, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x41, 0x00, 0x00, 0x00, 0x45, 0x4A, 0x20, 0x00, 0x45, 0xBF, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xBF, 0x80, 0x00, 0x00, 0x45, 0x47, 0xE0, 0x00, 0x45, 0xC7, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xA0, 0x00, 0x00, 0x45, 0x45, 0xA0, 0x00, - 0x45, 0xCE, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x38, 0x00, 0x00, - 0x45, 0x44, 0xE0, 0x00, 0x45, 0xD6, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x43, 0x1F, 0x00, 0x00, 0x45, 0x44, 0xE0, 0x00, 0x45, 0xDD, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x43, 0x92, 0x00, 0x00, 0x45, 0x44, 0xE0, 0x00, 0x45, 0xE1, 0x98, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +static path guide_path_00[10] = { + { 0, 54.0f, 3300.0f, 5328.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 39.0f, 3300.0f, 5592.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 15.0f, 3276.0f, 5849.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 8.0f, 3234.0f, 6132.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, -1.0f, 3198.0f, 6372.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 5.0f, 3162.0f, 6620.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 46.0f, 3150.0f, 6877.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 159.0f, 3150.0f, 7102.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 292.0f, 3150.0f, 7219.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; /* 80A5EC2C-80A5ED98 0007D4 016C+00 1/1 0/0 0/0 .data guide_path_00_2 */ -SECTION_DATA static u8 guide_path_00_2[364] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0xE0, 0x00, 0x45, 0xD3, 0xB8, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x10, 0x00, 0x00, 0x45, 0x47, 0xB0, 0x00, - 0x45, 0xC9, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, - 0x45, 0x4B, 0x70, 0x00, 0x45, 0xBC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3F, 0x80, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0xAF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0x9F, 0xA0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +static path guide_path_00_2[7] = { + { 0, 0.0f, 3150.0f, 6775.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 9.0f, 3195.0f, 6449.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 1.0f, 3255.0f, 6044.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 1.0f, 3300.0f, 5612.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, -2.0f, 3300.0f, 5108.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; /* 80A5ED98-80A5EED0 000940 0138+00 1/1 0/0 0/0 .data guide_path_00_3 */ -SECTION_DATA static u8 guide_path_00_3[312] = { - 0x00, 0x00, 0x00, 0x00, 0xC2, 0xA2, 0x00, 0x00, 0x45, 0x44, 0xE0, 0x00, 0x45, 0xCA, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xAE, 0x00, 0x00, 0x45, 0x48, 0x00, 0x00, - 0x45, 0xC1, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xF2, 0x00, 0x00, - 0x45, 0x4B, 0x20, 0x00, 0x45, 0xB7, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x43, 0x20, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0xAF, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x42, 0x40, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0x99, 0x50, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +static path guide_path_00_3[6] = { + { 0, -81.0f, 3150.0f, 6492.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 87.0f, 3200.0f, 6191.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 121.0f, 3250.0f, 5857.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 160.0f, 3300.0f, 5622.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 48.0f, 3300.0f, 4906.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; /* 80A5EED0-80A5F140 000A78 0270+00 1/1 0/0 0/0 .data guide_path_01 */ -SECTION_DATA static u8 guide_path_01[624] = { - 0x00, 0x00, 0x00, 0x00, 0x45, 0xA4, 0x70, 0x00, 0x45, 0x48, 0xD0, 0x00, 0x45, 0xF0, 0xF0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xBA, 0x80, 0x00, 0x45, 0x4B, 0x20, 0x00, - 0x45, 0xDF, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xC3, 0x50, 0x00, - 0x45, 0x4F, 0x80, 0x00, 0x45, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0xC5, 0x88, 0x00, 0x45, 0x55, 0xC0, 0x00, 0x45, 0xC9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x45, 0xCB, 0x50, 0x00, 0x45, 0x55, 0xC0, 0x00, 0x45, 0xBA, 0x50, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0xD8, 0x90, 0x00, 0x45, 0x55, 0xF0, 0x00, - 0x45, 0xAB, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0xDB, 0xA8, 0x00, - 0x45, 0x51, 0xC0, 0x00, 0x45, 0x96, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0xF5, 0x38, 0x00, 0x45, 0x52, 0xD0, 0x00, 0x45, 0x8D, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x46, 0x03, 0x68, 0x00, 0x45, 0x59, 0x50, 0x00, 0x45, 0x8D, 0x90, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0F, 0xC0, 0x00, 0x45, 0x57, 0xD0, 0x00, - 0x45, 0x97, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x20, 0x00, 0x00, - 0x45, 0x6A, 0x70, 0x00, 0x45, 0x98, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +static path guide_path_01[12] = { + { 0, 5262.0f, 3213.0f, 7710.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 5968.0f, 3250.0f, 7167.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 6250.0f, 3320.0f, 6656.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 6321.0f, 3420.0f, 6432.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 6506.0f, 3420.0f, 5962.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 6930.0f, 3423.0f, 5477.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 7029.0f, 3356.0f, 4814.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 7847.0f, 3373.0f, 4538.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 8410.0f, 3477.0f, 4530.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 9200.0f, 3453.0f, 4839.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 10240.0f, 3751.0f, 4888.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; /* 80A5F140-80A5F584 000CE8 0444+00 1/1 0/0 0/0 .data guide_path_02 */ -SECTION_DATA static u8 guide_path_02[1092] = { - 0x00, 0x00, 0x00, 0x00, 0x46, 0x40, 0x4C, 0x00, 0x45, 0x45, 0x00, 0x00, 0x45, 0xA3, 0xA8, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x4A, 0x04, 0x00, 0x45, 0x45, 0x00, 0x00, - 0x45, 0xAC, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x52, 0xC8, 0x00, - 0x45, 0x48, 0x20, 0x00, 0x45, 0xAA, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x46, 0x58, 0xF4, 0x00, 0x45, 0x51, 0x80, 0x00, 0x45, 0xA0, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x46, 0x5B, 0x94, 0x00, 0x45, 0x54, 0xA0, 0x00, 0x45, 0x95, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x5B, 0x10, 0x00, 0x45, 0x5A, 0x60, 0x00, - 0x45, 0x87, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x56, 0x34, 0x00, - 0x45, 0x5F, 0xB0, 0x00, 0x45, 0x72, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x46, 0x52, 0x84, 0x00, 0x45, 0x66, 0xF0, 0x00, 0x45, 0x64, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x46, 0x4C, 0x60, 0x00, 0x45, 0x6A, 0x80, 0x00, 0x45, 0x57, 0xF0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x49, 0x64, 0x00, 0x45, 0x6B, 0x40, 0x00, - 0x45, 0x4C, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x46, 0x47, 0x30, 0x00, 0x45, 0x45, 0x00, 0x00, 0x45, 0x98, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x46, 0x4C, 0xA4, 0x00, 0x45, 0x45, 0x00, 0x00, 0x45, 0xA5, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x54, 0x48, 0x00, 0x45, 0x48, 0x20, 0x00, - 0x45, 0xAE, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x59, 0x9C, 0x00, - 0x45, 0x4E, 0x60, 0x00, 0x45, 0xA9, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x46, 0x5E, 0x08, 0x00, 0x45, 0x54, 0xA0, 0x00, 0x45, 0x99, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x46, 0x5C, 0x80, 0x00, 0x45, 0x5A, 0x60, 0x00, 0x45, 0x83, 0xC8, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x55, 0x84, 0x00, 0x45, 0x64, 0x80, 0x00, - 0x45, 0x60, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x50, 0x74, 0x00, - 0x45, 0x69, 0x70, 0x00, 0x45, 0x52, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x46, 0x4B, 0x6C, 0x00, 0x45, 0x6A, 0x80, 0x00, 0x45, 0x56, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, +static path guide_path_02[21] = { + { 0, 12307.0f, 3152.0f, 5237.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 12929.0f, 3152.0f, 5512.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 13490.0f, 3202.0f, 5456.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 13885.0f, 3352.0f, 5122.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 14053.0f, 3402.0f, 4796.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 14020.0f, 3494.0f, 4337.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 13709.0f, 3579.0f, 3878.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 13473.0f, 3695.0f, 3649.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 13080.0f, 3752.0f, 3455.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 12889.0f, 3764.0f, 3265.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 12748.0f, 3152.0f, 4865.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 13097.0f, 3152.0f, 5282.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 13586.0f, 3202.0f, 5575.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 13927.0f, 3302.0f, 5421.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 14210.0f, 3402.0f, 4899.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 14112.0f, 3494.0f, 4217.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 13665.0f, 3656.0f, 3593.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 13341.0f, 3735.0f, 3363.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 13019.0f, 3752.0f, 3436.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; /* 80A5F584-80A5F6BC 00112C 0138+00 1/1 0/0 0/0 .data guide_path_22 */ -SECTION_DATA static u8 guide_path_22[312] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x13, 0x20, 0x00, 0x46, 0x4A, 0x34, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x45, 0x3B, 0x80, 0x00, - 0x46, 0x49, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0x44, 0xE0, 0x00, 0x46, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0xE0, 0x00, 0x46, 0x3E, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x44, 0xE0, 0x00, 0x46, 0x36, 0xBC, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +static path guide_path_22[6] = { + { 0, 0.0f, 2354.0f, 12941.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 0.0f, 3000.0f, 12879.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0.0f, 3150.0f, 12556.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0.0f, 3150.0f, 12164.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0.0f, 3150.0f, 11695.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; /* 80A5F6BC-80A5F890 001264 01D4+00 1/1 0/0 0/0 .data guide_path_09 */ -SECTION_DATA static u8 guide_path_09[468] = { - 0x00, 0x00, 0x00, 0x00, 0x45, 0xE7, 0x18, 0x00, 0x45, 0x4C, 0x90, 0x00, 0xC5, 0x98, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE7, 0x60, 0x00, 0x45, 0x4C, 0x90, 0x00, - 0xC5, 0xAC, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE7, 0x60, 0x00, - 0x45, 0x49, 0x90, 0x00, 0xC5, 0xC3, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0xE7, 0xB8, 0x00, 0x45, 0x49, 0x90, 0x00, 0xC5, 0xCD, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x45, 0xE6, 0xD0, 0x00, 0x45, 0x54, 0xF0, 0x00, 0xC5, 0xD1, 0x18, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE5, 0x38, 0x00, 0x45, 0x5C, 0x10, 0x00, - 0xC5, 0xDA, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xE1, 0xE8, 0x00, - 0x45, 0x61, 0x00, 0x00, 0xC5, 0xF1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0xE4, 0xB8, 0x00, 0x45, 0x61, 0x20, 0x00, 0xC6, 0x03, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, +static path guide_path_09[9] = { + { 0, 7395.0f, 3273.0f, -4866.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 7404.0f, 3273.0f, -5527.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 7404.0f, 3225.0f, -6251.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 7415.0f, 3225.0f, -6578.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 7386.0f, 3407.0f, -6691.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 7335.0f, 3521.0f, -7005.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 7229.0f, 3600.0f, -7728.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 7319.0f, 3602.0f, -8395.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; /* 80A5F890-80A5F994 001438 0104+00 1/1 0/0 0/0 .data guide_path_12 */ -SECTION_DATA static u8 guide_path_12[260] = { - 0x00, 0x00, 0x00, 0x00, 0x45, 0xE6, 0x50, 0x00, 0x45, 0x61, 0x00, 0x00, 0xC6, 0x14, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xEA, 0x60, 0x00, 0x45, 0x67, 0x20, 0x00, - 0xC6, 0x1A, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x45, 0xFE, 0x10, 0x00, - 0x45, 0x53, 0x20, 0x00, 0xC6, 0x28, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x46, 0x08, 0xB8, 0x00, 0x45, 0x65, 0xB0, 0x00, 0xC6, 0x27, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, +static path guide_path_12[5] = { + { 0, 7370.0f, 3600.0f, -9473.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 7500.0f, 3698.0f, -9867.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 8130.0f, 3378.0f, -10770.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, 8750.0f, 3675.0f, -10744.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; /* 80A5F994-80A5FA98 00153C 0104+00 1/1 0/0 0/0 .data guide_path_0409 */ -SECTION_DATA static u8 guide_path_0409[260] = { - 0x00, 0x00, 0x00, 0x00, 0x45, 0xD8, 0xD8, 0x00, 0x45, 0x58, 0x60, 0x00, 0xC3, 0x66, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xDD, 0x28, 0x00, 0x45, 0x5B, 0xE0, 0x00, - 0xC4, 0x58, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0xDE, 0x80, 0x00, - 0x45, 0x60, 0x70, 0x00, 0xC4, 0xC7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x45, 0xE3, 0xE0, 0x00, 0x45, 0x61, 0xD0, 0x00, 0xC5, 0x24, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, +static path guide_path_0409[5] = { + { 0, 6939.0f, 3462.0f, -230.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 7077.0f, 3518.0f, -866.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 7120.0f, 3591.0f, -1596.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 7292.0f, 3613.0f, -2636.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; /* 80A5FA98-80A5FC04 001640 016C+00 1/1 0/0 0/0 .data guide_path_fs */ -SECTION_DATA static u8 guide_path_fs[364] = { - 0x00, 0x00, 0x00, 0x01, 0xC7, 0x17, 0x82, 0x00, 0x44, 0x8E, 0x80, 0x00, 0xC6, 0xB6, 0x32, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xC7, 0x15, 0x33, 0x00, 0x44, 0x3B, 0x80, 0x00, - 0xC6, 0xB0, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x14, 0x41, 0x00, - 0x44, 0x2D, 0x80, 0x00, 0xC6, 0xAB, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xC7, 0x12, 0xE6, 0x00, 0x44, 0x08, 0x40, 0x00, 0xC6, 0xA9, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xC7, 0x11, 0x26, 0x00, 0x43, 0x99, 0x00, 0x00, 0xC6, 0xA8, 0xF8, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC7, 0x0E, 0xC4, 0x00, 0x43, 0xAE, 0x00, 0x00, - 0xC6, 0xA7, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -/* 80A5FCB0-80A5FCBC 001858 000C+00 0/0 0/0 0/0 .data dx$11146 */ -static f32 dx[3] = { - 0x45E32000, 0x45A17000, 0x46104400, -}; - -/* 80A5FCBC-80A5FCC8 001864 000C+00 0/0 0/0 0/0 .data dy$11147 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 dy[12] = { - 0x45, 0x61, 0x00, 0x00, 0x45, 0x4E, 0x40, 0x00, 0x45, 0x4E, 0x40, 0x00, -}; -#pragma pop - -/* 80A5FCC8-80A5FCD4 001870 000C+00 0/0 0/0 0/0 .data dz$11148 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 dz[12] = { - 0xC5, 0x53, 0xD0, 0x00, 0xC5, 0xA6, 0x78, 0x00, 0xC5, 0xA6, 0x58, 0x00, -}; -#pragma pop - -/* 80A5FD30-80A5FD74 0018D8 0044+00 1/1 0/0 0/0 .data cc_cyl_src$11445 */ -static dCcD_SrcCyl cc_cyl_src = { - { - {0x0, {{0x0, 0x0, 0x0}, {0xd8fafd3f, 0x3}, 0x79}}, // mObj - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {0.0f, 0.0f, 0.0f}, // mCenter - 30.0f, // mRadius - 20.0f // mHeight - } // mCyl +static path guide_path_fs[7] = { + { 1, -38786.0f, 1140.0f, -23321.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 1, -38195.0f, 750.0f, -22650.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, -37953.0f, 694.0f, -22015.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, -37606.0f, 545.0f, -21748.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, -37158.0f, 306.0f, -21628.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, -36548.0f, 348.0f, -21429.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { -1, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; /* 80A48F8C-80A49000 0000EC 0074+00 1/1 0/0 0/0 .text __ct__14daNpc_Ks_HIO_cFv */ @@ -507,7 +254,6 @@ static BOOL otherBgCheck(fopAc_ac_c* p_actor, fopAc_ac_c* p_actor2) { /* 80A491A4-80A4932C 000304 0188+00 29/29 0/0 0/0 .text anm_init__FP12npc_ks_classifUcf */ static void anm_init(npc_ks_class* i_this, int param_2, f32 i_morf, u8 i_attr, f32 i_rate) { - // NONMATCHING - REGALLOC if (i_this->field_0x94c != 0 && (param_2 == 51 || param_2 == 53)) { if (cM_rndF(1.0f) < 0.5f) { param_2 = 11; @@ -519,30 +265,30 @@ static void anm_init(npc_ks_class* i_this, int param_2, f32 i_morf, u8 i_attr, f int i_index = param_2; if (i_this->field_0xc17 != 0) { if (param_2 == 51) { - i_index = 52; + param_2 = 52; } else if (param_2 == 8) { - i_index = 9; + param_2 = 9; } else if (param_2 == 28) { - i_index = 29; + param_2 = 29; } else if (param_2 == 26) { - i_index = 27; + param_2 = 27; } else if (param_2 == 8) { - i_index = 9; + param_2 = 9; } else if (param_2 == 7) { - i_index = 10; + param_2 = 10; } else if (param_2 == 43) { - i_index = 40; + param_2 = 40; } else if (param_2 == 39) { - i_index = 42; + param_2 = 42; } else if (param_2 == 39) { - i_index = 42; + param_2 = 42; } else { dComIfGs_shake_kandelaar(); } } - i_this->mpModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes(i_this->mResName, i_index), i_attr, i_morf, i_rate, 0.0f, -1.0f); - i_this->field_0x5d0 = param_2; + i_this->mpModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes(i_this->mResName, param_2), i_attr, i_morf, i_rate, 0.0f, -1.0f); + i_this->field_0x5d0 = i_index; } /* 80A4932C-80A49660 00048C 0334+00 1/1 0/0 0/0 .text nodeCallBack__FP8J3DJointi */ @@ -655,12 +401,6 @@ static void* s_resq_sub(void* i_actor, void* i_data) { UNK_REL_BSS; -/* 80A5FE88-80A5FE94 000048 000C+00 0/1 0/0 0/0 .bss @4022 */ -#pragma push -#pragma force_active on -static u8 lit_4022[12]; -#pragma pop - /* 80A5FE94-80A5FEA0 000054 000C+00 1/5 0/0 0/0 .bss obj_pos */ static cXyz obj_pos; @@ -668,16 +408,10 @@ static cXyz obj_pos; static npc_ks_class* leader; /* 80A5FEA4-80A5FEA8 000064 0004+00 7/9 0/0 0/0 .bss call_pt */ -static u8 call_pt[4]; +static u32 call_pt; /* 80A5FEA8-80A5FEAC 000068 0004+00 1/2 0/0 0/0 .bss None */ -static u8 data_80A5FEA8[4]; - -/* 80A5FEAC-80A5FEB8 00006C 000C+00 0/1 0/0 0/0 .bss @4025 */ -#pragma push -#pragma force_active on -static u8 lit_4025[12]; -#pragma pop +static u8 data_80A5FEA8; /* 80A5FEB8-80A5FEF0 000078 0038+00 16/22 0/0 0/0 .bss l_HIO */ static daNpc_Ks_HIO_c l_HIO; @@ -695,6 +429,7 @@ static void* s_b_sub(void* i_actor, void* i_data) { target_info[target_info_count] = i_actor; target_info_count++; } + return NULL; } @@ -705,7 +440,9 @@ static int target_bgc[10]; static fopAc_ac_c* search_bomb(npc_ks_class* i_this, int param_2) { // NONMATCHING fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* actor_p; target_info_count = 0; + for (int i = 0; i < 10; i++) { target_info[i] = NULL; target_bgc[i] = 0; @@ -715,16 +452,14 @@ static fopAc_ac_c* search_bomb(npc_ks_class* i_this, int param_2) { f32 fVar1 = 50.0f; if (target_info_count != 0) { - cXyz sp4c, sp58; - fopAc_ac_c* actor_p; + cXyz sp4c; int i = 0; while (i < target_info_count) { actor_p = (fopAc_ac_c*)target_info[i]; sp4c.x = actor_p->current.pos.x - a_this->eyePos.x; sp4c.y = (actor_p->current.pos.y + 50.0f) - a_this->eyePos.y; sp4c.z = actor_p->current.pos.z - a_this->eyePos.z; - f32 fVar2 = JMAFastSqrt(sp4c.x * sp4c.x + sp4c.z * sp4c.z); - if (fVar2 < fVar1) { + if (JMAFastSqrt(sp4c.x * sp4c.x + sp4c.z * sp4c.z) < fVar1) { if (param_2 == 0) { return actor_p; } @@ -782,9 +517,9 @@ static void* s_e_sub(void* i_actor, void* i_data) { static fopAc_ac_c* search_enemy(npc_ks_class* i_this, int param_2, f32 param_3) { // NONMATCHING fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* enemy_p; if (dComIfGp_event_runCheck()) { - daMidna_c* midnaActor = daPy_py_c::getMidnaActor(); - if (fopAcM_getTalkEventPartner(daPy_getLinkPlayerActorClass()) != (fopAc_ac_c *)midnaActor) { + if (fopAcM_getTalkEventPartner(daPy_getLinkPlayerActorClass()) != (fopAc_ac_c *)daPy_py_c::getMidnaActor()) { return NULL; } } @@ -806,17 +541,16 @@ static fopAc_ac_c* search_enemy(npc_ks_class* i_this, int param_2, f32 param_3) cXyz sp68; int i = 0; while (i < target_info_count) { - fopAc_ac_c* pEnemy = (fopAc_ac_c*)target_info[i]; - sp68.x = pEnemy->current.pos.x - a_this->eyePos.x; - sp68.y = (pEnemy->current.pos.y + 50.0f) - a_this->eyePos.y; - sp68.z = pEnemy->current.pos.z - a_this->eyePos.z; - f32 fVar3 = JMAFastSqrt(sp68.x * sp68.x + sp68.z * sp68.z); - if (fVar3 < fVar1) { + enemy_p = (fopAc_ac_c*)target_info[i]; + sp68.x = enemy_p->current.pos.x - a_this->eyePos.x; + sp68.y = (enemy_p->current.pos.y + 50.0f) - a_this->eyePos.y; + sp68.z = enemy_p->current.pos.z - a_this->eyePos.z; + if (JMAFastSqrt(sp68.x * sp68.x + sp68.z * sp68.z) < fVar1) { if (param_2 == 0) { - return pEnemy; + return enemy_p; } - if (target_bgc[i] != 0 || fopAcM_otherBgCheck(a_this, pEnemy)) { + if (target_bgc[i] != 0 || fopAcM_otherBgCheck(a_this, enemy_p)) { target_bgc[i] = 1; } else if (fabsf(sp68.y) <= fVar2) { s16 sVar1 = a_this->shape_angle.y - cM_atan2s(sp68.x, sp68.z); @@ -825,7 +559,7 @@ static fopAc_ac_c* search_enemy(npc_ks_class* i_this, int param_2, f32 param_3) } if ((u16)sVar1 < 20000) { - return pEnemy; + return enemy_p; } } } @@ -916,40 +650,41 @@ static void npc_ks_pole_ori(npc_ks_class* i_this) { fopAc_ac_c* a_this = &i_this->actor; if (leader != NULL) { if (i_this->mMode == 0) { - obj_so_class* cage_p = (obj_so_class*)fpcM_Search(s_ori_sub, i_this); - if (cage_p == NULL) { + fopAc_ac_c* actor = (fopAc_ac_c*)fpcM_Search(s_ori_sub, i_this); + if (actor != NULL) { + a_this->parentActorID = fopAcM_GetID(actor); + anm_init(i_this, 20, 5.0f, 2, 1.0f); + i_this->mMode++; + i_this->mMode = 1; + } else { return; } - - a_this->parentActorID = fopAcM_GetID(cage_p); - anm_init(i_this, 20, 5.0f, 2, 1.0f); - i_this->mMode++; - i_this->mMode = 1; } obj_so_class* cage_p = (obj_so_class*)fopAcM_SearchByID(a_this->parentActorID); if (cage_p != NULL) { - if (cage_p->health == 0) { + if (cage_p->actor.health == 0) { i_this->mActionID = 201; i_this->mMode = 10; - dComIfGs_onTbox(i_this->field_0x5bc); + dComIfGs_onTbox(i_this->bitTRB); } else { if (i_this->mMode < 10 && cage_p->field_0xdae != 0) { i_this->mMode = 10; i_this->mpModelMorf->setPlaySpeed(0.0f); } - if (((i_this->mMode != 10 && i_this->mMode < 10) && i_this->mMode == 1) && - (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(20.0f))) { + if (i_this->mMode != 10 && i_this->mMode < 10 && i_this->mMode != 1) { + if (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(20.0f)) { cage_p->field_0xdc8 += 400.0f; cage_p->field_0xdac = 0; i_this->mSound.startCreatureSound(Z2SE_OBJ_MONKEYJAIL_CREAK, 0, -1); i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_PRISONED, -1); + } } - a_this->current.angle.y = cage_p->shape_angle.y; - a_this->current.angle.x = cage_p->shape_angle.x; - a_this->current.pos = cage_p->current.pos; + a_this->current.angle.y = cage_p->actor.shape_angle.y; + a_this->current.angle.x = cage_p->actor.shape_angle.x; + a_this->current.pos = cage_p->actor.current.pos; if (leader->field_0xb42 == 0) { if (!dComIfGs_isSwitch(20, fopAcM_GetRoomNo(a_this))) { @@ -1083,7 +818,7 @@ static int npc_ks_ori(npc_ks_class* i_this) { int swBit = fopAcM_GetParam(a_this) >> 24; if (swBit != 0xFF) { if (dComIfGs_isSwitch(swBit, fopAcM_GetRoomNo(a_this))) { - dComIfGs_onTbox(i_this->field_0x5bc); + dComIfGs_onTbox(i_this->bitTRB); if (i_this->field_0x5b6 >= 5) { i_this->mMode = 11; i_this->mTimers[0] = 80; @@ -1141,14 +876,14 @@ static int npc_ks_ori2(npc_ks_class* i_this) { return rv; } - a_this->home.angle.y = cage_p->shape_angle.y; + a_this->home.angle.y = cage_p->actor.shape_angle.y; if (i_this->mMode <= 2 && cage_p->field_0x1054 != 0) { i_this->mMode = 3; i_this->mTimers[0] = 90; int swBit = fopAcM_GetParam(a_this) >> 24; dComIfGs_onSwitch(swBit, fopAcM_GetRoomNo(a_this)); - dComIfGs_onTbox(i_this->field_0x5bc); + dComIfGs_onTbox(i_this->bitTRB); s8 roomNo = fopAcM_GetRoomNo(a_this); if (roomNo == 4) { @@ -1164,12 +899,11 @@ static int npc_ks_ori2(npc_ks_class* i_this) { cXyz sp40; s16 sVar1 = i_this->field_0xbde + (a_this->home.angle.y - 1000); - // sVar1 += -1000; f32 fVar1 = 0.0f; switch (i_this->mMode) { case 1: if (i_this->mpModelMorf->checkFrame(46.0f)) { - i_this->field_0xbde = i_this->field_0x5c8 - a_this->home.angle.y & 0xE000; + i_this->field_0xbde = i_this->field_0x5c8 - a_this->home.angle.y & -0x2000; } if (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(20.0f)) { @@ -1287,18 +1021,18 @@ static int npc_ks_ori2(npc_ks_class* i_this) { a_this->speedF = 0.0f; // fallthrough case 11: - if ((int)guide_path_04[i_this->field_0x904 * 13] != 0) { - i_this->field_0x8f0.x = guide_path_04[i_this->field_0x904 * 13 + 1]; - i_this->field_0x8f0.y = guide_path_04[i_this->field_0x904 * 13 + 2]; - i_this->field_0x8f0.z = guide_path_04[i_this->field_0x904 * 13 + 3]; + if (guide_path_04[i_this->field_0x904].field_0x0 != 0) { + i_this->field_0x8f0.x = guide_path_04[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.y = guide_path_04[i_this->field_0x904].field_0x8; + i_this->field_0x8f0.z = guide_path_04[i_this->field_0x904].field_0xc; i_this->field_0x910 = a_this->current.pos; i_this->field_0x91c = i_this->field_0x8f0; i_this->mMode = 12; anm_init(i_this, 32, 2.0f, 0, 1.0f); a_this->speedF = 0.0f; } else { - i_this->field_0x8f0.x = guide_path_04[i_this->field_0x904 * 13 + 1]; - i_this->field_0x8f0.z = guide_path_04[i_this->field_0x904 * 13 + 3]; + i_this->field_0x8f0.x = guide_path_04[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.z = guide_path_04[i_this->field_0x904].field_0xc; i_this->mMode = 15; a_this->speedF = l_HIO.field_0x1c; if (i_this->field_0x5d0 != 26) { @@ -1320,13 +1054,13 @@ static int npc_ks_ori2(npc_ks_class* i_this) { sp40 = i_this->field_0x8f0 - a_this->current.pos; i_this->field_0x8fc.y = cM_atan2s(sp40.x, sp40.z); - i_this->field_0x8fc.x = -cM_atan2s(sp40.x, JMAFastSqrt(sp40.x * sp40.x + sp40.z * sp40.z)); - if (sp40.abs() < (a_this->speedF * 1.2f)) { + i_this->field_0x8fc.x = -cM_atan2s(sp40.y, JMAFastSqrt(sp40.x * sp40.x + sp40.z * sp40.z)); + if (sp40.abs() < a_this->speedF * 1.2f) { a_this->current.pos = i_this->field_0x8f0; i_this->mMode = 11; i_this->field_0xbe0 = 1; i_this->field_0x904++; - if ((int)guide_path_04[i_this->field_0x904 * 13] < 0) { + if (guide_path_04[i_this->field_0x904].field_0x0 < 0) { fopAcM_delete(a_this); } } @@ -1353,8 +1087,8 @@ static int npc_ks_ori2(npc_ks_class* i_this) { cLib_addCalcAngleS2(&a_this->current.angle.y, sVar1, 2, 0x2000); if (i_this->mMode < 7) { - a_this->current.angle.x = cage_p->shape_angle.x; - a_this->current.pos = cage_p->current.pos; + a_this->current.angle.x = cage_p->actor.shape_angle.x; + a_this->current.pos = cage_p->actor.current.pos; a_this->current.pos.y += fVar1; } @@ -1471,9 +1205,9 @@ static int npc_ks_demo_02(npc_ks_class* i_this) { i_this->field_0x904 = 0; // fallthrough case 1: - i_this->field_0x8f0.x = move_path_02[i_this->field_0x904 * 13 + 1]; - i_this->field_0x8f0.y = move_path_02[i_this->field_0x904 * 13 + 2]; - i_this->field_0x8f0.z = move_path_02[i_this->field_0x904 * 13 + 3]; + i_this->field_0x8f0.x = move_path_02[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.y = move_path_02[i_this->field_0x904].field_0x8; + i_this->field_0x8f0.z = move_path_02[i_this->field_0x904].field_0xc; i_this->mMode = 2; // fallthrough case 2: @@ -1495,7 +1229,7 @@ static int npc_ks_demo_02(npc_ks_class* i_this) { break; case 10: - cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->shape_angle.y + 0x8000, 2, 0x1000); + cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->actor.shape_angle.y + 0x8000, 2, 0x1000); if (i_this->mTimers[0] == 0) { i_this->mMode = 11; anm_init(i_this, 26, 5.0f, 2, 1.0f); @@ -1504,12 +1238,12 @@ static int npc_ks_demo_02(npc_ks_class* i_this) { case 11: rv = 0; - cMtx_YrotS(*calc_mtx, cage_p->shape_angle.y); + cMtx_YrotS(*calc_mtx, cage_p->actor.shape_angle.y); sp3c.x = 0.0f; sp3c.y = 0.0f; - sp3c.z = cage_p->scale.x * 90.0f; + sp3c.z = cage_p->actor.scale.x * 90.0f; MtxPosition(&sp3c, &sp48); - sp48 += cage_p->current.pos; + sp48 += cage_p->actor.current.pos; cLib_addCalc2(&a_this->current.pos.x, sp48.x, 1.0f, a_this->speedF); cLib_addCalc2(&a_this->current.pos.z, sp48.z, 1.0f, a_this->speedF); sp3c.x = sp48.x - a_this->current.pos.x; @@ -1521,19 +1255,19 @@ static int npc_ks_demo_02(npc_ks_class* i_this) { if (sp3c.y < 1.0f) { i_this->mMode = 12; - a_this->current.angle.y = cage_p->shape_angle.y + 0x8000; + a_this->current.angle.y = cage_p->actor.shape_angle.y + 0x8000; } break; case 12: rv = 0; iVar1 = 1; - cMtx_YrotS(*calc_mtx, cage_p->shape_angle.y); + cMtx_YrotS(*calc_mtx, cage_p->actor.shape_angle.y); sp3c.x = 0.0f; sp3c.y = 0.0f; sp3c.z = 90.0f; MtxPosition(&sp3c, &sp48); - sp48 += cage_p->current.pos; + sp48 += cage_p->actor.current.pos; cLib_addCalc2(&a_this->current.pos.x, sp48.x, 1.0f, a_this->speedF); cLib_addCalc2(&a_this->current.pos.y, sp48.y, 1.0f, a_this->speedF); cLib_addCalc2(&a_this->current.pos.z, sp48.z, 1.0f, a_this->speedF); @@ -1548,12 +1282,12 @@ static int npc_ks_demo_02(npc_ks_class* i_this) { case 13: rv = 0; iVar1 = 1; - cMtx_YrotS(*calc_mtx, cage_p->shape_angle.y); + cMtx_YrotS(*calc_mtx, cage_p->actor.shape_angle.y); sp3c.x = 0.0f; sp3c.y = 0.0f; - sp3c.z = cage_p->scale.x * 90.0f; + sp3c.z = cage_p->actor.scale.x * 90.0f; MtxPosition(&sp3c, &sp48); - sp48 += cage_p->current.pos; + sp48 += cage_p->actor.current.pos; cLib_addCalc2(&a_this->current.pos.x, sp48.x, 1.0f, 10.0f); cLib_addCalc2(&a_this->current.pos.z, sp48.z, 1.0f, 10.0f); @@ -1572,12 +1306,12 @@ static int npc_ks_demo_02(npc_ks_class* i_this) { case 14: rv = 0; iVar1 = 1; - cMtx_YrotS(*calc_mtx, cage_p->shape_angle.y); + cMtx_YrotS(*calc_mtx, cage_p->actor.shape_angle.y); sp3c.x = 0.0f; sp3c.y = 0.0f; sp3c.z = 90.0f; MtxPosition(&sp3c, &sp48); - sp48 += cage_p->current.pos; + sp48 += cage_p->actor.current.pos; cLib_addCalc2(&a_this->current.pos.x, sp48.x, 1.0f, 10.0f); cLib_addCalc2(&a_this->current.pos.z, sp48.x, 1.0f, 10.0f); cLib_addCalc2(&a_this->current.pos.y, i_this->mObjAcch.GetGroundH(), 1.0f, l_HIO.field_0x18); @@ -1592,7 +1326,7 @@ static int npc_ks_demo_02(npc_ks_class* i_this) { case 15: fVar1 = l_HIO.field_0x18; - cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->shape_angle.y, 2, 0x2000); + cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->actor.shape_angle.y, 2, 0x2000); if (i_this->mTimers[0] == 0) { i_this->mMode = 16; anm_init(i_this, 25, 5.0f, 2, 1.0f); @@ -1612,7 +1346,7 @@ static int npc_ks_demo_02(npc_ks_class* i_this) { } } - cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->shape_angle.y + 0x8000, 2, 0x1000); + cLib_addCalcAngleS2(&a_this->current.angle.y, cage_p->actor.shape_angle.y + 0x8000, 2, 0x1000); if (dComIfGp_checkPlayerStatus0(0, 0x40) != 0 || dComIfGp_checkPlayerStatus0(0, 0x2000) != 0) { i_this->mTimers[2] = 20; } @@ -1721,7 +1455,7 @@ static int npc_ks_demo_02(npc_ks_class* i_this) { if (checkDoorDemo() != 0) { i_this->mActionID = 100; i_this->mMode = 0; - } else if (iVar1 != 0 && cage_p->shape_angle.x > 0x200) { + } else if (iVar1 != 0 && cage_p->actor.shape_angle.x > 0x200) { anm_init(i_this, 6, 5.0f, 0, 1.0f); i_this->mMode = 18; a_this->speedF = -8.0f; @@ -2048,8 +1782,8 @@ static void npc_ks_to_hang(npc_ks_class* i_this) { break; case 10: - obj_so_class* cage_p = (obj_so_class*)fopAcM_SearchByID(a_this->parentActorID); - i_this->field_0x8f0 = cage_p->field_0x920[i_this->field_0x630]; + obj_sw_class* sw_p = (obj_sw_class*)fopAcM_SearchByID(a_this->parentActorID); + i_this->field_0x8f0 = sw_p->field_0x920[i_this->field_0x630]; i_this->field_0x91c = i_this->field_0x8f0; sp24 = i_this->field_0x8f0 - a_this->current.pos; if (i_this->field_0x5d0 == 32) { @@ -2399,7 +2133,7 @@ static void npc_ks_hang_s(npc_ks_class* i_this) { i_this->mMode++; i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1); sw_p->field_0x8fc = 20.0f; - // sw_p->field_0xd10[i_this->field_0x630] = 10; + sw_p->field_0xd10[i_this->field_0x630] = 10; i_this->field_0x92c = 0; break; @@ -2460,7 +2194,7 @@ static void npc_ks_hang_s(npc_ks_class* i_this) { i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_CATCH, -1); i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1); sw_p->field_0x8fc = 20.0f; - // sw_p->field_0xd10[i_this->field_0x630] = 10; + sw_p->field_0xd10[i_this->field_0x630] = 10; } if (mDoCPd_c::getTrigA(0) != 0) { @@ -2509,24 +2243,24 @@ static void npc_ks_hang_s(npc_ks_class* i_this) { static void npc_ks_e_hang(npc_ks_class* i_this) { // NONMATCHING fopAc_ac_c* a_this = &i_this->actor; - obj_so_class* cage_p = (obj_so_class*)fopAcM_SearchByID(a_this->parentActorID); + obj_sw_class* sw_p = (obj_sw_class*)fopAcM_SearchByID(a_this->parentActorID); fopAc_ac_c* player = dComIfGp_getPlayer(0); - cage_p->field_0x900 += 5.0f; + sw_p->field_0x900 += 5.0f; cLib_addCalcAngleS2(&a_this->current.angle.y, a_this->home.angle.y + 0x4000, 2, 0x800); switch (i_this->mMode) { case 0: i_this->mMode = 20; i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1); - cage_p->field_0x8fc = 20.0f; - // cage_p->field_0xd10[i_this->field_0x630] = 10; - a_this->home.angle.y = cage_p->current.angle.y; + sw_p->field_0x8fc = 20.0f; + sw_p->field_0xd10[i_this->field_0x630] = 10; + a_this->home.angle.y = sw_p->actor.current.angle.y; i_this->field_0x5fa = -0x4000; i_this->field_0x60c = 4000.0f; if (i_this->field_0x5b6 == 0) { - anm_init(i_this, 24, 2.0f, 2, 1.0f); + anm_init(i_this, 24, 3.0f, 2, 1.0f); i_this->mTimers[0] = 10000; i_this->mTimers[1] = 15; } @@ -2535,8 +2269,8 @@ static void npc_ks_e_hang(npc_ks_class* i_this) { case 2: anm_init(i_this, 48, 2.0f, 2, 1.0f); i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1); - cage_p->field_0x8fc = 20.0f; - // cage_p->field_0xd10[i_this->field_0x630] = 10; + sw_p->field_0x8fc = 20.0f; + sw_p->field_0xd10[i_this->field_0x630] = 10; i_this->field_0x5fa = -0x8000; i_this->field_0x60c = 8000.0f; i_this->mMode++; @@ -2572,7 +2306,7 @@ static void npc_ks_e_hang(npc_ks_class* i_this) { } } - a_this->current.pos = cage_p->field_0x920[i_this->field_0x630]; + a_this->current.pos = sw_p->field_0x920[i_this->field_0x630]; cLib_addCalcAngleS2(&i_this->field_0x602, i_this->field_0x60c * cM_ssin(i_this->field_0x5fa), 4, 0x1000); i_this->field_0x5fa += 0x800; a_this->current.angle.z = -(i_this->field_0x602 / 2); @@ -2756,7 +2490,7 @@ static int npc_ks_e_jump(npc_ks_class* i_this) { anm_init(i_this, 24, 2.0f, 2, 1.0f); i_this->mSound.startCreatureSound(Z2SE_FN_ROPE_CREAK, 0, -1); sw_p2->field_0x8fc = 20.0f; - // sw_p2->field_0xd10[i_this->field_0x630] = 10; + sw_p2->field_0xd10[i_this->field_0x630] = 10; } // fallthrough case 12: @@ -3859,7 +3593,9 @@ static void action_check(npc_ks_class* i_this) { if (!dComIfGs_isSwitch(82, fopAcM_GetRoomNo(a_this)) && saru_count_check(i_this) != 0) { if (dComIfGs_isSwitch(22, fopAcM_GetRoomNo(a_this))) { for (int i = 0; i < 2; i++) { - spd4 = player->current.pos - i_this->field_0x934->field_0x904[i]; + spd4.x = player->current.pos.x - i_this->field_0x934->field_0x904[0].x; + spd4.y = player->current.pos.y - (i_this->field_0x934->field_0x904[0].y - 450.0f); + spd4.z = player->current.pos.z - i_this->field_0x934->field_0x904[0].z; if (spd4.abs() < 300.0f) { i_this->field_0xbd9 = 0; i_this->mActionID = 20; @@ -3995,9 +3731,6 @@ static BOOL water_check(npc_ks_class* i_this, cXyz param_2, f32 param_3) { return FALSE; } -/* 80A5FF54 */ -static u8 gap_05_00000114_bss; - /* 80A5352C-80A548E4 00A68C 13B8+00 2/1 0/0 0/0 .text npc_ks_option__FP12npc_ks_class */ static int npc_ks_option(npc_ks_class* i_this) { // NONMATCHING @@ -4011,7 +3744,7 @@ static int npc_ks_option(npc_ks_class* i_this) { cXyz sp140, sp14c; f32 fVar3 = 0.0f; f32 fVar4 = 5.0f; - int iVar4 = 0; + u32 iVar4 = 0; int iVar3 = 1; int iVar2 = 1; int iVar1 = 1; @@ -4390,7 +4123,7 @@ static int npc_ks_option(npc_ks_class* i_this) { dBgS_GndChk dStack_134; dStack_134.SetPos(&sp14c); - if (fabs(sp14c.y - dComIfG_Bgsp().GroundCross(&dStack_134)) < 500.0f) { + if (fabsf(sp14c.y - dComIfG_Bgsp().GroundCross(&dStack_134)) < 500.0f) { a_this->current.pos = sp14c; a_this->old = a_this->current; OS_REPORT("////////KS OP RESET \n"); @@ -4427,11 +4160,7 @@ static int npc_ks_option(npc_ks_class* i_this) { cXyz sp158 = a_this->current.pos; sp158.y = i_this->field_0x63c; - static cXyz sc; - if (gap_05_00000114_bss == 0) { - sc = cXyz(1.0f, 1.0f, 1.0f); - gap_05_00000114_bss = 1; - } + static cXyz sc(1.0f, 1.0f, 1.0f); for (int i = 0; i < 4; i++) { i_this->field_0xbe4[i] = dComIfGp_particle_set(i_this->field_0xbe4[i], w_eff_id[i], &sp158, &a_this->tevStr, NULL, @@ -4468,727 +4197,3211 @@ static int npc_ks_option(npc_ks_class* i_this) { } /* 80A548E4-80A54A14 00BA44 0130+00 1/1 0/0 0/0 .text npc_ks_awaydoor__FP12npc_ks_class */ -static void npc_ks_awaydoor(npc_ks_class* param_0) { - // NONMATCHING +static void npc_ks_awaydoor(npc_ks_class* i_this) { + fopAc_ac_c* a_this = &i_this->actor; + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 26, 3.0f, 2, 1.0f); + i_this->mMode = 1; + i_this->mTimers[0] = 30; + break; + + case 1: + if (i_this->mTimers[0] == 0) { + fopAcM_delete(a_this); + } + } + + cXyz sp1c, sp28; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp1c.x = 0.0f; + sp1c.y = 0.0f; + sp1c.z = 150.0f; + MtxPosition(&sp1c, &sp28); + sp28 += player->current.pos; + sp1c.x = a_this->current.pos.x - sp28.x; + sp1c.z = a_this->current.pos.z - sp28.z; + cLib_addCalcAngleS2(&a_this->current.angle.y, cM_atan2s(sp1c.x, sp1c.z), 1, 0x2000); + cLib_addCalc2(&a_this->speedF, l_HIO.field_0x14, 1.0f, 4.0f); } /* 80A54A14-80A55174 00BB74 0760+00 1/1 0/0 0/0 .text npc_ks_guide_00__FP12npc_ks_class */ -static void npc_ks_guide_00(npc_ks_class* param_0) { +static int npc_ks_guide_00(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp2c, sp38; + int rv = 1; + int frame = i_this->mpModelMorf->getFrame(); + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 26, 3.0f, 2, 1.0f); + i_this->mMode = 1; + i_this->field_0x904 = 0; + a_this->speedF = 0.0f; + // fallthrough + case 1: + if (i_this->field_0x5c4 > 700.0f || guide_path_00[i_this->field_0x904].field_0x0 < 0) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + a_this->speedF = 0.0f; + } else { + i_this->field_0x8f0.x = guide_path_00[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.z = guide_path_00[i_this->field_0x904].field_0xc; + i_this->mMode = 5; + a_this->speedF = l_HIO.field_0x1c; + if (i_this->field_0x5d0 != 26) { + anm_init(i_this, 26, 3.0f, 2, 1.0f); + } + } + break; + + case 5: + sp2c.x = i_this->field_0x8f0.x - a_this->current.pos.x; + sp2c.z = i_this->field_0x8f0.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp2c.x, sp2c.z); + if (JMAFastSqrt(sp2c.x * sp2c.x + sp2c.z * sp2c.z) < a_this->speedF * 1.2f) { + i_this->field_0x904++; + i_this->mMode = 1; + } + break; + + case 10: + if (i_this->field_0x5d0 == 8) { + i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000; + } else { + i_this->field_0x8fc.y = i_this->field_0x5c8; + } + + if (i_this->field_0x5c4 < 550.0f && guide_path_00[i_this->field_0x904].field_0x0 >= 0) { + i_this->mMode = 1; + } else { + if (i_this->field_0x5c4 < 150.0f && i_this->field_0x5d0 != 51) { + anm_init(i_this, 51, 5.0f, 2, 1.0f); + } + + if (i_this->field_0x5d0 == 51) { + i_this->field_0x5fc = 1; + } + + if (guide_path_00[i_this->field_0x904].field_0x0 < 0 && saru_count_check(i_this) != 0) { + sp2c.x = player->current.pos.x - i_this->field_0x934->field_0x904[0].x; + sp2c.y = player->current.pos.y - (i_this->field_0x934->field_0x904[0].y - 450.0f); + sp2c.z = player->current.pos.z - i_this->field_0x934->field_0x904[0].z; + + if (sp2c.abs() < 300.0f) { + i_this->field_0xbd9 = 1; + i_this->mActionID = 20; + i_this->mMode = 0; + i_this->field_0xaec = 0; + i_this->field_0xbc8 = i_this->field_0x934->field_0x904[0]; + sp2c = i_this->field_0x934->field_0x904[1] - i_this->field_0xbc8; + leader->field_0xbd4 = cM_atan2s(sp2c.x, sp2c.z); + leader->field_0xb42 = 10; + leader->field_0xb40 = i_this->field_0x934->field_0x570; + if (i_this->field_0x5b6 != 0) { + leader->field_0x934 = i_this->field_0x934; + leader->field_0xbc8 = i_this->field_0xbc8; + } + } + } + } + break; + + case 40: + anm_init(i_this, 39, 5.0f, 2, 1.0f); + i_this->mMode = 41; + i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f; + break; + + case 41: + if ((i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || (frame > 40 && frame < 48)) || frame > 65) { + i_this->field_0x5e0 = 4; + } + + if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) { + anm_init(i_this, 43, 5.0f, 0, 1.0f); + } + + if (i_this->field_0x5d0 == 43) { + if (i_this->mpModelMorf->isStop()) { + i_this->mMode = 40; + } + } + break; + + case 42: + if (i_this->mTimers[0] == 0) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + } + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000); + s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y; + if (sVar1 > 0x1000 || sVar1 < -0x1000) { + rv = 0; + } + + cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800); + + if (checkDoorDemo()) { + i_this->mActionID = 100; + i_this->mMode = 0; + } + + if (i_this->mMode >= 40 && i_this->mMode <= 41) { + fopAc_ac_c* enemy_p = enemy_check(i_this, 800.0f); + if (enemy_p == NULL) { + i_this->mMode = 42; + i_this->mTimers[0] = 30; + } else { + sp2c.x = enemy_p->current.pos.x - a_this->current.pos.x; + sp2c.z = enemy_p->current.pos.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp2c.x, sp2c.z) + 0x8000; + } + } else { + if (enemy_view_check(i_this, 700.0f) != NULL) { + i_this->mMode = 40; + a_this->speedF = 0.0f; + } + } + + return rv; } -/* ############################################################################################## */ -/* 80A5E310-80A5E314 000414 0004+00 0/1 0/0 0/0 .rodata @8131 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8131 = 130.0f; -COMPILER_STRIP_GATE(0x80A5E310, &lit_8131); -#pragma pop +/* 80A55174-80A5546C 00C2D4 02F8+00 1/1 0/0 0/0 .text npc_ks_guide_00_2__FP12npc_ks_class */ +static int npc_ks_guide_00_2(npc_ks_class* i_this) { + fopAc_ac_c* a_this = &i_this->actor; + cXyz sp34, sp40; + int rv = 1; + int frame = i_this->mpModelMorf->getFrame(); -/* 80A5E314-80A5E318 000418 0004+00 0/0 0/0 0/0 .rodata @8132 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8132 = 4096.0f; -COMPILER_STRIP_GATE(0x80A5E314, &lit_8132); -#pragma pop + switch (i_this->mMode) { + case 0: + anm_init(i_this, 26, 3.0f, 2, 1.0f); + i_this->mMode = 1; + i_this->field_0x904 = 0; + a_this->speedF = 0.0f; + // fallthrough + case 1: + if (i_this->field_0x5c4 > 900.0f || guide_path_00_2[i_this->field_0x904].field_0x0 < 0) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } -/* 80A5E318-80A5E31C 00041C 0004+00 0/0 0/0 0/0 .rodata @8133 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8133 = 1.5f; -COMPILER_STRIP_GATE(0x80A5E318, &lit_8133); -#pragma pop + call_pt++; + i_this->mMode = 10; + a_this->speedF = 0.0f; + } else { + i_this->field_0x8f0.x = guide_path_00_2[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.z = guide_path_00_2[i_this->field_0x904].field_0xc; + i_this->mMode = 5; + a_this->speedF = l_HIO.field_0x1c; + if (i_this->field_0x5d0 != 26) { + anm_init(i_this, 26, 3.0f, 2, 1.0f); + } + } + break; -/* 80A5E31C-80A5E320 000420 0004+00 0/3 0/0 0/0 .rodata @8356 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8356 = 900.0f; -COMPILER_STRIP_GATE(0x80A5E31C, &lit_8356); -#pragma pop + case 5: + sp34.x = i_this->field_0x8f0.x - a_this->current.pos.x; + sp34.z = i_this->field_0x8f0.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp34.x, sp34.z); + if (JMAFastSqrt(sp34.x * sp34.x + sp34.z * sp34.z) < a_this->speedF * 1.2f) { + if (i_this->field_0x5b6 == 0 || i_this->field_0x5b6 == 1) { + i_this->field_0x904++; + } -/* 80A5E320-80A5E324 000424 0004+00 0/1 0/0 0/0 .rodata @8357 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8357 = 750.0f; -COMPILER_STRIP_GATE(0x80A5E320, &lit_8357); -#pragma pop + i_this->field_0x904++; + i_this->mMode = 1; + } + break; -/* 80A55174-80A5546C 00C2D4 02F8+00 1/1 0/0 0/0 .text npc_ks_guide_00_2__FP12npc_ks_class - */ -static void npc_ks_guide_00_2(npc_ks_class* param_0) { - // NONMATCHING + case 10: + if (i_this->field_0x5d0 == 7) { + i_this->field_0x8fc.y = i_this->field_0x5c8; + } else { + i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000; + } + + if (i_this->field_0x5c4 < 750.0f && guide_path_00_2[i_this->field_0x904].field_0x0 >= 0) { + i_this->mMode = 1; + } + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000); + + s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y; + if (sVar1 > 0x1000 || sVar1 < -0x1000) { + rv = 0; + } + + cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800); + + if (checkDoorDemo()) { + i_this->mActionID = 100; + i_this->mMode = 0; + } + + return rv; } -/* 80A5546C-80A559B4 00C5CC 0548+00 1/1 0/0 0/0 .text npc_ks_guide_00_3__FP12npc_ks_class - */ -static void npc_ks_guide_00_3(npc_ks_class* param_0) { +/* 80A5546C-80A559B4 00C5CC 0548+00 1/1 0/0 0/0 .text npc_ks_guide_00_3__FP12npc_ks_class */ +static int npc_ks_guide_00_3(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + cXyz sp2c, sp38; + int rv = 1; + int frame = i_this->mpModelMorf->getFrame(); + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 26, 3.0f, 2, 1.0f); + i_this->mMode = 1; + i_this->field_0x904 = 0; + a_this->speedF = 0.0f; + // fallthrough + case 1: + if (i_this->field_0x5c4 > 500.0f || guide_path_00_3[i_this->field_0x904].field_0x0 < 0) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + a_this->speedF = 0.0f; + } else { + i_this->field_0x8f0.x = guide_path_00_3[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.z = guide_path_00_3[i_this->field_0x904].field_0xc; + i_this->mMode = 5; + a_this->speedF = l_HIO.field_0x1c; + if (i_this->field_0x5d0 != 26) { + anm_init(i_this, 26, 3.0f, 2, 1.0f); + } + } + break; + + case 5: + sp2c.x = i_this->field_0x8f0.x - a_this->current.pos.x; + sp2c.z = i_this->field_0x8f0.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp2c.x, sp2c.z); + if (JMAFastSqrt(sp2c.x * sp2c.x + sp2c.z * sp2c.z) < a_this->speedF * 1.2f) { + i_this->field_0x904++; + i_this->mMode = 1; + } + break; + + case 10: + if (i_this->field_0x5d0 == 8) { + i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000; + } else { + i_this->field_0x8fc.y = i_this->field_0x5c8; + } + + if (i_this->field_0x5c4 < 400.0f && guide_path_00_3[i_this->field_0x904].field_0x0 >= 0) { + i_this->mMode = 1; + } else { + if (i_this->field_0x5c4 < 150.0f && i_this->field_0x5d0 != 51) { + anm_init(i_this, 51, 5.0f, 2, 1.0f); + } + + if (i_this->field_0x5d0 == 51) { + i_this->field_0x5fc = 1; + } + } + break; + + case 40: + anm_init(i_this, 39, 5.0f, 2, 1.0f); + i_this->mMode = 41; + i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f; + break; + + case 41: + if (i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || ((frame > 40 && frame < 48) || frame > 65)) { + i_this->field_0x5e0 = 4; + } + + if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) { + anm_init(i_this, 43, 5.0f, 0, 1.0f); + } + + if (i_this->field_0x5d0 == 43) { + if (i_this->mpModelMorf->isStop()) { + i_this->mMode = 40; + } + } + break; + + case 42: + if (i_this->mTimers[0] == 0) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + } + } + + cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800); + + if (checkDoorDemo()) { + i_this->mActionID = 100; + i_this->mMode = 0; + } + + s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y; + if (sVar1 > 0x1000 || sVar1 < -0x1000) { + rv = 0; + } + + if (i_this->mMode >= 40 && i_this->mMode <= 41) { + fopAc_ac_c* enemy_p = enemy_check(i_this, 700.0f); + if (enemy_p == NULL) { + i_this->mMode = 42; + i_this->mTimers[0] = 30; + } else { + sp2c.x = enemy_p->current.pos.x - a_this->current.pos.x; + sp2c.z = enemy_p->current.pos.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp2c.x, sp2c.z) + 0x8000; + } + } else if (enemy_view_check(i_this, 600.0f) != NULL) { + i_this->mMode = 40; + a_this->speedF = 0.0f; + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000); + return rv; } -/* ############################################################################################## */ -/* 80A5E324-80A5E328 000428 0004+00 0/1 0/0 0/0 .rodata @8644 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8644 = 9200.0f; -COMPILER_STRIP_GATE(0x80A5E324, &lit_8644); -#pragma pop - -/* 80A5E328-80A5E32C 00042C 0004+00 0/1 0/0 0/0 .rodata @8645 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8645 = 4839.0f; -COMPILER_STRIP_GATE(0x80A5E328, &lit_8645); -#pragma pop - -/* 80A559B4-80A562EC 00CB14 0938+00 1/1 0/0 0/0 .text npc_ks_guide_01__FP12npc_ks_class - */ -static void npc_ks_guide_01(npc_ks_class* param_0) { +/* 80A559B4-80A562EC 00CB14 0938+00 1/1 0/0 0/0 .text npc_ks_guide_01__FP12npc_ks_class */ +static int npc_ks_guide_01(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + cXyz sp3c, sp48; + int rv = 1; + int frame = i_this->mpModelMorf->getFrame(); + + f32 fVar1 = 0.0f; + if (fopAcM_GetRoomNo(a_this) == 1 && i_this->field_0x904 >= 5) { + fVar1 = 300.0f; + } + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 26, 3.0f, 2, 1.0f); + i_this->mMode = 1; + i_this->field_0x904 = 0; + a_this->speedF = 0.0f; + // fallthrough + case 1: + case 101: + if (i_this->mMode == 1 && (i_this->field_0x5c4 > 900.0f || guide_path_01[i_this->field_0x904].field_0x0 < 0)) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + a_this->speedF = 0.0f; + } else if (guide_path_01[i_this->field_0x904].field_0x0 != 0) { + i_this->field_0x8f0.x = guide_path_01[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.y = guide_path_01[i_this->field_0x904].field_0x8; + i_this->field_0x8f0.z = guide_path_01[i_this->field_0x904].field_0xc; + i_this->field_0x910 = a_this->current.pos; + i_this->field_0x91c = i_this->field_0x8f0; + i_this->mMode = 2; + anm_init(i_this, 32, 2.0f, 0, 1.0f); + a_this->speedF = 0.0f; + } else { + i_this->field_0x8f0.x = guide_path_01[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.z = guide_path_01[i_this->field_0x904].field_0xc; + i_this->mMode = 5; + a_this->speedF = l_HIO.field_0x1c; + if (i_this->field_0x5d0 != 26) { + anm_init(i_this, 26, 3.0f, 2, 1.0f); + } + } + break; + + case 2: + rv = 2; + if (i_this->field_0x5d0 == 32 && i_this->mpModelMorf->isStop()) { + anm_init(i_this, 33, 1.0f, 0, 1.0f); + a_this->speedF = 0.0f; + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1); + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1); + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1); + i_this->field_0xbe0 = 1; + } + + sp3c = i_this->field_0x8f0 - a_this->current.pos; + i_this->field_0x8fc.y = cM_atan2s(sp3c.x, sp3c.z); + i_this->field_0x8fc.x = -cM_atan2s(sp3c.y, JMAFastSqrt(sp3c.x * sp3c.x + sp3c.z * sp3c.z)); + if (sp3c.abs() < a_this->speedF * 1.2f) { + a_this->current.pos = i_this->field_0x8f0; + i_this->mMode = 1; + i_this->field_0xbe0 = 1; + i_this->field_0x904++; + } + break; + + case 5: + sp3c.x = i_this->field_0x8f0.x - a_this->current.pos.x; + sp3c.z = i_this->field_0x8f0.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp3c.x, sp3c.z); + if (JMAFastSqrt(sp3c.x * sp3c.x + sp3c.z * sp3c.z) < a_this->speedF * 1.2f) { + i_this->field_0x904++; + i_this->mMode = 1; + } + break; + + case 10: + if (i_this->field_0x5d0 == 8) { + i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000; + } else { + i_this->field_0x8fc.y = i_this->field_0x5c8; + } + + if (guide_path_01[i_this->field_0x904].field_0x0 < 0) { + if (i_this->field_0x5c4 < 600.0f) { + i_this->mMode = 1; + } + + fopAc_ac_c* player = dComIfGp_getPlayer(0); + sp3c.x = player->current.pos.x - 9200.0f; + sp3c.z = player->current.pos.z - 4839.0f; + sp48.x = a_this->current.pos.x - 9200.0f; + sp48.z = a_this->current.pos.z - 4839.0f; + + if ((sp3c.x * sp3c.x + sp3c.z * sp3c.z) < (sp48.x * sp48.x + sp48.z * sp48.z)) { + i_this->mMode = 101; + } + } else if (i_this->field_0x5c4 < 150.0f) { + i_this->mActionID = 100; + i_this->mMode = 0; + return 1; + } + break; + + case 40: + anm_init(i_this, 39, 5.0f, 2, 1.0f); + i_this->mMode = 41; + i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f; + break; + + case 41: + if (i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || ((frame > 40 && frame < 48) ) || frame > 65) { + i_this->field_0x5e0 = 4; + } + + if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) { + anm_init(i_this, 43, 5.0f, 0, 1.0f); + } + + if (i_this->field_0x5d0 == 43 && i_this->mpModelMorf->isStop()) { + i_this->mMode = 40; + } + break; + + case 42: + if (i_this->mTimers[0] == 0) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + } + break; + } + + cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800); + + if (checkDoorDemo()) { + i_this->mActionID = 100; + i_this->mMode = 0; + } + + if (a_this->speedF > 30.0f) { + i_this->field_0x90c = 1; + } else { + s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y; + if (sVar1 > 0x1000 || sVar1 < -0x1000) { + rv = 0; + } + } + + if (i_this->mMode >= 40 && i_this->mMode <= 41) { + fopAc_ac_c* enemy_p = enemy_check(i_this, fVar1 + 700.0f); + if (enemy_p == NULL) { + i_this->mMode = 42; + i_this->mTimers[0] = 30; + } else { + sp3c.x = enemy_p->current.pos.x - a_this->current.pos.x; + + sp3c.z = enemy_p->current.pos.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp3c.x, sp3c.z) + 0x8000; + } + } else if (enemy_view_check(i_this, fVar1 + 600.0f) != NULL) { + i_this->mMode = 40; + a_this->speedF = 0.0f; + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000); + + return rv; } -/* 80A562EC-80A56A1C 00D44C 0730+00 1/1 0/0 0/0 .text npc_ks_guide_02__FP12npc_ks_class - */ -static void npc_ks_guide_02(npc_ks_class* param_0) { +/* 80A562EC-80A56A1C 00D44C 0730+00 1/1 0/0 0/0 .text npc_ks_guide_02__FP12npc_ks_class */ +static int npc_ks_guide_02(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp3c, sp48; + int rv = 1; + f32 fVar1 = i_this->mpModelMorf->getFrame(); + if (i_this->field_0x5b6 == 0) { + fVar1 = 1000.0f; + } else { + fVar1 = 700.0f; + } + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 26, 3.0f, 2, 1.0f); + i_this->mMode = 1; + if (i_this->field_0x5b6 == 0) { + i_this->field_0x904 = 0; + } else { + i_this->field_0x904 = 11; + } + + a_this->speedF = 0.0f; + // fallthrough + case 1: + if (i_this->mTimers[2] == 0 && (((player->current.pos.y - a_this->current.pos.y) < 10.0f && i_this->field_0x5c4 > fVar1) || + guide_path_02[i_this->field_0x904].field_0x0 < 0)) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + a_this->speedF = 0.0f; + } else { + i_this->field_0x8f0.x = guide_path_02[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.z = guide_path_02[i_this->field_0x904].field_0xc; + i_this->mMode = 5; + a_this->speedF = l_HIO.field_0x1c; + if (i_this->field_0x5d0 != 26) { + anm_init(i_this, 26, 3.0f, 2, 1.0f); + } + } + break; + + case 5: + if (i_this->mObjAcch.ChkWallHit() != 0) { + a_this->speed.y = 20.0f; + } + + sp3c.x = i_this->field_0x8f0.x - a_this->current.pos.x; + sp3c.z = i_this->field_0x8f0.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp3c.x, sp3c.z); + if (JMAFastSqrt(sp3c.x * sp3c.x + sp3c.z * sp3c.z) < a_this->speedF * 1.2f) { + i_this->field_0x904++; + i_this->mMode = 1; + } + break; + + case 10: + if (i_this->field_0x5d0 == 7) { + i_this->field_0x8fc.y = i_this->field_0x5c8; + } else { + i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000; + } + + if (((player->current.pos.y - a_this->current.pos.y) > 10.0f || i_this->field_0x5c4 < (fVar1 - 150.0f)) && guide_path_02[i_this->field_0x904].field_0x0 >= 0) { + i_this->mMode = 1; + } + + if (guide_path_02[i_this->field_0x904].field_0x0 < 0 && i_this->field_0x5b6 == 0 && saru_count_check(i_this) != 0) { + fopAc_ac_c* player_2 = dComIfGp_getPlayer(0); + int iVar1 = 0; + for (int i = 0; i < i_this->field_0x934->field_0x91c; i++) { + sp3c = player_2->current.pos - saru_p[i]->actor.current.pos; + if (sp3c.abs() > 400.0f) { + iVar1 = 1; + } + } + + sp3c.x = player->current.pos.x - i_this->field_0x934->field_0x904[0].x; + sp3c.y = player->current.pos.y - (i_this->field_0x934->field_0x904[0].y - 450.0f); + sp3c.z = player->current.pos.z - i_this->field_0x934->field_0x904[0].z; + + if (iVar1 == 0 && sp3c.abs() < 300.0f) { + i_this->field_0xbd9 = 1; + i_this->field_0xbc8 = i_this->field_0x934->field_0x904[0]; + i_this->mActionID = 20; + i_this->mMode = 0; + i_this->field_0xaec = 0; + leader->field_0xb42 = 10; + leader->field_0xb40 = 0; + leader->field_0xbc8 = i_this->field_0xbc8; + + sp3c = i_this->field_0x934->field_0x904[1] - i_this->field_0xbc8; + leader->field_0xbd4 = cM_atan2s(sp3c.x, sp3c.z); + saru_count_check(saru_p[1]); + saru_p[1]->mActionID = 22; + saru_p[1]->mMode = 0; + saru_p[1]->field_0x930 = leader; + } + } + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000); + + s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y; + if (sVar1 > 0x1000 || sVar1 < -0x1000) { + rv = 0; + } + + cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800); + + if (checkDoorDemo()) { + i_this->mActionID = 100; + i_this->mMode = 0; + } + + return rv; } -/* ############################################################################################## */ -/* 80A5E32C-80A5E330 000430 0004+00 0/1 0/0 0/0 .rodata @8912 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_8912 = 110.0f; -COMPILER_STRIP_GATE(0x80A5E32C, &lit_8912); -#pragma pop - -/* 80A56A1C-80A57124 00DB7C 0708+00 1/1 0/0 0/0 .text npc_ks_guide_22__FP12npc_ks_class - */ -static void npc_ks_guide_22(npc_ks_class* param_0) { +/* 80A56A1C-80A57124 00DB7C 0708+00 1/1 0/0 0/0 .text npc_ks_guide_22__FP12npc_ks_class */ +static int npc_ks_guide_22(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + i_this->field_0x5c4 = fopAcM_searchPlayerDistance(a_this); + cXyz sp28, sp34; + int rv = 1; + int frame = i_this->mpModelMorf->getFrame(); + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 26, 3.0f, 2, 1.0f); + i_this->mMode = 1; + i_this->field_0x904 = 0; + a_this->speedF = 0.0f; + // fallthrough + case 1: + if (i_this->field_0x5c4 > 500.0f || guide_path_22[i_this->field_0x904].field_0x0 < 0) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + a_this->speedF = 0.0f; + } else if (guide_path_22[i_this->field_0x904].field_0x0 != 0) { + anm_init(i_this, 12, 3.0f, 2, 1.0f); + i_this->field_0x8f0.x = guide_path_22[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.y = guide_path_22[i_this->field_0x904].field_0x8; + i_this->field_0x8f0.z = guide_path_22[i_this->field_0x904].field_0xc; + i_this->mMode = 2; + a_this->speedF = 0.0f; + } else { + i_this->field_0x8f0.x = guide_path_22[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.z = guide_path_22[i_this->field_0x904].field_0xc; + i_this->mMode = 5; + a_this->speedF = l_HIO.field_0x1c; + + if (i_this->field_0x5d0 != 26) { + anm_init(i_this, 26, 3.0f, 2, 1.0f); + } + } + break; + + case 2: + rv = 0; + + sp28.x = i_this->field_0x8f0.x - a_this->current.pos.x; + sp28.z = i_this->field_0x8f0.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp28.x, sp28.z); + cLib_addCalc2(&a_this->current.pos.y, i_this->field_0x8f0.y, 1.0f, 15.0f); + + if (a_this->current.pos.y >= (i_this->field_0x8f0.y - 110.0f) && i_this->field_0x5d0 != 26) { + anm_init(i_this, 26, 3.0f, 2, 1.0f); + } + + if (a_this->current.pos.y >= (i_this->field_0x8f0.y - 50.0f)) { + cLib_addCalc2(&a_this->current.pos.x, i_this->field_0x8f0.x, 1.0f, 20.0f); + cLib_addCalc2(&a_this->current.pos.z, i_this->field_0x8f0.z, 1.0f, 20.0f); + } + + if (a_this->current.pos.y >= i_this->field_0x8f0.y) { + a_this->current.pos = i_this->field_0x8f0; + i_this->field_0x904++; + i_this->mMode = 1; + } + break; + + case 5: + sp28.x = i_this->field_0x8f0.x - a_this->current.pos.x; + sp28.z = i_this->field_0x8f0.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp28.x, sp28.z); + + if (JMAFastSqrt(sp28.x * sp28.x + sp28.z * sp28.z) < a_this->speedF * 1.2f) { + i_this->field_0x904++; + i_this->mMode = 1; + } + break; + + case 10: + if (i_this->field_0x5d0 == 8) { + i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000; + } else { + i_this->field_0x8fc.y = i_this->field_0x5c8; + } + + if (i_this->field_0x5c4 < 300.0f && guide_path_22[i_this->field_0x904].field_0x0 >= 0) { + i_this->mMode = 1; + } + + if (i_this->field_0x5c4 < 150.0f && i_this->field_0x5d0 != 51) { + anm_init(i_this, 51, 5.0f, 2, 1.0f); + } + + if (i_this->field_0x5d0 == 51) { + i_this->field_0x5fc = 1; + } + break; + + case 40: + anm_init(i_this, 39, 5.0f, 2, 1.0f); + i_this->mMode = 41; + i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f; + break; + + case 41: + if ((i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || (frame > 40 && frame < 48)) || frame > 65) { + i_this->field_0x5e0 = 4; + } + + if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) { + anm_init(i_this, 43, 5.0f, 0, 1.0f); + } + + if (i_this->field_0x5d0 == 43 && i_this->mpModelMorf->isStop()) { + i_this->mMode = 40; + } + break; + + case 42: + if (i_this->mTimers[0] == 0) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + } + } + + cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800); + + if (checkDoorDemo()) { + i_this->mActionID = 100; + i_this->mMode = 0; + } + + if (a_this->speedF > 30.0f) { + i_this->field_0x90c = 1; + } else { + s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y; + if (sVar1 > 0x1000 || sVar1 < -0x1000) { + rv = 0; + } + } + + if (i_this->mMode >= 40 && i_this->mMode <= 41) { + fopAc_ac_c* enemy_p = enemy_check(i_this, 700.0f); + if (enemy_p == NULL) { + i_this->mMode = 42; + i_this->mTimers[0] = 30; + } else { + sp28.x = enemy_p->current.pos.x - a_this->current.pos.x; + sp28.z = enemy_p->current.pos.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp28.x, sp28.z) + 0x8000; + } + } else if (enemy_view_check(i_this, 600.0f) != NULL) { + i_this->mMode = 40; + a_this->speedF = 0.0f; + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000); + + return rv; } -/* 80A57124-80A57998 00E284 0874+00 1/1 0/0 0/0 .text npc_ks_guide_09__FP12npc_ks_class - */ -static void npc_ks_guide_09(npc_ks_class* param_0) { +/* 80A57124-80A57998 00E284 0874+00 1/1 0/0 0/0 .text npc_ks_guide_09__FP12npc_ks_class */ +static int npc_ks_guide_09(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp40, sp4c; + int rv = 1; + int frame = i_this->mpModelMorf->getFrame(); + f32 fVar1 = 0.0f; + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 26, 3.0f, 2, 1.0f); + i_this->mMode = 1; + i_this->field_0x904 = 0; + a_this->speedF = 0.0f; + // fallthrough + case 1: + if (i_this->field_0x5c4 > 900.0f || guide_path_09[i_this->field_0x904].field_0x0 < 0) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + a_this->speedF = 0.0f; + } else if (guide_path_09[i_this->field_0x904].field_0x0 == 0) { + i_this->field_0x8f0.x = guide_path_09[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.y = guide_path_09[i_this->field_0x904].field_0x8; + i_this->field_0x8f0.z = guide_path_09[i_this->field_0x904].field_0xc; + i_this->field_0x910 = a_this->current.pos; + i_this->field_0x91c = i_this->field_0x8f0; + i_this->mMode = 2; + anm_init(i_this, 32, 2.0f, 0, 1.0f); + a_this->speedF = 0.0f; + } else { + i_this->field_0x8f0.x = guide_path_09[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.z = guide_path_09[i_this->field_0x904].field_0xc; + i_this->mMode = 5; + a_this->speedF = l_HIO.field_0x1c; + + if (i_this->field_0x5d0 != 26) { + anm_init(i_this, 26, 3.0f, 2, 1.0f); + } + } + break; + + case 2: + rv = 2; + if (i_this->field_0x5d0 == 32 && i_this->mpModelMorf->isStop()) { + anm_init(i_this, 33, 1.0f, 0, 1.0f); + a_this->speedF = 40.0f; + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1); + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1); + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1); + } + + sp40 = i_this->field_0x8f0 - a_this->current.pos; + i_this->field_0x8fc.y = cM_atan2s(sp40.x, sp40.z); + i_this->field_0x8fc.x = -cM_atan2s(sp40.y, JMAFastSqrt(sp40.x * sp40.x + sp40.z * sp40.z)); + + if (sp40.abs() < a_this->speedF * 1.2f) { + a_this->current.pos = i_this->field_0x8f0; + i_this->mMode = 1; + i_this->field_0x904++; + } + break; + + case 5: + sp40.x = i_this->field_0x8f0.x - a_this->current.pos.x; + sp40.z = i_this->field_0x8f0.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp40.x, sp40.z); + + if (JMAFastSqrt(sp40.x * sp40.x + sp40.z * sp40.z) < a_this->speedF * 1.2f) { + i_this->field_0x904++; + i_this->mMode = 1; + } + break; + + case 10: + if (i_this->field_0x5d0 == 8) { + i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000; + } else { + i_this->field_0x8fc.y = i_this->field_0x5c8; + } + + if (guide_path_09[i_this->field_0x904].field_0x0 >= 0) { + if (i_this->field_0x5c4 < 600.0f) { + i_this->mMode = 1; + } + } else { + if (i_this->field_0x5c4 < 150.0f && i_this->field_0x5d0 != 51) { + anm_init(i_this, 51, 5.0f, 2, 1.0f); + } + + if (i_this->field_0x5d0 == 51) { + i_this->field_0x5fc = 1; + } + } + break; + + case 40: + anm_init(i_this, 39, 5.0f, 2, 1.0f); + i_this->mMode = 41; + i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f; + break; + + case 41: + if ((i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || (frame > 40 && frame < 48)) || frame > 65) { + i_this->field_0x5e0 = 4; + } + + if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) { + anm_init(i_this, 43, 5.0f, 0, 1.0f); + } + + if (i_this->field_0x5d0 == 43 && i_this->mpModelMorf->isStop()) { + i_this->mMode = 40; + } + break; + + case 42: + if (i_this->mTimers[0] == 0) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + } + } + + cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800); + + if (checkDoorDemo()) { + i_this->mActionID = 100; + i_this->mMode = 0; + } + + if (a_this->speedF > 30.0f) { + i_this->field_0x90c = 1; + } else { + s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y; + if (sVar1 > 0x1000 || sVar1 < -0x1000) { + rv = 0; + } + } + + if (i_this->mMode >= 40 && i_this->mMode <= 41) { + fopAc_ac_c* enemy_p = enemy_check(i_this, 700.0f); + if (enemy_p == NULL) { + i_this->mMode = 42; + i_this->mTimers[0] = 30; + } else { + sp40.x = enemy_p->current.pos.x - a_this->current.pos.x; + sp40.z = enemy_p->current.pos.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp40.x, sp40.z) + 0x8000; + } + } else if (enemy_view_check(i_this, 600.0f) != NULL) { + i_this->mMode = 40; + a_this->speedF = 0.0f; + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000); + + return rv; } /* 80A57998-80A57ED4 00EAF8 053C+00 1/1 0/0 0/0 .text npc_ks_demo_12__FP12npc_ks_class */ -static void npc_ks_demo_12(npc_ks_class* param_0) { - // NONMATCHING +static int npc_ks_demo_12(npc_ks_class* i_this) { + fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp48, sp54; + int rv = 1; + int frame = i_this->mpModelMorf->getFrame(); + + switch (i_this->mMode) { + case 0: + if (i_this->field_0xb42 >= 79) { + anm_init(i_this, 26, 3.0f, 2, 1.0f); + i_this->mMode = 1; + i_this->field_0x904 = 0; + } + + a_this->speedF = 0.0f; + break; + + case 1: + if (guide_path_12[i_this->field_0x904].field_0x0 != 0) { + i_this->field_0x8f0.x = guide_path_12[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.y = guide_path_12[i_this->field_0x904].field_0x8; + i_this->field_0x8f0.z = guide_path_12[i_this->field_0x904].field_0xc; + i_this->field_0x910 = a_this->current.pos; + i_this->field_0x91c = i_this->field_0x8f0; + i_this->mMode = 2; + anm_init(i_this, 32, 2.0f, 0, 1.0f); + a_this->speedF = 0.0f; + } else { + i_this->field_0x8f0.x = guide_path_12[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.z = guide_path_12[i_this->field_0x904].field_0xc; + i_this->mMode = 5; + a_this->speedF = l_HIO.field_0x1c; + + if (i_this->field_0x5d0 != 26) { + anm_init(i_this, 26, 3.0f, 2, 1.0f); + } + } + break; + + case 2: + rv = 2; + if (i_this->field_0x5d0 == 32 && i_this->mpModelMorf->isStop()) { + anm_init(i_this, 33, 1.0f, 0, 1.0f); + a_this->speedF = 40.0f; + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1); + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1); + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1); + i_this->field_0xbe0 = 1; + } + + sp48 = i_this->field_0x8f0 - a_this->current.pos; + i_this->field_0x8fc.y = cM_atan2s(sp48.x, sp48.z); + i_this->field_0x8fc.x = -cM_atan2s(sp48.y, JMAFastSqrt(sp48.x * sp48.x + sp48.z * sp48.z)); + + if (sp48.abs() < a_this->speedF * 1.2f) { + a_this->current.pos = i_this->field_0x8f0; + i_this->mMode = 1; + i_this->field_0xbe0 = 1; + i_this->field_0x904++; + } + break; + + case 5: + sp48.x = i_this->field_0x8f0.x - a_this->current.pos.x; + sp48.z = i_this->field_0x8f0.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp48.x, sp48.z); + + if (JMAFastSqrt(sp48.x * sp48.x + sp48.z * sp48.z) < a_this->speedF * 1.2f) { + i_this->field_0x904++; + i_this->mMode = 1; + } + } + + cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800); + + if (a_this->speedF > 30.0f) { + i_this->field_0x90c = 1; + } else { + s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y; + if (sVar1 > 0x1000 || sVar1 < -0x1000) { + rv = 0; + } + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000); + + if (guide_path_12[i_this->field_0x904].field_0x0 < 0) { + i_this->mActionID = 8; + a_this->speedF = 0.0f; + } + + return rv; } -/* ############################################################################################## */ -/* 80A5E330-80A5E334 000434 0004+00 0/1 0/0 0/0 .rodata @9260 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9260 = 7280.0f; -COMPILER_STRIP_GATE(0x80A5E330, &lit_9260); -#pragma pop - -/* 80A5E334-80A5E338 000438 0004+00 0/1 0/0 0/0 .rodata @9261 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9261 = -2709.0f; -COMPILER_STRIP_GATE(0x80A5E334, &lit_9261); -#pragma pop - -/* 80A57ED4-80A58274 00F034 03A0+00 1/1 0/0 0/0 .text npc_ks_guide_0409__FP12npc_ks_class - */ -static void npc_ks_guide_0409(npc_ks_class* param_0) { +/* 80A57ED4-80A58274 00F034 03A0+00 1/1 0/0 0/0 .text npc_ks_guide_0409__FP12npc_ks_class */ +static int npc_ks_guide_0409(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp50; + int rv = 1; + int frame = i_this->mpModelMorf->getFrame(); + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 26, 3.0f, 2, 1.0f); + i_this->mMode = 1; + i_this->field_0x904 = 0; + a_this->speedF = 0.0f; + // fallthrough + case 1: + if (player->current.pos.z > a_this->current.pos.z && (i_this->field_0x5c4 > 700.0f || guide_path_0409[i_this->field_0x904].field_0x0 < 0)) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + a_this->speedF = 0.0f; + } else { + i_this->field_0x8f0.x = guide_path_0409[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.z = guide_path_0409[i_this->field_0x904].field_0xc; + i_this->mMode = 5; + a_this->speedF = l_HIO.field_0x1c; + + if (i_this->field_0x5d0 != 26) { + anm_init(i_this, 26, 3.0f, 2, 1.0f); + } + } + break; + + case 5: + sp50.x = i_this->field_0x8f0.x - a_this->current.pos.x; + sp50.z = i_this->field_0x8f0.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp50.x, sp50.z); + + if (JMAFastSqrt(sp50.x * sp50.x + sp50.z * sp50.z) < a_this->speedF * 1.2f) { + i_this->field_0x904++; + i_this->mMode = 1; + } + break; + + case 10: + if (i_this->field_0x5d0 == 8) { + i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000; + } else { + i_this->field_0x8fc.y = i_this->field_0x5c8; + } + + if (i_this->field_0x5c4 < 500.0f || (player->current.pos.z < a_this->current.pos.z && guide_path_0409[i_this->field_0x904].field_0x0 >= 0)) { + i_this->mMode = 1; + } else { + if (i_this->field_0x5c4 < 150.0f && i_this->field_0x5d0 != 51) { + anm_init(i_this, 51, 5.0f, 2, 1.0f); + } + + if (i_this->field_0x5d0 == 51) { + i_this->field_0x5fc = 1; + } + } + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 1, 0x1000); + + s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y; + if (sVar1 > 0x1000 || sVar1 < -0x1000) { + rv = 0; + } + + cLib_addCalcAngleS2(&a_this->current.angle.x, 0, 1, 0x800); + + if (checkDoorDemo()) { + f32 fVar1 = 7280.0f - player->current.pos.x; + f32 fVar2 = -2709.0f - player->current.pos.z; + if (JMAFastSqrt(fVar1 * fVar1 + fVar2 * fVar2) < 500.0f) { + i_this->mActionID = 100; + i_this->mMode = 0; + } + } + + return rv; } /* 80A58274-80A58410 00F3D4 019C+00 1/1 0/0 0/0 .text path_search__FP12npc_ks_class */ -static void path_search(npc_ks_class* param_0) { +static int path_search(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + int path_index = 0; + while (path_index < 254) { + dPath* path_p = dPath_GetRoomPath(path_index, fopAcM_GetRoomNo(a_this)); + if (path_p != NULL) { + cXyz sp28 = a_this->current.pos - path_p->m_points->m_position; + if (sp28.abs() < 200.0f) { + OS_REPORT(" サルがが%d番のレール発見しました。\n", path_index); + i_this->field_0xc18 = path_p; + return 1; + } + } + + path_index++; + if (path_index >= 254) { + path_index = 0; + } + } + + return 0; } -/* ############################################################################################## */ -/* 80A5E338-80A5E33C 00043C 0004+00 0/1 0/0 0/0 .rodata @9545 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9545 = -27426.0f; -COMPILER_STRIP_GATE(0x80A5E338, &lit_9545); -#pragma pop - -/* 80A5E33C-80A5E340 000440 0004+00 0/1 0/0 0/0 .rodata @9546 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9546 = -20000.0f; -COMPILER_STRIP_GATE(0x80A5E33C, &lit_9546); -#pragma pop - -/* 80A5E340-80A5E344 000444 0004+00 0/1 0/0 0/0 .rodata @9547 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9547 = 7500.0f; -COMPILER_STRIP_GATE(0x80A5E340, &lit_9547); -#pragma pop - -/* 80A5E344-80A5E348 000448 0004+00 0/1 0/0 0/0 .rodata @9548 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9548 = 6.0f; -COMPILER_STRIP_GATE(0x80A5E344, &lit_9548); -#pragma pop - -/* 80A5E348-80A5E34C 00044C 0004+00 0/1 0/0 0/0 .rodata @9549 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9549 = 1.25f; -COMPILER_STRIP_GATE(0x80A5E348, &lit_9549); -#pragma pop - -/* 80A5E34C-80A5E350 000450 0004+00 0/1 0/0 0/0 .rodata @9550 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9550 = -30900.0f; -COMPILER_STRIP_GATE(0x80A5E34C, &lit_9550); -#pragma pop - -/* 80A5E350-80A5E354 000454 0004+00 0/1 0/0 0/0 .rodata @9551 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9551 = -15756.0f; -COMPILER_STRIP_GATE(0x80A5E350, &lit_9551); -#pragma pop - -/* 80A5E354-80A5E358 000458 0004+00 0/1 0/0 0/0 .rodata @9552 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9552 = 1300.0f; -COMPILER_STRIP_GATE(0x80A5E354, &lit_9552); -#pragma pop - -/* 80A5E358-80A5E35C 00045C 0004+00 0/1 0/0 0/0 .rodata @9553 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9553 = -31872.0f; -COMPILER_STRIP_GATE(0x80A5E358, &lit_9553); -#pragma pop - -/* 80A5E35C-80A5E360 000460 0004+00 0/1 0/0 0/0 .rodata @9554 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9554 = -15490.0f; -COMPILER_STRIP_GATE(0x80A5E35C, &lit_9554); -#pragma pop - /* 80A58410-80A58FE0 00F570 0BD0+00 1/1 0/0 0/0 .text npc_ks_mori__FP12npc_ks_class */ -static void npc_ks_mori(npc_ks_class* param_0) { +static int npc_ks_mori(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp44, sp50; + int rv = 1; + int frame = i_this->mpModelMorf->getFrame(); + f32 fVar1 = l_HIO.field_0x30; + f32 fVar2 = 1.25f; + + switch (i_this->mMode) { + case 0: + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[225])) { + if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[226])) { + i_this->mMode = 302; + i_this->field_0xc17 = 3; + dComIfGp_setItemOilCount(-(dComIfGs_getMaxOil() & 0xFFFF)); + } + } else { + i_this->field_0xaec = 1; + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[224])) { + i_this->mMode = 3; + call_pt = 0; + i_this->field_0xc17 = 2; + a_this->current.angle.y = player->shape_angle.y + 0x8000; + i_this->field_0x8fc.y = a_this->current.angle.y; + } else { + a_this->current.pos.y = a_this->home.pos.y + 10000.0f; + a_this->speed.y = 0.0f; + + if (!daPy_getPlayerActorClass()->checkKandelaarSwing(1)) { + if (!daPy_getPlayerActorClass()->getKandelaarFlamePos()) break; + if (!daPy_getPlayerActorClass()->checkUseKandelaar(0)) break; + } + + sp44.set(-27426.0f, player->current.pos.y, -20000.0f); + sp44 -= player->current.pos; + if (sp44.abs() < 7500.0f) { + i_this->mMode = 1; + i_this->mTimers[0] = 10; + } + } + } + break; + + case 1: + a_this->current.pos.y = a_this->home.pos.y + 10000.0f; + a_this->speed.y = 0.0f; + if (i_this->mTimers[0] != 1) break; + + if (daPy_getPlayerActorClass()->checkKandelaarSwing(1) || (daPy_getPlayerActorClass()->getKandelaarFlamePos() != NULL && + daPy_getPlayerActorClass()->checkUseKandelaar(0))) { + i_this->field_0xb42 = 200; + anm_init(i_this, 44, 0.0f, 2, 1.0f); + } else { + i_this->mMode = 0; + } + break; + + case 2: + cMtx_YrotS(*calc_mtx, player->shape_angle.y); + sp44.x = i_this->field_0xbb4; + sp44.y = 0.0f; + sp44.z = 100.0f; + MtxPosition(&sp44, &sp50); + a_this->current.pos = player->current.pos + sp50; + a_this->current.angle.y = player->shape_angle.y - 0x4000; + i_this->field_0x8fc.y = a_this->current.angle.y; + cLib_addCalc2(&i_this->field_0xbb4, -500.0f, 1.0f, 20.0f); + break; + + case 230: + a_this->speedF = 20.0f; + if (i_this->mTimers[0] == 0) { + i_this->mMode = 231; + a_this->speedF = 0.0f; + anm_init(i_this, 51, 5.0f, 2, 1.0f); + i_this->mTimers[0] = 30; + } + break; + + case 231: + if (i_this->mTimers[0] == 0) { + anm_init(i_this, 44, 3.0f, 2, 1.0f); + i_this->mTimers[0] = 110; + i_this->mMode = 232; + } + break; + + case 232: + if (i_this->mTimers[0] == 40) { + anm_init(i_this, 51, 5.0f, 2, 1.0f); + } + + if (i_this->mTimers[0] == 0) { + i_this->mMode = 3; + call_pt = 1; + } + break; + + case 3: + if (path_search(i_this) != 0) { + anm_init(i_this, 28, 6.0f, 2, 1.0f); + i_this->mMode = 4; + i_this->field_0x904 = 1; + a_this->speedF = 0.0f; + i_this->mTimers[3] = l_HIO.field_0x2c * 30.0f; + } + break; + + case 4: + if (i_this->field_0x904 >= i_this->field_0xc18->m_num) { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + i_this->mMode = 11; + a_this->speedF = 0.0f; + } else { + if (i_this->field_0x5c4 > (l_HIO.field_0x30 + 150.0f)) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + a_this->speedF = 0.0f; + } else { + dPnt* pnt_p = i_this->field_0xc18->m_points; + int iVar1 = i_this->field_0x904; + i_this->field_0x8f0.x = pnt_p[iVar1].m_position.x; + i_this->field_0x8f0.y = pnt_p[iVar1].m_position.y; + i_this->field_0x8f0.z = pnt_p[iVar1].m_position.z; + i_this->mMode = 5; + a_this->speedF = l_HIO.field_0x20 * fVar2; + + if (i_this->field_0x5d0 != 28) { + anm_init(i_this, 28, 6.0f, 2, 1.0f); + } + } + } + break; + + case 5: + sp44.x = i_this->field_0x8f0.x - a_this->current.pos.x; + sp44.z = i_this->field_0x8f0.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp44.x, sp44.z); + + if (JMAFastSqrt(sp44.x * sp44.x + sp44.z * sp44.z) < 100.0f) { + i_this->field_0x904++; + i_this->mMode = 4; + } + break; + + case 10: + if (i_this->field_0x5d0 == 7) { + i_this->field_0x8fc.y = i_this->field_0x5c8; + } else { + i_this->field_0x8fc.y = i_this->field_0x5c8 + 0x8000; + } + + if (i_this->field_0x5c4 < fVar1) { + i_this->mMode = 4; + } + break; + + case 11: + if (i_this->field_0x5d0 == 7) { + i_this->field_0x8fc.y = i_this->field_0x5c8; + } + + sp44.x = -30900.0f - player->current.pos.x; + sp44.z = -15756.0f - player->current.pos.z; + if (JMAFastSqrt(sp44.x * sp44.x + sp44.z * sp44.z) < 1300.0f || i_this->field_0x5c4 < fVar1) { + i_this->field_0xb42 = 300; + i_this->mMode = 300; + } + break; + + case 300: + i_this->field_0x8fc.y = i_this->field_0x5c8; + break; + + case 301: + sp44.x = -31872.0f - a_this->current.pos.x; + sp44.z = -15490.0f - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp44.x, sp44.z); + break; + + case 302: + a_this->current.pos.y = a_this->home.pos.y + 10000.0f; + a_this->speed.y = 0.0f; + break; + + case 40: + anm_init(i_this, 39, 5.0f, 2, 1.0f); + i_this->mMode = 41; + i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f; + break; + + case 41: + if ((i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || (frame > 40 && frame < 48)) || frame > 65) { + i_this->field_0x5e0 = 4; + } + + if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) { + anm_init(i_this, 43, 5.0f, 0, 1.0f); + } + + if (i_this->field_0x5d0 == 43 && i_this->mpModelMorf->isStop()) { + i_this->mMode = 40; + } + break; + + case 50: + anm_init(i_this, 46, 3.0f, 0, 1.0f); + i_this->mMode = 51; + break; + + case 51: + if (i_this->mpModelMorf->isStop()) { + i_this->mMode = 40; + } + break; + + case 53: + if (i_this->mTimers[0] == 0) { + if ((call_pt & 1) != 0) { + anm_init(i_this, 8, 5.0f, 2, 1.0f); + } else { + anm_init(i_this, 7, 5.0f, 2, 1.0f); + } + + call_pt++; + i_this->mMode = 10; + i_this->mTimers[3] = 0; + } + break; + + case 100: + anm_init(i_this, 44, 3.0f, 2, 1.0f); + i_this->mMode = 101; + i_this->mTimers[0] = 80; + break; + + case 101: + if (i_this->mTimers[0] == 0) { + i_this->mMode = 4; + i_this->mTimers[3] = l_HIO.field_0x2c * 30.0f; + } + break; + } + + if (i_this->mMode != 11 && i_this->mMode > 3 && i_this->mMode < 40 && (i_this->mTimers[3] == 0 || dComIfGs_shake_kandelaar_check() == 1)) { + i_this->mMode = 100; + a_this->speedF = 0.0f; + } + + if (i_this->mMode >= 40 && i_this->mMode <= 52) { + if (enemy_check(i_this, 800.0f) == NULL) { + i_this->mMode = 53; + i_this->mTimers[0] = 30; + } + } else { + fopAc_ac_c* enemy_p = enemy_view_check(i_this, 400.0f); + if (enemy_p != NULL) { + i_this->mMode = 50; + a_this->speedF = 0.0f; + sp44.x = enemy_p->current.pos.x - a_this->current.pos.x; + sp44.z = enemy_p->current.pos.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp44.x, sp44.z) + 0x8000; + } + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 2, 0x1000); + + s16 sVar1 = a_this->current.angle.y - i_this->field_0x8fc.y; + if (sVar1 > 0x1000 || sVar1 < -0x1000) { + rv = 0; + } + + return rv; } -/* ############################################################################################## */ -/* 80A5E360-80A5E364 000464 0004+00 0/1 0/0 0/0 .rodata @9862 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9862 = -39906.0f; -COMPILER_STRIP_GATE(0x80A5E360, &lit_9862); -#pragma pop - -/* 80A5E364-80A5E368 000468 0004+00 0/1 0/0 0/0 .rodata @9863 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9863 = 21962.0f; -COMPILER_STRIP_GATE(0x80A5E364, &lit_9863); -#pragma pop - -/* 80A5E368-80A5E36C 00046C 0004+00 0/1 0/0 0/0 .rodata @9864 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9864 = -24243.0f; -COMPILER_STRIP_GATE(0x80A5E368, &lit_9864); -#pragma pop - -/* 80A5E36C-80A5E370 000470 0004+00 0/1 0/0 0/0 .rodata @9865 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9865 = -21000.0f; -COMPILER_STRIP_GATE(0x80A5E36C, &lit_9865); -#pragma pop - -/* 80A5E370-80A5E374 000474 0004+00 0/1 0/0 0/0 .rodata @9866 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9866 = 1962.0f; -COMPILER_STRIP_GATE(0x80A5E370, &lit_9866); -#pragma pop - /* 80A58FE0-80A599D8 010140 09F8+00 2/1 0/0 0/0 .text npc_ks_fsdemo__FP12npc_ks_class */ -static void npc_ks_fsdemo(npc_ks_class* param_0) { +static int npc_ks_fsdemo(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp2c, sp38; + int rv = 1; + int frame = i_this->mpModelMorf->getFrame(); + int iVar1 = 0; + s16 sVar1 = 0x1000; + s16 sVar2; + + i_this->field_0x5fc = 0; + i_this->field_0xaec = 1; + + switch (i_this->mMode) { + case 0: + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x220])) { + i_this->mMode = 40; + } else { + fpcM_Search(s_fs_sub, i_this); + a_this->current.pos.set(-39906.0f, 21962.0f, -24243.0f); + rv = 0; + + if (player->current.pos.z < -21000.0f) { + i_this->mMode = 1; + a_this->current.pos.set(-39906.0f, 1962.0f, -24243.0f); + anm_init(i_this, 26, 3.0f, 2, 1.0f); + i_this->field_0x904 = 0; + a_this->speedF = 0.0f; + i_this->field_0xb42 = 350; + mDoAud_seStart(Z2SE_KOSARU_V_PRISONED, 0, 0, 0); + } + } + break; + + case 1: + if (guide_path_fs[i_this->field_0x904].field_0x0 != 0) { + i_this->field_0x8f0.x = guide_path_fs[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.y = guide_path_fs[i_this->field_0x904].field_0x8; + i_this->field_0x8f0.z = guide_path_fs[i_this->field_0x904].field_0xc; + i_this->field_0x910 = a_this->current.pos; + i_this->field_0x91c = i_this->field_0x8f0; + i_this->mMode = 2; + anm_init(i_this, 32, 2.0f, 0, 1.0f); + a_this->speedF = 0.0f; + } else { + i_this->field_0x8f0.x = guide_path_fs[i_this->field_0x904].field_0x4; + i_this->field_0x8f0.z = guide_path_fs[i_this->field_0x904].field_0xc; + i_this->mMode = 5; + a_this->speedF = l_HIO.field_0x1c; + + if (i_this->field_0x5d0 != 26) { + anm_init(i_this, 26, 3.0f, 2, 1.0f); + } + } + break; + + case 2: + rv = 2; + if (i_this->field_0x5d0 == 32 && i_this->mpModelMorf->isStop()) { + anm_init(i_this, 33, 1.0f, 0, 1.0f); + a_this->speedF = 40.0f; + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1); + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1); + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_WIND, 0, -1); + i_this->field_0xbe0 = 1; + } + + sp2c = i_this->field_0x8f0 - a_this->current.pos; + i_this->field_0x8fc.y = cM_atan2s(sp2c.x, sp2c.z); + i_this->field_0x8fc.x = -cM_atan2s(sp2c.y, JMAFastSqrt(sp2c.x * sp2c.x + sp2c.z * sp2c.z)); + + if (sp2c.abs() < a_this->speedF * 1.2f) { + a_this->current.pos = i_this->field_0x8f0; + + if (i_this->field_0x904 == 0) { + anm_init(i_this, 45, 3.0f, 0, 1.0f); + i_this->mMode = 3; + i_this->field_0x8fc.y += 0x8000; + a_this->speedF = 0.0f; + } else { + i_this->mMode = 1; + } + + i_this->field_0xbe0 = 1; + i_this->field_0x904++; + } + break; + + case 3: + if (i_this->mpModelMorf->isStop()) { + i_this->field_0x8fc.y += 0x8000; + i_this->mMode = 1; + } + break; + + case 5: + sp2c.x = i_this->field_0x8f0.x - a_this->current.pos.x; + sp2c.z = i_this->field_0x8f0.z - a_this->current.pos.z; + i_this->field_0x8fc.y = cM_atan2s(sp2c.x, sp2c.z); + + if (JMAFastSqrt(sp2c.x * sp2c.x + sp2c.z * sp2c.z) < a_this->speedF * 1.2f) { + i_this->field_0x904++; + i_this->mMode = 1; + + if (guide_path_fs[i_this->field_0x904].field_0x0 < 0) { + i_this->mMode = 10; + a_this->speedF = 0.0f; + anm_init(i_this, 51, 5.0f, 2, 1.0f); + } + } + break; + + case 10: + a_this->speedF = 0.0f; + break; + + case 20: + i_this->mMode = 21; + anm_init(i_this, 51, 10.0f, 2, 1.0f); + // fallthrough + case 21: + i_this->field_0x8fc.y = i_this->field_0x5c8; + sVar1 = 0; + i_this->field_0x5fc = 1; + + if (i_this->mTimers[2] != 0) { + i_this->field_0x93c = 10; + i_this->field_0x940.set(-37799.0f, 815.0f, -22323.0f); + i_this->field_0x8fc.y -= 0x3000; + sVar1 = 0x800; + } + + iVar1 = 1; + sVar2 = a_this->current.angle.y - i_this->field_0x5c8; + if ((sVar2 > 0x3000 || sVar2 < -0x3000) && i_this->mMode < 22) { + anm_init(i_this, 28, 3.0f, 0, 1.0f); + i_this->mMode = 22; + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_WALK, -1); + } + break; + + case 22: + sVar1 = 0x800; + i_this->field_0x8fc.y = i_this->field_0x5c8; + + if (frame >= 11) { + i_this->mMode = 20; + } + break; + + case 40: + anm_init(i_this, 39, 5.0f, 2, 1.0f); + i_this->mMode = 41; + i_this->mTimers[0] = cM_rndF(80.0f) + 100.0f; + break; + + case 41: + if ((i_this->field_0x5d0 == 39 || (i_this->field_0x5d0 == 43 && frame < 7) || (frame > 40 && frame < 48)) || frame > 65) { + i_this->field_0x5e0 = 4; + } + + if (i_this->mTimers[0] == 0 && i_this->field_0x5d0 == 39) { + anm_init(i_this, 43, 5.0f, 0, 1.0f); + } + + if (i_this->field_0x5d0 == 43) { + if (i_this->field_0xb42 >= 360 && i_this->mpModelMorf->checkFrame(57.0f)) { + i_this->mMode = 20; + } else if (i_this->mpModelMorf->isStop()) { + i_this->mMode = 40; + } + } + break; + + case 42: + if (i_this->mTimers[1] == 1) { + i_this->field_0xb42 = 360; + } + } + + if ((i_this->mMode == 40 || i_this->mMode == 41) && fopAcM_SearchByName(PROC_E_FS) == NULL && i_this->field_0xb42 == 0) { + i_this->mMode = 42; + i_this->mTimers[1] = 30; + } + + if (a_this->speedF > 25.0f) { + i_this->field_0x90c = 1; + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x8fc.y, 2, sVar1); + + if (iVar1 != 0) { + fopAcM_OnStatus(a_this, 0); + cLib_onBit(a_this->attention_info.flags, 0xAUL); + a_this->eventInfo.onCondition(dEvtCnd_CANTALK_e); + if (dComIfGp_event_runCheck()) { + if (a_this->eventInfo.checkCommandTalk()) { + if (i_this->field_0xaee == 0) { + i_this->mMsgFlow.init(a_this, 0x74, 0, NULL); + i_this->field_0xaee = 1; + } + + if (i_this->mMsgFlow.doFlow(a_this, NULL, 0)) { + dComIfGp_event_reset(); + i_this->field_0xaee = 0; + } + } + } else { + i_this->field_0xaee = 0; + } + } else { + fopAcM_OffStatus(a_this, 0); + cLib_offBit(a_this->attention_info.flags, 0xAUL); + i_this->field_0xaee = 0; + } + + return rv; } /* 80A599D8-80A59A90 010B38 00B8+00 1/1 0/0 0/0 .text npc_ks_kago__FP12npc_ks_class */ -static void npc_ks_kago(npc_ks_class* param_0) { - // NONMATCHING +static void npc_ks_kago(npc_ks_class* i_this) { + fopAc_ac_c* a_this = &i_this->actor; + + i_this->field_0x5fc = 0; + + switch (i_this->mMode) { + case 0: + anm_init(i_this, 34, 3.0f, 2, 1.0f); + i_this->mMode = 1; + // fallthrough + case 1: + break; + } + + cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x5c8, 2, 0x2000); + i_this->field_0xaec = 0; + + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x241])) { + fopAcM_delete(a_this); + } } -/* ############################################################################################## */ -/* 80A5E374-80A5E378 000478 0004+00 0/0 0/0 0/0 .rodata @9867 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9867 = -37799.0f; -COMPILER_STRIP_GATE(0x80A5E374, &lit_9867); -#pragma pop - -/* 80A5E378-80A5E37C 00047C 0004+00 0/0 0/0 0/0 .rodata @9868 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9868 = 815.0f; -COMPILER_STRIP_GATE(0x80A5E378, &lit_9868); -#pragma pop - -/* 80A5E37C-80A5E380 000480 0004+00 0/0 0/0 0/0 .rodata @9869 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9869 = -22323.0f; -COMPILER_STRIP_GATE(0x80A5E37C, &lit_9869); -#pragma pop - -/* 80A5E380-80A5E384 000484 0004+00 0/0 0/0 0/0 .rodata @9870 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_9870 = 57.0f; -COMPILER_STRIP_GATE(0x80A5E380, &lit_9870); -#pragma pop - -/* 80A5E384-80A5E388 000488 0004+00 0/1 0/0 0/0 .rodata @10197 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10197 = 16.0f; -COMPILER_STRIP_GATE(0x80A5E384, &lit_10197); -#pragma pop - -/* 80A5E388-80A5E38C 00048C 0004+00 0/1 0/0 0/0 .rodata @10198 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10198 = 9.0f; -COMPILER_STRIP_GATE(0x80A5E388, &lit_10198); -#pragma pop - -/* 80A5E38C-80A5E390 000490 0004+00 0/1 0/0 0/0 .rodata @10199 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10199 = 24.0f; -COMPILER_STRIP_GATE(0x80A5E38C, &lit_10199); -#pragma pop - -/* 80A5E390-80A5E394 000494 0004+00 0/2 0/0 0/0 .rodata @10200 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10200 = 11.0f; -COMPILER_STRIP_GATE(0x80A5E390, &lit_10200); -#pragma pop - -/* 80A5E394-80A5E398 000498 0004+00 0/1 0/0 0/0 .rodata @10201 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10201 = 19.0f; -COMPILER_STRIP_GATE(0x80A5E394, &lit_10201); -#pragma pop - -/* 80A5E398-80A5E39C 00049C 0004+00 0/1 0/0 0/0 .rodata @10202 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10202 = 36.0f; -COMPILER_STRIP_GATE(0x80A5E398, &lit_10202); -#pragma pop - -/* 80A5E39C-80A5E3A0 0004A0 0004+00 0/1 0/0 0/0 .rodata @10203 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10203 = 54.0f; -COMPILER_STRIP_GATE(0x80A5E39C, &lit_10203); -#pragma pop - -/* 80A5E3A0-80A5E3A4 0004A4 0004+00 0/1 0/0 0/0 .rodata @10204 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10204 = 47.0f; -COMPILER_STRIP_GATE(0x80A5E3A0, &lit_10204); -#pragma pop - -/* 80A5E3A4-80A5E3A8 0004A8 0004+00 0/1 0/0 0/0 .rodata @10205 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10205 = 22.0f; -COMPILER_STRIP_GATE(0x80A5E3A4, &lit_10205); -#pragma pop - -/* 80A5E3A8-80A5E3AC 0004AC 0004+00 0/1 0/0 0/0 .rodata @10206 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10206 = 17.0f; -COMPILER_STRIP_GATE(0x80A5E3A8, &lit_10206); -#pragma pop - -/* 80A5E3AC-80A5E3B0 0004B0 0004+00 0/1 0/0 0/0 .rodata @10207 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10207 = 18.0f; -COMPILER_STRIP_GATE(0x80A5E3AC, &lit_10207); -#pragma pop - -/* 80A5E3B0-80A5E3B4 0004B4 0004+00 0/1 0/0 0/0 .rodata @10208 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10208 = 38.0f; -COMPILER_STRIP_GATE(0x80A5E3B0, &lit_10208); -#pragma pop - -/* 80A5E3B4-80A5E3B8 0004B8 0004+00 0/1 0/0 0/0 .rodata @10209 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10209 = 51.0f; -COMPILER_STRIP_GATE(0x80A5E3B4, &lit_10209); -#pragma pop - -/* 80A5E3B8-80A5E3BC 0004BC 0004+00 0/1 0/0 0/0 .rodata @10210 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_10210 = 0x3CB020C5; -COMPILER_STRIP_GATE(0x80A5E3B8, &lit_10210); -#pragma pop - -/* 80A5E3BC-80A5E3C0 0004C0 0004+00 0/1 0/0 0/0 .rodata @10211 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10211 = 127.0f; -COMPILER_STRIP_GATE(0x80A5E3BC, &lit_10211); -#pragma pop - /* 80A59A90-80A5A7D8 010BF0 0D48+00 1/1 0/0 0/0 .text anm_se_set__FP12npc_ks_class */ -static void anm_se_set(npc_ks_class* param_0) { +static void anm_se_set(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + + if (i_this->field_0x5d0 == 17) { + if (i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_WAIT, -1); + } + + if (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(16.0f)) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_HAND_CLAP, 0, -1); + } + } else if (i_this->field_0x5d0 == 55) { + if (i_this->mpModelMorf->checkFrame(9.0f)) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_HAND_CLAP, 0, -1); + } + } else if (i_this->field_0x5d0 == 11) { + if (i_this->mpModelMorf->checkFrame(10.0f)) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_HAND_CLAP, 0, -1); + } + } else if (i_this->field_0x5d0 == 56) { + if (i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_DELIGHT, -1); + } + + if (i_this->mpModelMorf->checkFrame(24.0f) || i_this->mpModelMorf->checkFrame(11.0f)) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_HAND_CLAP, 0, -1); + } + } else if (i_this->field_0x5d0 == 12) { + if (i_this->mpModelMorf->checkFrame(3.0f) || i_this->mpModelMorf->checkFrame(10.0f)) { + if (fopAcM_GetRoomNo(a_this) == 22) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_FT_TSUTA, 0, -1); + } else { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_CLIMB, 0, -1); + } + } + } else if (i_this->field_0x5d0 == 15) { + if (i_this->mpModelMorf->checkFrame(3.0f) || i_this->mpModelMorf->checkFrame(10.0f)) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_CLIMB, 0, -1); + } + } else if (i_this->field_0x5d0 == 25) { + if (i_this->mpModelMorf->checkFrame(19.0f) || i_this->mpModelMorf->checkFrame(36.0f) || i_this->mpModelMorf->checkFrame(54.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_POINT, -1); + } + } else if (i_this->field_0x5d0 == 26) { + if (i_this->mpModelMorf->checkFrame(1.0f) && i_this->field_0xc17 == 2) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_WALK, -1); + } + + if (i_this->mpModelMorf->checkFrame(2.0f)) { + if (i_this->mActionID == 203 && i_this->mMode < 4) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_FT_BRIDGE, 0, -1); + } else { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_FOOTNOTE, 0, -1); + + if (i_this->field_0xc17 == 2) { + mDoAud_seStart(Z2SE_KOSARU_KANTERA_SWING, &i_this->field_0xc04, 0, 0); + } + } + } + } else if (i_this->field_0x5d0 == 28) { + if (i_this->mpModelMorf->checkFrame(1.0f) && i_this->field_0xc17 == 2) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_WALK, -1); + } + + if (i_this->mpModelMorf->checkFrame(2.0f)) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_FOOTNOTE, 0, -1); + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_WALK, -1); + + if (i_this->field_0xc17 == 2) { + mDoAud_seStart(Z2SE_KOSARU_KANTERA_SWING, &i_this->field_0xc04, 0, 0); + } + } + } else if (i_this->field_0x5d0 == 43) { + if (i_this->mpModelMorf->checkFrame(5.0f) || i_this->mpModelMorf->checkFrame(47.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_SCARED, -1); + } + } else if (i_this->field_0x5d0 == 39) { + if (i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_SCARED, -1); + } + } else if (i_this->field_0x5d0 == 30) { + if (i_this->mpModelMorf->checkFrame(4.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1); + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1); + } else if (i_this->mpModelMorf->checkFrame(22.0f)) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1); + } + } else if (i_this->field_0x5d0 == 5) { + if (i_this->mpModelMorf->checkFrame(4.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1); + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1); + } else if (i_this->mpModelMorf->checkFrame(22.0f)) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1); + } + } else if (i_this->field_0x5d0 == 7) { + if (i_this->mpModelMorf->checkFrame(8.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP, -1); + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_START, 0, -1); + } else if (i_this->mpModelMorf->checkFrame(17.0f)) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1); + + if (i_this->field_0xc17 == 2) { + mDoAud_seStart(Z2SE_KOSARU_KANTERA_ADD, &i_this->field_0xc04, 0, 0); + } + } + } else if (i_this->field_0x5d0 == 8) { + if (i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_CALL, -1); + } + } else if (i_this->field_0x5d0 == 44) { + if (i_this->mpModelMorf->checkFrame(9.0f) || i_this->mpModelMorf->checkFrame(19.0f)) { + mDoAud_seStart(Z2SE_KOSARU_KANTERA_SWING, &i_this->field_0xc04, 0, 0); + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_SWING_KANTERA, -1); + } + } else if (i_this->field_0x5d0 == 35) { + if (i_this->mpModelMorf->checkFrame(40.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_SLAPPED_HIP, -1); + } + } else if (i_this->field_0x5d0 == 16) { + if (i_this->mpModelMorf->checkFrame(1.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_CALL, -1); + } + } else if (i_this->field_0x5d0 == 46) { + if (i_this->mpModelMorf->checkFrame(4.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP_SURPRISE, -1); + } else if (i_this->mpModelMorf->checkFrame(18.0f)) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1); + } else if ((i_this->mpModelMorf->checkFrame(25.0f) || i_this->mpModelMorf->checkFrame(38.0f)) || i_this->mpModelMorf->checkFrame(51.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_POINT, -1); + mDoAud_seStart(Z2SE_KOSARU_KANTERA_SWING, &i_this->field_0xc04, 0, 0); + } + } else if (i_this->field_0x5d0 == 34) { + if (i_this->mpModelMorf->checkFrame(1.0f)) { + f32 fVar1 = i_this->field_0x5c4 * 0.0215f; + if (fVar1 > 127.0f) { + fVar1 = 127.0f; + } + + i_this->mSound.startCreatureSound(Z2SE_KOSARU_V_KAGO_WAIT, fVar1, -1); + } else if (i_this->mpModelMorf->checkFrame(16.0f)) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1); + } + } else if (i_this->field_0x5d0 == 45) { + if (i_this->mpModelMorf->checkFrame(4.0f)) { + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP_SURPRISE, -1); + } else if (i_this->mpModelMorf->checkFrame(16.0f)) { + i_this->mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1); + } + } } -/* ############################################################################################## */ -/* 80A5E3C0-80A5E3C4 0004C4 0004+00 0/1 0/0 0/0 .rodata @10479 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10479 = -300.0f; -COMPILER_STRIP_GATE(0x80A5E3C0, &lit_10479); -#pragma pop - -/* 80A5E3C4-80A5E3C8 0004C8 0004+00 0/1 0/0 0/0 .rodata @10480 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10480 = -90.0f; -COMPILER_STRIP_GATE(0x80A5E3C4, &lit_10480); -#pragma pop - -/* 80A5E3C8-80A5E3CC 0004CC 0004+00 0/1 0/0 0/0 .rodata @10481 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10481 = 2000.0f; -COMPILER_STRIP_GATE(0x80A5E3C8, &lit_10481); -#pragma pop - -/* 80A5E3CC-80A5E3D0 0004D0 0004+00 0/1 0/0 0/0 .rodata @10482 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10482 = -70.0f; -COMPILER_STRIP_GATE(0x80A5E3CC, &lit_10482); -#pragma pop - -/* 80A5E3D0-80A5E3D4 0004D4 0004+00 0/1 0/0 0/0 .rodata @10483 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10483 = 0.75f; -COMPILER_STRIP_GATE(0x80A5E3D0, &lit_10483); -#pragma pop - /* 80A5A7D8-80A5B544 011938 0D6C+00 1/1 0/0 0/0 .text action__FP12npc_ks_class */ -static void action(npc_ks_class* param_0) { +static void action(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz sp44, sp50; + + fopAcM_OffStatus(a_this, 0); + cLib_offBit(a_this->attention_info.flags, 0x20000042UL); + + if (i_this->field_0x5b5 == 0) { + i_this->field_0x5c4 = fopAcM_searchPlayerDistanceXZ(a_this); + } else { + sp44 = player->eyePos - i_this->field_0x614; + i_this->field_0x5c4 = sp44.abs(); + cLib_addCalcAngleS2(&a_this->current.angle.x, -0x8000, 1, 0x1000); + } + + i_this->field_0x5c8 = fopAcM_searchPlayerAngleY(a_this); + i_this->field_0x5fc = 0; + i_this->field_0xaed = 0; + i_this->field_0x5b5 = 0; + + int iVar1 = 1; + int iVar2 = 2; + int iVar3 = 0; + + a_this->gravity = -5.0f; + + switch (i_this->mActionID) { + case 2: + a_this->gravity = 0.0f; + i_this->field_0x5fc = 1; + iVar2 = npc_ks_ori2(i_this); + break; + + case 4: + a_this->gravity = 0.0f; + npc_ks_pole_ori(i_this); + i_this->field_0x5fc = 1; + iVar1 = 0; + break; + + case 5: + i_this->field_0x5fc = 1; + iVar2 = npc_ks_ori(i_this); + if (iVar2 == 0) { + iVar1 = 0; + } + break; + + case 8: + npc_ks_home(i_this); + i_this->field_0x5fc = 1; + break; + + case 10: + a_this->gravity = 0.0f; + npc_ks_hang(i_this); + i_this->field_0x5fc = 2; + i_this->field_0x5b5 = 1; + iVar1 = 0; + iVar2 = 0; + break; + + case 11: + a_this->gravity = 0.0f; + npc_ks_hang_s(i_this); + i_this->field_0x5fc = 2; + i_this->field_0x5b5 = 1; + iVar1 = 0; + iVar2 = 0; + break; + + case 20: + a_this->gravity = 0.0f; + npc_ks_to_hang(i_this); + iVar2 = 2; + break; + + case 21: + a_this->gravity = 0.0f; + npc_ks_e_hang(i_this); + i_this->field_0x5fc = 3; + i_this->field_0x5b5 = 1; + iVar1 = 0; + iVar2 = 0; + break; + + case 22: + iVar2 = npc_ks_e_jump(i_this); + break; + + case 100: + a_this->gravity = -5.0f; + iVar3 = 1; + if (checkDoorDemo()) { + i_this->field_0xaec = 1; + } else { + if (i_this->mMode > 6) { + i_this->mMode = 0; + } + + cLib_addCalc2(&a_this->current.pos.y, player->current.pos.y, 1.0f, 10.0f); + + if (i_this->field_0x5c4 > 400.0f) { + cMtx_YrotS(*calc_mtx, i_this->field_0x5c8); + sp44.x = 0.0f; + sp44.y = 0.0f; + sp44.z = -300.0f; + MtxPosition(&sp44, &sp50); + a_this->current.pos.x = player->current.pos.x + sp50.x; + a_this->current.pos.z = player->current.pos.z + sp50.z; + } + + iVar1 = 0; + a_this->speed.y = 0.0f; + + int iVar4 = fopAcM_GetRoomNo(a_this); + int iVar5 = dStage_roomControl_c::getNextStayNo(); + if (iVar5 != iVar4) { + if ((iVar4 != 0 || iVar5 != 3) && (iVar4 != 3 || iVar5 != 4)) { + if ((((!dComIfGs_isSwitch(0x52, fopAcM_GetRoomNo(a_this) || iVar4 != 4) || iVar5 != 0) && + ((i_this->field_0x5b6 != 2 && i_this->field_0x5b6 != 3) || (iVar4 != 0 || iVar5 != 15))) && + ((iVar4 != 1 || iVar5 != 4) && (iVar4 != 0 || (iVar5 != 1 || i_this->field_0x5b6 > 2)))) && + (iVar4 != 9 || iVar5 == 12)) { + i_this->mActionID = 101; + i_this->mMode = 0; + } else { + iVar2 = npc_ks_option(i_this); + fopAcM_SetRoomNo(a_this, fopAcM_GetRoomNo(player)); + a_this->tevStr.room_no = fopAcM_GetRoomNo(a_this); + } + + i_this->field_0xbdd = 0; + + if (iVar3 != 0) { + if (water_check(i_this, a_this->current.pos, 60.0f) && a_this->current.pos.y <= i_this->field_0x63c) { + i_this->field_0xbdd = 1; + if (i_this->mActionID != 100) { + i_this->mActionID = 100; + i_this->mMode = 0; + } + } + } + + if (i_this->field_0x5c4 < 500.0f && fabsf(a_this->current.pos.y - player->current.pos.y) < 1000.0f) { + daPy_py_c::setLookPos(&a_this->eyePos); + } + + if (i_this->field_0xaed == 1 && i_this->field_0x5c4 < 300.0f) { + i_this->mActionID = 100; + i_this->mMode = 0; + } + + cLib_addCalcAngleS2(&a_this->shape_angle.y, a_this->current.angle.y, 2, 0x2000); + cLib_addCalcAngleS2(&a_this->shape_angle.x, a_this->current.angle.x, 2, 0x2000); + cLib_addCalcAngleS2(&a_this->shape_angle.z, a_this->current.angle.z, 2, 0x2000); + + if (iVar2 == 1) { + f32 fVar1 = 1.0f; + + if (i_this->field_0x5d0 == 47 && fopAcM_CheckCondition(a_this, 4) != 0) { + fVar1 = 10.0f; + } + + cMtx_YrotS(*calc_mtx, a_this->current.angle.y); + sp44.x = 0.0f; + sp44.y = 0.0f; + sp44.z = a_this->speedF * fVar1; + MtxPosition(&sp44, &sp50); + + a_this->speed.x = sp50.x; + a_this->speed.z = sp50.z; + a_this->current.pos += a_this->speed; + a_this->speed.y += a_this->gravity; + + if (a_this->speed.y < -90.0f) { + a_this->speed.y = -90.0f; + } + } else if (iVar2 == 2) { + cMtx_YrotS(*calc_mtx, i_this->field_0x8fc.y); + cMtx_XrotM(*calc_mtx, i_this->field_0x8fc.x); + sp44.x = 0.0f; + sp44.y = 0.0f; + sp44.z = a_this->speedF; + MtxPosition(&sp44, &a_this->speed); + a_this->current.pos += a_this->speed; + iVar1 = 0; + } + + if (i_this->field_0xaec == 1) { + cXyz* move_p = i_this->mStts.GetCCMoveP(); + if (move_p != NULL) { + a_this->current.pos.x += move_p->x * 0.5f; + a_this->current.pos.y += move_p->y * 0.5f; + a_this->current.pos.z += move_p->z * 0.5f; + } + } + + if (iVar1 != 0) { + if (a_this->shape_angle.x < -1000) { + f32 fVar2 = 30.0f * cM_ssin(a_this->shape_angle.x); + a_this->current.pos.y += fVar2; + a_this->old.pos.y += fVar2; + + i_this->mObjAcch.CrrPos(dComIfG_Bgsp()); + + a_this->current.pos.y -= fVar2; + a_this->old.pos.y -= fVar2; + } else { + i_this->mObjAcch.CrrPos(dComIfG_Bgsp()); + } + } + + s16 sVar1 = 0; + s16 sVar2 = 0; + + if (i_this->field_0x5fc != 0) { + if (i_this->field_0x93c == 0) { + if ((i_this->field_0x5e6 & 7U) == 0 && fopAcM_otoCheck(a_this, 2000.0f)) { + i_this->field_0x940 = dKy_Sound_get()->position; + i_this->field_0x93c = cM_rndF(20.0f) + 30.0f; + } + + player = dComIfGp_getPlayer(0); + if (i_this->field_0x938 == -1) { + sp44 = player->eyePos - a_this->current.pos; + sp44.y += -70.0f; + } else { + fopAc_ac_c* actor_p = fopAcM_SearchByID(i_this->field_0x938); + if (actor_p == NULL) { + sp44 = player->eyePos - a_this->current.pos; + } else { + sp44 = actor_p->eyePos - a_this->current.pos; + } + } + } else { + i_this->field_0x93c--; + if (i_this->field_0x93c < 40) { + sp44 = i_this->field_0x940 - a_this->current.pos; + sp44.y += 100.0f; + } else { + sp44 = player->eyePos - a_this->current.pos; + sp44.y += -70.0f; + } + } + + sVar1 = cM_atan2s(sp44.x, sp44.z) - a_this->shape_angle.y; + sVar1 -= sVar1 << 1; + sVar2 = a_this->shape_angle.y + cM_atan2s(sp44.y, JMAFastSqrt(sp44.x * sp44.x + sp44.z * sp44.z)); + + if (sVar1 < 0x1F41) { + if (sVar1 < -8000) { + sVar1 = -8000; + } + } else { + sVar1 = 8000; + } + + if (sVar2 < 0x3E81) { + if (sVar2 < -8000) { + sVar2 = -8000; + } + } else { + sVar2 = 16000; + } + + if (i_this->field_0x5fc > 1) { + sVar1 /= 2; + } + } + + if (i_this->field_0x5fd != 0) { + sVar2 = 10000; + i_this->field_0x5fd = 0; + i_this->field_0x5fc = 1; + } + + cLib_addCalcAngleS2(&i_this->field_0x5fe, sVar1, 4, 0x1000); + cLib_addCalcAngleS2(&i_this->field_0x600, sVar2, 4, 0x1000); + + if (i_this->field_0x5e0 == 0) { + i_this->field_0x5e0 = cM_rndF(60.0f) + 30.0f; + } else { + i_this->field_0x5e0--; + if (i_this->field_0x5e0 < 8) { + i_this->field_0x5e2 = 7 - i_this->field_0x5e0; + } else { + i_this->field_0x5e2 = 0; + } + } + + cLib_addCalcAngleS2(&i_this->field_0x606, i_this->field_0x608, 2, 5000); + i_this->field_0x608 = 0; + if (i_this->field_0xbe0 != 0) { + fopAcM_effSmokeSet1(&i_this->field_0x858, &i_this->field_0x85c, &a_this->current.pos, NULL, + 0.75f, &a_this->tevStr, 1); + i_this->field_0xbe0 = 0; + } + } + } + } + + case 101: + a_this->gravity = -5.0f; + npc_ks_awaydoor(i_this); + break; + + case 102: + a_this->gravity = -5.0f; + iVar2 = npc_ks_guide_00(i_this); + iVar3 = 1; + break; + + case 111: + a_this->gravity = -5.0f; + iVar3 = npc_ks_guide_00_2(i_this); + break; + + case 112: + a_this->gravity = -5.0f; + iVar2 = npc_ks_guide_00_3(i_this); + iVar3 = 1; + break; + + case 113: + a_this->gravity = -5.0f; + iVar2 = npc_ks_guide_01(i_this); + iVar3 = 1; + break; + + case 114: + a_this->gravity = -5.0f; + iVar2 = npc_ks_guide_02(i_this); + iVar3 = 1; + break; + + case 115: + a_this->gravity = -5.0f; + iVar2 = npc_ks_guide_09(i_this); + iVar3 = 1; + break; + + case 116: + a_this->gravity = -5.0f; + iVar2 = npc_ks_guide_22(i_this); + iVar3 = 1; + break; + + case 117: + a_this->gravity = -5.0f; + iVar2 = npc_ks_guide_0409(i_this); + iVar3 = 1; + break; + + case 118: + iVar1 = npc_ks_demo_02(i_this); + if (iVar1 == 0) { + iVar2 = 0; + } + break; + + case 201: + iVar1 = npc_ks_demo_022(i_this); + if (iVar1 == 0) { + iVar2 = 0; + } + break; + + case 203: + npc_ks_demo_04(i_this); + break; + + case 204: + iVar2 = npc_ks_demo_12(i_this); + break; + + case 300: + iVar2 = npc_ks_mori(i_this); + break; + + case 301: + iVar2 = npc_ks_fsdemo(i_this); + break; + + case 302: + npc_ks_kago(i_this); + } } /* 80A5B544-80A5B614 0126A4 00D0+00 1/1 0/0 0/0 .text s_kago_sub__FPvPv */ -static void s_kago_sub(void* param_0, void* param_1) { +static void* s_kago_sub(void* i_actor, void* i_data) { // NONMATCHING + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_OBJ_KAGO) { + if (((daObj_Kago_c*)i_actor)->getType() == 0) { + return i_actor; + } + } + + return NULL; } -/* ############################################################################################## */ -/* 80A5E3D4-80A5E3D8 0004D8 0004+00 0/1 0/0 0/0 .rodata @10567 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10567 = 44.0f; -COMPILER_STRIP_GATE(0x80A5E3D4, &lit_10567); -#pragma pop - -/* 80A5E3D8-80A5E3DC 0004DC 0004+00 0/1 0/0 0/0 .rodata @10568 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10568 = 144.5f; -COMPILER_STRIP_GATE(0x80A5E3D8, &lit_10568); -#pragma pop - -/* 80A5E3DC-80A5E3E0 0004E0 0004+00 0/1 0/0 0/0 .rodata @10569 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10569 = -30715.0f; -COMPILER_STRIP_GATE(0x80A5E3DC, &lit_10569); -#pragma pop - -/* 80A5E3E0-80A5E3E4 0004E4 0004+00 0/1 0/0 0/0 .rodata @10570 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10570 = 338.0f; -COMPILER_STRIP_GATE(0x80A5E3E0, &lit_10570); -#pragma pop - -/* 80A5E3E4-80A5E3EC 0004E8 0004+04 0/1 0/0 0/0 .rodata @10571 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10571[1 + 1 /* padding */] = { - 14500.0f, - /* padding */ - 0.0f, -}; -COMPILER_STRIP_GATE(0x80A5E3E4, &lit_10571); -#pragma pop - -/* 80A5E3EC-80A5E3F4 0004F0 0008+00 0/2 0/0 0/0 .rodata @10573 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_10573[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80A5E3EC, &lit_10573); -#pragma pop - /* 80A5B614-80A5B8FC 012774 02E8+00 1/1 0/0 0/0 .text kantera_sub__FP12npc_ks_class */ -static void kantera_sub(npc_ks_class* param_0) { +static void kantera_sub(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(14), mDoMtx_stack_c::get()); + i_this->field_0xc00->setBaseTRMtx(mDoMtx_stack_c::get()); + + if (i_this->field_0xc17 == 2) { + mDoMtx_stack_c::transM(44.0f, 144.5f, 11.0f); + mDoMtx_multVecZero(mDoMtx_stack_c::get(), &i_this->field_0xc04); + mDoMtx_stack_c::scaleM(l_HIO.field_0x34, l_HIO.field_0x34, l_HIO.field_0x34); + daPy_getPlayerActorClass()->setKandelaarMtx(mDoMtx_stack_c::get(), 1, 1); + } else if (i_this->field_0xc17 == 3) { + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + if (fopAcM_checkCarryNow(a_this) != 0 && player->getGrabUpStart()) { + fopAcM_cancelCarryNow(a_this); + cLib_offBit(a_this->attention_info.flags, 0x80UL); + i_this->field_0xc17 = 0; + dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0xE2]); + } else { + i_this->field_0xc04.x = -30715.0f; + i_this->field_0xc04.z = -17200.0f; + i_this->field_0xc04.y += i_this->field_0xc10; + i_this->field_0xc10 -= 5.0f; + + if (i_this->field_0xc04.y <= 338.0f) { + i_this->field_0xc04.y = 338.0f; + if (i_this->field_0xc16 == 0) { + i_this->field_0xc10 = 20.0f; + i_this->field_0xc16 = 1; + i_this->field_0xc14 = 12; + } else { + i_this->field_0xc10 = 0.0f; + } + } + + mDoMtx_stack_c::transS(i_this->field_0xc04.x, i_this->field_0xc04.y, i_this->field_0xc04.z); + f32 fVar1 = cM_ssin(i_this->field_0xc14 * 13000); + s16 sVar1 = i_this->field_0xc14; + if (i_this->field_0xc14 != 0) { + i_this->field_0xc14--; + } + + mDoMtx_stack_c::ZrotM((int)sVar1 * fVar1 * 500.0f + 14500.0f); + mDoMtx_stack_c::YrotM(5000); + + daPy_getPlayerActorClass()->setKandelaarMtx(mDoMtx_stack_c::get(), 0, 0); + fopAcM_OnCarryType(a_this, fopAcM_CARRY_ITEM); + cLib_onBit(a_this->attention_info.flags, 0x80UL); + a_this->attention_info.distances[4] = 6; + a_this->attention_info.position.x = i_this->field_0xc04.x; + a_this->attention_info.position.y = i_this->field_0xc04.y + 30.0f; + a_this->attention_info.position.z = i_this->field_0xc04.z; + a_this->eyePos = a_this->attention_info.position; + } + } } -/* ############################################################################################## */ -/* 80A5E3F4-80A5E3F8 0004F8 0004+00 0/1 0/0 0/0 .rodata @10878 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10878 = 32768.0f; -COMPILER_STRIP_GATE(0x80A5E3F4, &lit_10878); -#pragma pop - -/* 80A5E3F8-80A5E3FC 0004FC 0004+00 0/1 0/0 0/0 .rodata @10879 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10879 = -60.0f; -COMPILER_STRIP_GATE(0x80A5E3F8, &lit_10879); -#pragma pop - -/* 80A5E3FC-80A5E400 000500 0004+00 0/1 0/0 0/0 .rodata @10880 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10880 = -0.0f; -COMPILER_STRIP_GATE(0x80A5E3FC, &lit_10880); -#pragma pop - -/* 80A5E400-80A5E404 000504 0004+00 0/1 0/0 0/0 .rodata @10881 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_10881 = -3.0f; -COMPILER_STRIP_GATE(0x80A5E400, &lit_10881); -#pragma pop - -/* 80A5FF48-80A5FF58 000108 000C+04 0/0 0/0 0/0 .bss @7870 */ -#pragma push -#pragma force_active on -static u8 lit_7870[12]; -#pragma pop - -// /* 80A5FF54 */ -// static u8 gap_05_00000114_bss; - -/* 80A5FF58-80A5FF64 000118 000C+00 0/0 0/0 0/0 .bss sc$7869 */ -// static cXyz sc[12]; - /* 80A5FF64-80A5FF68 000124 0004+00 0/2 0/0 0/0 .bss c_start */ -#pragma push -#pragma force_active on -static u8 c_start[4]; -#pragma pop +static int c_start; -/* 80A5B8FC-80A5C3E4 012A5C 0AE8+00 2/1 0/0 0/0 .text daNpc_Ks_Execute__FP12npc_ks_class - */ -static void daNpc_Ks_Execute(npc_ks_class* param_0) { +/* 80A5B8FC-80A5C3E4 012A5C 0AE8+00 2/1 0/0 0/0 .text daNpc_Ks_Execute__FP12npc_ks_class */ +static int daNpc_Ks_Execute(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + if (i_this->mActionID == 300) { + if (c_start == 0 && i_this->field_0xb42 == 0 && dComIfGp_event_runCheck()) { + kantera_sub(i_this); + return 1; + } + } else { + if (cDmrNowMidnaTalk()) { + return 1; + } + } + + cXyz sp60, sp6c; + + if (i_this->field_0x5b6 == 2) { + if (fopAcM_GetRoomNo(a_this) == 0) { + dComIfGs_onSwitch(0x4F, fopAcM_GetRoomNo(a_this)); + } + } else if (i_this->field_0x5b6 == 3 && fopAcM_GetRoomNo(a_this) == 0) { + dComIfGs_onSwitch(0x50, fopAcM_GetRoomNo(a_this)); + } + + i_this->field_0x5e6++; + + for (int i = 0; i < 4; i++) { + if (i_this->mTimers[i] != 0) { + i_this->mTimers[i]--; + } + } + + if (i_this->field_0x5f8 != 0) { + i_this->field_0x5f8--; + } + + if (i_this->field_0x94c != 0) { + i_this->field_0x94c--; + } + + if (i_this->field_0x94e != 0) { + i_this->field_0x94e--; + } + + action(i_this); + + if (i_this->field_0x90c != 0) { + sp60 = i_this->field_0x91c - i_this->field_0x910; + f32 fVar1 = sp60.abs(); + sp60 = i_this->field_0x91c - a_this->current.pos; + f32 fVar2 = sp60.abs(); + f32 fVar3 = fVar1 * 0.2f; + if (fVar3 > 200.0f) { + fVar3 = 200.0f; + } + i_this->field_0x908 = fVar3 * cM_ssin((fVar2 / fVar1) * 32768.0f); + i_this->field_0x90c = 0; + } else { + cLib_addCalc0(&i_this->field_0x908, 1.0f, 5.0f); + } + + mDoMtx_stack_c::transS(a_this->current.pos.x, a_this->current.pos.y + i_this->field_0x908, a_this->current.pos.z); + mDoMtx_stack_c::YrotM(a_this->shape_angle.y); + mDoMtx_stack_c::XrotM(a_this->shape_angle.x); + mDoMtx_stack_c::ZrotM(a_this->shape_angle.z); + mDoMtx_stack_c::transM(0.0f, i_this->field_0x928, 0.0f); + mDoMtx_stack_c::scaleM(l_HIO.field_0x8, l_HIO.field_0x8, l_HIO.field_0x8); + + J3DModel* model = i_this->mpModelMorf->getModel(); + model->setBaseTRMtx(mDoMtx_stack_c::get()); + i_this->mpModelMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this))); + anm_se_set(i_this); + + if (i_this->field_0x5e4 != 0) { + i_this->mBtp2->play(); + } else { + i_this->mBtp1->setFrame(i_this->field_0x5e2); + } + + i_this->mpModelMorf->calc(); + + if (i_this->field_0x5d0 == 34) { + daObj_Kago_c* basket_p = (daObj_Kago_c*)fpcM_Search(s_kago_sub, i_this); + if (basket_p != NULL) { + MTXCopy(i_this->mpModelMorf->getModel()->getAnmMtx(14), mDoMtx_stack_c::get()); + mDoMtx_stack_c::YrotM(-2000); + mDoMtx_stack_c::XrotM(-0x3638); + mDoMtx_stack_c::ZrotM(-0x2E68); + mDoMtx_stack_c::transM(-60.0f, 0.0f, 0.0f); + mDoMtx_stack_c::YrotM(0); + mDoMtx_stack_c::XrotM(0); + mDoMtx_stack_c::ZrotM(0); + + basket_p->setMtx(mDoMtx_stack_c::get()); + if (i_this->fopAcM_checkHawkCarryNow(basket_p) != 0) { + anm_init(i_this, 39, 5.0f, 2, 1.0f); + i_this->mSound.startCreatureVoice(Z2SE_KOSARU_V_JUMP_SURPRISE, -1); + } + } + } + + if (i_this->field_0xbfc != NULL) { + i_this->field_0xbfc->setBaseTRMtx(i_this->mpModelMorf->getModel()->getAnmMtx(4)); + } + + kantera_sub(i_this); + + MTXCopy(model->getAnmMtx(4), *calc_mtx); + sp60.set(0.0f, 0.0f, 0.0f); + if (i_this->field_0xc17 != 3) { + MtxPosition(&sp60, &a_this->eyePos); + a_this->attention_info.position = a_this->eyePos; + a_this->attention_info.position.y += 30.0f; + } + + MTXCopy(model->getAnmMtx(10), *calc_mtx); + sp60.set(30.0f, 0.0f, 0.0f); + MtxPosition(&sp60, &i_this->field_0x614); + + MTXCopy(model->getAnmMtx(14), *calc_mtx); + sp60.set(30.0f, -0.0f, 0.0f); + MtxPosition(&sp60, &sp6c); + i_this->field_0x614 += (sp6c - i_this->field_0x614) * 0.5f; + + if (i_this->field_0x620 != 0) { + if (i_this->field_0x620 == 1) { + cLib_addCalc2(&obj_pos.x, i_this->field_0x614.x, 1.0f, fabsf(i_this->field_0x624.x) + 4.0f); + cLib_addCalc2(&obj_pos.y, i_this->field_0x614.y, 1.0f, fabsf(i_this->field_0x624.y) + 4.0f); + cLib_addCalc2(&obj_pos.z, i_this->field_0x614.z, 1.0f, fabsf(i_this->field_0x624.z) + 4.0f); + sp60.x = obj_pos.x - i_this->field_0x614.x; + sp60.z = obj_pos.z - i_this->field_0x614.z; + if ((sp60.x * sp60.x + sp60.z * sp60.z) <= 15.0f) { + i_this->field_0x620 = 2; + i_this->field_0x621 = 10; + leader->field_0x92c = 0; + dComIfGp_getVibration().StartShock(2, 31, cXyz(0.0f, 1.0f, 0.0f)); + } + } else if (i_this->field_0x620 == 2) { + obj_pos = i_this->field_0x614; + } else { + obj_pos += i_this->field_0x624; + } + + i_this->field_0x638 += i_this->field_0x634; + i_this->field_0x634 += -3.0f; + + if (i_this->field_0x638 < 0.0f) { + i_this->field_0x638 = 0.0f; + } + + daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0); + cXyz sp78; + sp78.x = obj_pos.x; + sp78.y = obj_pos.y; + sp78.z = obj_pos.z + i_this->field_0x638; + setPlayerPosAndAngle(&sp78, a_this->home.angle.y); + + if (i_this->field_0x620 == 2) { + if (i_this->field_0x604 < 0 && i_this->field_0x602 < 0) { + dComIfGp_event_offHindFlag(2); + dComIfGp_setDoStatusForce(1, 2); + } + + player->changeDemoParam0(1); + cLib_addCalcAngleS2(&i_this->field_0x610, i_this->field_0x602 << 1, 1, 4000); + } else { + player->changeDemoParam0(0); + cLib_addCalcAngleS2(&i_this->field_0x610, 10000, 4, 4000); + } + + if (i_this->field_0x620 != 0) { + player->changeDemoParam1(i_this->field_0x610); + } + } + + if (i_this->field_0x621 != 0) { + i_this->field_0x621--; + } + + sp6c = a_this->current.pos; + + if (i_this->field_0xaec == 0) { + i_this->field_0x98c.OffCoSetBit(); + } else { + i_this->field_0x98c.OnCoSetBit(); + } + + i_this->field_0x98c.SetC(sp6c); + i_this->field_0x98c.SetR(l_HIO.field_0x8 * 50.0f); + i_this->field_0x98c.SetH(l_HIO.field_0x8 * 130.0f); + dComIfG_Ccsp()->Set(&i_this->field_0x98c); + + if (i_this->field_0x5b6 == 0) { + demo_camera(leader); + } else if (i_this->field_0x5b6 >= 4) { + demo_camera(i_this); + } + + return 1; } -/* 80A5C3E4-80A5C3EC 013544 0008+00 1/0 0/0 0/0 .text daNpc_Ks_IsDelete__FP12npc_ks_class - */ -static bool daNpc_Ks_IsDelete(npc_ks_class* param_0) { - return true; +/* 80A5C3E4-80A5C3EC 013544 0008+00 1/0 0/0 0/0 .text daNpc_Ks_IsDelete__FP12npc_ks_class */ +static int daNpc_Ks_IsDelete(npc_ks_class* i_this) { + return 1; } -/* 80A5C3EC-80A5C450 01354C 0064+00 1/0 0/0 0/0 .text daNpc_Ks_Delete__FP12npc_ks_class - */ -static void daNpc_Ks_Delete(npc_ks_class* param_0) { +/* 80A5C3EC-80A5C450 01354C 0064+00 1/0 0/0 0/0 .text daNpc_Ks_Delete__FP12npc_ks_class */ +static int daNpc_Ks_Delete(npc_ks_class* i_this) { // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + fopAcM_GetID(a_this); + dComIfG_resDelete(&i_this->mPhase, i_this->mResName); + + if (i_this->field_0xc1c != 0) { + data_80A5FEA8 = 0; + } + + if (a_this->heap != NULL) { + i_this->mpModelMorf->stopZelAnime(); + } + + return 1; } /* 80A5C450-80A5C768 0135B0 0318+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ -static void useHeapInit(fopAc_ac_c* param_0) { - // NONMATCHING -} +static int useHeapInit(fopAc_ac_c* a_this) { + npc_ks_class* i_this = (npc_ks_class*)a_this; -/* 80A5C768-80A5C7B0 0138C8 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */ -// J3DFrameCtrl::~J3DFrameCtrl() { -extern "C" void __dt__12J3DFrameCtrlFv() { - // NONMATCHING -} + i_this->mpModelMorf = new mDoExt_McaMorfSO((J3DModelData*)dComIfG_getObjectRes(i_this->mResName, 59), NULL, NULL, + (J3DAnmTransform*)dComIfG_getObjectRes(i_this->mResName, 51), 0, 1.0f, 0, -1, + &i_this->mSound, 0x80000, 0x11020084); + if (i_this->mpModelMorf == NULL || i_this->mpModelMorf->getModel() == NULL) { + return 0; + } -/* ############################################################################################## */ -/* 80A5E404-80A5E408 000508 0004+00 0/1 0/0 0/0 .rodata @11370 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11370 = 4620.0f; -COMPILER_STRIP_GATE(0x80A5E404, &lit_11370); -#pragma pop + J3DModel* model = i_this->mpModelMorf->getModel(); + model->setUserArea((u32)i_this); + for (u16 i = 0; i < model->getModelData()->getJointNum(); i++) { + model->getModelData()->getJointNodePointer(i)->setCallBack(nodeCallBack); + } + + i_this->mBtp1 = new mDoExt_btpAnm(); + if (i_this->mBtp1 == NULL) { + return 0; + } + if (i_this->mBtp1->init(i_this->mpModelMorf->getModel()->getModelData(), + (J3DAnmTexPattern*)dComIfG_getObjectRes(i_this->mResName, 64), 1, 0, 1.0f, 0, -1) == 0) { + return 0; + } + + i_this->mBtp2 = new mDoExt_btpAnm(); + if (i_this->mBtp2 == NULL) { + return 0; + } + if (i_this->mBtp2->init(i_this->mpModelMorf->getModel()->getModelData(), + (J3DAnmTexPattern*)dComIfG_getObjectRes(i_this->mResName, 65), 1, 2, 1.0f, 0, -1) == 0) { + return 0; + } + + J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(i_this->mResName, 61); + JUT_ASSERT(10232, modelData != 0); + i_this->field_0xc00 = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (i_this->field_0xc00 == NULL) { + return 0; + } + + if (i_this->mRoomMonkeyID == 0 || i_this->mRoomMonkeyID == 10 || i_this->mRoomMonkeyID == 20 || i_this->mRoomMonkeyID == 21 || i_this->mRoomMonkeyID == 22) { + modelData = (J3DModelData*)dComIfG_getObjectRes(i_this->mResName, 60); + JUT_ASSERT(10249, modelData != 0); + i_this->field_0xbfc = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (i_this->field_0xbfc == NULL) { + return 0; + } + } + + return 1; +} /* 80A5C7B0-80A5D2BC 013910 0B0C+00 2/1 0/0 0/0 .text start_check__FP12npc_ks_class */ -static void start_check(npc_ks_class* param_0) { +static BOOL start_check(npc_ks_class* i_this) { // NONMATCHING + /* 80A5FCB0-80A5FCBC 001858 000C+00 0/0 0/0 0/0 .data dx$11146 */ + static f32 dx[3] = { + 7268.0f, 5166.0f, 9233.0f, + }; + + /* 80A5FCBC-80A5FCC8 001864 000C+00 0/0 0/0 0/0 .data dy$11147 */ + static f32 dy[3] = { + 3600.0f, 3300.0f, 3300.0f, + }; + + /* 80A5FCC8-80A5FCD4 001870 000C+00 0/0 0/0 0/0 .data dz$11148 */ + static f32 dz[3] = { + -3389.0f, -5327.0f, -5323.0f, + }; + + fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + BOOL rv = TRUE; + f32 fVar1; + f32 fVar2; + + if (i_this->mRoomMonkeyID <= 3 && fopAcM_GetRoomNo(a_this) == 4) { + if (dComIfGs_isStageMiddleBoss()) { + return FALSE; + } + + fVar1 = -player->current.pos.x; + fVar2 = 4620.0f - player->current.pos.z; + if (JMAFastSqrt(fVar1 * fVar1 + fVar2 * fVar2) > 1000.0f) { + return FALSE; + } + + if (cDmr_SkipInfo != 0) { + cDmr_SkipInfo--; + a_this->current.angle.y = a_this->home.angle.y + 0x4000; + a_this->shape_angle.y = a_this->current.angle.y; + a_this->current.angle.x = -0x8000; + a_this->shape_angle.x = -0x8000; + i_this->field_0x630 = i_this->mRoomMonkeyID * 6 + 6; + i_this->mActionID = 10; + i_this->field_0x94e = 30; + return TRUE; + } + } + + int iVar1 = fopAcM_GetParam(a_this) >> 24; + int iVar2 = 0; + + switch (i_this->mRoomMonkeyID) { + case 0: + if (fopAcM_GetRoomNo(a_this) == 22) { + if (iVar1 != 0xFF) { + if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + i_this->mActionID = 6; + break; + } + } + } else if (fopAcM_GetRoomNo(a_this) == 12) { + i_this->mActionID = 8; + break; + } + + if (dComIfGs_isStageMiddleBoss()) { + if (fopAcM_GetRoomNo(a_this) == 0) { + a_this->current.angle.y = a_this->home.angle.y + 0x4000; + a_this->shape_angle.y = a_this->current.angle.y; + a_this->current.angle.x = -0x8000; + a_this->shape_angle.x = -0x8000; + i_this->field_0x630 = 3; + i_this->mActionID = 11; + return TRUE; + } + + if (fopAcM_GetRoomNo(a_this) == 2) { + a_this->current.angle.y = a_this->home.angle.y + 0x4000; + a_this->shape_angle.y = a_this->current.angle.y; + a_this->current.angle.x = -0x8000; + a_this->shape_angle.x = -0x8000; + i_this->mActionID = 10; + i_this->field_0x94e = 30; + return TRUE; + } + + rv = FALSE; + } else { + if (fopAcM_GetRoomNo(a_this) == 0) { + if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } + } + } + + i_this->mActionID = 100; + break; + + case 1: + if (fopAcM_GetRoomNo(a_this) == 12) { + i_this->mActionID = 8; + } else { + if (dComIfGs_isStageMiddleBoss()) { + if (fopAcM_GetRoomNo(a_this) == 0) { + a_this->current.angle.y = a_this->home.angle.y + 0x4000; + a_this->shape_angle.y = a_this->current.angle.y; + a_this->current.angle.x = -0x8000; + a_this->shape_angle.x = -0x8000; + i_this->field_0x630 = 3; + i_this->mActionID = 11; + return TRUE; + } + + if (fopAcM_GetRoomNo(a_this) == 2) { + a_this->current.angle.y = a_this->home.angle.y + 0x4000; + a_this->shape_angle.y = a_this->current.angle.y; + a_this->current.angle.x = -0x8000; + a_this->shape_angle.x = -0x8000; + i_this->mActionID = 10; + i_this->field_0x94e = 30; + return TRUE; + } + + rv = FALSE; + } else { + if (fopAcM_GetRoomNo(a_this) == 2) { + if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + i_this->mActionID = 4; + } else { + i_this->mActionID = 100; + } + } else { + if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } else { + i_this->mActionID = 100; + } + } + } + } + break; + + case 2: + if (fopAcM_GetRoomNo(a_this) == 12) { + i_this->mActionID = 8; + } else { + if (dComIfGs_isStageMiddleBoss()) { + rv = FALSE; + } + + if (fopAcM_GetRoomNo(a_this) == 7) { + if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + iVar1 = FALSE; + } else { + i_this->mActionID = 5; + } + } else { + if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } else { + if (fopAcM_GetRoomNo(a_this) == 0) { + i_this->mActionID = 8; + } else { + if (fopAcM_GetRoomNo(a_this) == 3 || fopAcM_GetRoomNo(a_this) == 5 || fopAcM_GetRoomNo(a_this) == 7) { + if (dComIfGs_isSwitch(79, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + break; + } + } + + i_this->mActionID = 100; + } + } + } + } + break; + + case 3: + if (fopAcM_GetRoomNo(a_this) == 12) { + i_this->mActionID = 8; + } else { + if (dComIfGs_isStageMiddleBoss()) { + rv = FALSE; + } + + if (fopAcM_GetRoomNo(a_this) == 5) { + if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } else { + i_this->mActionID = 5; + } + } else { + if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } else { + if (fopAcM_GetRoomNo(a_this) == 0) { + i_this->mActionID = 8; + } else { + if (fopAcM_GetRoomNo(a_this) == 3 || fopAcM_GetRoomNo(a_this) == 5 || fopAcM_GetRoomNo(a_this) == 7) { + if (dComIfGs_isSwitch(80, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + break; + } + } + + i_this->mActionID = 100; + } + } + } + } + break; + + case 4: + if (fopAcM_GetRoomNo(a_this) == 12) { + if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } else { + i_this->mActionID = 8; + } + } else { + if (dComIfGs_isSwitch(83, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } else { + if (fopAcM_GetRoomNo(a_this) == 4) { + if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + i_this->mActionID = 117; + i_this->mMode = 0; + a_this->current.pos.set(6854.0f, 3458.0f, 440.0f); + a_this->current.angle.y = 0; + a_this->old = a_this->current; + } else { + i_this->mActionID = 6; + } + } else { + if (fopAcM_GetRoomNo(a_this) == 9) { + if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + return FALSE; + } + + i_this->mActionID = 100; + + for (int i = 0; i < 3; i++) { + fVar1 = dx[i] - player->current.pos.x; + fVar2 = dz[i] - player->current.pos.z; + if (JMAFastSqrt(fVar1 * fVar1 + fVar2 * fVar2) < 700.0f) { + a_this->current.pos.set(dx[i], dy[i], dz[i]); + a_this->old = a_this->current; + OS_REPORT("////////KS R09 SET %d\n", i); + return TRUE; + } + } + } + } + } + } + break; + + case 5: + if (fopAcM_GetRoomNo(a_this) == 12) { + if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } else { + i_this->mActionID = 8; + } + } else { + if (fopAcM_GetRoomNo(a_this) == 10) { + if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } else { + i_this->mActionID = 5; + } + } + } + break; + + case 6: + if (fopAcM_GetRoomNo(a_this) == 12) { + if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } else { + i_this->mActionID = 8; + } + } else { + if (fopAcM_GetRoomNo(a_this) == 19) { + if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } else { + i_this->mActionID = 6; + } + } + } + break; + + case 7: + if (fopAcM_GetRoomNo(a_this) == 12) { + if (!dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } else { + i_this->mActionID = 8; + } + } else { + if (fopAcM_GetRoomNo(a_this) == 11) { + if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } else { + i_this->mActionID = 5; + } + } + } + break; + + case 10: + i_this->mActionID = 100; + break; + + case 20: + fopAcM_OnStatus(a_this, 0x20000); + i_this->mActionID = 300; + i_this->field_0xc17 = 1; + iVar2 = 1; + break; + + case 21: + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x20A])) { + rv = FALSE; + } else { + i_this->mActionID = 301; + } + break; + + case 22: + if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0x241])) { + rv = FALSE; + } else { + i_this->mActionID = 302; + } + break; + + default: + i_this->mActionID = 100; + i_this->mRoomMonkeyID &= 15; + i_this->field_0x5b6 = i_this->mRoomMonkeyID; + break; + } + + if (i_this->mActionID == 100) { + fopAcM_setStageLayer(a_this); + if (fopAcM_GetRoomNo(a_this) == 1) { + fVar1 = 6836.0f - player->current.pos.x; + fVar2 = 2585.0f - player->current.pos.z; + if (JMAFastSqrt(fVar1 * fVar1 + fVar2 * fVar2) < 500.0f) { + a_this->home.pos.set(7025.0f, 3355.0f, 4500.0f); + a_this->home.angle.y = -0x7343; + a_this->current = a_this->home; + a_this->old = a_this->current; + } + + i_this->mTimers[1] = cM_rndF(20.0f) + 80.0f; + } else { + i_this->mTimers[1] = cM_rndF(20.0f) + 40.0f; + } + } + + if (iVar2 != 0) { + if (dComIfGs_isSwitch(iVar1, fopAcM_GetRoomNo(a_this))) { + rv = FALSE; + } + } + + return rv; } /* 80A5D2BC-80A5D354 01441C 0098+00 1/1 0/0 0/0 .text s_check_sub__FPvPv */ -static void s_check_sub(void* param_0, void* param_1) { - // NONMATCHING +static void* s_check_sub(void* i_actor, void* i_data) { + if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_NPC_KS) { + if (fopAcM_GetID(i_actor) != fopAcM_GetID(i_data) && ((npc_ks_class*)i_actor)->field_0x5b6 == ((npc_ks_class*)i_data)->field_0x5b6) { + return i_actor; + } + } + + return NULL; } -/* ############################################################################################## */ -/* 80A5E408-80A5E40C 00050C 0004+00 0/0 0/0 0/0 .rodata @11371 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11371 = 6854.0f; -COMPILER_STRIP_GATE(0x80A5E408, &lit_11371); -#pragma pop - -/* 80A5E40C-80A5E410 000510 0004+00 0/0 0/0 0/0 .rodata @11372 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11372 = 3458.0f; -COMPILER_STRIP_GATE(0x80A5E40C, &lit_11372); -#pragma pop - -/* 80A5E410-80A5E414 000514 0004+00 0/0 0/0 0/0 .rodata @11373 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11373 = 440.0f; -COMPILER_STRIP_GATE(0x80A5E410, &lit_11373); -#pragma pop - -/* 80A5E414-80A5E418 000518 0004+00 0/0 0/0 0/0 .rodata @11374 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11374 = 6836.0f; -COMPILER_STRIP_GATE(0x80A5E414, &lit_11374); -#pragma pop - -/* 80A5E418-80A5E41C 00051C 0004+00 0/0 0/0 0/0 .rodata @11375 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11375 = 3585.0f; -COMPILER_STRIP_GATE(0x80A5E418, &lit_11375); -#pragma pop - -/* 80A5E41C-80A5E420 000520 0004+00 0/0 0/0 0/0 .rodata @11376 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11376 = 7025.0f; -COMPILER_STRIP_GATE(0x80A5E41C, &lit_11376); -#pragma pop - -/* 80A5E420-80A5E424 000524 0004+00 0/0 0/0 0/0 .rodata @11377 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11377 = 3355.0f; -COMPILER_STRIP_GATE(0x80A5E420, &lit_11377); -#pragma pop - -/* 80A5E424-80A5E428 000528 0004+00 0/0 0/0 0/0 .rodata @11378 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11378 = 4500.0f; -COMPILER_STRIP_GATE(0x80A5E424, &lit_11378); -#pragma pop - -/* 80A5E428-80A5E42C 00052C 0004+00 0/1 0/0 0/0 .rodata @11581 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11581 = -5370.0f; -COMPILER_STRIP_GATE(0x80A5E428, &lit_11581); -#pragma pop - -/* 80A5E42C-80A5E430 000530 0004+00 0/1 0/0 0/0 .rodata @11582 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11582 = 3950.0f; -COMPILER_STRIP_GATE(0x80A5E42C, &lit_11582); -#pragma pop - -/* 80A5E430-80A5E434 000534 0004+00 0/1 0/0 0/0 .rodata @11583 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11583 = -2330.0f; -COMPILER_STRIP_GATE(0x80A5E430, &lit_11583); -#pragma pop - -/* 80A5E434-80A5E438 000538 0004+00 0/1 0/0 0/0 .rodata @11584 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_11584 = 65536.0f; -COMPILER_STRIP_GATE(0x80A5E434, &lit_11584); -#pragma pop - -/* 80A5E438-80A5E438 00053C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80A5E44A = "Npc_ks"; -SECTION_DEAD static char const* const stringBase_80A5E451 = "D_MN05"; -#pragma pop - /* 80A5D354-80A5D87C 0144B4 0528+00 1/0 0/0 0/0 .text daNpc_Ks_Create__FP10fopAc_ac_c */ -static void daNpc_Ks_Create(fopAc_ac_c* param_0) { +static int daNpc_Ks_Create(fopAc_ac_c* a_this) { // NONMATCHING -} + static dCcD_SrcCyl cc_cyl_src = { + { + {0x0, {{0x0, 0x0, 0x0}, {0xd8fafd3f, 0x3}, 0x79}}, // mObj + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {0.0f, 0.0f, 0.0f}, // mCenter + 30.0f, // mRadius + 20.0f // mHeight + } // mCyl + }; -/* 80A5D87C-80A5D8C4 0149DC 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */ -// cM3dGCyl::~cM3dGCyl() { -extern "C" void __dt__8cM3dGCylFv() { - // NONMATCHING -} + npc_ks_class* i_this = (npc_ks_class*)a_this; + fopAcM_SetupActor(a_this, npc_ks_class); -/* 80A5D8C4-80A5D90C 014A24 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ -// cM3dGAab::~cM3dGAab() { -extern "C" void __dt__8cM3dGAabFv() { - // NONMATCHING -} + dComIfGp_getStage()->getStagInfo(); + if (!dKy_darkworld_check()) { + i_this->mResName = "Npc_kst"; + } else { + i_this->mResName = "Npc_ks"; + } -/* 80A5D90C-80A5D968 014A6C 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */ -// dCcD_GStts::~dCcD_GStts() { -extern "C" void __dt__10dCcD_GSttsFv() { - // NONMATCHING -} + int phase = dComIfG_resLoad(&i_this->mPhase, i_this->mResName); + if (phase == cPhs_COMPLEATE_e) { + OS_REPORT("NPC_KS PARAM %x\n", fopAcM_GetParam(a_this)); + i_this->mRoomMonkeyID = fopAcM_GetParam(a_this); -/* 80A5D968-80A5D9D8 014AC8 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING -} + u8 uVar1 = fopAcM_GetParam(a_this) >> 8 & 0xFF; -/* 80A5D9D8-80A5DA48 014B38 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ -// dBgS_AcchCir::~dBgS_AcchCir() { -extern "C" void __dt__12dBgS_AcchCirFv() { - // NONMATCHING -} + if (i_this->mRoomMonkeyID == 0xFF) { + i_this->mRoomMonkeyID = 0; + } -/* 80A5DA48-80A5DA90 014BA8 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */ -// cCcD_GStts::~cCcD_GStts() { -extern "C" void __dt__10cCcD_GSttsFv() { - // NONMATCHING + if (i_this->mRoomMonkeyID == 20 && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xE1]) && dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[0xE2])) { + return cPhs_ERROR_e; + } + + if (uVar1 == 0xFF) { + uVar1 = 0; + } + + if (fopAcM_GetRoomNo(a_this) == 4 && i_this->mRoomMonkeyID == 4) { + a_this->current.pos.set(-5370.0f, 3950.0f, -2330.0f); + } + + if (strcmp(dComIfGp_getStartStageName(), "D_MN05") == 0 && dComIfGs_isStageBossEnemy() != 0) { + return cPhs_ERROR_e; + } + + i_this->field_0x5b6 = i_this->mRoomMonkeyID & 15; + if (fpcM_Search(s_check_sub, i_this) != NULL) { + return cPhs_ERROR_e; + } + + OS_REPORT("////////SET ID %d\n", i_this->field_0x5b6); + + if (i_this->field_0x5b6 == 0) { + leader = i_this; + OS_REPORT("////////0 \n"); + } else { + OS_REPORT("////////1 \n") + } + + i_this->field_0xaf0 = a_this->current.angle.x; + a_this->shape_angle.x = 0; + a_this->current.angle.x = 0; + i_this->bitTRB = a_this->current.angle.z & 63; + a_this->shape_angle.z = 0; + a_this->current.angle.z = 0; + OS_REPORT("NPC_KS bitTRB %x\n", i_this->bitTRB); + obj_pos.set(0.0f, 0.0f, 0.0f); + + OS_REPORT("NPC_KS//////////////NPC_KS SET 1 !!\n"); + if (!fopAcM_entrySolidHeap(a_this, useHeapInit, 0x38A0)) { + OS_REPORT("//////////////NPC_KS SET NON !!\n"); + return cPhs_ERROR_e; + } + + OS_REPORT("//////////////NPC_KS SET 2 !!\n"); + if (data_80A5FEA8 == 0) { + i_this->field_0xc1c = 1; + data_80A5FEA8 = 1; + mDoHIO_CREATE_CHILD ("コザル", &l_HIO); // Kozaru + l_HIO.field_0x4 = -1; + } + + fopAcM_SetMtx(a_this, i_this->mpModelMorf->getModel()->getBaseTRMtx()); + fopAcM_SetMin(a_this, -200.0f, -200.0f, -200.0f); + fopAcM_SetMax(a_this, 200.0f, 200.0f, 200.0f); + i_this->mObjAcch.Set(fopAcM_GetPosition_p(a_this), fopAcM_GetOldPosition_p(a_this), a_this, 1, + &i_this->mAcchCir, fopAcM_GetSpeed_p(a_this), NULL, NULL); + i_this->mAcchCir.SetWall(50.0f, 50.0f); + i_this->field_0x5e6 = cM_rndF(65536.0f); + saru_p[i_this->field_0x5b6] = i_this; + + if (uVar1 != 0 && i_this->mRoomMonkeyID < 8) { + a_this->current.angle.y = a_this->home.angle.y + 0x4000; + a_this->shape_angle.y = a_this->current.angle.y; + a_this->current.angle.x = -0x8000; + a_this->shape_angle.x = -0x8000; + i_this->field_0x630 = fopAcM_GetParam(a_this) >> 16 & 0xFF; + + i_this->field_0x934 = (obj_sw_class*)fopAcM_SearchByID(a_this->parentActorID); + if (i_this->field_0x934 != NULL && i_this->field_0x934->field_0x91c == 1) { + i_this->mActionID = 11; + } else { + i_this->mActionID = 10; + } + + i_this->field_0x94e = 30; + } else { + if (!start_check(i_this)) { + saru_p[i_this->field_0x5b6] = NULL; + return cPhs_ERROR_e; + } + } + + i_this->mSound.init(&a_this->current.pos, &a_this->eyePos, 2, 1); + i_this->mStts.Init(100, 0, a_this); + i_this->field_0x98c.Set(cc_cyl_src); + i_this->field_0x98c.SetStts(&i_this->mStts); + i_this->field_0x98c.OnTgNoHitMark(); + + OS_REPORT("//////////////NPC_KS SET 3 !!\n"); + c_start = 1; + daNpc_Ks_Execute(i_this); + c_start = 0; + OS_REPORT("//////////////NPC_KS SET 4 !!\n"); + } + + return phase; } AUDIO_INSTANCES; diff --git a/src/d/actor/d_a_npc_saru.cpp b/src/d/actor/d_a_npc_saru.cpp index c54cc0d600d..92379bc91dc 100644 --- a/src/d/actor/d_a_npc_saru.cpp +++ b/src/d/actor/d_a_npc_saru.cpp @@ -4,540 +4,1164 @@ */ #include "d/actor/d_a_npc_saru.h" -#include "dol2asm.h" +#include "d/actor/d_a_obj_so.h" +#include "d/actor/d_a_e_ym.h" -// -// Forward References: -// - -extern "C" void __dt__12daNpc_Saru_cFv(); -extern "C" void create__12daNpc_Saru_cFv(); -extern "C" void CreateHeap__12daNpc_Saru_cFv(); -extern "C" void Delete__12daNpc_Saru_cFv(); -extern "C" void Execute__12daNpc_Saru_cFv(); -extern "C" void Draw__12daNpc_Saru_cFv(); -extern "C" void createHeapCallBack__12daNpc_Saru_cFP10fopAc_ac_c(); -extern "C" void ctrlJointCallBack__12daNpc_Saru_cFP8J3DJointi(); -extern "C" void srchYm__12daNpc_Saru_cFPvPv(); -extern "C" void getType__12daNpc_Saru_cFv(); -extern "C" void isDelete__12daNpc_Saru_cFv(); -extern "C" void reset__12daNpc_Saru_cFv(); -extern "C" void afterJntAnm__12daNpc_Saru_cFi(); -extern "C" void checkChangeEvt__12daNpc_Saru_cFv(); -extern "C" void setParam__12daNpc_Saru_cFv(); -extern "C" void setAfterTalkMotion__12daNpc_Saru_cFv(); -extern "C" void srchActors__12daNpc_Saru_cFv(); -extern "C" void evtTalk__12daNpc_Saru_cFv(); -extern "C" void evtCutProc__12daNpc_Saru_cFv(); -extern "C" void action__12daNpc_Saru_cFv(); -extern "C" void beforeMove__12daNpc_Saru_cFv(); -extern "C" void setAttnPos__12daNpc_Saru_cFv(); -extern "C" void setCollision__12daNpc_Saru_cFv(); -extern "C" bool drawDbgInfo__12daNpc_Saru_cFv(); -extern "C" void drawOtherMdl__12daNpc_Saru_cFv(); -extern "C" void selectAction__12daNpc_Saru_cFv(); -extern "C" void chkAction__12daNpc_Saru_cFM12daNpc_Saru_cFPCvPvPv_i(); -extern "C" void setAction__12daNpc_Saru_cFM12daNpc_Saru_cFPCvPvPv_i(); -extern "C" void setSe__12daNpc_Saru_cFv(); -extern "C" void cutFindMonkey__12daNpc_Saru_cFi(); -extern "C" void cutHelpMe__12daNpc_Saru_cFi(); -extern "C" void cutYmLook__12daNpc_Saru_cFi(); -extern "C" void wait__12daNpc_Saru_cFPv(); -extern "C" void talk__12daNpc_Saru_cFPv(); -extern "C" static void daNpc_Saru_Create__FPv(); -extern "C" static void daNpc_Saru_Delete__FPv(); -extern "C" static void daNpc_Saru_Execute__FPv(); -extern "C" static void daNpc_Saru_Draw__FPv(); -extern "C" static bool daNpc_Saru_IsDelete__FPv(); -extern "C" void __dt__10cCcD_GSttsFv(); -extern "C" void __dt__8daNpcT_cFv(); -extern "C" void __dt__4cXyzFv(); -extern "C" void __dt__5csXyzFv(); -extern "C" void __dt__18daNpcT_ActorMngr_cFv(); -extern "C" void __dt__13daNpcT_Path_cFv(); -extern "C" void __ct__18daNpcT_ActorMngr_cFv(); -extern "C" void __dt__8cM3dGCylFv(); -extern "C" void __dt__8cM3dGAabFv(); -extern "C" void -__ct__8daNpcT_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc(); -extern "C" void __ct__5csXyzFv(); -extern "C" void __dt__15daNpcT_JntAnm_cFv(); -extern "C" void __ct__4cXyzFv(); -extern "C" void __dt__22daNpcT_MotionSeqMngr_cFv(); -extern "C" void __dt__12dBgS_AcchCirFv(); -extern "C" void __dt__10dCcD_GSttsFv(); -extern "C" void __dt__12dBgS_ObjAcchFv(); -extern "C" void __dt__12J3DFrameCtrlFv(); -extern "C" void setEyeAngleY__15daNpcT_JntAnm_cF4cXyzsifs(); -extern "C" void setEyeAngleX__15daNpcT_JntAnm_cF4cXyzfs(); -extern "C" void ctrlSubFaceMotion__8daNpcT_cFi(); -extern "C" bool checkChangeJoint__8daNpcT_cFi(); -extern "C" bool checkRemoveJoint__8daNpcT_cFi(); -extern "C" s32 getFootLJointNo__8daNpcT_cFv(); -extern "C" s32 getFootRJointNo__8daNpcT_cFv(); -extern "C" bool getEyeballLMaterialNo__8daNpcT_cFv(); -extern "C" bool getEyeballRMaterialNo__8daNpcT_cFv(); -extern "C" s32 getEyeballMaterialNo__8daNpcT_cFv(); -extern "C" bool evtEndProc__8daNpcT_cFv(); -extern "C" void afterMoved__8daNpcT_cFv(); -extern "C" bool chkXYItems__8daNpcT_cFv(); -extern "C" void decTmr__8daNpcT_cFv(); -extern "C" void drawGhost__8daNpcT_cFv(); -extern "C" bool afterSetFaceMotionAnm__8daNpcT_cFiifi(); -extern "C" bool afterSetMotionAnm__8daNpcT_cFiifi(); -extern "C" void getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c(); -extern "C" void getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c(); -extern "C" void changeAnm__8daNpcT_cFPiPi(); -extern "C" void changeBck__8daNpcT_cFPiPi(); -extern "C" void changeBtp__8daNpcT_cFPiPi(); -extern "C" void changeBtk__8daNpcT_cFPiPi(); -extern "C" void func_80AC42C4(void* _this, int*); -extern "C" void __sinit_d_a_npc_saru_cpp(); -extern "C" void -__ct__12daNpc_Saru_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc(); -extern "C" s32 getHeadJointNo__12daNpc_Saru_cFv(); -extern "C" s32 getNeckJointNo__12daNpc_Saru_cFv(); -extern "C" bool getBackboneJointNo__12daNpc_Saru_cFv(); -extern "C" void __dt__18daNpc_Saru_Param_cFv(); -extern "C" static void func_80AC44D4(); -extern "C" static void func_80AC44DC(); -extern "C" u8 const m__18daNpc_Saru_Param_c[144]; -extern "C" extern char const* const d_a_npc_saru__stringBase0; -extern "C" void* mCutNameList__12daNpc_Saru_c[4]; -extern "C" u8 mCutList__12daNpc_Saru_c[48]; - -// -// External References: -// - -extern "C" void mDoMtx_YrotS__FPA4_fs(); -extern "C" void mDoMtx_YrotM__FPA4_fs(); -extern "C" void mDoMtx_ZrotM__FPA4_fs(); -extern "C" void mDoExt_modelUpdateDL__FP8J3DModel(); -extern "C" void -__ct__16mDoExt_McaMorfSOFP12J3DModelDataP25mDoExt_McaMorfCallBack1_cP25mDoExt_McaMorfCallBack2_cP15J3DAnmTransformifiiP10Z2CreatureUlUl(); -extern "C" void stopZelAnime__16mDoExt_McaMorfSOFv(); -extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void __dt__10fopAc_ac_cFv(); -extern "C" void fopAcIt_Judge__FPFPvPv_PvPv(); -extern "C" void fopAcM_delete__FP10fopAc_ac_c(); -extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl(); -extern "C" void fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff(); -extern "C" void fopAcM_searchActorAngleY__FPC10fopAc_ac_cPC10fopAc_ac_c(); -extern "C" void fpcEx_IsExist__FUi(); -extern "C" void dComIfGs_wolfeye_effect_check__Fv(); -extern "C" void isSwitch__10dSv_info_cCFii(); -extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci(); -extern "C" void reset__14dEvt_control_cFv(); -extern "C" void setSkipZev__14dEvt_control_cFPvPc(); -extern "C" void onSkipFade__14dEvt_control_cFv(); -extern "C" void getMyStaffId__16dEvent_manager_cFPCcP10fopAc_ac_ci(); -extern "C" void getIsAddvance__16dEvent_manager_cFi(); -extern "C" void getMyActIdx__16dEvent_manager_cFiPCPCciii(); -extern "C" void getMySubstanceP__16dEvent_manager_cFiPCci(); -extern "C" void cutEnd__16dEvent_manager_cFi(); -extern "C" void ChkPresentEnd__16dEvent_manager_cFv(); -extern "C" void addReal__21dDlst_shadowControl_cFUlP8J3DModel(); -extern "C" void __ct__12dBgS_AcchCirFv(); -extern "C" void SetWallR__12dBgS_AcchCirFf(); -extern "C" void __dt__9dBgS_AcchFv(); -extern "C" void __ct__9dBgS_AcchFv(); -extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz(); -extern "C" void CrrPos__9dBgS_AcchFR4dBgS(); -extern "C" void __ct__11dBgS_GndChkFv(); -extern "C" void __dt__11dBgS_GndChkFv(); -extern "C" void __ct__11dBgS_LinChkFv(); -extern "C" void __dt__11dBgS_LinChkFv(); -extern "C" void SetObj__16dBgS_PolyPassChkFv(); -extern "C" void __ct__10dCcD_GSttsFv(); -extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c(); -extern "C" void __ct__12dCcD_GObjInfFv(); -extern "C" void __dt__12dCcD_GObjInfFv(); -extern "C" void Set__8dCcD_CylFRC11dCcD_SrcCyl(); -extern "C" void initialize__18daNpcT_ActorMngr_cFv(); -extern "C" void entry__18daNpcT_ActorMngr_cFP10fopAc_ac_c(); -extern "C" void remove__18daNpcT_ActorMngr_cFv(); -extern "C" void getActorP__18daNpcT_ActorMngr_cFv(); -extern "C" void initialize__22daNpcT_MotionSeqMngr_cFv(); -extern "C" void checkEndSequence__22daNpcT_MotionSeqMngr_cFv(); -extern "C" void initialize__13daNpcT_Path_cFv(); -extern "C" void setPathInfo__13daNpcT_Path_cFUcScUc(); -extern "C" void initialize__15daNpcT_JntAnm_cFv(); -extern "C" void setParam__15daNpcT_JntAnm_cFP10fopAc_ac_cP8J3DModelP4cXyziiiffffffffffP4cXyz(); -extern "C" void calcJntRad__15daNpcT_JntAnm_cFfff(); -extern "C" void setParam__19daNpcT_DmgStagger_cFP10fopAc_ac_cP10fopAc_ac_cs(); -extern "C" void calc__19daNpcT_DmgStagger_cFi(); -extern "C" void tgHitCallBack__8daNpcT_cFP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf(); -extern "C" void loadRes__8daNpcT_cFPCScPPCc(); -extern "C" void deleteRes__8daNpcT_cFPCScPPCc(); -extern "C" void execute__8daNpcT_cFv(); -extern "C" void draw__8daNpcT_cFiifP11_GXColorS10fiii(); -extern "C" void setEnvTevColor__8daNpcT_cFv(); -extern "C" void setRoomNo__8daNpcT_cFv(); -extern "C" void ctrlBtk__8daNpcT_cFv(); -extern "C" void setMtx__8daNpcT_cFv(); -extern "C" void ctrlJoint__8daNpcT_cFP8J3DJointP8J3DModel(); -extern "C" void evtProc__8daNpcT_cFv(); -extern "C" void setFootPos__8daNpcT_cFv(); -extern "C" void setFootPrtcl__8daNpcT_cFP4cXyzff(); -extern "C" bool checkCullDraw__8daNpcT_cFv(); -extern "C" void twilight__8daNpcT_cFv(); -extern "C" void evtOrder__8daNpcT_cFv(); -extern "C" void evtChange__8daNpcT_cFv(); -extern "C" void clrParam__8daNpcT_cFv(); -extern "C" void setFaceMotionAnm__8daNpcT_cFib(); -extern "C" void setMotionAnm__8daNpcT_cFifi(); -extern "C" void setAngle__8daNpcT_cF5csXyz(); -extern "C" void setAngle__8daNpcT_cFs(); -extern "C" void hitChk__8daNpcT_cFP12dCcD_GObjInfUl(); -extern "C" void setDamage__8daNpcT_cFiii(); -extern "C" void chkActorInSight__8daNpcT_cFP10fopAc_ac_cfs(); -extern "C" void srchPlayerActor__8daNpcT_cFv(); -extern "C" void step__8daNpcT_cFsiiii(); -extern "C" void initTalk__8daNpcT_cFiPP10fopAc_ac_c(); -extern "C" void talkProc__8daNpcT_cFPiiPP10fopAc_ac_ci(); -extern "C" void getNearestActorP__8daNpcT_cFs(); -extern "C" void daNpcT_getDistTableIdx__Fii(); -extern "C" void daNpcT_onEvtBit__FUl(); -extern "C" void daNpcT_chkEvtBit__FUl(); -extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c(); -extern "C" void dKy_darkworld_check__Fv(); -extern "C" void __ct__10dMsgFlow_cFv(); -extern "C" void __dt__10dMsgFlow_cFv(); -extern "C" void remove__10dMsgFlow_cFv(); -extern "C" void Set__4cCcSFP8cCcD_Obj(); -extern "C" void __pl__4cXyzCFRC3Vec(); -extern "C" void __mi__4cXyzCFRC3Vec(); -extern "C" void cM_atan2s__Fff(); -extern "C" void cM_rndF__Ff(); -extern "C" void __ct__11cBgS_GndChkFv(); -extern "C" void __dt__11cBgS_GndChkFv(); -extern "C" void __dt__13cBgS_PolyInfoFv(); -extern "C" void __dt__8cM3dGCirFv(); -extern "C" void SetC__8cM3dGCylFRC4cXyz(); -extern "C" void SetH__8cM3dGCylFf(); -extern "C" void SetR__8cM3dGCylFf(); -extern "C" void cLib_addCalcAngleS2__FPssss(); -extern "C" void cLib_chaseF__FPfff(); -extern "C" void cLib_targetAngleY__FPC3VecPC3Vec(); -extern "C" void __ct__10Z2CreatureFv(); -extern "C" void __dt__10Z2CreatureFv(); -extern "C" void init__10Z2CreatureFP3VecP3VecUcUc(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void init__12J3DFrameCtrlFs(); -extern "C" void checkPass__12J3DFrameCtrlFf(); -extern "C" void __destroy_arr(); -extern "C" void __construct_array(); -extern "C" void __ptmf_test(); -extern "C" void __ptmf_cmpr(); -extern "C" void __ptmf_scall(); -extern "C" void _savegpr_22(); -extern "C" void _savegpr_25(); -extern "C" void _savegpr_26(); -extern "C" void _savegpr_27(); -extern "C" void _savegpr_28(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_22(); -extern "C" void _restgpr_25(); -extern "C" void _restgpr_26(); -extern "C" void _restgpr_27(); -extern "C" void _restgpr_28(); -extern "C" void _restgpr_29(); -extern "C" extern u8 const __ptmf_null[12 + 4 /* padding */]; -extern "C" extern void* __vt__8dCcD_Cyl[36]; -extern "C" extern void* __vt__9dCcD_Stts[11]; -extern "C" u8 mCcDCyl__8daNpcT_c[68]; -extern "C" extern void* __vt__8daNpcT_c[49]; -extern "C" extern void* __vt__12cCcD_CylAttr[25]; -extern "C" extern void* __vt__14cCcD_ShapeAttr[22]; -extern "C" extern void* __vt__9cCcD_Stts[8]; -extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" u8 mFindActorPtrs__8daNpcT_c[200]; -extern "C" u8 mFindCount__8daNpcT_c[4]; -extern "C" void __register_global_object(); - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 80AC4654-80AC4654 00015C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80AC4654 = ""; -SECTION_DEAD static char const* const stringBase_80AC4655 = "NO_RESPONSE"; -SECTION_DEAD static char const* const stringBase_80AC4661 = "YM_LOOK"; -SECTION_DEAD static char const* const stringBase_80AC4669 = "Npc_ks"; -SECTION_DEAD static char const* const stringBase_80AC4670 = "saru_TW"; -SECTION_DEAD static char const* const stringBase_80AC4678 = "saru"; -SECTION_DEAD static char const* const stringBase_80AC467D = "FIND_MONKEY"; -SECTION_DEAD static char const* const stringBase_80AC4689 = "HELP_ME"; -#pragma pop - -/* 80AC46A4-80AC46B0 000000 000C+00 2/2 0/0 0/0 .data cNullVec__6Z2Calc */ -SECTION_DATA static u8 cNullVec__6Z2Calc[12] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -/* 80AC46B0-80AC46C4 00000C 0004+10 0/0 0/0 0/0 .data @1787 */ -#pragma push -#pragma force_active on -SECTION_DATA static u32 lit_1787[1 + 4 /* padding */] = { - 0x02000201, - /* padding */ - 0x40080000, - 0x00000000, - 0x3FE00000, - 0x00000000, -}; -#pragma pop +UNK_REL_DATA; /* 80AC46C4-80AC46E4 000020 0020+00 1/1 0/0 0/0 .data l_bmdData */ -SECTION_DATA static u8 l_bmdData[32] = { - 0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, +static int l_bmdData[4][2] = { + { 0x0000003B, 1 }, { 5, 2 }, { 0x0000003C, 1 }, { 4, 2 }, }; /* 80AC46E4-80AC46FC -00001 0018+00 1/2 0/0 0/0 .data l_evtList */ -SECTION_DATA static void* l_evtList[6] = { - (void*)&d_a_npc_saru__stringBase0, - (void*)NULL, - (void*)(((char*)&d_a_npc_saru__stringBase0) + 0x1), - (void*)NULL, - (void*)(((char*)&d_a_npc_saru__stringBase0) + 0xD), - (void*)0x00000002, +static daNpcT_evtData_c l_evtList[3] = { + {"", 0}, + {"NO_RESPONSE", 0}, + {"YM_LOOK", 2}, }; /* 80AC46FC-80AC470C -00001 0010+00 3/4 0/0 0/0 .data l_resNameList */ -SECTION_DATA static void* l_resNameList[4] = { - (void*)&d_a_npc_saru__stringBase0, - (void*)(((char*)&d_a_npc_saru__stringBase0) + 0x15), - (void*)(((char*)&d_a_npc_saru__stringBase0) + 0x1C), - (void*)(((char*)&d_a_npc_saru__stringBase0) + 0x24), +static char* l_resNameList[4] = { + "", "Npc_ks", "saru_TW", "saru" }; /* 80AC470C-80AC4710 000068 0004+00 1/0 0/0 0/0 .data l_loadResPtrn0 */ -SECTION_DATA static u32 l_loadResPtrn0 = 0x010203FF; +static s8 l_loadResPtrn0[4] = { + 1, 2, 3, 0xFF, +}; /* 80AC4710-80AC4720 -00001 0010+00 1/2 0/0 0/0 .data l_loadResPtrnList */ -SECTION_DATA static void* l_loadResPtrnList[4] = { - (void*)&l_loadResPtrn0, - (void*)&l_loadResPtrn0, - (void*)&l_loadResPtrn0, - (void*)&l_loadResPtrn0, +static s8* l_loadResPtrnList[4] = { + l_loadResPtrn0, + l_loadResPtrn0, + l_loadResPtrn0, + l_loadResPtrn0 }; /* 80AC4720-80AC473C 00007C 001C+00 0/1 0/0 0/0 .data l_faceMotionAnmData */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 l_faceMotionAnmData[28] = { - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, +static daNpcT_faceMotionAnmData_c l_faceMotionAnmData[1] = { + {-1, 0, 0, 64, 2, 1, 1}, }; -#pragma pop /* 80AC473C-80AC4CD0 000098 0594+00 1/2 0/0 0/0 .data l_motionAnmData */ -SECTION_DATA static u8 l_motionAnmData[1428] = { - 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2F, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1D, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, +static daNpcT_motionAnmData_c l_motionAnmData[51] = { + {51, 2, 1, -1, 0, 0, 0, 0}, + {53, 2, 1, -1, 0, 0, 0, 0}, + {54, 2, 1, -1, 0, 0, 0, 0}, + {11, 2, 1, -1, 0, 0, 0, 0}, + {56, 2, 1, -1, 0, 0, 0, 0}, + {50, 2, 1, -1, 0, 0, 0, 0}, + {7, 2, 1, -1, 0, 0, 0, 0}, + {8, 2, 1, -1, 0, 0, 0, 0}, + {45, 0, 1, -1, 0, 0, 0, 0}, + {39, 2, 1, -1, 0, 0, 0, 0}, + {43, 0, 1, -1, 0, 0, 0, 0}, + {41, 2, 1, -1, 0, 0, 0, 0}, + {24, 2, 1, -1, 0, 0, 0, 0}, + {17, 0, 1, -1, 0, 0, 0, 0}, + {18, 0, 1, -1, 0, 0, 0, 0}, + {19, 0, 1, -1, 0, 0, 0, 0}, + {16, 2, 1, -1, 0, 0, 0, 0}, + {48, 2, 1, -1, 0, 0, 0, 0}, + {30, 2, 1, -1, 0, 0, 0, 0}, + {32, 0, 1, -1, 0, 0, 0, 0}, + {33, 0, 1, -1, 0, 0, 0, 0}, + {31, 0, 1, -1, 0, 0, 0, 0}, + {31, 2, 1, -1, 0, 0, 0, 0}, + {5, 2, 1, -1, 0, 0, 0, 0}, + {28, 2, 1, -1, 0, 0, 0, 0}, + {26, 2, 1, -1, 0, 0, 0, 0}, + {55, 2, 1, -1, 0, 0, 0, 0}, + {12, 2, 1, -1, 0, 0, 0, 0}, + {15, 2, 1, -1, 0, 0, 0, 0}, + {47, 2, 1, -1, 0, 0, 0, 0}, + {49, 0, 1, -1, 0, 0, 0, 0}, + {38, 2, 1, -1, 0, 0, 0, 0}, + {6, 0, 1, -1, 0, 0, 0, 0}, + {13, 2, 1, -1, 0, 0, 0, 0}, + {35, 0, 1, -1, 0, 0, 0, 0}, + {36, 0, 1, -1, 0, 0, 0, 0}, + {3, 2, 3, -1, 0, 0, 0, 0}, + {23, 2, 1, -1, 0, 0, 0, 0}, + {22, 2, 1, -1, 0, 0, 0, 0}, + {21, 2, 1, -1, 0, 0, 0, 0}, + {37, 0, 1, -1, 0, 0, 0, 0}, + {29, 2, 1, -1, 0, 0, 0, 0}, + {27, 2, 1, -1, 0, 0, 0, 0}, + {52, 2, 1, -1, 0, 0, 0, 0}, + {10, 2, 1, -1, 0, 0, 0, 0}, + {9, 2, 1, -1, 0, 0, 0, 0}, + {14, 0, 1, -1, 0, 0, 0, 0}, + {44, 2, 1, -1, 0, 0, 0, 0}, + {42, 2, 1, -1, 0, 0, 0, 0}, + {40, 0, 1, -1, 0, 0, 0, 0}, + {46, 0, 1, -1, 0, 0, 0, 0}, }; /* 80AC4CD0-80AC4CE0 00062C 0010+00 0/1 0/0 0/0 .data l_faceMotionSequenceData */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 l_faceMotionSequenceData[16] = { - 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, +static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_faceMotionSequenceData[4] = { + {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -#pragma pop /* 80AC4CE0-80AC4D90 00063C 00B0+00 0/1 0/0 0/0 .data l_motionSequenceData */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 l_motionSequenceData[176] = { - 0x00, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x01, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x02, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x05, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x09, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x0A, 0xFF, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x28, 0xFF, 0x01, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x19, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x24, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x26, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x03, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, +static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenceData[44] = { + {0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {1, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {2, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {5, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {9, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {10, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {40, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {25, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {36, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {38, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, + {3, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, }; -#pragma pop /* 80AC4D90-80AC4DA0 -00001 0010+00 1/1 0/0 0/0 .data mCutNameList__12daNpc_Saru_c */ -SECTION_DATA void* daNpc_Saru_c::mCutNameList[4] = { - (void*)&d_a_npc_saru__stringBase0, - (void*)(((char*)&d_a_npc_saru__stringBase0) + 0x29), - (void*)(((char*)&d_a_npc_saru__stringBase0) + 0x35), - (void*)(((char*)&d_a_npc_saru__stringBase0) + 0xD), +char* daNpc_Saru_c::mCutNameList[4] = { + "", + "FIND_MONKEY", + "HELP_ME", + "YM_LOOK", }; -/* 80AC4DA0-80AC4DAC -00001 000C+00 0/1 0/0 0/0 .data @3842 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3842[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)cutFindMonkey__12daNpc_Saru_cFi, -}; -#pragma pop - -/* 80AC4DAC-80AC4DB8 -00001 000C+00 0/1 0/0 0/0 .data @3843 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3843[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)cutHelpMe__12daNpc_Saru_cFi, -}; -#pragma pop - -/* 80AC4DB8-80AC4DC4 -00001 000C+00 0/1 0/0 0/0 .data @3844 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3844[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)cutYmLook__12daNpc_Saru_cFi, -}; -#pragma pop - /* 80AC4DC4-80AC4DF4 000720 0030+00 1/2 0/0 0/0 .data mCutList__12daNpc_Saru_c */ -SECTION_DATA u8 daNpc_Saru_c::mCutList[48] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +daNpc_Saru_c::cutFunc daNpc_Saru_c::mCutList[4] = { + NULL, + &daNpc_Saru_c::cutFindMonkey, + &daNpc_Saru_c::cutHelpMe, + &daNpc_Saru_c::cutYmLook, }; -/* 80AC4DF4-80AC4E00 -00001 000C+00 1/1 0/0 0/0 .data @4539 */ -SECTION_DATA static void* lit_4539[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)talk__12daNpc_Saru_cFPv, +/* 80AC042C-80AC0578 0000EC 014C+00 1/0 0/0 0/0 .text __dt__12daNpc_Saru_cFv */ +daNpc_Saru_c::~daNpc_Saru_c() { + if (mpMorf[0] != NULL) { + mpMorf[0]->stopZelAnime(); + } + + deleteRes(l_loadResPtrnList[mType], (const char**)l_resNameList); +} + +/* ############################################################################################## */ +/* 80AC44F8-80AC4588 000000 0090+00 9/9 0/0 0/0 .rodata m__18daNpc_Saru_Param_c */ +daNpc_Saru_Param_c::Data const daNpc_Saru_Param_c::m = { + 140.0f, + -3.0f, + 1.0f, + 550.0f, + 255.0f, + 140.0f, + 35.0f, + 60.0f, + 0.0f, + 0.0f, + 0.0f, + 0.0f, + 30.0f, + -10.0f, + 30.0f, + -30.0f, + 0.6f, + 12.0f, + 3, + 6, + 5, + 6, + 110.0f, + 0.0f, + 0.0f, + 0.0f, + 60, + 8, + 0.0f, + 0.0f, + 4.0f, + -20.0f, + 0.0f, + -20.0f, + 20.0f, + 50.0f, + 20.0f, + 100.0f, + 180, + 0, }; -/* 80AC4E00-80AC4E0C -00001 000C+00 1/1 0/0 0/0 .data @4623 */ -SECTION_DATA static void* lit_4623[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)talk__12daNpc_Saru_cFPv, -}; +/* 80AC0578-80AC082C 000238 02B4+00 1/1 0/0 0/0 .text create__12daNpc_Saru_cFv */ +int daNpc_Saru_c::create() { + static int const heapSize[4] = { + 14480, 14480, 14464, 0, + }; -/* 80AC4E0C-80AC4E18 -00001 000C+00 1/1 0/0 0/0 .data @4628 */ -SECTION_DATA static void* lit_4628[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)talk__12daNpc_Saru_cFPv, -}; + fopAcM_SetupActor2(this, daNpc_Saru_c, l_faceMotionAnmData, l_motionAnmData, + l_faceMotionSequenceData, 4, l_motionSequenceData, 4, l_evtList, (char**)l_resNameList); + + mType = getType(); + mFlowNodeNo = getFlowNodeNo(); + mTwilight = dKy_darkworld_check(); -/* 80AC4E18-80AC4E24 -00001 000C+00 1/1 0/0 0/0 .data @4930 */ -SECTION_DATA static void* lit_4930[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)wait__12daNpc_Saru_cFPv, -}; + int phase = loadRes(l_loadResPtrnList[mType], (const char**)l_resNameList); + if (phase == cPhs_COMPLEATE_e) { + OS_REPORT("\t(%s:%d) flowNo:%d, BitSW:%02x, PathID:%02x<%08x> ", fopAcM_getProcNameString(this), mType, mFlowNodeNo, + getBitSW(), getPathID(), fopAcM_GetParam(this)); + + if (isDelete()) { + OS_REPORT("===>isDelete:TRUE\n"); + return cPhs_ERROR_e; + } + + OS_REPORT("\n"); + + if (!fopAcM_entrySolidHeap(this, createHeapCallBack, heapSize[mType])) { + return cPhs_ERROR_e; + } + + fopAcM_SetMtx(this, mpMorf[0]->getModel()->getBaseTRMtx()); + fopAcM_setCullSizeBox(this, -200.0f, -100.0f, -200.0f, 200.0f, 300.0f, 200.0f); + mSound.init(¤t.pos, &eyePos, 3, 1); + #ifdef DEBUG + field_0xe90->entryHIO("サル"); // Monkey + #endif + reset(); + + mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, + fopAcM_GetSpeed_p(this), fopAcM_GetAngle_p(this), fopAcM_GetShapeAngle_p(this)); + mCcStts.Init(daNpc_Saru_Param_c::m.mWeight, 0, this); + field_0xe4c.Set(mCcDCyl); + field_0xe4c.SetStts(&mCcStts); + field_0xe4c.SetTgHitCallback(tgHitCallBack); + mAcch.CrrPos(dComIfG_Bgsp()); + mGndChk = mAcch.m_gnd; + mGroundH = mAcch.GetGroundH(); + if (mGroundH != -1000000000.0f) { + setEnvTevColor(); + setRoomNo(); + } + + mCreating = true; + Execute(); + mCreating = false; + } + + return phase; +} + +/* 80AC082C-80AC0A54 0004EC 0228+00 1/1 0/0 0/0 .text CreateHeap__12daNpc_Saru_cFv */ +int daNpc_Saru_c::CreateHeap() { + // NONMATCHING + static int const bmdTypeList[2] = { + 2, 3, + }; + + u32 uVar1 = mTwilight == true; + J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_resNameList[l_bmdData[uVar1][1]], l_bmdData[uVar1][0]); + if (modelData == NULL) { + return 0; + } + mpMorf[0] = new mDoExt_McaMorfSO(modelData, NULL, + NULL, NULL, -1, 1.0f, 0, -1, &mSound, 0x80000, 0x11020084); + if (mpMorf[0] == NULL || mpMorf[0]->getModel() == NULL) { + return 0; + } + + J3DModel* model = mpMorf[0]->getModel(); + for (u16 i = 0; i < modelData->getJointNum(); i++) { + modelData->getJointNodePointer(i)->setCallBack(ctrlJointCallBack); + } + + model->setUserArea((u32)this); + + for (int i = 0; i < 2; i++) { + if (l_bmdData[bmdTypeList[i]][0] >= 0) { + modelData = (J3DModelData*)dComIfG_getObjectRes(l_resNameList[l_bmdData[bmdTypeList[i]][1]], l_bmdData[bmdTypeList[i]][0]); + } else { + modelData = NULL; + } + + if (modelData != NULL) { + field_0xe44[i] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + } else { + field_0xe44[i] = NULL; + } + } + + if (setFaceMotionAnm(0, false) && setMotionAnm(0, 0.0f, FALSE)) { + return 1; + } + + return 0; +} + +/* 80AC0A54-80AC0A88 000714 0034+00 1/1 0/0 0/0 .text Delete__12daNpc_Saru_cFv */ +int daNpc_Saru_c::Delete() { + this->~daNpc_Saru_c(); + return 1; +} + +/* 80AC0A88-80AC0AA8 000748 0020+00 2/2 0/0 0/0 .text Execute__12daNpc_Saru_cFv */ +int daNpc_Saru_c::Execute() { + return execute(); +} + +/* 80AC0AA8-80AC0AEC 000768 0044+00 1/1 0/0 0/0 .text Draw__12daNpc_Saru_cFv */ +int daNpc_Saru_c::Draw() { + return draw(FALSE, FALSE, field_0xde8, NULL, 100.0f, FALSE, FALSE, FALSE); +} + +/* 80AC0AEC-80AC0B0C 0007AC 0020+00 1/1 0/0 0/0 .text createHeapCallBack__12daNpc_Saru_cFP10fopAc_ac_c */ +int daNpc_Saru_c::createHeapCallBack(fopAc_ac_c* a_this) { + daNpc_Saru_c* i_this = (daNpc_Saru_c*)a_this; + return i_this->CreateHeap(); +} + +/* 80AC0B0C-80AC0B64 0007CC 0058+00 1/1 0/0 0/0 .text ctrlJointCallBack__12daNpc_Saru_cFP8J3DJointi */ +int daNpc_Saru_c::ctrlJointCallBack(J3DJoint* i_joint, int param_2) { + if (param_2 == 0) { + daNpc_Saru_c* _this = (daNpc_Saru_c*)j3dSys.getModel()->getUserArea(); + if (_this != NULL) { + _this->ctrlJoint(i_joint, j3dSys.getModel()); + } + } + return 1; +} + +/* 80AC0B64-80AC0C0C 000824 00A8+00 2/2 0/0 0/0 .text srchYm__12daNpc_Saru_cFPvPv */ +void* daNpc_Saru_c::srchYm(void* i_actor, void* i_data) { + if (mFindCount < 50 && i_actor != NULL && i_actor != i_data) { + if (fopAcM_IsExecuting(fopAcM_GetID(i_actor)) && fopAcM_GetName(i_actor) == PROC_E_YM && ((daE_YM_c*)i_actor)->isHide() == 0) { + mFindActorPtrs[mFindCount] = (fopAc_ac_c*)i_actor; + mFindCount++; + } + } + return NULL; +} + +/* 80AC0C0C-80AC0C58 0008CC 004C+00 1/1 0/0 0/0 .text getType__12daNpc_Saru_cFv */ +u8 daNpc_Saru_c::getType() { + switch (fopAcM_GetParam(this) & 0xFF) { + case 0: + return TYPE_0; + + case 1: + return TYPE_1; + + case 2: + return TYPE_2; + + default: + return TYPE_3; + } +} + +/* 80AC0C58-80AC0CE8 000918 0090+00 1/1 0/0 0/0 .text isDelete__12daNpc_Saru_cFv */ +int daNpc_Saru_c::isDelete() { + u8 rv; + switch (mType) { + case 0: + return 0; + + case 1: + rv = 0; + if (!daNpcT_chkEvtBit(0x12) || daNpcT_chkEvtBit(0x25C)) { + rv = 1; + } + + return rv; + + case 2: + return 0; + + default: + return 0; + } +} + +/* 80AC0CE8-80AC0EA4 0009A8 01BC+00 1/1 0/0 0/0 .text reset__12daNpc_Saru_cFv */ +void daNpc_Saru_c::reset() { + // NONMATCHING + csXyz acStack_20; + int iVar1 = (u8*)&field_0xfdc - (u8*)&field_0xfbc; + initialize(); + for (int i = 0; i <1; i++) { + mActrMngr[0].initialize(); + } + + if (getPathID() != 0xFF) { + mPath.initialize(); + mPath.setPathInfo(getPathID(), fopAcM_GetRoomNo(this), 0); + } + + memset(&field_0xfbc, 0, 32); + + acStack_20.setall(0); + acStack_20.y = home.angle.y; + + if (getBitSW() != 0xFF) { + if (dComIfGs_isSwitch(getBitSW(), fopAcM_GetRoomNo(this))) { + field_0xfd9 = 1; + } + } + + setAngle(acStack_20); +} + +/* 80AC0EA4-80AC0F28 000B64 0084+00 1/0 0/0 0/0 .text afterJntAnm__12daNpc_Saru_cFi */ +void daNpc_Saru_c::afterJntAnm(int param_1) { + if (param_1 == 1) { + mDoMtx_stack_c::YrotM(mStagger.getAngleZ(1)); + mDoMtx_stack_c::ZrotM(-mStagger.getAngleX(1)); + } else if (param_1 == 4) { + mDoMtx_stack_c::YrotM(mStagger.getAngleZ(0)); + mDoMtx_stack_c::ZrotM(mStagger.getAngleX(0)); + } +} + +/* 80AC0F28-80AC0FDC 000BE8 00B4+00 1/0 0/0 0/0 .text checkChangeEvt__12daNpc_Saru_cFv */ +BOOL daNpc_Saru_c::checkChangeEvt() { + if (!chkAction(&daNpc_Saru_c::talk)) { + mPreItemNo = 0; + if (dComIfGp_event_chkTalkXY()) { + if (dComIfGp_evmng_ChkPresentEnd()) { + mEvtNo = 1; + evtChange(); + } + + return TRUE; + } + } + + return FALSE; +} + +/* 80AC0FDC-80AC1110 000C9C 0134+00 1/0 0/0 0/0 .text setParam__12daNpc_Saru_cFv */ +void daNpc_Saru_c::setParam() { + selectAction(); + srchActors(); + u32 uVar1 = 10; + + s16 sVar1 = daNpc_Saru_Param_c::m.field_0x48; + s16 sVar2 = daNpc_Saru_Param_c::m.field_0x4a; + s16 sVar3 = daNpc_Saru_Param_c::m.field_0x4c; + s16 sVar4 = daNpc_Saru_Param_c::m.field_0x4e; + + attention_info.distances[0] = daNpcT_getDistTableIdx(sVar3, sVar4); + attention_info.distances[1] = attention_info.distances[0]; + attention_info.distances[3] = daNpcT_getDistTableIdx(sVar1, sVar2); + + if (mType == 2) { + uVar1 = 0; + } + + attention_info.flags = uVar1; + + scale.set(daNpc_Saru_Param_c::m.field_0x08, daNpc_Saru_Param_c::m.field_0x08, daNpc_Saru_Param_c::m.field_0x08); + + if (mType != 0) { + scale.setall(0.8f); + } + + mCcStts.SetWeight(daNpc_Saru_Param_c::m.mWeight); + mCylH = daNpc_Saru_Param_c::m.mCylH; + mWallR = daNpc_Saru_Param_c::m.mWallR; + mAttnFovY = daNpc_Saru_Param_c::m.mAttnFovy; + mAcchCir.SetWallR(mWallR); + mAcchCir.SetWallH(daNpc_Saru_Param_c::m.mWallH); + field_0xde8 = daNpc_Saru_Param_c::m.field_0x0c; + field_0xa80 = daNpc_Saru_Param_c::m.field_0x6c; + mMorfFrames = daNpc_Saru_Param_c::m.mMorfFrames; + gravity = daNpc_Saru_Param_c::m.mGravity; +} + +/* 80AC1110-80AC1170 000DD0 0060+00 1/0 0/0 0/0 .text setAfterTalkMotion__12daNpc_Saru_cFv */ +void daNpc_Saru_c::setAfterTalkMotion() { + #ifdef DEBUG + mFaceMotionSeqMngr.getNo(); + #endif + mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); +} + +/* 80AC1170-80AC11D4 000E30 0064+00 1/1 0/0 0/0 .text srchActors__12daNpc_Saru_cFv */ +void daNpc_Saru_c::srchActors() { + switch (mType) { + case 2: + if (mActrMngr[0].getActorP() == NULL) { + mActrMngr[0].entry(getNearestActorP(28)); + } + + case 1: + default: + return; + } +} + +/* 80AC11D4-80AC1274 000E94 00A0+00 1/0 0/0 0/0 .text evtTalk__12daNpc_Saru_cFv */ +BOOL daNpc_Saru_c::evtTalk() { + if (chkAction(&daNpc_Saru_c::talk)) { + (this->*field_0xfc8)(NULL); + } else { + setAction(&daNpc_Saru_c::talk); + } + + return TRUE; +} + +/* 80AC1274-80AC133C 000F34 00C8+00 1/0 0/0 0/0 .text evtCutProc__12daNpc_Saru_cFv */ +BOOL daNpc_Saru_c::evtCutProc() { + int staffId = dComIfGp_getEventManager().getMyStaffId("Saru", this, -1); + if (staffId != -1) { + mStaffId = staffId; + int actIdx = + dComIfGp_getEventManager().getMyActIdx(mStaffId, (char**)mCutNameList, 4, 0, 0); + if ((this->*(mCutList[actIdx]))(mStaffId) != 0) { + dComIfGp_getEventManager().cutEnd(mStaffId); + } + return true; + } + return false; +} + +/* 80AC133C-80AC14E4 000FFC 01A8+00 1/0 0/0 0/0 .text action__12daNpc_Saru_cFv */ +void daNpc_Saru_c::action() { + fopAc_ac_c* actor_p = NULL; + if (mTwilight == false) { + actor_p = hitChk(&field_0xe4c, -1); + } + + if (actor_p != NULL) { + mStagger.setParam(this, actor_p, mCurAngle.y); + setDamage(0, 0, 4); + mStagger.setPower(0.0f); + mDamageTimerStart = 0; + mJntAnm.lookNone(1); + } + + if (mStagger.checkRebirth() != 0) { + mStagger.initialize(); + mMode = 1; + } + + if (field_0xfbc) { + if (field_0xfc8 == field_0xfbc) { + (this->*field_0xfc8)(NULL); + } else { + setAction(field_0xfbc); + } + } +} + +/* 80AC14E4-80AC15B4 0011A4 00D0+00 1/0 0/0 0/0 .text beforeMove__12daNpc_Saru_cFv */ +void daNpc_Saru_c::beforeMove() { + fopAcM_OffStatus(this, 0x8000000); + + if (checkHide()) { + fopAcM_OnStatus(this, 0x8000000); + } + + if ((checkHide() || mNoDraw != 0) && mSpeakEvent == false) { + attention_info.flags = 0; + } +} + +/* 80AC15B4-80AC18A0 001274 02EC+00 1/0 0/0 0/0 .text setAttnPos__12daNpc_Saru_cFv */ +void daNpc_Saru_c::setAttnPos() { + cXyz sp3c(30.0f, 0.0f, 0.0f); + + if (field_0xfd8 != 0) { + daPy_getPlayerActorClass()->onWolfEyeKeep(); + } + + mStagger.calc(FALSE); + f32 fVar1 = cM_s2rad(mCurAngle.y - field_0xd7e.y); + mJntAnm.setParam(this, mpMorf[0]->getModel(), &sp3c, getBackboneJointNo(), getNeckJointNo(), + getHeadJointNo(), daNpc_Saru_Param_c::m.mBodyUpAngle, daNpc_Saru_Param_c::m.mBodyDownAngle, + daNpc_Saru_Param_c::m.mBodyLeftAngle, daNpc_Saru_Param_c::m.mBodyRightAngle, + daNpc_Saru_Param_c::m.mHeadUpAngle, daNpc_Saru_Param_c::m.mHeadDownAngle, + daNpc_Saru_Param_c::m.mHeadLeftAngle, daNpc_Saru_Param_c::m.mHeadRightAngle, + daNpc_Saru_Param_c::m.field_0x40, fVar1, NULL); + mJntAnm.calcJntRad(0.2f, 1.0f, fVar1); + + setMtx(); + mDoMtx_stack_c::copy(mpMorf[0]->getModel()->getAnmMtx(getHeadJointNo())); + mDoMtx_stack_c::multVec(&sp3c, &eyePos); + mDoMtx_stack_c::multVecZero(&sp3c); + field_0xe0c.set(-30.0f, 0.0f, 10.0f); + mDoMtx_stack_c::multVec(&field_0xe0c, &field_0xe0c); + field_0xe0c -= sp3c; + mJntAnm.setEyeAngleX(eyePos, 1.0f, 0); + mJntAnm.setEyeAngleY(eyePos, mCurAngle.y, 0, 1.0f, 0); + + sp3c.set(0.0f, 0.0f, 60.0f); + sp3c.y = daNpc_Saru_Param_c::m.field_0x00; + mDoMtx_stack_c::YrotS(mCurAngle.y); + mDoMtx_stack_c::multVec(&sp3c, &sp3c); + attention_info.position = sp3c + current.pos; + setSe(); +} + +/* 80AC18A0-80AC1A20 001560 0180+00 1/0 0/0 0/0 .text setCollision__12daNpc_Saru_cFv */ +void daNpc_Saru_c::setCollision() { + cXyz sp48; + if (mHide == false) { + int i_type = -0x27040201; + int i_prm = 31; + + if (dComIfGp_event_runCheck()) { + i_type = 0; + i_prm = 0; + } else if (mTwilight != false) { + i_type = 0; + i_prm = 0; + } else if (mStagger.checkStagger()) { + i_type = 0; + i_prm = 0; + } + + field_0xe4c.SetCoSPrm(121); + field_0xe4c.SetTgType(i_type); + field_0xe4c.SetTgSPrm(i_prm); + field_0xe4c.OnTgNoHitMark(); + + sp48.set(0.0f, 0.0f, 20.0f); + f32 i_cylH = mCylH; + f32 i_wallR = mWallR; + mDoMtx_stack_c::YrotS(mCurAngle.y); + mDoMtx_stack_c::multVec(&sp48, &sp48); + sp48 += current.pos; + field_0xe4c.SetH(i_cylH); + field_0xe4c.SetR(i_wallR); + field_0xe4c.SetC(sp48); + dComIfG_Ccsp()->Set(&field_0xe4c); + } + + field_0xe4c.ClrCoHit(); + field_0xe4c.ClrTgHit(); +} + +/* 80AC1A20-80AC1A28 0016E0 0008+00 1/0 0/0 0/0 .text drawDbgInfo__12daNpc_Saru_cFv */ +int daNpc_Saru_c::drawDbgInfo() { + return 0; +} + +/* 80AC1A28-80AC1B30 0016E8 0108+00 1/0 0/0 0/0 .text drawOtherMdl__12daNpc_Saru_cFv */ +void daNpc_Saru_c::drawOtherMdl() { + static int const jointNo[2] = { + 4, 4, + }; + + Mtx mtx; + J3DModel* model = mpMorf[0]->getModel(); + for (int i = 0; i < 2; i++) { + if (field_0xe44[i] != NULL && ((i == 0 && mTwilight == false) || (i == 1 && mTwilight != false))) { + g_env_light.setLightTevColorType_MAJI(field_0xe44[i], &tevStr); + mDoMtx_stack_c::copy(model->getAnmMtx(jointNo[i])); + cMtx_copy(mDoMtx_stack_c::get(), mtx); + field_0xe44[i]->setBaseTRMtx(mtx); + mDoExt_modelUpdateDL(field_0xe44[i]); + dComIfGd_addRealShadow(mShadowKey, field_0xe44[i]); + } + } +} + +/* 80AC1B30-80AC1B78 0017F0 0048+00 1/1 0/0 0/0 .text selectAction__12daNpc_Saru_cFv */ +int daNpc_Saru_c::selectAction() { + field_0xfbc = NULL; + field_0xfbc = &daNpc_Saru_c::talk; + return 1; +} + +/* 80AC1B78-80AC1BA4 001838 002C+00 2/2 0/0 0/0 .text chkAction__12daNpc_Saru_cFM12daNpc_Saru_cFPCvPvPv_i */ +BOOL daNpc_Saru_c::chkAction(int (daNpc_Saru_c::*action)(void*)) { + return field_0xfc8 == action; +} + +/* 80AC1BA4-80AC1C4C 001864 00A8+00 2/2 0/0 0/0 .text setAction__12daNpc_Saru_cFM12daNpc_Saru_cFPCvPvPv_i */ +int daNpc_Saru_c::setAction(int (daNpc_Saru_c::*action)(void*)) { + mMode = 3; + if (field_0xfc8) { + (this->*field_0xfc8)(NULL); + } + + mMode = 0; + field_0xfc8 = action; + if (field_0xfc8) { + (this->*field_0xfc8)(NULL); + } + + return 1; +} + +/* 80AC1C4C-80AC216C 00190C 0520+00 1/1 0/0 0/0 .text setSe__12daNpc_Saru_cFv */ +void daNpc_Saru_c::setSe() { + if (cM3d_IsZero(mpMorf[0]->getPlaySpeed()) <= 0) { + if ((J3DAnmTransform*)dComIfG_getObjectRes(l_resNameList[l_motionAnmData[25].mBckArcIdx], l_motionAnmData[25].mBckFileIdx) == mpMorf[0]->getAnm()) { + if (mpMorf[0]->checkFrame(0.0f)) { + mSound.startCreatureVoice(Z2SE_KOSARU_V_WALK, -1); + } + + if (mpMorf[0]->checkFrame(12.0f)) { + mSound.startCreatureSound(Z2SE_KOSARU_FOOTNOTE, 0, -1); + } + } + + if ((J3DAnmTransform*)dComIfG_getObjectRes(l_resNameList[l_motionAnmData[36].mBckArcIdx], l_motionAnmData[36].mBckFileIdx) == mpMorf[0]->getAnm()) { + if (((mpMorf[0]->checkFrame(0.0f) || mpMorf[0]->checkFrame(19.0f)) || mpMorf[0]->checkFrame(42.0f)) || mpMorf[0]->checkFrame(75.0f)) { + mSound.startCreatureVoice(Z2SE_KOSARU_V_PRISONED, -1); + } + + if (mpMorf[0]->checkFrame(5.0f) || mpMorf[0]->checkFrame(21.0f)) { + mSound.startCreatureSound(Z2SE_OBJ_MONKEYJAIL_CREAK, 0, -1); + } + + if (mpMorf[0]->checkFrame(53.0f) || mpMorf[0]->checkFrame(64.0f)) { + mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1); + } + } + + if ((J3DAnmTransform*)dComIfG_getObjectRes(l_resNameList[l_motionAnmData[11].mBckArcIdx], l_motionAnmData[11].mBckFileIdx) == mpMorf[0]->getAnm() && mpMorf[0]->checkFrame(0.0f)) { + mSound.startCreatureVoice(Z2SE_KOSARU_V_SCARED, -1); + } + + if ((J3DAnmTransform*)dComIfG_getObjectRes(l_resNameList[l_motionAnmData[38].mBckArcIdx], l_motionAnmData[38].mBckFileIdx) == mpMorf[0]->getAnm()) { + if (mpMorf[0]->checkFrame(4.0f) || mpMorf[0]->checkFrame(21.0f)) { + mSound.startCreatureVoice(Z2SE_KOSARU_V_POINT, -1); + } + + if ((mpMorf[0]->checkFrame(0.0f) || mpMorf[0]->checkFrame(11.0f)) || mpMorf[0]->checkFrame(23.0f)) { + mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1); + } + } + + if ((J3DAnmTransform*)dComIfG_getObjectRes(l_resNameList[l_motionAnmData[3].mBckArcIdx], l_motionAnmData[3].mBckFileIdx) == mpMorf[0]->getAnm()) { + if (mpMorf[0]->checkFrame(0.0f)) { + mSound.startCreatureVoice(Z2SE_KOSARU_V_DELIGHT, -1); + } + + if (mpMorf[0]->checkFrame(9.0f)) { + mSound.startCreatureSound(Z2SE_KOSARU_HAND_CLAP, 0, -1); + } + + if (mpMorf[0]->checkFrame(15.0f)) { + mSound.startCreatureSound(Z2SE_KOSARU_JUMP_END, 0, -1); + } + } + } +} + +/* 80AC216C-80AC2368 001E2C 01FC+00 1/0 0/0 0/0 .text cutFindMonkey__12daNpc_Saru_cFi */ +int daNpc_Saru_c::cutFindMonkey(int param_1) { + cXyz sp2c; + int rv = 0; + int iVar1 = -1; + int iVar2 = 0; + + int* piVar1 = dComIfGp_evmng_getMyIntegerP(param_1, "prm"); + if (piVar1 != NULL){ + iVar1 = *piVar1; + } + + piVar1 = dComIfGp_evmng_getMyIntegerP(param_1, "timer"); + if (piVar1 != NULL) { + iVar2 = *piVar1; + } + + if (dComIfGp_getEventManager().getIsAddvance(param_1) != 0) { + switch (iVar1) { + case 0: + break; + + case 1: + mMotionSeqMngr.setNo(7, -1.0f, 0, 0); + mEventTimer = iVar2; + break; + + case 2: + speedF = 0.0f; + speed.setall(0.0f); + } + } + + switch (iVar1) { + case 0: + rv = 1; + break; + + case 1: + JUT_ASSERT(1859, 0 != mPath.getPathInfo()); + if (cLib_calcTimer(&mEventTimer) == 0) { + rv = 1; + } + sp2c = mPath.getPntPos(1); + if (2500.0f < current.pos.abs2(sp2c)) { + cLib_addCalcAngleS2(¤t.angle.y, cLib_targetAngleY(¤t.pos, &sp2c), 4, 0x800); + shape_angle.y = current.angle.y; + mCurAngle.y = shape_angle.y; + cLib_chaseF(&speedF, 18.0f, 0.5f); + } else { + rv = 1; + } + break; + + case 2: + rv = 1; + } + + return rv; +} + +/* 80AC2368-80AC2598 002028 0230+00 1/0 0/0 0/0 .text cutHelpMe__12daNpc_Saru_cFi */ +int daNpc_Saru_c::cutHelpMe(int param_1) { + int rv = 0; + int iVar1 = -1; + + int* piVar1 = dComIfGp_evmng_getMyIntegerP(param_1, "prm"); + if (piVar1 != NULL) { + iVar1 = *piVar1; + } + + if (dComIfGp_getEventManager().getIsAddvance(param_1) != 0) { + switch (iVar1) { + case 0: + mFaceMotionSeqMngr.setNo(0, 0.0f, 0, 0); + mMotionSeqMngr.setNo(9, 0.0f, 0, 0); + break; + + case 1: + mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mMotionSeqMngr.setNo(10, -1.0f, 0, 0); + mPlayerAngle = home.angle.y + 0x8000; + break; + } + } + + switch (iVar1) { + case 0: + mJntAnm.lookNone(0); + rv = 1; + break; + + case 1: + mJntAnm.lookNone(0); + if (mPlayerAngle == mCurAngle.y) { + rv = 1; + } else { + step(mPlayerAngle, -1, -1, 20, 0); + } + } + + return rv; +} + +/* 80AC2598-80AC28A4 002258 030C+00 1/0 0/0 0/0 .text cutYmLook__12daNpc_Saru_cFi */ +int daNpc_Saru_c::cutYmLook(int param_1) { + char acStack_88[104]; + int rv = 0; + int iVar1 = -1; + int i_eventTimer = 0; + + int* piVar1 = dComIfGp_evmng_getMyIntegerP(param_1, "prm"); + if (piVar1 != NULL) { + iVar1 = *piVar1; + } + + int* piVar2 = dComIfGp_evmng_getMyIntegerP(param_1, "timer"); + if (piVar2 != NULL) { + i_eventTimer = *piVar2; + } + + if (dComIfGp_getEventManager().getIsAddvance(param_1) != 0) { + switch (iVar1) { + case 0: + strcpy(acStack_88, l_evtList[2].eventName); + strcat(acStack_88, "@"); + dComIfGp_getEvent().setSkipZev(this, acStack_88); + dComIfGp_getEvent().onSkipFade(); + field_0xfd9 = 1; + + case 1: + mEventTimer = i_eventTimer; + break; + + case 2: + mMotionSeqMngr.setNo(2, -1.0f, 0, 0); + break; + + case 3: + initTalk(mFlowNodeNo, NULL); + break; + + case 4: + mMotionSeqMngr.setNo(6, -1.0f, 0, 0); + break; + + case 5: + break; + + case 99: + daNpcT_onEvtBit(0x16C); + mFlow.remove(); + } + } + + switch (iVar1) { + case 0: + mFindCount = 0; + fopAcM_Search(srchYm, this); + if (mFindCount == 0 && cLib_calcTimer(&mEventTimer) == 0) { + rv = 1; + } + action(); + break; + + case 1: + action(); + if (cLib_calcTimer(&mEventTimer) == 0) { + rv = 1; + } + break; + + case 2: + if (mMotionSeqMngr.checkEndSequence() != 0) { + rv = 1; + } + break; + + case 3: + if (talkProc(NULL, FALSE, NULL, FALSE) && mFlow.checkEndFlow()) { + rv = 1; + } + break; + + case 4: + if (mMotionSeqMngr.checkEndSequence() != 0) { + rv = 1; + } + break; + + case 5: + rv = 1; + break; + + case 99: + rv = 1; + } + + return rv; +} + +/* 80AC28A4-80AC2FD8 002564 0734+00 1/0 0/0 0/0 .text wait__12daNpc_Saru_cFPv */ +int daNpc_Saru_c::wait(void* param_1) { + // NONMATCHING + obj_so_class* cage_p; + switch (mMode) { + case 1: + if (mStagger.checkStagger() == 0) { + switch (mType) { + case 0: + if (field_0xfd9 != 0) { + mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + } else { + mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mMotionSeqMngr.setNo(4, -1.0f, 0, 0); + } + break; + + case 2: + cage_p = (obj_so_class*)mActrMngr[0].getActorP(); + if (cage_p != NULL) { + mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mMotionSeqMngr.setNo(8, -1.0f, 0, 0); + if (cage_p->partBreak() == 1) { + mFaceMotionSeqMngr.setNo(0, -1.0f, 0 ,0); + mMotionSeqMngr.setNo(9, -1.0f, 0, 0); + } + } else { + mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + } + break; + + default: + mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mMotionSeqMngr.setNo(0, -1.0f, 0, 0); + } + + mMode = 2; + } + // fallthrough + case 2: + if (mType == 1 && daNpcT_chkEvtBit(0x25C)) { + fopAcM_delete(this); + return 1; + } else { + if (mStagger.checkStagger() == 0) { + if (mType == 2 && mMotionSeqMngr.getNo() == 8) { + cage_p = (obj_so_class*)mActrMngr[0].getActorP(); + if (cage_p != NULL && cage_p->partBreak() == 1) { + mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mMotionSeqMngr.setNo(9, -1.0f, 0, 0); + } + } + + if (mPlayerActorMngr.getActorP() != NULL && mTwilight == false) { + mJntAnm.lookPlayer(0); + if (!chkActorInSight(mPlayerActorMngr.getActorP(), mAttnFovY, mCurAngle.y)) { + mJntAnm.lookNone(0); + } + + if (!srchPlayerActor() && home.angle.y == mCurAngle.y) { + mMode = 1; + } + } else { + mJntAnm.lookNone(0); + if (home.angle.y != mCurAngle.y) { + if (field_0xe34 != 0) { + if (step(home.angle.y, -1, -1, 15, 0)) { + mMode = 1; + } + } else { + setAngle(home.angle.y); + mMode = 1; + } + + attention_info.flags = 0; + } else { + if (mType == 0) { + if (mMotionSeqMngr.getNo() == 5) { + if (mMotionSeqMngr.checkEndSequence() != 0) { + mMode = 1; + } + } else if (field_0xfd4 != 0 && cLib_calcTimer(&field_0xfd4) == 0 && mType == 0 && field_0xfd9 == 0) { + mFaceMotionSeqMngr.setNo(0, -1.0f, 0, 0); + mMotionSeqMngr.setNo(5, -1.0f, 0, 0); + } + } + + if (mTwilight == false) { + srchPlayerActor(); + } + } + } + + mJntAnm.getMode(); + } + + if (mType == 0) { + if (field_0xfd9 == 0) { + mFindCount = 0; + fopAcM_Search(srchYm, this); + int iVar1 = 0; + for (int i = 0; i < mFindCount; i++) { + if (mFindActorPtrs[i]->health > 0) { + iVar1++; + } + } + + if (mFindCount != 0 && iVar1 == 0) { + mEvtNo = 2; + field_0xfd8 = 1; + } + } else { + field_0xfd8 = 0; + } + } + } + break; + + case 3: + break; + } + + return 1; +} + +/* 80AC2FD8-80AC31B4 002C98 01DC+00 3/0 0/0 0/0 .text talk__12daNpc_Saru_cFPv */ +int daNpc_Saru_c::talk(void* param_1) { + // NONMATCHING + switch (mMode) { + case 0: + case 1: + if (mStagger.checkStagger() == 0) { + initTalk(mFlowNodeNo, NULL); + mMode = 2; + } + + case 2: + if (mStagger.checkStagger() == 0) { + if (mTwilight != false || mPlayerAngle == mCurAngle.y) { + if (talkProc(NULL, FALSE, NULL, FALSE) && mFlow.checkEndFlow()) { + mPlayerActorMngr.entry(daPy_getPlayerActorClass()); + dComIfGp_event_reset(); + mMode = 3; + } + + mJntAnm.lookPlayer(0); + if (mTwilight != false) { + mJntAnm.lookNone(0); + } + } else { + mJntAnm.lookPlayer(0); + step(fopAcM_searchPlayerAngleY(this), -1, -1, 15, 0); + } + } + } + + return 0; +} + +/* 80AC31B4-80AC31D4 002E74 0020+00 1/0 0/0 0/0 .text daNpc_Saru_Create__FPv */ +static int daNpc_Saru_Create(void* param_1) { + daNpc_Saru_c* i_this = (daNpc_Saru_c*)param_1; + return i_this->create(); +} + +/* 80AC31D4-80AC31F4 002E94 0020+00 1/0 0/0 0/0 .text daNpc_Saru_Delete__FPv */ +static int daNpc_Saru_Delete(void* param_1) { + daNpc_Saru_c* i_this = (daNpc_Saru_c*)param_1; + return i_this->Delete(); +} + +/* 80AC31F4-80AC3214 002EB4 0020+00 1/0 0/0 0/0 .text daNpc_Saru_Execute__FPv */ +static int daNpc_Saru_Execute(void* param_1) { + daNpc_Saru_c* i_this = (daNpc_Saru_c*)param_1; + return i_this->Execute(); +} + +/* 80AC3214-80AC3234 002ED4 0020+00 1/0 0/0 0/0 .text daNpc_Saru_Draw__FPv */ +static int daNpc_Saru_Draw(void* param_1) { + daNpc_Saru_c* i_this = (daNpc_Saru_c*)param_1; + return i_this->Draw(); +} + +/* 80AC3234-80AC323C 002EF4 0008+00 1/0 0/0 0/0 .text daNpc_Saru_IsDelete__FPv */ +static int daNpc_Saru_IsDelete(void* param_1) { + return 1; +} + +/* 80AC4FF4-80AC4FF8 000014 0004+00 1/1 0/0 0/0 .bss l_HIO */ +static daNpc_Saru_Param_c l_HIO; + +/* 80AC4474-80AC447C 004134 0008+00 1/0 0/0 0/0 .text getHeadJointNo__12daNpc_Saru_cFv */ +s32 daNpc_Saru_c::getHeadJointNo() { + return 4; +} + +/* 80AC447C-80AC4484 00413C 0008+00 1/0 0/0 0/0 .text getNeckJointNo__12daNpc_Saru_cFv */ +s32 daNpc_Saru_c::getNeckJointNo() { + return 3; +} + +/* 80AC4484-80AC448C 004144 0008+00 1/0 0/0 0/0 .text getBackboneJointNo__12daNpc_Saru_cFv */ +s32 daNpc_Saru_c::getBackboneJointNo() { + return 1; +} + +/* 80AC4654-80AC4654 00015C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ /* 80AC4E24-80AC4E44 -00001 0020+00 1/0 0/0 0/0 .data daNpc_Saru_MethodTable */ static actor_method_class daNpc_Saru_MethodTable = { - (process_method_func)daNpc_Saru_Create__FPv, - (process_method_func)daNpc_Saru_Delete__FPv, - (process_method_func)daNpc_Saru_Execute__FPv, - (process_method_func)daNpc_Saru_IsDelete__FPv, - (process_method_func)daNpc_Saru_Draw__FPv, + (process_method_func)daNpc_Saru_Create, + (process_method_func)daNpc_Saru_Delete, + (process_method_func)daNpc_Saru_Execute, + (process_method_func)daNpc_Saru_IsDelete, + (process_method_func)daNpc_Saru_Draw, }; /* 80AC4E44-80AC4E74 -00001 0030+00 0/0 0/0 1/0 .data g_profile_NPC_SARU */ @@ -557,965 +1181,3 @@ extern actor_process_profile_definition g_profile_NPC_SARU = { fopAc_NPC_e, // mActorType fopAc_CULLBOX_CUSTOM_e, // cullType }; - -/* 80AC4E74-80AC4E80 0007D0 000C+00 3/3 0/0 0/0 .data __vt__12J3DFrameCtrl */ -SECTION_DATA extern void* __vt__12J3DFrameCtrl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12J3DFrameCtrlFv, -}; - -/* 80AC4E80-80AC4EA4 0007DC 0024+00 3/3 0/0 0/0 .data __vt__12dBgS_ObjAcch */ -SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_ObjAcchFv, - (void*)NULL, - (void*)NULL, - (void*)func_80AC44DC, - (void*)NULL, - (void*)NULL, - (void*)func_80AC44D4, -}; - -/* 80AC4EA4-80AC4EB0 000800 000C+00 2/2 0/0 0/0 .data __vt__12dBgS_AcchCir */ -SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_AcchCirFv, -}; - -/* 80AC4EB0-80AC4EBC 00080C 000C+00 3/3 0/0 0/0 .data __vt__10cCcD_GStts */ -SECTION_DATA extern void* __vt__10cCcD_GStts[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__10cCcD_GSttsFv, -}; - -/* 80AC4EBC-80AC4EC8 000818 000C+00 2/2 0/0 0/0 .data __vt__10dCcD_GStts */ -SECTION_DATA extern void* __vt__10dCcD_GStts[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__10dCcD_GSttsFv, -}; - -/* 80AC4EC8-80AC4ED4 000824 000C+00 3/3 0/0 0/0 .data __vt__22daNpcT_MotionSeqMngr_c */ -SECTION_DATA extern void* __vt__22daNpcT_MotionSeqMngr_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__22daNpcT_MotionSeqMngr_cFv, -}; - -/* 80AC4ED4-80AC4EE0 000830 000C+00 5/5 0/0 0/0 .data __vt__18daNpcT_ActorMngr_c */ -SECTION_DATA extern void* __vt__18daNpcT_ActorMngr_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__18daNpcT_ActorMngr_cFv, -}; - -/* 80AC4EE0-80AC4EEC 00083C 000C+00 3/3 0/0 0/0 .data __vt__15daNpcT_JntAnm_c */ -SECTION_DATA extern void* __vt__15daNpcT_JntAnm_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__15daNpcT_JntAnm_cFv, -}; - -/* 80AC4EEC-80AC4EF8 000848 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGAab */ -SECTION_DATA extern void* __vt__8cM3dGAab[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGAabFv, -}; - -/* 80AC4EF8-80AC4F04 000854 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGCyl */ -SECTION_DATA extern void* __vt__8cM3dGCyl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGCylFv, -}; - -/* 80AC4F04-80AC4F10 000860 000C+00 3/3 0/0 0/0 .data __vt__13daNpcT_Path_c */ -SECTION_DATA extern void* __vt__13daNpcT_Path_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__13daNpcT_Path_cFv, -}; - -/* 80AC4F10-80AC4FD4 00086C 00C4+00 2/2 0/0 0/0 .data __vt__12daNpc_Saru_c */ -SECTION_DATA extern void* __vt__12daNpc_Saru_c[49] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12daNpc_Saru_cFv, - (void*)ctrlBtk__8daNpcT_cFv, - (void*)ctrlSubFaceMotion__8daNpcT_cFi, - (void*)checkChangeJoint__8daNpcT_cFi, - (void*)checkRemoveJoint__8daNpcT_cFi, - (void*)getBackboneJointNo__12daNpc_Saru_cFv, - (void*)getNeckJointNo__12daNpc_Saru_cFv, - (void*)getHeadJointNo__12daNpc_Saru_cFv, - (void*)getFootLJointNo__8daNpcT_cFv, - (void*)getFootRJointNo__8daNpcT_cFv, - (void*)getEyeballLMaterialNo__8daNpcT_cFv, - (void*)getEyeballRMaterialNo__8daNpcT_cFv, - (void*)getEyeballMaterialNo__8daNpcT_cFv, - (void*)ctrlJoint__8daNpcT_cFP8J3DJointP8J3DModel, - (void*)afterJntAnm__12daNpc_Saru_cFi, - (void*)setParam__12daNpc_Saru_cFv, - (void*)checkChangeEvt__12daNpc_Saru_cFv, - (void*)evtTalk__12daNpc_Saru_cFv, - (void*)evtEndProc__8daNpcT_cFv, - (void*)evtCutProc__12daNpc_Saru_cFv, - (void*)setAfterTalkMotion__12daNpc_Saru_cFv, - (void*)evtProc__8daNpcT_cFv, - (void*)action__12daNpc_Saru_cFv, - (void*)beforeMove__12daNpc_Saru_cFv, - (void*)afterMoved__8daNpcT_cFv, - (void*)setAttnPos__12daNpc_Saru_cFv, - (void*)setFootPos__8daNpcT_cFv, - (void*)setCollision__12daNpc_Saru_cFv, - (void*)setFootPrtcl__8daNpcT_cFP4cXyzff, - (void*)checkCullDraw__8daNpcT_cFv, - (void*)twilight__8daNpcT_cFv, - (void*)chkXYItems__8daNpcT_cFv, - (void*)evtOrder__8daNpcT_cFv, - (void*)decTmr__8daNpcT_cFv, - (void*)clrParam__8daNpcT_cFv, - (void*)drawDbgInfo__12daNpc_Saru_cFv, - (void*)drawOtherMdl__12daNpc_Saru_cFv, - (void*)drawGhost__8daNpcT_cFv, - (void*)afterSetFaceMotionAnm__8daNpcT_cFiifi, - (void*)afterSetMotionAnm__8daNpcT_cFiifi, - (void*)getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c, - (void*)getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c, - (void*)changeAnm__8daNpcT_cFPiPi, - (void*)changeBck__8daNpcT_cFPiPi, - (void*)changeBtp__8daNpcT_cFPiPi, - (void*)changeBtk__8daNpcT_cFPiPi, - (void*)setMotionAnm__8daNpcT_cFifi, -}; - -/* 80AC042C-80AC0578 0000EC 014C+00 1/0 0/0 0/0 .text __dt__12daNpc_Saru_cFv */ -daNpc_Saru_c::~daNpc_Saru_c() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80AC44F8-80AC4588 000000 0090+00 9/9 0/0 0/0 .rodata m__18daNpc_Saru_Param_c */ -SECTION_RODATA u8 const daNpc_Saru_Param_c::m[144] = { - 0x43, 0x0C, 0x00, 0x00, 0xC0, 0x40, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x44, 0x09, 0x80, 0x00, - 0x43, 0x7F, 0x00, 0x00, 0x43, 0x0C, 0x00, 0x00, 0x42, 0x0C, 0x00, 0x00, 0x42, 0x70, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x41, 0xF0, 0x00, 0x00, 0xC1, 0x20, 0x00, 0x00, 0x41, 0xF0, 0x00, 0x00, 0xC1, 0xF0, 0x00, 0x00, - 0x3F, 0x19, 0x99, 0x9A, 0x41, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x05, 0x00, 0x06, - 0x42, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x3C, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, - 0xC1, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0xA0, 0x00, 0x00, 0x41, 0xA0, 0x00, 0x00, - 0x42, 0x48, 0x00, 0x00, 0x41, 0xA0, 0x00, 0x00, 0x42, 0xC8, 0x00, 0x00, 0x00, 0xB4, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80AC44F8, &daNpc_Saru_Param_c::m); - -/* 80AC4588-80AC4598 000090 0010+00 0/1 0/0 0/0 .rodata heapSize$3999 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const heapSize[16] = { - 0x00, 0x00, 0x38, 0x90, 0x00, 0x00, 0x38, 0x90, 0x00, 0x00, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80AC4588, &heapSize); -#pragma pop - -/* 80AC4598-80AC459C 0000A0 0004+00 0/1 0/0 0/0 .rodata @4065 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4065 = -200.0f; -COMPILER_STRIP_GATE(0x80AC4598, &lit_4065); -#pragma pop - -/* 80AC459C-80AC45A0 0000A4 0004+00 0/1 0/0 0/0 .rodata @4066 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4066 = -100.0f; -COMPILER_STRIP_GATE(0x80AC459C, &lit_4066); -#pragma pop - -/* 80AC45A0-80AC45A4 0000A8 0004+00 0/1 0/0 0/0 .rodata @4067 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4067 = 200.0f; -COMPILER_STRIP_GATE(0x80AC45A0, &lit_4067); -#pragma pop - -/* 80AC45A4-80AC45A8 0000AC 0004+00 0/1 0/0 0/0 .rodata @4068 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4068 = 300.0f; -COMPILER_STRIP_GATE(0x80AC45A4, &lit_4068); -#pragma pop - -/* 80AC45A8-80AC45AC 0000B0 0004+00 0/1 0/0 0/0 .rodata @4069 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4069 = -1000000000.0f; -COMPILER_STRIP_GATE(0x80AC45A8, &lit_4069); -#pragma pop - -/* 80AC0578-80AC082C 000238 02B4+00 1/1 0/0 0/0 .text create__12daNpc_Saru_cFv */ -void daNpc_Saru_c::create() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80AC45AC-80AC45B0 0000B4 0004+00 5/12 0/0 0/0 .rodata @4231 */ -SECTION_RODATA static u8 const lit_4231[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80AC45AC, &lit_4231); - -/* 80AC45B0-80AC45B4 0000B8 0004+00 0/2 0/0 0/0 .rodata @4232 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4232 = 65536.0f; -COMPILER_STRIP_GATE(0x80AC45B0, &lit_4232); -#pragma pop - -/* 80AC45B4-80AC45B8 0000BC 0004+00 0/3 0/0 0/0 .rodata @4233 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4233 = 1.0f / 5.0f; -COMPILER_STRIP_GATE(0x80AC45B4, &lit_4233); -#pragma pop - -/* 80AC45B8-80AC45C0 0000C0 0008+00 0/1 0/0 0/0 .rodata bmdTypeList$4340 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const bmdTypeList[8] = { - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, -}; -COMPILER_STRIP_GATE(0x80AC45B8, &bmdTypeList); -#pragma pop - -/* 80AC45C0-80AC45C4 0000C8 0004+00 1/4 0/0 0/0 .rodata @4393 */ -SECTION_RODATA static f32 const lit_4393 = 1.0f; -COMPILER_STRIP_GATE(0x80AC45C0, &lit_4393); - -/* 80AC082C-80AC0A54 0004EC 0228+00 1/1 0/0 0/0 .text CreateHeap__12daNpc_Saru_cFv */ -void daNpc_Saru_c::CreateHeap() { - // NONMATCHING -} - -/* 80AC0A54-80AC0A88 000714 0034+00 1/1 0/0 0/0 .text Delete__12daNpc_Saru_cFv */ -void daNpc_Saru_c::Delete() { - // NONMATCHING -} - -/* 80AC0A88-80AC0AA8 000748 0020+00 2/2 0/0 0/0 .text Execute__12daNpc_Saru_cFv */ -void daNpc_Saru_c::Execute() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80AC45C4-80AC45C8 0000CC 0004+00 1/1 0/0 0/0 .rodata @4408 */ -SECTION_RODATA static f32 const lit_4408 = 100.0f; -COMPILER_STRIP_GATE(0x80AC45C4, &lit_4408); - -/* 80AC0AA8-80AC0AEC 000768 0044+00 1/1 0/0 0/0 .text Draw__12daNpc_Saru_cFv */ -void daNpc_Saru_c::Draw() { - // NONMATCHING -} - -/* 80AC0AEC-80AC0B0C 0007AC 0020+00 1/1 0/0 0/0 .text - * createHeapCallBack__12daNpc_Saru_cFP10fopAc_ac_c */ -void daNpc_Saru_c::createHeapCallBack(fopAc_ac_c* param_0) { - // NONMATCHING -} - -/* 80AC0B0C-80AC0B64 0007CC 0058+00 1/1 0/0 0/0 .text - * ctrlJointCallBack__12daNpc_Saru_cFP8J3DJointi */ -void daNpc_Saru_c::ctrlJointCallBack(J3DJoint* param_0, int param_1) { - // NONMATCHING -} - -/* 80AC0B64-80AC0C0C 000824 00A8+00 2/2 0/0 0/0 .text srchYm__12daNpc_Saru_cFPvPv */ -void daNpc_Saru_c::srchYm(void* param_0, void* param_1) { - // NONMATCHING -} - -/* 80AC0C0C-80AC0C58 0008CC 004C+00 1/1 0/0 0/0 .text getType__12daNpc_Saru_cFv */ -void daNpc_Saru_c::getType() { - // NONMATCHING -} - -/* 80AC0C58-80AC0CE8 000918 0090+00 1/1 0/0 0/0 .text isDelete__12daNpc_Saru_cFv */ -void daNpc_Saru_c::isDelete() { - // NONMATCHING -} - -/* 80AC0CE8-80AC0EA4 0009A8 01BC+00 1/1 0/0 0/0 .text reset__12daNpc_Saru_cFv */ -void daNpc_Saru_c::reset() { - // NONMATCHING -} - -/* 80AC0EA4-80AC0F28 000B64 0084+00 1/0 0/0 0/0 .text afterJntAnm__12daNpc_Saru_cFi */ -void daNpc_Saru_c::afterJntAnm(int param_0) { - // NONMATCHING -} - -/* 80AC0F28-80AC0FDC 000BE8 00B4+00 1/0 0/0 0/0 .text checkChangeEvt__12daNpc_Saru_cFv */ -void daNpc_Saru_c::checkChangeEvt() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80AC45C8-80AC45CC 0000D0 0004+00 1/1 0/0 0/0 .rodata @4593 */ -SECTION_RODATA static f32 const lit_4593 = 4.0f / 5.0f; -COMPILER_STRIP_GATE(0x80AC45C8, &lit_4593); - -/* 80AC0FDC-80AC1110 000C9C 0134+00 1/0 0/0 0/0 .text setParam__12daNpc_Saru_cFv */ -void daNpc_Saru_c::setParam() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80AC45CC-80AC45D0 0000D4 0004+00 4/5 0/0 0/0 .rodata @4608 */ -SECTION_RODATA static f32 const lit_4608 = -1.0f; -COMPILER_STRIP_GATE(0x80AC45CC, &lit_4608); - -/* 80AC1110-80AC1170 000DD0 0060+00 1/0 0/0 0/0 .text setAfterTalkMotion__12daNpc_Saru_cFv */ -void daNpc_Saru_c::setAfterTalkMotion() { - // NONMATCHING -} - -/* 80AC1170-80AC11D4 000E30 0064+00 1/1 0/0 0/0 .text srchActors__12daNpc_Saru_cFv */ -void daNpc_Saru_c::srchActors() { - // NONMATCHING -} - -/* 80AC11D4-80AC1274 000E94 00A0+00 1/0 0/0 0/0 .text evtTalk__12daNpc_Saru_cFv */ -void daNpc_Saru_c::evtTalk() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80AC4654-80AC4654 00015C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80AC4691 = "Saru"; -#pragma pop - -/* 80AC1274-80AC133C 000F34 00C8+00 1/0 0/0 0/0 .text evtCutProc__12daNpc_Saru_cFv */ -void daNpc_Saru_c::evtCutProc() { - // NONMATCHING -} - -/* 80AC133C-80AC14E4 000FFC 01A8+00 1/0 0/0 0/0 .text action__12daNpc_Saru_cFv */ -void daNpc_Saru_c::action() { - // NONMATCHING -} - -/* 80AC14E4-80AC15B4 0011A4 00D0+00 1/0 0/0 0/0 .text beforeMove__12daNpc_Saru_cFv */ -void daNpc_Saru_c::beforeMove() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80AC45D0-80AC45D4 0000D8 0004+00 0/1 0/0 0/0 .rodata @4771 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4771 = 30.0f; -COMPILER_STRIP_GATE(0x80AC45D0, &lit_4771); -#pragma pop - -/* 80AC45D4-80AC45D8 0000DC 0004+00 0/1 0/0 0/0 .rodata @4772 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4772 = 0x38C90FDB; -COMPILER_STRIP_GATE(0x80AC45D4, &lit_4772); -#pragma pop - -/* 80AC45D8-80AC45DC 0000E0 0004+00 0/1 0/0 0/0 .rodata @4773 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4773 = -30.0f; -COMPILER_STRIP_GATE(0x80AC45D8, &lit_4773); -#pragma pop - -/* 80AC45DC-80AC45E0 0000E4 0004+00 0/1 0/0 0/0 .rodata @4774 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4774 = 10.0f; -COMPILER_STRIP_GATE(0x80AC45DC, &lit_4774); -#pragma pop - -/* 80AC45E0-80AC45E8 0000E8 0004+04 0/1 0/0 0/0 .rodata @4775 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4775[1 + 1 /* padding */] = { - 60.0f, - /* padding */ - 0.0f, -}; -COMPILER_STRIP_GATE(0x80AC45E0, &lit_4775); -#pragma pop - -/* 80AC45E8-80AC45F0 0000F0 0008+00 1/3 0/0 0/0 .rodata @4777 */ -SECTION_RODATA static u8 const lit_4777[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80AC45E8, &lit_4777); - -/* 80AC15B4-80AC18A0 001274 02EC+00 1/0 0/0 0/0 .text setAttnPos__12daNpc_Saru_cFv */ -void daNpc_Saru_c::setAttnPos() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80AC45F0-80AC45F8 0000F8 0008+00 0/1 0/0 0/0 .rodata @4835 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4835[8] = { - 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80AC45F0, &lit_4835); -#pragma pop - -/* 80AC45F8-80AC4600 000100 0008+00 0/1 0/0 0/0 .rodata @4836 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4836[8] = { - 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80AC45F8, &lit_4836); -#pragma pop - -/* 80AC4600-80AC4608 000108 0008+00 0/1 0/0 0/0 .rodata @4837 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4837[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80AC4600, &lit_4837); -#pragma pop - -/* 80AC4608-80AC460C 000110 0004+00 1/1 0/0 0/0 .rodata @4876 */ -SECTION_RODATA static f32 const lit_4876 = 20.0f; -COMPILER_STRIP_GATE(0x80AC4608, &lit_4876); - -/* 80AC18A0-80AC1A20 001560 0180+00 1/0 0/0 0/0 .text setCollision__12daNpc_Saru_cFv */ -void daNpc_Saru_c::setCollision() { - // NONMATCHING -} - -/* 80AC1A20-80AC1A28 0016E0 0008+00 1/0 0/0 0/0 .text drawDbgInfo__12daNpc_Saru_cFv */ -bool daNpc_Saru_c::drawDbgInfo() { - return false; -} - -/* ############################################################################################## */ -/* 80AC460C-80AC4614 000114 0008+00 1/1 0/0 0/0 .rodata jointNo$4884 */ -SECTION_RODATA static u8 const jointNo[8] = { - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, -}; -COMPILER_STRIP_GATE(0x80AC460C, &jointNo); - -/* 80AC1A28-80AC1B30 0016E8 0108+00 1/0 0/0 0/0 .text drawOtherMdl__12daNpc_Saru_cFv */ -void daNpc_Saru_c::drawOtherMdl() { - // NONMATCHING -} - -/* 80AC1B30-80AC1B78 0017F0 0048+00 1/1 0/0 0/0 .text selectAction__12daNpc_Saru_cFv */ -void daNpc_Saru_c::selectAction() { - // NONMATCHING -} - -/* 80AC1B78-80AC1BA4 001838 002C+00 2/2 0/0 0/0 .text - * chkAction__12daNpc_Saru_cFM12daNpc_Saru_cFPCvPvPv_i */ -void daNpc_Saru_c::chkAction(int (daNpc_Saru_c::*param_0)(void*)) { - // NONMATCHING -} - -/* 80AC1BA4-80AC1C4C 001864 00A8+00 2/2 0/0 0/0 .text - * setAction__12daNpc_Saru_cFM12daNpc_Saru_cFPCvPvPv_i */ -void daNpc_Saru_c::setAction(int (daNpc_Saru_c::*param_0)(void*)) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80AC4614-80AC4618 00011C 0004+00 0/1 0/0 0/0 .rodata @5082 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5082 = 12.0f; -COMPILER_STRIP_GATE(0x80AC4614, &lit_5082); -#pragma pop - -/* 80AC4618-80AC461C 000120 0004+00 0/1 0/0 0/0 .rodata @5083 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5083 = 19.0f; -COMPILER_STRIP_GATE(0x80AC4618, &lit_5083); -#pragma pop - -/* 80AC461C-80AC4620 000124 0004+00 0/1 0/0 0/0 .rodata @5084 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5084 = 42.0f; -COMPILER_STRIP_GATE(0x80AC461C, &lit_5084); -#pragma pop - -/* 80AC4620-80AC4624 000128 0004+00 0/1 0/0 0/0 .rodata @5085 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5085 = 75.0f; -COMPILER_STRIP_GATE(0x80AC4620, &lit_5085); -#pragma pop - -/* 80AC4624-80AC4628 00012C 0004+00 0/1 0/0 0/0 .rodata @5086 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5086 = 5.0f; -COMPILER_STRIP_GATE(0x80AC4624, &lit_5086); -#pragma pop - -/* 80AC4628-80AC462C 000130 0004+00 0/1 0/0 0/0 .rodata @5087 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5087 = 21.0f; -COMPILER_STRIP_GATE(0x80AC4628, &lit_5087); -#pragma pop - -/* 80AC462C-80AC4630 000134 0004+00 0/1 0/0 0/0 .rodata @5088 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5088 = 53.0f; -COMPILER_STRIP_GATE(0x80AC462C, &lit_5088); -#pragma pop - -/* 80AC4630-80AC4634 000138 0004+00 0/1 0/0 0/0 .rodata @5089 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5089 = 64.0f; -COMPILER_STRIP_GATE(0x80AC4630, &lit_5089); -#pragma pop - -/* 80AC4634-80AC4638 00013C 0004+00 0/1 0/0 0/0 .rodata @5090 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5090 = 4.0f; -COMPILER_STRIP_GATE(0x80AC4634, &lit_5090); -#pragma pop - -/* 80AC4638-80AC463C 000140 0004+00 0/1 0/0 0/0 .rodata @5091 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5091 = 11.0f; -COMPILER_STRIP_GATE(0x80AC4638, &lit_5091); -#pragma pop - -/* 80AC463C-80AC4640 000144 0004+00 0/1 0/0 0/0 .rodata @5092 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5092 = 23.0f; -COMPILER_STRIP_GATE(0x80AC463C, &lit_5092); -#pragma pop - -/* 80AC4640-80AC4644 000148 0004+00 0/1 0/0 0/0 .rodata @5093 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5093 = 9.0f; -COMPILER_STRIP_GATE(0x80AC4640, &lit_5093); -#pragma pop - -/* 80AC4644-80AC4648 00014C 0004+00 0/1 0/0 0/0 .rodata @5094 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5094 = 15.0f; -COMPILER_STRIP_GATE(0x80AC4644, &lit_5094); -#pragma pop - -/* 80AC1C4C-80AC216C 00190C 0520+00 1/1 0/0 0/0 .text setSe__12daNpc_Saru_cFv */ -void daNpc_Saru_c::setSe() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80AC4648-80AC464C 000150 0004+00 0/1 0/0 0/0 .rodata @5142 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5142 = 2500.0f; -COMPILER_STRIP_GATE(0x80AC4648, &lit_5142); -#pragma pop - -/* 80AC464C-80AC4650 000154 0004+00 0/1 0/0 0/0 .rodata @5143 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5143 = 18.0f; -COMPILER_STRIP_GATE(0x80AC464C, &lit_5143); -#pragma pop - -/* 80AC4650-80AC4654 000158 0004+00 0/1 0/0 0/0 .rodata @5144 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5144 = 0.5f; -COMPILER_STRIP_GATE(0x80AC4650, &lit_5144); -#pragma pop - -/* 80AC4654-80AC4654 00015C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80AC4696 = "prm"; -SECTION_DEAD static char const* const stringBase_80AC469A = "timer"; -#pragma pop - -/* 80AC216C-80AC2368 001E2C 01FC+00 1/0 0/0 0/0 .text cutFindMonkey__12daNpc_Saru_cFi */ -void daNpc_Saru_c::cutFindMonkey(int param_0) { - // NONMATCHING -} - -/* 80AC2368-80AC2598 002028 0230+00 1/0 0/0 0/0 .text cutHelpMe__12daNpc_Saru_cFi */ -void daNpc_Saru_c::cutHelpMe(int param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80AC4654-80AC4654 00015C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80AC46A0 = "@"; -#pragma pop - -/* 80AC2598-80AC28A4 002258 030C+00 1/0 0/0 0/0 .text cutYmLook__12daNpc_Saru_cFi */ -void daNpc_Saru_c::cutYmLook(int param_0) { - // NONMATCHING -} - -/* 80AC28A4-80AC2FD8 002564 0734+00 1/0 0/0 0/0 .text wait__12daNpc_Saru_cFPv */ -void daNpc_Saru_c::wait(void* param_0) { - // NONMATCHING -} - -/* 80AC2FD8-80AC31B4 002C98 01DC+00 3/0 0/0 0/0 .text talk__12daNpc_Saru_cFPv */ -void daNpc_Saru_c::talk(void* param_0) { - // NONMATCHING -} - -/* 80AC31B4-80AC31D4 002E74 0020+00 1/0 0/0 0/0 .text daNpc_Saru_Create__FPv */ -static void daNpc_Saru_Create(void* param_0) { - // NONMATCHING -} - -/* 80AC31D4-80AC31F4 002E94 0020+00 1/0 0/0 0/0 .text daNpc_Saru_Delete__FPv */ -static void daNpc_Saru_Delete(void* param_0) { - // NONMATCHING -} - -/* 80AC31F4-80AC3214 002EB4 0020+00 1/0 0/0 0/0 .text daNpc_Saru_Execute__FPv */ -static void daNpc_Saru_Execute(void* param_0) { - // NONMATCHING -} - -/* 80AC3214-80AC3234 002ED4 0020+00 1/0 0/0 0/0 .text daNpc_Saru_Draw__FPv */ -static void daNpc_Saru_Draw(void* param_0) { - // NONMATCHING -} - -/* 80AC3234-80AC323C 002EF4 0008+00 1/0 0/0 0/0 .text daNpc_Saru_IsDelete__FPv */ -static bool daNpc_Saru_IsDelete(void* param_0) { - return true; -} - -/* 80AC323C-80AC3284 002EFC 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */ -// cCcD_GStts::~cCcD_GStts() { -extern "C" void __dt__10cCcD_GSttsFv() { - // NONMATCHING -} - -/* 80AC3284-80AC360C 002F44 0388+00 1/1 0/0 0/0 .text __dt__8daNpcT_cFv */ -// daNpcT_c::~daNpcT_c() { -extern "C" void __dt__8daNpcT_cFv() { - // NONMATCHING -} - -/* 80AC360C-80AC3648 0032CC 003C+00 3/3 0/0 0/0 .text __dt__4cXyzFv */ -// cXyz::~cXyz() { -extern "C" void __dt__4cXyzFv() { - // NONMATCHING -} - -/* 80AC3648-80AC3684 003308 003C+00 2/2 0/0 0/0 .text __dt__5csXyzFv */ -// csXyz::~csXyz() { -extern "C" void __dt__5csXyzFv() { - // NONMATCHING -} - -/* 80AC3684-80AC36CC 003344 0048+00 3/2 0/0 0/0 .text __dt__18daNpcT_ActorMngr_cFv */ -// daNpcT_ActorMngr_c::~daNpcT_ActorMngr_c() { -extern "C" void __dt__18daNpcT_ActorMngr_cFv() { - // NONMATCHING -} - -/* 80AC36CC-80AC3714 00338C 0048+00 1/0 0/0 0/0 .text __dt__13daNpcT_Path_cFv */ -// daNpcT_Path_c::~daNpcT_Path_c() { -extern "C" void __dt__13daNpcT_Path_cFv() { - // NONMATCHING -} - -/* 80AC3714-80AC3750 0033D4 003C+00 1/1 0/0 0/0 .text __ct__18daNpcT_ActorMngr_cFv */ -// daNpcT_ActorMngr_c::daNpcT_ActorMngr_c() { -extern "C" void __ct__18daNpcT_ActorMngr_cFv() { - // NONMATCHING -} - -/* 80AC3750-80AC3798 003410 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */ -// cM3dGCyl::~cM3dGCyl() { -extern "C" void __dt__8cM3dGCylFv() { - // NONMATCHING -} - -/* 80AC3798-80AC37E0 003458 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ -// cM3dGAab::~cM3dGAab() { -extern "C" void __dt__8cM3dGAabFv() { - // NONMATCHING -} - -/* 80AC37E0-80AC3BE4 0034A0 0404+00 1/1 0/0 0/0 .text - * __ct__8daNpcT_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc - */ -// daNpcT_c::daNpcT_c(daNpcT_faceMotionAnmData_c const* param_0, -// daNpcT_motionAnmData_c const* param_1, -// daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_2, int param_3, -// daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_4, int param_5, -// daNpcT_evtData_c const* param_6, char** param_7) { -extern "C" void __ct__8daNpcT_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc() { - // NONMATCHING -} - -/* 80AC3BE4-80AC3BE8 0038A4 0004+00 1/1 0/0 0/0 .text __ct__5csXyzFv */ -// csXyz::csXyz() { -extern "C" void __ct__5csXyzFv() { - /* empty function */ -} - -/* 80AC3BE8-80AC3CE4 0038A8 00FC+00 1/0 0/0 0/0 .text __dt__15daNpcT_JntAnm_cFv */ -// daNpcT_JntAnm_c::~daNpcT_JntAnm_c() { -extern "C" void __dt__15daNpcT_JntAnm_cFv() { - // NONMATCHING -} - -/* 80AC3CE4-80AC3CE8 0039A4 0004+00 1/1 0/0 0/0 .text __ct__4cXyzFv */ -// cXyz::cXyz() { -extern "C" void __ct__4cXyzFv() { - /* empty function */ -} - -/* 80AC3CE8-80AC3D30 0039A8 0048+00 1/0 0/0 0/0 .text __dt__22daNpcT_MotionSeqMngr_cFv */ -// daNpcT_MotionSeqMngr_c::~daNpcT_MotionSeqMngr_c() { -extern "C" void __dt__22daNpcT_MotionSeqMngr_cFv() { - // NONMATCHING -} - -/* 80AC3D30-80AC3DA0 0039F0 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ -// dBgS_AcchCir::~dBgS_AcchCir() { -extern "C" void __dt__12dBgS_AcchCirFv() { - // NONMATCHING -} - -/* 80AC3DA0-80AC3DFC 003A60 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */ -// dCcD_GStts::~dCcD_GStts() { -extern "C" void __dt__10dCcD_GSttsFv() { - // NONMATCHING -} - -/* 80AC3DFC-80AC3E6C 003ABC 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING -} - -/* 80AC3E6C-80AC3EB4 003B2C 0048+00 1/0 0/0 0/0 .text __dt__12J3DFrameCtrlFv */ -// J3DFrameCtrl::~J3DFrameCtrl() { -extern "C" void __dt__12J3DFrameCtrlFv() { - // NONMATCHING -} - -/* 80AC3EB4-80AC3FD0 003B74 011C+00 1/1 0/0 0/0 .text setEyeAngleY__15daNpcT_JntAnm_cF4cXyzsifs */ -// void daNpcT_JntAnm_c::setEyeAngleY(cXyz param_0, s16 param_1, int param_2, f32 param_3, -// s16 param_4) { -extern "C" void setEyeAngleY__15daNpcT_JntAnm_cF4cXyzsifs() { - // NONMATCHING -} - -/* 80AC3FD0-80AC41D8 003C90 0208+00 1/1 0/0 0/0 .text setEyeAngleX__15daNpcT_JntAnm_cF4cXyzfs */ -// void daNpcT_JntAnm_c::setEyeAngleX(cXyz param_0, f32 param_1, s16 param_2) { -extern "C" void setEyeAngleX__15daNpcT_JntAnm_cF4cXyzfs() { - // NONMATCHING -} - -/* 80AC41D8-80AC41DC 003E98 0004+00 1/0 0/0 0/0 .text ctrlSubFaceMotion__8daNpcT_cFi */ -// void daNpcT_c::ctrlSubFaceMotion(int param_0) { -extern "C" void ctrlSubFaceMotion__8daNpcT_cFi() { - /* empty function */ -} - -/* 80AC41FC-80AC4204 003EBC 0008+00 1/0 0/0 0/0 .text getEyeballLMaterialNo__8daNpcT_cFv - */ -// bool daNpcT_c::getEyeballLMaterialNo() { -extern "C" bool getEyeballLMaterialNo__8daNpcT_cFv() { - return false; -} - -/* 80AC4204-80AC420C 003EC4 0008+00 1/0 0/0 0/0 .text getEyeballRMaterialNo__8daNpcT_cFv - */ -// bool daNpcT_c::getEyeballRMaterialNo() { -extern "C" bool getEyeballRMaterialNo__8daNpcT_cFv() { - return false; -} - - -/* 80AC4214-80AC421C 003ED4 0008+00 1/0 0/0 0/0 .text evtEndProc__8daNpcT_cFv */ -// bool daNpcT_c::evtEndProc() { -extern "C" bool evtEndProc__8daNpcT_cFv() { - return true; -} - -/* 80AC4220-80AC4228 003EE0 0008+00 1/0 0/0 0/0 .text chkXYItems__8daNpcT_cFv */ -// bool daNpcT_c::chkXYItems() { -extern "C" bool chkXYItems__8daNpcT_cFv() { - return false; -} - -/* 80AC4228-80AC4240 003EE8 0018+00 1/0 0/0 0/0 .text decTmr__8daNpcT_cFv */ -// void daNpcT_c::decTmr() { -extern "C" void decTmr__8daNpcT_cFv() { - // NONMATCHING -} - -/* 80AC4240-80AC4244 003F00 0004+00 1/0 0/0 0/0 .text drawGhost__8daNpcT_cFv */ -// void daNpcT_c::drawGhost() { -extern "C" void drawGhost__8daNpcT_cFv() { - /* empty function */ -} - -/* 80AC4244-80AC424C 003F04 0008+00 1/0 0/0 0/0 .text afterSetFaceMotionAnm__8daNpcT_cFiifi */ -// bool daNpcT_c::afterSetFaceMotionAnm(int param_0, int param_1, f32 param_2, int param_3) { -extern "C" bool afterSetFaceMotionAnm__8daNpcT_cFiifi() { - return true; -} - -/* 80AC424C-80AC4254 003F0C 0008+00 1/0 0/0 0/0 .text afterSetMotionAnm__8daNpcT_cFiifi - */ -// bool daNpcT_c::afterSetMotionAnm(int param_0, int param_1, f32 param_2, int param_3) { -extern "C" bool afterSetMotionAnm__8daNpcT_cFiifi() { - return true; -} - -/* 80AC4254-80AC4284 003F14 0030+00 1/0 0/0 0/0 .text - * getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c */ -// void daNpcT_c::getFaceMotionAnm(daNpcT_faceMotionAnmData_c param_0) { -extern "C" void getFaceMotionAnm__8daNpcT_cF26daNpcT_faceMotionAnmData_c() { - // NONMATCHING -} - -/* 80AC4284-80AC42B4 003F44 0030+00 1/0 0/0 0/0 .text - * getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c */ -// void daNpcT_c::getMotionAnm(daNpcT_motionAnmData_c param_0) { -extern "C" void getMotionAnm__8daNpcT_cF22daNpcT_motionAnmData_c() { - // NONMATCHING -} - -/* 80AC42B4-80AC42B8 003F74 0004+00 1/0 0/0 0/0 .text changeAnm__8daNpcT_cFPiPi */ -// void daNpcT_c::changeAnm(int* param_0, int* param_1) { -extern "C" void changeAnm__8daNpcT_cFPiPi() { - /* empty function */ -} - -/* 80AC42B8-80AC42BC 003F78 0004+00 1/0 0/0 0/0 .text changeBck__8daNpcT_cFPiPi */ -// void daNpcT_c::changeBck(int* param_0, int* param_1) { -extern "C" void changeBck__8daNpcT_cFPiPi() { - /* empty function */ -} - -/* 80AC42BC-80AC42C0 003F7C 0004+00 1/0 0/0 0/0 .text changeBtp__8daNpcT_cFPiPi */ -// void daNpcT_c::changeBtp(int* param_0, int* param_1) { -extern "C" void changeBtp__8daNpcT_cFPiPi() { - /* empty function */ -} - -/* 80AC42C0-80AC42C4 003F80 0004+00 1/0 0/0 0/0 .text changeBtk__8daNpcT_cFPiPi */ -// void daNpcT_c::changeBtk(int* param_0, int* param_1) { -extern "C" void changeBtk__8daNpcT_cFPiPi() { - /* empty function */ -} - -/* 80AC42C4-80AC42E0 003F84 001C+00 3/3 0/0 0/0 .text cLib_calcTimer__FPi */ -extern "C" void func_80AC42C4(void* _this, int* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80AC4FD4-80AC4FE0 000930 000C+00 2/2 0/0 0/0 .data __vt__18daNpc_Saru_Param_c */ -SECTION_DATA extern void* __vt__18daNpc_Saru_Param_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__18daNpc_Saru_Param_cFv, -}; - -/* 80AC4FE8-80AC4FF4 000008 000C+00 1/1 0/0 0/0 .bss @3845 */ -static u8 lit_3845[12]; - -/* 80AC4FF4-80AC4FF8 000014 0004+00 1/1 0/0 0/0 .bss l_HIO */ -static u8 l_HIO[4]; - -/* 80AC42E0-80AC4394 003FA0 00B4+00 0/0 1/0 0/0 .text __sinit_d_a_npc_saru_cpp */ -void __sinit_d_a_npc_saru_cpp() { - // NONMATCHING -} - -#pragma push -#pragma force_active on -REGISTER_CTORS(0x80AC42E0, __sinit_d_a_npc_saru_cpp); -#pragma pop - -/* 80AC4394-80AC4474 004054 00E0+00 1/1 0/0 0/0 .text - * __ct__12daNpc_Saru_cFPC26daNpcT_faceMotionAnmData_cPC22daNpcT_motionAnmData_cPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPCQ222daNpcT_MotionSeqMngr_c18sequenceStepData_ciPC16daNpcT_evtData_cPPc - */ -daNpc_Saru_c::daNpc_Saru_c(daNpcT_faceMotionAnmData_c const* param_0, - daNpcT_motionAnmData_c const* param_1, - daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_2, - int param_3, - daNpcT_MotionSeqMngr_c::sequenceStepData_c const* param_4, - int param_5, daNpcT_evtData_c const* param_6, char** param_7) { - // NONMATCHING -} - -/* 80AC4474-80AC447C 004134 0008+00 1/0 0/0 0/0 .text getHeadJointNo__12daNpc_Saru_cFv */ -s32 daNpc_Saru_c::getHeadJointNo() { - return 4; -} - -/* 80AC447C-80AC4484 00413C 0008+00 1/0 0/0 0/0 .text getNeckJointNo__12daNpc_Saru_cFv */ -s32 daNpc_Saru_c::getNeckJointNo() { - return 3; -} - -/* 80AC4484-80AC448C 004144 0008+00 1/0 0/0 0/0 .text getBackboneJointNo__12daNpc_Saru_cFv */ -bool daNpc_Saru_c::getBackboneJointNo() { - return true; -} - -/* 80AC448C-80AC44D4 00414C 0048+00 2/1 0/0 0/0 .text __dt__18daNpc_Saru_Param_cFv */ -daNpc_Saru_Param_c::~daNpc_Saru_Param_c() { - // NONMATCHING -} - -/* 80AC44D4-80AC44DC 004194 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -static void func_80AC44D4() { - // NONMATCHING -} - -/* 80AC44DC-80AC44E4 00419C 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -static void func_80AC44DC() { - // NONMATCHING -} - -/* 80AC4654-80AC4654 00015C 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ diff --git a/src/d/actor/d_a_obj_kago.cpp b/src/d/actor/d_a_obj_kago.cpp index 20cee6a486e..1297476f3c4 100644 --- a/src/d/actor/d_a_obj_kago.cpp +++ b/src/d/actor/d_a_obj_kago.cpp @@ -4,190 +4,24 @@ */ #include "d/actor/d_a_obj_kago.h" +#include "Z2AudioLib/Z2Instances.h" +#include "d/actor/d_a_npc.h" #include "d/d_cc_d.h" +#include "d/d_com_inf_game.h" #include "dol2asm.h" +#include "f_op/f_op_actor_mng.h" - - - -// -// Forward References: -// - -extern "C" void __dt__12daObj_Kago_cFv(); -extern "C" void __dt__8dCcD_CylFv(); -extern "C" void create__12daObj_Kago_cFv(); -extern "C" void __dt__8cM3dGLinFv(); -extern "C" void __ct__8dCcD_CylFv(); -extern "C" void __dt__8cM3dGCylFv(); -extern "C" void __dt__8cM3dGAabFv(); -extern "C" void __dt__12dBgS_AcchCirFv(); -extern "C" void __dt__10dCcD_GSttsFv(); -extern "C" void __dt__4cXyzFv(); -extern "C" void __dt__12dBgS_ObjAcchFv(); -extern "C" void CreateHeap__12daObj_Kago_cFv(); -extern "C" void Delete__12daObj_Kago_cFv(); -extern "C" void Execute__12daObj_Kago_cFv(); -extern "C" void Draw__12daObj_Kago_cFv(); -extern "C" void createHeapCallBack__12daObj_Kago_cFP10fopAc_ac_c(); -extern "C" void isDelete__12daObj_Kago_cFv(); -extern "C" void setEnvTevColor__12daObj_Kago_cFv(); -extern "C" void setRoomNo__12daObj_Kago_cFv(); -extern "C" void reset__12daObj_Kago_cFv(); -extern "C" void setMtx__12daObj_Kago_cFv(); -extern "C" void getWallAngle__12daObj_Kago_cFsPs(); -extern "C" void setGoalPosAndAngle__12daObj_Kago_cFv(); -extern "C" void setSmokePrtcl__12daObj_Kago_cFv(); -extern "C" void setWaterPrtcl__12daObj_Kago_cFv(); -extern "C" void setHamonPrtcl__12daObj_Kago_cFv(); -extern "C" static void daObj_Kago_Create__FPv(); -extern "C" static void daObj_Kago_Delete__FPv(); -extern "C" static void daObj_Kago_Execute__FPv(); -extern "C" static void daObj_Kago_Draw__FPv(); -extern "C" static bool daObj_Kago_IsDelete__FPv(); -extern "C" void __dt__10cCcD_GSttsFv(); -extern "C" void func_80C33B84(void* _this, int*); -extern "C" void __sinit_d_a_obj_kago_cpp(); -extern "C" void __dt__18daObj_Kago_Param_cFv(); -extern "C" static void func_80C33C5C(); -extern "C" static void func_80C33C64(); -extern "C" u8 const m__18daObj_Kago_Param_c[44]; -extern "C" extern char const* const d_a_obj_kago__stringBase0; - -// -// External References: -// - -extern "C" void mDoMtx_YrotS__FPA4_fs(); -extern "C" void scaleM__14mDoMtx_stack_cFRC4cXyz(); -extern "C" void ZXYrotM__14mDoMtx_stack_cFRC5csXyz(); -extern "C" void mDoExt_modelUpdateDL__FP8J3DModel(); -extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void __dt__10fopAc_ac_cFv(); -extern "C" void fopAcM_SearchByID__FUiPP10fopAc_ac_c(); -extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl(); -extern "C" void fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff(); -extern "C" void fopAcM_calcSpeed__FP10fopAc_ac_c(); -extern "C" void fopAcM_posMove__FP10fopAc_ac_cPC4cXyz(); -extern "C" void fopAcM_effSmokeSet1__FPUlPUlPC4cXyzPC5csXyzfPC12dKy_tevstr_ci(); -extern "C" void fopAcM_effHamonSet__FPUlPC4cXyzff(); -extern "C" void fopAcM_carryOffRevise__FP10fopAc_ac_c(); -extern "C" void fopAcM_getWaterY__FPC4cXyzPf(); -extern "C" void fopAcM_getWaterStream__FPC4cXyzRC13cBgS_PolyInfoP4cXyzPii(); -extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc(); -extern "C" void -dComIfGd_setShadow__FUlScP8J3DModelP4cXyzffffR13cBgS_PolyInfoP12dKy_tevstr_csfP9_GXTexObj(); -extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci(); -extern "C" void forceOnEventMove__Q213dPa_control_c7level_cFUl(); -extern "C" void -set__13dPa_control_cFUlUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void LineCross__4cBgSFP11cBgS_LinChk(); -extern "C" void GetPolyColor__4dBgSFRC13cBgS_PolyInfo(); -extern "C" void GetRoomId__4dBgSFRC13cBgS_PolyInfo(); -extern "C" void __ct__12dBgS_AcchCirFv(); -extern "C" void SetWall__12dBgS_AcchCirFff(); -extern "C" void __dt__9dBgS_AcchFv(); -extern "C" void __ct__9dBgS_AcchFv(); -extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz(); -extern "C" void CrrPos__9dBgS_AcchFR4dBgS(); -extern "C" void __ct__11dBgS_LinChkFv(); -extern "C" void __dt__11dBgS_LinChkFv(); -extern "C" void Set__11dBgS_LinChkFPC4cXyzPC4cXyzPC10fopAc_ac_c(); -extern "C" void SetObj__16dBgS_PolyPassChkFv(); -extern "C" void GetAc__22dCcD_GAtTgCoCommonBaseFv(); -extern "C" void __ct__10dCcD_GSttsFv(); -extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c(); -extern "C" void __ct__12dCcD_GObjInfFv(); -extern "C" void __dt__12dCcD_GObjInfFv(); -extern "C" void ChkCoHit__12dCcD_GObjInfFv(); -extern "C" void Set__8dCcD_CylFRC11dCcD_SrcCyl(); -extern "C" void daNpcT_onEvtBit__FUl(); -extern "C" void daNpcT_chkEvtBit__FUl(); -extern "C" void daNpcT_onTmpBit__FUl(); -extern "C" void daNpcT_offTmpBit__FUl(); -extern "C" void daNpcT_chkTmpBit__FUl(); -extern "C" void daNpcF_getGroundAngle__FP13cBgS_PolyInfos(); -extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c(); -extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c(); -extern "C" void Set__4cCcSFP8cCcD_Obj(); -extern "C" void __mi__4cXyzCFRC3Vec(); -extern "C" void normalizeZP__4cXyzFv(); -extern "C" void cM_atan2s__Fff(); -extern "C" void cM_rndFX__Ff(); -extern "C" void __ct__11cBgS_GndChkFv(); -extern "C" void __dt__11cBgS_GndChkFv(); -extern "C" void __dt__13cBgS_PolyInfoFv(); -extern "C" void __dt__8cM3dGCirFv(); -extern "C" void SetC__8cM3dGCylFRC4cXyz(); -extern "C" void SetH__8cM3dGCylFf(); -extern "C" void SetR__8cM3dGCylFf(); -extern "C" void cLib_addCalc__FPfffff(); -extern "C" void cLib_addCalc2__FPffff(); -extern "C" void cLib_addCalcAngleS2__FPssss(); -extern "C" void cLib_chaseF__FPfff(); -extern "C" void cLib_chaseAngleS__FPsss(); -extern "C" void __dl__FPv(); -extern "C" void __destroy_arr(); -extern "C" void __construct_array(); -extern "C" void _savegpr_24(); -extern "C" void _savegpr_25(); -extern "C" void _savegpr_27(); -extern "C" void _restgpr_24(); -extern "C" void _restgpr_25(); -extern "C" void _restgpr_27(); -extern "C" u8 const mCcDObjData__8daNpcT_c[48]; -extern "C" extern void* __vt__8dCcD_Cyl[36]; -extern "C" extern void* __vt__9dCcD_Stts[11]; -extern "C" extern void* __vt__12cCcD_CylAttr[25]; -extern "C" extern void* __vt__14cCcD_ShapeAttr[22]; -extern "C" extern void* __vt__9cCcD_Stts[8]; -extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" extern u8 g_dComIfG_gameInfo[122384]; -extern "C" u8 mSimpleTexObj__21dDlst_shadowControl_c[32]; -extern "C" u8 sincosTable___5JMath[65536]; -extern "C" void __register_global_object(); - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 80C33D94-80C33D94 000114 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80C33D94 = ""; -SECTION_DEAD static char const* const stringBase_80C33D95 = "uri_kago"; -#pragma pop - -/* 80C33DA0-80C33DAC 000000 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */ -SECTION_DATA static u8 cNullVec__6Z2Calc[12] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -/* 80C33DAC-80C33DC0 00000C 0004+10 0/0 0/0 0/0 .data @1787 */ -#pragma push -#pragma force_active on -SECTION_DATA static u32 lit_1787[1 + 4 /* padding */] = { - 0x02000201, - /* padding */ - 0x40080000, - 0x00000000, - 0x3FE00000, - 0x00000000, -}; -#pragma pop +UNK_REL_DATA; /* 80C33DC0-80C33DD0 000020 0010+00 2/3 0/0 0/0 .data l_bmdData */ -SECTION_DATA static u8 l_bmdData[16] = { - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, +static int l_bmdData[2][2] = { + { 3, 1 }, { 4, 1 }, }; /* 80C33DD0-80C33DD8 -00001 0008+00 2/4 0/0 0/0 .data l_resNameList */ -SECTION_DATA static void* l_resNameList[2] = { - (void*)&d_a_obj_kago__stringBase0, - (void*)(((char*)&d_a_obj_kago__stringBase0) + 0x1), +static char* l_resNameList[2] = { + "", + "uri_kago" }; /* 80C33DD8-80C33E1C 000038 0044+00 1/2 0/0 0/0 .data l_ccDCyl */ @@ -205,18 +39,660 @@ static dCcD_SrcCyl l_ccDCyl = { } // mCyl }; -/* 80C33E1C-80C33E24 00007C 0008+00 1/1 0/0 0/0 .data emttrId$4731 */ -SECTION_DATA static u8 emttrId[8] = { - 0x01, 0xB8, 0x01, 0xB9, 0x01, 0xBA, 0x01, 0xBB, +/* 80C31AEC-80C31C90 0000EC 01A4+00 1/0 0/0 0/0 .text __dt__12daObj_Kago_cFv */ +daObj_Kago_c::~daObj_Kago_c() { + // NONMATCHING + OS_REPORT("|%06d:%x|daObj_Kago_c -> デストラクト\n", g_Counter.mCounter0, this); + if (mType == 0 && daNpcT_chkTmpBit(7)) { + daNpcT_onEvtBit(0x92); + } + + dComIfG_resDelete(&mPhase, l_resNameList[l_bmdData[0][1]]); +} + +/* ############################################################################################## */ +/* 80C33C80-80C33CAC 000000 002C+00 5/5 0/0 0/0 .rodata m__18daObj_Kago_Param_c */ +daObj_Kago_Param_c::Data const daObj_Kago_Param_c::m = { + 0.0f, + -5.0f, + 1.0f, + 400.0f, + 73.0f, + 30.0f, + 24.0f, + 30.0f, + 30.0f, + 55.0f, + 10.0f, }; +/* 80C33CAC-80C33CDC 00002C 0030+00 0/0 0/0 0/0 .rodata l_ccDObjData */ +SECTION_RODATA static u8 const l_ccDObjData[48] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +/* 80C31D5C-80C320FC 00035C 03A0+00 1/1 0/0 0/0 .text create__12daObj_Kago_cFv */ +cPhs__Step daObj_Kago_c::create() { + // NONMATCHING + static int const heapSize[5] = { + 0x0820, 0x0820, 0, 0x0820, 0, + }; + + fopAcM_SetupActor(this, daObj_Kago_c); + + mType = getType(); + + cPhs__Step phase = (cPhs__Step)dComIfG_resLoad(&mPhase, l_resNameList[l_bmdData[0][1]]); + if (phase == cPhs_COMPLEATE_e) { + OS_REPORT("\t(%s:%d) <%08x> -> roomNo.%d", fopAcM_getProcNameString(this), getType(), fopAcM_GetParam(this), fopAcM_GetRoomNo(this)); + if (mType == 0 && isDelete()) { + OS_REPORT("===>isDelete:TRUE\n"); + return cPhs_ERROR_e; + } + + OS_REPORT("\n"); + if (!fopAcM_entrySolidHeap(this, createHeapCallBack, heapSize[mType])) { + return cPhs_ERROR_e; + } + + fopAcM_SetMtx(this, field_0x574->getBaseTRMtx()); + fopAcM_setCullSizeBox(this, -100.0f, -50.0f, -100.0f, 100.0f, 100.0f, 100.0f); + reset(); + + if (mType == 0) { + setGoalPosAndAngle(); + health = 1; + } + + mAcchCir.SetWall(daObj_Kago_Param_c::m.mWallH, daObj_Kago_Param_c::m.mWallR); + mObjAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, fopAcM_GetSpeed_p(this), + fopAcM_GetAngle_p(this), fopAcM_GetShapeAngle_p(this)); + mStts.Init(daObj_Kago_Param_c::m.mWeight, 0, this); + + field_0x808[0].Set(l_ccDCyl); + field_0x808[0].SetStts(&mStts); + field_0x808[1].Set(l_ccDCyl); + field_0x808[1].SetStts(&mStts); + + mObjAcch.CrrPos(dComIfG_Bgsp()); + field_0x7cc = mObjAcch.m_gnd; + mGroundH = mObjAcch.GetGroundH(); + if (mGroundH != -1000000000.0f) { + setEnvTevColor(); + setRoomNo(); + } + + Execute(); + } + + return phase; +} + +/* 80C323D0-80C324B0 0009D0 00E0+00 1/1 0/0 0/0 .text CreateHeap__12daObj_Kago_cFv */ +int daObj_Kago_c::CreateHeap() { + J3DModelData* modelData; + if (mType == 2 || mType == 3) { + modelData = (J3DModelData*)dComIfG_getObjectRes(l_resNameList[l_bmdData[1][1]], l_bmdData[1][0]); + } else { + modelData = (J3DModelData*)dComIfG_getObjectRes(l_resNameList[l_bmdData[0][1]], l_bmdData[0][0]); + } + + if (modelData == NULL) { + return 0; + } + + field_0x574 = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (field_0x574 == NULL) { + return 0; + } + + return 1; +} + +/* 80C324B0-80C324E4 000AB0 0034+00 1/1 0/0 0/0 .text Delete__12daObj_Kago_cFv */ +int daObj_Kago_c::Delete() { + // NONMATCHING + fopAcM_GetID(this); + this->~daObj_Kago_c(); + return 1; +} + +/* 80C324E4-80C332D0 000AE4 0DEC+00 2/2 0/0 0/0 .text Execute__12daObj_Kago_cFv */ +int daObj_Kago_c::Execute() { + // NONMATCHING + int iVar4; + int iVar1 = 0; + f32 fVar1 = daObj_Kago_Param_c::m.field_0x28; + s16 sVar1 = 0; + s16 sVar2 = 0; + + scale.set(daObj_Kago_Param_c::m.field_0x08 * field_0xb0c, daObj_Kago_Param_c::m.field_0x08 * field_0xb0c, daObj_Kago_Param_c::m.field_0x08 * field_0xb0c); + attention_info.flags = 0; + fopAcM_OffCarryType(this, fopAcM_CARRY_CHICKEN); + attention_info.distances[4] = 13; + + if (mType == 0) { + mStts.SetWeight(daObj_Kago_Param_c::m.mWeight); + mAcchCir.SetWall(daObj_Kago_Param_c::m.mWallH, 50.0f); + } else { + mStts.SetWeight(0xFF); + mAcchCir.SetWall(daObj_Kago_Param_c::m.mWallH, daObj_Kago_Param_c::m.mWallR); + } + + gravity = daObj_Kago_Param_c::m.mGravity; + iVar1 = 0; + if ((fopAcM_checkCarryNow(this) != 0 || fopAcM_checkHawkCarryNow(this) != 0) || field_0xba2 != 0) { + iVar1 = 1; + } + + field_0xb9f = isDelete(); + + if (iVar1 != 0) { + if (mType == 0) { + daObj_Kago_c* basket_p = NULL; + fopAcM_SearchByID(daPy_getPlayerActorClass()->getGrabActorID(), (fopAc_ac_c**)basket_p); + if (basket_p == this) { + daNpcT_onTmpBit(23); + } else { + cLib_onBit(attention_info.flags, 0x10UL); + fopAcM_OnCarryType(this, fopAcM_CARRY_CHICKEN); + } + } + + cLib_addCalcAngleS2(&field_0xb74, 0x4000, 4, 0x2000); + mObjAcch.ClrWallHit(); + mObjAcch.ClrGroundHit(); + mObjAcch.SetWallNone(); + mObjAcch.SetGrndNone(); + mGroundH = 0.0f; + mStts.SetWeight(0); + speed.setall(0.0f); + speedF = 0.0f; + field_0xb14.setall(0.0f); + field_0xb2c.setall(0); + gravity = 0.0f; + field_0xb9c = 0; + field_0xb9d = 0; + field_0xb9e = 0; + field_0xba1 = 0; + } else { + if (mType == 0) { + daNpcT_offTmpBit(23); + } + + mObjAcch.ClrWallNone(); + mObjAcch.ClrGrndNone(); + + if (field_0xba0 != 0 && cM3d_IsZero(speedF) == 0) { + popup(daObj_Kago_Param_c::m.field_0x20, daObj_Kago_Param_c::m.field_0x24, NULL); + if (fopAcM_carryOffRevise(this) != 0) { + speed.setall(0.0f); + } + } else { + int iVar3 = 0; + cXyz sp80; + fopAcM_getWaterY(¤t.pos, &mWaterY); + if (mWaterY != -1000000000.0f && fVar1 < (mWaterY - mGroundH) && current.pos.y <= mWaterY) { + if (field_0xb9d == 0) { + speedF *= 0.3f; + speed.y *= 0.5f; + field_0xb9c = 0; + field_0xb9d = 1; + + if ((field_0xb9e != 0 || field_0xba1 != 0) || field_0xba0 != 0) { + setWaterPrtcl(); + iVar3 = 1; + + if ((field_0xb9e != 0 || field_0xba1 != 0) && speed.y < 0.0f) { + field_0xb64 = 3000.0f; + } + } + + field_0xb9e = 0; + field_0xba1 = 0; + } + + if (fopAcM_getWaterStream(¤t.pos, field_0x7cc, &sp80, &iVar4, 0) != 0) { + sp80.normalizeZP(); + cLib_addCalcAngleS2(¤t.angle.y, cM_atan2s(sp80.x, sp80.z), 4, 0x200); + if (iVar3 != 0) { + current.angle.y = cM_atan2s(sp80.x, sp80.z); + } + + int iVar5; + s16 sVar3 = iVar4 * 0x80; + if (field_0xb2c.y < 0) { + iVar5 = -sVar3; + } else { + iVar5 = sVar3; + } + cLib_chaseAngleS(&field_0xb2c.y, iVar5, 16); + + if (field_0xb9c != 0) { + cLib_addCalc2(&speedF, iVar4 * 0.75f, 0.15f, 1.0f); + } else { + cLib_addCalc2(&speedF, iVar4 * 1.55f, 0.15f, 1.0f); + } + } else { + cLib_chaseF(&speedF, 0.0f, 0.3f); + } + + if (field_0xb48 == 0 && mObjAcch.ChkWallHit() != 0) { + if (getWallAngle(current.angle.y, &sVar2) == 0) { + current.angle.y = sVar2; + current.angle.y += (s16)cM_rndFX(2000.0f); + } else { + current.angle.y += (s16)cM_rndFX(2000.0f); + current.angle.y += -0x8000; + } + + field_0xb2c.y = -field_0xb2c.y / 2; + field_0xb48 = 10; + } + + if (field_0xb9c != 0) { + cLib_addCalc2(¤t.pos.y, mWaterY - fVar1, 0.5f, 2.0f); + speed.y = 0.0f; + setHamonPrtcl(); + } else { + if ((current.pos.y + fVar1) < mWaterY) { + if (speed.y < 0.0f) { + cLib_addCalc(&speed.y, 2.0f, 0.8f, 11.0f, 0.1f); + } else { + cLib_addCalc(&speed.y, 2.0f, 0.5f, 0.5f, 0.1f); + } + + field_0xb2c.y = 0x100; + mObjAcch.ClrGroundHit(); + field_0xb9c= 1; + } + } + + gravity = 0.0f; + } + } + + if (field_0xb9c != 0) { + if (mObjAcch.ChkGroundHit()) { + field_0xb9c = 0; + field_0xb9d = 0; + field_0xb2c.setall(0); + speedF = 0.0f; + speed.setall(0.0f); + } + } else if (field_0xb9d == 0) { + if (field_0xb9e != 0) { + if (mObjAcch.ChkWallHit() != 0) { + if (getWallAngle(current.angle.y, &sVar2) != 0) { + sVar1 = current.angle.y - sVar2; + } else { + sVar1 = current.angle.y; + } + + current.angle.y += (0x8000 - (sVar1 << 1) + (s16)cM_rndFX(1000.0f)); + speedF *= 0.5f; + field_0xb9e = 0; + field_0xba1 = 0; + } else if (mObjAcch.ChkGroundHit()) { + if (field_0xb14.y < -30.0f) { + speedF *= 0.7f; + speed.y = field_0xb14.y * -0.4f; + setSmokePrtcl(); + } else { + speedF = 0.0f; + speed.setall(0.0f); + field_0xb9e = 0; + } + } + } else if (field_0xba1 != 0) { + if (mObjAcch.ChkGroundHit()) { + if (field_0xb14.y < -30.0f) { + speedF *= 0.7f; + speed.y = field_0xb14.y * -0.4f; + setSmokePrtcl(); + } else { + speedF = 0.0f; + speed.setall(0.0f); + field_0xba1 = 0; + } + } + } else if (field_0xba0 == 0 && !mObjAcch.ChkGroundHit()) { + field_0xb68 = mGroundH - current.pos.y; + field_0xba1 = 1; + } + } + + if (mType == 0 && field_0xb9f == 0 && field_0xb9e == 0 && field_0xba1 == 0) { + cLib_onBit(attention_info.flags, 0x10UL); + fopAcM_OnCarryType(this, fopAcM_CARRY_CHICKEN); + } + + field_0xb14 = speed; + + if (field_0xb9d != 0) { + f32 fVar2; + if (mStts.GetCCMoveP() != NULL) { + fVar2 = 900.0f; + } else { + fVar2 = 1200.0f; + } + cLib_addCalc2(&field_0xb64, fVar2, 0.05f, 100.0f); + } else { + cLib_addCalc2(&field_0xb64, 0.0f, 0.25f, 100.0f); + } + + shape_angle.x = field_0xb64 * cM_ssin(field_0xb6c * 1000); + shape_angle.z = field_0xb64 * cM_scos(field_0xb6c * 1000); + cLib_chaseAngleS(&field_0xb2c.y, 0, 10); + shape_angle.y += field_0xb2c.y; + field_0xb6c++; + + if (field_0xb9c != 0) { + fVar1 = JMAFastSqrt(mStts.GetCCMoveP()->x * mStts.GetCCMoveP()->x + mStts.GetCCMoveP()->z * mStts.GetCCMoveP()->z); + if (1.0f < fVar1) { + fopAc_ac_c* actor_p = NULL; + for (int i = 0; i < 2; i++) { + if (field_0x808[i].ChkCoHit() != 0) { + actor_p = field_0x808[i].GetCoHitAc(); + if (actor_p != NULL && fopAcM_GetName(actor_p) == PROC_ALINK) break; + actor_p = NULL; + } + } + + if (actor_p != NULL) { + field_0xb76 = actor_p->current.angle.y; + } else { + field_0xb76 = cM_atan2s(mStts.GetCCMoveP()->x, mStts.GetCCMoveP()->z); + } + + if (actor_p != NULL || field_0xb4c == 0) { + if (fVar1 < 30.0f) { + fVar1 = 30.0f; + } else if (fVar1 < 0.0f) { + fVar1 = 0.0f; + } + + field_0xb50 = fVar1; + field_0xb2c.y = 0x200; + field_0xb4c = 10; + } + } + } else { + field_0xb50 = 0; + } + + cLib_addCalc2(&field_0xb50, 0.0f, 0.33f, 100.0f); + fopAcM_calcSpeed(this); + + if (field_0xb9c != 0) { + field_0xb20.x = field_0xb50 * cM_ssin(field_0xb76); + field_0xb20.z = field_0xb50 * cM_scos(field_0xb76); + field_0xb20.y = 0.0f; + speed += field_0xb20; + fopAcM_posMove(this, NULL); + } else { + fopAcM_posMove(this, mStts.GetCCMoveP()); + } + + mObjAcch.CrrPos(dComIfG_Bgsp()); + field_0x7cc = mObjAcch.m_gnd; + mGroundH = mObjAcch.GetGroundH(); + if (mGroundH != -1000000000.0f) { + field_0xb6e = daNpcF_getGroundAngle(&field_0x7cc, shape_angle.y); + setEnvTevColor(); + setRoomNo(); + } + } + + attention_info.position = current.pos; + eyePos = current.pos; + + if (field_0xba2 == 0) { + setMtx(); + } + + if (field_0xb9f == 0) { + if (mType == 0 || mType == 1) { + cXyz sp8c, sp98; + sp8c.set(-14.0f, 0.0f, 0.0f); + mDoMtx_stack_c::copy(field_0x574->getBaseTRMtx()); + mDoMtx_stack_c::multVec(&sp8c, &sp98); + field_0x808[0].SetR(30.0f); + field_0x808[0].SetH(30.0f); + field_0x808[0].SetC(sp98); + dComIfG_Ccsp()->Set(&field_0x808[0]); + + sp8c.set(24.0f, 0.0f, 0.0f); + mDoMtx_stack_c::multVec(&sp8c, &sp98); + field_0x808[1].SetR(30.0f); + field_0x808[1].SetH(30.0f); + field_0x808[1].SetC(sp98); + dComIfG_Ccsp()->Set(&field_0x808[1]); + } else { + field_0x808[0].ClrCoHit(); + field_0x808[0].SetR(daObj_Kago_Param_c::m.mWallR); + field_0x808[0].SetH(daObj_Kago_Param_c::m.field_0x14); + field_0x808[0].SetC(current.pos); + dComIfG_Ccsp()->Set(&field_0x808[0]); + } + } + + field_0x808[0].ClrCoHit(); + field_0x808[1].ClrCoHit(); + field_0xba0 = ((-iVar1 >> 24) | (iVar1 >> 24)) >> 7; + cLib_calcTimer(&field_0xb48); + cLib_calcTimer(&field_0xb4c); + field_0xba2 = 0; + + return 1; +} + +/* 80C332D0-80C333F0 0018D0 0120+00 1/1 0/0 0/0 .text Draw__12daObj_Kago_cFv */ +int daObj_Kago_c::Draw() { + // NONMATCHING + if(field_0xb9f == 0 && health != 3) { + g_env_light.settingTevStruct(0, ¤t.pos, &tevStr); + g_env_light.setLightTevColorType_MAJI(field_0x574, &tevStr); + mDoExt_modelUpdateDL(field_0x574); + + fopAc_ac_c* basket_p = NULL; + fopAcM_SearchByID(daPy_getPlayerActorClass()->getGrabActorID(), &basket_p); + if (this == basket_p) { + model = field_0x574; + } else if (mGroundH != -1000000000.0f) { + field_0xb78 = dComIfGd_setShadow(field_0xb78, 1, field_0x574, ¤t.pos, daObj_Kago_Param_c::m.field_0x0c, mGroundH, + 20.0f, current.pos.y, field_0x7cc, &tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex()); + } + } + + return 1; +} + +/* 80C333F0-80C33410 0019F0 0020+00 1/1 0/0 0/0 .text createHeapCallBack__12daObj_Kago_cFP10fopAc_ac_c */ +int daObj_Kago_c::createHeapCallBack(fopAc_ac_c* actor) { + daObj_Kago_c* i_this = (daObj_Kago_c*)actor; + return i_this->CreateHeap(); +} + +/* 80C33410-80C334B4 001A10 00A4+00 2/2 0/0 0/0 .text isDelete__12daObj_Kago_cFv */ +BOOL daObj_Kago_c::isDelete() { + u8 rv; + switch (mType) { + case 0: + rv = 0; + if (daNpcT_chkEvtBit(0x1E) || daNpcT_chkEvtBit(0x92)) { + rv = 1; + } + + return rv; + + case 1: + case 2: + case 3: + rv = 0; + if (!daNpcT_chkEvtBit(0x1E) && !daNpcT_chkEvtBit(0x92)) { + rv = 1; + } + + return rv; + + default: + return FALSE; + } +} + +/* 80C334B4-80C33510 001AB4 005C+00 2/2 0/0 0/0 .text setEnvTevColor__12daObj_Kago_cFv */ +void daObj_Kago_c::setEnvTevColor() { + tevStr.YukaCol = dComIfG_Bgsp().GetPolyColor(field_0x7cc); + tevStr.room_no = dComIfG_Bgsp().GetRoomId(field_0x7cc); +} + +/* 80C33510-80C33554 001B10 0044+00 2/2 0/0 0/0 .text setRoomNo__12daObj_Kago_cFv */ +void daObj_Kago_c::setRoomNo() { + int room_id = dComIfG_Bgsp().GetRoomId(field_0x7cc); + fopAcM_SetRoomNo(this, room_id); + mStts.SetRoomId(room_id); +} + +/* 80C33554-80C3359C 001B54 0048+00 1/1 0/0 0/0 .text reset__12daObj_Kago_cFv */ +void daObj_Kago_c::reset() { + memset(&field_0xb14, 0, (u8*)&field_0xba3 - (u8*)&field_0xb14); + field_0xb0c = 1.0f; +} + +/* 80C3359C-80C33620 001B9C 0084+00 1/1 0/0 0/0 .text setMtx__12daObj_Kago_cFv */ +void daObj_Kago_c::setMtx() { + csXyz acStack_18(shape_angle); + acStack_18.y += field_0xb74; + mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z); + mDoMtx_stack_c::ZXYrotM(acStack_18); + mDoMtx_stack_c::scaleM(scale); + field_0x574->setBaseTRMtx(mDoMtx_stack_c::get()); +} + +/* 80C33620-80C337B0 001C20 0190+00 1/1 0/0 0/0 .text getWallAngle__12daObj_Kago_cFsPs */ +int daObj_Kago_c::getWallAngle(s16 param_1, s16* param_2) { + cXyz sp40[2]; + cXyz sp50, sp5c; + mDoMtx_stack_c::YrotS(param_1); + sp5c.set(0.0f, 0.0f, -50.0f); + mDoMtx_stack_c::multVec(&sp5c, &sp50); + sp50 += current.pos; + sp5c.set(5.0f, 0.0f, 200.0f); + + int i = 0; + for (; i < 2; i++) { + mDoMtx_stack_c::multVec(&sp5c, &sp40[i]); + sp5c.x = sp5c.x * -1.0f; + sp40[i] += sp50; + field_0xa9c.Set(&sp50, &sp40[i], this); + if (dComIfG_Bgsp().LineCross(&field_0xa9c)) { + sp40[i] = field_0xa9c.GetCross(); + } else { + return 0; + } + } + + sp5c = sp40[1] - sp40[0]; + *param_2 = cM_atan2s(sp5c.x, sp5c.z) + 0x4000; + return 1; +} + +UNK_REL_BSS; + +/* 80C33F4C-80C33F50 000054 0004+00 1/1 0/0 0/0 .bss l_HIO */ +static daObj_Kago_Param_c l_HIO; + +/* 80C337B0-80C338D0 001DB0 0120+00 1/1 0/0 0/0 .text setGoalPosAndAngle__12daObj_Kago_cFv */ +void daObj_Kago_c::setGoalPosAndAngle() { + static cXyz pos(1593.0f, 659.0f, -334.0f); + static s16 angle = 0x471C; + + home.angle.y = angle; + current.angle = home.angle; + shape_angle = current.angle; + old.angle = current.angle; + current.pos = pos; + old.pos = current.pos; +} + +/* 80C338D0-80C33958 001ED0 0088+00 1/1 0/0 0/0 .text setSmokePrtcl__12daObj_Kago_cFv */ +void daObj_Kago_c::setSmokePrtcl() { + if (field_0xb9f == 0) { + fopAcM_effSmokeSet1(&field_0xb94, &field_0xb98, ¤t.pos, NULL, 0.7f, &tevStr, 1); + dComIfGp_particle_levelEmitterOnEventMove(field_0xb94); + dComIfGp_particle_levelEmitterOnEventMove(field_0xb98); + } +} + +/* 80C33958-80C33A58 001F58 0100+00 1/1 0/0 0/0 .text setWaterPrtcl__12daObj_Kago_cFv */ +void daObj_Kago_c::setWaterPrtcl() { + // NONMATCHING + static u16 emttrId[4] = { + 0x01B8, 0x01B9, 0x01BA, 0x01BB, + }; + + if (field_0xb9f == 0) { + cXyz sp1c(1.0f, 1.0f, 1.0f); + cXyz sp28(current.pos.x, mWaterY, current.pos.z); + + for (int i = 0; i < 4; i++) { + mWaterPrtcls[i] = dComIfGp_particle_set(mWaterPrtcls[i], emttrId[i], &sp28, &tevStr, 0, &sp1c, 0xFF, 0, -1, NULL, NULL, NULL); + dComIfGp_particle_levelEmitterOnEventMove(mWaterPrtcls[i]); + } + } +} + +/* 80C33A58-80C33AB4 002058 005C+00 1/1 0/0 0/0 .text setHamonPrtcl__12daObj_Kago_cFv */ +void daObj_Kago_c::setHamonPrtcl() { + if (field_0xb9f == 0) { + cXyz sp18(current.pos.x, mWaterY, current.pos.z); + fopAcM_effHamonSet(&mHamonPrtcl, &sp18, 1.0f, 0.05f); + } +} + +/* 80C33AB4-80C33AD4 0020B4 0020+00 1/0 0/0 0/0 .text daObj_Kago_Create__FPv */ +static int daObj_Kago_Create(void* param_1) { + daObj_Kago_c* i_this = (daObj_Kago_c*)param_1; + return i_this->create(); +} + +/* 80C33AD4-80C33AF4 0020D4 0020+00 1/0 0/0 0/0 .text daObj_Kago_Delete__FPv */ +static int daObj_Kago_Delete(void* param_1) { + daObj_Kago_c* i_this = (daObj_Kago_c*)param_1; + return i_this->Delete(); +} + +/* 80C33AF4-80C33B14 0020F4 0020+00 1/0 0/0 0/0 .text daObj_Kago_Execute__FPv */ +static int daObj_Kago_Execute(void* param_1) { + daObj_Kago_c* i_this = (daObj_Kago_c*)param_1; + return i_this->Execute(); +} + +/* 80C33B14-80C33B34 002114 0020+00 1/0 0/0 0/0 .text daObj_Kago_Draw__FPv */ +static int daObj_Kago_Draw(void* param_1) { + daObj_Kago_c* i_this = (daObj_Kago_c*)param_1; + return i_this->Draw(); +} + +/* 80C33B34-80C33B3C 002134 0008+00 1/0 0/0 0/0 .text daObj_Kago_IsDelete__FPv */ +static int daObj_Kago_IsDelete(void* param_1) { + return 1; +} + +AUDIO_INSTANCES; + +/* 80C33D94-80C33D94 000114 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ + /* 80C33E24-80C33E44 -00001 0020+00 1/0 0/0 0/0 .data daObj_Kago_MethodTable */ static actor_method_class daObj_Kago_MethodTable = { - (process_method_func)daObj_Kago_Create__FPv, - (process_method_func)daObj_Kago_Delete__FPv, - (process_method_func)daObj_Kago_Execute__FPv, - (process_method_func)daObj_Kago_IsDelete__FPv, - (process_method_func)daObj_Kago_Draw__FPv, + (process_method_func)daObj_Kago_Create, + (process_method_func)daObj_Kago_Delete, + (process_method_func)daObj_Kago_Execute, + (process_method_func)daObj_Kago_IsDelete, + (process_method_func)daObj_Kago_Draw, }; /* 80C33E44-80C33E74 -00001 0030+00 0/0 0/0 1/0 .data g_profile_OBJ_KAGO */ @@ -236,874 +712,3 @@ extern actor_process_profile_definition g_profile_OBJ_KAGO = { fopAc_ACTOR_e, // mActorType fopAc_CULLBOX_CUSTOM_e, // cullType }; - -/* 80C33E74-80C33E80 0000D4 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGAab */ -SECTION_DATA extern void* __vt__8cM3dGAab[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGAabFv, -}; - -/* 80C33E80-80C33E8C 0000E0 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGCyl */ -SECTION_DATA extern void* __vt__8cM3dGCyl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGCylFv, -}; - -/* 80C33E8C-80C33EB0 0000EC 0024+00 3/3 0/0 0/0 .data __vt__12dBgS_ObjAcch */ -SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_ObjAcchFv, - (void*)NULL, - (void*)NULL, - (void*)func_80C33C64, - (void*)NULL, - (void*)NULL, - (void*)func_80C33C5C, -}; - -/* 80C33EB0-80C33EBC 000110 000C+00 3/3 0/0 0/0 .data __vt__10cCcD_GStts */ -SECTION_DATA extern void* __vt__10cCcD_GStts[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__10cCcD_GSttsFv, -}; - -/* 80C33EBC-80C33EC8 00011C 000C+00 2/2 0/0 0/0 .data __vt__10dCcD_GStts */ -SECTION_DATA extern void* __vt__10dCcD_GStts[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__10dCcD_GSttsFv, -}; - -/* 80C33EC8-80C33ED4 000128 000C+00 2/2 0/0 0/0 .data __vt__12dBgS_AcchCir */ -SECTION_DATA extern void* __vt__12dBgS_AcchCir[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_AcchCirFv, -}; - -/* 80C33ED4-80C33EE0 000134 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGLin */ -SECTION_DATA extern void* __vt__8cM3dGLin[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGLinFv, -}; - -/* 80C33EE0-80C33EEC 000140 000C+00 2/2 0/0 0/0 .data __vt__12daObj_Kago_c */ -SECTION_DATA extern void* __vt__12daObj_Kago_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12daObj_Kago_cFv, -}; - -/* 80C31AEC-80C31C90 0000EC 01A4+00 1/0 0/0 0/0 .text __dt__12daObj_Kago_cFv */ -daObj_Kago_c::~daObj_Kago_c() { - // NONMATCHING -} - -/* 80C31C90-80C31D5C 000290 00CC+00 2/2 0/0 0/0 .text __dt__8dCcD_CylFv */ -// dCcD_Cyl::~dCcD_Cyl() { -extern "C" void __dt__8dCcD_CylFv() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80C33C80-80C33CAC 000000 002C+00 5/5 0/0 0/0 .rodata m__18daObj_Kago_Param_c */ -SECTION_RODATA u8 const daObj_Kago_Param_c::m[44] = { - 0x00, 0x00, 0x00, 0x00, 0xC0, 0xA0, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x43, 0xC8, 0x00, - 0x00, 0x42, 0x92, 0x00, 0x00, 0x41, 0xF0, 0x00, 0x00, 0x41, 0xC0, 0x00, 0x00, 0x41, 0xF0, - 0x00, 0x00, 0x41, 0xF0, 0x00, 0x00, 0x42, 0x5C, 0x00, 0x00, 0x41, 0x20, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80C33C80, &daObj_Kago_Param_c::m); - -/* 80C33CAC-80C33CDC 00002C 0030+00 0/0 0/0 0/0 .rodata l_ccDObjData */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const l_ccDObjData[48] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80C33CAC, &l_ccDObjData); -#pragma pop - -/* 80C33CDC-80C33CF0 00005C 0014+00 0/1 0/0 0/0 .rodata heapSize$3870 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const heapSize[20] = { - 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80C33CDC, &heapSize); -#pragma pop - -/* 80C33CF0-80C33CF4 000070 0004+00 0/1 0/0 0/0 .rodata @3963 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3963 = -100.0f; -COMPILER_STRIP_GATE(0x80C33CF0, &lit_3963); -#pragma pop - -/* 80C33CF4-80C33CF8 000074 0004+00 0/2 0/0 0/0 .rodata @3964 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3964 = -50.0f; -COMPILER_STRIP_GATE(0x80C33CF4, &lit_3964); -#pragma pop - -/* 80C33CF8-80C33CFC 000078 0004+00 0/2 0/0 0/0 .rodata @3965 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3965 = 100.0f; -COMPILER_STRIP_GATE(0x80C33CF8, &lit_3965); -#pragma pop - -/* 80C33CFC-80C33D00 00007C 0004+00 0/3 0/0 0/0 .rodata @3966 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3966 = -1000000000.0f; -COMPILER_STRIP_GATE(0x80C33CFC, &lit_3966); -#pragma pop - -/* 80C31D5C-80C320FC 00035C 03A0+00 1/1 0/0 0/0 .text create__12daObj_Kago_cFv */ -void daObj_Kago_c::create() { - // NONMATCHING -} - -/* 80C320FC-80C32144 0006FC 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGLinFv */ -// cM3dGLin::~cM3dGLin() { -extern "C" void __dt__8cM3dGLinFv() { - // NONMATCHING -} - -/* 80C32144-80C321C8 000744 0084+00 1/1 0/0 0/0 .text __ct__8dCcD_CylFv */ -// dCcD_Cyl::dCcD_Cyl() { -extern "C" void __ct__8dCcD_CylFv() { - // NONMATCHING -} - -/* 80C321C8-80C32210 0007C8 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */ -// cM3dGCyl::~cM3dGCyl() { -extern "C" void __dt__8cM3dGCylFv() { - // NONMATCHING -} - -/* 80C32210-80C32258 000810 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ -// cM3dGAab::~cM3dGAab() { -extern "C" void __dt__8cM3dGAabFv() { - // NONMATCHING -} - -/* 80C32258-80C322C8 000858 0070+00 1/0 0/0 0/0 .text __dt__12dBgS_AcchCirFv */ -// dBgS_AcchCir::~dBgS_AcchCir() { -extern "C" void __dt__12dBgS_AcchCirFv() { - // NONMATCHING -} - -/* 80C322C8-80C32324 0008C8 005C+00 1/0 0/0 0/0 .text __dt__10dCcD_GSttsFv */ -// dCcD_GStts::~dCcD_GStts() { -extern "C" void __dt__10dCcD_GSttsFv() { - // NONMATCHING -} - -/* 80C32324-80C32360 000924 003C+00 1/1 0/0 0/0 .text __dt__4cXyzFv */ -// cXyz::~cXyz() { -extern "C" void __dt__4cXyzFv() { - // NONMATCHING -} - -/* 80C32360-80C323D0 000960 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING -} - -/* 80C323D0-80C324B0 0009D0 00E0+00 1/1 0/0 0/0 .text CreateHeap__12daObj_Kago_cFv */ -void daObj_Kago_c::CreateHeap() { - // NONMATCHING -} - -/* 80C324B0-80C324E4 000AB0 0034+00 1/1 0/0 0/0 .text Delete__12daObj_Kago_cFv */ -void daObj_Kago_c::Delete() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80C33D00-80C33D04 000080 0004+00 0/1 0/0 0/0 .rodata @4523 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4523 = 50.0f; -COMPILER_STRIP_GATE(0x80C33D00, &lit_4523); -#pragma pop - -/* 80C33D04-80C33D08 000084 0004+00 0/2 0/0 0/0 .rodata @4524 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4524[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80C33D04, &lit_4524); -#pragma pop - -/* 80C33D08-80C33D0C 000088 0004+00 0/1 0/0 0/0 .rodata @4525 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u32 const lit_4525 = 0x43360B61; -COMPILER_STRIP_GATE(0x80C33D08, &lit_4525); -#pragma pop - -/* 80C33D0C-80C33D10 00008C 0004+00 0/1 0/0 0/0 .rodata @4526 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4526 = 3.0f / 10.0f; -COMPILER_STRIP_GATE(0x80C33D0C, &lit_4526); -#pragma pop - -/* 80C33D10-80C33D14 000090 0004+00 0/1 0/0 0/0 .rodata @4527 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4527 = 0.5f; -COMPILER_STRIP_GATE(0x80C33D10, &lit_4527); -#pragma pop - -/* 80C33D14-80C33D18 000094 0004+00 0/1 0/0 0/0 .rodata @4528 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4528 = 3000.0f; -COMPILER_STRIP_GATE(0x80C33D14, &lit_4528); -#pragma pop - -/* 80C33D18-80C33D1C 000098 0004+00 0/1 0/0 0/0 .rodata @4529 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4529 = 31.0f / 20.0f; -COMPILER_STRIP_GATE(0x80C33D18, &lit_4529); -#pragma pop - -/* 80C33D1C-80C33D20 00009C 0004+00 0/1 0/0 0/0 .rodata @4530 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4530 = 3.0f / 20.0f; -COMPILER_STRIP_GATE(0x80C33D1C, &lit_4530); -#pragma pop - -/* 80C33D20-80C33D24 0000A0 0004+00 3/5 0/0 0/0 .rodata @4531 */ -SECTION_RODATA static f32 const lit_4531 = 1.0f; -COMPILER_STRIP_GATE(0x80C33D20, &lit_4531); - -/* 80C33D24-80C33D28 0000A4 0004+00 0/1 0/0 0/0 .rodata @4532 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4532 = 0.75f; -COMPILER_STRIP_GATE(0x80C33D24, &lit_4532); -#pragma pop - -/* 80C33D28-80C33D2C 0000A8 0004+00 0/1 0/0 0/0 .rodata @4533 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4533 = 2000.0f; -COMPILER_STRIP_GATE(0x80C33D28, &lit_4533); -#pragma pop - -/* 80C33D2C-80C33D30 0000AC 0004+00 0/1 0/0 0/0 .rodata @4534 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4534 = 2.0f; -COMPILER_STRIP_GATE(0x80C33D2C, &lit_4534); -#pragma pop - -/* 80C33D30-80C33D34 0000B0 0004+00 0/1 0/0 0/0 .rodata @4535 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4535 = 4.0f / 5.0f; -COMPILER_STRIP_GATE(0x80C33D30, &lit_4535); -#pragma pop - -/* 80C33D34-80C33D38 0000B4 0004+00 0/1 0/0 0/0 .rodata @4536 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4536 = 11.0f; -COMPILER_STRIP_GATE(0x80C33D34, &lit_4536); -#pragma pop - -/* 80C33D38-80C33D3C 0000B8 0004+00 0/1 0/0 0/0 .rodata @4537 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4537 = 1.0f / 10.0f; -COMPILER_STRIP_GATE(0x80C33D38, &lit_4537); -#pragma pop - -/* 80C33D3C-80C33D40 0000BC 0004+00 0/1 0/0 0/0 .rodata @4538 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4538 = 1000.0f; -COMPILER_STRIP_GATE(0x80C33D3C, &lit_4538); -#pragma pop - -/* 80C33D40-80C33D44 0000C0 0004+00 0/1 0/0 0/0 .rodata @4539 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4539 = -30.0f; -COMPILER_STRIP_GATE(0x80C33D40, &lit_4539); -#pragma pop - -/* 80C33D44-80C33D48 0000C4 0004+00 1/2 0/0 0/0 .rodata @4540 */ -SECTION_RODATA static f32 const lit_4540 = 7.0f / 10.0f; -COMPILER_STRIP_GATE(0x80C33D44, &lit_4540); - -/* 80C33D48-80C33D4C 0000C8 0004+00 0/1 0/0 0/0 .rodata @4541 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4541 = -2.0f / 5.0f; -COMPILER_STRIP_GATE(0x80C33D48, &lit_4541); -#pragma pop - -/* 80C33D4C-80C33D50 0000CC 0004+00 0/1 0/0 0/0 .rodata @4542 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4542 = 1200.0f; -COMPILER_STRIP_GATE(0x80C33D4C, &lit_4542); -#pragma pop - -/* 80C33D50-80C33D54 0000D0 0004+00 0/1 0/0 0/0 .rodata @4543 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4543 = 900.0f; -COMPILER_STRIP_GATE(0x80C33D50, &lit_4543); -#pragma pop - -/* 80C33D54-80C33D58 0000D4 0004+00 1/2 0/0 0/0 .rodata @4544 */ -SECTION_RODATA static f32 const lit_4544 = 1.0f / 20.0f; -COMPILER_STRIP_GATE(0x80C33D54, &lit_4544); - -/* 80C33D58-80C33D5C 0000D8 0004+00 0/1 0/0 0/0 .rodata @4545 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4545 = 0.25f; -COMPILER_STRIP_GATE(0x80C33D58, &lit_4545); -#pragma pop - -/* 80C33D5C-80C33D60 0000DC 0004+00 0/1 0/0 0/0 .rodata @4546 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4546 = 30.0f; -COMPILER_STRIP_GATE(0x80C33D5C, &lit_4546); -#pragma pop - -/* 80C33D60-80C33D64 0000E0 0004+00 0/1 0/0 0/0 .rodata @4547 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4547 = 33.0f / 100.0f; -COMPILER_STRIP_GATE(0x80C33D60, &lit_4547); -#pragma pop - -/* 80C33D64-80C33D68 0000E4 0004+00 0/1 0/0 0/0 .rodata @4548 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4548 = -14.0f; -COMPILER_STRIP_GATE(0x80C33D64, &lit_4548); -#pragma pop - -/* 80C33D68-80C33D70 0000E8 0004+04 0/1 0/0 0/0 .rodata @4549 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4549[1 + 1 /* padding */] = { - 24.0f, - /* padding */ - 0.0f, -}; -COMPILER_STRIP_GATE(0x80C33D68, &lit_4549); -#pragma pop - -/* 80C33D70-80C33D78 0000F0 0008+00 0/1 0/0 0/0 .rodata @4551 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4551[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80C33D70, &lit_4551); -#pragma pop - -/* 80C324E4-80C332D0 000AE4 0DEC+00 2/2 0/0 0/0 .text Execute__12daObj_Kago_cFv */ -void daObj_Kago_c::Execute() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80C33D78-80C33D7C 0000F8 0004+00 0/1 0/0 0/0 .rodata @4576 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4576 = 20.0f; -COMPILER_STRIP_GATE(0x80C33D78, &lit_4576); -#pragma pop - -/* 80C332D0-80C333F0 0018D0 0120+00 1/1 0/0 0/0 .text Draw__12daObj_Kago_cFv */ -void daObj_Kago_c::Draw() { - // NONMATCHING -} - -/* 80C333F0-80C33410 0019F0 0020+00 1/1 0/0 0/0 .text - * createHeapCallBack__12daObj_Kago_cFP10fopAc_ac_c */ -void daObj_Kago_c::createHeapCallBack(fopAc_ac_c* param_0) { - // NONMATCHING -} - -/* 80C33410-80C334B4 001A10 00A4+00 2/2 0/0 0/0 .text isDelete__12daObj_Kago_cFv */ -void daObj_Kago_c::isDelete() { - // NONMATCHING -} - -/* 80C334B4-80C33510 001AB4 005C+00 2/2 0/0 0/0 .text setEnvTevColor__12daObj_Kago_cFv */ -void daObj_Kago_c::setEnvTevColor() { - // NONMATCHING -} - -/* 80C33510-80C33554 001B10 0044+00 2/2 0/0 0/0 .text setRoomNo__12daObj_Kago_cFv */ -void daObj_Kago_c::setRoomNo() { - // NONMATCHING -} - -/* 80C33554-80C3359C 001B54 0048+00 1/1 0/0 0/0 .text reset__12daObj_Kago_cFv */ -void daObj_Kago_c::reset() { - // NONMATCHING -} - -/* 80C3359C-80C33620 001B9C 0084+00 1/1 0/0 0/0 .text setMtx__12daObj_Kago_cFv */ -void daObj_Kago_c::setMtx() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80C33D7C-80C33D80 0000FC 0004+00 0/1 0/0 0/0 .rodata @4679 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4679 = 5.0f; -COMPILER_STRIP_GATE(0x80C33D7C, &lit_4679); -#pragma pop - -/* 80C33D80-80C33D84 000100 0004+00 0/1 0/0 0/0 .rodata @4680 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4680 = 200.0f; -COMPILER_STRIP_GATE(0x80C33D80, &lit_4680); -#pragma pop - -/* 80C33D84-80C33D88 000104 0004+00 0/1 0/0 0/0 .rodata @4681 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4681 = -1.0f; -COMPILER_STRIP_GATE(0x80C33D84, &lit_4681); -#pragma pop - -/* 80C33620-80C337B0 001C20 0190+00 1/1 0/0 0/0 .text getWallAngle__12daObj_Kago_cFsPs */ -void daObj_Kago_c::getWallAngle(s16 param_0, s16* param_1) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80C33D88-80C33D8C 000108 0004+00 0/1 0/0 0/0 .rodata @4706 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4706 = 1593.0f; -COMPILER_STRIP_GATE(0x80C33D88, &lit_4706); -#pragma pop - -/* 80C33D8C-80C33D90 00010C 0004+00 0/1 0/0 0/0 .rodata @4707 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4707 = 659.0f; -COMPILER_STRIP_GATE(0x80C33D8C, &lit_4707); -#pragma pop - -/* 80C33D90-80C33D94 000110 0004+00 0/1 0/0 0/0 .rodata @4708 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4708 = -334.0f; -COMPILER_STRIP_GATE(0x80C33D90, &lit_4708); -#pragma pop - -/* 80C33F00-80C33F04 000008 0001+03 1/1 0/0 0/0 .bss @1109 */ -static u8 lit_1109[1 + 3 /* padding */]; - -/* 80C33F04-80C33F08 00000C 0001+03 0/0 0/0 0/0 .bss @1107 */ -#pragma push -#pragma force_active on -static u8 lit_1107[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F08-80C33F0C 000010 0001+03 0/0 0/0 0/0 .bss @1105 */ -#pragma push -#pragma force_active on -static u8 lit_1105[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F0C-80C33F10 000014 0001+03 0/0 0/0 0/0 .bss @1104 */ -#pragma push -#pragma force_active on -static u8 lit_1104[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F10-80C33F14 000018 0001+03 0/0 0/0 0/0 .bss @1099 */ -#pragma push -#pragma force_active on -static u8 lit_1099[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F14-80C33F18 00001C 0001+03 0/0 0/0 0/0 .bss @1097 */ -#pragma push -#pragma force_active on -static u8 lit_1097[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F18-80C33F1C 000020 0001+03 0/0 0/0 0/0 .bss @1095 */ -#pragma push -#pragma force_active on -static u8 lit_1095[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F1C-80C33F20 000024 0001+03 0/0 0/0 0/0 .bss @1094 */ -#pragma push -#pragma force_active on -static u8 lit_1094[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F20-80C33F24 000028 0001+03 0/0 0/0 0/0 .bss @1057 */ -#pragma push -#pragma force_active on -static u8 lit_1057[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F24-80C33F28 00002C 0001+03 0/0 0/0 0/0 .bss @1055 */ -#pragma push -#pragma force_active on -static u8 lit_1055[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F28-80C33F2C 000030 0001+03 0/0 0/0 0/0 .bss @1053 */ -#pragma push -#pragma force_active on -static u8 lit_1053[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F2C-80C33F30 000034 0001+03 0/0 0/0 0/0 .bss @1052 */ -#pragma push -#pragma force_active on -static u8 lit_1052[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F30-80C33F34 000038 0001+03 0/0 0/0 0/0 .bss @1014 */ -#pragma push -#pragma force_active on -static u8 lit_1014[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F34-80C33F38 00003C 0001+03 0/0 0/0 0/0 .bss @1012 */ -#pragma push -#pragma force_active on -static u8 lit_1012[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F38-80C33F3C 000040 0001+03 0/0 0/0 0/0 .bss @1010 */ -#pragma push -#pragma force_active on -static u8 lit_1010[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F3C-80C33F40 000044 0001+03 0/0 0/0 0/0 .bss @1009 */ -#pragma push -#pragma force_active on -static u8 lit_1009[1 + 3 /* padding */]; -#pragma pop - -/* 80C33F40-80C33F4C 000048 000C+00 1/1 0/0 0/0 .bss @3815 */ -static u8 lit_3815[12]; - -/* 80C33F4C-80C33F50 000054 0004+00 1/1 0/0 0/0 .bss l_HIO */ -static u8 l_HIO[4]; - -/* 80C33F50-80C33F60 000058 000C+04 0/1 0/0 0/0 .bss @4686 */ -#pragma push -#pragma force_active on -static u8 lit_4686[12 + 4 /* padding */]; -#pragma pop - -/* 80C33F60-80C33F6C 000068 000C+00 0/1 0/0 0/0 .bss pos$4685 */ -#pragma push -#pragma force_active on -static u8 pos[12]; -#pragma pop - -/* 80C33F6C-80C33F70 000074 0002+02 0/1 0/0 0/0 .bss angle$4689 */ -#pragma push -#pragma force_active on -static u8 angle[2 + 2 /* padding */]; -#pragma pop - -/* 80C337B0-80C338D0 001DB0 0120+00 1/1 0/0 0/0 .text setGoalPosAndAngle__12daObj_Kago_cFv */ -void daObj_Kago_c::setGoalPosAndAngle() { - // NONMATCHING -} - -/* 80C338D0-80C33958 001ED0 0088+00 1/1 0/0 0/0 .text setSmokePrtcl__12daObj_Kago_cFv */ -void daObj_Kago_c::setSmokePrtcl() { - // NONMATCHING -} - -/* 80C33958-80C33A58 001F58 0100+00 1/1 0/0 0/0 .text setWaterPrtcl__12daObj_Kago_cFv */ -void daObj_Kago_c::setWaterPrtcl() { - // NONMATCHING -} - -/* 80C33A58-80C33AB4 002058 005C+00 1/1 0/0 0/0 .text setHamonPrtcl__12daObj_Kago_cFv */ -void daObj_Kago_c::setHamonPrtcl() { - // NONMATCHING -} - -/* 80C33AB4-80C33AD4 0020B4 0020+00 1/0 0/0 0/0 .text daObj_Kago_Create__FPv */ -static void daObj_Kago_Create(void* param_0) { - // NONMATCHING -} - -/* 80C33AD4-80C33AF4 0020D4 0020+00 1/0 0/0 0/0 .text daObj_Kago_Delete__FPv */ -static void daObj_Kago_Delete(void* param_0) { - // NONMATCHING -} - -/* 80C33AF4-80C33B14 0020F4 0020+00 1/0 0/0 0/0 .text daObj_Kago_Execute__FPv */ -static void daObj_Kago_Execute(void* param_0) { - // NONMATCHING -} - -/* 80C33B14-80C33B34 002114 0020+00 1/0 0/0 0/0 .text daObj_Kago_Draw__FPv */ -static void daObj_Kago_Draw(void* param_0) { - // NONMATCHING -} - -/* 80C33B34-80C33B3C 002134 0008+00 1/0 0/0 0/0 .text daObj_Kago_IsDelete__FPv */ -static bool daObj_Kago_IsDelete(void* param_0) { - return true; -} - -/* 80C33B3C-80C33B84 00213C 0048+00 1/0 0/0 0/0 .text __dt__10cCcD_GSttsFv */ -// cCcD_GStts::~cCcD_GStts() { -extern "C" void __dt__10cCcD_GSttsFv() { - // NONMATCHING -} - -/* 80C33B84-80C33BA0 002184 001C+00 1/1 0/0 0/0 .text cLib_calcTimer__FPi */ -extern "C" void func_80C33B84(void* _this, int* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80C33EEC-80C33EF8 00014C 000C+00 2/2 0/0 0/0 .data __vt__18daObj_Kago_Param_c */ -SECTION_DATA extern void* __vt__18daObj_Kago_Param_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__18daObj_Kago_Param_cFv, -}; - -/* 80C33BA0-80C33C14 0021A0 0074+00 0/0 1/0 0/0 .text __sinit_d_a_obj_kago_cpp */ -void __sinit_d_a_obj_kago_cpp() { - // NONMATCHING -} - -#pragma push -#pragma force_active on -REGISTER_CTORS(0x80C33BA0, __sinit_d_a_obj_kago_cpp); -#pragma pop - -/* 80C33C14-80C33C5C 002214 0048+00 2/1 0/0 0/0 .text __dt__18daObj_Kago_Param_cFv */ -daObj_Kago_Param_c::~daObj_Kago_Param_c() { - // NONMATCHING -} - -/* 80C33C5C-80C33C64 00225C 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -static void func_80C33C5C() { - // NONMATCHING -} - -/* 80C33C64-80C33C6C 002264 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -static void func_80C33C64() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80C33F70-80C33F74 000078 0004+00 0/0 0/0 0/0 .bss - * sInstance__40JASGlobalInstance<19JASDefaultBankTable> */ -#pragma push -#pragma force_active on -static u8 data_80C33F70[4]; -#pragma pop - -/* 80C33F74-80C33F78 00007C 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14JASAudioThread> */ -#pragma push -#pragma force_active on -static u8 data_80C33F74[4]; -#pragma pop - -/* 80C33F78-80C33F7C 000080 0004+00 0/0 0/0 0/0 .bss sInstance__27JASGlobalInstance<7Z2SeMgr> */ -#pragma push -#pragma force_active on -static u8 data_80C33F78[4]; -#pragma pop - -/* 80C33F7C-80C33F80 000084 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8Z2SeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_80C33F7C[4]; -#pragma pop - -/* 80C33F80-80C33F84 000088 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SceneMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80C33F80[4]; -#pragma pop - -/* 80C33F84-80C33F88 00008C 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2StatusMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80C33F84[4]; -#pragma pop - -/* 80C33F88-80C33F8C 000090 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2DebugSys> - */ -#pragma push -#pragma force_active on -static u8 data_80C33F88[4]; -#pragma pop - -/* 80C33F8C-80C33F90 000094 0004+00 0/0 0/0 0/0 .bss - * sInstance__36JASGlobalInstance<15JAISoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_80C33F8C[4]; -#pragma pop - -/* 80C33F90-80C33F94 000098 0004+00 0/0 0/0 0/0 .bss - * sInstance__35JASGlobalInstance<14Z2SoundStarter> */ -#pragma push -#pragma force_active on -static u8 data_80C33F90[4]; -#pragma pop - -/* 80C33F94-80C33F98 00009C 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12Z2SpeechMgr2> */ -#pragma push -#pragma force_active on -static u8 data_80C33F94[4]; -#pragma pop - -/* 80C33F98-80C33F9C 0000A0 0004+00 0/0 0/0 0/0 .bss sInstance__28JASGlobalInstance<8JAISeMgr> */ -#pragma push -#pragma force_active on -static u8 data_80C33F98[4]; -#pragma pop - -/* 80C33F9C-80C33FA0 0000A4 0004+00 0/0 0/0 0/0 .bss sInstance__29JASGlobalInstance<9JAISeqMgr> */ -#pragma push -#pragma force_active on -static u8 data_80C33F9C[4]; -#pragma pop - -/* 80C33FA0-80C33FA4 0000A8 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAIStreamMgr> */ -#pragma push -#pragma force_active on -static u8 data_80C33FA0[4]; -#pragma pop - -/* 80C33FA4-80C33FA8 0000AC 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2SoundMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80C33FA4[4]; -#pragma pop - -/* 80C33FA8-80C33FAC 0000B0 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAISoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_80C33FA8[4]; -#pragma pop - -/* 80C33FAC-80C33FB0 0000B4 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13JAUSoundTable> */ -#pragma push -#pragma force_active on -static u8 data_80C33FAC[4]; -#pragma pop - -/* 80C33FB0-80C33FB4 0000B8 0004+00 0/0 0/0 0/0 .bss - * sInstance__38JASGlobalInstance<17JAUSoundNameTable> */ -#pragma push -#pragma force_active on -static u8 data_80C33FB0[4]; -#pragma pop - -/* 80C33FB4-80C33FB8 0000BC 0004+00 0/0 0/0 0/0 .bss - * sInstance__33JASGlobalInstance<12JAUSoundInfo> */ -#pragma push -#pragma force_active on -static u8 data_80C33FB4[4]; -#pragma pop - -/* 80C33FB8-80C33FBC 0000C0 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SoundInfo> - */ -#pragma push -#pragma force_active on -static u8 data_80C33FB8[4]; -#pragma pop - -/* 80C33FBC-80C33FC0 0000C4 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2SoundObjMgr> */ -#pragma push -#pragma force_active on -static u8 data_80C33FBC[4]; -#pragma pop - -/* 80C33FC0-80C33FC4 0000C8 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2Audience> - */ -#pragma push -#pragma force_active on -static u8 data_80C33FC0[4]; -#pragma pop - -/* 80C33FC4-80C33FC8 0000CC 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2FxLineMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80C33FC4[4]; -#pragma pop - -/* 80C33FC8-80C33FCC 0000D0 0004+00 0/0 0/0 0/0 .bss sInstance__31JASGlobalInstance<10Z2EnvSeMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80C33FC8[4]; -#pragma pop - -/* 80C33FCC-80C33FD0 0000D4 0004+00 0/0 0/0 0/0 .bss sInstance__32JASGlobalInstance<11Z2SpeechMgr> - */ -#pragma push -#pragma force_active on -static u8 data_80C33FCC[4]; -#pragma pop - -/* 80C33FD0-80C33FD4 0000D8 0004+00 0/0 0/0 0/0 .bss - * sInstance__34JASGlobalInstance<13Z2WolfHowlMgr> */ -#pragma push -#pragma force_active on -static u8 data_80C33FD0[4]; -#pragma pop - -/* 80C33D94-80C33D94 000114 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ diff --git a/src/d/actor/d_a_obj_so.cpp b/src/d/actor/d_a_obj_so.cpp index 7f49ac6b17e..32d014392ba 100644 --- a/src/d/actor/d_a_obj_so.cpp +++ b/src/d/actor/d_a_obj_so.cpp @@ -5,208 +5,1101 @@ #include "d/actor/d_a_obj_so.h" #include "d/d_cc_d.h" -#include "dol2asm.h" #include "d/d_camera.h" +#include "d/d_com_inf_game.h" +#include "d/d_bg_w.h" +#include "d/actor/d_a_obj_pillar.h" +#include "d/actor/d_a_player.h" +#include "d/d_cc_uty.h" +/* 80CE03CC-80CE03F0 0000EC 0024+00 1/1 0/0 0/0 .text __ct__14daObj_So_HIO_cFv */ +daObj_So_HIO_c::daObj_So_HIO_c() { + field_0x4 = -1; + mScale = 0.8f; +} +/* 80CE03F0-80CE04FC 000110 010C+00 1/0 0/0 0/0 .text daObj_So_Draw__FP12obj_so_class */ +static int daObj_So_Draw(obj_so_class* i_this) { + fopAc_ac_c* a_this = &i_this->actor; -// -// Forward References: -// + g_env_light.settingTevStruct(16, &a_this->current.pos, &a_this->tevStr); -extern "C" void __ct__14daObj_So_HIO_cFv(); -extern "C" static void daObj_So_Draw__FP12obj_so_class(); -extern "C" static void ride_call_back_0__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c(); -extern "C" static void ride_call_back_1__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c(); -extern "C" static void so_hasira__FP12obj_so_class(); -extern "C" static void part_set__FP12obj_so_classSc(); -extern "C" void __dt__4cXyzFv(); -extern "C" static void so_drop__FP12obj_so_class(); -extern "C" void __dt__5csXyzFv(); -extern "C" static void so_break__FP12obj_so_class(); -extern "C" static void so_hang__FP12obj_so_class(); -extern "C" static void action__FP12obj_so_class(); -extern "C" static void part_move__FP12obj_so_class(); -extern "C" void __dt__14dBgS_ObjGndChkFv(); -extern "C" static void demo_camera__FP12obj_so_class(); -extern "C" static void daObj_So_Execute__FP12obj_so_class(); -extern "C" static bool daObj_So_IsDelete__FP12obj_so_class(); -extern "C" static void daObj_So_Delete__FP12obj_so_class(); -extern "C" static void useHeapInit__FP10fopAc_ac_c(); -extern "C" static void daObj_So_Create__FP10fopAc_ac_c(); -extern "C" void __dt__8dCcD_CylFv(); -extern "C" void __ct__8dCcD_CylFv(); -extern "C" void __dt__8cM3dGCylFv(); -extern "C" void __dt__8cM3dGAabFv(); -extern "C" void __dt__12dBgS_ObjAcchFv(); -extern "C" void __ct__5csXyzFv(); -extern "C" void __ct__4cXyzFv(); -extern "C" void __dt__14daObj_So_HIO_cFv(); -extern "C" void __sinit_d_a_obj_so_cpp(); -extern "C" static void func_80CE39AC(); -extern "C" static void func_80CE39B4(); -extern "C" static void func_80CE39BC(); -extern "C" static void func_80CE39C4(); -extern "C" static void func_80CE39CC(); -extern "C" extern char const* const d_a_obj_so__stringBase0; + if (a_this->health != 0) { + g_env_light.setLightTevColorType_MAJI(i_this->field_0x574, &a_this->tevStr); + mDoExt_modelUpdateDL(i_this->field_0x574); + } -// -// External References: -// + for (int i = 0; i < 26; i++) { + if (i_this->field_0x5fc[i] != 0) { + g_env_light.setLightTevColorType_MAJI(i_this->field_0x594[i], &a_this->tevStr); + mDoExt_modelUpdateDL(i_this->field_0x594[i]); -extern "C" void mDoMtx_XrotM__FPA4_fs(); -extern "C" void mDoMtx_YrotS__FPA4_fs(); -extern "C" void mDoMtx_YrotM__FPA4_fs(); -extern "C" void mDoMtx_ZrotM__FPA4_fs(); -extern "C" void mDoMtx_MtxToRot__FPA4_CfP5csXyz(); -extern "C" void push__14mDoMtx_stack_cFv(); -extern "C" void pop__14mDoMtx_stack_cFv(); -extern "C" void transM__14mDoMtx_stack_cFfff(); -extern "C" void scaleM__14mDoMtx_stack_cFfff(); -extern "C" void mDoExt_modelUpdateDL__FP8J3DModel(); -extern "C" void mDoExt_J3DModel__create__FP12J3DModelDataUlUl(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void fopAcIt_Judge__FPFPvPv_PvPv(); -extern "C" void fopAcM_create__FsUlPC4cXyziPC5csXyzPC4cXyzSc(); -extern "C" void fopAcM_createChild__FsUiUlPC4cXyziPC5csXyzPC4cXyzScPFPv_i(); -extern "C" void fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl(); -extern "C" void fopAcM_SetMin__FP10fopAc_ac_cfff(); -extern "C" void fopAcM_SetMax__FP10fopAc_ac_cfff(); -extern "C" void fopAcM_searchActorDistanceXZ__FPC10fopAc_ac_cPC10fopAc_ac_c(); -extern "C" void fopAcM_orderPotentialEvent__FP10fopAc_ac_cUsUsUs(); -extern "C" void fopAcM_effSmokeSet1__FPUlPUlPC4cXyzPC5csXyzfPC12dKy_tevstr_ci(); -extern "C" void fpcSch_JudgeForPName__FPvPv(); -extern "C" void fpcSch_JudgeByID__FPvPv(); -extern "C" void dComIfG_resLoad__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfG_resDelete__FP30request_of_phase_process_classPCc(); -extern "C" void dComIfGp_getReverb__Fi(); -extern "C" void onSwitch__10dSv_info_cFii(); -extern "C" void isSwitch__10dSv_info_cCFii(); -extern "C" void getRes__14dRes_control_cFPCclP11dRes_info_ci(); -extern "C" void forceOnEventMove__Q213dPa_control_c7level_cFUl(); -extern "C" void -set__13dPa_control_cFUcUsPC4cXyzPC12dKy_tevstr_cPC5csXyzPC4cXyzUcP18dPa_levelEcallBackScPC8_GXColorPC8_GXColorPC4cXyzf(); -extern "C" void StartShock__12dVibration_cFii4cXyz(); -extern "C" void Release__4cBgSFP9dBgW_Base(); -extern "C" void GroundCross__4cBgSFP11cBgS_GndChk(); -extern "C" void Regist__4dBgSFP9dBgW_BaseP10fopAc_ac_c(); -extern "C" void dBgS_MoveBGProc_Typical__FP4dBgWPvRC13cBgS_PolyInfobP4cXyzP5csXyzP5csXyz(); -extern "C" void __ct__12dBgS_AcchCirFv(); -extern "C" void SetWall__12dBgS_AcchCirFff(); -extern "C" void __dt__9dBgS_AcchFv(); -extern "C" void __ct__9dBgS_AcchFv(); -extern "C" void Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz(); -extern "C" void CrrPos__9dBgS_AcchFR4dBgS(); -extern "C" void __ct__11dBgS_GndChkFv(); -extern "C" void __dt__11dBgS_GndChkFv(); -extern "C" void SetObj__16dBgS_PolyPassChkFv(); -extern "C" void Set__4cBgWFP6cBgD_tUlPA3_A4_f(); -extern "C" void __ct__4dBgWFv(); -extern "C" void Move__4dBgWFv(); -extern "C" void __ct__10dCcD_GSttsFv(); -extern "C" void Init__9dCcD_SttsFiiP10fopAc_ac_c(); -extern "C" void __ct__12dCcD_GObjInfFv(); -extern "C" void __dt__12dCcD_GObjInfFv(); -extern "C" void ChkTgHit__12dCcD_GObjInfFv(); -extern "C" void GetTgHitObj__12dCcD_GObjInfFv(); -extern "C" void Set__8dCcD_CylFRC11dCcD_SrcCyl(); -extern "C" void def_se_set__FP10Z2CreatureP8cCcD_ObjUlP10fopAc_ac_c(); -extern "C" void at_power_check__FP11dCcU_AtInfo(); -extern "C" void Stop__9dCamera_cFv(); -extern "C" void SetTrimSize__9dCamera_cFl(); -extern "C" void Set__9dCamera_cF4cXyz4cXyzsf(); -extern "C" void settingTevStruct__18dScnKy_env_light_cFiP4cXyzP12dKy_tevstr_c(); -extern "C" void setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c(); -extern "C" void Set__4cCcSFP8cCcD_Obj(); -extern "C" void __mi__4cXyzCFRC3Vec(); -extern "C" void __ct__5csXyzFsss(); -extern "C" void cM_atan2s__Fff(); -extern "C" void cM_rndF__Ff(); -extern "C" void cM_rndFX__Ff(); -extern "C" void SetPos__11cBgS_GndChkFPC4cXyz(); -extern "C" void SetC__8cM3dGCylFRC4cXyz(); -extern "C" void SetH__8cM3dGCylFf(); -extern "C" void SetR__8cM3dGCylFf(); -extern "C" void cLib_addCalc2__FPffff(); -extern "C" void cLib_addCalc0__FPfff(); -extern "C" void cLib_addCalcAngleS2__FPssss(); -extern "C" void MtxTrans__FfffUc(); -extern "C" void MtxPosition__FP4cXyzP4cXyz(); -extern "C" void seStart__7Z2SeMgrF10JAISoundIDPC3VecUlScffffUc(); -extern "C" void setBattleBgmOff__8Z2SeqMgrFb(); -extern "C" void __ct__10Z2CreatureFv(); -extern "C" void init__10Z2CreatureFP3VecP3VecUcUc(); -extern "C" void stopAnime__10Z2CreatureFv(); -extern "C" void* __nw__FUl(); -extern "C" void __dl__FPv(); -extern "C" void __construct_array(); -extern "C" void _savegpr_14(); -extern "C" void _savegpr_18(); -extern "C" void _savegpr_23(); -extern "C" void _savegpr_27(); -extern "C" void _savegpr_28(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_14(); -extern "C" void _restgpr_18(); -extern "C" void _restgpr_23(); -extern "C" void _restgpr_27(); -extern "C" void _restgpr_28(); -extern "C" void _restgpr_29(); -extern "C" extern void* __vt__8dCcD_Cyl[36]; -extern "C" extern void* __vt__9dCcD_Stts[11]; -extern "C" extern void* __vt__12cCcD_CylAttr[25]; -extern "C" extern void* __vt__14cCcD_ShapeAttr[22]; -extern "C" extern void* __vt__9cCcD_Stts[8]; -extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" extern u8 g_dComIfG_gameInfo[122384]; -extern "C" u8 sincosTable___5JMath[65536]; -extern "C" u8 mAudioMgrPtr__10Z2AudioMgr[4 + 4 /* padding */]; -extern "C" void __register_global_object(); + if (i_this->field_0xdae != 1 && i >= 2) { + if (i < 10 && i_this->field_0x1a98[i - 2] != 0) { + g_env_light.setLightTevColorType_MAJI(i_this->field_0x1aa0[i - 2], &a_this->tevStr); + mDoExt_modelUpdateDL(i_this->field_0x1aa0[i - 2]); + } + } + } + } -// -// Declarations: -// + return 1; +} -/* ############################################################################################## */ -/* 80CE39E8-80CE39EC 000000 0004+00 10/10 0/0 0/0 .rodata @3779 */ -SECTION_RODATA static f32 const lit_3779 = 4.0f / 5.0f; -COMPILER_STRIP_GATE(0x80CE39E8, &lit_3779); +/* 80CE04FC-80CE0510 00021C 0014+00 1/1 0/0 0/0 .text ride_call_back_0__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ +static void ride_call_back_0(dBgW* i_BgW, fopAc_ac_c* a_this, fopAc_ac_c* param_3) { + obj_so_class* i_this = (obj_so_class*)a_this; -/* 80CE3B70-80CE3B78 000000 0006+02 1/1 0/0 0/0 .data e_id$4326 */ -SECTION_DATA static u8 e_id[6 + 2 /* padding */] = { - 0x82, - 0xAB, - 0x82, - 0xAC, - 0x82, - 0xAD, - /* padding */ - 0x00, - 0x00, -}; + i_this->field_0xa28[0].x = 0; + i_this->field_0xc30[0] = 3; +} -/* 80CE3B78-80CE3BBC 000008 0044+00 1/1 0/0 0/0 .data cc_cyl_src$5220 */ -static dCcD_SrcCyl cc_cyl_src = { - { - {0x0, {{0x0, 0x0, 0x0}, {0xd8fafd3f, 0x1f}, 0x79}}, // mObj - {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt - {dCcD_SE_STONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg - {0x0}, // mGObjCo - }, // mObjInf - { - {0.0f, 0.0f, 0.0f}, // mCenter - 10.0f, // mRadius - 120.0f // mHeight - } // mCyl -}; +/* 80CE0510-80CE0524 000230 0014+00 1/1 0/0 0/0 .text ride_call_back_1__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ +static void ride_call_back_1(dBgW* i_BgW, fopAc_ac_c* a_this, fopAc_ac_c* param_3) { + obj_so_class* i_this = (obj_so_class*)a_this; + + i_this->field_0xa28[1].x = 0; + i_this->field_0xc30[1] = 3; +} + +/* 80CE0524-80CE0744 000244 0220+00 1/1 0/0 0/0 .text so_hasira__FP12obj_so_class */ +static void so_hasira(obj_so_class* i_this) { + fopAc_ac_c* a_this = &i_this->actor; + daPillar_c* pillar_p = (daPillar_c*)fopAcM_SearchByName(PROC_Obj_Pillar); + if (pillar_p != NULL) { + mDoMtx_stack_c::transS(pillar_p->current.pos.x, pillar_p->current.pos.y, pillar_p->current.pos.z); + mDoMtx_stack_c::YrotM(pillar_p->mRotY); + mDoMtx_stack_c::XrotM(pillar_p->shape_angle.x); + mDoMtx_stack_c::YrotM(-pillar_p->mRotY); + mDoMtx_stack_c::transM(0.0f, 510.0f, 0.0f); + + mDoMtx_multVecZero(mDoMtx_stack_c::get(), &a_this->current.pos); + a_this->shape_angle.y = -0x5000; + i_this->field_0xdc2 = -i_this->field_0xdc8 * cM_ssin(i_this->field_0xdac * 0xF00); + cLib_addCalc0(&i_this->field_0xdc8, 0.1f, 33.0f); + + if (i_this->field_0xdb2[0] == 1 && !dComIfGp_event_runCheck() && i_this->field_0xdc0 == 0) { + i_this->field_0xdc0++; + } + + if (daPy_getPlayerActorClass()->checkFrontRollCrash() && fopAcM_searchPlayerDistanceXZ(a_this) < 200.0f) { + OS_REPORT("OBJ_SO HA HIT \n"); + i_this->field_0xdb2[0] = 20; + i_this->field_0xdc4 = 1; + if (i_this->field_0xdc0 != 0 && a_this->shape_angle.x > 0x100) { + i_this->field_0xdc0++; + if (i_this->field_0xdc0 >= 2) { + i_this->field_0xdae = 1; + i_this->field_0xdb0 = 0; + i_this->mDemoMode = 1; + i_this->field_0xdbe = 0; + a_this->shape_angle.x = 0; + i_this->field_0xdb2[0] = 18; + return; + } + } + } + + i_this->field_0xdbe += 5000; + s16 target = pillar_p->shape_angle.x << 1; + if (a_this->shape_angle.x < target) { + a_this->shape_angle.x = target; + } else { + cLib_addCalcAngleS2(&a_this->shape_angle.x, target, 16, 20); + } + } +} + +/* 80CE0744-80CE0C54 000464 0510+00 4/4 0/0 0/0 .text part_set__FP12obj_so_classSc */ +static void part_set(obj_so_class* i_this, s8 param_2) { + // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + cXyz sp48, sp54; + + mDoMtx_stack_c::transS(a_this->current.pos.x, a_this->current.pos.y, a_this->current.pos.z); + mDoMtx_stack_c::YrotM(a_this->shape_angle.y); + mDoMtx_stack_c::XrotM(a_this->shape_angle.x); + + f32 scale = a_this->scale.x; + mDoMtx_stack_c::scaleM(scale, scale, scale); + + int sVar8, sVar7, sVar6, sVar5, sVar4 = 0; + for (int i = 0; i < 26; i++) { + mDoMtx_stack_c::push(); + if (i < 2) { + sp48.x = 0.0f; + if (i == 0) { + sp48.y = 210.0f; + } else { + sp48.y = 0.0f; + } + sp48.z = 0.0f; + mDoMtx_stack_c::multVec(&sp48, &i_this->field_0x618[i]); + i_this->field_0x7b8[i].set(0.8f, 1.0f, 0.8f); + i_this->field_0xa28[i].y = a_this->shape_angle.y; + if (i_this->field_0x570 != 1) { + i_this->field_0xa28[i].x = a_this->shape_angle.x + (int)cM_rndFX(4000.0f); + } + } else if (i < 10) { + mDoMtx_stack_c::YrotM(sVar4 + -0xF18); + sp48.x = 0.0f; + sp48.y = 110.0f; + sp48.z = 90.0f; + mDoMtx_stack_c::multVec(&sp48, &i_this->field_0x618[i]); + i_this->field_0x7b8[i].set(1.0f, 2.0f, 1.0f); + i_this->field_0xa28[i].y = a_this->shape_angle.y; + i_this->field_0xa28[i].x = a_this->shape_angle.x; + + if (i_this->field_0x1a98[i - 2] != 0) { + i_this->field_0x7b8[i].y = 1.0f; + i_this->field_0x618[i].y += 60.0f; + } + } else { + mDoMtx_stack_c::YrotM(sVar4 + 0x4718); + sp48.x = 0.0f; + if (i <= 17) { + scale = 205.0f; + } else { + scale = -5.0f; + } + sp48.y = scale; + if ((i & 1) != 0) { + sp48.y += 8.0f; + } + sp48.z = 95.0f; + + mDoMtx_stack_c::multVec(&sp48, &i_this->field_0x618[i]); + i_this->field_0xa28[i].y = a_this->shape_angle.y; + i_this->field_0xa28[i].x = a_this->shape_angle.x; + i_this->field_0xb60[i] = sVar4 + 0x4CE; + i_this->field_0x7b8[i].set(1.0f, 0.8f, 1.0f); + } + + mDoMtx_stack_c::pop(); + i_this->field_0x5fc[i] = param_2; + if (param_2 == 1) { + sp48.x = 0.0f; + i_this->field_0xc30[i] = 0; + if (i_this->field_0x570 != 1) { + if (fopAcM_GetRoomNo(a_this) == 4) { + if (i < 2) { + cMtx_YrotS(*calc_mtx, sVar5 + 0x1EFF); + } else { + cMtx_YrotS(*calc_mtx, sVar6 + 0x253B); + i_this->field_0xbfc[i] = cM_rndFX(6000.0f); + } + + sp48.y = cM_rndF(5.0f) + 30.0f; + sp48.z = cM_rndFX(5.0f) + 20.0f; + } else { + if (i < 2) { + cMtx_YrotS(*calc_mtx, sVar7 + (u16)-0x2000); + } else if (i < 10) { + cMtx_YrotS(*calc_mtx, sVar5 + 0xAAA); + i_this->field_0xbfc[i] = cM_rndFX(4000.0f); + } else { + cMtx_YrotS(*calc_mtx, sVar8 + 0x1554); + i_this->field_0xbfc[i] = cM_rndFX(6000.0f); + } + + sp48.y = cM_rndF(20.0f) + 20.0f; + sp48.z = cM_rndFX(6.0f) + 15.0f; + } + } else { + if (i < 2) { + cMtx_YrotS(*calc_mtx, sVar7 + 0x6000); + } else { + cMtx_YrotS(*calc_mtx, cM_rndFX(32768.0f)); + i_this->field_0xbfc[i] = cM_rndFX(1000.0f); + } + + if (i == 1) { + sp48.z = 0.0f; + sp48.y = 0.0f; + } else { + sp48.y = cM_rndF(5.0f) + 10.0f; + sp48.z = cM_rndFX(4.0f) + 15.0f; + } + } + + MtxPosition(&sp48, &i_this->field_0x8f0[i]); + i_this->field_0xbc8[i] = cM_rndFX(32768.0f); + } + + sVar8 += 0x1000; + sVar7 += -0x8000; + sVar6 += 500; + sVar5 += 0x2000; + sVar4 += 0x1F9C; + } +} + +/* 80CE0C90-80CE0F58 0009B0 02C8+00 1/1 0/0 0/0 .text so_drop__FP12obj_so_class */ +static void so_drop(obj_so_class* i_this) { + fopAc_ac_c* a_this = &i_this->actor; + cXyz sp30, sp3c; + s8 sVar2 = 0; + s8 sVar1 = 1; + + switch (i_this->field_0xdb0) { + case 0: + a_this->speed.y = 30.0f; + a_this->speedF = -10.0f; + i_this->field_0xdb0 = 1; + break; + + case 1: + if (i_this->field_0xdb2[0] != 0) { + sVar1 = 0; + } + + cLib_addCalcAngleS2(&a_this->shape_angle.x, -0x4000, 4, 0x300); + if (sVar1 && i_this->mObjAcch.ChkGroundHit()) { + dComIfGs_onSwitch(fopAcM_GetParam(a_this) >> 16 & 0xFF, fopAcM_GetRoomNo(a_this)); + a_this->health = 0; + i_this->field_0xdb0 = 2; + sVar2 = 1; + i_this->field_0x1054 = 1; + } + break; + + case 2: + a_this->speed.y = 0.0f; + a_this->speedF = 0.0f; + } + + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + sp30.x = 0.0f; + sp30.y = 0.0f; + sp30.z = a_this->speedF; + MtxPosition(&sp30, &sp3c); + + a_this->speed.x = sp3c.x; + a_this->speed.z = sp3c.z; + a_this->current.pos += a_this->speed; + a_this->speed.y -= 5.0f; + + if (sVar1) { + f32 fVar1 = 90.0f * cM_ssin(a_this->shape_angle.x); + a_this->current.pos.y += fVar1; + a_this->old.pos.y += fVar1; + i_this->mObjAcch.CrrPos(dComIfG_Bgsp()); + a_this->current.pos.y -= fVar1; + a_this->old.pos.y -= fVar1; + } + + if (sVar2) { + part_set(i_this, 1); + mDoAud_seStart(Z2SE_OBJ_MONKEYJAIL_BREAK, 0, 0, 0); + csXyz cStack_50(0, 0, 0); + fopAcM_effSmokeSet1(&i_this->field_0x1b98, &i_this->field_0x1b9c, &a_this->current.pos, &cStack_50, + 2.5f, &a_this->tevStr, 1); + dComIfGp_particle_levelEmitterOnEventMove(i_this->field_0x1b98); + dComIfGp_particle_levelEmitterOnEventMove(i_this->field_0x1b9c); + dComIfGp_getVibration().StartShock(5, 1, cXyz(0.0f, 1.0f, 0.0f)); + i_this->field_0x1bc0 = 30.0f; + } +} + +/* 80CE0F94-80CE1084 000CB4 00F0+00 1/1 0/0 0/0 .text so_break__FP12obj_so_class */ +static void so_break(obj_so_class* i_this) { + fopAc_ac_c* a_this = &i_this->actor; + cXyz sp2c, sp38; + switch (i_this->field_0xdb0) { + case 0: + i_this->field_0xdb0 = 1; + part_set(i_this, 2); + a_this->health = 0; + // fallthrough + case 1: + default: + a_this->eyePos = a_this->current.pos; + a_this->eyePos.y += 90.0f; + a_this->attention_info.position = a_this->eyePos; + i_this->field_0xdc2 = -i_this->field_0xdc8 * cM_ssin(i_this->field_0xdac * 0xF00); + cLib_addCalc0(&i_this->field_0xdc8, 0.1f, 33.0f); + } +} + +/* 80CE1084-80CE12D8 000DA4 0254+00 1/1 0/0 0/0 .text so_hang__FP12obj_so_class */ +static void so_hang(obj_so_class* i_this) { + // NONMATCHING + fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* actor = fopAcM_SearchByID(i_this->field_0x1b94); + + switch (i_this->field_0xdb0) { + case 0: + if (actor != NULL) { + i_this->field_0xdb2[0] = 20; + i_this->field_0xdb0 = 1; + } + break; + + case 1: + if (i_this->field_0xdb2[0] == 0 && !dComIfGp_event_runCheck()) { + if (i_this->field_0x1b60 == 0) { + i_this->field_0xdb0 = 2; + } + + i_this->field_0xdc2 = -i_this->field_0xdc8 * cM_ssin(i_this->field_0xdac * 0xF00); + cLib_addCalc0(&i_this->field_0xdc8, 0.1f, 33.0f); + } + break; + + case 2: + a_this->current.pos.y += a_this->speed.y; + a_this->speed.y -= 5.0f; + i_this->mObjAcch.CrrPos(dComIfG_Bgsp()); + if (i_this->mObjAcch.ChkGroundHit()) { + dComIfGs_onSwitch(fopAcM_GetParam(a_this) >> 16 & 0xFF, fopAcM_GetRoomNo(a_this)); + a_this->health = 0; + i_this->field_0x1054 = 1; + i_this->field_0xdb0 = 3; + part_set(i_this, 1); + mDoAud_seStart(Z2SE_OBJ_MONKEYJAIL_BREAK, 0, 0, 0); + csXyz cStack_38(0, 0, 0); + fopAcM_effSmokeSet1(&i_this->field_0x1b98, &i_this->field_0x1b9c, &a_this->current.pos, &cStack_38, + 2.5f, &a_this->tevStr, 1); + dComIfGp_particle_levelEmitterOnEventMove(i_this->field_0x1b98); + dComIfGp_particle_levelEmitterOnEventMove(i_this->field_0x1b9c); + dComIfGp_getVibration().StartShock(5, 1, cXyz(0.0f, 1.0f, 0.0f)); + } + } +} + +/* 80CE12D8-80CE14DC 000FF8 0204+00 1/1 0/0 0/0 .text action__FP12obj_so_class */ +static void action(obj_so_class* i_this) { + fopAc_ac_c* a_this = &i_this->actor; + cXyz sp38; + + if (i_this->field_0x1056 != 0) { + i_this->field_0x1056--; + } + + switch (i_this->field_0xdae) { + case 0: + so_hasira(i_this); + break; + + case 1: + so_drop(i_this); + break; + + case 2: + so_break(i_this); + break; + + case 3: + so_hang(i_this); + } + + if (a_this->health != 0) { + if (i_this->field_0x1b60 != 0) { + MTXCopy(i_this->mMtx, *calc_mtx); + MtxTrans(0.0f, -60.0f, 0.0f, 1); + MtxTrans(0.0f, 200.0f, 0.0f, 1); + cMtx_XrotM(*calc_mtx, i_this->field_0xdc2); + mDoMtx_MtxToRot(*calc_mtx, &a_this->shape_angle); + MtxTrans(0.0f, -200.0f, 0.0f, 1); + i_this->field_0x574->setBaseTRMtx(*calc_mtx); + sp38.set(0.0f, 0.0f, 0.0f); + MtxPosition(&sp38, &a_this->current.pos); + i_this->field_0x1b60 = 0; + } else { + mDoMtx_stack_c::transS(a_this->current.pos.x, a_this->current.pos.y, a_this->current.pos.z); + mDoMtx_stack_c::YrotM(i_this->field_0xdbe); + mDoMtx_stack_c::YrotM(a_this->shape_angle.y); + mDoMtx_stack_c::XrotM(a_this->shape_angle.x + i_this->field_0xdc2); + mDoMtx_stack_c::YrotM(-i_this->field_0xdbe); + f32 scale = a_this->scale.x; + mDoMtx_stack_c::scaleM(scale, scale, scale); + i_this->field_0x574->setBaseTRMtx(mDoMtx_stack_c::get()); + } + } +} + +/* 80CE14DC-80CE2A64 0011FC 1588+00 1/1 0/0 0/0 .text part_move__FP12obj_so_class */ +static void part_move(obj_so_class* i_this) { + // NONMATCHING + static u16 e_id[3] = { + 0x82AB, + 0x82AC, + 0x82AD, + }; + + fopAc_ac_c* a_this = &i_this->actor; + fopAc_ac_c* player = dComIfGp_getPlayer(0); + cXyz spec, spf8, sp104; + csXyz cStack_13c(0, 0, 0); + dBgS_ObjGndChk cStack_e0; + f32 fVar1; + + for (int i = 0; i < 26; i++) { + if (i_this->field_0x5fc[i] != 0) { + if (i_this->field_0x5fc[i] == 1) { + if (i < 2) { + if (i_this->field_0xc30[i] != 0) { + cLib_addCalcAngleS2(&i_this->field_0xa28[i].x, 0, 2, 300); + i_this->field_0xb94[i] += (s16)(cM_scos(i_this->field_0xa28[i].x) * 12000.0f); + } + + fVar1 = fabsf(70.0f * cM_ssin(i_this->field_0xa28[i].x)) + 5.0f; + } else if (i < 10) { + cLib_addCalcAngleS2(&i_this->field_0xa28[i].y, i_this->field_0xbc8[i], 1, 0x800); + if (i_this->field_0xc30[i] == 0) { + i_this->field_0xa28[i].x += i_this->field_0xbfc[i]; + } else { + cLib_addCalcAngleS2(&i_this->field_0xa28[i].x, -0x4000, 1, 0xC00); + } + + fVar1 = fabsf(110.0f * cM_ssin(i_this->field_0xa28[i].x)) + 5.0f; + } else { + cLib_addCalcAngleS2(&i_this->field_0xa28[i].y, i_this->field_0xbc8[i], 1, 0x800); + if (i_this->field_0xc30[i] == 0) { + i_this->field_0xa28[i].x += i_this->field_0xbfc[i]; + } else { + cLib_addCalcAngleS2(&i_this->field_0xa28[i].x, 0, 1, 0xC00); + } + + cLib_addCalcAngleS2(&i_this->field_0xb60[i], 0, 1, 0xC00); + fVar1 = fabsf(40.0f * cM_ssin(i_this->field_0xa28[i].x)) + 5.0f; + } + + i_this->field_0x618[i] += i_this->field_0x8f0[i]; + i_this->field_0x8f0[i].y -= 5.0f; + if (i_this->field_0x8f0[i].y < -100.0f) { + i_this->field_0x8f0[i].y = -100.0f; + } + + if (!dComIfGp_event_runCheck() && fopAcM_GetRoomNo(a_this) == 19 && i_this->field_0x618[i].y < 2570.0f) { + i_this->field_0x5fc[i] = 0; + } + + if (fopAcM_GetRoomNo(a_this) != 2) { + if (strcmp(dComIfGp_getStartStageName(), "F_SP108") != 0) { + spf8 = i_this->field_0x618[i]; + spf8.y += 110.0f; + cStack_e0.SetPos(&spf8); + a_this->home.pos.y = dComIfG_Bgsp().GroundCross(&cStack_e0); + } + } + + if (i_this->field_0x618[i].y <= a_this->home.pos.y + fVar1) { + i_this->field_0x618[i].y = a_this->home.pos.y + fVar1; + if (i_this->field_0x8f0[i].y < 0.0f && i_this->field_0xc30[i] < 3) { + if (i_this->field_0xc30[i] == 0) { + fopAcM_effSmokeSet1(&i_this->field_0xc4c[i], &i_this->field_0xcb4[i], &i_this->field_0x618[i], + &cStack_13c, 1.0f, &a_this->tevStr, 0); + dComIfGp_particle_levelEmitterOnEventMove(i_this->field_0xc4c[i]); + dComIfGp_particle_levelEmitterOnEventMove(i_this->field_0xcb4[i]); + + if (i <= 1) { + if (i_this->field_0x570 != 1) { + i_this->field_0xa28[i].x = a_this->shape_angle.x + (s16)cM_rndFX(4000.0f); + } else { + if (i == 0) { + i_this->field_0xa28[i].x = (s16)cM_rndFX(2000.0f) + -0x3700; + } else { + i_this->field_0xa28[i].x = (s16)cM_rndFX(2000.0f) + -0x1000; + } + } + } + } + + i_this->field_0x8f0[i].y *= -0.3f; + i_this->field_0xc30[i]++; + i_this->field_0x8f0[i].x *= 0.5f; + i_this->field_0x8f0[i].z *= 0.5f; + + if (i >= 2) { + i_this->field_0xa28[i].x += (s16)cM_rndFX(i_this->field_0x8f0[i].y * 400.0f); + i_this->field_0xbc8[i] += (s16)cM_rndFX(i_this->field_0x8f0[i].y * 200.0f); + } + } else { + i_this->field_0x8f0[i].y = -10.0f; + i_this->field_0x8f0[i].z = 0.0f; + i_this->field_0x8f0[i].x = 0.0f; + if (daPy_getPlayerActorClass()->checkFrontRollCrash()) { + spec.x = player->current.pos.x - i_this->field_0x618[i].x; + spec.y = -(player->current.pos.y - i_this->field_0x618[i].y); + spec.z = player->current.pos.z - i_this->field_0x618[i].z; + if (spec.y > 200.0f && JMAFastSqrt(spec.x * spec.x + spec.z * spec.z) < 300.0f) { + if (i >= 2) { + i_this->field_0x8f0[i].x = cM_rndFX(10.0f); + i_this->field_0x8f0[i].z = cM_rndFX(10.0f); + } + + i_this->field_0x8f0[i].y = 5.0f; + i_this->field_0xc30[i] = 1; + i_this->field_0xa28[i].x = cM_rndFX(500.0f) + 1024.0f; + } + } + } + } + } + + if (i >= 2 && i_this->field_0x5fc[i] == 1) { + for (int j = 0; j < 2; j++) { + spec.x = i_this->field_0x618[i].x - i_this->field_0x618[j].x; + spec.z = i_this->field_0x618[i].z - i_this->field_0x618[j].z; + + if (JMAFastSqrt(spec.x * spec.x + spec.z * spec.z) < 180.0f) { + cMtx_YrotS(*calc_mtx, cM_atan2s(spec.x, spec.z)); + spec.x = 0.0f; + spec.y = 0.0f; + spec.z = 180.0f; + MtxPosition(&spec, &spf8); + i_this->field_0x618[i].x = i_this->field_0x618[j].x + spf8.x; + i_this->field_0x618[i].z = i_this->field_0x618[j].z + spf8.z; + } + } + } + + mDoMtx_stack_c::transS(i_this->field_0x618[i].x, i_this->field_0x618[i].y + i_this->field_0x750[i], i_this->field_0x618[i].z); + mDoMtx_stack_c::XrotM(i_this->field_0xdc2); + + if (i == 0 || (i >= 10 && i <= 17)) { + mDoMtx_stack_c::YrotM(i_this->field_0xdb8); + mDoMtx_stack_c::XrotM(i_this->field_0xdb6); + mDoMtx_stack_c::YrotM(-i_this->field_0xdb8); + } + + if (i == 0) { + mDoMtx_stack_c::YrotM(i_this->field_0xb94[i]); + mDoMtx_stack_c::XrotM(i_this->field_0xdb6); + } else if (i == 1) { + mDoMtx_stack_c::YrotM(-i_this->field_0xb94[i]); + } + + mDoMtx_stack_c::YrotM(i_this->field_0xa28[i].y); + mDoMtx_stack_c::XrotM(i_this->field_0xa28[i].x); + mDoMtx_stack_c::ZrotM(i_this->field_0xa28[i].z); + + if (i == 0) { + mDoMtx_stack_c::YrotM(-i_this->field_0xb94[i]); + } else if (i == 1) { + mDoMtx_stack_c::YrotM(i_this->field_0xb94[i]); + } + + if (i >= 10) { + mDoMtx_stack_c::YrotM(i_this->field_0xb60[i]); + mDoMtx_stack_c::XrotM(0x4000); + } + + mDoMtx_stack_c::scaleM(i_this->field_0x7b8[i].x, i_this->field_0x7b8[i].y, i_this->field_0x7b8[i].z); + + if (i >= 2 && i < 10 && i_this->field_0x5fc[i] == 2) { + sp104 = i_this->field_0x618[i]; + if (i_this->field_0x1a98[i - 2] < 2) { + sp104.y += -80.0f; + i_this->field_0x10b8[i - 2].SetR(20.0f); + i_this->field_0x10b8[i - 2].SetH(165.0f); + if (i_this->field_0x1056 == 0) { + if (i_this->field_0x10b8[i - 2].ChkTgHit() != 0) { + i_this->mAtInfo.mpCollider = i_this->field_0x10b8[i - 2].GetTgHitObj(); + def_se_set(&i_this->mSound, i_this->mAtInfo.mpCollider, 41, NULL); + at_power_check(&i_this->mAtInfo); + OS_REPORT("OBJ_SO ATHIT %d \n", i_this->mAtInfo.mAttackPower); + + if (i_this->mAtInfo.mpCollider->ChkAtType(AT_TYPE_40) != 0) { + for (int i = 0; i < 8; i++) { + i_this->field_0x1a98[i] = 2; + } + + OS_REPORT("OBJ_SO BO HIT \n"); + } else { + if (i_this->mAtInfo.mAttackPower >= 20) { + i_this->field_0x1a98[i - 2] = 2; + } else { + i_this->field_0x1056 = 2; + i_this->field_0x1a98[i - 2] = 2; + } + } + + i_this->field_0x1ac0[i - 2] = i_this->field_0x618[i]; + if (i_this->field_0x1a98[i - 2] >= 2) { + i_this->field_0x1a98[i - 2] = 2; + i_this->field_0x1ac0[i - 2].y += -90.0f; + } else { + i_this->field_0x1ac0[i - 2].y += -87.0f; + } + + if (i_this->field_0x1a98[i - 2] == 2) { + for (int j = 0; j < 8; j++) { + i_this->field_0x1b40[j] = cM_rndF(2.0f) + 4.0f; + i_this->field_0x1b50[j] = cM_rndF(2.0f) + 4.0f; + } + + i_this->field_0xa28[i].x = cM_rndFX(2500.0f); + i_this->field_0xa28[i].z = cM_rndFX(2500.0f); + i_this->field_0x1b20[i - 2] = cM_rndFX(2500.0f); + i_this->field_0x1b30[i - 2] = cM_rndFX(2500.0f); + i_this->field_0x1b40[i - 2] = cM_rndF(5.0f) + 10.0f; + i_this->field_0x1b50[i - 2] = cM_rndF(5.0f) + 10.0f; + } else { + i_this->field_0xa28[i].x = cM_rndFX(200.0f); + i_this->field_0xa28[i].z = cM_rndFX(200.0f); + i_this->field_0x1b20[i - 2] = cM_rndFX(200.0f); + i_this->field_0x1b30[i - 2] = cM_rndFX(200.0f); + } + + cXyz sp110(0.3f, 0.3f, 0.3f); + for (int j = 0; j < 3; j++) { + dComIfGp_particle_set(e_id[j], &i_this->field_0x618[i], &a_this->shape_angle, &sp110); + } + } + } + } else { + sp104.y += 20000.0f; + } + + if (i_this->field_0x1a98[i - 2] != 0) { + if (i_this->field_0x1a98[i - 2] == 2) { + spec = i_this->field_0x618[i] - player->current.pos; + spec.y = 0.0f; + if (spec.abs() < 50.0f) { + cMtx_YrotS(*calc_mtx, cM_atan2s(spec.x, spec.z)); + spec.x = 0.0f; + spec.y = 0.0f; + spec.z = (50.0f - fVar1) * 100.0f; + MtxPosition(&spec, &spf8); + cLib_addCalcAngleS2(&i_this->field_0xa28[i].x, spf8.z, 2, 0x400); + cLib_addCalcAngleS2(&i_this->field_0xa28[i].z, -spf8.x, 2, 0x400); + } + + if (i_this->field_0x1b40[i - 2] != 0) { + i_this->field_0x1b40[i - 2]--; + } + + int iVar4 = (i_this->field_0x1b40[i - 2] * 700) * cM_ssin(i_this->field_0xdac * 0x1300); + u32 uVar8 = (i_this->field_0x1b40[i - 2] * 700) * cM_ssin(i_this->field_0xdac * 0x1800); + mDoMtx_stack_c::YrotM(uVar8); + mDoMtx_stack_c::XrotM(iVar4); + mDoMtx_stack_c::scaleM(1.0f, 0.45f, 1.0f); + mDoMtx_stack_c::transM(0.0f, -20.0f, 0.0f); + i_this->field_0x750[i] = 80.0f; + } else { + mDoMtx_stack_c::scaleM(1.0f, 0.5f, 1.0f); + mDoMtx_stack_c::transM(0.0f, -20.0f, 0.0f); + i_this->field_0x750[i] = 77.0f; + } + } + + i_this->field_0x10b8[i - 2].SetC(sp104); + dComIfG_Ccsp()->Set(&i_this->field_0x10b8[i - 2]); + } + + i_this->field_0x594[i]->setBaseTRMtx(mDoMtx_stack_c::get()); + + if (i <= 1 && fopAcM_GetRoomNo(a_this) == 2 && i_this->mBgW[i] != NULL && (i_this->field_0xc30[i] != 0 || i == 1)) { + mDoMtx_stack_c::transM(0.0f, -30.0f, 0.0f); + mDoMtx_stack_c::scaleM(1.0f, 8.0f, 1.0f); + MTXCopy(mDoMtx_stack_c::get(), i_this->mBgMtx[i]); + i_this->mBgW[i]->Move(); + } + } + } + + for (int i = 0; i < 8; i++) { + if (i_this->field_0x1a98[i - 2] != 0) { + if (i_this->field_0x1a98[i - 2] == 2) { + spec = i_this->field_0x618[i + 2] - player->current.pos; + spec.y = 0.0f; + if (spec.abs() < 50.0f) { + cMtx_YrotS(*calc_mtx, cM_atan2s(spec.x, spec.z)); + spec.x = 0.0f; + spec.y = 0.0f; + spec.z = (50.0f - fVar1) * 100.0f; + MtxPosition(&spec, &spf8); + cLib_addCalcAngleS2(&i_this->field_0x1b20[i], spec.z, 2, 0x400); + cLib_addCalcAngleS2(&i_this->field_0x1b30[i], -spec.x, 2, 0x400); + } + } + + mDoMtx_stack_c::transS(i_this->field_0x1ac0[i].x, i_this->field_0x1ac0[i].y, i_this->field_0x1ac0[i].z); + + if (i_this->field_0x1b50[i] != 0) { + i_this->field_0x1b50[i]--; + } + + int iVar16 = (i_this->field_0x1b50[i] * 700) + cM_ssin(i_this->field_0xdac * 0x1500); + int iVar17 = (i_this->field_0x1b50[i] * 700) + cM_ssin(i_this->field_0xdac * 0x1200); + mDoMtx_stack_c::XrotM(i_this->field_0x1b20[i] + iVar16); + mDoMtx_stack_c::ZrotM(i_this->field_0x1b30[i] + iVar17 + -0x8000); + mDoMtx_stack_c::scaleM(i_this->field_0x7b8[i + 2].x, i_this->field_0x7b8[i + 2].y, i_this->field_0x7b8[i + 2].z); + + if (i_this->field_0x1a98[i - 2] == 2) { + mDoMtx_stack_c::scaleM(1.0f, 0.45f, 1.0f); + mDoMtx_stack_c::transM(0.0f, -30.0f, 0.0f); + } else { + mDoMtx_stack_c::scaleM(1.0f, 0.5f, 1.0f); + mDoMtx_stack_c::transM(0.0f, -30.0f, 0.0f); + } + + i_this->field_0x1aa0[i]->setBaseTRMtx(mDoMtx_stack_c::get()); + } + } + + if (i_this->field_0x1054 == 0) { + s8 sVar1 = 0; + u32 uVar1 = 0; + u32 uVar2 = 0; + for (int i = 0; i < 8; i++) { + if (i_this->field_0x1a98[i] == 2) { + s8 sVar2 = 0; + for (int j = 1; j < 8; j++) { + if (i_this->field_0x1a98[j] == 2) { + sVar2++; + uVar1 &= 7; + } else { + sVar2 = 0; + } + } + + if (sVar2 >= 3 && sVar1 < sVar2) { + sVar1 = sVar2; + uVar2 = uVar1; + } + } + } + + if (sVar1 != 0) { + if (sVar1 == 3) { + uVar2--; + } else if (sVar1 == 4) { + uVar2 -= 2; + } else if (sVar1 == 5) { + uVar2 -= 2; + } else if (sVar1 >= 6) { + uVar2 -= 3; + } + uVar2 &= 7; + + cXyz sp11c(i_this->field_0x618[uVar2 + 2] - a_this->current.pos); + i_this->field_0xdbc = cM_atan2s(sp11c.x, sp11c.z); + i_this->field_0xdba = sVar1 * 500; + + if (sVar1 == 7) { + part_set(i_this, 1); + i_this->mSound.startCreatureSound(Z2SE_OBJ_MONKEYJAIL_BREAK, 0, -1); + i_this->field_0xdae = 1; + i_this->field_0xdb0 = 2; + i_this->field_0x1054 = 1; + + for (int i = 0; i < 8; i++) { + i_this->field_0x750[i + 2] = 0.0f; + } + + i_this->field_0xdba = 0; + i_this->field_0xdb6 = 0; + i_this->field_0xdbc = 0; + i_this->field_0xdb8 = 0; + + if (dStage_stagInfo_GetSTType(dComIfGp_getStage()->getStagInfo()) == 0) { + dComIfGs_onSwitch(fopAcM_GetParam(a_this) >> 24, fopAcM_GetRoomNo(a_this)); + } else { + dComIfGs_onSwitch(fopAcM_GetParam(a_this) >> 16, fopAcM_GetRoomNo(a_this)); + } + } + } + + cLib_addCalcAngleS2(&i_this->field_0xdb8, i_this->field_0xdbc, 2, 0x800); + cLib_addCalcAngleS2(&i_this->field_0xdb6, i_this->field_0xdba, 2, 0x800); + } +} + +/* 80CE2ADC-80CE2EAC 0027FC 03D0+00 1/1 0/0 0/0 .text demo_camera__FP12obj_so_class */ +static void demo_camera(obj_so_class* i_this) { + fopAc_ac_c* a_this = &i_this->actor; + camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0)); + cXyz sp30, sp3c; + + switch (i_this->mDemoMode) { + case 1: + if (!a_this->eventInfo.checkCommandDemoAccrpt()) { + fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0); + a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e); + return; + } + + i_this->mDemoMode = 2; + camera->mCamera.Stop(); + camera->mCamera.SetTrimSize(3); + i_this->field_0x1ba2 = 0; + cMtx_YrotS(*calc_mtx, a_this->shape_angle.y); + sp30.x = -550.0f; + sp30.y = 3300.0f; + sp30.z = -600.0f; + MtxPosition(&sp30, &i_this->mDemoCamEye); + i_this->mDemoCamEye.x += a_this->current.pos.x; + i_this->mDemoCamEye.z += a_this->current.pos.z; + i_this->mDemoCamFovy = 40.0f; + // fallthrough + case 2: + sp3c.set(12459.0f, 3152.0f, 4628.0f); + daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp3c, 0xfffffaee, 0); + i_this->mDemoCamCenter.x = a_this->current.pos.x; + i_this->mDemoCamCenter.z = a_this->current.pos.z; + sp3c.y = (a_this->current.pos.y + 150.0f) - 50.0f; + if (sp3c.y >= 3602.0f) { + i_this->mDemoCamCenter.y = 3602.0f; + } else { + i_this->mDemoCamCenter.y = sp3c.y; + } + + cLib_addCalc2(&i_this->mDemoCamFovy, 65.0f, 0.05f, 0.5f); + + if (i_this->field_0x1ba2 == 120) { + Z2GetAudioMgr()->setBattleBgmOff(false); + csXyz i_angle(0, 0x7FFF, 0); + cXyz sp48(-4264.0f, 302.0f, -2330.0f); + cXyz sp54(16400.0f, 3529.0f, 8385.0f); + sp54 += sp48; + fpc_ProcID i_parentID = fopAcM_create(PROC_E_OC, 0xFFFF0103, &sp54, fopAcM_GetRoomNo(a_this), &i_angle, 0, -1); + sp54.set(16200.0f, 3481.0f, 8418.0f); + sp54 += sp48; + fopAcM_createChild(PROC_E_OC, i_parentID, 0xFFFF0104, &sp54, fopAcM_GetRoomNo(a_this), &i_angle, NULL, -1, NULL); + } else if (i_this->field_0x1ba2 == 125) { + i_this->mDemoMode = 100; + } + break; + + case 100: + i_this->mDemoMode = 0; + break; + + case 0: + break; + } + + if (i_this->mDemoMode != 0) { + s16 i_bank = i_this->field_0x1bc0 * cM_scos(i_this->field_0x1ba2 * 0x3500) * 10.0f; + cXyz i_center(i_this->mDemoCamCenter); + cXyz i_eye(i_this->mDemoCamEye); + i_center.y += i_this->field_0x1bc0 * cM_ssin(i_this->field_0x1ba2 * 0x3200) * 2.0f; + i_eye.y += i_this->field_0x1bc0 * cM_ssin(i_this->field_0x1ba2 * 0x3200) * 2.0f; + camera->mCamera.Set(i_center, i_eye, i_bank, i_this->mDemoCamFovy); + cLib_addCalc0(&i_this->field_0x1bc0, 1.0f, 2.0f); + i_this->field_0x1ba2++; + } +} + +/* 80CE3C90-80CE3C94 000008 0004+00 2/2 0/0 0/0 .bss None */ +static u8 data_80CE3C90; + +/* 80CE3CA0-80CE3CAC 000018 000C+00 3/3 0/0 0/0 .bss l_HIO */ +static daObj_So_HIO_c l_HIO; + +/* 80CE2EAC-80CE2F60 002BCC 00B4+00 2/1 0/0 0/0 .text daObj_So_Execute__FP12obj_so_class */ +static int daObj_So_Execute(obj_so_class* i_this) { + fopAc_ac_c* a_this = &i_this->actor; + + i_this->field_0xdac++; + a_this->scale.x = l_HIO.mScale; + + for (int i = 0; i < 2; i++) { + if (i_this->field_0xdb2[i] != 0) { + i_this->field_0xdb2[i]--; + } + } + + action(i_this); + i_this->mSound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this))); + part_move(i_this); + demo_camera(i_this); + return 1; +} + +/* 80CE2F60-80CE2F68 002C80 0008+00 1/0 0/0 0/0 .text daObj_So_IsDelete__FP12obj_so_class */ +static int daObj_So_IsDelete(obj_so_class* i_this) { + return 1; +} + +/* 80CE2F68-80CE3018 002C88 00B0+00 1/0 0/0 0/0 .text daObj_So_Delete__FP12obj_so_class */ +static int daObj_So_Delete(obj_so_class* i_this) { + fopAc_ac_c* a_this = &i_this->actor; + + dComIfG_resDelete(&i_this->mPhase, "Obj_so"); + if (i_this->field_0x1bcc != 0) { + data_80CE3C90 = 0; + mDoHIO_DELETE_CHILD(data_80CE3C90); + } + + for (int i = 0; i < 2; i++) { + if (i_this->mBgW[i] != NULL) { + dComIfG_Bgsp().Release(i_this->mBgW[i]); + } + } + + if (a_this->heap != NULL) { + i_this->mSound.stopAnime(); + } + + return 1; +} + +/* 80CE3018-80CE327C 002D38 0264+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ +static int useHeapInit(fopAc_ac_c* a_this) { + obj_so_class* i_this = (obj_so_class*)a_this; + + J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("Obj_so", 7); + JUT_ASSERT(1784, modelData != 0); + i_this->field_0x574 = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (i_this->field_0x574 == NULL) { + return 0; + } + + for (int i = 0; i < 2; i++) { + i_this->mBgW[i] = new dBgW(); + if (i_this->mBgW[i] == NULL) { + return 0; + } + + if (i_this->mBgW[i]->Set((cBgD_t*)dComIfG_getObjectRes("Obj_so", 10), 1, &i_this->mBgMtx[i]) == 1) { + return 0; + } + + i_this->mBgW[i]->SetCrrFunc(dBgS_MoveBGProc_Typical); + if (i == 0) { + i_this->mBgW[i]->SetRideCallback(ride_call_back_0); + } else { + i_this->mBgW[i]->SetRideCallback(ride_call_back_1); + } + } + + for (int i = 0; i < 26; i++) { + if (i == 0) { + modelData = (J3DModelData*)dComIfG_getObjectRes("Obj_so", 4); + } else if (i == 2) { + modelData = (J3DModelData*)dComIfG_getObjectRes("Obj_so", 5); + } + + i_this->field_0x594[i] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (i_this->field_0x594[i] == NULL) { + return 0; + } + } + + for (int i = 0; i < 8; i++) { + i_this->field_0x1aa0[i] = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084); + if (i_this->field_0x1aa0[i] == NULL) { + return 0; + } + } + + i_this->mSound.init(&a_this->current.pos, &a_this->current.pos, 3, 1); + return 1; +} + +/* 80CE327C-80CE36D0 002F9C 0454+00 1/0 0/0 0/0 .text daObj_So_Create__FP10fopAc_ac_c */ +static int daObj_So_Create(fopAc_ac_c* a_this) { + static dCcD_SrcCyl cc_cyl_src = { + { + {0x0, {{0x0, 0x0, 0x0}, {0xd8fafd3f, 0x1f}, 0x79}}, // mObj + {dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt + {dCcD_SE_STONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg + {0x0}, // mGObjCo + }, // mObjInf + { + {0.0f, 0.0f, 0.0f}, // mCenter + 10.0f, // mRadius + 120.0f // mHeight + } // mCyl + }; + + obj_so_class* i_this = (obj_so_class*)a_this; + fopAcM_SetupActor(a_this, obj_so_class); + + int phase = dComIfG_resLoad(&i_this->mPhase, "Obj_so"); + if (phase == cPhs_COMPLEATE_e) { + OS_REPORT("OBJ_SO PARAM %x\n", fopAcM_GetParam(a_this)); + i_this->field_0x570 = fopAcM_GetParam(a_this); + i_this->field_0x571 = fopAcM_GetParam(a_this) >> 8; + int swBit = fopAcM_GetParam(a_this) >> 24; + if (swBit != 0xFF) { + if (dComIfGs_isSwitch(swBit, fopAcM_GetRoomNo(a_this))) { + return cPhs_ERROR_e; + } + } + + if (fopAcM_GetRoomNo(a_this) == 4) { + i_this->field_0x570 = 2; + } + OS_REPORT("OBJ_SO//////////////OBJ_SO SET 1 !!\n"); + + if (!fopAcM_entrySolidHeap(a_this, useHeapInit, 0x12560)) { + OS_REPORT("//////////////OBJ_SO SET NON !!\n"); + return cPhs_ERROR_e; + } + + OS_REPORT("//////////////OBJ_SO SET 2 !!\n"); + for (int i = 0; i < 2; i++) { + if (i_this->mBgW[i] != NULL) { + if (dComIfG_Bgsp().Regist(i_this->mBgW[i], a_this)) { + return cPhs_ERROR_e; + } + } + } + + if (data_80CE3C90 == 0) { + i_this->field_0x1bcc = 1; + data_80CE3C90 = 1; + mDoHIO_CREATE_CHILD("猿オリOBJ", &l_HIO); // Monkey jail OBJ + l_HIO.field_0x4 = -1; + } + + fopAcM_SetMtx(a_this, i_this->field_0x574->getBaseTRMtx()); + fopAcM_SetMin(a_this, -300.0f, -500.0f, -300.0f); + fopAcM_SetMax(a_this, 300.0f, 500.0f, 300.0f); + i_this->mObjAcch.Set(fopAcM_GetPosition_p(a_this), fopAcM_GetOldPosition_p(a_this), a_this, + 1, &i_this->mAcchCir, fopAcM_GetSpeed_p(a_this), NULL, NULL); + i_this->mAcchCir.SetWall(50.0f, 50.0f); + + a_this->health = 1; + if (i_this->field_0x570 == 1) { + i_this->field_0xdae = 2; + i_this->mStts.Init(0xFF, 0, a_this); + + for (int i = 0; i < 8; i++) { + i_this->field_0x10b8[i].Set(cc_cyl_src); + i_this->field_0x10b8[i].SetStts(&i_this->mStts); + } + + a_this->current.pos.y += 26.0f; + if (strcmp(dComIfGp_getStartStageName(), "F_SP108") == 0) { + a_this->home.pos.y = 1100.0f; + } + } else { + if (i_this->field_0x570 == 2) { + i_this->field_0xdae = 3; + if (fopAcM_GetRoomNo(a_this) == 4) { + cXyz sp2c(-5374.0f, 4280.0f, -2342.0f); + i_this->field_0x1b94 = fopAcM_create(PROC_OBJ_GM, 0x600, &sp2c, fopAcM_GetRoomNo(a_this), + NULL, NULL, -1); + } + } + + if (fopAcM_GetRoomNo(a_this) == 2) { + a_this->home.pos.y = 3152.0f; + } + } + + i_this->mAtInfo.mpSound = &i_this->mSound; + daObj_So_Execute(i_this); + } + + return phase; +} + +/* 80CE3B60-80CE3B60 000178 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ /* 80CE3BBC-80CE3BDC -00001 0020+00 1/0 0/0 0/0 .data l_daObj_So_Method */ static actor_method_class l_daObj_So_Method = { - (process_method_func)daObj_So_Create__FP10fopAc_ac_c, - (process_method_func)daObj_So_Delete__FP12obj_so_class, - (process_method_func)daObj_So_Execute__FP12obj_so_class, - (process_method_func)daObj_So_IsDelete__FP12obj_so_class, - (process_method_func)daObj_So_Draw__FP12obj_so_class, + (process_method_func)daObj_So_Create, + (process_method_func)daObj_So_Delete, + (process_method_func)daObj_So_Execute, + (process_method_func)daObj_So_IsDelete, + (process_method_func)daObj_So_Draw, }; /* 80CE3BDC-80CE3C0C -00001 0030+00 0/0 0/0 1/0 .data g_profile_OBJ_SO */ @@ -226,908 +1119,3 @@ extern actor_process_profile_definition g_profile_OBJ_SO = { fopAc_ACTOR_e, // mActorType fopAc_CULLBOX_CUSTOM_e, // cullType }; - -/* 80CE3C0C-80CE3C18 00009C 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGAab */ -SECTION_DATA extern void* __vt__8cM3dGAab[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGAabFv, -}; - -/* 80CE3C18-80CE3C24 0000A8 000C+00 3/3 0/0 0/0 .data __vt__8cM3dGCyl */ -SECTION_DATA extern void* __vt__8cM3dGCyl[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__8cM3dGCylFv, -}; - -/* 80CE3C24-80CE3C48 0000B4 0024+00 2/2 0/0 0/0 .data __vt__12dBgS_ObjAcch */ -SECTION_DATA extern void* __vt__12dBgS_ObjAcch[9] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__12dBgS_ObjAcchFv, - (void*)NULL, - (void*)NULL, - (void*)func_80CE39CC, - (void*)NULL, - (void*)NULL, - (void*)func_80CE39C4, -}; - -/* 80CE3C48-80CE3C78 0000D8 0030+00 2/2 0/0 0/0 .data __vt__14dBgS_ObjGndChk */ -SECTION_DATA extern void* __vt__14dBgS_ObjGndChk[12] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__14dBgS_ObjGndChkFv, - (void*)NULL, - (void*)NULL, - (void*)func_80CE39AC, - (void*)NULL, - (void*)NULL, - (void*)func_80CE39BC, - (void*)NULL, - (void*)NULL, - (void*)func_80CE39B4, -}; - -/* 80CE3C78-80CE3C84 000108 000C+00 2/2 0/0 0/0 .data __vt__14daObj_So_HIO_c */ -SECTION_DATA extern void* __vt__14daObj_So_HIO_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__14daObj_So_HIO_cFv, -}; - -/* 80CE03CC-80CE03F0 0000EC 0024+00 1/1 0/0 0/0 .text __ct__14daObj_So_HIO_cFv */ -daObj_So_HIO_c::daObj_So_HIO_c() { - // NONMATCHING -} - -/* 80CE03F0-80CE04FC 000110 010C+00 1/0 0/0 0/0 .text daObj_So_Draw__FP12obj_so_class */ -static void daObj_So_Draw(obj_so_class* param_0) { - // NONMATCHING -} - -/* 80CE04FC-80CE0510 00021C 0014+00 1/1 0/0 0/0 .text - * ride_call_back_0__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -static void ride_call_back_0(dBgW* param_0, fopAc_ac_c* param_1, fopAc_ac_c* param_2) { - // NONMATCHING -} - -/* 80CE0510-80CE0524 000230 0014+00 1/1 0/0 0/0 .text - * ride_call_back_1__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */ -static void ride_call_back_1(dBgW* param_0, fopAc_ac_c* param_1, fopAc_ac_c* param_2) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CE39EC-80CE39F0 000004 0004+00 0/6 0/0 0/0 .rodata @3898 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_3898[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x80CE39EC, &lit_3898); -#pragma pop - -/* 80CE39F0-80CE39F4 000008 0004+00 0/1 0/0 0/0 .rodata @3899 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3899 = 510.0f; -COMPILER_STRIP_GATE(0x80CE39F0, &lit_3899); -#pragma pop - -/* 80CE39F4-80CE39F8 00000C 0004+00 0/3 0/0 0/0 .rodata @3900 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3900 = 1.0f / 10.0f; -COMPILER_STRIP_GATE(0x80CE39F4, &lit_3900); -#pragma pop - -/* 80CE39F8-80CE39FC 000010 0004+00 0/3 0/0 0/0 .rodata @3901 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3901 = 33.0f; -COMPILER_STRIP_GATE(0x80CE39F8, &lit_3901); -#pragma pop - -/* 80CE39FC-80CE3A00 000014 0004+00 0/3 0/0 0/0 .rodata @3902 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3902 = 200.0f; -COMPILER_STRIP_GATE(0x80CE39FC, &lit_3902); -#pragma pop - -/* 80CE0524-80CE0744 000244 0220+00 1/1 0/0 0/0 .text so_hasira__FP12obj_so_class */ -static void so_hasira(obj_so_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CE3A00-80CE3A04 000018 0004+00 0/1 0/0 0/0 .rodata @4004 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4004 = 210.0f; -COMPILER_STRIP_GATE(0x80CE3A00, &lit_4004); -#pragma pop - -/* 80CE3A04-80CE3A08 00001C 0004+00 0/5 0/0 0/0 .rodata @4005 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4005 = 1.0f; -COMPILER_STRIP_GATE(0x80CE3A04, &lit_4005); -#pragma pop - -/* 80CE3A08-80CE3A0C 000020 0004+00 0/2 0/0 0/0 .rodata @4006 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4006 = 4000.0f; -COMPILER_STRIP_GATE(0x80CE3A08, &lit_4006); -#pragma pop - -/* 80CE3A0C-80CE3A10 000024 0004+00 0/2 0/0 0/0 .rodata @4007 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4007 = 110.0f; -COMPILER_STRIP_GATE(0x80CE3A0C, &lit_4007); -#pragma pop - -/* 80CE3A10-80CE3A14 000028 0004+00 0/3 0/0 0/0 .rodata @4008 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4008 = 90.0f; -COMPILER_STRIP_GATE(0x80CE3A10, &lit_4008); -#pragma pop - -/* 80CE3A14-80CE3A18 00002C 0004+00 0/3 0/0 0/0 .rodata @4009 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4009 = 2.0f; -COMPILER_STRIP_GATE(0x80CE3A14, &lit_4009); -#pragma pop - -/* 80CE3A18-80CE3A1C 000030 0004+00 0/1 0/0 0/0 .rodata @4010 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4010 = 60.0f; -COMPILER_STRIP_GATE(0x80CE3A18, &lit_4010); -#pragma pop - -/* 80CE3A1C-80CE3A20 000034 0004+00 0/1 0/0 0/0 .rodata @4011 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4011 = 205.0f; -COMPILER_STRIP_GATE(0x80CE3A1C, &lit_4011); -#pragma pop - -/* 80CE3A20-80CE3A24 000038 0004+00 0/1 0/0 0/0 .rodata @4012 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4012 = -5.0f; -COMPILER_STRIP_GATE(0x80CE3A20, &lit_4012); -#pragma pop - -/* 80CE3A24-80CE3A28 00003C 0004+00 0/2 0/0 0/0 .rodata @4013 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4013 = 8.0f; -COMPILER_STRIP_GATE(0x80CE3A24, &lit_4013); -#pragma pop - -/* 80CE3A28-80CE3A2C 000040 0004+00 0/1 0/0 0/0 .rodata @4014 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4014 = 95.0f; -COMPILER_STRIP_GATE(0x80CE3A28, &lit_4014); -#pragma pop - -/* 80CE3A2C-80CE3A30 000044 0004+00 0/1 0/0 0/0 .rodata @4015 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4015 = 6000.0f; -COMPILER_STRIP_GATE(0x80CE3A2C, &lit_4015); -#pragma pop - -/* 80CE3A30-80CE3A34 000048 0004+00 0/2 0/0 0/0 .rodata @4016 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4016 = 30.0f; -COMPILER_STRIP_GATE(0x80CE3A30, &lit_4016); -#pragma pop - -/* 80CE3A34-80CE3A38 00004C 0004+00 0/4 0/0 0/0 .rodata @4017 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4017 = 5.0f; -COMPILER_STRIP_GATE(0x80CE3A34, &lit_4017); -#pragma pop - -/* 80CE3A38-80CE3A3C 000050 0004+00 0/2 0/0 0/0 .rodata @4018 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4018 = 20.0f; -COMPILER_STRIP_GATE(0x80CE3A38, &lit_4018); -#pragma pop - -/* 80CE3A3C-80CE3A40 000054 0004+00 0/1 0/0 0/0 .rodata @4019 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4019 = 15.0f; -COMPILER_STRIP_GATE(0x80CE3A3C, &lit_4019); -#pragma pop - -/* 80CE3A40-80CE3A44 000058 0004+00 0/1 0/0 0/0 .rodata @4020 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4020 = 6.0f; -COMPILER_STRIP_GATE(0x80CE3A40, &lit_4020); -#pragma pop - -/* 80CE3A44-80CE3A48 00005C 0004+00 0/1 0/0 0/0 .rodata @4021 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4021 = 32768.0f; -COMPILER_STRIP_GATE(0x80CE3A44, &lit_4021); -#pragma pop - -/* 80CE3A48-80CE3A4C 000060 0004+00 0/1 0/0 0/0 .rodata @4022 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4022 = 1000.0f; -COMPILER_STRIP_GATE(0x80CE3A48, &lit_4022); -#pragma pop - -/* 80CE3A4C-80CE3A50 000064 0004+00 0/3 0/0 0/0 .rodata @4023 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4023 = 10.0f; -COMPILER_STRIP_GATE(0x80CE3A4C, &lit_4023); -#pragma pop - -/* 80CE3A50-80CE3A54 000068 0004+00 0/2 0/0 0/0 .rodata @4024 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4024 = 4.0f; -COMPILER_STRIP_GATE(0x80CE3A50, &lit_4024); -#pragma pop - -/* 80CE0744-80CE0C54 000464 0510+00 4/4 0/0 0/0 .text part_set__FP12obj_so_classSc */ -static void part_set(obj_so_class* param_0, s8 param_1) { - // NONMATCHING -} - -/* 80CE0C54-80CE0C90 000974 003C+00 1/1 0/0 0/0 .text __dt__4cXyzFv */ -// cXyz::~cXyz() { -extern "C" void __dt__4cXyzFv() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CE3A54-80CE3A58 00006C 0004+00 0/2 0/0 0/0 .rodata @4085 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4085 = -10.0f; -COMPILER_STRIP_GATE(0x80CE3A54, &lit_4085); -#pragma pop - -/* 80CE3A58-80CE3A5C 000070 0004+00 0/2 0/0 0/0 .rodata @4086 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4086 = -1.0f; -COMPILER_STRIP_GATE(0x80CE3A58, &lit_4086); -#pragma pop - -/* 80CE3A5C-80CE3A60 000074 0004+00 0/2 0/0 0/0 .rodata @4087 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4087 = 2.5f; -COMPILER_STRIP_GATE(0x80CE3A5C, &lit_4087); -#pragma pop - -/* 80CE0C90-80CE0F58 0009B0 02C8+00 1/1 0/0 0/0 .text so_drop__FP12obj_so_class */ -static void so_drop(obj_so_class* param_0) { - // NONMATCHING -} - -/* 80CE0F58-80CE0F94 000C78 003C+00 1/1 0/0 0/0 .text __dt__5csXyzFv */ -// csXyz::~csXyz() { -extern "C" void __dt__5csXyzFv() { - // NONMATCHING -} - -/* 80CE0F94-80CE1084 000CB4 00F0+00 1/1 0/0 0/0 .text so_break__FP12obj_so_class */ -static void so_break(obj_so_class* param_0) { - // NONMATCHING -} - -/* 80CE1084-80CE12D8 000DA4 0254+00 1/1 0/0 0/0 .text so_hang__FP12obj_so_class */ -static void so_hang(obj_so_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CE3A60-80CE3A64 000078 0004+00 0/1 0/0 0/0 .rodata @4205 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4205 = -60.0f; -COMPILER_STRIP_GATE(0x80CE3A60, &lit_4205); -#pragma pop - -/* 80CE3A64-80CE3A68 00007C 0004+00 0/1 0/0 0/0 .rodata @4206 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4206 = -200.0f; -COMPILER_STRIP_GATE(0x80CE3A64, &lit_4206); -#pragma pop - -/* 80CE12D8-80CE14DC 000FF8 0204+00 1/1 0/0 0/0 .text action__FP12obj_so_class */ -static void action(obj_so_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CE3A68-80CE3A6C 000080 0004+00 0/1 0/0 0/0 .rodata @4943 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4943 = 12000.0f; -COMPILER_STRIP_GATE(0x80CE3A68, &lit_4943); -#pragma pop - -/* 80CE3A6C-80CE3A70 000084 0004+00 0/1 0/0 0/0 .rodata @4944 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4944 = 70.0f; -COMPILER_STRIP_GATE(0x80CE3A6C, &lit_4944); -#pragma pop - -/* 80CE3A70-80CE3A74 000088 0004+00 0/2 0/0 0/0 .rodata @4945 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4945 = 40.0f; -COMPILER_STRIP_GATE(0x80CE3A70, &lit_4945); -#pragma pop - -/* 80CE3A74-80CE3A78 00008C 0004+00 0/1 0/0 0/0 .rodata @4946 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4946 = -100.0f; -COMPILER_STRIP_GATE(0x80CE3A74, &lit_4946); -#pragma pop - -/* 80CE3A78-80CE3A7C 000090 0004+00 0/1 0/0 0/0 .rodata @4947 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4947 = 2570.0f; -COMPILER_STRIP_GATE(0x80CE3A78, &lit_4947); -#pragma pop - -/* 80CE3A7C-80CE3A80 000094 0004+00 0/1 0/0 0/0 .rodata @4948 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4948 = 2000.0f; -COMPILER_STRIP_GATE(0x80CE3A7C, &lit_4948); -#pragma pop - -/* 80CE3A80-80CE3A84 000098 0004+00 0/1 0/0 0/0 .rodata @4949 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4949 = -3.0f / 10.0f; -COMPILER_STRIP_GATE(0x80CE3A80, &lit_4949); -#pragma pop - -/* 80CE3A84-80CE3A88 00009C 0004+00 0/2 0/0 0/0 .rodata @4950 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4950 = 0.5f; -COMPILER_STRIP_GATE(0x80CE3A84, &lit_4950); -#pragma pop - -/* 80CE3A88-80CE3A8C 0000A0 0004+00 0/1 0/0 0/0 .rodata @4951 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4951 = 400.0f; -COMPILER_STRIP_GATE(0x80CE3A88, &lit_4951); -#pragma pop - -/* 80CE3A8C-80CE3A90 0000A4 0004+00 0/2 0/0 0/0 .rodata @4952 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4952 = 300.0f; -COMPILER_STRIP_GATE(0x80CE3A8C, &lit_4952); -#pragma pop - -/* 80CE3A90-80CE3A94 0000A8 0004+00 0/1 0/0 0/0 .rodata @4953 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4953 = -1024.0f; -COMPILER_STRIP_GATE(0x80CE3A90, &lit_4953); -#pragma pop - -/* 80CE3A94-80CE3A98 0000AC 0004+00 0/2 0/0 0/0 .rodata @4954 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4954 = 500.0f; -COMPILER_STRIP_GATE(0x80CE3A94, &lit_4954); -#pragma pop - -/* 80CE3A98-80CE3A9C 0000B0 0004+00 0/1 0/0 0/0 .rodata @4955 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4955 = 180.0f; -COMPILER_STRIP_GATE(0x80CE3A98, &lit_4955); -#pragma pop - -/* 80CE3A9C-80CE3AA0 0000B4 0004+00 0/1 0/0 0/0 .rodata @4956 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4956 = -80.0f; -COMPILER_STRIP_GATE(0x80CE3A9C, &lit_4956); -#pragma pop - -/* 80CE3AA0-80CE3AA4 0000B8 0004+00 0/1 0/0 0/0 .rodata @4957 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4957 = 165.0f; -COMPILER_STRIP_GATE(0x80CE3AA0, &lit_4957); -#pragma pop - -/* 80CE3AA4-80CE3AA8 0000BC 0004+00 0/1 0/0 0/0 .rodata @4958 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4958 = -90.0f; -COMPILER_STRIP_GATE(0x80CE3AA4, &lit_4958); -#pragma pop - -/* 80CE3AA8-80CE3AAC 0000C0 0004+00 0/1 0/0 0/0 .rodata @4959 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4959 = -87.0f; -COMPILER_STRIP_GATE(0x80CE3AA8, &lit_4959); -#pragma pop - -/* 80CE3AAC-80CE3AB0 0000C4 0004+00 0/1 0/0 0/0 .rodata @4960 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4960 = 2500.0f; -COMPILER_STRIP_GATE(0x80CE3AAC, &lit_4960); -#pragma pop - -/* 80CE3AB0-80CE3AB4 0000C8 0004+00 0/1 0/0 0/0 .rodata @4961 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4961 = 3.0f / 10.0f; -COMPILER_STRIP_GATE(0x80CE3AB0, &lit_4961); -#pragma pop - -/* 80CE3AB4-80CE3AB8 0000CC 0004+00 0/1 0/0 0/0 .rodata @4962 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4962 = 20000.0f; -COMPILER_STRIP_GATE(0x80CE3AB4, &lit_4962); -#pragma pop - -/* 80CE3AB8-80CE3AC0 0000D0 0008+00 0/1 0/0 0/0 .rodata @4963 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4963[8] = { - 0x3F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80CE3AB8, &lit_4963); -#pragma pop - -/* 80CE3AC0-80CE3AC8 0000D8 0008+00 0/1 0/0 0/0 .rodata @4964 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4964[8] = { - 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80CE3AC0, &lit_4964); -#pragma pop - -/* 80CE3AC8-80CE3AD0 0000E0 0008+00 0/1 0/0 0/0 .rodata @4965 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4965[8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80CE3AC8, &lit_4965); -#pragma pop - -/* 80CE3AD0-80CE3AD4 0000E8 0004+00 0/3 0/0 0/0 .rodata @4966 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4966 = 50.0f; -COMPILER_STRIP_GATE(0x80CE3AD0, &lit_4966); -#pragma pop - -/* 80CE3AD4-80CE3AD8 0000EC 0004+00 0/1 0/0 0/0 .rodata @4967 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4967 = 100.0f; -COMPILER_STRIP_GATE(0x80CE3AD4, &lit_4967); -#pragma pop - -/* 80CE3AD8-80CE3ADC 0000F0 0004+00 0/1 0/0 0/0 .rodata @4968 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4968 = 9.0f / 20.0f; -COMPILER_STRIP_GATE(0x80CE3AD8, &lit_4968); -#pragma pop - -/* 80CE3ADC-80CE3AE0 0000F4 0004+00 0/1 0/0 0/0 .rodata @4969 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4969 = -20.0f; -COMPILER_STRIP_GATE(0x80CE3ADC, &lit_4969); -#pragma pop - -/* 80CE3AE0-80CE3AE4 0000F8 0004+00 0/1 0/0 0/0 .rodata @4970 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4970 = 80.0f; -COMPILER_STRIP_GATE(0x80CE3AE0, &lit_4970); -#pragma pop - -/* 80CE3AE4-80CE3AE8 0000FC 0004+00 0/1 0/0 0/0 .rodata @4971 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4971 = 77.0f; -COMPILER_STRIP_GATE(0x80CE3AE4, &lit_4971); -#pragma pop - -/* 80CE3AE8-80CE3AF0 000100 0004+04 0/1 0/0 0/0 .rodata @4972 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4972[1 + 1 /* padding */] = { - -30.0f, - /* padding */ - 0.0f, -}; -COMPILER_STRIP_GATE(0x80CE3AE8, &lit_4972); -#pragma pop - -/* 80CE3AF0-80CE3AF8 000108 0008+00 0/1 0/0 0/0 .rodata @4979 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4979[8] = { - 0x43, 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80CE3AF0, &lit_4979); -#pragma pop - -/* 80CE3B60-80CE3B60 000178 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80CE3B60 = "F_SP108"; -#pragma pop - -/* 80CE14DC-80CE2A64 0011FC 1588+00 1/1 0/0 0/0 .text part_move__FP12obj_so_class */ -static void part_move(obj_so_class* param_0) { - // NONMATCHING -} - -/* 80CE2A64-80CE2ADC 002784 0078+00 4/3 0/0 0/0 .text __dt__14dBgS_ObjGndChkFv */ -// dBgS_ObjGndChk::~dBgS_ObjGndChk() { -extern "C" void __dt__14dBgS_ObjGndChkFv() { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CE3AF8-80CE3AFC 000110 0004+00 0/1 0/0 0/0 .rodata @5077 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5077 = -550.0f; -COMPILER_STRIP_GATE(0x80CE3AF8, &lit_5077); -#pragma pop - -/* 80CE3AFC-80CE3B00 000114 0004+00 0/1 0/0 0/0 .rodata @5078 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5078 = 3300.0f; -COMPILER_STRIP_GATE(0x80CE3AFC, &lit_5078); -#pragma pop - -/* 80CE3B00-80CE3B04 000118 0004+00 0/1 0/0 0/0 .rodata @5079 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5079 = -600.0f; -COMPILER_STRIP_GATE(0x80CE3B00, &lit_5079); -#pragma pop - -/* 80CE3B04-80CE3B08 00011C 0004+00 0/1 0/0 0/0 .rodata @5080 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5080 = 12459.0f; -COMPILER_STRIP_GATE(0x80CE3B04, &lit_5080); -#pragma pop - -/* 80CE3B08-80CE3B0C 000120 0004+00 0/2 0/0 0/0 .rodata @5081 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5081 = 3152.0f; -COMPILER_STRIP_GATE(0x80CE3B08, &lit_5081); -#pragma pop - -/* 80CE3B0C-80CE3B10 000124 0004+00 0/1 0/0 0/0 .rodata @5082 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5082 = 4628.0f; -COMPILER_STRIP_GATE(0x80CE3B0C, &lit_5082); -#pragma pop - -/* 80CE3B10-80CE3B14 000128 0004+00 0/1 0/0 0/0 .rodata @5083 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5083 = 150.0f; -COMPILER_STRIP_GATE(0x80CE3B10, &lit_5083); -#pragma pop - -/* 80CE3B14-80CE3B18 00012C 0004+00 0/1 0/0 0/0 .rodata @5084 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5084 = 3602.0f; -COMPILER_STRIP_GATE(0x80CE3B14, &lit_5084); -#pragma pop - -/* 80CE3B18-80CE3B1C 000130 0004+00 0/1 0/0 0/0 .rodata @5085 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5085 = 65.0f; -COMPILER_STRIP_GATE(0x80CE3B18, &lit_5085); -#pragma pop - -/* 80CE3B1C-80CE3B20 000134 0004+00 0/1 0/0 0/0 .rodata @5086 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5086 = 1.0f / 20.0f; -COMPILER_STRIP_GATE(0x80CE3B1C, &lit_5086); -#pragma pop - -/* 80CE3B20-80CE3B24 000138 0004+00 0/1 0/0 0/0 .rodata @5087 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5087 = -4264.0f; -COMPILER_STRIP_GATE(0x80CE3B20, &lit_5087); -#pragma pop - -/* 80CE3B24-80CE3B28 00013C 0004+00 0/1 0/0 0/0 .rodata @5088 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5088 = 302.0f; -COMPILER_STRIP_GATE(0x80CE3B24, &lit_5088); -#pragma pop - -/* 80CE3B28-80CE3B2C 000140 0004+00 0/1 0/0 0/0 .rodata @5089 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5089 = -2330.0f; -COMPILER_STRIP_GATE(0x80CE3B28, &lit_5089); -#pragma pop - -/* 80CE3B2C-80CE3B30 000144 0004+00 0/1 0/0 0/0 .rodata @5090 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5090 = 16400.0f; -COMPILER_STRIP_GATE(0x80CE3B2C, &lit_5090); -#pragma pop - -/* 80CE3B30-80CE3B34 000148 0004+00 0/1 0/0 0/0 .rodata @5091 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5091 = 3529.0f; -COMPILER_STRIP_GATE(0x80CE3B30, &lit_5091); -#pragma pop - -/* 80CE3B34-80CE3B38 00014C 0004+00 0/1 0/0 0/0 .rodata @5092 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5092 = 8385.0f; -COMPILER_STRIP_GATE(0x80CE3B34, &lit_5092); -#pragma pop - -/* 80CE3B38-80CE3B3C 000150 0004+00 0/1 0/0 0/0 .rodata @5093 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5093 = 16200.0f; -COMPILER_STRIP_GATE(0x80CE3B38, &lit_5093); -#pragma pop - -/* 80CE3B3C-80CE3B40 000154 0004+00 0/1 0/0 0/0 .rodata @5094 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5094 = 3481.0f; -COMPILER_STRIP_GATE(0x80CE3B3C, &lit_5094); -#pragma pop - -/* 80CE3B40-80CE3B44 000158 0004+00 0/1 0/0 0/0 .rodata @5095 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5095 = 8418.0f; -COMPILER_STRIP_GATE(0x80CE3B40, &lit_5095); -#pragma pop - -/* 80CE2ADC-80CE2EAC 0027FC 03D0+00 1/1 0/0 0/0 .text demo_camera__FP12obj_so_class */ -static void demo_camera(obj_so_class* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CE3C90-80CE3C94 000008 0004+00 2/2 0/0 0/0 .bss None */ -static u8 data_80CE3C90[4]; - -/* 80CE3C94-80CE3CA0 00000C 000C+00 1/1 0/0 0/0 .bss @3774 */ -static u8 lit_3774[12]; - -/* 80CE3CA0-80CE3CAC 000018 000C+00 3/3 0/0 0/0 .bss l_HIO */ -static u8 l_HIO[12]; - -/* 80CE2EAC-80CE2F60 002BCC 00B4+00 2/1 0/0 0/0 .text daObj_So_Execute__FP12obj_so_class - */ -static void daObj_So_Execute(obj_so_class* param_0) { - // NONMATCHING -} - -/* 80CE2F60-80CE2F68 002C80 0008+00 1/0 0/0 0/0 .text daObj_So_IsDelete__FP12obj_so_class - */ -static bool daObj_So_IsDelete(obj_so_class* param_0) { - return true; -} - -/* ############################################################################################## */ -/* 80CE3B60-80CE3B60 000178 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80CE3B68 = "Obj_so"; -#pragma pop - -/* 80CE2F68-80CE3018 002C88 00B0+00 1/0 0/0 0/0 .text daObj_So_Delete__FP12obj_so_class - */ -static void daObj_So_Delete(obj_so_class* param_0) { - // NONMATCHING -} - -/* 80CE3018-80CE327C 002D38 0264+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */ -static void useHeapInit(fopAc_ac_c* param_0) { - // NONMATCHING -} - -/* ############################################################################################## */ -/* 80CE3B44-80CE3B48 00015C 0004+00 0/1 0/0 0/0 .rodata @5327 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5327 = -300.0f; -COMPILER_STRIP_GATE(0x80CE3B44, &lit_5327); -#pragma pop - -/* 80CE3B48-80CE3B4C 000160 0004+00 0/1 0/0 0/0 .rodata @5328 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5328 = -500.0f; -COMPILER_STRIP_GATE(0x80CE3B48, &lit_5328); -#pragma pop - -/* 80CE3B4C-80CE3B50 000164 0004+00 0/1 0/0 0/0 .rodata @5329 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5329 = 26.0f; -COMPILER_STRIP_GATE(0x80CE3B4C, &lit_5329); -#pragma pop - -/* 80CE3B50-80CE3B54 000168 0004+00 0/1 0/0 0/0 .rodata @5330 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5330 = 1100.0f; -COMPILER_STRIP_GATE(0x80CE3B50, &lit_5330); -#pragma pop - -/* 80CE3B54-80CE3B58 00016C 0004+00 0/1 0/0 0/0 .rodata @5331 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5331 = -5374.0f; -COMPILER_STRIP_GATE(0x80CE3B54, &lit_5331); -#pragma pop - -/* 80CE3B58-80CE3B5C 000170 0004+00 0/1 0/0 0/0 .rodata @5332 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5332 = 4280.0f; -COMPILER_STRIP_GATE(0x80CE3B58, &lit_5332); -#pragma pop - -/* 80CE3B5C-80CE3B60 000174 0004+00 0/1 0/0 0/0 .rodata @5333 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_5333 = -2342.0f; -COMPILER_STRIP_GATE(0x80CE3B5C, &lit_5333); -#pragma pop - -/* 80CE327C-80CE36D0 002F9C 0454+00 1/0 0/0 0/0 .text daObj_So_Create__FP10fopAc_ac_c */ -static void daObj_So_Create(fopAc_ac_c* param_0) { - // NONMATCHING -} - -/* 80CE36D0-80CE379C 0033F0 00CC+00 1/1 0/0 0/0 .text __dt__8dCcD_CylFv */ -// dCcD_Cyl::~dCcD_Cyl() { -extern "C" void __dt__8dCcD_CylFv() { - // NONMATCHING -} - -/* 80CE379C-80CE3820 0034BC 0084+00 1/1 0/0 0/0 .text __ct__8dCcD_CylFv */ -// dCcD_Cyl::dCcD_Cyl() { -extern "C" void __ct__8dCcD_CylFv() { - // NONMATCHING -} - -/* 80CE3820-80CE3868 003540 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */ -// cM3dGCyl::~cM3dGCyl() { -extern "C" void __dt__8cM3dGCylFv() { - // NONMATCHING -} - -/* 80CE3868-80CE38B0 003588 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGAabFv */ -// cM3dGAab::~cM3dGAab() { -extern "C" void __dt__8cM3dGAabFv() { - // NONMATCHING -} - -/* 80CE38B0-80CE3920 0035D0 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */ -// dBgS_ObjAcch::~dBgS_ObjAcch() { -extern "C" void __dt__12dBgS_ObjAcchFv() { - // NONMATCHING -} - -/* 80CE3920-80CE3924 003640 0004+00 1/1 0/0 0/0 .text __ct__5csXyzFv */ -// csXyz::csXyz() { -extern "C" void __ct__5csXyzFv() { - /* empty function */ -} - -/* 80CE3924-80CE3928 003644 0004+00 1/1 0/0 0/0 .text __ct__4cXyzFv */ -// cXyz::cXyz() { -extern "C" void __ct__4cXyzFv() { - /* empty function */ -} - -/* 80CE3928-80CE3970 003648 0048+00 2/1 0/0 0/0 .text __dt__14daObj_So_HIO_cFv */ -daObj_So_HIO_c::~daObj_So_HIO_c() { - // NONMATCHING -} - -/* 80CE3970-80CE39AC 003690 003C+00 0/0 1/0 0/0 .text __sinit_d_a_obj_so_cpp */ -void __sinit_d_a_obj_so_cpp() { - // NONMATCHING -} - -#pragma push -#pragma force_active on -REGISTER_CTORS(0x80CE3970, __sinit_d_a_obj_so_cpp); -#pragma pop - -/* 80CE39AC-80CE39B4 0036CC 0008+00 1/0 0/0 0/0 .text @20@__dt__14dBgS_ObjGndChkFv */ -static void func_80CE39AC() { - // NONMATCHING -} - -/* 80CE39B4-80CE39BC 0036D4 0008+00 1/0 0/0 0/0 .text @76@__dt__14dBgS_ObjGndChkFv */ -static void func_80CE39B4() { - // NONMATCHING -} - -/* 80CE39BC-80CE39C4 0036DC 0008+00 1/0 0/0 0/0 .text @60@__dt__14dBgS_ObjGndChkFv */ -static void func_80CE39BC() { - // NONMATCHING -} - -/* 80CE39C4-80CE39CC 0036E4 0008+00 1/0 0/0 0/0 .text @36@__dt__12dBgS_ObjAcchFv */ -static void func_80CE39C4() { - // NONMATCHING -} - -/* 80CE39CC-80CE39D4 0036EC 0008+00 1/0 0/0 0/0 .text @20@__dt__12dBgS_ObjAcchFv */ -static void func_80CE39CC() { - // NONMATCHING -} - -/* 80CE3B60-80CE3B60 000178 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ diff --git a/src/d/d_com_inf_game.cpp b/src/d/d_com_inf_game.cpp index a2e471297ca..8d1f8f394f1 100644 --- a/src/d/d_com_inf_game.cpp +++ b/src/d/d_com_inf_game.cpp @@ -2443,10 +2443,10 @@ void dComIfGs_shake_kandelaar() { g_dComIfG_gameInfo.field_0x1ddfa = 1; } -bool dComIfGs_shake_kandelaar_check() { - bool check = false; +int dComIfGs_shake_kandelaar_check() { + int check = 0; if (g_dComIfG_gameInfo.field_0x1ddfa == 2) { - check = true; + check = 1; } return check; }