From b24a048cfed356fd7c6eb454f1deb126f8a46981 Mon Sep 17 00:00:00 2001 From: randomsalience Date: Sun, 21 May 2023 09:47:53 -0400 Subject: [PATCH 1/5] d_a_tag_evtarea mostly done, work on d_a_npc --- .../JSystem/J3DGraphAnimator/J3DMaterialAnm.h | 24 +- include/SSystem/SComponent/c_cc_d.h | 1 + include/SSystem/SComponent/c_lib.h | 12 +- include/SSystem/SComponent/c_math.h | 4 +- include/d/a/d_a_npc.h | 213 +++-- include/d/bg/d_bg_s_acch.h | 1 + include/d/com/d_com_inf_game.h | 18 +- include/d/event/d_event.h | 9 +- include/d/msg/d_msg_object.h | 2 +- include/f_op/f_op_actor_mng.h | 6 +- include/m_Do/m_Do_ext.h | 5 +- include/m_Do/m_Do_mtx.h | 4 + .../d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.h | 26 +- rel/d/a/d_a_bg/d_a_bg.cpp | 30 +- .../a/tag/d_a_tag_evtarea/d_a_tag_evtarea.cpp | 447 +++++----- src/d/a/d_a_alink_demo.inc | 6 +- src/d/a/d_a_npc.cpp | 838 ++++++++++++++---- src/d/com/d_com_inf_game.cpp | 8 +- src/d/d_resorce.cpp | 30 +- src/d/event/d_event.cpp | 22 +- src/d/event/d_event_manager.cpp | 2 +- src/d/s/d_s_logo.cpp | 9 - src/f_op/f_op_actor_mng.cpp | 6 +- src/m_Do/m_Do_ext.cpp | 4 +- 24 files changed, 1153 insertions(+), 574 deletions(-) diff --git a/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h b/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h index b87b1f0d0aa..ebef351f8b6 100644 --- a/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h +++ b/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h @@ -9,8 +9,8 @@ typedef struct _GXColorS10 GXColorS10; class J3DMatColorAnm { public: - /* 8003B2B8 */ ~J3DMatColorAnm(); - /* 8003B2F4 */ J3DMatColorAnm(); + /* 8003B2B8 */ ~J3DMatColorAnm() {}; + /* 8003B2F4 */ J3DMatColorAnm() {}; void operator=(J3DMatColorAnm const& other) { mAnmColor = other.mAnmColor; @@ -30,9 +30,9 @@ class J3DMatColorAnm { class J3DTexNoAnm { public: - /* 8003B1F8 */ ~J3DTexNoAnm(); - /* 8003B240 */ J3DTexNoAnm(); - /* 8003C82C */ virtual void calc(u16*) const; + /* 8003B1F8 */ ~J3DTexNoAnm() {}; + /* 8003B240 */ J3DTexNoAnm() {}; + /* 8003C82C */ virtual void calc(u16* param_0) const { mAnmTexPattern->getTexNo(field_0x4, param_0); } void operator=(J3DTexNoAnm const& other) { mAnmTexPattern = other.mAnmTexPattern; @@ -52,8 +52,8 @@ class J3DTexNoAnm { class J3DTexMtxAnm { public: - /* 8003B264 */ ~J3DTexMtxAnm(); - /* 8003B2A0 */ J3DTexMtxAnm(); + /* 8003B264 */ ~J3DTexMtxAnm() {}; + /* 8003B2A0 */ J3DTexMtxAnm() {}; void operator=(J3DTexMtxAnm const& other) { mAnmTransform = other.mAnmTransform; @@ -75,8 +75,8 @@ class J3DTexMtxAnm { class J3DTevKColorAnm { public: - /* 8003B150 */ ~J3DTevKColorAnm(); - /* 8003B18C */ J3DTevKColorAnm(); + /* 8003B150 */ ~J3DTevKColorAnm() {}; + /* 8003B18C */ J3DTevKColorAnm() {}; void operator=(J3DTevKColorAnm const& other) { mAnmTevReg = other.mAnmTevReg; @@ -96,8 +96,8 @@ class J3DTevKColorAnm { class J3DTevColorAnm { public: - /* 8003B1A4 */ ~J3DTevColorAnm(); - /* 8003B1E0 */ J3DTevColorAnm(); + /* 8003B1A4 */ ~J3DTevColorAnm() {}; + /* 8003B1E0 */ J3DTevColorAnm() {}; void operator=(J3DTevColorAnm const& other) { mAnmTevReg = other.mAnmTevReg; @@ -126,7 +126,7 @@ class J3DMaterialAnm { /* 8032C664 */ void setTevColorAnm(int, J3DTevColorAnm*); /* 8032C6A4 */ void setTevKColorAnm(int, J3DTevKColorAnm*); - /* 800A4820 */ virtual ~J3DMaterialAnm(); + /* 800A4820 */ virtual ~J3DMaterialAnm() {}; /* 8032C3C4 */ virtual void calc(J3DMaterial*) const; const J3DTexMtxAnm& getTexMtxAnm(int i) const { return mTexMtxAnm[i]; } diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h index fe834acc38c..b8b1ba29fa4 100644 --- a/include/SSystem/SComponent/c_cc_d.h +++ b/include/SSystem/SComponent/c_cc_d.h @@ -458,6 +458,7 @@ class cCcD_ObjHitInf { void OffAtVsPlayerBit() { mObjAt.OffSPrmBit(0xC); } void OnAtVsPlayerBit() { mObjAt.OnSPrmBit(0xC); } void OnCoSPrmBit(u32 flag) { mObjCo.OnSPrmBit(flag); } + void SetTgSPrm(u32 prm) { mObjTg.SetSPrm(prm); } void SetCoSPrm(u32 prm) { mObjCo.SetSPrm(prm); } }; // Size = 0x40 diff --git a/include/SSystem/SComponent/c_lib.h b/include/SSystem/SComponent/c_lib.h index e0e9c2084cb..f1488363f6c 100644 --- a/include/SSystem/SComponent/c_lib.h +++ b/include/SSystem/SComponent/c_lib.h @@ -87,7 +87,17 @@ inline T cLib_maxLimit(T val, T max) { } template -T cLib_calcTimer(T* val); +T cLib_calcTimer(T* value) { + if (*value != 0) { + *value = *value - 1; + } + return *value; +} + +template +T cLib_getRndValue(T min, T range) { + return (T)(min + cM_rndF((f32)range)); +} void MtxInit(void); void MtxTrans(f32, f32, f32, u8); diff --git a/include/SSystem/SComponent/c_math.h b/include/SSystem/SComponent/c_math.h index 1a9f67eefe5..ae0d7985093 100644 --- a/include/SSystem/SComponent/c_math.h +++ b/include/SSystem/SComponent/c_math.h @@ -18,11 +18,11 @@ float cM_rndF2(float); float cM_rndFX2(float); inline f32 cM_scos(s16 s) { - return JMath::sincosTable_.table[static_cast(s) >> 3].second; + return JMASCos(s); } inline f32 cM_ssin(s16 s) { - return JMath::sincosTable_.table[static_cast(s) >> 3].first; + return JMASSin(s); } inline s16 cM_deg2s(f32 val) { diff --git a/include/d/a/d_a_npc.h b/include/d/a/d_a_npc.h index 40620561ef4..1a0607c5565 100644 --- a/include/d/a/d_a_npc.h +++ b/include/d/a/d_a_npc.h @@ -4,6 +4,7 @@ #include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" #include "Z2AudioLib/Z2Creature.h" #include "d/com/d_com_inf_game.h" +#include "d/a/d_a_player.h" #include "d/d_path.h" #include "d/msg/d_msg_flow.h" #include "d/particle/d_particle_copoly.h" @@ -407,11 +408,16 @@ class daNpcT_c : public fopAc_ac_c { STATIC_ASSERT(sizeof(daNpcT_c) == 0xE40); +BOOL daNpcT_chkEvtBit(u32 i_idx); +BOOL daNpcT_chkPointInArea(cXyz param_0, cXyz param_1, cXyz param_2, s16 param_3, int param_4); + class daNpcF_ActorMngr_c { private: /* 0x0 */ u32 mActorID; public: + daNpcF_ActorMngr_c() { initialize(); } + /* 801506B0 */ void initialize(); /* 801506D8 */ void entry(unsigned int); /* 801506BC */ void entry(fopAc_ac_c*); @@ -422,19 +428,19 @@ class daNpcF_ActorMngr_c { }; class daNpcF_c : public fopAc_ac_c { -private: +protected: /* 0x568 */ mDoExt_McaMorfSO* mMcaMorf; /* 0x56C */ mDoExt_bckAnm mBckAnm; /* 0x588 */ mDoExt_btpAnm mBtpAnm; /* 0x5A0 */ mDoExt_btkAnm mBtkAnm; /* 0x5B8 */ mDoExt_brkAnm mBrkAnm; - /* 0x5D0 */ dBgS_ObjAcch field_0x5d0; - /* 0x7A8 */ dCcD_Stts field_0x7a8; - /* 0x7E4 */ dBgS_AcchCir field_0x7e4; + /* 0x5D0 */ dBgS_ObjAcch mAcch; + /* 0x7A8 */ dCcD_Stts mStts; + /* 0x7E4 */ dBgS_AcchCir mAcchCir; /* 0x824 */ daNpcF_ActorMngr_c field_0x824; /* 0x82C */ daNpcF_ActorMngr_c field_0x82c[5]; - /* 0x854 */ cXyz field_0x854[3]; - /* 0x878 */ cXyz field_0x878; + /* 0x854 */ cXyz mLookatPos[3]; + /* 0x878 */ cXyz mLookPos; /* 0x884 */ cXyz field_0x884; /* 0x890 */ cXyz field_0x890; /* 0x89C */ cXyz field_0x89c; @@ -443,20 +449,20 @@ class daNpcF_c : public fopAc_ac_c { /* 0x8C0 */ cXyz field_0x8c0; /* 0x8CC */ cXyz field_0x8cc; /* 0x8D8 */ cXyz field_0x8d8; - /* 0x8E4 */ cXyz field_0x8e4; + /* 0x8E4 */ cXyz mHeadPos; /* 0x8F0 */ csXyz field_0x8f0; /* 0x8F6 */ csXyz field_0x8f6; /* 0x8FC */ csXyz field_0x8fc; /* 0x902 */ csXyz field_0x902; /* 0x908 */ csXyz field_0x908[3]; /* 0x91A */ csXyz field_0x91a[3]; - /* 0x92C */ int field_0x92c; + /* 0x92C */ int mCutIndex; /* 0x930 */ u32 field_0x930; - /* 0x934 */ u32 field_0x934; - /* 0x938 */ u32 field_0x938; - /* 0x93C */ u32 field_0x93c[5]; + /* 0x934 */ int field_0x934; // index in 0x93c to not decrement timer (if 0x938 is nonzero) + /* 0x938 */ int field_0x938; // controls whether to use field 0x934 + /* 0x93C */ int field_0x93c[5]; // timers for removing actors from 0x82c /* 0x950 */ int field_0x950; - /* 0x954 */ int field_0x954; + /* 0x954 */ int field_0x954; // a timer /* 0x958 */ int field_0x958; /* 0x95C */ int field_0x95c; /* 0x960 */ int field_0x960; @@ -464,19 +470,19 @@ class daNpcF_c : public fopAc_ac_c { /* 0x968 */ int field_0x968; /* 0x96C */ int field_0x96c; /* 0x970 */ f32 field_0x970; - /* 0x974 */ f32 field_0x974; - /* 0x978 */ f32 field_0x978; - /* 0x97C */ f32 field_0x97c; + /* 0x974 */ f32 mExpressionMorfOverride; + /* 0x978 */ f32 mExpressionMorf; + /* 0x97C */ f32 mMotionMorfOverride; /* 0x980 */ f32 field_0x980; /* 0x984 */ f32 field_0x984[3]; /* 0x990 */ u16 field_0x990; - /* 0x990 */ u16 field_0x992; - /* 0x990 */ u16 field_0x994; - /* 0x990 */ u16 field_0x996; + /* 0x992 */ u16 field_0x992; + /* 0x994 */ u16 field_0x994; + /* 0x996 */ s16 field_0x996; /* 0x998 */ u16 field_0x998; - /* 0x99C */ u32 field_0x99c; + /* 0x99C */ u32 mAnmFlags; /* 0x9A0 */ u32 field_0x9a0; - /* 0x9A4 */ int field_0x9a4; + /* 0x9A4 */ profile_method_class* field_0x9a4; /* 0x9A8 */ int field_0x9a8; /* 0x9AC */ int field_0x9ac; /* 0x9B0 */ u32 field_0x9b0; @@ -485,17 +491,17 @@ class daNpcF_c : public fopAc_ac_c { /* 0x9C4 */ cXyz field_0x9c4; /* 0x9D0 */ u16 field_0x9d0; /* 0x9D2 */ u16 field_0x9d2; - /* 0x9D4 */ u16 field_0x9d4; - /* 0x9D6 */ u16 field_0x9d6; - /* 0x9D8 */ u16 field_0x9d8; - /* 0x9DA */ u16 field_0x9da; - /* 0x9DC */ u16 field_0x9dc; - /* 0x9DE */ u16 field_0x9de; - /* 0x9E0 */ u16 field_0x9e0; - /* 0x9E2 */ u16 field_0x9e2; - /* 0x9E4 */ u16 field_0x9e4; - /* 0x9E6 */ u16 field_0x9e6; - /* 0x9E8 */ u8 field_0x9e8; + /* 0x9D4 */ s16 field_0x9d4; + /* 0x9D6 */ s16 mExpressionPhase; + /* 0x9D8 */ s16 mExpressionPrevPhase; + /* 0x9DA */ s16 mMotionPhase; + /* 0x9DC */ s16 mMotionPrevPhase; + /* 0x9DE */ s16 mExpression; + /* 0x9E0 */ s16 mMotion; + /* 0x9E2 */ u16 mMotionLoops; + /* 0x9E4 */ u16 mExpressionLoops; + /* 0x9E6 */ u16 mOrderEvtNo; + /* 0x9E8 */ s8 field_0x9e8; /* 0x9E9 */ u8 field_0x9e9; /* 0x9EA */ u8 field_0x9ea; /* 0x9EB */ u8 field_0x9eb; @@ -507,7 +513,7 @@ class daNpcF_c : public fopAc_ac_c { /* 0x9F1 */ u8 field_0x9f1; /* 0x9F2 */ bool mHide; /* 0x9f3 */ u8 field_0x9f3; - /* 0x9F4 */ u8 field_0x9f4; + /* 0x9F4 */ bool field_0x9f4; // controls whether setHitodamaPrtcl is called /* 0x9F5 */ u8 field_0x9f5; /* 0x9F6 */ u8 field_0x9f6; /* 0x9F8 */ dMsgFlow_c mFlow; @@ -516,50 +522,73 @@ class daNpcF_c : public fopAc_ac_c { /* 0xAD4 */ dBgS_LinChk field_0xad4; public: - struct daNpcF_anmPlayData {}; - - /* 80152014 */ void execute(); - /* 801522AC */ void draw(int, int, f32, _GXColorS10*, int); + struct daNpcF_anmPlayData { + u16 idx; + f32 morf; + s32 numLoops; + }; + + enum AnmFlags { + ANM_PAUSE_MORF = 0x0001, + ANM_PAUSE_BTK = 0x0002, + ANM_PAUSE_BRK = 0x0004, + ANM_PLAY_MORF = 0x0008, + ANM_PLAY_BTK = 0x0010, + ANM_PLAY_BRK = 0x0020, + ANM_PAUSE_BCK = 0x0040, + ANM_PAUSE_BTP = 0x0080, + ANM_PLAY_BCK = 0x0100, + ANM_PLAY_BTP = 0x0200, + ANM_FLAG_400 = 0x0400, + ANM_FLAG_800 = 0x0800, + ANM_PAUSE_EXPRESSION = 0x1000, + ANM_MOTION_FLAGS = ANM_PAUSE_MORF | ANM_PAUSE_BTK | ANM_PAUSE_BRK | ANM_PLAY_MORF | ANM_PLAY_BTK | ANM_PLAY_BRK, + ANM_EXPRESSION_FLAGS = ANM_PAUSE_BCK | ANM_PAUSE_BTP | ANM_PLAY_BCK | ANM_PLAY_BTP | ANM_FLAG_400 | ANM_FLAG_800 | ANM_PAUSE_EXPRESSION, + ANM_PAUSE_ALL = ANM_PAUSE_MORF | ANM_PAUSE_BTK | ANM_PAUSE_BRK | ANM_PAUSE_BCK | ANM_PAUSE_BTP | ANM_PAUSE_EXPRESSION, + }; + + /* 80152014 */ BOOL execute(); + /* 801522AC */ BOOL draw(int, int, f32, _GXColorS10*, int); /* 80152614 */ void tgHitCallBack(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*); /* 80152654 */ void srchAttnActor1(void*, void*); /* 801526E8 */ void* srchActor(void*, void*); /* 801528C8 */ void initialize(); - /* 80152B2C */ void getTrnsfrmKeyAnmP(char*, int); - /* 80152B68 */ void getTexPtrnAnmP(char*, int); - /* 80152BA4 */ void getTexSRTKeyAnmP(char*, int); - /* 80152BE0 */ void getTevRegKeyAnmP(char*, int); - /* 80152C1C */ void setMcaMorfAnm(J3DAnmTransformKey*, f32, f32, int, int, int); - /* 80152C80 */ void setBckAnm(J3DAnmTransform*, f32, int, int, int, bool); - /* 80152CC4 */ void setBtpAnm(J3DAnmTexPattern*, J3DModelData*, f32, int); - /* 80152D04 */ void setBtkAnm(J3DAnmTextureSRTKey*, J3DModelData*, f32, int); - /* 80152D44 */ void setBrkAnm(J3DAnmTevRegKey*, J3DModelData*, f32, int); + /* 80152B2C */ J3DAnmTransformKey* getTrnsfrmKeyAnmP(char*, int); + /* 80152B68 */ J3DAnmTexPattern* getTexPtrnAnmP(char*, int); + /* 80152BA4 */ J3DAnmTextureSRTKey* getTexSRTKeyAnmP(char*, int); + /* 80152BE0 */ J3DAnmTevRegKey* getTevRegKeyAnmP(char*, int); + /* 80152C1C */ BOOL setMcaMorfAnm(J3DAnmTransformKey* i_anm, f32 i_rate, f32 i_morf, int i_attr, int i_start, int i_end); + /* 80152C80 */ BOOL setBckAnm(J3DAnmTransform* i_bck, f32 i_rate, int i_attr, int i_start, int i_end, bool i_modify); + /* 80152CC4 */ BOOL setBtpAnm(J3DAnmTexPattern* i_btp, J3DModelData* i_modelData, f32 i_rate, int i_attr); + /* 80152D04 */ BOOL setBtkAnm(J3DAnmTextureSRTKey* i_btk, J3DModelData* i_modelData, f32 i_rate, int i_attr); + /* 80152D44 */ BOOL setBrkAnm(J3DAnmTevRegKey* i_brk, J3DModelData* i_modelData, f32 i_rate, int i_attr); /* 80152D84 */ void setEnvTevColor(); /* 80152DE0 */ void setRoomNo(); - /* 80152E24 */ void chkEndAnm(f32); - /* 80152EC4 */ void chkEndAnm(J3DFrameCtrl*, f32); - /* 80152F40 */ void playAllAnm(); + /* 80152E24 */ BOOL chkEndAnm(f32); + /* 80152EC4 */ BOOL chkEndAnm(J3DFrameCtrl*, f32); + /* 80152F40 */ BOOL playAllAnm(); /* 80153150 */ void playExpressionAnm(daNpcF_c::daNpcF_anmPlayData***); /* 80153264 */ void playMotionAnm(daNpcF_c::daNpcF_anmPlayData***); /* 8015337C */ void setLookatMtx(int, int*, f32); /* 80153578 */ void hitChk2(dCcD_Cyl*, int, int); /* 80153658 */ void setDamage(int, int, int); - /* 80153718 */ void ctrlMsgAnm(int&, int&, fopAc_ac_c*, int); + /* 80153718 */ int ctrlMsgAnm(int&, int&, fopAc_ac_c*, int); /* 8015387C */ void orderEvent(int, char*, u16, u16, u8, u16); /* 80153954 */ void changeEvent(char*, char*, u16, u16); - /* 801539F0 */ void chkActorInSight(fopAc_ac_c*, f32); - /* 80153A78 */ void chkActorInArea(fopAc_ac_c*, cXyz, cXyz, s16); - /* 80153BDC */ void chkActorInAttnArea(fopAc_ac_c*, fopAc_ac_c*, int); + /* 801539F0 */ BOOL chkActorInSight(fopAc_ac_c*, f32); + /* 80153A78 */ BOOL chkActorInArea(fopAc_ac_c*, cXyz, cXyz, s16); + /* 80153BDC */ BOOL chkActorInAttnArea(fopAc_ac_c*, fopAc_ac_c*, int); /* 80153D1C */ int initTalk(int, fopAc_ac_c**); - /* 80153D84 */ void talkProc(int*, int, fopAc_ac_c**); - /* 80153EF4 */ void turn(s16, f32, int); + /* 80153D84 */ BOOL talkProc(int*, int, fopAc_ac_c**); + /* 80153EF4 */ BOOL turn(s16, f32, int); /* 801540A4 */ void step(s16, int, int, int); /* 80154250 */ void setAngle(s16); - /* 80154278 */ void getDistTableIdx(int, int); - /* 801542A0 */ int getEvtAreaTagP(int, int); + /* 80154278 */ u8 getDistTableIdx(int, int); + /* 801542A0 */ fopAc_ac_c* getEvtAreaTagP(int, int); /* 8015436C */ void getAttnActorP(int, void* (*)(void*, void*), f32, f32, f32, f32, s16, int, int); - /* 80154730 */ void chkActorInSight2(fopAc_ac_c*, f32, s16); + /* 80154730 */ BOOL chkActorInSight2(fopAc_ac_c*, f32, s16); /* 80154834 */ bool chkPointInArea(cXyz, cXyz, f32, f32, f32, s16); /* 801548F4 */ bool chkPointInArea(cXyz, cXyz, cXyz, s16); /* 8015496C */ cXyz getAttentionPos(fopAc_ac_c*); @@ -568,8 +597,8 @@ class daNpcF_c : public fopAc_ac_c { /* 80155BF4 */ virtual ~daNpcF_c(); /* 80155BC8 */ virtual void setParam(); - /* 80155BC0 */ virtual bool main(); - /* 80155BD8 */ virtual bool ctrlBtk(); + /* 80155BC0 */ virtual BOOL main(); + /* 80155BD8 */ virtual BOOL ctrlBtk(); /* 80155BBC */ virtual void adjustShapeAngle(); /* 8015276C */ virtual void setMtx(); /* 801527FC */ virtual void setMtx2(); @@ -578,13 +607,19 @@ class daNpcF_c : public fopAc_ac_c { /* 80155BE0 */ virtual bool setExpressionAnm(int, bool); /* 80155EC8 */ virtual bool setExpressionBtp(int); /* 80155BF0 */ virtual void setExpression(int, f32); - /* 80155BE8 */ virtual void setMotionAnm(int, f32); + /* 80155BE8 */ virtual void setMotionAnm(int i_idx, f32 i_morf); /* 80155BEC */ virtual void setMotion(int, f32, int); - /* 80155BD0 */ virtual bool drawDbgInfo(); + /* 80155BD0 */ virtual BOOL drawDbgInfo(); /* 80155BCC */ virtual void drawOtherMdls(); + BOOL chkActorInSpeakArea(fopAc_ac_c* param_1, fopAc_ac_c* param_2) { return chkActorInAttnArea(param_1, param_2, mAttentionInfo.field_0x0[3]); } + BOOL chkPlayerInSpeakArea(fopAc_ac_c* i_actor) { return chkActorInSpeakArea(daPy_getPlayerActorClass(), i_actor); } + BOOL chkActorInTalkArea(fopAc_ac_c* param_1, fopAc_ac_c* param_2) { return chkActorInAttnArea(param_1, param_2, mAttentionInfo.field_0x0[1]); } + BOOL chkPlayerInTalkArea(fopAc_ac_c* i_actor) { return chkActorInTalkArea(daPy_getPlayerActorClass(), i_actor); } + BOOL checkHide() { return mHide || (field_0x9f4 && !dComIfGs_wolfeye_effect_check()); } + static u8 const mCcDObjInfo[48]; - static u8 mCcDCyl[68]; + static dCcD_SrcCyl mCcDCyl; static u8 mCcDSph[64]; static u8 mFindActorPList[400]; static s32 mFindCount; @@ -593,8 +628,12 @@ class daNpcF_c : public fopAc_ac_c { STATIC_ASSERT(sizeof(daNpcF_c) == 0xB48); +BOOL daNpcF_chkEvtBit(u32 i_idx); +BOOL daNpcF_chkTmpBit(u32 i_idx); +void daNpcF_offTmpBit(u32 i_idx); int daNpcF_getPlayerInfoFromPlayerList(int param_0, int i_roomNo, cXyz& param_2, csXyz& param_3); +int daNpcF_getGroundAngle(cBgS_PolyInfo*, s16); struct daBaseNpc_matAnm_c { /* 8014D884 */ void calc(J3DMaterial*) const; @@ -765,20 +804,26 @@ class daBaseNpc_moveBgActor_c : public daBaseNpc_c { static u8 m_set_func[4]; }; +// should inherit J3DMaterialAnm but this breaks matching class daNpcF_MatAnm_c { +public: + /* 0x000 */ J3DMaterialAnm mBase; private: - /* 0x000 */ J3DMaterialAnm mMaterialAnm; /* 0x0F4 */ mutable f32 field_0xF4; /* 0x0F8 */ mutable f32 field_0xF8; - /* 0x0FC */ f32 mTranslationX; - /* 0x100 */ f32 mTranslationY; - /* 0x104 */ u8 field_0x104; + /* 0x0FC */ f32 mNowOffsetX; + /* 0x100 */ f32 mNowOffsetY; + /* 0x104 */ u8 mEyeMoveFlag; /* 0x105 */ u8 field_0x105; public: + daNpcF_MatAnm_c() { initialize(); } /* 80150738 */ void initialize(); /* 8015075C */ void calc(J3DMaterial*) const; /* 80155ED0 */ ~daNpcF_MatAnm_c(); + void setNowOffsetX(float i_nowOffsetX) { mNowOffsetX = i_nowOffsetX; } + void setNowOffsetY(float i_nowOffsetY) { mNowOffsetY = i_nowOffsetY; } + void onEyeMoveFlag() { mEyeMoveFlag = 1; } }; class daNpcF_SPCurve_c { @@ -824,31 +869,16 @@ class daNpcF_Path_c { cXyz* getPntPos(); // finish }; -class daNpcF_MoveBgActor_c { -private: - -public: - /* 80155B54 */ ~daNpcF_MoveBgActor_c(); - /* 80155E88 */ bool CreateHeap(); - /* 80155E90 */ bool Create(); - /* 80155E98 */ bool Delete(); - /* 80155EA0 */ bool Execute(f32 (**)[3][4]); - /* 80155EA8 */ bool Draw(); - /* 80155EB0 */ bool IsDelete(); - /* 80155EB8 */ bool ToFore(); - /* 80155EC0 */ bool ToBack(); -}; - class daNpcF_Lookat_c { private: /* 0x00 */ cXyz field_0x00[4]; - /* 0x30 */ int field_0x30; + /* 0x30 */ cXyz* mAttnPos; /* 0x34 */ csXyz field_0x34[4]; /* 0x4C */ csXyz field_0x4c[4]; /* 0x64 */ csXyz field_0x64[4]; /* 0x7C */ csXyz mRotAngle[4]; /* 0x94 */ u8 field_0x94[4]; - /* 0x98 */ void* vtable; + /* 0x98 vtable */ public: /* 80151038 */ void initialize(); @@ -861,7 +891,24 @@ class daNpcF_Lookat_c { /* 80151B68 */ void calcMoveDisAngle(int, cXyz*, csXyz*, cXyz, int, int); /* 80151F54 */ void setRotAngle(); /* 80151FE0 */ void clrRotAngle(); + virtual ~daNpcF_Lookat_c() {} + cXyz* getAttnPos() { return mAttnPos; } + void setAttnPos(cXyz* i_attnPos) { mAttnPos = i_attnPos; } }; +class daNpcF_MoveBgActor_c { +private: + +public: + /* 80155B54 */ ~daNpcF_MoveBgActor_c(); + /* 80155E88 */ bool CreateHeap(); + /* 80155E90 */ bool Create(); + /* 80155E98 */ bool Delete(); + /* 80155EA0 */ bool Execute(f32 (**)[3][4]); + /* 80155EA8 */ bool Draw(); + /* 80155EB0 */ bool IsDelete(); + /* 80155EB8 */ bool ToFore(); + /* 80155EC0 */ bool ToBack(); +}; #endif /* D_A_D_A_NPC_H */ diff --git a/include/d/bg/d_bg_s_acch.h b/include/d/bg/d_bg_s_acch.h index 8088837a38d..407b02b5c12 100644 --- a/include/d/bg/d_bg_s_acch.h +++ b/include/d/bg/d_bg_s_acch.h @@ -126,6 +126,7 @@ class dBgS_Acch : public cBgS_Chk, public dBgS_Chk { void ClrWallHit() { m_flags &= ~WALL_HIT; } void SetRoofNone() { m_flags |= ROOF_NONE; } void SetRoofHit() { m_flags |= ROOF_HIT; } + void SetWaterNone() { m_flags |= WATER_NONE; } bool ChkWallHit() { return m_flags & WALL_HIT; } void OffLineCheckHit() { m_flags &= ~LINE_CHECK_HIT; } void OffLineCheck() { m_flags &= ~LINE_CHECK; } diff --git a/include/d/com/d_com_inf_game.h b/include/d/com/d_com_inf_game.h index e03010cf773..d91fd67d034 100644 --- a/include/d/com/d_com_inf_game.h +++ b/include/d/com/d_com_inf_game.h @@ -924,7 +924,7 @@ void dComIfGs_offZoneSwitch(int i_swBit, int i_roomNo); void dComIfGs_offOneZoneSwitch(int i_swBit, int i_roomNo); s8 dComIfGp_getReverb(int i_roomNo); void dComIfGs_gameStart(); -bool dComIfGs_wolfeye_effect_check(); +BOOL dComIfGs_wolfeye_effect_check(); BOOL dComIfGs_Wolf_Change_Check(); void dComIfGs_onVisitedRoom(int param_0); void dComIfGs_offVisitedRoom(int param_0); @@ -2878,22 +2878,22 @@ inline int dComIfGp_evmng_startDemo(int param_0) { return dComIfGp_getPEvtManager()->setStartDemo(param_0); } -inline void* dComIfGp_event_getTalkPartner() { +inline fopAc_ac_c* dComIfGp_event_getTalkPartner() { u32 t = g_dComIfG_gameInfo.play.getEvent().mPtT; return g_dComIfG_gameInfo.play.getEvent().convPId(t); } -inline void* dComIfGp_event_getItemPartner() { +inline fopAc_ac_c* dComIfGp_event_getItemPartner() { u32 i = g_dComIfG_gameInfo.play.getEvent().mPtI; return g_dComIfG_gameInfo.play.getEvent().convPId(i); } -inline void* dComIfGp_event_getPt1() { +inline fopAc_ac_c* dComIfGp_event_getPt1() { u32 pt1 = g_dComIfG_gameInfo.play.getEvent().mPt1; return g_dComIfG_gameInfo.play.getEvent().convPId(pt1); } -inline void* dComIfGp_event_getPt2() { +inline fopAc_ac_c* dComIfGp_event_getPt2() { u32 pt2 = g_dComIfG_gameInfo.play.getEvent().mPt2; return g_dComIfG_gameInfo.play.getEvent().convPId(pt2); } @@ -2917,6 +2917,10 @@ inline u16 i_dComIfGp_event_chkEventFlag(u16 flag) { return g_dComIfG_gameInfo.play.getEvent().chkEventFlag(flag); } +inline BOOL dComIfGp_event_chkTalkXY() { + return g_dComIfG_gameInfo.play.getEvent().chkTalkXY(); +} + inline void dComIfGp_event_setCullRate(f32 f) { g_dComIfG_gameInfo.play.getEvent().setCullRate(f); } @@ -2949,6 +2953,10 @@ inline int dComIfGp_evmng_getMySubstanceNum(int index, char* name) { return dComIfGp_getPEvtManager()->getMySubstanceNum(index, name); } +inline BOOL dComIfGp_evmng_ChkPresentEnd() { + return dComIfGp_getPEvtManager()->ChkPresentEnd(); +} + inline int dComIfGp_evmng_checkStartDemo() { return dComIfGp_getPEvtManager()->checkStartDemo(); } diff --git a/include/d/event/d_event.h b/include/d/event/d_event.h index 6fdd1171430..2eb3dc5e497 100644 --- a/include/d/event/d_event.h +++ b/include/d/event/d_event.h @@ -125,7 +125,7 @@ class dEvt_control_c { dStage_MapEvent_dt_c* getStageEventDt(); void sceneChange(int exitId); u32 getPId(void*); - void* convPId(unsigned int); + fopAc_ac_c* convPId(unsigned int); void* getStbDemoData(char* resName); static dStage_MapEvent_dt_c* searchMapEventData(u8 mapToolID, s32 roomNo); static dStage_MapEvent_dt_c* searchMapEventData(u8 mapToolID); @@ -154,11 +154,12 @@ class dEvt_control_c { void onFlag2(u16 flag) { mFlag2 |= flag; } void offFlag2(u16 flag) { mFlag2 &= ~flag; } void setCullRate(f32 f) { mCullRate = f; } + BOOL chkTalkXY() { return field_0xed == 1 || field_0xed == 2; } bool i_isOrderOK() { return mEventStatus == 0 || mEventStatus == 2; } - void* getPt1() { return convPId(mPt1); } - void* getPt2() { return convPId(mPt2); } - void* getPtT() { return convPId(mPtT); } + fopAc_ac_c* getPt1() { return convPId(mPt1); } + fopAc_ac_c* getPt2() { return convPId(mPt2); } + fopAc_ac_c* getPtT() { return convPId(mPtT); } bool isChangeOK(void* param_0) { return mChangeOK == param_0; } u8 getPreItemNo() { return mPreItemNo; } diff --git a/include/d/msg/d_msg_object.h b/include/d/msg/d_msg_object.h index bef18638c38..c829b8105ba 100644 --- a/include/d/msg/d_msg_object.h +++ b/include/d/msg/d_msg_object.h @@ -136,7 +136,7 @@ class dMsgObject_c : public msg_class { /* 80238320 */ static void onMsgSend(); /* 8023834C */ void offMsgSend(); /* 80238378 */ void isMsgSend(); - /* 802383A4 */ bool isMouthCheck(); + /* 802383A4 */ static bool isMouthCheck(); /* 802383D0 */ static u32 getMessageID(); /* 802383E4 */ void getSmellTypeMessageID(); /* 80238410 */ static void setSmellType(u8); diff --git a/include/f_op/f_op_actor_mng.h b/include/f_op/f_op_actor_mng.h index a702fbf32c5..22d2ae1eb2b 100644 --- a/include/f_op/f_op_actor_mng.h +++ b/include/f_op/f_op_actor_mng.h @@ -473,9 +473,9 @@ s32 fopAcM_orderMapToolAutoNextEvent(fopAc_ac_c*, u8, s16, u16, u16, u16); s32 fopAcM_orderPotentialEvent(fopAc_ac_c*, u16, u16, u16); s32 fopAcM_orderItemEvent(fopAc_ac_c*, u16, u16); s32 fopAcM_orderTreasureEvent(fopAc_ac_c*, fopAc_ac_c*, u16, u16); -void* fopAcM_getTalkEventPartner(const fopAc_ac_c*); -void* fopAcM_getItemEventPartner(const fopAc_ac_c*); -void* fopAcM_getEventPartner(const fopAc_ac_c*); +fopAc_ac_c* fopAcM_getTalkEventPartner(const fopAc_ac_c*); +fopAc_ac_c* fopAcM_getItemEventPartner(const fopAc_ac_c*); +fopAc_ac_c* fopAcM_getEventPartner(const fopAc_ac_c*); static void fopAcM_onSwitch(fopAc_ac_c const* param_0, int param_1); s32 fopAcM_createItemForPresentDemo(cXyz const* p_pos, int i_itemNo, u8 param_2, int i_itemBitNo, diff --git a/include/m_Do/m_Do_ext.h b/include/m_Do/m_Do_ext.h index ab3d2667457..131a7000c86 100644 --- a/include/m_Do/m_Do_ext.h +++ b/include/m_Do/m_Do_ext.h @@ -26,6 +26,8 @@ class mDoExt_baseAnm { s16 i_endF); /* 8000D428 */ int play(); + J3DFrameCtrl* getFrameCtrl() { return &mFrameCtrl; } + f32 getPlaySpeed() { return mFrameCtrl.getRate(); } void setPlaySpeed(f32 speed) { mFrameCtrl.setRate(speed); } f32 getFrame() { return mFrameCtrl.getFrame(); } f32 getEndFrame() { return mFrameCtrl.getEnd(); } @@ -272,6 +274,7 @@ class mDoExt_morf_c { f32 getEndFrame() { return mFrameCtrl.getEnd(); } BOOL checkFrame(f32 frame) { return mFrameCtrl.checkPass(frame); } J3DAnmTransform* getAnm() { return mpAnm; } + void changeAnm(J3DAnmTransform* anm) { mpAnm = anm; } bool isStop() { bool stopped = true; @@ -299,7 +302,7 @@ class mDoExt_McaMorfSO : public mDoExt_morf_c { int, Z2Creature*, u32, u32); /* 800108F0 */ int create(J3DModelData*, mDoExt_McaMorfCallBack1_c*, mDoExt_McaMorfCallBack2_c*, J3DAnmTransform*, int, f32, int, int, Z2Creature*, u32, u32); - /* 80010E70 */ void setAnm(J3DAnmTransform*, int, f32, f32, f32, f32); + /* 80010E70 */ void setAnm(J3DAnmTransform* i_anm, int i_attr, f32 i_morf, f32 i_rate, f32 i_start, f32 i_end); /* 800110B0 */ int play(u32, s8); /* 80011154 */ void updateDL(); /* 800111C0 */ void entryDL(); diff --git a/include/m_Do/m_Do_mtx.h b/include/m_Do/m_Do_mtx.h index 2d66ab19cec..5a0da4fca99 100644 --- a/include/m_Do/m_Do_mtx.h +++ b/include/m_Do/m_Do_mtx.h @@ -59,6 +59,10 @@ inline void cMtx_multVec(Mtx mtx, const Vec* src, Vec* dst) { mDoMtx_multVec(mtx, src, dst); } +inline void cMtx_copy(const Mtx src, Mtx dst) { + mDoMtx_copy(src, dst); +} + inline void mDoMtx_multVecZero(MtxP param_0, Vec* param_1) { param_1->x = param_0[0][3]; param_1->y = param_0[1][3]; diff --git a/include/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.h b/include/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.h index 108bd6bf8d8..61dc4fbec24 100644 --- a/include/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.h +++ b/include/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.h @@ -1,6 +1,30 @@ #ifndef D_A_TAG_EVTAREA_H #define D_A_TAG_EVTAREA_H -#include "dolphin/types.h" +#include "f_op/f_op_actor_mng.h" + +class daTag_EvtArea_c : public fopAc_ac_c { +public: + /* 8048C4F8 */ cPhs__Step create(); + /* 8048C728 */ bool Delete(); + /* 8048C730 */ bool Execute(); + /* 8048C894 */ bool Draw(); + /* 8048C89C */ BOOL isDelete(); + /* 8048C94C */ BOOL chkPointInArea(cXyz, cXyz); + /* 8048CD08 */ BOOL chkPointInArea(cXyz); + /* 8048CD68 */ virtual ~daTag_EvtArea_c(); + + inline s32 getType(); + inline u32 getOnEvtBit(); + inline u32 getOffEvtBit(); + inline u8 getBitSW(); + inline u8 getBitSW2(); + +private: + /* 0x568 vtable */ + /* 0x56C */ u8 field_0x56c; +}; + +STATIC_ASSERT(sizeof(daTag_EvtArea_c) == 0x570); #endif /* D_A_TAG_EVTAREA_H */ diff --git a/rel/d/a/d_a_bg/d_a_bg.cpp b/rel/d/a/d_a_bg/d_a_bg.cpp index 8299f55d9f5..9ecc9c554a7 100644 --- a/rel/d/a/d_a_bg/d_a_bg.cpp +++ b/rel/d/a/d_a_bg/d_a_bg.cpp @@ -208,7 +208,8 @@ static asm int createMatAnm(J3DModelData* param_0, u16 param_1) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTevKColorAnm::~J3DTevKColorAnm() { +// asm J3DTevKColorAnm::~J3DTevKColorAnm() { +extern "C" asm void __dt__15J3DTevKColorAnmFv() { nofralloc #include "asm/rel/d/a/d_a_bg/d_a_bg/__dt__15J3DTevKColorAnmFv.s" } @@ -218,7 +219,8 @@ asm J3DTevKColorAnm::~J3DTevKColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTevKColorAnm::J3DTevKColorAnm() { +// asm J3DTevKColorAnm::J3DTevKColorAnm() { +extern "C" asm void __ct__15J3DTevKColorAnmFv() { nofralloc #include "asm/rel/d/a/d_a_bg/d_a_bg/__ct__15J3DTevKColorAnmFv.s" } @@ -228,7 +230,8 @@ asm J3DTevKColorAnm::J3DTevKColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTevColorAnm::~J3DTevColorAnm() { +// asm J3DTevColorAnm::~J3DTevColorAnm() { +extern "C" asm void __dt__14J3DTevColorAnmFv() { nofralloc #include "asm/rel/d/a/d_a_bg/d_a_bg/__dt__14J3DTevColorAnmFv.s" } @@ -238,7 +241,8 @@ asm J3DTevColorAnm::~J3DTevColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTevColorAnm::J3DTevColorAnm() { +// asm J3DTevColorAnm::J3DTevColorAnm() { +extern "C" asm void __ct__14J3DTevColorAnmFv() { nofralloc #include "asm/rel/d/a/d_a_bg/d_a_bg/__ct__14J3DTevColorAnmFv.s" } @@ -323,7 +327,8 @@ extern "C" asm void __dt__11J3DTexNoAnmFv() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTexNoAnm::J3DTexNoAnm() { +// asm J3DTexNoAnm::J3DTexNoAnm() { +extern "C" asm void __ct__11J3DTexNoAnmFv() { nofralloc #include "asm/rel/d/a/d_a_bg/d_a_bg/__ct__11J3DTexNoAnmFv.s" } @@ -333,7 +338,8 @@ asm J3DTexNoAnm::J3DTexNoAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTexMtxAnm::~J3DTexMtxAnm() { +// asm J3DTexMtxAnm::~J3DTexMtxAnm() { +extern "C" asm void __dt__12J3DTexMtxAnmFv() { nofralloc #include "asm/rel/d/a/d_a_bg/d_a_bg/__dt__12J3DTexMtxAnmFv.s" } @@ -343,7 +349,8 @@ asm J3DTexMtxAnm::~J3DTexMtxAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTexMtxAnm::J3DTexMtxAnm() { +// asm J3DTexMtxAnm::J3DTexMtxAnm() { +extern "C" asm void __ct__12J3DTexMtxAnmFv() { nofralloc #include "asm/rel/d/a/d_a_bg/d_a_bg/__ct__12J3DTexMtxAnmFv.s" } @@ -353,7 +360,8 @@ asm J3DTexMtxAnm::J3DTexMtxAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DMatColorAnm::~J3DMatColorAnm() { +// asm J3DMatColorAnm::~J3DMatColorAnm() { +extern "C" asm void __dt__14J3DMatColorAnmFv() { nofralloc #include "asm/rel/d/a/d_a_bg/d_a_bg/__dt__14J3DMatColorAnmFv.s" } @@ -363,7 +371,8 @@ asm J3DMatColorAnm::~J3DMatColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DMatColorAnm::J3DMatColorAnm() { +// asm J3DMatColorAnm::J3DMatColorAnm() { +extern "C" asm void __ct__14J3DMatColorAnmFv() { nofralloc #include "asm/rel/d/a/d_a_bg/d_a_bg/__ct__14J3DMatColorAnmFv.s" } @@ -1091,7 +1100,8 @@ asm int daBg_c::create() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DTexNoAnm::calc(u16* param_0) const { +// asm void J3DTexNoAnm::calc(u16* param_0) const { +extern "C" asm void calc__11J3DTexNoAnmCFPUs() { nofralloc #include "asm/rel/d/a/d_a_bg/d_a_bg/calc__11J3DTexNoAnmCFPUs.s" } diff --git a/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.cpp b/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.cpp index 0e4a5d41416..d302e6a830d 100644 --- a/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.cpp +++ b/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.cpp @@ -4,161 +4,107 @@ // #include "rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.h" +#include "JSystem/JKernel/JKRHeap.h" +#include "d/a/d_a_npc.h" +#include "d/d_procname.h" #include "dol2asm.h" -#include "dolphin/types.h" -// -// Types: -// - -struct mDoMtx_stack_c { - static u8 now[48]; -}; - -struct fopAc_ac_c { - /* 80018B64 */ fopAc_ac_c(); - /* 80018C8C */ ~fopAc_ac_c(); -}; - -struct Vec {}; - -struct cXyz { - /* 80266AE4 */ void operator+(Vec const&) const; - /* 80266B34 */ void operator-(Vec const&) const; -}; - -struct daTag_EvtArea_c { - /* 8048C4F8 */ void create(); - /* 8048C728 */ bool Delete(); - /* 8048C730 */ void Execute(); - /* 8048C894 */ bool Draw(); - /* 8048C89C */ void isDelete(); - /* 8048CD08 */ void chkPointInArea(cXyz); - /* 8048C94C */ void chkPointInArea(cXyz, cXyz); - /* 8048CD68 */ ~daTag_EvtArea_c(); -}; - -struct dSv_info_c { - /* 80035360 */ void isSwitch(int, int) const; -}; - -// -// Forward References: -// - -extern "C" void create__15daTag_EvtArea_cFv(); -extern "C" bool Delete__15daTag_EvtArea_cFv(); -extern "C" void Execute__15daTag_EvtArea_cFv(); -extern "C" bool Draw__15daTag_EvtArea_cFv(); -extern "C" void isDelete__15daTag_EvtArea_cFv(); -extern "C" void chkPointInArea__15daTag_EvtArea_cF4cXyz4cXyz(); -extern "C" static void daTag_EvtArea_Create__FPv(); -extern "C" static void daTag_EvtArea_Delete__FPv(); -extern "C" static void daTag_EvtArea_Execute__FPv(); -extern "C" static void daTag_EvtArea_Draw__FPv(); -extern "C" static bool daTag_EvtArea_IsDelete__FPv(); -extern "C" void chkPointInArea__15daTag_EvtArea_cF4cXyz(); -extern "C" void __dt__15daTag_EvtArea_cFv(); - -// -// External References: -// - -extern "C" void mDoMtx_YrotS__FPA4_fs(); -extern "C" void __ct__10fopAc_ac_cFv(); -extern "C" void __dt__10fopAc_ac_cFv(); -extern "C" void fopAcM_delete__FP10fopAc_ac_c(); -extern "C" void isSwitch__10dSv_info_cCFii(); -extern "C" void daNpcT_chkPointInArea__F4cXyz4cXyz4cXyzsi(); -extern "C" void daNpcT_chkEvtBit__FUl(); -extern "C" void __pl__4cXyzCFRC3Vec(); -extern "C" void __mi__4cXyzCFRC3Vec(); -extern "C" void __dl__FPv(); -extern "C" void PSMTXMultVec(); -extern "C" void PSVECSubtract(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_29(); -extern "C" extern void* g_fopAc_Method[8]; -extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */]; -extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" extern u8 g_dComIfG_gameInfo[122384]; -extern "C" extern u8 mStayNo__20dStage_roomControl_c[4]; - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 8048CDD0-8048CDD4 000000 0004+00 2/2 0/0 0/0 .rodata @3853 */ -SECTION_RODATA static f32 const lit_3853 = 100.0f; -COMPILER_STRIP_GATE(0x8048CDD0, &lit_3853); +s32 daTag_EvtArea_c::getType() { + u8 type = (u8)shape_angle.z; + return type == 0xff ? 0 : type; +} -/* 8048CDE8-8048CE48 -00001 0060+00 1/1 0/0 0/0 .data @3857 */ -SECTION_DATA static void* lit_3857[24] = { - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x88), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0xB4), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0xE0), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x10C), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x154), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x154), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x154), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x154), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x154), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x180), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x1A0), - (void*)(((char*)create__15daTag_EvtArea_cFv) + 0x1A0), -}; +u32 daTag_EvtArea_c::getOnEvtBit() { + u32 ret = fopAcM_GetParam(this) & 0xfff; + return ret == 0xfff ? -1 : ret; +} -/* 8048CE48-8048CE68 -00001 0020+00 1/0 0/0 0/0 .data daTag_EvtArea_MethodTable */ -SECTION_DATA static void* daTag_EvtArea_MethodTable[8] = { - (void*)daTag_EvtArea_Create__FPv, - (void*)daTag_EvtArea_Delete__FPv, - (void*)daTag_EvtArea_Execute__FPv, - (void*)daTag_EvtArea_IsDelete__FPv, - (void*)daTag_EvtArea_Draw__FPv, - (void*)NULL, - (void*)NULL, - (void*)NULL, -}; +u32 daTag_EvtArea_c::getOffEvtBit() { + u32 ret = (fopAcM_GetParam(this) & 0xfff000) >> 12; + return ret == 0xfff ? -1 : ret; +} -/* 8048CE68-8048CE98 -00001 0030+00 0/0 0/0 1/0 .data g_profile_TAG_EVTAREA */ -SECTION_DATA extern void* g_profile_TAG_EVTAREA[12] = { - (void*)0xFFFFFFFD, (void*)0x0008FFFD, - (void*)0x02E90000, (void*)&g_fpcLf_Method, - (void*)0x00000570, (void*)NULL, - (void*)NULL, (void*)&g_fopAc_Method, - (void*)0x011F0000, (void*)&daTag_EvtArea_MethodTable, - (void*)0x00044000, (void*)0x000E0000, -}; +u8 daTag_EvtArea_c::getBitSW() { + return orig.angle.x & 0xff; +} -/* 8048CE98-8048CEA4 0000B0 000C+00 2/2 0/0 0/0 .data __vt__15daTag_EvtArea_c */ -SECTION_DATA extern void* __vt__15daTag_EvtArea_c[3] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__15daTag_EvtArea_cFv, -}; +u8 daTag_EvtArea_c::getBitSW2() { + return (orig.angle.x & 0xff00) >> 8; +} /* 8048C4F8-8048C728 000078 0230+00 2/1 0/0 0/0 .text create__15daTag_EvtArea_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daTag_EvtArea_c::create() { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/create__15daTag_EvtArea_cFv.s" +cPhs__Step daTag_EvtArea_c::create() { + if (!fopAcM_CheckCondition(this, 8)) { + new (this) daTag_EvtArea_c(); + fopAcM_OnCondition(this, 8); + } + + switch (getType()) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + mScale.x *= 100.0f; + mScale.y *= 100.0f; + mScale.z *= 100.0f; + break; + case 13: + mScale.x *= 200.0f; + mScale.y *= 200.0f; + mScale.z *= 200.0f; + break; + case 14: + mScale.x *= 100.0f; + mScale.y *= 100.0f; + mScale.z *= 100.0f; + break; + case 15: + mScale.x *= 0.5f; + mScale.z *= 0.5f; + mScale.x *= 1000.0f; + mScale.y *= 1000.0f; + mScale.z *= 1000.0f; + break; + case 16: + case 17: + case 18: + case 19: + case 20: + mScale.x *= 100.0f; + mScale.y *= 100.0f; + mScale.z *= 100.0f; + break; + case 21: + mScale.x *= 1000.0f; + mScale.z *= 1000.0f; + break; + case 22: + case 23: + mScale.x *= 100.0f; + mScale.y *= 100.0f; + mScale.z *= 100.0f; + break; + default: + mScale.x *= 100.0f; + mScale.y *= 100.0f; + mScale.z *= 100.0f; + } + if (isDelete()) { + return cPhs_ERROR_e; + } else { + field_0x56c = 0; + return cPhs_COMPLEATE_e; + } } -#pragma pop /* 8048C728-8048C730 0002A8 0008+00 1/1 0/0 0/0 .text Delete__15daTag_EvtArea_cFv */ bool daTag_EvtArea_c::Delete() { @@ -166,14 +112,31 @@ bool daTag_EvtArea_c::Delete() { } /* 8048C730-8048C894 0002B0 0164+00 1/1 0/0 0/0 .text Execute__15daTag_EvtArea_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daTag_EvtArea_c::Execute() { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/Execute__15daTag_EvtArea_cFv.s" +bool daTag_EvtArea_c::Execute() { + if (orig.roomNo == dComIfGp_roomControl_getStayNo()) { + if (isDelete()) { + fopAcM_delete(this); + return true; + } else { + mAttentionInfo.mPosition = current.pos; + if (getType() == 8) { + mAttentionInfo.mPosition.y += 100.0f; + } + mGroup = 0; + mEyePos = mAttentionInfo.mPosition; + if (getType() == 15) { + if (chkPointInArea(daPy_getPlayerActorClass()->current.pos)) { + mEyePos = daPy_getPlayerActorClass()->mEyePos; + mGroup = 4; + } + } + mAttentionInfo.mFlags = 0; + return true; + } + } else { + return false; + } } -#pragma pop /* 8048C894-8048C89C 000414 0008+00 1/1 0/0 0/0 .text Draw__15daTag_EvtArea_cFv */ bool daTag_EvtArea_c::Draw() { @@ -181,44 +144,24 @@ bool daTag_EvtArea_c::Draw() { } /* 8048C89C-8048C94C 00041C 00B0+00 2/2 0/0 0/0 .text isDelete__15daTag_EvtArea_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daTag_EvtArea_c::isDelete() { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/isDelete__15daTag_EvtArea_cFv.s" +BOOL daTag_EvtArea_c::isDelete() { + bool ret; + if (getOffEvtBit() != -1) { + if (daNpcT_chkEvtBit(getOffEvtBit())) { + return true; + } + } + ret = false; + if (getBitSW2() != 0xff) { + if (dComIfGs_isSwitch(getBitSW2(), fopAcM_GetRoomNo(this))) { + ret = true; + } + } + return ret; } -#pragma pop - -/* ############################################################################################## */ -/* 8048CDD4-8048CDD8 000004 0004+00 0/0 0/0 0/0 .rodata @3854 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3854 = 200.0f; -COMPILER_STRIP_GATE(0x8048CDD4, &lit_3854); -#pragma pop - -/* 8048CDD8-8048CDDC 000008 0004+00 0/0 0/0 0/0 .rodata @3855 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3855 = 0.5f; -COMPILER_STRIP_GATE(0x8048CDD8, &lit_3855); -#pragma pop - -/* 8048CDDC-8048CDE0 00000C 0004+00 0/0 0/0 0/0 .rodata @3856 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_3856 = 1000.0f; -COMPILER_STRIP_GATE(0x8048CDDC, &lit_3856); -#pragma pop /* 8048CDE0-8048CDE4 000010 0004+00 1/1 0/0 0/0 .rodata @3922 */ -SECTION_RODATA static u8 const lit_3922[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; +SECTION_RODATA static f32 const lit_3922 = 0.0f; COMPILER_STRIP_GATE(0x8048CDE0, &lit_3922); /* 8048CDE4-8048CDE8 000014 0004+00 1/1 0/0 0/0 .rodata @4146 */ @@ -227,76 +170,104 @@ COMPILER_STRIP_GATE(0x8048CDE4, &lit_4146); /* 8048C94C-8048CC80 0004CC 0334+00 1/1 0/0 16/16 .text * chkPointInArea__15daTag_EvtArea_cF4cXyz4cXyz */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daTag_EvtArea_c::chkPointInArea(cXyz param_0, cXyz param_1) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/chkPointInArea__15daTag_EvtArea_cF4cXyz4cXyz.s" +BOOL daTag_EvtArea_c::chkPointInArea(cXyz param_0, cXyz param_1) { + cXyz local_24, local_30, local_3c, local_48, local_84, local_cc, local_6c, local_90; + if (field_0x56c == 0) { + if ((getOnEvtBit() != -1 && daNpcT_chkEvtBit(getOnEvtBit())) + || (getBitSW() != 0xff && dComIfGs_isSwitch(getBitSW(), fopAcM_GetRoomNo(this))) + || (getOnEvtBit() == -1 && getBitSW() == 0xff)) { + local_84 = mScale + param_1; + if (getType() == 15 || getType() == 16) { + local_6c = daPy_getPlayerActorClass()->current.pos; + local_6c -= orig.pos; + mDoMtx_YrotS(mDoMtx_stack_c::now, -current.angle.y); + mDoMtx_stack_c::multVec(&local_6c, &local_6c); + local_48.x = -local_84.x; + local_48.z = -local_84.z; + local_3c.x = local_84.x; + local_3c.z = -local_84.z; + local_30.x = local_84.x; + local_30.z = local_84.z; + local_24.x = -local_84.x; + local_24.z = local_84.z; + if (local_48.x < local_6c.x && local_48.z < local_6c.z && local_84.x > local_6c.x && local_84.z > local_6c.z) { + local_90 = param_0 - current.pos; + if (0 <= (s32)local_90.y && (s32)local_90.y < (s32)local_84.y) { + return true; + } + } + } else { + local_cc = current.pos; + local_cc.y -= FLOAT_LABEL(lit_4146); + if (getType() == 21) { + return daNpcT_chkPointInArea(param_0, local_cc, local_84, shape_angle.y, 0); + } + return daNpcT_chkPointInArea(param_0, local_cc, local_84, shape_angle.y, 1); + } + } + } + return false; } -#pragma pop /* 8048CC80-8048CCA0 000800 0020+00 1/0 0/0 0/0 .text daTag_EvtArea_Create__FPv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTag_EvtArea_Create(void* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Create__FPv.s" +static cPhs__Step daTag_EvtArea_Create(void* i_this) { + return static_cast(i_this)->create(); } -#pragma pop /* 8048CCA0-8048CCC0 000820 0020+00 1/0 0/0 0/0 .text daTag_EvtArea_Delete__FPv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTag_EvtArea_Delete(void* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Delete__FPv.s" +static bool daTag_EvtArea_Delete(void* i_this) { + return static_cast(i_this)->Delete(); } -#pragma pop /* 8048CCC0-8048CCE0 000840 0020+00 1/0 0/0 0/0 .text daTag_EvtArea_Execute__FPv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTag_EvtArea_Execute(void* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Execute__FPv.s" +static bool daTag_EvtArea_Execute(void* i_this) { + return static_cast(i_this)->Execute(); } -#pragma pop /* 8048CCE0-8048CD00 000860 0020+00 1/0 0/0 0/0 .text daTag_EvtArea_Draw__FPv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daTag_EvtArea_Draw(void* param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Draw__FPv.s" +static bool daTag_EvtArea_Draw(void* i_this) { + return static_cast(i_this)->Draw(); } -#pragma pop /* 8048CD00-8048CD08 000880 0008+00 1/0 0/0 0/0 .text daTag_EvtArea_IsDelete__FPv */ -static bool daTag_EvtArea_IsDelete(void* param_0) { +static bool daTag_EvtArea_IsDelete(void* i_this) { return true; } /* 8048CD08-8048CD68 000888 0060+00 1/1 0/0 0/0 .text chkPointInArea__15daTag_EvtArea_cF4cXyz */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daTag_EvtArea_c::chkPointInArea(cXyz param_0) { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/chkPointInArea__15daTag_EvtArea_cF4cXyz.s" +BOOL daTag_EvtArea_c::chkPointInArea(cXyz param_0) { + cXyz local_28; + local_28.set(FLOAT_LABEL(lit_3922), FLOAT_LABEL(lit_3922), FLOAT_LABEL(lit_3922)); + return chkPointInArea(param_0, local_28); } -#pragma pop /* 8048CD68-8048CDC8 0008E8 0060+00 1/0 0/0 0/0 .text __dt__15daTag_EvtArea_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm daTag_EvtArea_c::~daTag_EvtArea_c() { - nofralloc -#include "asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/__dt__15daTag_EvtArea_cFv.s" +daTag_EvtArea_c::~daTag_EvtArea_c() { } -#pragma pop + +/* 8048CE48-8048CE68 -00001 0020+00 1/0 0/0 0/0 .data daTag_EvtArea_MethodTable */ +static actor_method_class daTag_EvtArea_MethodTable = { + (process_method_func)daTag_EvtArea_Create, + (process_method_func)daTag_EvtArea_Delete, + (process_method_func)daTag_EvtArea_Execute, + (process_method_func)daTag_EvtArea_IsDelete, + (process_method_func)daTag_EvtArea_Draw, +}; + +/* 8048CE68-8048CE98 -00001 0030+00 0/0 0/0 1/0 .data g_profile_TAG_EVTAREA */ +extern actor_process_profile_definition g_profile_TAG_EVTAREA = { + -3, + 8, + -3, + PROC_TAG_EVTAREA, + &g_fpcLf_Method.mBase, + sizeof(daTag_EvtArea_c), + 0, + 0, + &g_fopAc_Method.base, + 0x011F, + &daTag_EvtArea_MethodTable, + 0x00044000, + 0, + 14, +}; \ No newline at end of file diff --git a/src/d/a/d_a_alink_demo.inc b/src/d/a/d_a_alink_demo.inc index 6be8821b59f..2379f9b8693 100644 --- a/src/d/a/d_a_alink_demo.inc +++ b/src/d/a/d_a_alink_demo.inc @@ -128,11 +128,11 @@ asm void daAlink_c::endDemoMode() { #ifdef NONMATCHING fopAc_ac_c* daAlink_c::getDemoLookActor() { if (mDemo.getParam0() == 1) { - return (fopAc_ac_c*)dComIfGp_event_getPt1(); + return dComIfGp_event_getPt1(); } else if (mDemo.getParam0() == 2) { - return (fopAc_ac_c*)dComIfGp_event_getPt2(); + return dComIfGp_event_getPt2(); } else if (mDemo.getParam0() == 3) { - return (fopAc_ac_c*)fopAcM_getTalkEventPartner(this); + return fopAcM_getTalkEventPartner(this); } else if (mDemo.getParam0() == 4) { return getMidnaActor(); } diff --git a/src/d/a/d_a_npc.cpp b/src/d/a/d_a_npc.cpp index 768d73c0137..e5efa50ed2f 100644 --- a/src/d/a/d_a_npc.cpp +++ b/src/d/a/d_a_npc.cpp @@ -13,7 +13,9 @@ #include "global.h" #include "m_Do/m_Do_mtx.h" #include "rel/d/a/npc/d_a_npc_tk/d_a_npc_tk.h" +#include "d/msg/d_msg_object.h" #include "m_Do/m_Do_lib.h" +#include "JSystem/J3DGraphBase/J3DMaterial.h" // // Forward References: @@ -1180,12 +1182,8 @@ SECTION_DATA u8 daBaseNpc_c::mCcDSph[64] = { }; /* 803B37E0-803B3824 010900 0044+00 0/0 0/0 36/36 .data mCcDCyl__8daNpcF_c */ -SECTION_DATA u8 daNpcF_c::mCcDCyl[68] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +SECTION_DATA dCcD_SrcCyl daNpcF_c::mCcDCyl = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; /* 803B3824-803B3864 010944 0040+00 0/0 0/0 2/2 .data mCcDSph__8daNpcF_c */ @@ -2125,7 +2123,7 @@ int daNpcT_c::ctrlMsgAnm(int* param_0, int* param_1, fopAc_ac_c* param_2, int pa *param_1 = -1; if (tmp3 != 0 || mEvtInfo.checkCommandTalk() || field_0xdac != -1) { - fopAc_ac_c* talk_partner = (fopAc_ac_c*)dComIfGp_event_getTalkPartner(); + fopAc_ac_c* talk_partner = dComIfGp_event_getTalkPartner(); dMsgObject_c* talk_partner_conv = (dMsgObject_c*)talk_partner; if (tmp2 == talk_partner) { @@ -2733,7 +2731,7 @@ bool daNpcT_chkPointInArea(cXyz param_0, cXyz param_1, cXyz param_2, s16 param_3 #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcT_chkPointInArea(cXyz param_0, cXyz param_1, cXyz param_2, s16 param_3, int param_4) { +asm BOOL daNpcT_chkPointInArea(cXyz param_0, cXyz param_1, cXyz param_2, s16 param_3, int param_4) { nofralloc #include "asm/d/a/d_a_npc/daNpcT_chkPointInArea__F4cXyz4cXyz4cXyzsi.s" } @@ -2806,8 +2804,8 @@ void daNpcT_offEvtBit(u32 i_idx) { } /* 8014CAAC-8014CAEC 1473EC 0040+00 0/0 0/0 155/155 .text daNpcT_chkEvtBit__FUl */ -void daNpcT_chkEvtBit(u32 i_idx) { - i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_idx]); +BOOL daNpcT_chkEvtBit(u32 i_idx) { + return i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_idx]); } /* 8014CAEC-8014CB2C 14742C 0040+00 0/0 0/0 26/26 .text daNpcT_onTmpBit__FUl */ @@ -2821,8 +2819,8 @@ void daNpcT_offTmpBit(u32 i_idx) { } /* 8014CB6C-8014CBAC 1474AC 0040+00 0/0 0/0 38/38 .text daNpcT_chkTmpBit__FUl */ -void daNpcT_chkTmpBit(u32 i_idx) { - dComIfGs_isTmpBit(dSv_event_tmp_flag_c::tempBitLabels[i_idx]); +BOOL daNpcT_chkTmpBit(u32 i_idx) { + return dComIfGs_isTmpBit(dSv_event_tmp_flag_c::tempBitLabels[i_idx]); } /* 8014CBAC-8014CBF4 1474EC 0048+00 1/0 0/0 0/0 .text __dt__16daNpcT_Hermite_cFv */ @@ -4127,9 +4125,9 @@ void daNpcF_MatAnm_c::initialize() { field_0xF4 = value; field_0xF8 = value; - mTranslationX = value; - mTranslationY = value; - field_0x104 = 0; + mNowOffsetX = value; + mNowOffsetY = value; + mEyeMoveFlag = 0; field_0x105 = 0; } @@ -4154,9 +4152,9 @@ void daNpcF_MatAnm_c::calc(J3DMaterial* param_0) const { curr_mtx_info->mSRT.mTranslationY = field_0xF8 * tmp9 + curr_mtx_info->mSRT.mTranslationY * tmp8; } else { - if (field_0x104 != 0) { - curr_mtx_info->mSRT.mTranslationX = mTranslationX; - curr_mtx_info->mSRT.mTranslationY = mTranslationY; + if (mEyeMoveFlag != 0) { + curr_mtx_info->mSRT.mTranslationX = mNowOffsetX; + curr_mtx_info->mSRT.mTranslationY = mNowOffsetY; } } @@ -4501,32 +4499,34 @@ SECTION_SDATA2 static f32 lit_9971 = 32.0f; void daNpcF_Lookat_c::setParam(f32 param_0, f32 param_1, f32 param_2, f32 param_3, f32 param_4, f32 param_5, f32 param_6, f32 param_7, f32 param_8, f32 param_9, f32 param_10, f32 param_11, s16 param_12, cXyz* param_13) { - f32 l_float0 = param_0; - f32 l_float1 = param_1; - f32 l_float2 = param_2; - f32 l_float3 = param_3; - u32 tmp = 0; - - if (!data_80450FEC) { - f32 value = FLOAT_LABEL(lit_9971); - - // vec.set(0.0f,0.0f,value); - FLOAT_LABEL(data_80450FEC) = 1.0f; - } - - field_0x00[0] = *param_13; - field_0x4c[0].set((cM_deg2s(-param_1) - 0x4000),cM_deg2s(param_2),0); - field_0x64[0].set((cM_deg2s(-param_0) - 0x4000),cM_deg2s(param_3),0); - - field_0x00[1].set(param_12,param_12,param_12); - field_0x4c[1].set(cM_deg2s(-0x4000),param_8,param_8); - field_0x64[1].set(-0x4000,param_8,param_8); - - field_0x00[2].set(param_9,param_9,param_9); - field_0x4c[2].set(-0x4000,param_11,param_11); - field_0x64[2].set(-0x4000,param_11,param_11); - - + static cXyz vec(0.0f, 0.0f, 32.0f); + + field_0x00[0] = param_13[0]; + field_0x4c[0].x = cM_deg2s(-param_1) - 0x4000; + field_0x4c[0].y = cM_deg2s(param_2); + field_0x4c[0].z = 0; + field_0x64[0].x = cM_deg2s(-param_0) - 0x4000; + field_0x64[0].y = cM_deg2s(param_3); + field_0x64[0].z = 0; + + field_0x00[1] = param_13[1]; + field_0x4c[1].set(-0x4000, 0, 0); + field_0x64[1].set(-0x4000, 0, 0); + + field_0x00[2] = param_13[2]; + field_0x4c[2].x = cM_deg2s(-param_9); + field_0x4c[2].y = cM_deg2s(param_10); + field_0x4c[2].z = 0; + field_0x64[2].x = cM_deg2s(-param_8); + field_0x64[2].y = cM_deg2s(param_11); + field_0x64[2].z = 0; + + mDoMtx_stack_c::transS(field_0x00[2]); + mDoMtx_stack_c::YrotM(param_12); + mDoMtx_stack_c::multVec(&vec, &field_0x00[3]); + + field_0x4c[3].set(0, 0, 0); + field_0x64[3].set(0, 0, 0); } #else #pragma push @@ -4544,43 +4544,51 @@ asm void daNpcF_Lookat_c::setParam(f32 param_0, f32 param_1, f32 param_2, f32 pa /* 80151350-801515D4 14BC90 0284+00 0/0 0/0 34/34 .text * calc__15daNpcF_Lookat_cFP10fopAc_ac_cPA4_fPP5csXyziii */ #ifdef NONMATCHING -void daNpcF_Lookat_c::calc(fopAc_ac_c* param_0, f32 (*param_1)[4], csXyz** param_2, int param_3, - int param_4, int param_5) { - int tmp = 0; - int tmp2; - - if (field_0x30) { - initCalc(param_0,param_1,(cXyz*)param_2,*param_2,*param_1,(cXyz&)param_2,param_5); +void daNpcF_Lookat_c::calc(fopAc_ac_c* param_0, Mtx baseTransformMtx, csXyz** param_2, int param_3, + int param_4, int debug) { + cXyz local_a4[4]; + csXyz local_bc[4]; + cXyz local_c8; + f32 local_d8[4]; + f32 local_e8; + f32 angY; + + if (mAttnPos) { + initCalc(param_0, baseTransformMtx, local_a4, local_bc, local_d8, local_c8, debug); for (int i = 2; i >= -1; i--) { - update((cXyz*)param_2,*param_2,(float*)param_4); + update(local_a4, local_bc, local_d8); if (0 <= i) { - calcMoveDisAngle(i,(cXyz*)param_2,*param_2,(cXyz&)param_2,param_4,param_5); + calcMoveDisAngle(i, local_a4, local_bc, local_c8, param_4, debug); } } setRotAngle(); - + } else { clrRotAngle(); } - tmp2 = 1; - - for (int i = 2; i >= -1; i-- ) { + int i,j; + for (i = 2, j = 1; i >= 0; i--, j++) { if (param_3) { - cLib_addCalc2((float*)param_2,(float)field_0x7c[0].y,0.25f,(0x800/ (float)tmp2)); - cLib_addCalc2((float*)param_2,(float)field_0x7c[0].y,0.25f,(0x800/ (float)tmp2)); - - if (0 < param_4 && (field_0x7c[0].y - param_2[i]->y) > 0.0f) { - param_2[i]->y = field_0x7c[0].y; + *(param_2[i]) = mRotAngle[i]; + } else { + local_e8 = (f32)param_2[i]->x; + cLib_addCalc2(&local_e8, (f32)mRotAngle[i].x, 0.25f, (f32)(0x800 / j)); + param_2[i]->x = (s16)local_e8; + + local_e8 = (f32)param_2[i]->y; + angY = (f32)mRotAngle[i].y; + cLib_addCalc2(&local_e8, angY, 0.25f, (f32)(0x800 / j)); + if (param_4 > 0 && angY - local_e8 < 0.0f) { + local_e8 = angY; } - - if (0 < param_4 && (field_0x7c[0].y - param_2[i]->y) > 0.0f) { - param_2[i]->y = field_0x7c[0].y; + if (param_4 < 0 && 0.0f < angY - local_e8) { + local_e8 = angY; } + param_2[i]->y = (s16)local_e8; - } else { - param_2[8] = field_0x7c; + param_2[i]->z = 0; } } } @@ -4600,31 +4608,24 @@ asm void daNpcF_Lookat_c::calc(fopAc_ac_c* param_0, f32 (*param_1)[4], csXyz** p */ #ifdef NONMATCHING // regalloc -void daNpcF_Lookat_c::adjustMoveDisAngle(s16& param_0, s16 param_1, s16 param_2, s16 param_3) { - int tmp2 = param_1; - int tmp = tmp2 + param_0; - - - if (param_3 < tmp) { - if (tmp2 < param_3) { - param_0 -= (tmp - param_3); +void daNpcF_Lookat_c::adjustMoveDisAngle(s16& delta, s16 angle, s16 min, s16 max) { + int newAngle = angle + delta; + if (max < newAngle) { + if (angle < max) { + delta -= (newAngle - max); } else { - param_0 = 0; + delta = 0; } } - tmp2 += param_0; - - if (tmp2 >= param_2) { - return; - } - - if (param_2 < param_1) { - param_0 -= (tmp2 - param_2); - return; + newAngle = angle + delta; + if (newAngle < min) { + if (min < angle) { + delta -= (newAngle - min); + } else { + delta = 0; + } } - - param_0 = 0; } #else #pragma push @@ -4643,6 +4644,41 @@ SECTION_SDATA2 static f32 lit_10253 = 63.0f / 100.0f; /* 80151648-80151A54 14BF88 040C+00 1/1 0/0 0/0 .text * initCalc__15daNpcF_Lookat_cFP10fopAc_ac_cPA4_fP4cXyzP5csXyzPfR4cXyzi */ +#ifdef NONMATCHING +// matches except literals +void daNpcF_Lookat_c::initCalc(fopAc_ac_c* actor, Mtx baseTransformMtx, cXyz* param_2, + csXyz* param_3, f32* param_4, cXyz& param_5, int debug) { + Mtx mtx; + cXyz local_90; + cMtx_copy(baseTransformMtx, mtx); + mtx[0][3] = 0.0f; + mtx[1][3] = 0.0f; + mtx[2][3] = 0.0f; + mDoMtx_stack_c::copy(mtx); + mDoMtx_stack_c::inverse(); + cMtx_copy(mDoMtx_stack_c::get(), mtx); + mDoMtx_stack_c::transS(actor->current.pos); + mDoMtx_stack_c::concat(mtx); + for (int i = 0; i < 4; i++) { + local_90 = field_0x00[i] - actor->current.pos; + mDoMtx_stack_c::multVec(&local_90, ¶m_2[i]); + } + local_90 = *mAttnPos - actor->current.pos; + mDoMtx_stack_c::multVec(&local_90, ¶m_5); + for (int i = 0; i < 3; i++) { + cXyz* vec = ¶m_2[i]; + local_90 = vec[1] - vec[0]; + param_4[i] = local_90.abs(); + param_3[i].setall(0); + param_3[i].x = -cM_atan2s(local_90.y, local_90.absXZ()); + if (fabsf(cM_ssin(param_3[i].x)) < 0.63) { + param_3[i].y = cM_atan2s(local_90.x, local_90.z); + } else { + param_3[i].y = 0; + } + } +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -4652,8 +4688,30 @@ asm void daNpcF_Lookat_c::initCalc(fopAc_ac_c* param_0, f32 (*param_1)[4], cXyz* #include "asm/d/a/d_a_npc/initCalc__15daNpcF_Lookat_cFP10fopAc_ac_cPA4_fP4cXyzP5csXyzPfR4cXyzi.s" } #pragma pop +#endif /* 80151A54-80151B68 14C394 0114+00 1/1 0/0 0/0 .text update__15daNpcF_Lookat_cFP4cXyzP5csXyzPf */ +#ifdef NONMATCHING +// literals +void daNpcF_Lookat_c::update(cXyz* param_0, csXyz* param_1, f32* param_2) { + csXyz ang = csXyz::Zero; + cXyz vec; + Mtx mtx; + cXyz* pparam0i; + for (int i = 0; i < 3; i++) { + mDoMtx_stack_c::XYZrotS(param_1[i]); + cMtx_copy(mDoMtx_stack_c::get(), mtx); + pparam0i = ¶m_0[i]; + mDoMtx_stack_c::transS(pparam0i[0]); + ang.x += field_0x34[i].x; + ang.y += field_0x34[i].y; + mDoMtx_stack_c::ZXYrotM(ang); + mDoMtx_stack_c::concat(mtx); + vec.set(0.0f, 0.0f, param_2[i]); + mDoMtx_stack_c::multVec(&vec, &pparam0i[1]); + } +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -4662,6 +4720,7 @@ asm void daNpcF_Lookat_c::update(cXyz* param_0, csXyz* param_1, f32* param_2) { #include "asm/d/a/d_a_npc/update__15daNpcF_Lookat_cFP4cXyzP5csXyzPf.s" } #pragma pop +#endif /* 80151B68-80151F54 14C4A8 03EC+00 1/1 0/0 0/0 .text * calcMoveDisAngle__15daNpcF_Lookat_cFiP4cXyzP5csXyz4cXyzii */ @@ -4696,24 +4755,154 @@ asm void daNpcF_Lookat_c::clrRotAngle() { #pragma pop /* 80152014-801522AC 14C954 0298+00 0/0 0/0 38/38 .text execute__8daNpcF_cFv */ +#ifdef NONMATCHING +// will match once cLib_calcTimer is located correctly +BOOL daNpcF_c::execute() { + setParam(); + if (main()) { + fopAcM_posMoveF(this, mStts.GetCCMoveP()); + mAcch.CrrPos(dComIfG_Bgsp()); + field_0xa44 = mAcch.m_gnd; + field_0x980 = mAcch.GetGroundH(); + if (field_0x980 != -1e+9f) { + field_0x998 = daNpcF_getGroundAngle(&field_0xa44, field_0x8f0.y); + setEnvTevColor(); + setRoomNo(); + field_0x9b0 = dKy_pol_sound_get(&mAcch.m_gnd); + field_0x9e8 = dComIfGp_getReverb(mStts.GetRoomId()); + if (mAcch.ChkWaterHit() && mAcch.m_wtr.GetHeight() > field_0x980) { + field_0x9b0 = dKy_pol_sound_get(&mAcch.m_wtr); + } + } + } + playAllAnm(); + adjustShapeAngle(); + setAttnPos(); + cLib_chaseF(&field_0x978, 0.0f, 1.0f); + setCollisions(); + if (field_0x9f4 != 0) { + mAttentionInfo.mFlags |= 0x400000; + mAttentionInfo.mFlags |= 0x800000; + setHitodamaPrtcl(); + } + field_0x8f6 = field_0x8f0; + field_0x930 = 0; + field_0x9e9 = 0; + field_0x9ed = 0; + field_0x9eb = 0; + field_0x9ef = 0; + field_0x9f3 = 0; + for (int i = 0; i < 5; i++) { + if ((field_0x938 == 0 || field_0x934 != i) && field_0x93c[i] != 0 && cLib_calcTimer(&field_0x93c[i]) == 0) { + field_0x82c[i].remove(); + } + } + if (field_0x954 != 0) { + cLib_calcTimer(&field_0x954); + } + return true; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::execute() { +asm BOOL daNpcF_c::execute() { nofralloc #include "asm/d/a/d_a_npc/execute__8daNpcF_cFv.s" } #pragma pop +#endif /* 801522AC-80152614 14CBEC 0368+00 0/0 0/0 33/33 .text draw__8daNpcF_cFiifP11_GXColorS10i */ +#ifdef NONMATCHING +// literals +BOOL daNpcF_c::draw(int param_0, int param_1, f32 param_2, _GXColorS10* param_3, int param_4) { + f32 fVar1, frame; + J3DModel* model = mMcaMorf->getModel(); + J3DModelData* modelData = model->getModelData(); + field_0x9f3 = 1; + + if (!checkHide()) { + if (!param_4 && field_0x954 != 0 && field_0x958 != 0) { + fVar1 = (f32)field_0x954 / (f32)field_0x958; + } else { + fVar1 = 0.0f; + } + if (cM3d_IsZero_inverted(fVar1)) { + mTevStr.mFogColor.r = (s16)(fVar1 * 20.0f); + mTevStr.mFogColor.g = 0; + } else if (param_0) { + mTevStr.mFogColor.g = 20; + mTevStr.mFogColor.r = 0; + } else if (param_3 != NULL) { + mTevStr.mFogColor.r = param_3->r; + mTevStr.mFogColor.g = param_3->g; + mTevStr.mFogColor.b = param_3->b; + mTevStr.mFogColor.a = param_3->a; + } else { + mTevStr.mFogColor.g = 0; + mTevStr.mFogColor.r = 0; + } + + if (field_0x9f4) { + g_env_light.settingTevStruct(4, ¤t.pos, &mTevStr); + } else { + g_env_light.settingTevStruct(0, ¤t.pos, &mTevStr); + } + g_env_light.setLightTevColorType_MAJI(model->getModelData(), &mTevStr); + + if (!drawDbgInfo()) { + if (mAnmFlags & ANM_PLAY_BTP) { + mBtpAnm.entry(&modelData->getMaterialTable(), (s16)mBtpAnm.getFrame()); + } + if (mAnmFlags & ANM_PLAY_BTK) { + frame = mBtkAnm.getFrame(); + mBtkAnm.entry(&modelData->getMaterialTable(), frame); + } + if (mAnmFlags & ANM_PLAY_BRK) { + frame = mBrkAnm.getFrame(); + mBrkAnm.entry(&modelData->getMaterialTable(), frame); + } + + if (param_1) { + fopAcM_setEffectMtx(this, modelData); + } + + if (field_0x9f4) { + dComIfGd_setListDark(); + mMcaMorf->entryDL(); + dComIfGd_setList(); + } else { + mMcaMorf->entryDL(); + } + + if (mAnmFlags & ANM_PLAY_BTP) { + mBtpAnm.remove(modelData); + } + if (mAnmFlags & ANM_PLAY_BTK) { + mBtkAnm.remove(modelData); + } + if (mAnmFlags & ANM_PLAY_BRK) { + mBrkAnm.remove(modelData); + } + + field_0x9a0 = dComIfGd_setShadow(field_0x9a0, true, model, ¤t.pos, param_2, 20.0f, current.pos.y, field_0x980, field_0xa44, &mTevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex()); + + drawOtherMdls(); + } + } + return true; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::draw(int param_0, int param_1, f32 param_2, _GXColorS10* param_3, int param_4) { +asm BOOL daNpcF_c::draw(int param_0, int param_1, f32 param_2, _GXColorS10* param_3, int param_4) { nofralloc #include "asm/d/a/d_a_npc/draw__8daNpcF_cFiifP11_GXColorS10i.s" } #pragma pop +#endif /* 80152614-80152654 14CF54 0040+00 0/0 0/0 13/13 .text * tgHitCallBack__8daNpcF_cFP10fopAc_ac_cP12dCcD_GObjInfP10fopAc_ac_cP12dCcD_GObjInf */ @@ -4794,105 +4983,74 @@ asm void daNpcF_c::initialize() { /* 80152B2C-80152B68 14D46C 003C+00 0/0 0/0 69/69 .text getTrnsfrmKeyAnmP__8daNpcF_cFPci */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcF_c::getTrnsfrmKeyAnmP(char* param_0, int param_1) { - nofralloc -#include "asm/d/a/d_a_npc/getTrnsfrmKeyAnmP__8daNpcF_cFPci.s" +J3DAnmTransformKey* daNpcF_c::getTrnsfrmKeyAnmP(char* arcName, int fileIdx) { + return (J3DAnmTransformKey*)dComIfG_getObjectRes(arcName, fileIdx); } -#pragma pop /* 80152B68-80152BA4 14D4A8 003C+00 0/0 0/0 31/31 .text getTexPtrnAnmP__8daNpcF_cFPci */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcF_c::getTexPtrnAnmP(char* param_0, int param_1) { - nofralloc -#include "asm/d/a/d_a_npc/getTexPtrnAnmP__8daNpcF_cFPci.s" +J3DAnmTexPattern* daNpcF_c::getTexPtrnAnmP(char* arcName, int fileIdx) { + return (J3DAnmTexPattern*)dComIfG_getObjectRes(arcName, fileIdx); } -#pragma pop /* 80152BA4-80152BE0 14D4E4 003C+00 0/0 0/0 50/50 .text getTexSRTKeyAnmP__8daNpcF_cFPci */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcF_c::getTexSRTKeyAnmP(char* param_0, int param_1) { - nofralloc -#include "asm/d/a/d_a_npc/getTexSRTKeyAnmP__8daNpcF_cFPci.s" +J3DAnmTextureSRTKey* daNpcF_c::getTexSRTKeyAnmP(char* arcName, int fileIdx) { + return (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(arcName, fileIdx); } -#pragma pop /* 80152BE0-80152C1C 14D520 003C+00 0/0 0/0 2/2 .text getTevRegKeyAnmP__8daNpcF_cFPci */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcF_c::getTevRegKeyAnmP(char* param_0, int param_1) { - nofralloc -#include "asm/d/a/d_a_npc/getTevRegKeyAnmP__8daNpcF_cFPci.s" +J3DAnmTevRegKey* daNpcF_c::getTevRegKeyAnmP(char* arcName, int fileIdx) { + return (J3DAnmTevRegKey*)dComIfG_getObjectRes(arcName, fileIdx); } -#pragma pop /* 80152C1C-80152C80 14D55C 0064+00 0/0 0/0 38/38 .text * setMcaMorfAnm__8daNpcF_cFP18J3DAnmTransformKeyffiii */ +#ifdef NONMATCHING +// literals +BOOL daNpcF_c::setMcaMorfAnm(J3DAnmTransformKey* i_anm, f32 i_rate, f32 i_morf, int i_attr, + int i_start, int i_end) { + mMcaMorf->setAnm(i_anm, i_attr, i_morf, i_rate, (f32)i_start, (f32)i_end); + return true; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::setMcaMorfAnm(J3DAnmTransformKey* param_0, f32 param_1, f32 param_2, int param_3, +asm BOOL daNpcF_c::setMcaMorfAnm(J3DAnmTransformKey* param_0, f32 param_1, f32 param_2, int param_3, int param_4, int param_5) { nofralloc #include "asm/d/a/d_a_npc/setMcaMorfAnm__8daNpcF_cFP18J3DAnmTransformKeyffiii.s" } #pragma pop +#endif /* 80152C80-80152CC4 14D5C0 0044+00 0/0 0/0 25/25 .text * setBckAnm__8daNpcF_cFP15J3DAnmTransformfiiib */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcF_c::setBckAnm(J3DAnmTransform* param_0, f32 param_1, int param_2, int param_3, - int param_4, bool param_5) { - nofralloc -#include "asm/d/a/d_a_npc/setBckAnm__8daNpcF_cFP15J3DAnmTransformfiiib.s" +BOOL daNpcF_c::setBckAnm(J3DAnmTransform* i_bck, f32 i_rate, int i_attr, int i_start, + int i_end, bool i_modify) { + return mBckAnm.init(i_bck, true, i_attr, i_rate, (s16)i_start, (s16)i_end, i_modify); } -#pragma pop /* 80152CC4-80152D04 14D604 0040+00 0/0 0/0 32/32 .text * setBtpAnm__8daNpcF_cFP16J3DAnmTexPatternP12J3DModelDatafi */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcF_c::setBtpAnm(J3DAnmTexPattern* param_0, J3DModelData* param_1, f32 param_2, - int param_3) { - nofralloc -#include "asm/d/a/d_a_npc/setBtpAnm__8daNpcF_cFP16J3DAnmTexPatternP12J3DModelDatafi.s" +BOOL daNpcF_c::setBtpAnm(J3DAnmTexPattern* i_btp, J3DModelData* i_modelData, f32 i_rate, + int i_attr) { + return mBtpAnm.init(i_modelData, i_btp, true, i_attr, i_rate, 0, -1); } -#pragma pop /* 80152D04-80152D44 14D644 0040+00 0/0 0/0 26/26 .text * setBtkAnm__8daNpcF_cFP19J3DAnmTextureSRTKeyP12J3DModelDatafi */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcF_c::setBtkAnm(J3DAnmTextureSRTKey* param_0, J3DModelData* param_1, f32 param_2, - int param_3) { - nofralloc -#include "asm/d/a/d_a_npc/setBtkAnm__8daNpcF_cFP19J3DAnmTextureSRTKeyP12J3DModelDatafi.s" +BOOL daNpcF_c::setBtkAnm(J3DAnmTextureSRTKey* i_btk, J3DModelData* i_modelData, f32 i_rate, + int i_attr) { + return mBtkAnm.init(i_modelData, i_btk, true, i_attr, i_rate, 0, -1); } -#pragma pop /* 80152D44-80152D84 14D684 0040+00 0/0 0/0 2/2 .text * setBrkAnm__8daNpcF_cFP15J3DAnmTevRegKeyP12J3DModelDatafi */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcF_c::setBrkAnm(J3DAnmTevRegKey* param_0, J3DModelData* param_1, f32 param_2, - int param_3) { - nofralloc -#include "asm/d/a/d_a_npc/setBrkAnm__8daNpcF_cFP15J3DAnmTevRegKeyP12J3DModelDatafi.s" +BOOL daNpcF_c::setBrkAnm(J3DAnmTevRegKey* i_brk, J3DModelData* i_modelData, f32 i_rate, + int i_attr) { + return mBrkAnm.init(i_modelData, i_brk, true, i_attr, i_rate, 0, -1); } -#pragma pop /* 80152D84-80152DE0 14D6C4 005C+00 1/1 0/0 40/40 .text setEnvTevColor__8daNpcF_cFv */ #pragma push @@ -4915,37 +5073,192 @@ asm void daNpcF_c::setRoomNo() { #pragma pop /* 80152E24-80152EC4 14D764 00A0+00 1/1 0/0 0/0 .text chkEndAnm__8daNpcF_cFf */ +#ifdef NONMATCHING +BOOL daNpcF_c::chkEndAnm(f32 param_0) { + switch (mMcaMorf->getPlayMode()) { + case 2: + return mMcaMorf->isLoop(); + case 0: + case 1: + bool b = false; + bool ret = false; + if (mMcaMorf->isStop() && mMcaMorf->getPlaySpeed() == 0.0f) { + b = true; + } + if (b && param_0 != 0.0f) { + ret = true; + } + return ret; + case 3: + default: + return false; + } +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::chkEndAnm(f32 param_0) { +asm BOOL daNpcF_c::chkEndAnm(f32 param_0) { nofralloc #include "asm/d/a/d_a_npc/chkEndAnm__8daNpcF_cFf.s" } #pragma pop +#endif /* 80152EC4-80152F40 14D804 007C+00 1/1 0/0 0/0 .text chkEndAnm__8daNpcF_cFP12J3DFrameCtrlf */ +/** + * Check whether an animation has ended or looped. + * @param frameCtrl The frame controller for the animation. + * @param prevRate The previous rate of animation. + * @return `true` if the animation has just stopped or just looped, `false` otherwise. Returns `false` if the animation is two-way (attribute 3 or 4). + */ +#ifdef NONMATCHING +BOOL daNpcF_c::chkEndAnm(J3DFrameCtrl* frameCtrl, f32 prevRate) { + switch (frameCtrl->getAttribute()) { + case 2: + return (frameCtrl->getState() >> 1) & 1; + case 0: + case 1: + bool b = false; + bool ret = false; + if (frameCtrl->getState() & 1 && frameCtrl->getRate() == 0.0f) { + b = true; + } + if (b && prevRate != 0.0f) { + ret = true; + } + return ret; + case 3: + default: + return false; + } +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::chkEndAnm(J3DFrameCtrl* param_0, f32 param_1) { +asm BOOL daNpcF_c::chkEndAnm(J3DFrameCtrl* frameCtrl, f32 prevRate) { nofralloc #include "asm/d/a/d_a_npc/chkEndAnm__8daNpcF_cFP12J3DFrameCtrlf.s" } #pragma pop +#endif /* 80152F40-80153150 14D880 0210+00 1/1 0/0 2/2 .text playAllAnm__8daNpcF_cFv */ +#ifdef NONMATCHING +// matches once template functions located correctly +BOOL daNpcF_c::playAllAnm() { + f32 rate; + if (!(mAnmFlags & ANM_PAUSE_EXPRESSION)) { + if (mAnmFlags & ANM_PLAY_BCK) { + rate = mBckAnm.getPlaySpeed(); + if (mAnmFlags & ANM_PAUSE_BTK) { + mBckAnm.setPlaySpeed(0.0f); + } + mBckAnm.play(); + if (chkEndAnm(mBckAnm.getFrameCtrl(), rate)) { + mExpressionLoops++; + } + mBckAnm.setPlaySpeed(rate); + } + if (mAnmFlags & ANM_PLAY_BTP) { + rate = mBtpAnm.getPlaySpeed(); + if (mAnmFlags & ANM_PAUSE_BTP) { + mBtpAnm.setPlaySpeed(0.0f); + } + mBtpAnm.play(); + mBtpAnm.setPlaySpeed(rate); + if (mAnmFlags & ANM_FLAG_800) { + if (chkEndAnm(mBtpAnm.getFrameCtrl(), rate)) { + field_0x964 = cLib_getRndValue(90, 90); + mBtpAnm.setPlaySpeed(0.0f); + } + } else { + field_0x964 = 0; + } + if (cLib_calcTimer(&field_0x964) == 0) { + mBtpAnm.setPlaySpeed(1.0f); + } + } + } + if (mAnmFlags & ANM_PLAY_MORF) { + rate = mMcaMorf->getPlaySpeed(); + if (mAnmFlags & ANM_PAUSE_MORF) { + mMcaMorf->setPlaySpeed(0.0f); + mMcaMorf->play(field_0x9b0, field_0x9e8); + mMcaMorf->setPlaySpeed(rate); + } else { + mMcaMorf->play(field_0x9b0, field_0x9e8); + if (chkEndAnm(rate)) { + motionLoops++; + } + } + } + if (mAnmFlags & ANM_PLAY_BTK) { + rate = mBtkAnm.getPlaySpeed(); + if (mAnmFlags & ANM_PAUSE_BTK) { + mBtkAnm.setPlaySpeed(0.0f); + } + if (!ctrlBtk()) { + mBtkAnm.play(); + } + mBtkAnm.setPlaySpeed(rate); + } + if (mAnmFlags & ANM_PLAY_BRK) { + rate = mBrkAnm.getPlaySpeed(); + if (mAnmFlags & ANM_PAUSE_BRK) { + mBrkAnm.setPlaySpeed(0.0f); + } + mBrkAnm.play(); + mBrkAnm.setPlaySpeed(rate); + } + mAnmFlags &= ~ANM_PAUSE_ALL; + return true; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::playAllAnm() { +asm BOOL daNpcF_c::playAllAnm() { nofralloc #include "asm/d/a/d_a_npc/playAllAnm__8daNpcF_cFv.s" } #pragma pop +#endif /* 80153150-80153264 14DA90 0114+00 0/0 0/0 25/25 .text * playExpressionAnm__8daNpcF_cFPPPQ28daNpcF_c18daNpcF_anmPlayData */ +/** + * Set the expression animation. + * @param anm The animation data, a two-dimensional array of data pointers, indexed first by + * the expression index and second by the expression phase. Each piece of data consists of + * an animation index for that phase of the expression, a `morf`, and the number of loops + * before moving on to the next phase (or 0 for the last phase). + */ +#ifdef NONMATCHING +void daNpcF_c::playExpressionAnm(daNpcF_c::daNpcF_anmPlayData*** anm) { + daNpcF_anmPlayData* playData = NULL; + if (anm[mExpression] != NULL) { + playData = anm[mExpression][mExpressionPhase]; + } + if (playData != NULL) { + if (mExpressionPrevPhase == mExpressionPhase && playData->numLoops > 0 && playData->numLoops <= mExpressionLoops) { + mExpressionPhase++; + playData = anm[mExpression][mExpressionPhase]; + } + if (playData != NULL && mExpressionPrevPhase != mExpressionPhase) { + setExpressionAnm(playData->idx, true); + f32 morf = playData->morf; + if (mExpressionPhase == 0 && 0.0f <= mExpressionMorfOverride) { + morf = mExpressionMorfOverride; + } + mExpressionMorf = morf; + mMcaMorf->setMorf(morf); + } + } + mExpressionPrevPhase = mExpressionPhase; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -4954,9 +5267,41 @@ asm void daNpcF_c::playExpressionAnm(daNpcF_c::daNpcF_anmPlayData*** param_0) { #include "asm/d/a/d_a_npc/playExpressionAnm__8daNpcF_cFPPPQ28daNpcF_c18daNpcF_anmPlayData.s" } #pragma pop +#endif /* 80153264-8015337C 14DBA4 0118+00 0/0 0/0 37/37 .text * playMotionAnm__8daNpcF_cFPPPQ28daNpcF_c18daNpcF_anmPlayData */ +/** + * Set the motion animation. + * @param anm The animation data, a two-dimensional array of data pointers, indexed first by + * the motion index and second by the motion phase. Each piece of data consists of + * an animation index for that phase of the motion, a `morf`, and the number of loops + * before moving on to the next phase (or 0 for the last phase). + */ +#ifdef NONMATCHING +void daNpcF_c::playMotionAnm(daNpcF_c::daNpcF_anmPlayData*** anm) { + daNpcF_anmPlayData* playData = NULL; + if (anm[mMotion] != NULL) { + playData = anm[mMotion][mMotionPhase]; + } + if (playData != NULL) { + if (mMotionPrevPhase == mMotionPhase && playData->numLoops > 0 && playData->numLoops <= motionLoops) { + mMotionPhase++; + playData = anm[mMotion][mMotionPhase]; + } + if (playData != NULL && mMotionPrevPhase != mMotionPhase) { + setMotionAnm(playData->idx, 0.0f); + f32 morf = playData->morf; + if (mMotionPhase == 0 && 0.0f <= mMotionMorfOverride) { + morf = mMotionMorfOverride; + } + mExpressionMorf = 0.0f; + mMcaMorf->setMorf(morf); + } + } + mMotionPrevPhase = mMotionPhase; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -4965,8 +5310,56 @@ asm void daNpcF_c::playMotionAnm(daNpcF_c::daNpcF_anmPlayData*** param_0) { #include "asm/d/a/d_a_npc/playMotionAnm__8daNpcF_cFPPPQ28daNpcF_c18daNpcF_anmPlayData.s" } #pragma pop +#endif /* 8015337C-80153578 14DCBC 01FC+00 0/0 0/0 34/34 .text setLookatMtx__8daNpcF_cFiPif */ +/** + * Compute the animation matrix for one of the "lookat" joints (lower body, upper body, head). + * This matrix is applied to the matrix in `mDoMtx_stack_c::now`. + * @param jointNo The index of the joint in question. + * @param jointList An array of the three indices of the joints for the lower body, the upper body, and the head. + * @param param_2 Unknown. + */ +#ifdef NONMATCHING +// literals +void daNpcF_c::setLookatMtx(int jointNo, int* jointList, f32 param_2) { + cXyz pos; + Mtx baseMtx, invParentMtx; + + if (jointList[0] == jointNo || jointList[1] == jointNo || jointList[2] == jointNo) { + field_0x91a[1].x = (s16)((f32)field_0x91a[2].x * param_2); + field_0x91a[1].y = (s16)((f32)field_0x91a[2].y * param_2); + field_0x91a[1].z = (s16)((f32)field_0x91a[2].z * param_2); + + cMtx_copy(mDoMtx_stack_c::get(), baseMtx); + pos.set(baseMtx[0][3], baseMtx[1][3], baseMtx[2][3]); + baseMtx[0][3] = baseMtx[1][3] = baseMtx[2][3] = 0.0f; + + mDoMtx_stack_c::ZXYrotS(field_0x8f0); + if (jointList[0] != jointNo) { + if (jointList[1] == jointNo) { + mDoMtx_stack_c::ZXYrotM(field_0x91a[0]); + } else if (jointList[2] == jointNo) { + mDoMtx_stack_c::ZXYrotM(field_0x91a[1]); + } + } + mDoMtx_stack_c::inverse(); + cMtx_copy(mDoMtx_stack_c::get(), invParentMtx); + + mDoMtx_stack_c::transS(pos); + mDoMtx_stack_c::XYZrotM(field_0x8f0); + if (jointList[0] == jointNo) { + mDoMtx_stack_c::ZXYrotM(field_0x91a[0]); + } else if (jointList[1] == jointNo) { + mDoMtx_stack_c::ZXYrotM(field_0x91a[1]); + } else if (jointList[2] == jointNo) { + mDoMtx_stack_c::ZXYrotM(field_0x91a[2]); + } + mDoMtx_stack_c::concat(invParentMtx); + mDoMtx_stack_c::concat(baseMtx); + } +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -4975,6 +5368,7 @@ asm void daNpcF_c::setLookatMtx(int param_0, int* param_1, f32 param_2) { #include "asm/d/a/d_a_npc/setLookatMtx__8daNpcF_cFiPif.s" } #pragma pop +#endif /* 80153578-80153658 14DEB8 00E0+00 0/0 0/0 13/13 .text hitChk2__8daNpcF_cFP8dCcD_Cylii */ @@ -5006,14 +5400,57 @@ asm void daNpcF_c::setDamage(int param_0, int param_1, int param_2) { /* 80153718-8015387C 14E058 0164+00 0/0 0/0 81/81 .text ctrlMsgAnm__8daNpcF_cFRiRiP10fopAc_ac_ci */ +#ifdef NONMATCHING +// will match when cLib_calcTimer located correctly +int daNpcF_c::ctrlMsgAnm(int& expression, int& motion, fopAc_ac_c* param_2, int param_3) { + expression = -1; + motion = -1; + if (param_3 || mEvtInfo.checkCommandTalk() || mCutIndex != -1) { + fopAc_ac_c* talkPartner = dComIfGp_event_getTalkPartner(); + if (talkPartner == param_2) { + fopAc_ac_c* actor = dMsgObject_c::getActor(); + if (actor->mEvtInfo.mCommand == 2 || actor->mEvtInfo.mCommand == 3) { + field_0x9a4 = (profile_method_class*)-1; + } else if (actor->mEvtInfo.mCommand == 6) { + if (actor->mSubMtd != field_0x9a4) { + expression = dComIfGp_getMesgFaceAnimeAttrInfo(); + motion = dComIfGp_getMesgAnimeAttrInfo(); + field_0x9a4 = actor->mSubMtd; + } + if (dMsgObject_c::isMouthCheck()) { + mAnmFlags &= ~ANM_PAUSE_EXPRESSION; + } else { + mAnmFlags |= ANM_PAUSE_EXPRESSION; + } + field_0x950 = 20; + } else { + if (mAnmFlags & ANM_PAUSE_EXPRESSION) { + mAnmFlags &= ~ANM_PAUSE_EXPRESSION; + } + field_0x9a4 = (profile_method_class*)-1; + } + } else { + field_0x9a4 = (profile_method_class*)-1; + if (field_0x950 != 0) { + field_0x950 = 1; + } + } + } + if (!param_3) { + cLib_calcTimer(&field_0x950); + } + return field_0x950; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::ctrlMsgAnm(int& param_0, int& param_1, fopAc_ac_c* param_2, int param_3) { +asm int daNpcF_c::ctrlMsgAnm(int& param_0, int& param_1, fopAc_ac_c* param_2, int param_3) { nofralloc #include "asm/d/a/d_a_npc/ctrlMsgAnm__8daNpcF_cFRiRiP10fopAc_ac_ci.s" } #pragma pop +#endif /* 8015387C-80153954 14E1BC 00D8+00 0/0 0/0 45/45 .text orderEvent__8daNpcF_cFiPcUsUsUcUs */ @@ -5043,7 +5480,7 @@ asm void daNpcF_c::changeEvent(char* param_0, char* param_1, u16 param_2, u16 pa #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::chkActorInSight(fopAc_ac_c* param_0, f32 param_1) { +asm BOOL daNpcF_c::chkActorInSight(fopAc_ac_c* param_0, f32 param_1) { nofralloc #include "asm/d/a/d_a_npc/chkActorInSight__8daNpcF_cFP10fopAc_ac_cf.s" } @@ -5051,14 +5488,46 @@ asm void daNpcF_c::chkActorInSight(fopAc_ac_c* param_0, f32 param_1) { /* 80153A78-80153BDC 14E3B8 0164+00 1/1 0/0 0/0 .text * chkActorInArea__8daNpcF_cFP10fopAc_ac_c4cXyz4cXyzs */ +/** + * Check whether an actor is in an elliptic cylinder region. + * @param actor The actor to check. + * @param center The center of the cylinder. + * @param box The dimensions of the bounding box. + * @param angY The angle to align the axis of the ellipse. + * @return Whether the actor's position vector lies in the elliptic cylinder. + */ +#ifdef NONMATCHING +// literals +BOOL daNpcF_c::chkActorInArea(fopAc_ac_c* actor, cXyz center, cXyz box, s16 angY) { + cXyz disp, relPos; + BOOL ret = false; + + mDoMtx_stack_c::YrotS(-angY); + mDoMtx_stack_c::transM(-center.x, -center.y, -center.z); + mDoMtx_stack_c::multVec(&actor->current.pos, &relPos); + + f32 boxX = fabsf(box.x); + f32 boxZ = fabsf(box.z); + f32 posX = fabsf(relPos.x); + f32 posZ = fabsf(relPos.z); + disp = center - actor->current.pos; + + if ((posX * posX) / (boxX * boxX) + (posZ * posZ) / (boxZ * boxZ) <= 1.0f && -box.y < disp.y && disp.y < box.y) { + ret = true; + } + + return ret; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::chkActorInArea(fopAc_ac_c* param_0, cXyz param_1, cXyz param_2, s16 param_3) { +asm BOOL daNpcF_c::chkActorInArea(fopAc_ac_c* param_0, cXyz param_1, cXyz param_2, s16 param_3) { nofralloc #include "asm/d/a/d_a_npc/chkActorInArea__8daNpcF_cFP10fopAc_ac_c4cXyz4cXyzs.s" } #pragma pop +#endif /* ############################################################################################## */ /* 804534AC-804534B0 001AAC 0004+00 3/3 0/0 0/0 .sdata2 @11253 */ @@ -5066,14 +5535,39 @@ SECTION_SDATA2 static f32 lit_11253 = 0.5f; /* 80153BDC-80153D1C 14E51C 0140+00 0/0 0/0 25/25 .text * chkActorInAttnArea__8daNpcF_cFP10fopAc_ac_cP10fopAc_ac_ci */ +/** + * Check whether an actor lies within another actor's region of attention. + * @param actorCheck The actor to check. + * @param actorAttn The actor whose attention region we are using. + * @param distIndex An index into the distance table to determine the size of the attention region. + * @return Whether `actorCheck` is within the region of attention of `actorAttn`. + */ +#ifdef NONMATCHING +BOOL daNpcF_c::chkActorInAttnArea(fopAc_ac_c* actorCheck, fopAc_ac_c* actorAttn, int distIndex) { + BOOL ret = false; + f32 fv5 = dAttention_c::getDistTable(distIndex)->field_0x10 * -1.0f; + f32 fv4 = dAttention_c::getDistTable(distIndex)->field_0xc * -1.0f; + cXyz attnCtr = actorAttn->current.pos; + cXyz attnBox; + attnBox.x = dAttention_c::getDistTable(distIndex)->field_0x0; + attnBox.y = (fabsf(fv5) + fabsf(fv4)) * 0.5f; + attnBox.z = dAttention_c::getDistTable(distIndex)->field_0x0; + attnCtr.y = attnBox.y + (attnCtr.y + fv4); + if (chkActorInArea(actorCheck, attnCtr, attnBox, actorAttn->shape_angle.y)) { + ret = true; + } + return ret; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::chkActorInAttnArea(fopAc_ac_c* param_0, fopAc_ac_c* param_1, int param_2) { +asm BOOL daNpcF_c::chkActorInAttnArea(fopAc_ac_c* actorCheck, fopAc_ac_c* actorAttn, int param_2) { nofralloc #include "asm/d/a/d_a_npc/chkActorInAttnArea__8daNpcF_cFP10fopAc_ac_cP10fopAc_ac_ci.s" } #pragma pop +#endif /* 80153D1C-80153D84 14E65C 0068+00 0/0 0/0 118/118 .text initTalk__8daNpcF_cFiPP10fopAc_ac_c */ int daNpcF_c::initTalk(int param_0, fopAc_ac_c** param_1) { @@ -5090,7 +5584,7 @@ int daNpcF_c::initTalk(int param_0, fopAc_ac_c** param_1) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::talkProc(int* param_0, int param_1, fopAc_ac_c** param_2) { +asm BOOL daNpcF_c::talkProc(int* param_0, int param_1, fopAc_ac_c** param_2) { nofralloc #include "asm/d/a/d_a_npc/talkProc__8daNpcF_cFPiiPP10fopAc_ac_c.s" } @@ -5100,7 +5594,7 @@ asm void daNpcF_c::talkProc(int* param_0, int param_1, fopAc_ac_c** param_2) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::turn(s16 param_0, f32 param_1, int param_2) { +asm BOOL daNpcF_c::turn(s16 param_0, f32 param_1, int param_2) { nofralloc #include "asm/d/a/d_a_npc/turn__8daNpcF_cFsfi.s" } @@ -5129,13 +5623,13 @@ asm void daNpcF_c::setAngle(s16 param_0) { /* 80154278-801542A0 14EBB8 0028+00 0/0 0/0 36/36 .text getDistTableIdx__8daNpcF_cFii */ u8 daNpcF_getDistTableIdx(int param_0, int param_1); //fwd dec to get a match -void daNpcF_c::getDistTableIdx(int param_0, int param_1) { - daNpcF_getDistTableIdx(param_0,param_1); +u8 daNpcF_c::getDistTableIdx(int param_0, int param_1) { + return daNpcF_getDistTableIdx(param_0,param_1); } /* 801542A0-8015436C 14EBE0 00CC+00 0/0 0/0 6/6 .text getEvtAreaTagP__8daNpcF_cFii */ #ifdef NONMATCHING -int daNpcF_c::getEvtAreaTagP(int param_0, int param_1) { +fopAc_ac_c* daNpcF_c::getEvtAreaTagP(int param_0, int param_1) { mFindCount = 0; mSrchActorName = PROC_TAG_EVTAREA; fpcM_Search((fpcLyIt_JudgeFunc)this->srchActor,(void*)this); @@ -5152,7 +5646,7 @@ int daNpcF_c::getEvtAreaTagP(int param_0, int param_1) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm int daNpcF_c::getEvtAreaTagP(int param_0, int param_1) { +asm fopAc_ac_c* daNpcF_c::getEvtAreaTagP(int param_0, int param_1) { nofralloc #include "asm/d/a/d_a_npc/getEvtAreaTagP__8daNpcF_cFii.s" } @@ -5181,7 +5675,7 @@ asm void daNpcF_c::getAttnActorP(int param_0, void* (*param_1)(void*, void*), f3 #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_c::chkActorInSight2(fopAc_ac_c* param_0, f32 param_1, s16 param_2) { +asm BOOL daNpcF_c::chkActorInSight2(fopAc_ac_c* param_0, f32 param_1, s16 param_2) { nofralloc #include "asm/d/a/d_a_npc/chkActorInSight2__8daNpcF_cFP10fopAc_ac_cfs.s" } @@ -5347,7 +5841,7 @@ int daNpcF_getGroundAngle(cBgS_PolyInfo* param_0, s16 param_1) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_getGroundAngle(cBgS_PolyInfo* param_0, s16 param_1) { +asm int daNpcF_getGroundAngle(cBgS_PolyInfo* param_0, s16 param_1) { nofralloc #include "asm/d/a/d_a_npc/daNpcF_getGroundAngle__FP13cBgS_PolyInfos.s" } @@ -5355,8 +5849,8 @@ asm void daNpcF_getGroundAngle(cBgS_PolyInfo* param_0, s16 param_1) { #endif /* 80155634-80155674 14FF74 0040+00 0/0 0/0 69/69 .text daNpcF_chkEvtBit__FUl */ -void daNpcF_chkEvtBit(u32 i_idx) { - i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_idx]); +BOOL daNpcF_chkEvtBit(u32 i_idx) { + return i_dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_idx]); } /* 80155674-801556B4 14FFB4 0040+00 0/0 0/0 13/13 .text daNpcF_onEvtBit__FUl */ @@ -5365,8 +5859,8 @@ void daNpcF_onEvtBit(u32 i_idx) { } /* 801556B4-801556F4 14FFF4 0040+00 0/0 0/0 6/6 .text daNpcF_chkTmpBit__FUl */ -void daNpcF_chkTmpBit(u32 i_idx) { - dComIfGs_isTmpBit(dSv_event_tmp_flag_c::tempBitLabels[i_idx]); +BOOL daNpcF_chkTmpBit(u32 i_idx) { + return dComIfGs_isTmpBit(dSv_event_tmp_flag_c::tempBitLabels[i_idx]); } /* 801556F4-80155734 150034 0040+00 0/0 0/0 6/6 .text daNpcF_onTmpBit__FUl */ @@ -5519,7 +6013,7 @@ void daNpcF_c::adjustShapeAngle() { } /* 80155BC0-80155BC8 150500 0008+00 2/0 0/0 0/0 .text main__8daNpcF_cFv */ -bool daNpcF_c::main() { +BOOL daNpcF_c::main() { return true; } @@ -5534,12 +6028,12 @@ void daNpcF_c::drawOtherMdls() { } /* 80155BD0-80155BD8 150510 0008+00 2/0 0/0 0/0 .text drawDbgInfo__8daNpcF_cFv */ -bool daNpcF_c::drawDbgInfo() { +BOOL daNpcF_c::drawDbgInfo() { return true; } /* 80155BD8-80155BE0 150518 0008+00 2/0 0/0 0/0 .text ctrlBtk__8daNpcF_cFv */ -bool daNpcF_c::ctrlBtk() { +BOOL daNpcF_c::ctrlBtk() { return false; } diff --git a/src/d/com/d_com_inf_game.cpp b/src/d/com/d_com_inf_game.cpp index c02cefa0600..9633b593eeb 100644 --- a/src/d/com/d_com_inf_game.cpp +++ b/src/d/com/d_com_inf_game.cpp @@ -2388,10 +2388,14 @@ bool dComIfGs_shake_kandelaar_check() { /* 8002FA54-8002FA84 02A394 0030+00 0/0 4/4 96/96 .text dComIfGs_wolfeye_effect_check__Fv */ -bool dComIfGs_wolfeye_effect_check() { +BOOL dComIfGs_wolfeye_effect_check() { dScnKy_env_light_c* env_light = i_dKy_getEnvlight(); + BOOL ret = false; - return env_light->field_0xf3d == 1 && env_light->field_0xf40 > 0.6; + if (env_light->field_0xf3d == 1 && env_light->field_0xf40 > 0.6) { + ret = true; + } + return ret; } void dComIfGs_Grass_hide_Set(s8 param_0) { diff --git a/src/d/d_resorce.cpp b/src/d/d_resorce.cpp index f07967a6cf1..dbec7bec151 100644 --- a/src/d/d_resorce.cpp +++ b/src/d/d_resorce.cpp @@ -380,7 +380,8 @@ asm J3DModelData* dRes_info_c::loaderBasicBmd(u32 param_0, void* param_1) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTevKColorAnm::~J3DTevKColorAnm() { +// asm J3DTevKColorAnm::~J3DTevKColorAnm() { +extern "C" asm void __dt__15J3DTevKColorAnmFv() { nofralloc #include "asm/d/d_resorce/__dt__15J3DTevKColorAnmFv.s" } @@ -390,7 +391,8 @@ asm J3DTevKColorAnm::~J3DTevKColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTevKColorAnm::J3DTevKColorAnm() { +// asm J3DTevKColorAnm::J3DTevKColorAnm() { +extern "C" asm void __ct__15J3DTevKColorAnmFv() { nofralloc #include "asm/d/d_resorce/__ct__15J3DTevKColorAnmFv.s" } @@ -400,7 +402,8 @@ asm J3DTevKColorAnm::J3DTevKColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTevColorAnm::~J3DTevColorAnm() { +// asm J3DTevColorAnm::~J3DTevColorAnm() { +extern "C" asm void __dt__14J3DTevColorAnmFv() { nofralloc #include "asm/d/d_resorce/__dt__14J3DTevColorAnmFv.s" } @@ -410,7 +413,8 @@ asm J3DTevColorAnm::~J3DTevColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTevColorAnm::J3DTevColorAnm() { +// asm J3DTevColorAnm::J3DTevColorAnm() { +extern "C" asm void __ct__14J3DTevColorAnmFv() { nofralloc #include "asm/d/d_resorce/__ct__14J3DTevColorAnmFv.s" } @@ -474,7 +478,8 @@ extern "C" asm void __dt__11J3DTexNoAnmFv() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTexNoAnm::J3DTexNoAnm() { +// asm J3DTexNoAnm::J3DTexNoAnm() { +extern "C" asm void __ct__11J3DTexNoAnmFv() { nofralloc #include "asm/d/d_resorce/__ct__11J3DTexNoAnmFv.s" } @@ -484,7 +489,8 @@ asm J3DTexNoAnm::J3DTexNoAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTexMtxAnm::~J3DTexMtxAnm() { +// asm J3DTexMtxAnm::~J3DTexMtxAnm() { +extern "C" asm void __dt__12J3DTexMtxAnmFv() { nofralloc #include "asm/d/d_resorce/__dt__12J3DTexMtxAnmFv.s" } @@ -494,7 +500,8 @@ asm J3DTexMtxAnm::~J3DTexMtxAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTexMtxAnm::J3DTexMtxAnm() { +// asm J3DTexMtxAnm::J3DTexMtxAnm() { +extern "C" asm void __ct__12J3DTexMtxAnmFv() { nofralloc #include "asm/d/d_resorce/__ct__12J3DTexMtxAnmFv.s" } @@ -504,7 +511,8 @@ asm J3DTexMtxAnm::J3DTexMtxAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DMatColorAnm::~J3DMatColorAnm() { +// asm J3DMatColorAnm::~J3DMatColorAnm() { +extern "C" asm void __dt__14J3DMatColorAnmFv() { nofralloc #include "asm/d/d_resorce/__dt__14J3DMatColorAnmFv.s" } @@ -514,7 +522,8 @@ asm J3DMatColorAnm::~J3DMatColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DMatColorAnm::J3DMatColorAnm() { +// asm J3DMatColorAnm::J3DMatColorAnm() { +extern "C" asm void __ct__14J3DMatColorAnmFv() { nofralloc #include "asm/d/d_resorce/__ct__14J3DMatColorAnmFv.s" } @@ -1114,7 +1123,8 @@ asm void J3DAnmTransformKey::getTransform(u16 param_0, J3DTransformInfo* param_1 #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DTexNoAnm::calc(u16* param_0) const { +// asm void J3DTexNoAnm::calc(u16* param_0) const { +extern "C" asm void calc__11J3DTexNoAnmCFPUs() { nofralloc #include "asm/d/d_resorce/calc__11J3DTexNoAnmCFPUs.s" } diff --git a/src/d/event/d_event.cpp b/src/d/event/d_event.cpp index 004225ab224..9ab4514e203 100644 --- a/src/d/event/d_event.cpp +++ b/src/d/event/d_event.cpp @@ -489,12 +489,12 @@ int dEvt_control_c::catchCheck(dEvt_order_c* p_order) { /* 80041D34-80041DDC 03C674 00A8+00 1/1 0/0 0/0 .text talkEnd__14dEvt_control_cFv */ int dEvt_control_c::talkEnd() { - fopAc_ac_c* actor = (fopAc_ac_c*)getPt1(); + fopAc_ac_c* actor = getPt1(); if (actor != NULL) { actor->mEvtInfo.setCommand(0); } - actor = (fopAc_ac_c*)getPt2(); + actor = getPt2(); if (actor != NULL) { actor->mEvtInfo.setCommand(0); } @@ -560,12 +560,12 @@ int dEvt_control_c::demoCheck(dEvt_order_c* p_order) { /* 80041F18-80041FA0 03C858 0088+00 1/1 0/0 0/0 .text demoEnd__14dEvt_control_cFv */ int dEvt_control_c::demoEnd() { - fopAc_ac_c* actor = (fopAc_ac_c*)getPt1(); + fopAc_ac_c* actor = getPt1(); if (actor != NULL) { actor->mEvtInfo.setCommand(0); } - actor = (fopAc_ac_c*)getPt2(); + actor = getPt2(); if (actor != NULL) { actor->mEvtInfo.setCommand(0); } @@ -597,7 +597,7 @@ int dEvt_control_c::doorCheck(dEvt_order_c* p_order) { if (commonCheck(p_order, 4, 3)) { mMode = EVT_MODE_DEMO; - fopAc_ac_c* actor2 = (fopAc_ac_c*)getPt2(); + fopAc_ac_c* actor2 = getPt2(); if (actor2 != NULL) { i_dComIfGp_getEventManager().setObjectArchive(actor2->mEvtInfo.getArchiveName()); } @@ -754,9 +754,9 @@ int dEvt_control_c::entry() { /* 80042468-80042518 03CDA8 00B0+00 1/1 8/8 388/388 .text reset__14dEvt_control_cFv */ void dEvt_control_c::reset() { if (field_0xec != 0xFF) { - void* pt1 = getPt1(); + fopAc_ac_c* pt1 = getPt1(); s16 eventIdx = i_dComIfGp_getEventManager().getEventIdx(NULL, field_0xec, -1); - void* pt2 = getPt2(); + fopAc_ac_c* pt2 = getPt2(); order(EVT_TYPE_OTHER, 3, 0x201, mHindFlag, pt1, pt2, eventIdx, field_0xec); mChangeOK = pt1; @@ -769,7 +769,7 @@ void dEvt_control_c::reset() { void dEvt_control_c::reset(void* param_0) { if (field_0xec != 0xFF) { s16 eventIdx = i_dComIfGp_getEventManager().getEventIdx((fopAc_ac_c*)param_0, field_0xec); - void* pt2 = getPt2(); + fopAc_ac_c* pt2 = getPt2(); order(EVT_TYPE_OTHER, 3, 0x201, mHindFlag, param_0, pt2, eventIdx, field_0xec); } @@ -970,7 +970,7 @@ bool dEvt_control_c::skipper() { if (startSkip) { dMsgObject_onKillMessageFlag(); - void* ptr = convPId(field_0x104); + fopAc_ac_c* ptr = convPId(field_0x104); if (ptr == NULL) { ptr = dComIfGp_getPlayer(0); } @@ -1240,8 +1240,8 @@ u32 dEvt_control_c::getPId(void* actor) { } /* 800432EC-8004331C 03DC2C 0030+00 7/7 13/13 16/16 .text convPId__14dEvt_control_cFUi */ -void* dEvt_control_c::convPId(unsigned int id) { - return fopAcIt_Judge(fpcSch_JudgeByID, &id); +fopAc_ac_c* dEvt_control_c::convPId(unsigned int id) { + return (fopAc_ac_c*)fopAcIt_Judge(fpcSch_JudgeByID, &id); } /* 8004331C-800433F0 03DC5C 00D4+00 0/0 1/1 0/0 .text getStbDemoData__14dEvt_control_cFPc diff --git a/src/d/event/d_event_manager.cpp b/src/d/event/d_event_manager.cpp index 556a3f3615c..4b5e75826e6 100644 --- a/src/d/event/d_event_manager.cpp +++ b/src/d/event/d_event_manager.cpp @@ -464,7 +464,7 @@ void dEvent_manager_c::Sequencer() { evtControl.onSkipFade(); } - void* actor = evtControl.getPt1(); + fopAc_ac_c* actor = evtControl.getPt1(); if (actor == NULL) { actor = evtControl.getPt2(); } diff --git a/src/d/s/d_s_logo.cpp b/src/d/s/d_s_logo.cpp index 01873202547..58127099d7e 100644 --- a/src/d/s/d_s_logo.cpp +++ b/src/d/s/d_s_logo.cpp @@ -889,15 +889,6 @@ void dScnLogo_c::setRenderMode() { /* 8025855C-802585A4 252E9C 0048+00 2/1 0/0 0/0 .text __dt__10dLog_HIO_cFv */ dLog_HIO_c::~dLog_HIO_c() {} -/* 802585A4-802585C0 252EE4 001C+00 1/1 0/0 0/0 .text cLib_calcTimer__FPUs */ -template -T cLib_calcTimer(T* value) { - if (*value != 0) { - *value = *value - 1; - } - return *value; -} - /* 803C2FD0-803C2FE4 -00001 0014+00 1/0 0/0 0/0 .data l_dScnLogo_Method */ SECTION_DATA static void* l_dScnLogo_Method[5] = { (void*)dScnLogo_Create__FP11scene_class, (void*)dScnLogo_Delete__FP10dScnLogo_c, diff --git a/src/f_op/f_op_actor_mng.cpp b/src/f_op/f_op_actor_mng.cpp index 112eea3affa..e0fe58f10e0 100644 --- a/src/f_op/f_op_actor_mng.cpp +++ b/src/f_op/f_op_actor_mng.cpp @@ -1435,18 +1435,18 @@ s32 fopAcM_orderTreasureEvent(fopAc_ac_c* actorA, fopAc_ac_c* actorB, u16 priori /* 8001BB14-8001BB44 016454 0030+00 0/0 11/11 10/10 .text * fopAcM_getTalkEventPartner__FPC10fopAc_ac_c */ -void* fopAcM_getTalkEventPartner(fopAc_ac_c const*) { +fopAc_ac_c* fopAcM_getTalkEventPartner(fopAc_ac_c const*) { return dComIfGp_event_getTalkPartner(); } /* 8001BB44-8001BB74 016484 0030+00 0/0 5/5 0/0 .text fopAcM_getItemEventPartner__FPC10fopAc_ac_c */ -void* fopAcM_getItemEventPartner(fopAc_ac_c const*) { +fopAc_ac_c* fopAcM_getItemEventPartner(fopAc_ac_c const*) { return dComIfGp_event_getItemPartner(); } /* 8001BB74-8001BBE8 0164B4 0074+00 0/0 1/1 0/0 .text fopAcM_getEventPartner__FPC10fopAc_ac_c */ -void* fopAcM_getEventPartner(fopAc_ac_c const* actor) { +fopAc_ac_c* fopAcM_getEventPartner(fopAc_ac_c const* actor) { if (dComIfGp_event_getPt1() != actor) { return dComIfGp_event_getPt1(); } diff --git a/src/m_Do/m_Do_ext.cpp b/src/m_Do/m_Do_ext.cpp index 471fb991d64..1ef6371143c 100644 --- a/src/m_Do/m_Do_ext.cpp +++ b/src/m_Do/m_Do_ext.cpp @@ -2828,8 +2828,8 @@ asm void mDoExt_McaMorfSO::calc() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void mDoExt_McaMorfSO::setAnm(J3DAnmTransform* param_0, int param_1, f32 param_2, f32 param_3, - f32 param_4, f32 param_5) { +asm void mDoExt_McaMorfSO::setAnm(J3DAnmTransform* i_anm, int i_attr, f32 i_morf, f32 i_rate, + f32 i_start, f32 i_end) { nofralloc #include "asm/m_Do/m_Do_ext/setAnm__16mDoExt_McaMorfSOFP15J3DAnmTransformiffff.s" } From f7acd358555a68a2bc6de28a13c597c91f85907b Mon Sep 17 00:00:00 2001 From: randomsalience Date: Fri, 26 May 2023 06:33:06 -0400 Subject: [PATCH 2/5] work on d_a_npc_ash --- Progress.md | 16 +- .../d_a_npc/getTevRegKeyAnmP__8daNpcF_cFPci.s | 16 - .../a/d_a_npc/getTexPtrnAnmP__8daNpcF_cFPci.s | 16 - .../d_a_npc/getTexSRTKeyAnmP__8daNpcF_cFPci.s | 16 - .../getTrnsfrmKeyAnmP__8daNpcF_cFPci.s | 16 - ...ckAnm__8daNpcF_cFP15J3DAnmTransformfiiib.s | 18 - ...cF_cFP15J3DAnmTevRegKeyP12J3DModelDatafi.s | 17 - ...FP19J3DAnmTextureSRTKeyP12J3DModelDatafi.s | 17 - ...F_cFP16J3DAnmTexPatternP12J3DModelDatafi.s | 17 - .../d_a_npc_ash/Create__10daNpcAsh_cFv.s | 260 -- .../d_a_npc_ash/Delete__10daNpcAsh_cFv.s | 14 - .../d_a_npc_ash/Draw__10daNpcAsh_cFv.s | 73 - .../EvCut_Introduction__10daNpcAsh_cFi.s | 75 - .../d_a_npc_ash/Execute__10daNpcAsh_cFv.s | 10 - ...HeapCallBack__10daNpcAsh_cFP10fopAc_ac_c.s | 9 - ...lJointCallBack__10daNpcAsh_cFP8J3DJointi.s | 21 - .../d_a_npc_ash/daNpcAsh_Create__FPv.s | 9 - .../d_a_npc_ash/daNpcAsh_Delete__FPv.s | 9 - .../d_a_npc_ash/daNpcAsh_Draw__FPv.s | 9 - .../d_a_npc_ash/daNpcAsh_Execute__FPv.s | 9 - .../d_a_npc_ash/isSneaking__10daNpcAsh_cFv.s | 31 - ...on__10daNpcAsh_cFM10daNpcAsh_cFPCvPvPv_b.s | 45 - .../setExpression__10daNpcAsh_cFif.s | 12 - .../d_a_npc_ash/setMotion__10daNpcAsh_cFifi.s | 19 - .../Execute__15daTag_EvtArea_cFv.s | 95 - .../__dt__15daTag_EvtArea_cFv.s | 26 - .../chkPointInArea__15daTag_EvtArea_cF4cXyz.s | 25 - ...ointInArea__15daTag_EvtArea_cF4cXyz4cXyz.s | 217 -- .../create__15daTag_EvtArea_cFv.s | 154 -- .../daTag_EvtArea_Create__FPv.s | 9 - .../daTag_EvtArea_Delete__FPv.s | 9 - .../d_a_tag_evtarea/daTag_EvtArea_Draw__FPv.s | 9 - .../daTag_EvtArea_Execute__FPv.s | 9 - .../isDelete__15daTag_EvtArea_cFv.s | 50 - include/d/a/d_a_npc.h | 35 +- include/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash.h | 118 + rel/d/a/npc/d_a_npc_ash/d_a_npc_ash.cpp | 2168 +++++++++++------ src/d/a/d_a_npc.cpp | 6 +- 38 files changed, 1512 insertions(+), 2172 deletions(-) delete mode 100644 asm/d/a/d_a_npc/getTevRegKeyAnmP__8daNpcF_cFPci.s delete mode 100644 asm/d/a/d_a_npc/getTexPtrnAnmP__8daNpcF_cFPci.s delete mode 100644 asm/d/a/d_a_npc/getTexSRTKeyAnmP__8daNpcF_cFPci.s delete mode 100644 asm/d/a/d_a_npc/getTrnsfrmKeyAnmP__8daNpcF_cFPci.s delete mode 100644 asm/d/a/d_a_npc/setBckAnm__8daNpcF_cFP15J3DAnmTransformfiiib.s delete mode 100644 asm/d/a/d_a_npc/setBrkAnm__8daNpcF_cFP15J3DAnmTevRegKeyP12J3DModelDatafi.s delete mode 100644 asm/d/a/d_a_npc/setBtkAnm__8daNpcF_cFP19J3DAnmTextureSRTKeyP12J3DModelDatafi.s delete mode 100644 asm/d/a/d_a_npc/setBtpAnm__8daNpcF_cFP16J3DAnmTexPatternP12J3DModelDatafi.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Create__10daNpcAsh_cFv.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Delete__10daNpcAsh_cFv.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Draw__10daNpcAsh_cFv.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/EvCut_Introduction__10daNpcAsh_cFi.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Execute__10daNpcAsh_cFv.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/createHeapCallBack__10daNpcAsh_cFP10fopAc_ac_c.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/ctrlJointCallBack__10daNpcAsh_cFP8J3DJointi.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Create__FPv.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Delete__FPv.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Draw__FPv.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Execute__FPv.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/isSneaking__10daNpcAsh_cFv.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setAction__10daNpcAsh_cFM10daNpcAsh_cFPCvPvPv_b.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setExpression__10daNpcAsh_cFif.s delete mode 100644 asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setMotion__10daNpcAsh_cFifi.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/Execute__15daTag_EvtArea_cFv.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/__dt__15daTag_EvtArea_cFv.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/chkPointInArea__15daTag_EvtArea_cF4cXyz.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/chkPointInArea__15daTag_EvtArea_cF4cXyz4cXyz.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/create__15daTag_EvtArea_cFv.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Create__FPv.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Delete__FPv.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Draw__FPv.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Execute__FPv.s delete mode 100644 asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/isDelete__15daTag_EvtArea_cFv.s diff --git a/Progress.md b/Progress.md index bad404fea82..8b7dee45d66 100644 --- a/Progress.md +++ b/Progress.md @@ -7,22 +7,22 @@ Section | Percentage | Decompiled (bytes) | Total (bytes) .init | 97.972973% | 9280 | 9472 .extab | 100.000000% | 96 | 96 .extabindex | 100.000000% | 96 | 96 -.text | 26.824641% | 964760 | 3596544 +.text | 26.838543% | 965260 | 3596544 .ctors | 100.000000% | 448 | 448 .dtors | 100.000000% | 32 | 32 .rodata | 100.000000% | 193856 | 193856 .data | 100.000000% | 197632 | 197632 .sdata | 100.000000% | 1408 | 1408 .sdata2 | 100.000000% | 20832 | 20832 -Total | 34.538903% | 1388696 | 4020672 +Total | 34.551339% | 1389196 | 4020672 ## Total Section | Percentage | Decompiled (bytes) | Total (bytes) ---|---|---|--- -main.dol | 34.538903% | 1388696 | 4020672 -RELs | 33.578532% | 3861640 | 11500324 -Total | 33.827314% | 5250336 | 15520996 +main.dol | 34.551339% | 1389196 | 4020672 +RELs | 33.617279% | 3866096 | 11500324 +Total | 33.859245% | 5255292 | 15520996 ## RELs @@ -220,7 +220,7 @@ d_a_myna | 30.876570% | 9736 | 31532 d_a_nbomb | 28.739233% | 8808 | 30648 d_a_ni | 27.299309% | 8216 | 30096 d_a_npc_aru | 34.812103% | 12932 | 37148 -d_a_npc_ash | 31.737680% | 9892 | 31168 +d_a_npc_ash | 38.873203% | 12116 | 31168 d_a_npc_ashB | 32.906995% | 8336 | 25332 d_a_npc_bans | 34.954955% | 11640 | 33300 d_a_npc_besu | 38.726854% | 19492 | 50332 @@ -722,7 +722,7 @@ d_a_tag_csw | 35.869565% | 3696 | 10304 d_a_tag_escape | 100.000000% | 712 | 712 d_a_tag_event | 31.075697% | 1248 | 4016 d_a_tag_evt | 37.815126% | 1620 | 4284 -d_a_tag_evtarea | 37.091319% | 1316 | 3548 +d_a_tag_evtarea | 100.000000% | 3548 | 3548 d_a_tag_evtmsg | 39.491150% | 1428 | 3616 d_a_tag_firewall | 35.325132% | 1608 | 4552 d_a_tag_gra | 100.000000% | 800 | 800 @@ -785,4 +785,4 @@ d_a_vrbox2 | 34.977578% | 2184 | 6244 d_a_warp_bug | 54.940711% | 1112 | 2024 d_a_ykgr | 44.400631% | 2252 | 5072 f_pc_profile_lst | 100.000000% | 28156 | 28156 -Total | 33.578532% | 3861640 | 11500324 +Total | 33.617279% | 3866096 | 11500324 diff --git a/asm/d/a/d_a_npc/getTevRegKeyAnmP__8daNpcF_cFPci.s b/asm/d/a/d_a_npc/getTevRegKeyAnmP__8daNpcF_cFPci.s deleted file mode 100644 index 23d06830dae..00000000000 --- a/asm/d/a/d_a_npc/getTevRegKeyAnmP__8daNpcF_cFPci.s +++ /dev/null @@ -1,16 +0,0 @@ -lbl_80152BE0: -/* 80152BE0 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80152BE4 7C 08 02 A6 */ mflr r0 -/* 80152BE8 90 01 00 14 */ stw r0, 0x14(r1) -/* 80152BEC 7C 83 23 78 */ mr r3, r4 -/* 80152BF0 7C A4 2B 78 */ mr r4, r5 -/* 80152BF4 3C A0 80 40 */ lis r5, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80152BF8 38 A5 61 C0 */ addi r5, r5, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80152BFC 3C A5 00 02 */ addis r5, r5, 2 -/* 80152C00 38 C0 00 80 */ li r6, 0x80 -/* 80152C04 38 A5 C2 F8 */ addi r5, r5, -15624 -/* 80152C08 4B EE 96 E5 */ bl getRes__14dRes_control_cFPCclP11dRes_info_ci -/* 80152C0C 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80152C10 7C 08 03 A6 */ mtlr r0 -/* 80152C14 38 21 00 10 */ addi r1, r1, 0x10 -/* 80152C18 4E 80 00 20 */ blr diff --git a/asm/d/a/d_a_npc/getTexPtrnAnmP__8daNpcF_cFPci.s b/asm/d/a/d_a_npc/getTexPtrnAnmP__8daNpcF_cFPci.s deleted file mode 100644 index 6b579d24afd..00000000000 --- a/asm/d/a/d_a_npc/getTexPtrnAnmP__8daNpcF_cFPci.s +++ /dev/null @@ -1,16 +0,0 @@ -lbl_80152B68: -/* 80152B68 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80152B6C 7C 08 02 A6 */ mflr r0 -/* 80152B70 90 01 00 14 */ stw r0, 0x14(r1) -/* 80152B74 7C 83 23 78 */ mr r3, r4 -/* 80152B78 7C A4 2B 78 */ mr r4, r5 -/* 80152B7C 3C A0 80 40 */ lis r5, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80152B80 38 A5 61 C0 */ addi r5, r5, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80152B84 3C A5 00 02 */ addis r5, r5, 2 -/* 80152B88 38 C0 00 80 */ li r6, 0x80 -/* 80152B8C 38 A5 C2 F8 */ addi r5, r5, -15624 -/* 80152B90 4B EE 97 5D */ bl getRes__14dRes_control_cFPCclP11dRes_info_ci -/* 80152B94 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80152B98 7C 08 03 A6 */ mtlr r0 -/* 80152B9C 38 21 00 10 */ addi r1, r1, 0x10 -/* 80152BA0 4E 80 00 20 */ blr diff --git a/asm/d/a/d_a_npc/getTexSRTKeyAnmP__8daNpcF_cFPci.s b/asm/d/a/d_a_npc/getTexSRTKeyAnmP__8daNpcF_cFPci.s deleted file mode 100644 index ca7c53d93dd..00000000000 --- a/asm/d/a/d_a_npc/getTexSRTKeyAnmP__8daNpcF_cFPci.s +++ /dev/null @@ -1,16 +0,0 @@ -lbl_80152BA4: -/* 80152BA4 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80152BA8 7C 08 02 A6 */ mflr r0 -/* 80152BAC 90 01 00 14 */ stw r0, 0x14(r1) -/* 80152BB0 7C 83 23 78 */ mr r3, r4 -/* 80152BB4 7C A4 2B 78 */ mr r4, r5 -/* 80152BB8 3C A0 80 40 */ lis r5, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80152BBC 38 A5 61 C0 */ addi r5, r5, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80152BC0 3C A5 00 02 */ addis r5, r5, 2 -/* 80152BC4 38 C0 00 80 */ li r6, 0x80 -/* 80152BC8 38 A5 C2 F8 */ addi r5, r5, -15624 -/* 80152BCC 4B EE 97 21 */ bl getRes__14dRes_control_cFPCclP11dRes_info_ci -/* 80152BD0 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80152BD4 7C 08 03 A6 */ mtlr r0 -/* 80152BD8 38 21 00 10 */ addi r1, r1, 0x10 -/* 80152BDC 4E 80 00 20 */ blr diff --git a/asm/d/a/d_a_npc/getTrnsfrmKeyAnmP__8daNpcF_cFPci.s b/asm/d/a/d_a_npc/getTrnsfrmKeyAnmP__8daNpcF_cFPci.s deleted file mode 100644 index d504b471732..00000000000 --- a/asm/d/a/d_a_npc/getTrnsfrmKeyAnmP__8daNpcF_cFPci.s +++ /dev/null @@ -1,16 +0,0 @@ -lbl_80152B2C: -/* 80152B2C 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80152B30 7C 08 02 A6 */ mflr r0 -/* 80152B34 90 01 00 14 */ stw r0, 0x14(r1) -/* 80152B38 7C 83 23 78 */ mr r3, r4 -/* 80152B3C 7C A4 2B 78 */ mr r4, r5 -/* 80152B40 3C A0 80 40 */ lis r5, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80152B44 38 A5 61 C0 */ addi r5, r5, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80152B48 3C A5 00 02 */ addis r5, r5, 2 -/* 80152B4C 38 C0 00 80 */ li r6, 0x80 -/* 80152B50 38 A5 C2 F8 */ addi r5, r5, -15624 -/* 80152B54 4B EE 97 99 */ bl getRes__14dRes_control_cFPCclP11dRes_info_ci -/* 80152B58 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80152B5C 7C 08 03 A6 */ mtlr r0 -/* 80152B60 38 21 00 10 */ addi r1, r1, 0x10 -/* 80152B64 4E 80 00 20 */ blr diff --git a/asm/d/a/d_a_npc/setBckAnm__8daNpcF_cFP15J3DAnmTransformfiiib.s b/asm/d/a/d_a_npc/setBckAnm__8daNpcF_cFP15J3DAnmTransformfiiib.s deleted file mode 100644 index cd9cc6c6a0a..00000000000 --- a/asm/d/a/d_a_npc/setBckAnm__8daNpcF_cFP15J3DAnmTransformfiiib.s +++ /dev/null @@ -1,18 +0,0 @@ -lbl_80152C80: -/* 80152C80 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80152C84 7C 08 02 A6 */ mflr r0 -/* 80152C88 90 01 00 14 */ stw r0, 0x14(r1) -/* 80152C8C 7C AB 2B 78 */ mr r11, r5 -/* 80152C90 7C CA 33 78 */ mr r10, r6 -/* 80152C94 7C E0 3B 78 */ mr r0, r7 -/* 80152C98 7D 09 43 78 */ mr r9, r8 -/* 80152C9C 38 A0 00 01 */ li r5, 1 -/* 80152CA0 7D 66 5B 78 */ mr r6, r11 -/* 80152CA4 7D 47 07 34 */ extsh r7, r10 -/* 80152CA8 7C 08 07 34 */ extsh r8, r0 -/* 80152CAC 38 63 05 6C */ addi r3, r3, 0x56c -/* 80152CB0 4B EB AB 2D */ bl init__13mDoExt_bckAnmFP15J3DAnmTransformiifssb -/* 80152CB4 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80152CB8 7C 08 03 A6 */ mtlr r0 -/* 80152CBC 38 21 00 10 */ addi r1, r1, 0x10 -/* 80152CC0 4E 80 00 20 */ blr diff --git a/asm/d/a/d_a_npc/setBrkAnm__8daNpcF_cFP15J3DAnmTevRegKeyP12J3DModelDatafi.s b/asm/d/a/d_a_npc/setBrkAnm__8daNpcF_cFP15J3DAnmTevRegKeyP12J3DModelDatafi.s deleted file mode 100644 index 95618a73528..00000000000 --- a/asm/d/a/d_a_npc/setBrkAnm__8daNpcF_cFP15J3DAnmTevRegKeyP12J3DModelDatafi.s +++ /dev/null @@ -1,17 +0,0 @@ -lbl_80152D44: -/* 80152D44 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80152D48 7C 08 02 A6 */ mflr r0 -/* 80152D4C 90 01 00 14 */ stw r0, 0x14(r1) -/* 80152D50 7C 80 23 78 */ mr r0, r4 -/* 80152D54 7C C7 33 78 */ mr r7, r6 -/* 80152D58 38 85 00 58 */ addi r4, r5, 0x58 -/* 80152D5C 7C 05 03 78 */ mr r5, r0 -/* 80152D60 38 C0 00 01 */ li r6, 1 -/* 80152D64 39 00 00 00 */ li r8, 0 -/* 80152D68 39 20 FF FF */ li r9, -1 -/* 80152D6C 38 63 05 B8 */ addi r3, r3, 0x5b8 -/* 80152D70 4B EB A9 9D */ bl init__13mDoExt_brkAnmFP16J3DMaterialTableP15J3DAnmTevRegKeyiifss -/* 80152D74 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80152D78 7C 08 03 A6 */ mtlr r0 -/* 80152D7C 38 21 00 10 */ addi r1, r1, 0x10 -/* 80152D80 4E 80 00 20 */ blr diff --git a/asm/d/a/d_a_npc/setBtkAnm__8daNpcF_cFP19J3DAnmTextureSRTKeyP12J3DModelDatafi.s b/asm/d/a/d_a_npc/setBtkAnm__8daNpcF_cFP19J3DAnmTextureSRTKeyP12J3DModelDatafi.s deleted file mode 100644 index 9acbf9f0fa8..00000000000 --- a/asm/d/a/d_a_npc/setBtkAnm__8daNpcF_cFP19J3DAnmTextureSRTKeyP12J3DModelDatafi.s +++ /dev/null @@ -1,17 +0,0 @@ -lbl_80152D04: -/* 80152D04 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80152D08 7C 08 02 A6 */ mflr r0 -/* 80152D0C 90 01 00 14 */ stw r0, 0x14(r1) -/* 80152D10 7C 80 23 78 */ mr r0, r4 -/* 80152D14 7C C7 33 78 */ mr r7, r6 -/* 80152D18 38 85 00 58 */ addi r4, r5, 0x58 -/* 80152D1C 7C 05 03 78 */ mr r5, r0 -/* 80152D20 38 C0 00 01 */ li r6, 1 -/* 80152D24 39 00 00 00 */ li r8, 0 -/* 80152D28 39 20 FF FF */ li r9, -1 -/* 80152D2C 38 63 05 A0 */ addi r3, r3, 0x5a0 -/* 80152D30 4B EB A9 0D */ bl init__13mDoExt_btkAnmFP16J3DMaterialTableP19J3DAnmTextureSRTKeyiifss -/* 80152D34 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80152D38 7C 08 03 A6 */ mtlr r0 -/* 80152D3C 38 21 00 10 */ addi r1, r1, 0x10 -/* 80152D40 4E 80 00 20 */ blr diff --git a/asm/d/a/d_a_npc/setBtpAnm__8daNpcF_cFP16J3DAnmTexPatternP12J3DModelDatafi.s b/asm/d/a/d_a_npc/setBtpAnm__8daNpcF_cFP16J3DAnmTexPatternP12J3DModelDatafi.s deleted file mode 100644 index b0af4b4de8f..00000000000 --- a/asm/d/a/d_a_npc/setBtpAnm__8daNpcF_cFP16J3DAnmTexPatternP12J3DModelDatafi.s +++ /dev/null @@ -1,17 +0,0 @@ -lbl_80152CC4: -/* 80152CC4 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80152CC8 7C 08 02 A6 */ mflr r0 -/* 80152CCC 90 01 00 14 */ stw r0, 0x14(r1) -/* 80152CD0 7C 80 23 78 */ mr r0, r4 -/* 80152CD4 7C C7 33 78 */ mr r7, r6 -/* 80152CD8 38 85 00 58 */ addi r4, r5, 0x58 -/* 80152CDC 7C 05 03 78 */ mr r5, r0 -/* 80152CE0 38 C0 00 01 */ li r6, 1 -/* 80152CE4 39 00 00 00 */ li r8, 0 -/* 80152CE8 39 20 FF FF */ li r9, -1 -/* 80152CEC 38 63 05 88 */ addi r3, r3, 0x588 -/* 80152CF0 4B EB A8 5D */ bl init__13mDoExt_btpAnmFP16J3DMaterialTableP16J3DAnmTexPatterniifss -/* 80152CF4 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80152CF8 7C 08 03 A6 */ mtlr r0 -/* 80152CFC 38 21 00 10 */ addi r1, r1, 0x10 -/* 80152D00 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Create__10daNpcAsh_cFv.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Create__10daNpcAsh_cFv.s deleted file mode 100644 index fc4ed0c802c..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Create__10daNpcAsh_cFv.s +++ /dev/null @@ -1,260 +0,0 @@ -lbl_809587A0: -/* 809587A0 94 21 FF C0 */ stwu r1, -0x40(r1) -/* 809587A4 7C 08 02 A6 */ mflr r0 -/* 809587A8 90 01 00 44 */ stw r0, 0x44(r1) -/* 809587AC 39 61 00 40 */ addi r11, r1, 0x40 -/* 809587B0 4B A0 9A 19 */ bl _savegpr_24 -/* 809587B4 7C 7C 1B 78 */ mr r28, r3 -/* 809587B8 3C 80 80 96 */ lis r4, m__16daNpcAsh_Param_c@ha /* 0x8095D640@ha */ -/* 809587BC 3B E4 D6 40 */ addi r31, r4, m__16daNpcAsh_Param_c@l /* 0x8095D640@l */ -/* 809587C0 80 03 04 A0 */ lwz r0, 0x4a0(r3) -/* 809587C4 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c -/* 809587C8 40 82 00 1C */ bne lbl_809587E4 -/* 809587CC 28 1C 00 00 */ cmplwi r28, 0 -/* 809587D0 41 82 00 08 */ beq lbl_809587D8 -/* 809587D4 4B FF FB 19 */ bl __ct__10daNpcAsh_cFv -lbl_809587D8: -/* 809587D8 80 1C 04 A0 */ lwz r0, 0x4a0(r28) -/* 809587DC 60 00 00 08 */ ori r0, r0, 8 -/* 809587E0 90 1C 04 A0 */ stw r0, 0x4a0(r28) -lbl_809587E4: -/* 809587E4 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 809587E8 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 809587EC 3B C3 0F 38 */ addi r30, r3, 0xf38 -/* 809587F0 3B 1E 3E C8 */ addi r24, r30, 0x3ec8 -/* 809587F4 7F 03 C3 78 */ mr r3, r24 -/* 809587F8 3C 80 80 96 */ lis r4, d_a_npc_ash__stringBase0@ha /* 0x8095D910@ha */ -/* 809587FC 38 84 D9 10 */ addi r4, r4, d_a_npc_ash__stringBase0@l /* 0x8095D910@l */ -/* 80958800 38 84 00 6C */ addi r4, r4, 0x6c -/* 80958804 4B A1 01 91 */ bl strcmp -/* 80958808 2C 03 00 00 */ cmpwi r3, 0 -/* 8095880C 40 82 00 64 */ bne lbl_80958870 -/* 80958810 38 60 00 00 */ li r3, 0 -/* 80958814 4B 6D 41 69 */ bl getLayerNo__14dComIfG_play_cFi -/* 80958818 2C 03 00 04 */ cmpwi r3, 4 -/* 8095881C 40 82 00 54 */ bne lbl_80958870 -/* 80958820 38 60 01 69 */ li r3, 0x169 -/* 80958824 4B 7F CE 11 */ bl daNpcF_chkEvtBit__FUl -/* 80958828 2C 03 00 00 */ cmpwi r3, 0 -/* 8095882C 41 82 00 1C */ beq lbl_80958848 -/* 80958830 38 60 01 0A */ li r3, 0x10a -/* 80958834 4B 7F CE 01 */ bl daNpcF_chkEvtBit__FUl -/* 80958838 2C 03 00 00 */ cmpwi r3, 0 -/* 8095883C 40 82 00 0C */ bne lbl_80958848 -/* 80958840 38 60 00 05 */ li r3, 5 -/* 80958844 48 00 03 0C */ b lbl_80958B50 -lbl_80958848: -/* 80958848 38 60 00 18 */ li r3, 0x18 -/* 8095884C 38 80 00 4B */ li r4, 0x4b -/* 80958850 4B 6D 4E F1 */ bl dComIfGs_isStageSwitch__Fii -/* 80958854 2C 03 00 00 */ cmpwi r3, 0 -/* 80958858 41 82 00 0C */ beq lbl_80958864 -/* 8095885C 38 60 00 05 */ li r3, 5 -/* 80958860 48 00 02 F0 */ b lbl_80958B50 -lbl_80958864: -/* 80958864 38 00 00 00 */ li r0, 0 -/* 80958868 98 1C 0F 60 */ stb r0, 0xf60(r28) -/* 8095886C 48 00 00 58 */ b lbl_809588C4 -lbl_80958870: -/* 80958870 7F 03 C3 78 */ mr r3, r24 -/* 80958874 3C 80 80 96 */ lis r4, d_a_npc_ash__stringBase0@ha /* 0x8095D910@ha */ -/* 80958878 38 84 D9 10 */ addi r4, r4, d_a_npc_ash__stringBase0@l /* 0x8095D910@l */ -/* 8095887C 38 84 00 74 */ addi r4, r4, 0x74 -/* 80958880 4B A1 01 15 */ bl strcmp -/* 80958884 2C 03 00 00 */ cmpwi r3, 0 -/* 80958888 40 82 00 3C */ bne lbl_809588C4 -/* 8095888C 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80958890 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80958894 38 63 09 58 */ addi r3, r3, 0x958 -/* 80958898 38 80 00 14 */ li r4, 0x14 -/* 8095889C 4B 6D BF C5 */ bl isSwitch__12dSv_memBit_cCFi -/* 809588A0 2C 03 00 00 */ cmpwi r3, 0 -/* 809588A4 41 82 00 0C */ beq lbl_809588B0 -/* 809588A8 38 60 00 05 */ li r3, 5 -/* 809588AC 48 00 02 A4 */ b lbl_80958B50 -lbl_809588B0: -/* 809588B0 80 1C 04 9C */ lwz r0, 0x49c(r28) -/* 809588B4 60 00 40 00 */ ori r0, r0, 0x4000 -/* 809588B8 90 1C 04 9C */ stw r0, 0x49c(r28) -/* 809588BC 38 00 00 01 */ li r0, 1 -/* 809588C0 98 1C 0F 60 */ stb r0, 0xf60(r28) -lbl_809588C4: -/* 809588C4 A8 1C 04 E4 */ lha r0, 0x4e4(r28) -/* 809588C8 B0 1C 0F 58 */ sth r0, 0xf58(r28) -/* 809588CC 3B A0 00 05 */ li r29, 5 -/* 809588D0 3B 60 00 00 */ li r27, 0 -/* 809588D4 3B 40 00 00 */ li r26, 0 -/* 809588D8 3C 60 80 96 */ lis r3, l_arcNames@ha /* 0x8095DAC0@ha */ -/* 809588DC 3B 03 DA C0 */ addi r24, r3, l_arcNames@l /* 0x8095DAC0@l */ -/* 809588E0 3C 60 80 96 */ lis r3, l_loadRes_list@ha /* 0x8095DAB8@ha */ -/* 809588E4 3B 23 DA B8 */ addi r25, r3, l_loadRes_list@l /* 0x8095DAB8@l */ -/* 809588E8 48 00 00 30 */ b lbl_80958918 -lbl_809588EC: -/* 809588EC 38 7A 0F 3C */ addi r3, r26, 0xf3c -/* 809588F0 7C 7C 1A 14 */ add r3, r28, r3 -/* 809588F4 54 00 10 3A */ slwi r0, r0, 2 -/* 809588F8 7C 98 00 2E */ lwzx r4, r24, r0 -/* 809588FC 4B 6D 45 C1 */ bl dComIfG_resLoad__FP30request_of_phase_process_classPCc -/* 80958900 7C 7D 1B 78 */ mr r29, r3 -/* 80958904 2C 1D 00 04 */ cmpwi r29, 4 -/* 80958908 41 82 00 08 */ beq lbl_80958910 -/* 8095890C 48 00 02 44 */ b lbl_80958B50 -lbl_80958910: -/* 80958910 3B 7B 00 04 */ addi r27, r27, 4 -/* 80958914 3B 5A 00 08 */ addi r26, r26, 8 -lbl_80958918: -/* 80958918 88 9C 0F 60 */ lbz r4, 0xf60(r28) -/* 8095891C 54 80 15 BA */ rlwinm r0, r4, 2, 0x16, 0x1d -/* 80958920 7C 79 00 2E */ lwzx r3, r25, r0 -/* 80958924 7C 03 D8 2E */ lwzx r0, r3, r27 -/* 80958928 2C 00 00 00 */ cmpwi r0, 0 -/* 8095892C 40 80 FF C0 */ bge lbl_809588EC -/* 80958930 2C 1D 00 04 */ cmpwi r29, 4 -/* 80958934 40 82 02 18 */ bne lbl_80958B4C -/* 80958938 38 A0 00 00 */ li r5, 0 -/* 8095893C 2C 04 00 01 */ cmpwi r4, 1 -/* 80958940 41 82 00 1C */ beq lbl_8095895C -/* 80958944 40 80 00 1C */ bge lbl_80958960 -/* 80958948 2C 04 00 00 */ cmpwi r4, 0 -/* 8095894C 40 80 00 08 */ bge lbl_80958954 -/* 80958950 48 00 00 10 */ b lbl_80958960 -lbl_80958954: -/* 80958954 38 A0 42 10 */ li r5, 0x4210 -/* 80958958 48 00 00 08 */ b lbl_80958960 -lbl_8095895C: -/* 8095895C 38 A0 58 B0 */ li r5, 0x58b0 -lbl_80958960: -/* 80958960 7F 83 E3 78 */ mr r3, r28 -/* 80958964 3C 80 80 96 */ lis r4, createHeapCallBack__10daNpcAsh_cFP10fopAc_ac_c@ha /* 0x80959458@ha */ -/* 80958968 38 84 94 58 */ addi r4, r4, createHeapCallBack__10daNpcAsh_cFP10fopAc_ac_c@l /* 0x80959458@l */ -/* 8095896C 4B 6C 1B 45 */ bl fopAcM_entrySolidHeap__FP10fopAc_ac_cPFP10fopAc_ac_c_iUl -/* 80958970 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 80958974 40 82 00 0C */ bne lbl_80958980 -/* 80958978 38 60 00 05 */ li r3, 5 -/* 8095897C 48 00 01 D4 */ b lbl_80958B50 -lbl_80958980: -/* 80958980 80 7C 05 68 */ lwz r3, 0x568(r28) -/* 80958984 80 63 00 04 */ lwz r3, 4(r3) -/* 80958988 38 03 00 24 */ addi r0, r3, 0x24 -/* 8095898C 90 1C 05 04 */ stw r0, 0x504(r28) -/* 80958990 7F 83 E3 78 */ mr r3, r28 -/* 80958994 C0 3F 00 6C */ lfs f1, 0x6c(r31) -/* 80958998 C0 5F 00 70 */ lfs f2, 0x70(r31) -/* 8095899C FC 60 08 90 */ fmr f3, f1 -/* 809589A0 C0 9F 00 74 */ lfs f4, 0x74(r31) -/* 809589A4 C0 BF 00 78 */ lfs f5, 0x78(r31) -/* 809589A8 FC C0 20 90 */ fmr f6, f4 -/* 809589AC 4B 6C 1B 9D */ bl fopAcM_setCullSizeBox__FP10fopAc_ac_cffffff -/* 809589B0 38 7C 0B 48 */ addi r3, r28, 0xb48 -/* 809589B4 38 9C 04 D0 */ addi r4, r28, 0x4d0 -/* 809589B8 38 BC 05 38 */ addi r5, r28, 0x538 -/* 809589BC 38 C0 00 03 */ li r6, 3 -/* 809589C0 38 E0 00 01 */ li r7, 1 -/* 809589C4 4B 96 7B 6D */ bl init__10Z2CreatureFP3VecP3VecUcUc -/* 809589C8 38 7C 07 E4 */ addi r3, r28, 0x7e4 -/* 809589CC 38 9F 00 00 */ addi r4, r31, 0 -/* 809589D0 C0 24 00 1C */ lfs f1, 0x1c(r4) -/* 809589D4 C0 44 00 18 */ lfs f2, 0x18(r4) -/* 809589D8 4B 71 D5 81 */ bl SetWall__12dBgS_AcchCirFff -/* 809589DC 38 1C 04 E4 */ addi r0, r28, 0x4e4 -/* 809589E0 90 01 00 08 */ stw r0, 8(r1) -/* 809589E4 38 7C 05 D0 */ addi r3, r28, 0x5d0 -/* 809589E8 38 9C 04 D0 */ addi r4, r28, 0x4d0 -/* 809589EC 38 BC 04 BC */ addi r5, r28, 0x4bc -/* 809589F0 7F 86 E3 78 */ mr r6, r28 -/* 809589F4 38 E0 00 01 */ li r7, 1 -/* 809589F8 39 1C 07 E4 */ addi r8, r28, 0x7e4 -/* 809589FC 39 3C 04 F8 */ addi r9, r28, 0x4f8 -/* 80958A00 39 5C 04 DC */ addi r10, r28, 0x4dc -/* 80958A04 4B 71 D8 45 */ bl Set__9dBgS_AcchFP4cXyzP4cXyzP10fopAc_ac_ciP12dBgS_AcchCirP4cXyzP5csXyzP5csXyz -/* 80958A08 80 1C 05 FC */ lwz r0, 0x5fc(r28) -/* 80958A0C 60 00 00 08 */ ori r0, r0, 8 -/* 80958A10 90 1C 05 FC */ stw r0, 0x5fc(r28) -/* 80958A14 80 1C 05 FC */ lwz r0, 0x5fc(r28) -/* 80958A18 60 00 04 00 */ ori r0, r0, 0x400 -/* 80958A1C 90 1C 05 FC */ stw r0, 0x5fc(r28) -/* 80958A20 38 7C 05 D0 */ addi r3, r28, 0x5d0 -/* 80958A24 7F C4 F3 78 */ mr r4, r30 -/* 80958A28 4B 71 E0 85 */ bl CrrPos__9dBgS_AcchFR4dBgS -/* 80958A2C 38 7C 07 A8 */ addi r3, r28, 0x7a8 -/* 80958A30 38 9F 00 00 */ addi r4, r31, 0 -/* 80958A34 C0 04 00 10 */ lfs f0, 0x10(r4) -/* 80958A38 FC 00 00 1E */ fctiwz f0, f0 -/* 80958A3C D8 01 00 10 */ stfd f0, 0x10(r1) -/* 80958A40 80 81 00 14 */ lwz r4, 0x14(r1) -/* 80958A44 38 A0 00 00 */ li r5, 0 -/* 80958A48 7F 86 E3 78 */ mr r6, r28 -/* 80958A4C 4B 72 AE 15 */ bl Init__9dCcD_SttsFiiP10fopAc_ac_c -/* 80958A50 38 7C 0C B8 */ addi r3, r28, 0xcb8 -/* 80958A54 3C 80 80 3B */ lis r4, mCcDCyl__8daNpcF_c@ha /* 0x803B37E0@ha */ -/* 80958A58 38 84 37 E0 */ addi r4, r4, mCcDCyl__8daNpcF_c@l /* 0x803B37E0@l */ -/* 80958A5C 4B 72 BE 59 */ bl Set__8dCcD_CylFRC11dCcD_SrcCyl -/* 80958A60 38 1C 07 A8 */ addi r0, r28, 0x7a8 -/* 80958A64 90 1C 0C FC */ stw r0, 0xcfc(r28) -/* 80958A68 38 00 00 00 */ li r0, 0 -/* 80958A6C 90 1C 0C E0 */ stw r0, 0xce0(r28) -/* 80958A70 90 1C 0C D0 */ stw r0, 0xcd0(r28) -/* 80958A74 88 1C 0F 60 */ lbz r0, 0xf60(r28) -/* 80958A78 28 00 00 00 */ cmplwi r0, 0 -/* 80958A7C 40 82 00 30 */ bne lbl_80958AAC -/* 80958A80 38 7C 0D F4 */ addi r3, r28, 0xdf4 -/* 80958A84 3C 80 80 3B */ lis r4, mCcDCyl__8daNpcF_c@ha /* 0x803B37E0@ha */ -/* 80958A88 38 84 37 E0 */ addi r4, r4, mCcDCyl__8daNpcF_c@l /* 0x803B37E0@l */ -/* 80958A8C 4B 72 BE 29 */ bl Set__8dCcD_CylFRC11dCcD_SrcCyl -/* 80958A90 38 1C 07 A8 */ addi r0, r28, 0x7a8 -/* 80958A94 90 1C 0E 38 */ stw r0, 0xe38(r28) -/* 80958A98 38 00 00 00 */ li r0, 0 -/* 80958A9C 90 1C 0E 1C */ stw r0, 0xe1c(r28) -/* 80958AA0 90 1C 0E 0C */ stw r0, 0xe0c(r28) -/* 80958AA4 38 00 00 19 */ li r0, 0x19 -/* 80958AA8 90 1C 0E 20 */ stw r0, 0xe20(r28) -lbl_80958AAC: -/* 80958AAC 80 1C 06 AC */ lwz r0, 0x6ac(r28) -/* 80958AB0 90 1C 0A 44 */ stw r0, 0xa44(r28) -/* 80958AB4 80 1C 06 B0 */ lwz r0, 0x6b0(r28) -/* 80958AB8 90 1C 0A 48 */ stw r0, 0xa48(r28) -/* 80958ABC 80 1C 06 B4 */ lwz r0, 0x6b4(r28) -/* 80958AC0 90 1C 0A 4C */ stw r0, 0xa4c(r28) -/* 80958AC4 88 1C 06 B8 */ lbz r0, 0x6b8(r28) -/* 80958AC8 98 1C 0A 50 */ stb r0, 0xa50(r28) -/* 80958ACC A0 1C 06 C0 */ lhz r0, 0x6c0(r28) -/* 80958AD0 B0 1C 0A 58 */ sth r0, 0xa58(r28) -/* 80958AD4 A0 1C 06 C2 */ lhz r0, 0x6c2(r28) -/* 80958AD8 B0 1C 0A 5A */ sth r0, 0xa5a(r28) -/* 80958ADC 80 1C 06 C4 */ lwz r0, 0x6c4(r28) -/* 80958AE0 90 1C 0A 5C */ stw r0, 0xa5c(r28) -/* 80958AE4 80 1C 06 C8 */ lwz r0, 0x6c8(r28) -/* 80958AE8 90 1C 0A 60 */ stw r0, 0xa60(r28) -/* 80958AEC C0 1C 06 D0 */ lfs f0, 0x6d0(r28) -/* 80958AF0 D0 1C 0A 68 */ stfs f0, 0xa68(r28) -/* 80958AF4 C0 1C 06 D4 */ lfs f0, 0x6d4(r28) -/* 80958AF8 D0 1C 0A 6C */ stfs f0, 0xa6c(r28) -/* 80958AFC C0 1C 06 D8 */ lfs f0, 0x6d8(r28) -/* 80958B00 D0 1C 0A 70 */ stfs f0, 0xa70(r28) -/* 80958B04 80 1C 06 DC */ lwz r0, 0x6dc(r28) -/* 80958B08 90 1C 0A 74 */ stw r0, 0xa74(r28) -/* 80958B0C C0 1C 06 E0 */ lfs f0, 0x6e0(r28) -/* 80958B10 D0 1C 0A 78 */ stfs f0, 0xa78(r28) -/* 80958B14 80 1C 06 E4 */ lwz r0, 0x6e4(r28) -/* 80958B18 90 1C 0A 7C */ stw r0, 0xa7c(r28) -/* 80958B1C C0 1C 06 68 */ lfs f0, 0x668(r28) -/* 80958B20 D0 1C 09 80 */ stfs f0, 0x980(r28) -/* 80958B24 7F 83 E3 78 */ mr r3, r28 -/* 80958B28 4B 7F A2 5D */ bl setEnvTevColor__8daNpcF_cFv -/* 80958B2C 7F 83 E3 78 */ mr r3, r28 -/* 80958B30 4B 7F A2 B1 */ bl setRoomNo__8daNpcF_cFv -/* 80958B34 80 7C 05 68 */ lwz r3, 0x568(r28) -/* 80958B38 4B 6B 86 B5 */ bl modelCalc__16mDoExt_McaMorfSOFv -/* 80958B3C 7F 83 E3 78 */ mr r3, r28 -/* 80958B40 48 00 0D D1 */ bl reset__10daNpcAsh_cFv -/* 80958B44 7F 83 E3 78 */ mr r3, r28 -/* 80958B48 48 00 05 B1 */ bl Execute__10daNpcAsh_cFv -lbl_80958B4C: -/* 80958B4C 7F A3 EB 78 */ mr r3, r29 -lbl_80958B50: -/* 80958B50 39 61 00 40 */ addi r11, r1, 0x40 -/* 80958B54 4B A0 96 C1 */ bl _restgpr_24 -/* 80958B58 80 01 00 44 */ lwz r0, 0x44(r1) -/* 80958B5C 7C 08 03 A6 */ mtlr r0 -/* 80958B60 38 21 00 40 */ addi r1, r1, 0x40 -/* 80958B64 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Delete__10daNpcAsh_cFv.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Delete__10daNpcAsh_cFv.s deleted file mode 100644 index aed9db96956..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Delete__10daNpcAsh_cFv.s +++ /dev/null @@ -1,14 +0,0 @@ -lbl_809590C4: -/* 809590C4 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 809590C8 7C 08 02 A6 */ mflr r0 -/* 809590CC 90 01 00 14 */ stw r0, 0x14(r1) -/* 809590D0 38 80 FF FF */ li r4, -1 -/* 809590D4 81 83 0B 44 */ lwz r12, 0xb44(r3) -/* 809590D8 81 8C 00 08 */ lwz r12, 8(r12) -/* 809590DC 7D 89 03 A6 */ mtctr r12 -/* 809590E0 4E 80 04 21 */ bctrl -/* 809590E4 38 60 00 01 */ li r3, 1 -/* 809590E8 80 01 00 14 */ lwz r0, 0x14(r1) -/* 809590EC 7C 08 03 A6 */ mtlr r0 -/* 809590F0 38 21 00 10 */ addi r1, r1, 0x10 -/* 809590F4 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Draw__10daNpcAsh_cFv.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Draw__10daNpcAsh_cFv.s deleted file mode 100644 index 59ec5bed8a3..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Draw__10daNpcAsh_cFv.s +++ /dev/null @@ -1,73 +0,0 @@ -lbl_8095911C: -/* 8095911C 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80959120 7C 08 02 A6 */ mflr r0 -/* 80959124 90 01 00 14 */ stw r0, 0x14(r1) -/* 80959128 93 E1 00 0C */ stw r31, 0xc(r1) -/* 8095912C 7C 7F 1B 78 */ mr r31, r3 -/* 80959130 80 83 05 68 */ lwz r4, 0x568(r3) -/* 80959134 80 84 00 04 */ lwz r4, 4(r4) -/* 80959138 80 84 00 04 */ lwz r4, 4(r4) -/* 8095913C 80 84 00 60 */ lwz r4, 0x60(r4) -/* 80959140 80 84 00 08 */ lwz r4, 8(r4) -/* 80959144 80 03 0B E0 */ lwz r0, 0xbe0(r3) -/* 80959148 90 04 00 3C */ stw r0, 0x3c(r4) -/* 8095914C 38 80 00 00 */ li r4, 0 -/* 80959150 38 A0 00 00 */ li r5, 0 -/* 80959154 3C C0 80 96 */ lis r6, m__16daNpcAsh_Param_c@ha /* 0x8095D640@ha */ -/* 80959158 38 C6 D6 40 */ addi r6, r6, m__16daNpcAsh_Param_c@l /* 0x8095D640@l */ -/* 8095915C C0 26 00 0C */ lfs f1, 0xc(r6) -/* 80959160 38 C0 00 00 */ li r6, 0 -/* 80959164 38 E0 00 00 */ li r7, 0 -/* 80959168 4B 7F 91 45 */ bl draw__8daNpcF_cFiifP11_GXColorS10i -/* 8095916C 88 1F 0F 60 */ lbz r0, 0xf60(r31) -/* 80959170 28 00 00 01 */ cmplwi r0, 1 -/* 80959174 40 82 00 AC */ bne lbl_80959220 -/* 80959178 3C 60 80 43 */ lis r3, g_env_light@ha /* 0x8042CA54@ha */ -/* 8095917C 38 63 CA 54 */ addi r3, r3, g_env_light@l /* 0x8042CA54@l */ -/* 80959180 80 9F 0B D8 */ lwz r4, 0xbd8(r31) -/* 80959184 80 84 00 04 */ lwz r4, 4(r4) -/* 80959188 38 BF 01 0C */ addi r5, r31, 0x10c -/* 8095918C 4B 84 BC 15 */ bl setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c -/* 80959190 80 7F 05 68 */ lwz r3, 0x568(r31) -/* 80959194 80 63 00 04 */ lwz r3, 4(r3) -/* 80959198 80 63 00 84 */ lwz r3, 0x84(r3) -/* 8095919C 80 63 00 0C */ lwz r3, 0xc(r3) -/* 809591A0 38 63 03 00 */ addi r3, r3, 0x300 -/* 809591A4 3C 80 80 3E */ lis r4, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 809591A8 38 84 D4 70 */ addi r4, r4, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 809591AC 4B 9E D3 05 */ bl PSMTXCopy -/* 809591B0 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 809591B4 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 809591B8 80 9F 0B D8 */ lwz r4, 0xbd8(r31) -/* 809591BC 38 84 00 24 */ addi r4, r4, 0x24 -/* 809591C0 4B 9E D2 F1 */ bl PSMTXCopy -/* 809591C4 80 7F 0B D8 */ lwz r3, 0xbd8(r31) -/* 809591C8 4B 6B 4A FD */ bl mDoExt_modelUpdateDL__FP8J3DModel -/* 809591CC 3C 60 80 43 */ lis r3, g_env_light@ha /* 0x8042CA54@ha */ -/* 809591D0 38 63 CA 54 */ addi r3, r3, g_env_light@l /* 0x8042CA54@l */ -/* 809591D4 80 9F 0B DC */ lwz r4, 0xbdc(r31) -/* 809591D8 80 84 00 04 */ lwz r4, 4(r4) -/* 809591DC 38 BF 01 0C */ addi r5, r31, 0x10c -/* 809591E0 4B 84 BB C1 */ bl setLightTevColorType_MAJI__18dScnKy_env_light_cFP12J3DModelDataP12dKy_tevstr_c -/* 809591E4 80 7F 05 68 */ lwz r3, 0x568(r31) -/* 809591E8 80 63 00 04 */ lwz r3, 4(r3) -/* 809591EC 80 63 00 84 */ lwz r3, 0x84(r3) -/* 809591F0 80 63 00 0C */ lwz r3, 0xc(r3) -/* 809591F4 38 63 00 60 */ addi r3, r3, 0x60 -/* 809591F8 3C 80 80 3E */ lis r4, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 809591FC 38 84 D4 70 */ addi r4, r4, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 80959200 4B 9E D2 B1 */ bl PSMTXCopy -/* 80959204 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 80959208 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 8095920C 80 9F 0B DC */ lwz r4, 0xbdc(r31) -/* 80959210 38 84 00 24 */ addi r4, r4, 0x24 -/* 80959214 4B 9E D2 9D */ bl PSMTXCopy -/* 80959218 80 7F 0B DC */ lwz r3, 0xbdc(r31) -/* 8095921C 4B 6B 4A A9 */ bl mDoExt_modelUpdateDL__FP8J3DModel -lbl_80959220: -/* 80959220 38 60 00 01 */ li r3, 1 -/* 80959224 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80959228 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8095922C 7C 08 03 A6 */ mtlr r0 -/* 80959230 38 21 00 10 */ addi r1, r1, 0x10 -/* 80959234 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/EvCut_Introduction__10daNpcAsh_cFi.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/EvCut_Introduction__10daNpcAsh_cFi.s deleted file mode 100644 index 272cfebe2da..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/EvCut_Introduction__10daNpcAsh_cFi.s +++ /dev/null @@ -1,75 +0,0 @@ -lbl_8095B48C: -/* 8095B48C 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8095B490 7C 08 02 A6 */ mflr r0 -/* 8095B494 90 01 00 24 */ stw r0, 0x24(r1) -/* 8095B498 39 61 00 20 */ addi r11, r1, 0x20 -/* 8095B49C 4B A0 6D 3D */ bl _savegpr_28 -/* 8095B4A0 7C 7C 1B 78 */ mr r28, r3 -/* 8095B4A4 7C 9D 23 78 */ mr r29, r4 -/* 8095B4A8 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 8095B4AC 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 8095B4B0 3B C3 4F F8 */ addi r30, r3, 0x4ff8 -/* 8095B4B4 7F C3 F3 78 */ mr r3, r30 -/* 8095B4B8 3C A0 80 96 */ lis r5, d_a_npc_ash__stringBase0@ha /* 0x8095D910@ha */ -/* 8095B4BC 38 A5 D9 10 */ addi r5, r5, d_a_npc_ash__stringBase0@l /* 0x8095D910@l */ -/* 8095B4C0 38 A5 00 7B */ addi r5, r5, 0x7b -/* 8095B4C4 38 C0 00 03 */ li r6, 3 -/* 8095B4C8 4B 6E CC 25 */ bl getMySubstanceP__16dEvent_manager_cFiPCci -/* 8095B4CC 7C 7F 1B 79 */ or. r31, r3, r3 -/* 8095B4D0 40 82 00 0C */ bne lbl_8095B4DC -/* 8095B4D4 38 60 00 00 */ li r3, 0 -/* 8095B4D8 48 00 00 9C */ b lbl_8095B574 -lbl_8095B4DC: -/* 8095B4DC 7F C3 F3 78 */ mr r3, r30 -/* 8095B4E0 7F A4 EB 78 */ mr r4, r29 -/* 8095B4E4 4B 6E C8 69 */ bl getIsAddvance__16dEvent_manager_cFi -/* 8095B4E8 2C 03 00 00 */ cmpwi r3, 0 -/* 8095B4EC 41 82 00 84 */ beq lbl_8095B570 -/* 8095B4F0 80 1F 00 00 */ lwz r0, 0(r31) -/* 8095B4F4 2C 00 00 01 */ cmpwi r0, 1 -/* 8095B4F8 41 82 00 48 */ beq lbl_8095B540 -/* 8095B4FC 40 80 00 10 */ bge lbl_8095B50C -/* 8095B500 2C 00 00 00 */ cmpwi r0, 0 -/* 8095B504 40 80 00 10 */ bge lbl_8095B514 -/* 8095B508 48 00 00 68 */ b lbl_8095B570 -lbl_8095B50C: -/* 8095B50C 2C 00 00 03 */ cmpwi r0, 3 -/* 8095B510 40 80 00 60 */ bge lbl_8095B570 -lbl_8095B514: -/* 8095B514 A8 1C 0F 5A */ lha r0, 0xf5a(r28) -/* 8095B518 2C 00 00 00 */ cmpwi r0, 0 -/* 8095B51C 40 82 00 10 */ bne lbl_8095B52C -/* 8095B520 80 1C 0C B0 */ lwz r0, 0xcb0(r28) -/* 8095B524 28 00 00 00 */ cmplwi r0, 0 -/* 8095B528 41 82 00 10 */ beq lbl_8095B538 -lbl_8095B52C: -/* 8095B52C 38 00 00 00 */ li r0, 0 -/* 8095B530 B0 1C 0F 5A */ sth r0, 0xf5a(r28) -/* 8095B534 90 1C 0C B0 */ stw r0, 0xcb0(r28) -lbl_8095B538: -/* 8095B538 38 60 00 01 */ li r3, 1 -/* 8095B53C 48 00 00 38 */ b lbl_8095B574 -lbl_8095B540: -/* 8095B540 A8 1C 0F 5A */ lha r0, 0xf5a(r28) -/* 8095B544 2C 00 00 02 */ cmpwi r0, 2 -/* 8095B548 40 82 00 10 */ bne lbl_8095B558 -/* 8095B54C 80 1C 0C B0 */ lwz r0, 0xcb0(r28) -/* 8095B550 28 00 00 00 */ cmplwi r0, 0 -/* 8095B554 41 82 00 14 */ beq lbl_8095B568 -lbl_8095B558: -/* 8095B558 38 00 00 02 */ li r0, 2 -/* 8095B55C B0 1C 0F 5A */ sth r0, 0xf5a(r28) -/* 8095B560 38 00 00 00 */ li r0, 0 -/* 8095B564 90 1C 0C B0 */ stw r0, 0xcb0(r28) -lbl_8095B568: -/* 8095B568 38 60 00 01 */ li r3, 1 -/* 8095B56C 48 00 00 08 */ b lbl_8095B574 -lbl_8095B570: -/* 8095B570 38 60 00 00 */ li r3, 0 -lbl_8095B574: -/* 8095B574 39 61 00 20 */ addi r11, r1, 0x20 -/* 8095B578 4B A0 6C AD */ bl _restgpr_28 -/* 8095B57C 80 01 00 24 */ lwz r0, 0x24(r1) -/* 8095B580 7C 08 03 A6 */ mtlr r0 -/* 8095B584 38 21 00 20 */ addi r1, r1, 0x20 -/* 8095B588 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Execute__10daNpcAsh_cFv.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Execute__10daNpcAsh_cFv.s deleted file mode 100644 index 3cfa8d61159..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Execute__10daNpcAsh_cFv.s +++ /dev/null @@ -1,10 +0,0 @@ -lbl_809590F8: -/* 809590F8 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 809590FC 7C 08 02 A6 */ mflr r0 -/* 80959100 90 01 00 14 */ stw r0, 0x14(r1) -/* 80959104 4B 7F 8F 11 */ bl execute__8daNpcF_cFv -/* 80959108 38 60 00 01 */ li r3, 1 -/* 8095910C 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80959110 7C 08 03 A6 */ mtlr r0 -/* 80959114 38 21 00 10 */ addi r1, r1, 0x10 -/* 80959118 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/createHeapCallBack__10daNpcAsh_cFP10fopAc_ac_c.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/createHeapCallBack__10daNpcAsh_cFP10fopAc_ac_c.s deleted file mode 100644 index e768e8cfde9..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/createHeapCallBack__10daNpcAsh_cFP10fopAc_ac_c.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_80959458: -/* 80959458 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8095945C 7C 08 02 A6 */ mflr r0 -/* 80959460 90 01 00 14 */ stw r0, 0x14(r1) -/* 80959464 4B FF F7 05 */ bl CreateHeap__10daNpcAsh_cFv -/* 80959468 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8095946C 7C 08 03 A6 */ mtlr r0 -/* 80959470 38 21 00 10 */ addi r1, r1, 0x10 -/* 80959474 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/ctrlJointCallBack__10daNpcAsh_cFP8J3DJointi.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/ctrlJointCallBack__10daNpcAsh_cFP8J3DJointi.s deleted file mode 100644 index 3153d6a123e..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/ctrlJointCallBack__10daNpcAsh_cFP8J3DJointi.s +++ /dev/null @@ -1,21 +0,0 @@ -lbl_80959478: -/* 80959478 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8095947C 7C 08 02 A6 */ mflr r0 -/* 80959480 90 01 00 14 */ stw r0, 0x14(r1) -/* 80959484 7C 60 1B 78 */ mr r0, r3 -/* 80959488 2C 04 00 00 */ cmpwi r4, 0 -/* 8095948C 40 82 00 24 */ bne lbl_809594B0 -/* 80959490 3C 60 80 43 */ lis r3, j3dSys@ha /* 0x80434AC8@ha */ -/* 80959494 38 63 4A C8 */ addi r3, r3, j3dSys@l /* 0x80434AC8@l */ -/* 80959498 80 A3 00 38 */ lwz r5, 0x38(r3) -/* 8095949C 80 65 00 14 */ lwz r3, 0x14(r5) -/* 809594A0 28 03 00 00 */ cmplwi r3, 0 -/* 809594A4 41 82 00 0C */ beq lbl_809594B0 -/* 809594A8 7C 04 03 78 */ mr r4, r0 -/* 809594AC 4B FF FD 8D */ bl ctrlJoint__10daNpcAsh_cFP8J3DJointP8J3DModel -lbl_809594B0: -/* 809594B0 38 60 00 01 */ li r3, 1 -/* 809594B4 80 01 00 14 */ lwz r0, 0x14(r1) -/* 809594B8 7C 08 03 A6 */ mtlr r0 -/* 809594BC 38 21 00 10 */ addi r1, r1, 0x10 -/* 809594C0 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Create__FPv.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Create__FPv.s deleted file mode 100644 index ca5abd33af2..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Create__FPv.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_8095BC38: -/* 8095BC38 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8095BC3C 7C 08 02 A6 */ mflr r0 -/* 8095BC40 90 01 00 14 */ stw r0, 0x14(r1) -/* 8095BC44 4B FF CB 5D */ bl Create__10daNpcAsh_cFv -/* 8095BC48 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8095BC4C 7C 08 03 A6 */ mtlr r0 -/* 8095BC50 38 21 00 10 */ addi r1, r1, 0x10 -/* 8095BC54 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Delete__FPv.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Delete__FPv.s deleted file mode 100644 index 09bfef9fc7b..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Delete__FPv.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_8095BC58: -/* 8095BC58 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8095BC5C 7C 08 02 A6 */ mflr r0 -/* 8095BC60 90 01 00 14 */ stw r0, 0x14(r1) -/* 8095BC64 4B FF D4 61 */ bl Delete__10daNpcAsh_cFv -/* 8095BC68 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8095BC6C 7C 08 03 A6 */ mtlr r0 -/* 8095BC70 38 21 00 10 */ addi r1, r1, 0x10 -/* 8095BC74 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Draw__FPv.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Draw__FPv.s deleted file mode 100644 index 88d6cd61a2e..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Draw__FPv.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_8095BC98: -/* 8095BC98 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8095BC9C 7C 08 02 A6 */ mflr r0 -/* 8095BCA0 90 01 00 14 */ stw r0, 0x14(r1) -/* 8095BCA4 4B FF D4 79 */ bl Draw__10daNpcAsh_cFv -/* 8095BCA8 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8095BCAC 7C 08 03 A6 */ mtlr r0 -/* 8095BCB0 38 21 00 10 */ addi r1, r1, 0x10 -/* 8095BCB4 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Execute__FPv.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Execute__FPv.s deleted file mode 100644 index 4b10b747931..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Execute__FPv.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_8095BC78: -/* 8095BC78 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8095BC7C 7C 08 02 A6 */ mflr r0 -/* 8095BC80 90 01 00 14 */ stw r0, 0x14(r1) -/* 8095BC84 4B FF D4 75 */ bl Execute__10daNpcAsh_cFv -/* 8095BC88 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8095BC8C 7C 08 03 A6 */ mtlr r0 -/* 8095BC90 38 21 00 10 */ addi r1, r1, 0x10 -/* 8095BC94 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/isSneaking__10daNpcAsh_cFv.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/isSneaking__10daNpcAsh_cFv.s deleted file mode 100644 index ecd9d7c421f..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/isSneaking__10daNpcAsh_cFv.s +++ /dev/null @@ -1,31 +0,0 @@ -lbl_80959BD0: -/* 80959BD0 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80959BD4 7C 08 02 A6 */ mflr r0 -/* 80959BD8 90 01 00 14 */ stw r0, 0x14(r1) -/* 80959BDC 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80959BE0 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80959BE4 38 63 4E 00 */ addi r3, r3, 0x4e00 -/* 80959BE8 3C 80 80 96 */ lis r4, d_a_npc_ash__stringBase0@ha /* 0x8095D910@ha */ -/* 80959BEC 38 84 D9 10 */ addi r4, r4, d_a_npc_ash__stringBase0@l /* 0x8095D910@l */ -/* 80959BF0 38 84 00 6C */ addi r4, r4, 0x6c -/* 80959BF4 4B A0 ED A1 */ bl strcmp -/* 80959BF8 2C 03 00 00 */ cmpwi r3, 0 -/* 80959BFC 40 82 00 30 */ bne lbl_80959C2C -/* 80959C00 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 80959C04 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 80959C08 88 03 4E 0A */ lbz r0, 0x4e0a(r3) -/* 80959C0C 2C 00 00 05 */ cmpwi r0, 5 -/* 80959C10 40 82 00 1C */ bne lbl_80959C2C -/* 80959C14 38 60 00 00 */ li r3, 0 -/* 80959C18 4B 6D 2D 65 */ bl getLayerNo__14dComIfG_play_cFi -/* 80959C1C 2C 03 00 02 */ cmpwi r3, 2 -/* 80959C20 40 82 00 0C */ bne lbl_80959C2C -/* 80959C24 38 60 00 01 */ li r3, 1 -/* 80959C28 48 00 00 08 */ b lbl_80959C30 -lbl_80959C2C: -/* 80959C2C 38 60 00 00 */ li r3, 0 -lbl_80959C30: -/* 80959C30 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80959C34 7C 08 03 A6 */ mtlr r0 -/* 80959C38 38 21 00 10 */ addi r1, r1, 0x10 -/* 80959C3C 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setAction__10daNpcAsh_cFM10daNpcAsh_cFPCvPvPv_b.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setAction__10daNpcAsh_cFM10daNpcAsh_cFPCvPvPv_b.s deleted file mode 100644 index d0e55b78d2f..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setAction__10daNpcAsh_cFM10daNpcAsh_cFPCvPvPv_b.s +++ /dev/null @@ -1,45 +0,0 @@ -lbl_80959B28: -/* 80959B28 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 80959B2C 7C 08 02 A6 */ mflr r0 -/* 80959B30 90 01 00 14 */ stw r0, 0x14(r1) -/* 80959B34 93 E1 00 0C */ stw r31, 0xc(r1) -/* 80959B38 93 C1 00 08 */ stw r30, 8(r1) -/* 80959B3C 7C 7E 1B 78 */ mr r30, r3 -/* 80959B40 7C 9F 23 78 */ mr r31, r4 -/* 80959B44 38 00 00 03 */ li r0, 3 -/* 80959B48 B0 03 0F 5C */ sth r0, 0xf5c(r3) -/* 80959B4C 38 7E 0F 30 */ addi r3, r30, 0xf30 -/* 80959B50 4B A0 84 C9 */ bl __ptmf_test -/* 80959B54 2C 03 00 00 */ cmpwi r3, 0 -/* 80959B58 41 82 00 18 */ beq lbl_80959B70 -/* 80959B5C 7F C3 F3 78 */ mr r3, r30 -/* 80959B60 38 80 00 00 */ li r4, 0 -/* 80959B64 39 9E 0F 30 */ addi r12, r30, 0xf30 -/* 80959B68 4B A0 85 1D */ bl __ptmf_scall -/* 80959B6C 60 00 00 00 */ nop -lbl_80959B70: -/* 80959B70 38 00 00 00 */ li r0, 0 -/* 80959B74 B0 1E 0F 5C */ sth r0, 0xf5c(r30) -/* 80959B78 80 7F 00 00 */ lwz r3, 0(r31) -/* 80959B7C 80 1F 00 04 */ lwz r0, 4(r31) -/* 80959B80 90 7E 0F 30 */ stw r3, 0xf30(r30) -/* 80959B84 90 1E 0F 34 */ stw r0, 0xf34(r30) -/* 80959B88 80 1F 00 08 */ lwz r0, 8(r31) -/* 80959B8C 90 1E 0F 38 */ stw r0, 0xf38(r30) -/* 80959B90 38 7E 0F 30 */ addi r3, r30, 0xf30 -/* 80959B94 4B A0 84 85 */ bl __ptmf_test -/* 80959B98 2C 03 00 00 */ cmpwi r3, 0 -/* 80959B9C 41 82 00 18 */ beq lbl_80959BB4 -/* 80959BA0 7F C3 F3 78 */ mr r3, r30 -/* 80959BA4 38 80 00 00 */ li r4, 0 -/* 80959BA8 39 9E 0F 30 */ addi r12, r30, 0xf30 -/* 80959BAC 4B A0 84 D9 */ bl __ptmf_scall -/* 80959BB0 60 00 00 00 */ nop -lbl_80959BB4: -/* 80959BB4 38 60 00 01 */ li r3, 1 -/* 80959BB8 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 80959BBC 83 C1 00 08 */ lwz r30, 8(r1) -/* 80959BC0 80 01 00 14 */ lwz r0, 0x14(r1) -/* 80959BC4 7C 08 03 A6 */ mtlr r0 -/* 80959BC8 38 21 00 10 */ addi r1, r1, 0x10 -/* 80959BCC 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setExpression__10daNpcAsh_cFif.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setExpression__10daNpcAsh_cFif.s deleted file mode 100644 index 19617a1f83f..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setExpression__10daNpcAsh_cFif.s +++ /dev/null @@ -1,12 +0,0 @@ -lbl_8095A6C0: -/* 8095A6C0 2C 04 00 00 */ cmpwi r4, 0 -/* 8095A6C4 4D 80 00 20 */ bltlr -/* 8095A6C8 2C 04 00 08 */ cmpwi r4, 8 -/* 8095A6CC 4C 80 00 20 */ bgelr -/* 8095A6D0 B0 83 09 DE */ sth r4, 0x9de(r3) -/* 8095A6D4 D0 23 09 74 */ stfs f1, 0x974(r3) -/* 8095A6D8 38 00 FF FF */ li r0, -1 -/* 8095A6DC B0 03 09 D8 */ sth r0, 0x9d8(r3) -/* 8095A6E0 38 00 00 00 */ li r0, 0 -/* 8095A6E4 B0 03 09 D6 */ sth r0, 0x9d6(r3) -/* 8095A6E8 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setMotion__10daNpcAsh_cFifi.s b/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setMotion__10daNpcAsh_cFifi.s deleted file mode 100644 index 252b6105ea0..00000000000 --- a/asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setMotion__10daNpcAsh_cFifi.s +++ /dev/null @@ -1,19 +0,0 @@ -lbl_8095A67C: -/* 8095A67C 7C 86 07 34 */ extsh r6, r4 -/* 8095A680 2C 05 00 00 */ cmpwi r5, 0 -/* 8095A684 40 82 00 10 */ bne lbl_8095A694 -/* 8095A688 A8 03 09 E0 */ lha r0, 0x9e0(r3) -/* 8095A68C 7C 00 30 00 */ cmpw r0, r6 -/* 8095A690 4D 82 00 20 */ beqlr -lbl_8095A694: -/* 8095A694 2C 04 00 00 */ cmpwi r4, 0 -/* 8095A698 4D 80 00 20 */ bltlr -/* 8095A69C 2C 04 00 0A */ cmpwi r4, 0xa -/* 8095A6A0 4C 80 00 20 */ bgelr -/* 8095A6A4 B0 C3 09 E0 */ sth r6, 0x9e0(r3) -/* 8095A6A8 D0 23 09 7C */ stfs f1, 0x97c(r3) -/* 8095A6AC 38 00 FF FF */ li r0, -1 -/* 8095A6B0 B0 03 09 DC */ sth r0, 0x9dc(r3) -/* 8095A6B4 38 00 00 00 */ li r0, 0 -/* 8095A6B8 B0 03 09 DA */ sth r0, 0x9da(r3) -/* 8095A6BC 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/Execute__15daTag_EvtArea_cFv.s b/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/Execute__15daTag_EvtArea_cFv.s deleted file mode 100644 index c75e965dac6..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/Execute__15daTag_EvtArea_cFv.s +++ /dev/null @@ -1,95 +0,0 @@ -lbl_8048C730: -/* 8048C730 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 8048C734 7C 08 02 A6 */ mflr r0 -/* 8048C738 90 01 00 24 */ stw r0, 0x24(r1) -/* 8048C73C 93 E1 00 1C */ stw r31, 0x1c(r1) -/* 8048C740 93 C1 00 18 */ stw r30, 0x18(r1) -/* 8048C744 7C 7F 1B 78 */ mr r31, r3 -/* 8048C748 88 03 04 BA */ lbz r0, 0x4ba(r3) -/* 8048C74C 7C 05 07 74 */ extsb r5, r0 -/* 8048C750 3C 80 80 45 */ lis r4, mStayNo__20dStage_roomControl_c+0x0@ha /* 0x80450D64@ha */ -/* 8048C754 88 04 0D 64 */ lbz r0, mStayNo__20dStage_roomControl_c+0x0@l(r4) /* 0x80450D64@l */ -/* 8048C758 7C 00 07 74 */ extsb r0, r0 -/* 8048C75C 7C 05 00 00 */ cmpw r5, r0 -/* 8048C760 40 82 01 18 */ bne lbl_8048C878 -/* 8048C764 48 00 01 39 */ bl isDelete__15daTag_EvtArea_cFv -/* 8048C768 2C 03 00 00 */ cmpwi r3, 0 -/* 8048C76C 41 82 00 14 */ beq lbl_8048C780 -/* 8048C770 7F E3 FB 78 */ mr r3, r31 -/* 8048C774 4B B8 D5 09 */ bl fopAcM_delete__FP10fopAc_ac_c -/* 8048C778 38 60 00 01 */ li r3, 1 -/* 8048C77C 48 00 01 00 */ b lbl_8048C87C -lbl_8048C780: -/* 8048C780 C0 1F 04 D0 */ lfs f0, 0x4d0(r31) -/* 8048C784 D0 1F 05 50 */ stfs f0, 0x550(r31) -/* 8048C788 C0 1F 04 D4 */ lfs f0, 0x4d4(r31) -/* 8048C78C D0 1F 05 54 */ stfs f0, 0x554(r31) -/* 8048C790 C0 1F 04 D8 */ lfs f0, 0x4d8(r31) -/* 8048C794 D0 1F 05 58 */ stfs f0, 0x558(r31) -/* 8048C798 A8 1F 04 E8 */ lha r0, 0x4e8(r31) -/* 8048C79C 54 03 06 3E */ clrlwi r3, r0, 0x18 -/* 8048C7A0 38 03 FF 01 */ addi r0, r3, -255 -/* 8048C7A4 30 00 FF FF */ addic r0, r0, -1 -/* 8048C7A8 7C 00 01 10 */ subfe r0, r0, r0 -/* 8048C7AC 7C 60 00 78 */ andc r0, r3, r0 -/* 8048C7B0 2C 00 00 08 */ cmpwi r0, 8 -/* 8048C7B4 40 82 00 18 */ bne lbl_8048C7CC -/* 8048C7B8 C0 3F 05 54 */ lfs f1, 0x554(r31) -/* 8048C7BC 3C 60 80 49 */ lis r3, lit_3853@ha /* 0x8048CDD0@ha */ -/* 8048C7C0 C0 03 CD D0 */ lfs f0, lit_3853@l(r3) /* 0x8048CDD0@l */ -/* 8048C7C4 EC 01 00 2A */ fadds f0, f1, f0 -/* 8048C7C8 D0 1F 05 54 */ stfs f0, 0x554(r31) -lbl_8048C7CC: -/* 8048C7CC 38 00 00 00 */ li r0, 0 -/* 8048C7D0 98 1F 04 96 */ stb r0, 0x496(r31) -/* 8048C7D4 C0 1F 05 50 */ lfs f0, 0x550(r31) -/* 8048C7D8 D0 1F 05 38 */ stfs f0, 0x538(r31) -/* 8048C7DC C0 1F 05 54 */ lfs f0, 0x554(r31) -/* 8048C7E0 D0 1F 05 3C */ stfs f0, 0x53c(r31) -/* 8048C7E4 C0 1F 05 58 */ lfs f0, 0x558(r31) -/* 8048C7E8 D0 1F 05 40 */ stfs f0, 0x540(r31) -/* 8048C7EC A8 1F 04 E8 */ lha r0, 0x4e8(r31) -/* 8048C7F0 54 03 06 3E */ clrlwi r3, r0, 0x18 -/* 8048C7F4 38 03 FF 01 */ addi r0, r3, -255 -/* 8048C7F8 30 00 FF FF */ addic r0, r0, -1 -/* 8048C7FC 7C 00 01 10 */ subfe r0, r0, r0 -/* 8048C800 7C 60 00 78 */ andc r0, r3, r0 -/* 8048C804 2C 00 00 0F */ cmpwi r0, 0xf -/* 8048C808 40 82 00 60 */ bne lbl_8048C868 -/* 8048C80C 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 8048C810 3B C3 61 C0 */ addi r30, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 8048C814 80 7E 5D AC */ lwz r3, 0x5dac(r30) -/* 8048C818 C0 03 04 D0 */ lfs f0, 0x4d0(r3) -/* 8048C81C D0 01 00 08 */ stfs f0, 8(r1) -/* 8048C820 C0 03 04 D4 */ lfs f0, 0x4d4(r3) -/* 8048C824 D0 01 00 0C */ stfs f0, 0xc(r1) -/* 8048C828 C0 03 04 D8 */ lfs f0, 0x4d8(r3) -/* 8048C82C D0 01 00 10 */ stfs f0, 0x10(r1) -/* 8048C830 7F E3 FB 78 */ mr r3, r31 -/* 8048C834 38 81 00 08 */ addi r4, r1, 8 -/* 8048C838 48 00 04 D1 */ bl chkPointInArea__15daTag_EvtArea_cF4cXyz -/* 8048C83C 2C 03 00 00 */ cmpwi r3, 0 -/* 8048C840 41 82 00 28 */ beq lbl_8048C868 -/* 8048C844 80 7E 5D AC */ lwz r3, 0x5dac(r30) -/* 8048C848 C0 03 05 38 */ lfs f0, 0x538(r3) -/* 8048C84C D0 1F 05 38 */ stfs f0, 0x538(r31) -/* 8048C850 C0 03 05 3C */ lfs f0, 0x53c(r3) -/* 8048C854 D0 1F 05 3C */ stfs f0, 0x53c(r31) -/* 8048C858 C0 03 05 40 */ lfs f0, 0x540(r3) -/* 8048C85C D0 1F 05 40 */ stfs f0, 0x540(r31) -/* 8048C860 38 00 00 04 */ li r0, 4 -/* 8048C864 98 1F 04 96 */ stb r0, 0x496(r31) -lbl_8048C868: -/* 8048C868 38 00 00 00 */ li r0, 0 -/* 8048C86C 90 1F 05 5C */ stw r0, 0x55c(r31) -/* 8048C870 38 60 00 01 */ li r3, 1 -/* 8048C874 48 00 00 08 */ b lbl_8048C87C -lbl_8048C878: -/* 8048C878 38 60 00 00 */ li r3, 0 -lbl_8048C87C: -/* 8048C87C 83 E1 00 1C */ lwz r31, 0x1c(r1) -/* 8048C880 83 C1 00 18 */ lwz r30, 0x18(r1) -/* 8048C884 80 01 00 24 */ lwz r0, 0x24(r1) -/* 8048C888 7C 08 03 A6 */ mtlr r0 -/* 8048C88C 38 21 00 20 */ addi r1, r1, 0x20 -/* 8048C890 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/__dt__15daTag_EvtArea_cFv.s b/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/__dt__15daTag_EvtArea_cFv.s deleted file mode 100644 index 7715cbb6a73..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/__dt__15daTag_EvtArea_cFv.s +++ /dev/null @@ -1,26 +0,0 @@ -lbl_8048CD68: -/* 8048CD68 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8048CD6C 7C 08 02 A6 */ mflr r0 -/* 8048CD70 90 01 00 14 */ stw r0, 0x14(r1) -/* 8048CD74 93 E1 00 0C */ stw r31, 0xc(r1) -/* 8048CD78 93 C1 00 08 */ stw r30, 8(r1) -/* 8048CD7C 7C 7E 1B 79 */ or. r30, r3, r3 -/* 8048CD80 7C 9F 23 78 */ mr r31, r4 -/* 8048CD84 41 82 00 28 */ beq lbl_8048CDAC -/* 8048CD88 3C 80 80 49 */ lis r4, __vt__15daTag_EvtArea_c@ha /* 0x8048CE98@ha */ -/* 8048CD8C 38 04 CE 98 */ addi r0, r4, __vt__15daTag_EvtArea_c@l /* 0x8048CE98@l */ -/* 8048CD90 90 1E 05 68 */ stw r0, 0x568(r30) -/* 8048CD94 38 80 00 00 */ li r4, 0 -/* 8048CD98 4B B8 BE F5 */ bl __dt__10fopAc_ac_cFv -/* 8048CD9C 7F E0 07 35 */ extsh. r0, r31 -/* 8048CDA0 40 81 00 0C */ ble lbl_8048CDAC -/* 8048CDA4 7F C3 F3 78 */ mr r3, r30 -/* 8048CDA8 4B E4 1F 95 */ bl __dl__FPv -lbl_8048CDAC: -/* 8048CDAC 7F C3 F3 78 */ mr r3, r30 -/* 8048CDB0 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 8048CDB4 83 C1 00 08 */ lwz r30, 8(r1) -/* 8048CDB8 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8048CDBC 7C 08 03 A6 */ mtlr r0 -/* 8048CDC0 38 21 00 10 */ addi r1, r1, 0x10 -/* 8048CDC4 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/chkPointInArea__15daTag_EvtArea_cF4cXyz.s b/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/chkPointInArea__15daTag_EvtArea_cF4cXyz.s deleted file mode 100644 index 991467e74e6..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/chkPointInArea__15daTag_EvtArea_cF4cXyz.s +++ /dev/null @@ -1,25 +0,0 @@ -lbl_8048CD08: -/* 8048CD08 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 8048CD0C 7C 08 02 A6 */ mflr r0 -/* 8048CD10 90 01 00 34 */ stw r0, 0x34(r1) -/* 8048CD14 3C A0 80 49 */ lis r5, lit_3922@ha /* 0x8048CDE0@ha */ -/* 8048CD18 C0 25 CD E0 */ lfs f1, lit_3922@l(r5) /* 0x8048CDE0@l */ -/* 8048CD1C D0 21 00 20 */ stfs f1, 0x20(r1) -/* 8048CD20 D0 21 00 24 */ stfs f1, 0x24(r1) -/* 8048CD24 D0 21 00 28 */ stfs f1, 0x28(r1) -/* 8048CD28 C0 04 00 00 */ lfs f0, 0(r4) -/* 8048CD2C D0 01 00 14 */ stfs f0, 0x14(r1) -/* 8048CD30 C0 04 00 04 */ lfs f0, 4(r4) -/* 8048CD34 D0 01 00 18 */ stfs f0, 0x18(r1) -/* 8048CD38 C0 04 00 08 */ lfs f0, 8(r4) -/* 8048CD3C D0 01 00 1C */ stfs f0, 0x1c(r1) -/* 8048CD40 D0 21 00 08 */ stfs f1, 8(r1) -/* 8048CD44 D0 21 00 0C */ stfs f1, 0xc(r1) -/* 8048CD48 D0 21 00 10 */ stfs f1, 0x10(r1) -/* 8048CD4C 38 81 00 14 */ addi r4, r1, 0x14 -/* 8048CD50 38 A1 00 08 */ addi r5, r1, 8 -/* 8048CD54 4B FF FB F9 */ bl chkPointInArea__15daTag_EvtArea_cF4cXyz4cXyz -/* 8048CD58 80 01 00 34 */ lwz r0, 0x34(r1) -/* 8048CD5C 7C 08 03 A6 */ mtlr r0 -/* 8048CD60 38 21 00 30 */ addi r1, r1, 0x30 -/* 8048CD64 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/chkPointInArea__15daTag_EvtArea_cF4cXyz4cXyz.s b/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/chkPointInArea__15daTag_EvtArea_cF4cXyz4cXyz.s deleted file mode 100644 index 34ab268e1cd..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/chkPointInArea__15daTag_EvtArea_cF4cXyz4cXyz.s +++ /dev/null @@ -1,217 +0,0 @@ -lbl_8048C94C: -/* 8048C94C 94 21 FF 20 */ stwu r1, -0xe0(r1) -/* 8048C950 7C 08 02 A6 */ mflr r0 -/* 8048C954 90 01 00 E4 */ stw r0, 0xe4(r1) -/* 8048C958 39 61 00 E0 */ addi r11, r1, 0xe0 -/* 8048C95C 4B ED 58 81 */ bl _savegpr_29 -/* 8048C960 7C 7D 1B 78 */ mr r29, r3 -/* 8048C964 7C 9E 23 78 */ mr r30, r4 -/* 8048C968 7C BF 2B 78 */ mr r31, r5 -/* 8048C96C 88 03 05 6C */ lbz r0, 0x56c(r3) -/* 8048C970 28 00 00 00 */ cmplwi r0, 0 -/* 8048C974 40 82 02 F0 */ bne lbl_8048CC64 -/* 8048C978 80 1D 00 B0 */ lwz r0, 0xb0(r29) -/* 8048C97C 54 04 05 3E */ clrlwi r4, r0, 0x14 -/* 8048C980 28 04 0F FF */ cmplwi r4, 0xfff -/* 8048C984 38 60 FF FF */ li r3, -1 -/* 8048C988 41 82 00 08 */ beq lbl_8048C990 -/* 8048C98C 7C 83 23 78 */ mr r3, r4 -lbl_8048C990: -/* 8048C990 3C 03 00 01 */ addis r0, r3, 1 -/* 8048C994 28 00 FF FF */ cmplwi r0, 0xffff -/* 8048C998 41 82 00 20 */ beq lbl_8048C9B8 -/* 8048C99C 28 04 0F FF */ cmplwi r4, 0xfff -/* 8048C9A0 38 60 FF FF */ li r3, -1 -/* 8048C9A4 41 82 00 08 */ beq lbl_8048C9AC -/* 8048C9A8 7C 83 23 78 */ mr r3, r4 -lbl_8048C9AC: -/* 8048C9AC 4B CC 01 01 */ bl daNpcT_chkEvtBit__FUl -/* 8048C9B0 2C 03 00 00 */ cmpwi r3, 0 -/* 8048C9B4 40 82 00 64 */ bne lbl_8048CA18 -lbl_8048C9B8: -/* 8048C9B8 A8 1D 04 B4 */ lha r0, 0x4b4(r29) -/* 8048C9BC 54 04 06 3E */ clrlwi r4, r0, 0x18 -/* 8048C9C0 28 04 00 FF */ cmplwi r4, 0xff -/* 8048C9C4 41 82 00 20 */ beq lbl_8048C9E4 -/* 8048C9C8 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 8048C9CC 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 8048C9D0 88 1D 04 E2 */ lbz r0, 0x4e2(r29) -/* 8048C9D4 7C 05 07 74 */ extsb r5, r0 -/* 8048C9D8 4B BA 89 89 */ bl isSwitch__10dSv_info_cCFii -/* 8048C9DC 2C 03 00 00 */ cmpwi r3, 0 -/* 8048C9E0 40 82 00 38 */ bne lbl_8048CA18 -lbl_8048C9E4: -/* 8048C9E4 80 1D 00 B0 */ lwz r0, 0xb0(r29) -/* 8048C9E8 54 00 05 3E */ clrlwi r0, r0, 0x14 -/* 8048C9EC 28 00 0F FF */ cmplwi r0, 0xfff -/* 8048C9F0 38 60 FF FF */ li r3, -1 -/* 8048C9F4 41 82 00 08 */ beq lbl_8048C9FC -/* 8048C9F8 7C 03 03 78 */ mr r3, r0 -lbl_8048C9FC: -/* 8048C9FC 3C 03 00 01 */ addis r0, r3, 1 -/* 8048CA00 28 00 FF FF */ cmplwi r0, 0xffff -/* 8048CA04 40 82 02 60 */ bne lbl_8048CC64 -/* 8048CA08 A8 1D 04 B4 */ lha r0, 0x4b4(r29) -/* 8048CA0C 54 00 06 3E */ clrlwi r0, r0, 0x18 -/* 8048CA10 28 00 00 FF */ cmplwi r0, 0xff -/* 8048CA14 40 82 02 50 */ bne lbl_8048CC64 -lbl_8048CA18: -/* 8048CA18 38 61 00 5C */ addi r3, r1, 0x5c -/* 8048CA1C 38 9D 04 EC */ addi r4, r29, 0x4ec -/* 8048CA20 7F E5 FB 78 */ mr r5, r31 -/* 8048CA24 4B DD A0 C1 */ bl __pl__4cXyzCFRC3Vec -/* 8048CA28 C0 C1 00 5C */ lfs f6, 0x5c(r1) -/* 8048CA2C D0 C1 00 8C */ stfs f6, 0x8c(r1) -/* 8048CA30 C0 A1 00 60 */ lfs f5, 0x60(r1) -/* 8048CA34 D0 A1 00 90 */ stfs f5, 0x90(r1) -/* 8048CA38 C0 81 00 64 */ lfs f4, 0x64(r1) -/* 8048CA3C D0 81 00 94 */ stfs f4, 0x94(r1) -/* 8048CA40 A8 1D 04 E8 */ lha r0, 0x4e8(r29) -/* 8048CA44 54 05 06 3E */ clrlwi r5, r0, 0x18 -/* 8048CA48 38 85 FF 01 */ addi r4, r5, -255 -/* 8048CA4C 30 04 FF FF */ addic r0, r4, -1 -/* 8048CA50 7C 00 01 10 */ subfe r0, r0, r0 -/* 8048CA54 7C A0 00 78 */ andc r0, r5, r0 -/* 8048CA58 2C 00 00 0F */ cmpwi r0, 0xf -/* 8048CA5C 41 82 00 18 */ beq lbl_8048CA74 -/* 8048CA60 30 04 FF FF */ addic r0, r4, -1 -/* 8048CA64 7C 00 01 10 */ subfe r0, r0, r0 -/* 8048CA68 7C A0 00 78 */ andc r0, r5, r0 -/* 8048CA6C 2C 00 00 10 */ cmpwi r0, 0x10 -/* 8048CA70 40 82 01 20 */ bne lbl_8048CB90 -lbl_8048CA74: -/* 8048CA74 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 8048CA78 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 8048CA7C 80 63 5D AC */ lwz r3, 0x5dac(r3) -/* 8048CA80 C0 03 04 D0 */ lfs f0, 0x4d0(r3) -/* 8048CA84 D0 01 00 74 */ stfs f0, 0x74(r1) -/* 8048CA88 C0 03 04 D4 */ lfs f0, 0x4d4(r3) -/* 8048CA8C D0 01 00 78 */ stfs f0, 0x78(r1) -/* 8048CA90 C0 03 04 D8 */ lfs f0, 0x4d8(r3) -/* 8048CA94 D0 01 00 7C */ stfs f0, 0x7c(r1) -/* 8048CA98 38 61 00 74 */ addi r3, r1, 0x74 -/* 8048CA9C 38 9D 04 A8 */ addi r4, r29, 0x4a8 -/* 8048CAA0 7C 65 1B 78 */ mr r5, r3 -/* 8048CAA4 4B EB A6 11 */ bl PSVECSubtract -/* 8048CAA8 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 8048CAAC 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 8048CAB0 A8 1D 04 DE */ lha r0, 0x4de(r29) -/* 8048CAB4 7C 00 00 D0 */ neg r0, r0 -/* 8048CAB8 7C 04 07 34 */ extsh r4, r0 -/* 8048CABC 4B B7 F9 21 */ bl mDoMtx_YrotS__FPA4_fs -/* 8048CAC0 3C 60 80 3E */ lis r3, now__14mDoMtx_stack_c@ha /* 0x803DD470@ha */ -/* 8048CAC4 38 63 D4 70 */ addi r3, r3, now__14mDoMtx_stack_c@l /* 0x803DD470@l */ -/* 8048CAC8 38 81 00 74 */ addi r4, r1, 0x74 -/* 8048CACC 7C 85 23 78 */ mr r5, r4 -/* 8048CAD0 4B EB A2 9D */ bl PSMTXMultVec -/* 8048CAD4 C0 21 00 8C */ lfs f1, 0x8c(r1) -/* 8048CAD8 FC 00 08 50 */ fneg f0, f1 -/* 8048CADC D0 01 00 98 */ stfs f0, 0x98(r1) -/* 8048CAE0 C0 61 00 94 */ lfs f3, 0x94(r1) -/* 8048CAE4 FC 40 18 50 */ fneg f2, f3 -/* 8048CAE8 D0 41 00 A0 */ stfs f2, 0xa0(r1) -/* 8048CAEC D0 21 00 A4 */ stfs f1, 0xa4(r1) -/* 8048CAF0 D0 41 00 AC */ stfs f2, 0xac(r1) -/* 8048CAF4 D0 21 00 B0 */ stfs f1, 0xb0(r1) -/* 8048CAF8 D0 61 00 B8 */ stfs f3, 0xb8(r1) -/* 8048CAFC D0 01 00 BC */ stfs f0, 0xbc(r1) -/* 8048CB00 D0 61 00 C4 */ stfs f3, 0xc4(r1) -/* 8048CB04 FC 00 00 18 */ frsp f0, f0 -/* 8048CB08 C0 81 00 74 */ lfs f4, 0x74(r1) -/* 8048CB0C FC 00 20 40 */ fcmpo cr0, f0, f4 -/* 8048CB10 40 80 01 54 */ bge lbl_8048CC64 -/* 8048CB14 FC 00 10 18 */ frsp f0, f2 -/* 8048CB18 C0 41 00 7C */ lfs f2, 0x7c(r1) -/* 8048CB1C FC 00 10 40 */ fcmpo cr0, f0, f2 -/* 8048CB20 40 80 01 44 */ bge lbl_8048CC64 -/* 8048CB24 FC 01 20 40 */ fcmpo cr0, f1, f4 -/* 8048CB28 40 81 01 3C */ ble lbl_8048CC64 -/* 8048CB2C FC 03 10 40 */ fcmpo cr0, f3, f2 -/* 8048CB30 40 81 01 34 */ ble lbl_8048CC64 -/* 8048CB34 38 61 00 50 */ addi r3, r1, 0x50 -/* 8048CB38 7F C4 F3 78 */ mr r4, r30 -/* 8048CB3C 38 BD 04 D0 */ addi r5, r29, 0x4d0 -/* 8048CB40 4B DD 9F F5 */ bl __mi__4cXyzCFRC3Vec -/* 8048CB44 C0 01 00 50 */ lfs f0, 0x50(r1) -/* 8048CB48 D0 01 00 68 */ stfs f0, 0x68(r1) -/* 8048CB4C C0 21 00 54 */ lfs f1, 0x54(r1) -/* 8048CB50 D0 21 00 6C */ stfs f1, 0x6c(r1) -/* 8048CB54 C0 01 00 58 */ lfs f0, 0x58(r1) -/* 8048CB58 D0 01 00 70 */ stfs f0, 0x70(r1) -/* 8048CB5C FC 00 08 1E */ fctiwz f0, f1 -/* 8048CB60 D8 01 00 C8 */ stfd f0, 0xc8(r1) -/* 8048CB64 80 61 00 CC */ lwz r3, 0xcc(r1) -/* 8048CB68 2C 03 00 00 */ cmpwi r3, 0 -/* 8048CB6C 41 80 00 F8 */ blt lbl_8048CC64 -/* 8048CB70 C0 01 00 90 */ lfs f0, 0x90(r1) -/* 8048CB74 FC 00 00 1E */ fctiwz f0, f0 -/* 8048CB78 D8 01 00 C8 */ stfd f0, 0xc8(r1) -/* 8048CB7C 80 01 00 CC */ lwz r0, 0xcc(r1) -/* 8048CB80 7C 03 00 00 */ cmpw r3, r0 -/* 8048CB84 40 80 00 E0 */ bge lbl_8048CC64 -/* 8048CB88 38 60 00 01 */ li r3, 1 -/* 8048CB8C 48 00 00 DC */ b lbl_8048CC68 -lbl_8048CB90: -/* 8048CB90 C0 7D 04 D0 */ lfs f3, 0x4d0(r29) -/* 8048CB94 D0 61 00 80 */ stfs f3, 0x80(r1) -/* 8048CB98 C0 3D 04 D4 */ lfs f1, 0x4d4(r29) -/* 8048CB9C D0 21 00 84 */ stfs f1, 0x84(r1) -/* 8048CBA0 C0 5D 04 D8 */ lfs f2, 0x4d8(r29) -/* 8048CBA4 D0 41 00 88 */ stfs f2, 0x88(r1) -/* 8048CBA8 3C 60 80 49 */ lis r3, lit_4146@ha /* 0x8048CDE4@ha */ -/* 8048CBAC C0 03 CD E4 */ lfs f0, lit_4146@l(r3) /* 0x8048CDE4@l */ -/* 8048CBB0 EC 21 00 28 */ fsubs f1, f1, f0 -/* 8048CBB4 D0 21 00 84 */ stfs f1, 0x84(r1) -/* 8048CBB8 30 04 FF FF */ addic r0, r4, -1 -/* 8048CBBC 7C 00 01 10 */ subfe r0, r0, r0 -/* 8048CBC0 7C A0 00 78 */ andc r0, r5, r0 -/* 8048CBC4 2C 00 00 15 */ cmpwi r0, 0x15 -/* 8048CBC8 40 82 00 50 */ bne lbl_8048CC18 -/* 8048CBCC C0 1E 00 00 */ lfs f0, 0(r30) -/* 8048CBD0 D0 01 00 44 */ stfs f0, 0x44(r1) -/* 8048CBD4 C0 1E 00 04 */ lfs f0, 4(r30) -/* 8048CBD8 D0 01 00 48 */ stfs f0, 0x48(r1) -/* 8048CBDC C0 1E 00 08 */ lfs f0, 8(r30) -/* 8048CBE0 D0 01 00 4C */ stfs f0, 0x4c(r1) -/* 8048CBE4 D0 61 00 38 */ stfs f3, 0x38(r1) -/* 8048CBE8 D0 21 00 3C */ stfs f1, 0x3c(r1) -/* 8048CBEC D0 41 00 40 */ stfs f2, 0x40(r1) -/* 8048CBF0 D0 C1 00 2C */ stfs f6, 0x2c(r1) -/* 8048CBF4 D0 A1 00 30 */ stfs f5, 0x30(r1) -/* 8048CBF8 D0 81 00 34 */ stfs f4, 0x34(r1) -/* 8048CBFC 38 61 00 44 */ addi r3, r1, 0x44 -/* 8048CC00 38 81 00 38 */ addi r4, r1, 0x38 -/* 8048CC04 38 A1 00 2C */ addi r5, r1, 0x2c -/* 8048CC08 A8 DD 04 E6 */ lha r6, 0x4e6(r29) -/* 8048CC0C 38 E0 00 00 */ li r7, 0 -/* 8048CC10 4B CB F7 75 */ bl daNpcT_chkPointInArea__F4cXyz4cXyz4cXyzsi -/* 8048CC14 48 00 00 54 */ b lbl_8048CC68 -lbl_8048CC18: -/* 8048CC18 C0 1E 00 00 */ lfs f0, 0(r30) -/* 8048CC1C D0 01 00 20 */ stfs f0, 0x20(r1) -/* 8048CC20 C0 1E 00 04 */ lfs f0, 4(r30) -/* 8048CC24 D0 01 00 24 */ stfs f0, 0x24(r1) -/* 8048CC28 C0 1E 00 08 */ lfs f0, 8(r30) -/* 8048CC2C D0 01 00 28 */ stfs f0, 0x28(r1) -/* 8048CC30 D0 61 00 14 */ stfs f3, 0x14(r1) -/* 8048CC34 D0 21 00 18 */ stfs f1, 0x18(r1) -/* 8048CC38 D0 41 00 1C */ stfs f2, 0x1c(r1) -/* 8048CC3C D0 C1 00 08 */ stfs f6, 8(r1) -/* 8048CC40 D0 A1 00 0C */ stfs f5, 0xc(r1) -/* 8048CC44 D0 81 00 10 */ stfs f4, 0x10(r1) -/* 8048CC48 38 61 00 20 */ addi r3, r1, 0x20 -/* 8048CC4C 38 81 00 14 */ addi r4, r1, 0x14 -/* 8048CC50 38 A1 00 08 */ addi r5, r1, 8 -/* 8048CC54 A8 DD 04 E6 */ lha r6, 0x4e6(r29) -/* 8048CC58 38 E0 00 01 */ li r7, 1 -/* 8048CC5C 4B CB F7 29 */ bl daNpcT_chkPointInArea__F4cXyz4cXyz4cXyzsi -/* 8048CC60 48 00 00 08 */ b lbl_8048CC68 -lbl_8048CC64: -/* 8048CC64 38 60 00 00 */ li r3, 0 -lbl_8048CC68: -/* 8048CC68 39 61 00 E0 */ addi r11, r1, 0xe0 -/* 8048CC6C 4B ED 55 BD */ bl _restgpr_29 -/* 8048CC70 80 01 00 E4 */ lwz r0, 0xe4(r1) -/* 8048CC74 7C 08 03 A6 */ mtlr r0 -/* 8048CC78 38 21 00 E0 */ addi r1, r1, 0xe0 -/* 8048CC7C 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/create__15daTag_EvtArea_cFv.s b/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/create__15daTag_EvtArea_cFv.s deleted file mode 100644 index 52c7646eb52..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/create__15daTag_EvtArea_cFv.s +++ /dev/null @@ -1,154 +0,0 @@ -lbl_8048C4F8: -/* 8048C4F8 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8048C4FC 7C 08 02 A6 */ mflr r0 -/* 8048C500 90 01 00 14 */ stw r0, 0x14(r1) -/* 8048C504 93 E1 00 0C */ stw r31, 0xc(r1) -/* 8048C508 93 C1 00 08 */ stw r30, 8(r1) -/* 8048C50C 7C 7F 1B 78 */ mr r31, r3 -/* 8048C510 3C 80 80 49 */ lis r4, lit_3853@ha /* 0x8048CDD0@ha */ -/* 8048C514 3B C4 CD D0 */ addi r30, r4, lit_3853@l /* 0x8048CDD0@l */ -/* 8048C518 80 03 04 A0 */ lwz r0, 0x4a0(r3) -/* 8048C51C 54 00 07 39 */ rlwinm. r0, r0, 0, 0x1c, 0x1c -/* 8048C520 40 82 00 28 */ bne lbl_8048C548 -/* 8048C524 28 1F 00 00 */ cmplwi r31, 0 -/* 8048C528 41 82 00 14 */ beq lbl_8048C53C -/* 8048C52C 4B B8 C6 39 */ bl __ct__10fopAc_ac_cFv -/* 8048C530 3C 60 80 49 */ lis r3, __vt__15daTag_EvtArea_c@ha /* 0x8048CE98@ha */ -/* 8048C534 38 03 CE 98 */ addi r0, r3, __vt__15daTag_EvtArea_c@l /* 0x8048CE98@l */ -/* 8048C538 90 1F 05 68 */ stw r0, 0x568(r31) -lbl_8048C53C: -/* 8048C53C 80 1F 04 A0 */ lwz r0, 0x4a0(r31) -/* 8048C540 60 00 00 08 */ ori r0, r0, 8 -/* 8048C544 90 1F 04 A0 */ stw r0, 0x4a0(r31) -lbl_8048C548: -/* 8048C548 A8 1F 04 E8 */ lha r0, 0x4e8(r31) -/* 8048C54C 54 03 06 3E */ clrlwi r3, r0, 0x18 -/* 8048C550 38 03 FF 01 */ addi r0, r3, -255 -/* 8048C554 30 00 FF FF */ addic r0, r0, -1 -/* 8048C558 7C 00 01 10 */ subfe r0, r0, r0 -/* 8048C55C 7C 60 00 78 */ andc r0, r3, r0 -/* 8048C560 28 00 00 17 */ cmplwi r0, 0x17 -/* 8048C564 41 81 01 60 */ bgt lbl_8048C6C4 -/* 8048C568 3C 60 80 49 */ lis r3, lit_3857@ha /* 0x8048CDE8@ha */ -/* 8048C56C 38 63 CD E8 */ addi r3, r3, lit_3857@l /* 0x8048CDE8@l */ -/* 8048C570 54 00 10 3A */ slwi r0, r0, 2 -/* 8048C574 7C 03 00 2E */ lwzx r0, r3, r0 -/* 8048C578 7C 09 03 A6 */ mtctr r0 -/* 8048C57C 4E 80 04 20 */ bctr -lbl_8048C580: -/* 8048C580 C0 1F 04 EC */ lfs f0, 0x4ec(r31) -/* 8048C584 C0 3E 00 00 */ lfs f1, 0(r30) -/* 8048C588 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C58C D0 1F 04 EC */ stfs f0, 0x4ec(r31) -/* 8048C590 C0 1F 04 F0 */ lfs f0, 0x4f0(r31) -/* 8048C594 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C598 D0 1F 04 F0 */ stfs f0, 0x4f0(r31) -/* 8048C59C C0 1F 04 F4 */ lfs f0, 0x4f4(r31) -/* 8048C5A0 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C5A4 D0 1F 04 F4 */ stfs f0, 0x4f4(r31) -/* 8048C5A8 48 00 01 44 */ b lbl_8048C6EC -lbl_8048C5AC: -/* 8048C5AC C0 1F 04 EC */ lfs f0, 0x4ec(r31) -/* 8048C5B0 C0 3E 00 04 */ lfs f1, 4(r30) -/* 8048C5B4 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C5B8 D0 1F 04 EC */ stfs f0, 0x4ec(r31) -/* 8048C5BC C0 1F 04 F0 */ lfs f0, 0x4f0(r31) -/* 8048C5C0 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C5C4 D0 1F 04 F0 */ stfs f0, 0x4f0(r31) -/* 8048C5C8 C0 1F 04 F4 */ lfs f0, 0x4f4(r31) -/* 8048C5CC EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C5D0 D0 1F 04 F4 */ stfs f0, 0x4f4(r31) -/* 8048C5D4 48 00 01 18 */ b lbl_8048C6EC -lbl_8048C5D8: -/* 8048C5D8 C0 1F 04 EC */ lfs f0, 0x4ec(r31) -/* 8048C5DC C0 3E 00 00 */ lfs f1, 0(r30) -/* 8048C5E0 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C5E4 D0 1F 04 EC */ stfs f0, 0x4ec(r31) -/* 8048C5E8 C0 1F 04 F0 */ lfs f0, 0x4f0(r31) -/* 8048C5EC EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C5F0 D0 1F 04 F0 */ stfs f0, 0x4f0(r31) -/* 8048C5F4 C0 1F 04 F4 */ lfs f0, 0x4f4(r31) -/* 8048C5F8 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C5FC D0 1F 04 F4 */ stfs f0, 0x4f4(r31) -/* 8048C600 48 00 00 EC */ b lbl_8048C6EC -lbl_8048C604: -/* 8048C604 C0 1F 04 EC */ lfs f0, 0x4ec(r31) -/* 8048C608 C0 3E 00 08 */ lfs f1, 8(r30) -/* 8048C60C EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C610 D0 1F 04 EC */ stfs f0, 0x4ec(r31) -/* 8048C614 C0 1F 04 F4 */ lfs f0, 0x4f4(r31) -/* 8048C618 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C61C D0 1F 04 F4 */ stfs f0, 0x4f4(r31) -/* 8048C620 C0 1F 04 EC */ lfs f0, 0x4ec(r31) -/* 8048C624 C0 3E 00 0C */ lfs f1, 0xc(r30) -/* 8048C628 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C62C D0 1F 04 EC */ stfs f0, 0x4ec(r31) -/* 8048C630 C0 1F 04 F0 */ lfs f0, 0x4f0(r31) -/* 8048C634 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C638 D0 1F 04 F0 */ stfs f0, 0x4f0(r31) -/* 8048C63C C0 1F 04 F4 */ lfs f0, 0x4f4(r31) -/* 8048C640 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C644 D0 1F 04 F4 */ stfs f0, 0x4f4(r31) -/* 8048C648 48 00 00 A4 */ b lbl_8048C6EC -lbl_8048C64C: -/* 8048C64C C0 1F 04 EC */ lfs f0, 0x4ec(r31) -/* 8048C650 C0 3E 00 00 */ lfs f1, 0(r30) -/* 8048C654 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C658 D0 1F 04 EC */ stfs f0, 0x4ec(r31) -/* 8048C65C C0 1F 04 F0 */ lfs f0, 0x4f0(r31) -/* 8048C660 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C664 D0 1F 04 F0 */ stfs f0, 0x4f0(r31) -/* 8048C668 C0 1F 04 F4 */ lfs f0, 0x4f4(r31) -/* 8048C66C EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C670 D0 1F 04 F4 */ stfs f0, 0x4f4(r31) -/* 8048C674 48 00 00 78 */ b lbl_8048C6EC -lbl_8048C678: -/* 8048C678 C0 1F 04 EC */ lfs f0, 0x4ec(r31) -/* 8048C67C C0 3E 00 0C */ lfs f1, 0xc(r30) -/* 8048C680 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C684 D0 1F 04 EC */ stfs f0, 0x4ec(r31) -/* 8048C688 C0 1F 04 F4 */ lfs f0, 0x4f4(r31) -/* 8048C68C EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C690 D0 1F 04 F4 */ stfs f0, 0x4f4(r31) -/* 8048C694 48 00 00 58 */ b lbl_8048C6EC -lbl_8048C698: -/* 8048C698 C0 1F 04 EC */ lfs f0, 0x4ec(r31) -/* 8048C69C C0 3E 00 00 */ lfs f1, 0(r30) -/* 8048C6A0 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C6A4 D0 1F 04 EC */ stfs f0, 0x4ec(r31) -/* 8048C6A8 C0 1F 04 F0 */ lfs f0, 0x4f0(r31) -/* 8048C6AC EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C6B0 D0 1F 04 F0 */ stfs f0, 0x4f0(r31) -/* 8048C6B4 C0 1F 04 F4 */ lfs f0, 0x4f4(r31) -/* 8048C6B8 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C6BC D0 1F 04 F4 */ stfs f0, 0x4f4(r31) -/* 8048C6C0 48 00 00 2C */ b lbl_8048C6EC -lbl_8048C6C4: -/* 8048C6C4 C0 1F 04 EC */ lfs f0, 0x4ec(r31) -/* 8048C6C8 C0 3E 00 00 */ lfs f1, 0(r30) -/* 8048C6CC EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C6D0 D0 1F 04 EC */ stfs f0, 0x4ec(r31) -/* 8048C6D4 C0 1F 04 F0 */ lfs f0, 0x4f0(r31) -/* 8048C6D8 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C6DC D0 1F 04 F0 */ stfs f0, 0x4f0(r31) -/* 8048C6E0 C0 1F 04 F4 */ lfs f0, 0x4f4(r31) -/* 8048C6E4 EC 00 00 72 */ fmuls f0, f0, f1 -/* 8048C6E8 D0 1F 04 F4 */ stfs f0, 0x4f4(r31) -lbl_8048C6EC: -/* 8048C6EC 7F E3 FB 78 */ mr r3, r31 -/* 8048C6F0 48 00 01 AD */ bl isDelete__15daTag_EvtArea_cFv -/* 8048C6F4 2C 03 00 00 */ cmpwi r3, 0 -/* 8048C6F8 41 82 00 0C */ beq lbl_8048C704 -/* 8048C6FC 38 60 00 05 */ li r3, 5 -/* 8048C700 48 00 00 10 */ b lbl_8048C710 -lbl_8048C704: -/* 8048C704 38 00 00 00 */ li r0, 0 -/* 8048C708 98 1F 05 6C */ stb r0, 0x56c(r31) -/* 8048C70C 38 60 00 04 */ li r3, 4 -lbl_8048C710: -/* 8048C710 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 8048C714 83 C1 00 08 */ lwz r30, 8(r1) -/* 8048C718 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8048C71C 7C 08 03 A6 */ mtlr r0 -/* 8048C720 38 21 00 10 */ addi r1, r1, 0x10 -/* 8048C724 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Create__FPv.s b/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Create__FPv.s deleted file mode 100644 index 1694802d984..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Create__FPv.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_8048CC80: -/* 8048CC80 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8048CC84 7C 08 02 A6 */ mflr r0 -/* 8048CC88 90 01 00 14 */ stw r0, 0x14(r1) -/* 8048CC8C 4B FF F8 6D */ bl create__15daTag_EvtArea_cFv -/* 8048CC90 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8048CC94 7C 08 03 A6 */ mtlr r0 -/* 8048CC98 38 21 00 10 */ addi r1, r1, 0x10 -/* 8048CC9C 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Delete__FPv.s b/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Delete__FPv.s deleted file mode 100644 index bd6b48d858d..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Delete__FPv.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_8048CCA0: -/* 8048CCA0 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8048CCA4 7C 08 02 A6 */ mflr r0 -/* 8048CCA8 90 01 00 14 */ stw r0, 0x14(r1) -/* 8048CCAC 4B FF FA 7D */ bl Delete__15daTag_EvtArea_cFv -/* 8048CCB0 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8048CCB4 7C 08 03 A6 */ mtlr r0 -/* 8048CCB8 38 21 00 10 */ addi r1, r1, 0x10 -/* 8048CCBC 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Draw__FPv.s b/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Draw__FPv.s deleted file mode 100644 index 408d01ecaef..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Draw__FPv.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_8048CCE0: -/* 8048CCE0 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8048CCE4 7C 08 02 A6 */ mflr r0 -/* 8048CCE8 90 01 00 14 */ stw r0, 0x14(r1) -/* 8048CCEC 4B FF FB A9 */ bl Draw__15daTag_EvtArea_cFv -/* 8048CCF0 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8048CCF4 7C 08 03 A6 */ mtlr r0 -/* 8048CCF8 38 21 00 10 */ addi r1, r1, 0x10 -/* 8048CCFC 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Execute__FPv.s b/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Execute__FPv.s deleted file mode 100644 index 3df35c4331a..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/daTag_EvtArea_Execute__FPv.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_8048CCC0: -/* 8048CCC0 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8048CCC4 7C 08 02 A6 */ mflr r0 -/* 8048CCC8 90 01 00 14 */ stw r0, 0x14(r1) -/* 8048CCCC 4B FF FA 65 */ bl Execute__15daTag_EvtArea_cFv -/* 8048CCD0 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8048CCD4 7C 08 03 A6 */ mtlr r0 -/* 8048CCD8 38 21 00 10 */ addi r1, r1, 0x10 -/* 8048CCDC 4E 80 00 20 */ blr diff --git a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/isDelete__15daTag_EvtArea_cFv.s b/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/isDelete__15daTag_EvtArea_cFv.s deleted file mode 100644 index 70149fc8904..00000000000 --- a/asm/rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea/isDelete__15daTag_EvtArea_cFv.s +++ /dev/null @@ -1,50 +0,0 @@ -lbl_8048C89C: -/* 8048C89C 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 8048C8A0 7C 08 02 A6 */ mflr r0 -/* 8048C8A4 90 01 00 14 */ stw r0, 0x14(r1) -/* 8048C8A8 93 E1 00 0C */ stw r31, 0xc(r1) -/* 8048C8AC 93 C1 00 08 */ stw r30, 8(r1) -/* 8048C8B0 7C 7E 1B 78 */ mr r30, r3 -/* 8048C8B4 80 03 00 B0 */ lwz r0, 0xb0(r3) -/* 8048C8B8 54 04 A5 3E */ rlwinm r4, r0, 0x14, 0x14, 0x1f -/* 8048C8BC 28 04 0F FF */ cmplwi r4, 0xfff -/* 8048C8C0 38 60 FF FF */ li r3, -1 -/* 8048C8C4 41 82 00 08 */ beq lbl_8048C8CC -/* 8048C8C8 7C 83 23 78 */ mr r3, r4 -lbl_8048C8CC: -/* 8048C8CC 3C 03 00 01 */ addis r0, r3, 1 -/* 8048C8D0 28 00 FF FF */ cmplwi r0, 0xffff -/* 8048C8D4 41 82 00 28 */ beq lbl_8048C8FC -/* 8048C8D8 28 04 0F FF */ cmplwi r4, 0xfff -/* 8048C8DC 38 60 FF FF */ li r3, -1 -/* 8048C8E0 41 82 00 08 */ beq lbl_8048C8E8 -/* 8048C8E4 7C 83 23 78 */ mr r3, r4 -lbl_8048C8E8: -/* 8048C8E8 4B CC 01 C5 */ bl daNpcT_chkEvtBit__FUl -/* 8048C8EC 2C 03 00 00 */ cmpwi r3, 0 -/* 8048C8F0 41 82 00 0C */ beq lbl_8048C8FC -/* 8048C8F4 38 60 00 01 */ li r3, 1 -/* 8048C8F8 48 00 00 3C */ b lbl_8048C934 -lbl_8048C8FC: -/* 8048C8FC 3B E0 00 00 */ li r31, 0 -/* 8048C900 A8 1E 04 B4 */ lha r0, 0x4b4(r30) -/* 8048C904 54 04 C6 3E */ rlwinm r4, r0, 0x18, 0x18, 0x1f -/* 8048C908 28 04 00 FF */ cmplwi r4, 0xff -/* 8048C90C 41 82 00 24 */ beq lbl_8048C930 -/* 8048C910 3C 60 80 40 */ lis r3, g_dComIfG_gameInfo@ha /* 0x804061C0@ha */ -/* 8048C914 38 63 61 C0 */ addi r3, r3, g_dComIfG_gameInfo@l /* 0x804061C0@l */ -/* 8048C918 88 1E 04 E2 */ lbz r0, 0x4e2(r30) -/* 8048C91C 7C 05 07 74 */ extsb r5, r0 -/* 8048C920 4B BA 8A 41 */ bl isSwitch__10dSv_info_cCFii -/* 8048C924 2C 03 00 00 */ cmpwi r3, 0 -/* 8048C928 41 82 00 08 */ beq lbl_8048C930 -/* 8048C92C 3B E0 00 01 */ li r31, 1 -lbl_8048C930: -/* 8048C930 57 E3 06 3E */ clrlwi r3, r31, 0x18 -lbl_8048C934: -/* 8048C934 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 8048C938 83 C1 00 08 */ lwz r30, 8(r1) -/* 8048C93C 80 01 00 14 */ lwz r0, 0x14(r1) -/* 8048C940 7C 08 03 A6 */ mtlr r0 -/* 8048C944 38 21 00 10 */ addi r1, r1, 0x10 -/* 8048C948 4E 80 00 20 */ blr diff --git a/include/d/a/d_a_npc.h b/include/d/a/d_a_npc.h index 1a0607c5565..878f3448460 100644 --- a/include/d/a/d_a_npc.h +++ b/include/d/a/d_a_npc.h @@ -11,6 +11,24 @@ #include "dolphin/types.h" #include "global.h" +struct bckGetParam { + /* 0x00 */ int bckIdx; + /* 0x04 */ int bckAttr; + /* 0x08 */ int arcIdx; +}; + +struct btpGetParam { + /* 0x00 */ int btpIdx; + /* 0x04 */ int btpAttr; + /* 0x08 */ int arcIdx; +}; + +struct btkGetParam { + /* 0x00 */ int btkIdx; + /* 0x04 */ int btkAttr; + /* 0x08 */ int arcIdx; +}; + struct dPnt {}; class daNpcT_ActorMngr_c { @@ -604,17 +622,17 @@ class daNpcF_c : public fopAc_ac_c { /* 801527FC */ virtual void setMtx2(); /* 80155BB8 */ virtual void setAttnPos(); /* 80155BB4 */ virtual void setCollisions(); - /* 80155BE0 */ virtual bool setExpressionAnm(int, bool); - /* 80155EC8 */ virtual bool setExpressionBtp(int); - /* 80155BF0 */ virtual void setExpression(int, f32); + /* 80155BE0 */ virtual bool setExpressionAnm(int i_idx, bool i_modify); + /* 80155EC8 */ virtual bool setExpressionBtp(int i_idx); + /* 80155BF0 */ virtual void setExpression(int i_expression, f32 i_morf); /* 80155BE8 */ virtual void setMotionAnm(int i_idx, f32 i_morf); - /* 80155BEC */ virtual void setMotion(int, f32, int); + /* 80155BEC */ virtual void setMotion(int i_motion, f32 i_morf, int i_restart); /* 80155BD0 */ virtual BOOL drawDbgInfo(); /* 80155BCC */ virtual void drawOtherMdls(); - BOOL chkActorInSpeakArea(fopAc_ac_c* param_1, fopAc_ac_c* param_2) { return chkActorInAttnArea(param_1, param_2, mAttentionInfo.field_0x0[3]); } + BOOL chkActorInSpeakArea(fopAc_ac_c* i_actorCheck, fopAc_ac_c* i_actorArea) { return chkActorInAttnArea(i_actorCheck, i_actorArea, mAttentionInfo.field_0x0[3]); } BOOL chkPlayerInSpeakArea(fopAc_ac_c* i_actor) { return chkActorInSpeakArea(daPy_getPlayerActorClass(), i_actor); } - BOOL chkActorInTalkArea(fopAc_ac_c* param_1, fopAc_ac_c* param_2) { return chkActorInAttnArea(param_1, param_2, mAttentionInfo.field_0x0[1]); } + BOOL chkActorInTalkArea(fopAc_ac_c* i_actorCheck, fopAc_ac_c* i_actorArea) { return chkActorInAttnArea(i_actorCheck, i_actorArea, mAttentionInfo.field_0x0[1]); } BOOL chkPlayerInTalkArea(fopAc_ac_c* i_actor) { return chkActorInTalkArea(daPy_getPlayerActorClass(), i_actor); } BOOL checkHide() { return mHide || (field_0x9f4 && !dComIfGs_wolfeye_effect_check()); } @@ -804,10 +822,7 @@ class daBaseNpc_moveBgActor_c : public daBaseNpc_c { static u8 m_set_func[4]; }; -// should inherit J3DMaterialAnm but this breaks matching -class daNpcF_MatAnm_c { -public: - /* 0x000 */ J3DMaterialAnm mBase; +class daNpcF_MatAnm_c : public J3DMaterialAnm { private: /* 0x0F4 */ mutable f32 field_0xF4; /* 0x0F8 */ mutable f32 field_0xF8; diff --git a/include/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash.h b/include/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash.h index 743e2486f2d..440f33c0a3f 100644 --- a/include/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash.h +++ b/include/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash.h @@ -2,5 +2,123 @@ #define D_A_NPC_ASH_H #include "dolphin/types.h" +#include "d/a/d_a_npc.h" + +class daNpcAsh_c; + +typedef bool (daNpcAsh_c::*daNpcAsh_actionFn)(void*); +typedef BOOL (daNpcAsh_c::*daNpcAsh_eventFn)(int); + +class daNpcAsh_c : public daNpcF_c { +private: + /* 0xB48 */ Z2Creature mZ2; + /* 0xBD8 */ J3DModel* mModelBow; + /* 0xBDC */ J3DModel* mModelQuiver; + /* 0xBE0 */ daNpcF_MatAnm_c* mpMatAnm; + /* 0xBE4 */ daNpcF_Lookat_c mLookat; + /* 0xC80 */ daNpcF_ActorMngr_c mActorMngr[6]; + /* 0xCB0 */ fopAc_ac_c* mTalkPartner; + /* 0xCB4 */ u32 field_0xcb4; // unused + /* 0xCB8 */ dCcD_Cyl mCcCyl[2]; + /* 0xF30 */ daNpcAsh_actionFn mpActionFn; + /* 0xF3C */ request_of_phase_process_class mPhase[2]; + /* 0xF4C */ u32 mItemPartnerId; + /* 0xF50 */ u32 field_0xf50; // unused + /* 0xF54 */ u32 field_0xf54; + /* 0xF58 */ s16 mMessageNo; + /* 0xF5A */ s16 mLookMode; + /* 0xF5C */ u16 field_0xf5c; + /* 0xF5E */ u8 mMapToolId; + /* 0xF5F */ u8 field_0xf5f; + /* 0xF60 */ u8 field_0xf60; + +public: + /* 809582EC */ daNpcAsh_c(); + /* 80958610 */ ~daNpcAsh_c(); + /* 809587A0 */ cPhs__Step Create(); + /* 80958B68 */ BOOL CreateHeap(); + /* 809590C4 */ bool Delete(); + /* 809590F8 */ bool Execute(); + /* 8095911C */ bool Draw(); + /* 80959238 */ bool ctrlJoint(J3DJoint*, J3DModel*); + /* 80959458 */ static BOOL createHeapCallBack(fopAc_ac_c*); + /* 80959478 */ static BOOL ctrlJointCallBack(J3DJoint*, int); + /* 809594C4 */ bool setExpressionAnm(int, bool); + /* 809596E0 */ bool setExpressionBtp(int); + /* 809597C0 */ void setMotionAnm(int i_idx, f32 i_morf); + /* 80959910 */ void reset(); + /* 80959B28 */ /* inline */ bool setAction(daNpcAsh_actionFn); + /* 80959BD0 */ /* inline */ bool isSneaking(); + /* 80959C40 */ bool wait_type0(void*); + /* 8095A67C */ void setMotion(int, f32, int); + /* 8095A6C0 */ void setExpression(int, f32); + /* 8095A6EC */ bool wait_type1(void*); + /* 8095A8EC */ bool talk(void*); + /* 8095AD28 */ bool demo(void*); + /* 8095B164 */ bool leave(void*); + /* 8095B48C */ BOOL EvCut_Introduction(int cutIndex); + /* 8095B58C */ BOOL EvCut_Meeting(int cutIndex); + /* 8095B83C */ BOOL EvCut_WiretapSponsor(int cutIndex); + /* 8095BA80 */ BOOL EvCut_WiretapEntrant(int cutIndex); + /* 8095BCF0 */ void setParam(); + /* 8095BF6C */ BOOL main(); + /* 8095C200 */ /* inline */ void playMotion(); + /* 8095C520 */ BOOL ctrlBtk(); + /* 8095C5C4 */ void setAttnPos(); + /* 8095C9BC */ void lookat(); + /* 8095CC8C */ BOOL drawDbgInfo(); + + s16 getMessageNo() { return shape_angle.x; } + bool isMap() { return !(daNpcF_chkEvtBit(0x10c) || !daNpcF_chkEvtBit(0x108)); } + inline void setExpressionTalkAfter() { setExpression(7, -1.0f); } + inline void setLookMode(int i_lookMode, fopAc_ac_c* i_talkPartner); + inline void searchActors(); + inline BOOL chkFindPlayer(); + inline bool step(s16, bool); + inline void playExpression(); + + #ifdef NONMATCHING + static daNpcAsh_eventFn mEvtSeqList[6]; + #else + static u8 mEvtSeqList[72]; + #endif +}; + +STATIC_ASSERT(sizeof(daNpcAsh_c) == 0xF64); + +class daNpcAsh_Param_c { +public: + /* 8095D5D4 */ virtual ~daNpcAsh_Param_c(); + + struct param { + /* 0x00 */ f32 m00; + /* 0x04 */ f32 mGravity; + /* 0x08 */ f32 m08; + /* 0x0C */ f32 mShadow; + /* 0x10 */ f32 mSttsWeight; + /* 0x14 */ f32 m14; + /* 0x18 */ f32 m18; + /* 0x1C */ f32 m1C; + /* 0x20 */ f32 m20; + /* 0x24 */ f32 m24; + /* 0x28 */ f32 m28; + /* 0x2C */ f32 m2C; + /* 0x30 */ f32 m30; + /* 0x34 */ f32 m34; + /* 0x38 */ f32 m38; + /* 0x3C */ f32 m3C; + /* 0x40 */ f32 mLookatScl; + /* 0x44 */ f32 m44; + /* 0x48 */ s16 m48; + /* 0x4A */ s16 m4A; + /* 0x4C */ s16 m4C; + /* 0x4E */ s16 m4E; + /* 0x50 */ f32 mSightAngle; + /* 0x54 */ f32 m54[3]; + /* 0x60 */ u16 m60[6]; + }; + + static param const m; +}; #endif /* D_A_NPC_ASH_H */ diff --git a/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash.cpp b/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash.cpp index f3b9f8327e9..8552022266a 100644 --- a/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash.cpp +++ b/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash.cpp @@ -4,368 +4,15 @@ // #include "rel/d/a/npc/d_a_npc_ash/d_a_npc_ash.h" +#include "rel/d/a/tag/d_a_tag_evtarea/d_a_tag_evtarea.h" +#include "JSystem/JKernel/JKRHeap.h" +#include "JSystem/J3DGraphBase/J3DMaterial.h" +#include "SSystem/SComponent/c_math.h" +#include "f_op/f_op_actor_mng.h" +#include "d/d_procname.h" #include "dol2asm.h" #include "dolphin/types.h" -// -// Types: -// - -struct request_of_phase_process_class {}; - -struct mDoMtx_stack_c { - static u8 now[48]; -}; - -struct J3DAnmTransform {}; - -struct mDoExt_bckAnm { - /* 8000D990 */ void changeBckOnly(J3DAnmTransform*); -}; - -struct mDoExt_McaMorfCallBack2_c {}; - -struct mDoExt_McaMorfCallBack1_c {}; - -struct J3DModelData {}; - -struct Vec {}; - -struct Z2Creature { - /* 802C03C8 */ Z2Creature(); - /* 802C0420 */ ~Z2Creature(); - /* 802C0530 */ void init(Vec*, Vec*, u8, u8); -}; - -struct mDoExt_McaMorfSO { - /* 800107D0 */ mDoExt_McaMorfSO(J3DModelData*, mDoExt_McaMorfCallBack1_c*, - mDoExt_McaMorfCallBack2_c*, J3DAnmTransform*, int, f32, int, - int, Z2Creature*, u32, u32); - /* 800111EC */ void modelCalc(); - /* 80011310 */ void stopZelAnime(); -}; - -struct fopAc_ac_c { - /* 80018B64 */ fopAc_ac_c(); - /* 80018C8C */ ~fopAc_ac_c(); -}; - -struct cXyz { - /* 80266B34 */ void operator-(Vec const&) const; - /* 8095CF20 */ ~cXyz(); - /* 8095CF5C */ cXyz(); -}; - -struct daTag_EvtArea_c { - /* 8095D574 */ void chkPointInArea(cXyz); - /* 8048C94C */ void chkPointInArea(cXyz, cXyz); -}; - -struct J3DAnmTexPattern { - /* 8032AF50 */ void getTexNo(u16, u16*) const; -}; - -struct J3DAnmTextureSRTKey {}; - -struct J3DAnmTransformKey {}; - -struct _GXColorS10 {}; - -struct daNpcF_c { - struct daNpcF_anmPlayData {}; - - /* 80152014 */ void execute(); - /* 801522AC */ void draw(int, int, f32, _GXColorS10*, int); - /* 8015276C */ void setMtx(); - /* 801527FC */ void setMtx2(); - /* 801528C8 */ void initialize(); - /* 80152B2C */ void getTrnsfrmKeyAnmP(char*, int); - /* 80152B68 */ void getTexPtrnAnmP(char*, int); - /* 80152BA4 */ void getTexSRTKeyAnmP(char*, int); - /* 80152C1C */ void setMcaMorfAnm(J3DAnmTransformKey*, f32, f32, int, int, int); - /* 80152C80 */ void setBckAnm(J3DAnmTransform*, f32, int, int, int, bool); - /* 80152CC4 */ void setBtpAnm(J3DAnmTexPattern*, J3DModelData*, f32, int); - /* 80152D04 */ void setBtkAnm(J3DAnmTextureSRTKey*, J3DModelData*, f32, int); - /* 80152D84 */ void setEnvTevColor(); - /* 80152DE0 */ void setRoomNo(); - /* 80153150 */ void playExpressionAnm(daNpcF_c::daNpcF_anmPlayData***); - /* 80153264 */ void playMotionAnm(daNpcF_c::daNpcF_anmPlayData***); - /* 8015337C */ void setLookatMtx(int, int*, f32); - /* 80153718 */ void ctrlMsgAnm(int&, int&, fopAc_ac_c*, int); - /* 8015387C */ void orderEvent(int, char*, u16, u16, u8, u16); - /* 80153954 */ void changeEvent(char*, char*, u16, u16); - /* 801539F0 */ void chkActorInSight(fopAc_ac_c*, f32); - /* 80153BDC */ void chkActorInAttnArea(fopAc_ac_c*, fopAc_ac_c*, int); - /* 80153D1C */ void initTalk(int, fopAc_ac_c**); - /* 80153D84 */ void talkProc(int*, int, fopAc_ac_c**); - /* 80153EF4 */ void turn(s16, f32, int); - /* 80154250 */ void setAngle(s16); - /* 80154278 */ void getDistTableIdx(int, int); - /* 801542A0 */ void getEvtAreaTagP(int, int); - /* 8095CF60 */ ~daNpcF_c(); - /* 8095D1AC */ daNpcF_c(); - /* 8095D520 */ void adjustShapeAngle(); - /* 8095D524 */ void setCollisions(); - /* 8095D528 */ void drawOtherMdls(); - - static u8 mCcDCyl[68]; -}; - -struct daNpcF_MatAnm_c { - /* 80150738 */ void initialize(); -}; - -struct csXyz { - /* 8095CEE0 */ ~csXyz(); - /* 8095CF1C */ csXyz(); -}; - -struct daNpcF_Lookat_c { - /* 80151038 */ void initialize(); - /* 801510B8 */ void setParam(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s16, - cXyz*); - /* 80151350 */ void calc(fopAc_ac_c*, f32 (*)[4], csXyz**, int, int, int); - /* 8095CE10 */ ~daNpcF_Lookat_c(); -}; - -struct daNpcF_ActorMngr_c { - /* 801506B0 */ void initialize(); - /* 801506BC */ void entry(fopAc_ac_c*); - /* 801506E0 */ void remove(); - /* 801506EC */ void getActorP(); - /* 8095CD8C */ ~daNpcF_ActorMngr_c(); - /* 8095CDD4 */ daNpcF_ActorMngr_c(); -}; - -struct J3DModel {}; - -struct J3DJoint {}; - -struct daNpcAsh_c { - /* 809582EC */ daNpcAsh_c(); - /* 80958610 */ ~daNpcAsh_c(); - /* 809587A0 */ void Create(); - /* 80958B68 */ void CreateHeap(); - /* 809590C4 */ void Delete(); - /* 809590F8 */ void Execute(); - /* 8095911C */ void Draw(); - /* 80959238 */ void ctrlJoint(J3DJoint*, J3DModel*); - /* 80959458 */ void createHeapCallBack(fopAc_ac_c*); - /* 80959478 */ void ctrlJointCallBack(J3DJoint*, int); - /* 809594C4 */ void setExpressionAnm(int, bool); - /* 809596E0 */ void setExpressionBtp(int); - /* 809597C0 */ void setMotionAnm(int, f32); - /* 80959910 */ void reset(); - /* 80959B28 */ void setAction(bool (daNpcAsh_c::*)(void*)); - /* 80959BD0 */ void isSneaking(); - /* 80959C40 */ void wait_type0(void*); - /* 8095A67C */ void setMotion(int, f32, int); - /* 8095A6C0 */ void setExpression(int, f32); - /* 8095A6EC */ void wait_type1(void*); - /* 8095A8EC */ void talk(void*); - /* 8095AD28 */ void demo(void*); - /* 8095B164 */ void leave(void*); - /* 8095B48C */ void EvCut_Introduction(int); - /* 8095B58C */ void EvCut_Meeting(int); - /* 8095B83C */ void EvCut_WiretapSponsor(int); - /* 8095BA80 */ void EvCut_WiretapEntrant(int); - /* 8095BCF0 */ void setParam(); - /* 8095BF6C */ void main(); - /* 8095C200 */ void playMotion(); - /* 8095C520 */ void ctrlBtk(); - /* 8095C5C4 */ void setAttnPos(); - /* 8095C9BC */ void lookat(); - /* 8095CC8C */ bool drawDbgInfo(); - - static u8 mEvtSeqList[72]; -}; - -struct daNpcAsh_Param_c { - /* 8095D5D4 */ ~daNpcAsh_Param_c(); - - static u8 const m[108]; -}; - -struct dSv_memBit_c { - /* 80034860 */ void isSwitch(int) const; -}; - -struct dKy_tevstr_c {}; - -struct dScnKy_env_light_c { - /* 801A4DA0 */ void setLightTevColorType_MAJI(J3DModelData*, dKy_tevstr_c*); -}; - -struct dRes_info_c {}; - -struct dRes_control_c { - /* 8003C2EC */ void getRes(char const*, s32, dRes_info_c*, int); -}; - -struct dMsgFlow_c { - /* 80249F00 */ dMsgFlow_c(); - /* 80249F48 */ ~dMsgFlow_c(); -}; - -struct dEvt_control_c { - /* 80042468 */ void reset(); - /* 800432EC */ void convPId(unsigned int); -}; - -struct dEvent_manager_c { - /* 80047A78 */ void endCheck(s16); - /* 80047B1C */ void getMyStaffId(char const*, fopAc_ac_c*, int); - /* 80047D4C */ void getIsAddvance(int); - /* 80047E10 */ void getMyActIdx(int, char const* const*, int, int, int); - /* 80047F5C */ void getMyNowCutName(int); - /* 800480EC */ void getMySubstanceP(int, char const*, int); - /* 8004817C */ void cutEnd(int); - /* 800487F0 */ void ChkPresentEnd(); -}; - -struct dComIfG_play_c { - /* 8002C97C */ void getLayerNo(int); -}; - -struct dCcD_Stts { - /* 80083860 */ void Init(int, int, fopAc_ac_c*); -}; - -struct dCcD_SrcCyl {}; - -struct dCcD_GStts { - /* 80083760 */ dCcD_GStts(); - /* 8095D40C */ ~dCcD_GStts(); -}; - -struct dCcD_GObjInf { - /* 80083A28 */ dCcD_GObjInf(); - /* 800840E4 */ ~dCcD_GObjInf(); -}; - -struct dCcD_Cyl { - /* 800848B4 */ void Set(dCcD_SrcCyl const&); - /* 80958430 */ ~dCcD_Cyl(); - /* 809584FC */ dCcD_Cyl(); -}; - -struct dBgS_PolyPassChk { - /* 80078E68 */ void SetObj(); -}; - -struct dBgS_ObjAcch { - /* 8095D468 */ ~dBgS_ObjAcch(); -}; - -struct dBgS_LinChk { - /* 80077C68 */ dBgS_LinChk(); - /* 80077CDC */ ~dBgS_LinChk(); -}; - -struct dBgS_GndChk { - /* 8007757C */ dBgS_GndChk(); - /* 800775F0 */ ~dBgS_GndChk(); -}; - -struct dBgS_AcchCir { - /* 80075EAC */ dBgS_AcchCir(); - /* 80075F58 */ void SetWall(f32, f32); - /* 8095D39C */ ~dBgS_AcchCir(); -}; - -struct dBgS {}; - -struct dBgS_Acch { - /* 80075F94 */ ~dBgS_Acch(); - /* 800760A0 */ dBgS_Acch(); - /* 80076248 */ void Set(cXyz*, cXyz*, fopAc_ac_c*, int, dBgS_AcchCir*, cXyz*, csXyz*, csXyz*); - /* 80076AAC */ void CrrPos(dBgS&); -}; - -struct cM3dGCyl { - /* 8026F1DC */ void SetC(cXyz const&); - /* 8026F1F8 */ void SetH(f32); - /* 8026F200 */ void SetR(f32); - /* 80958580 */ ~cM3dGCyl(); -}; - -struct cM3dGCir { - /* 8026EF18 */ ~cM3dGCir(); -}; - -struct cM3dGAab { - /* 809585C8 */ ~cM3dGAab(); -}; - -struct cCcD_Obj {}; - -struct cCcS { - /* 80264BA8 */ void Set(cCcD_Obj*); -}; - -struct cCcD_GStts { - /* 8095D52C */ ~cCcD_GStts(); -}; - -struct cBgS_PolyInfo { - /* 802680B0 */ ~cBgS_PolyInfo(); -}; - -struct cBgS_GndChk { - /* 80267C1C */ cBgS_GndChk(); - /* 80267C94 */ ~cBgS_GndChk(); -}; - -struct JMath { - template - struct TSinCosTable {}; - /* TSinCosTable<13, f32> */ - struct TSinCosTable__template0 { - /* 8095CC94 */ void func_8095CC94(void* _this, s16) /* const */; - }; - - static u8 sincosTable_[65536]; -}; - -struct J3DTexNoAnm { - /* 80958FB0 */ ~J3DTexNoAnm(); - /* 80958FF8 */ J3DTexNoAnm(); - /* 8095BCC0 */ void calc(u16*) const; -}; - -struct J3DTexMtxAnm { - /* 8095901C */ ~J3DTexMtxAnm(); - /* 80959058 */ J3DTexMtxAnm(); -}; - -struct J3DTevKColorAnm { - /* 80958F08 */ ~J3DTevKColorAnm(); - /* 80958F44 */ J3DTevKColorAnm(); -}; - -struct J3DTevColorAnm { - /* 80958F5C */ ~J3DTevColorAnm(); - /* 80958F98 */ J3DTevColorAnm(); -}; - -struct J3DSys { - static u8 mCurrentMtx[48]; -}; - -struct J3DMaterialAnm { - /* 8032C320 */ void initialize(); -}; - -struct J3DMatColorAnm { - /* 80959070 */ ~J3DMatColorAnm(); - /* 809590AC */ J3DMatColorAnm(); -}; - -struct J3DFrameCtrl { - /* 803283FC */ void init(s16); - /* 8095D4D8 */ ~J3DFrameCtrl(); -}; - // // Forward References: // @@ -448,7 +95,7 @@ extern "C" void __dt__16daNpcAsh_Param_cFv(); extern "C" static void func_8095D61C(); extern "C" static void func_8095D624(); extern "C" u8 const m__16daNpcAsh_Param_c[108]; -extern "C" extern char const* const d_a_npc_ash__stringBase0; +extern "C" extern char* const d_a_npc_ash__stringBase0; extern "C" u8 mEvtSeqList__10daNpcAsh_c[72]; // @@ -565,10 +212,6 @@ extern "C" void __dl__FPv(); extern "C" void init__12J3DFrameCtrlFs(); extern "C" void getTexNo__16J3DAnmTexPatternCFUsPUs(); extern "C" void initialize__14J3DMaterialAnmFv(); -extern "C" void PSMTXCopy(); -extern "C" void PSMTXMultVec(); -extern "C" void PSVECSquareMag(); -extern "C" void PSVECSquareDistance(); extern "C" void __destroy_arr(); extern "C" void __construct_array(); extern "C" void __ptmf_test(); @@ -585,10 +228,7 @@ extern "C" void _restgpr_26(); extern "C" void _restgpr_27(); extern "C" void _restgpr_28(); extern "C" void _restgpr_29(); -extern "C" void strcmp(); extern "C" extern u8 const __ptmf_null[12 + 4 /* padding */]; -extern "C" extern void* g_fopAc_Method[8]; -extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */]; extern "C" extern void* __vt__8dCcD_Cyl[36]; extern "C" extern void* __vt__9dCcD_Stts[11]; extern "C" u8 mCcDCyl__8daNpcF_c[68]; @@ -599,13 +239,8 @@ extern "C" extern void* __vt__14cCcD_ShapeAttr[22]; extern "C" extern void* __vt__9cCcD_Stts[8]; extern "C" extern void* __vt__14J3DMaterialAnm[4]; extern "C" u8 now__14mDoMtx_stack_c[48]; -extern "C" extern u8 g_dComIfG_gameInfo[122384]; -extern "C" extern u8 g_env_light[4880]; -extern "C" extern u8 j3dSys[284]; extern "C" u8 mCurrentMtx__6J3DSys[48]; extern "C" u8 sincosTable___5JMath[65536]; -extern "C" extern u32 __float_nan; -extern "C" extern f32 G_CM3D_F_ABS_MIN[1 + 1 /* padding */]; extern "C" void chkPointInArea__15daTag_EvtArea_cF4cXyz4cXyz(); extern "C" void __register_global_object(); @@ -613,6 +248,81 @@ extern "C" void __register_global_object(); // Declarations: // +void daNpcAsh_c::setLookMode(int i_lookMode, fopAc_ac_c* i_talkPartner) { + if (i_lookMode != mLookMode || i_talkPartner != mTalkPartner) { + mLookMode = i_lookMode; + mTalkPartner = i_talkPartner; + } +} + +void daNpcAsh_c::searchActors() { + if (!mActorMngr[1].getActorP()) { + mActorMngr[1].entry(i_fopAcM_SearchByName(PROC_NPC_SHAD)); + } + if (!mActorMngr[2].getActorP()) { + mActorMngr[2].entry(i_fopAcM_SearchByName(PROC_NPC_RAFREL)); + } + if (!mActorMngr[3].getActorP()) { + mActorMngr[3].entry(i_fopAcM_SearchByName(PROC_NPC_MOIR)); + } + if (isMap() && !mActorMngr[4].getActorP()) { + mActorMngr[4].entry(i_fopAcM_SearchByName(PROC_Obj_Table)); + } + if (!mActorMngr[5].getActorP()) { + mActorMngr[5].entry(getEvtAreaTagP(17, 0)); + } +} + +BOOL daNpcAsh_c::chkFindPlayer() { + BOOL ret; + if (!chkActorInSight(daPy_getPlayerActorClass(), daNpcAsh_Param_c::m.mSightAngle)) { + mActorMngr[0].remove(); + ret = false; + } else { + if (mActorMngr[0].getActorP() == NULL) { + ret = chkPlayerInSpeakArea(this); + } else { + ret = chkPlayerInTalkArea(this); + } + if (ret) { + mActorMngr[0].entry(daPy_getPlayerActorClass()); + } else { + mActorMngr[0].remove(); + } + } + return ret; +} + +bool daNpcAsh_c::step(s16 i_angY, bool i_animate) { + if (field_0x96c == 0) { + if (i_animate) { + if ((s32)fabsf(cM_sht2d((f32)(s16)(i_angY - field_0x8f0.y))) > 40) { + setExpression(7, -1.0f); + setMotion(9, -1.0f, false); + } + } + field_0x996 = i_angY; + field_0x968 = 0; + if (field_0x8f0.y == field_0x996) { + field_0x96c++; + } + current.angle.y = field_0x8f0.y; + shape_angle.y = current.angle.y; + field_0x96c++; + } else if (field_0x96c == 1) { + if (turn(field_0x996, 15.0, 0)) { + shape_angle.y = current.angle.y; + field_0x8f0.y = current.angle.y; + field_0x8f6.y = current.angle.y; + field_0x96c++; + } else { + shape_angle.y = current.angle.y; + field_0x8f0.y = current.angle.y; + } + } + return field_0x96c > 1; +} + /* ############################################################################################## */ /* 8095D910-8095D910 0002D0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ #pragma push @@ -647,78 +357,121 @@ SECTION_DATA static u32 lit_1787[1 + 4 /* padding */] = { #pragma pop /* 8095D9B0-8095DA88 000020 00D8+00 1/2 0/0 0/0 .data l_bckGetParamList */ -SECTION_DATA static u8 l_bckGetParamList[216] = { - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, +static bckGetParam l_bckGetParamList[18] = { + {-1, 2, 0}, // + {7, 0, 0}, // ash_f_talk_a + {12, 0, 1}, // ash_f_talk_b + {11, 0, 1}, // ash_f_silent + {8, 0, 1}, // ash_f_cool + {7, 0, 1}, // ash_f_ask + {9, 0, 1}, // ash_f_explain_a + {10, 0, 1}, // ash_f_explain_b + {8, 2, 0}, // ash_wait_a + {14, 2, 1}, // ash_wait_b + {15, 2, 1}, // ash_wait_c + {13, 0, 1}, // ash_step + {4, 0, 1}, // ash_cool + {3, 0, 1}, // ash_ask + {5, 0, 1}, // ash_explain_a + {6, 0, 1}, // ash_explain_b + {5, 2, 2}, // ash_bowwait + {4, 2, 2}, // ash_bowrun }; /* 8095DA88-8095DA94 0000F8 000C+00 1/1 0/0 0/0 .data l_btpGetParamList */ -SECTION_DATA static u8 l_btpGetParamList[12] = { - 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, +static btpGetParam l_btpGetParamList[1] = { + {17, 2, 0}, // ash }; /* 8095DA94-8095DAA0 000104 000C+00 0/1 0/0 0/0 .data l_btkGetParamList */ #pragma push #pragma force_active on -SECTION_DATA static u8 l_btkGetParamList[12] = { - 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, +static btkGetParam l_btkGetParamList[1] = { + {14, 2, 0}, // ash }; #pragma pop /* 8095DAA0-8095DAAC 000110 000C+00 1/0 0/0 0/0 .data l_loadRes_ASH0 */ -SECTION_DATA static u8 l_loadRes_ASH0[12] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, +static int l_loadRes_ASH0[3] = { + 0, 1, -1, }; /* 8095DAAC-8095DAB8 00011C 000C+00 1/0 0/0 0/0 .data l_loadRes_ASH1 */ -SECTION_DATA static u8 l_loadRes_ASH1[12] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xFF, 0xFF, 0xFF, 0xFF, +static int l_loadRes_ASH1[3] = { + 0, 2, -1, }; /* 8095DAB8-8095DAC0 -00001 0008+00 2/2 0/0 0/0 .data l_loadRes_list */ -SECTION_DATA static void* l_loadRes_list[2] = { - (void*)&l_loadRes_ASH0, - (void*)&l_loadRes_ASH1, +static int* l_loadRes_list[2] = { + l_loadRes_ASH0, + l_loadRes_ASH1, }; +#ifdef NONMATCHING + /* 8095DAC0-8095DACC -00001 000C+00 5/7 0/0 0/0 .data l_arcNames */ -SECTION_DATA static void* l_arcNames[3] = { - (void*)&d_a_npc_ash__stringBase0, - (void*)(((char*)&d_a_npc_ash__stringBase0) + 0x4), - (void*)(((char*)&d_a_npc_ash__stringBase0) + 0x9), +static char* l_arcNames[3] = { + "Ash", + "Ash1", + "Ash2", +}; + +/* 8095DACC-8095DAE4 -00001 0018+00 0/2 0/0 0/0 .data l_evtNames */ +static char* l_evtNames[6] = { + "", + "THE_INTRODUCTION", + "RESIST_MEETING", + "RESIST_WIRETAP_ASH", + "RESIST_WIRETAP_SHAD", + "RESIST_WIRETAP_RAFREL", +}; + +/* 8095DAE4-8095DAE8 -00001 0004+00 0/2 0/0 0/0 .data l_myName */ +static char* l_myName = "Ash"; + +#else + +/* 8095DAC0-8095DACC -00001 000C+00 5/7 0/0 0/0 .data l_arcNames */ +SECTION_DATA static char* l_arcNames[3] = { + (char*)&d_a_npc_ash__stringBase0, + (((char*)&d_a_npc_ash__stringBase0) + 0x4), + (((char*)&d_a_npc_ash__stringBase0) + 0x9), }; /* 8095DACC-8095DAE4 -00001 0018+00 0/2 0/0 0/0 .data l_evtNames */ #pragma push #pragma force_active on -SECTION_DATA static void* l_evtNames[6] = { - (void*)(((char*)&d_a_npc_ash__stringBase0) + 0xE), - (void*)(((char*)&d_a_npc_ash__stringBase0) + 0xF), - (void*)(((char*)&d_a_npc_ash__stringBase0) + 0x20), - (void*)(((char*)&d_a_npc_ash__stringBase0) + 0x2F), - (void*)(((char*)&d_a_npc_ash__stringBase0) + 0x42), - (void*)(((char*)&d_a_npc_ash__stringBase0) + 0x56), +SECTION_DATA static char* l_evtNames[6] = { + (((char*)&d_a_npc_ash__stringBase0) + 0xE), + (((char*)&d_a_npc_ash__stringBase0) + 0xF), + (((char*)&d_a_npc_ash__stringBase0) + 0x20), + (((char*)&d_a_npc_ash__stringBase0) + 0x2F), + (((char*)&d_a_npc_ash__stringBase0) + 0x42), + (((char*)&d_a_npc_ash__stringBase0) + 0x56), }; #pragma pop /* 8095DAE4-8095DAE8 -00001 0004+00 0/2 0/0 0/0 .data l_myName */ #pragma push #pragma force_active on -SECTION_DATA static void* l_myName = (void*)&d_a_npc_ash__stringBase0; +SECTION_DATA static char* l_myName = (char*)&d_a_npc_ash__stringBase0; #pragma pop +#endif + +#ifdef NONMATCHING + +daNpcAsh_eventFn daNpcAsh_c::mEvtSeqList[6] = { + NULL, + &EvCut_Introduction, + &EvCut_Meeting, + &EvCut_WiretapSponsor, + &EvCut_WiretapEntrant, + &EvCut_WiretapEntrant, +}; + +#else + /* 8095DAE8-8095DAF4 -00001 000C+00 0/1 0/0 0/0 .data @3823 */ #pragma push #pragma force_active on @@ -781,6 +534,8 @@ SECTION_DATA u8 daNpcAsh_c::mEvtSeqList[72] = { }; #pragma pop +#endif + /* 8095DB6C-8095DB8C -00001 0020+00 1/1 0/0 0/0 .data @4549 */ SECTION_DATA static void* lit_4549[8] = { (void*)(((char*)setExpressionAnm__10daNpcAsh_cFib) + 0xB4), @@ -881,26 +636,37 @@ SECTION_DATA static void* lit_5140[3] = { }; #pragma pop +static cPhs__Step daNpcAsh_Create(void*); +static bool daNpcAsh_Delete(void*); +static bool daNpcAsh_Execute(void*); +static bool daNpcAsh_IsDelete(void*); +static bool daNpcAsh_Draw(void*); + /* 8095DC04-8095DC24 -00001 0020+00 1/0 0/0 0/0 .data daNpcAsh_MethodTable */ -SECTION_DATA static void* daNpcAsh_MethodTable[8] = { - (void*)daNpcAsh_Create__FPv, - (void*)daNpcAsh_Delete__FPv, - (void*)daNpcAsh_Execute__FPv, - (void*)daNpcAsh_IsDelete__FPv, - (void*)daNpcAsh_Draw__FPv, - (void*)NULL, - (void*)NULL, - (void*)NULL, +static actor_method_class daNpcAsh_MethodTable = { + (process_method_func)daNpcAsh_Create, + (process_method_func)daNpcAsh_Delete, + (process_method_func)daNpcAsh_Execute, + (process_method_func)daNpcAsh_IsDelete, + (process_method_func)daNpcAsh_Draw, }; /* 8095DC24-8095DC54 -00001 0030+00 0/0 0/0 1/0 .data g_profile_NPC_ASH */ -SECTION_DATA extern void* g_profile_NPC_ASH[12] = { - (void*)0xFFFFFFFD, (void*)0x0007FFFD, - (void*)0x02980000, (void*)&g_fpcLf_Method, - (void*)0x00000F64, (void*)NULL, - (void*)NULL, (void*)&g_fopAc_Method, - (void*)0x019B0000, (void*)&daNpcAsh_MethodTable, - (void*)0x00040100, (void*)0x040E0000, +extern actor_process_profile_definition g_profile_NPC_ASH = { + -3, + 7, + -3, + PROC_NPC_ASH, + &g_fpcLf_Method.mBase, + sizeof(daNpcAsh_c), + 0, + 0, + &g_fopAc_Method.base, + 0x019B, + &daNpcAsh_MethodTable, + 0x00040100, + 4, + 14, }; /* 8095DC54-8095DC60 0002C4 000C+00 2/2 0/0 0/0 .data __vt__11J3DTexNoAnm */ @@ -1015,7 +781,8 @@ asm daNpcAsh_c::daNpcAsh_c() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm dCcD_Cyl::~dCcD_Cyl() { +// asm dCcD_Cyl::~dCcD_Cyl() { +asm void __dt__8dCcD_CylFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__8dCcD_CylFv.s" } @@ -1025,7 +792,8 @@ asm dCcD_Cyl::~dCcD_Cyl() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm dCcD_Cyl::dCcD_Cyl() { +// asm dCcD_Cyl::dCcD_Cyl() { +asm void __ct__8dCcD_CylFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__ct__8dCcD_CylFv.s" } @@ -1035,7 +803,8 @@ asm dCcD_Cyl::dCcD_Cyl() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm cM3dGCyl::~cM3dGCyl() { +// asm cM3dGCyl::~cM3dGCyl() { +asm void __dt__8cM3dGCylFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__8cM3dGCylFv.s" } @@ -1045,7 +814,8 @@ asm cM3dGCyl::~cM3dGCyl() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm cM3dGAab::~cM3dGAab() { +// asm cM3dGAab::~cM3dGAab() { +asm void __dt__8cM3dGAabFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__8cM3dGAabFv.s" } @@ -1055,7 +825,8 @@ asm cM3dGAab::~cM3dGAab() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm daNpcAsh_c::~daNpcAsh_c() { +// asm daNpcAsh_c::~daNpcAsh_c() { +asm void __dt__10daNpcAsh_cFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__10daNpcAsh_cFv.s" } @@ -1063,45 +834,42 @@ asm daNpcAsh_c::~daNpcAsh_c() { /* ############################################################################################## */ /* 8095D640-8095D6AC 000000 006C+00 14/14 0/0 0/0 .rodata m__16daNpcAsh_Param_c */ -SECTION_RODATA u8 const daNpcAsh_Param_c::m[108] = { - 0x42, 0x0C, 0x00, 0x00, 0xC0, 0x40, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x43, 0xC8, 0x00, 0x00, - 0x43, 0x7F, 0x00, 0x00, 0x43, 0x48, 0x00, 0x00, 0x42, 0x0C, 0x00, 0x00, 0x41, 0xF0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x41, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF0, 0x00, 0x00, 0xC1, 0xF0, 0x00, 0x00, - 0x3F, 0x4C, 0xCC, 0xCD, 0x41, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x05, 0x00, 0x06, - 0x42, 0xF0, 0x00, 0x00, 0x43, 0xFA, 0x00, 0x00, 0x43, 0x96, 0x00, 0x00, 0xC3, 0x96, 0x00, 0x00, - 0x00, 0x3C, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +SECTION_RODATA daNpcAsh_Param_c::param const daNpcAsh_Param_c::m = { + 35.0f, + -3.0f, // mGravity + 1.0f, + 400.0f, // mShadow + 255.0f, // mSttsWeight + 200.0f, + 35.0f, + 30.0f, + 0.0f, + 0.0f, + 0.0f, + 0.0f, + 30.0f, + 0.0f, + 30.0f, + -30.0f, + 0.8f, // mLookatScl + 12.0f, + 3, + 6, + 5, + 6, + 120.0f, // mSightAngle + 500.0f, + 300.0f, + -300.0f, + 60, + 8, + 0, + 0, + 0, + 0, }; COMPILER_STRIP_GATE(0x8095D640, &daNpcAsh_Param_c::m); -/* 8095D6AC-8095D6B0 00006C 0004+00 0/1 0/0 0/0 .rodata @4224 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4224 = -100.0f; -COMPILER_STRIP_GATE(0x8095D6AC, &lit_4224); -#pragma pop - -/* 8095D6B0-8095D6B4 000070 0004+00 0/1 0/0 0/0 .rodata @4225 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4225 = -50.0f; -COMPILER_STRIP_GATE(0x8095D6B0, &lit_4225); -#pragma pop - -/* 8095D6B4-8095D6B8 000074 0004+00 0/1 0/0 0/0 .rodata @4226 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4226 = 100.0f; -COMPILER_STRIP_GATE(0x8095D6B4, &lit_4226); -#pragma pop - -/* 8095D6B8-8095D6BC 000078 0004+00 0/1 0/0 0/0 .rodata @4227 */ -#pragma push -#pragma force_active on -SECTION_RODATA static f32 const lit_4227 = 220.0f; -COMPILER_STRIP_GATE(0x8095D6B8, &lit_4227); -#pragma pop - /* 8095D910-8095D910 0002D0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ #pragma push #pragma force_active on @@ -1110,14 +878,89 @@ SECTION_DEAD static char const* const stringBase_8095D984 = "D_MN09"; #pragma pop /* 809587A0-80958B68 0005A0 03C8+00 1/1 0/0 0/0 .text Create__10daNpcAsh_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::Create() { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Create__10daNpcAsh_cFv.s" +cPhs__Step daNpcAsh_c::Create() { + cPhs__Step step; + + if (!fopAcM_CheckCondition(this, 8)) { + new (this) daNpcAsh_c(); + fopAcM_OnCondition(this, 8); + } + + if (!strcmp(dComIfGp_getStartStageName(), ((char*)&d_a_npc_ash__stringBase0) + 0x6C) && dComIfG_play_c::getLayerNo(0) == 4) { // "R_SP116" + if (daNpcF_chkEvtBit(0x169) && !daNpcF_chkEvtBit(0x10a)) { + return cPhs_ERROR_e; + } + if (dComIfGs_isStageSwitch(0x18, 0x4b)) { + return cPhs_ERROR_e; + } + field_0xf60 = 0; + } else if (!strcmp(dComIfGp_getStartStageName(), ((char*)&d_a_npc_ash__stringBase0) + 0x74)) { // "D_MN09" + if (dComIfGs_isSaveSwitch(0x14)) { + return cPhs_ERROR_e; + } + fopAcM_OnStatus(this, 0x4000); + field_0xf60 = 1; + } + + mMessageNo = getMessageNo(); + + step = cPhs_ERROR_e; + u32 i = 0; + int arcIndex; + while (arcIndex = l_loadRes_list[field_0xf60][i], arcIndex >= 0) { + step = (cPhs__Step)dComIfG_resLoad(&mPhase[i], l_arcNames[arcIndex]); + if (step != cPhs_COMPLEATE_e) { + return step; + } + i++; + } + + if (step == cPhs_COMPLEATE_e) { + u32 heapSize = 0; + switch (field_0xf60) { + case 0: + heapSize = 0x4210; + break; + case 1: + heapSize = 0x58b0; + break; + } + + if (!fopAcM_entrySolidHeap(this, createHeapCallBack, heapSize)) { + return cPhs_ERROR_e; + } + + fopAcM_SetMtx(this, mMcaMorf->getModel()->getBaseTRMtx()); + fopAcM_setCullSizeBox(this, -100.0f, -50.0f, -100.0f, 100.0f, 220.0f, 100.0f); + mZ2.init(¤t.pos, &mEyePos, 3, 1); + mAcchCir.SetWall(daNpcAsh_Param_c::m.m1C, daNpcAsh_Param_c::m.m18); + 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)); + mAcch.SetRoofNone(); + mAcch.SetWaterNone(); + mAcch.CrrPos(dComIfG_Bgsp()); + mStts.Init((int)daNpcAsh_Param_c::m.mSttsWeight, 0, this); + mCcCyl[0].Set(daNpcF_c::mCcDCyl); + mCcCyl[0].SetStts(&mStts); + mCcCyl[0].SetTgType(0); + mCcCyl[0].SetTgSPrm(0); + if (field_0xf60 == 0) { + mCcCyl[1].Set(daNpcF_c::mCcDCyl); + mCcCyl[1].SetStts(&mStts); + mCcCyl[1].SetTgType(0); + mCcCyl[1].SetTgSPrm(0); + mCcCyl[1].SetCoSPrm(0x19); + } + field_0xa44 = mAcch.m_gnd; + field_0x980 = mAcch.GetGroundH(); + setEnvTevColor(); + setRoomNo(); + mMcaMorf->modelCalc(); + reset(); + Execute(); + } + + return step; } -#pragma pop /* ############################################################################################## */ /* 8095D6BC-8095D6C0 00007C 0004+00 4/4 0/0 0/0 .rodata @4300 */ @@ -1125,29 +968,81 @@ SECTION_RODATA static f32 const lit_4300 = 1.0f; COMPILER_STRIP_GATE(0x8095D6BC, &lit_4300); /* 8095D6C0-8095D6C4 000080 0004+00 3/9 0/0 0/0 .rodata @4301 */ -SECTION_RODATA static u8 const lit_4301[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; +SECTION_RODATA static f32 const lit_4301 = 0.0f; COMPILER_STRIP_GATE(0x8095D6C0, &lit_4301); /* 80958B68-80958F08 000968 03A0+00 1/1 0/0 0/0 .text CreateHeap__10daNpcAsh_cFv */ +#ifdef NONMATCHING +BOOL daNpcAsh_c::CreateHeap() { + J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(l_arcNames[0], 11); + mMcaMorf = new mDoExt_McaMorfSO(modelData, NULL, NULL, NULL, -1, 1.0f, 0, -1, &mZ2, 0x80000, 0x11020284); + if (mMcaMorf != NULL && mMcaMorf->mpModel == NULL) { + mMcaMorf->stopZelAnime(); + mMcaMorf = NULL; + } + if (mMcaMorf == NULL) { + return false; + } + + J3DModel* model = mMcaMorf->getModel(); + for (u16 jointNo = 0; jointNo < modelData->getJointNum(); jointNo++) { + modelData->getJointNodePointer(jointNo)->setCallBack(ctrlJointCallBack); + } + model->setUserArea((u32)this); + + mpMatAnm = new daNpcF_MatAnm_c(); + if (mpMatAnm == NULL) { + return false; + } + + mModelQuiver = NULL; + mModelBow = NULL; + if (field_0xf60 == 1) { + mModelBow = mDoExt_J3DModel__create((J3DModelData*)dComIfG_getObjectRes(l_arcNames[2], 8), 0x80000, 0x11000084); + if (mModelBow == NULL) { + return false; + } + mModelQuiver = mDoExt_J3DModel__create((J3DModelData*)dComIfG_getObjectRes(l_arcNames[2], 9), 0x80000, 0x11000084); + if (mModelQuiver == NULL) { + return false; + } + } + + if (!setExpressionAnm(1, false)) { + return false; + } + + switch (field_0xf60) { + case 0: + if (isMap()) { + setMotionAnm(9, 0.0f); + } else { + setMotionAnm(8, 0.0f); + } + break; + case 1: + setMotionAnm(16, 0.0f); + break; + } + return true; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcAsh_c::CreateHeap() { +asm BOOL daNpcAsh_c::CreateHeap() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/CreateHeap__10daNpcAsh_cFv.s" } #pragma pop +#endif /* 80958F08-80958F44 000D08 003C+00 1/1 0/0 0/0 .text __dt__15J3DTevKColorAnmFv */ #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTevKColorAnm::~J3DTevKColorAnm() { +// asm J3DTevKColorAnm::~J3DTevKColorAnm() { +asm void __dt__15J3DTevKColorAnmFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__15J3DTevKColorAnmFv.s" } @@ -1157,7 +1052,8 @@ asm J3DTevKColorAnm::~J3DTevKColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTevKColorAnm::J3DTevKColorAnm() { +// asm J3DTevKColorAnm::J3DTevKColorAnm() { +asm void __ct__15J3DTevKColorAnmFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__ct__15J3DTevKColorAnmFv.s" } @@ -1167,7 +1063,8 @@ asm J3DTevKColorAnm::J3DTevKColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTevColorAnm::~J3DTevColorAnm() { +// asm J3DTevColorAnm::~J3DTevColorAnm() { +asm void __dt__14J3DTevColorAnmFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__14J3DTevColorAnmFv.s" } @@ -1177,7 +1074,8 @@ asm J3DTevColorAnm::~J3DTevColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTevColorAnm::J3DTevColorAnm() { +// asm J3DTevColorAnm::J3DTevColorAnm() { +asm void __ct__14J3DTevColorAnmFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__ct__14J3DTevColorAnmFv.s" } @@ -1187,7 +1085,8 @@ asm J3DTevColorAnm::J3DTevColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTexNoAnm::~J3DTexNoAnm() { +// asm J3DTexNoAnm::~J3DTexNoAnm() { +asm void __dt__11J3DTexNoAnmFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__11J3DTexNoAnmFv.s" } @@ -1197,7 +1096,8 @@ asm J3DTexNoAnm::~J3DTexNoAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTexNoAnm::J3DTexNoAnm() { +// asm J3DTexNoAnm::J3DTexNoAnm() { +asm void __ct__11J3DTexNoAnmFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__ct__11J3DTexNoAnmFv.s" } @@ -1207,7 +1107,8 @@ asm J3DTexNoAnm::J3DTexNoAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTexMtxAnm::~J3DTexMtxAnm() { +// asm J3DTexMtxAnm::~J3DTexMtxAnm() { +asm void __dt__12J3DTexMtxAnmFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__12J3DTexMtxAnmFv.s" } @@ -1217,7 +1118,8 @@ asm J3DTexMtxAnm::~J3DTexMtxAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DTexMtxAnm::J3DTexMtxAnm() { +// asm J3DTexMtxAnm::J3DTexMtxAnm() { +asm void __ct__12J3DTexMtxAnmFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__ct__12J3DTexMtxAnmFv.s" } @@ -1227,7 +1129,8 @@ asm J3DTexMtxAnm::J3DTexMtxAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DMatColorAnm::~J3DMatColorAnm() { +// asm J3DMatColorAnm::~J3DMatColorAnm() { +asm void __dt__14J3DMatColorAnmFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__14J3DMatColorAnmFv.s" } @@ -1237,41 +1140,41 @@ asm J3DMatColorAnm::~J3DMatColorAnm() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DMatColorAnm::J3DMatColorAnm() { +// asm J3DMatColorAnm::J3DMatColorAnm() { +asm void __ct__14J3DMatColorAnmFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__ct__14J3DMatColorAnmFv.s" } #pragma pop /* 809590C4-809590F8 000EC4 0034+00 1/1 0/0 0/0 .text Delete__10daNpcAsh_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::Delete() { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Delete__10daNpcAsh_cFv.s" +bool daNpcAsh_c::Delete() { + this->~daNpcAsh_c(); + return true; } -#pragma pop /* 809590F8-8095911C 000EF8 0024+00 2/2 0/0 0/0 .text Execute__10daNpcAsh_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::Execute() { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Execute__10daNpcAsh_cFv.s" +bool daNpcAsh_c::Execute() { + execute(); + return true; } -#pragma pop /* 8095911C-80959238 000F1C 011C+00 1/1 0/0 0/0 .text Draw__10daNpcAsh_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::Draw() { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/Draw__10daNpcAsh_cFv.s" +bool daNpcAsh_c::Draw() { + mMcaMorf->getModel()->getModelData()->getMaterialNodePointer(2)->setMaterialAnm(mpMatAnm); + draw(0, 0, daNpcAsh_Param_c::m.mShadow, NULL, 0); + if (field_0xf60 == 1) { + g_env_light.setLightTevColorType_MAJI(mModelBow->mModelData, &mTevStr); + mDoMtx_stack_c::copy(mMcaMorf->getModel()->i_getAnmMtx(16)); + mModelBow->i_setBaseTRMtx(mDoMtx_stack_c::get()); + mDoExt_modelUpdateDL(mModelBow); + g_env_light.setLightTevColorType_MAJI(mModelQuiver->mModelData, &mTevStr); + mDoMtx_stack_c::copy(mMcaMorf->getModel()->i_getAnmMtx(2)); + mModelQuiver->i_setBaseTRMtx(mDoMtx_stack_c::get()); + mDoExt_modelUpdateDL(mModelQuiver); + } + return true; } -#pragma pop /* ############################################################################################## */ /* 8095D6C4-8095D6D0 000084 000C+00 1/1 0/0 0/0 .rodata @4385 */ @@ -1282,59 +1185,203 @@ COMPILER_STRIP_GATE(0x8095D6C4, &lit_4385); /* 80959238-80959458 001038 0220+00 1/1 0/0 0/0 .text ctrlJoint__10daNpcAsh_cFP8J3DJointP8J3DModel */ +#ifdef NONMATCHING +bool daNpcAsh_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) { + s32 jointNo = i_joint->getJntNo(); + int lookatJoints[3] = {1, 3, 4}; + if (jointNo == 0) { + mDoMtx_stack_c::copy(mMcaMorf->getModel()->i_getAnmMtx(1)); + mDoMtx_stack_c::multVecZero(&mLookatPos[0]); + mDoMtx_stack_c::copy(mMcaMorf->getModel()->i_getAnmMtx(3)); + mDoMtx_stack_c::multVecZero(&mLookatPos[1]); + mDoMtx_stack_c::copy(mMcaMorf->getModel()->i_getAnmMtx(4)); + mDoMtx_stack_c::multVecZero(&mLookatPos[2]); + } + mDoMtx_stack_c::copy(i_model->i_getAnmMtx(jointNo)); + switch (jointNo) { + case 1: + case 3: + case 4: + setLookatMtx(jointNo, lookatJoints, daNpcAsh_Param_c::m.mLookatScl); + break; + } + i_model->setAnmMtx(jointNo, mDoMtx_stack_c::get()); + cMtx_copy(mDoMtx_stack_c::get(), J3DSys::mCurrentMtx); + if ((jointNo == 4 || jointNo == 12) && (mAnmFlags & 0x100) != 0) { + J3DAnmTransform* bckAnm = mBckAnm.getBckAnm(); + mBckAnm.changeBckOnly(mMcaMorf->getAnm()); + mMcaMorf->changeAnm(bckAnm); + } + if (cM3d_IsZero_inverted(mExpressionMorf)) { + if (jointNo == 12) { + mMcaMorf->onMorfNone(); + } else if (jointNo == 4) { + mMcaMorf->offMorfNone(); + } + } + return true; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcAsh_c::ctrlJoint(J3DJoint* param_0, J3DModel* param_1) { +asm bool daNpcAsh_c::ctrlJoint(J3DJoint* param_0, J3DModel* param_1) { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/ctrlJoint__10daNpcAsh_cFP8J3DJointP8J3DModel.s" } #pragma pop +#endif /* 80959458-80959478 001258 0020+00 1/1 0/0 0/0 .text * createHeapCallBack__10daNpcAsh_cFP10fopAc_ac_c */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::createHeapCallBack(fopAc_ac_c* param_0) { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/createHeapCallBack__10daNpcAsh_cFP10fopAc_ac_c.s" +BOOL daNpcAsh_c::createHeapCallBack(fopAc_ac_c* i_this) { + return static_cast(i_this)->CreateHeap(); } -#pragma pop /* 80959478-809594C4 001278 004C+00 1/1 0/0 0/0 .text ctrlJointCallBack__10daNpcAsh_cFP8J3DJointi */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::ctrlJointCallBack(J3DJoint* param_0, int param_1) { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/ctrlJointCallBack__10daNpcAsh_cFP8J3DJointi.s" +BOOL daNpcAsh_c::ctrlJointCallBack(J3DJoint* i_joint, int param_1) { + J3DModel* model; + daNpcAsh_c* self; + if (param_1 == 0) { + model = j3dSys.getModel(); + self = (daNpcAsh_c*)model->getUserArea(); + if (self != NULL) { + self->ctrlJoint(i_joint, model); + } + } + return true; } -#pragma pop /* 809594C4-809596E0 0012C4 021C+00 2/0 0/0 0/0 .text setExpressionAnm__10daNpcAsh_cFib */ +#ifdef NONMATCHING +// literals +bool daNpcAsh_c::setExpressionAnm(int i_idx, bool i_modify) { + J3DAnmTransform* bckAnm; + if (i_idx < 0 || i_idx > 7) { + return false; + } + mAnmFlags &= ~ANM_EXPRESSION_FLAGS; + if (l_bckGetParamList[i_idx].bckIdx >= 0) { + bckAnm = getTrnsfrmKeyAnmP(l_arcNames[l_bckGetParamList[i_idx].arcIdx], l_bckGetParamList[i_idx].bckIdx); + } else { + bckAnm = NULL; + } + s32 attr = l_bckGetParamList[i_idx].bckAttr; + bool res = false; + switch (i_idx) { + case 0: + res = setExpressionBtp(0); + break; + case 1: + res = setExpressionBtp(0); + break; + case 2: + res = setExpressionBtp(0); + break; + case 3: + res = setExpressionBtp(0); + break; + case 4: + res = setExpressionBtp(0); + break; + case 5: + res = setExpressionBtp(0); + break; + case 6: + res = setExpressionBtp(0); + break; + case 7: + res = setExpressionBtp(0); + break; + default: + bckAnm = NULL; + break; + } + if (!res) { + return false; + } + if (bckAnm == NULL) { + return true; + } + if (setBckAnm(bckAnm, 1.0f, attr, 0, -1, i_modify)) { + mAnmFlags |= ANM_PAUSE_BCK | ANM_PLAY_BCK; + mExpressionLoops = 0; + return true; + } + return false; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcAsh_c::setExpressionAnm(int param_0, bool param_1) { +asm bool daNpcAsh_c::setExpressionAnm(int param_0, bool param_1) { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setExpressionAnm__10daNpcAsh_cFib.s" } #pragma pop +#endif /* 809596E0-809597C0 0014E0 00E0+00 1/0 0/0 0/0 .text setExpressionBtp__10daNpcAsh_cFi */ +#ifdef NONMATCHING +// literals +bool daNpcAsh_c::setExpressionBtp(int i_idx) { + J3DAnmTexPattern* btpAnm = getTexPtrnAnmP(l_arcNames[l_btpGetParamList[i_idx].arcIdx], l_btpGetParamList[i_idx].btpIdx); + s32 attr = l_btpGetParamList[i_idx].btpAttr; + mAnmFlags &= ~(ANM_PAUSE_BTP | ANM_PLAY_BTP | ANM_FLAG_800); + if (btpAnm == NULL) { + return true; + } + if (setBtpAnm(btpAnm, mMcaMorf->getModel()->getModelData(), 1.0f, attr)) { + mAnmFlags |= ANM_PAUSE_BTP | ANM_PLAY_BTP; + if (i_idx == 0) { + mAnmFlags |= ANM_FLAG_800; + } + return true; + } + return false; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcAsh_c::setExpressionBtp(int param_0) { +asm bool daNpcAsh_c::setExpressionBtp(int param_0) { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setExpressionBtp__10daNpcAsh_cFi.s" } #pragma pop +#endif /* 809597C0-80959910 0015C0 0150+00 1/0 0/0 0/0 .text setMotionAnm__10daNpcAsh_cFif */ +#ifdef NONMATCHING +// literals +void daNpcAsh_c::setMotionAnm(int i_idx, f32 i_morf) { + J3DAnmTransformKey* morfAnm; + J3DAnmTextureSRTKey* btkAnm; + s32 morfAttr; + s32 btkAttr; + if (i_idx < 8 || i_idx >= 18) { + return; + } + morfAnm = getTrnsfrmKeyAnmP(l_arcNames[l_bckGetParamList[i_idx].arcIdx], l_bckGetParamList[i_idx].bckIdx); + btkAnm = getTexSRTKeyAnmP(l_arcNames[l_btkGetParamList[0].arcIdx], l_btkGetParamList[0].btkIdx); + morfAttr = l_bckGetParamList[i_idx].bckAttr; + btkAttr = l_btkGetParamList[0].btkAttr; + mAnmFlags &= ~ANM_MOTION_FLAGS; + if (morfAnm != NULL) { + if (setMcaMorfAnm(morfAnm, 1.0f, i_morf, morfAttr, 0, -1)) { + mAnmFlags |= ANM_PAUSE_MORF | ANM_PLAY_MORF; + mMotionLoops = 0; + } + } + if (btkAnm != NULL) { + if (setBtkAnm(btkAnm, mMcaMorf->getModel()->getModelData(), 1.0f, btkAttr)) { + mAnmFlags |= ANM_PAUSE_BTK | ANM_PLAY_BTK; + } + } +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -1343,8 +1390,56 @@ asm void daNpcAsh_c::setMotionAnm(int param_0, f32 param_1) { #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setMotionAnm__10daNpcAsh_cFif.s" } #pragma pop +#endif /* 80959910-80959B28 001710 0218+00 1/1 0/0 0/0 .text reset__10daNpcAsh_cFv */ +#ifdef NONMATCHING +// literals +void daNpcAsh_c::reset() { + initialize(); + mpMatAnm->initialize(); + mLookat.initialize(); + for (int i = 0; i < 6; i++) { + mActorMngr[i].initialize(); + } + + field_0xf50 = 0; + field_0xf54 = 0; + mpActionFn = NULL; + mLookMode = -1; + field_0xf5c = 0; + mGravity = daNpcAsh_Param_c::m.mGravity; + current.pos = orig.pos; + next.pos = current.pos; + current.angle.set(0, orig.angle.y, 0); + next.angle = current.angle; + shape_angle = current.angle; + field_0x8f0 = current.angle; + field_0x8f6 = field_0x8f0; + speedF = 0.0f; + speed.setAll(0.0f); + mItemPartnerId = -1; + mOrderEvtNo = 0; + mExpressionMorfOverride = 0; + mMotionMorfOverride = 0; + + if (mMessageNo == 0x42d) { + field_0xf5f = 0; + } else { + field_0xf5f = 3; + } + + if (isSneaking()) { + fopAcM_OnStatus(this, 0x4000); + } + + if (field_0xf60 == 0) { + setAction(&wait_type0); + } else { + setAction(&wait_type1); + } +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -1353,206 +1448,109 @@ asm void daNpcAsh_c::reset() { #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/reset__10daNpcAsh_cFv.s" } #pragma pop +#endif /* 80959B28-80959BD0 001928 00A8+00 1/1 0/0 0/0 .text * setAction__10daNpcAsh_cFM10daNpcAsh_cFPCvPvPv_b */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::setAction(bool (daNpcAsh_c::*param_0)(void*)) { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setAction__10daNpcAsh_cFM10daNpcAsh_cFPCvPvPv_b.s" +bool daNpcAsh_c::setAction(daNpcAsh_actionFn i_actionFn) { + field_0xf5c = 3; + if (mpActionFn != NULL) { + (this->*mpActionFn)(NULL); + } + field_0xf5c = 0; + this->mpActionFn = i_actionFn; + if (mpActionFn != NULL) { + (this->*mpActionFn)(NULL); + } + return true; } -#pragma pop /* 80959BD0-80959C40 0019D0 0070+00 1/1 0/0 0/0 .text isSneaking__10daNpcAsh_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::isSneaking() { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/isSneaking__10daNpcAsh_cFv.s" +bool daNpcAsh_c::isSneaking() { + if (!strcmp(dComIfGp_getStartStageName(), ((char*)&d_a_npc_ash__stringBase0) + 0x6C) && dComIfGp_getStartStageRoomNo() == 5 && dComIfG_play_c::getLayerNo(0) == 2) { // "R_SP116" + return true; + } else { + return false; + } +} + +void daNpcAsh_c::playExpression() { + daNpcF_anmPlayData dat0 = {1, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat0[1] = {&dat0}; + daNpcF_anmPlayData dat1 = {2, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat1[1] = {&dat1}; + daNpcF_anmPlayData dat2 = {3, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat2[1] = {&dat2}; + daNpcF_anmPlayData dat3 = {4, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat3[1] = {&dat3}; + daNpcF_anmPlayData dat4 = {5, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat4[1] = {&dat4}; + daNpcF_anmPlayData dat5 = {6, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat5[1] = {&dat5}; + daNpcF_anmPlayData dat6 = {7, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat6[1] = {&dat6}; + daNpcF_anmPlayData dat7 = {0, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat7[1] = {&dat7}; + daNpcF_anmPlayData** ppDat[8] = { + pDat0, + pDat1, + pDat2, + pDat3, + pDat4, + pDat5, + pDat6, + pDat7, + }; + if (mExpression >= 0 && mExpression < 8) { + playExpressionAnm(ppDat); + } +} + +#ifdef NONMATCHING +// inlining +void daNpcAsh_c::playMotion() { + daNpcF_anmPlayData dat0 = {8, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat0[1] = {&dat0}; + daNpcF_anmPlayData dat1 = {9, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat1[1] = {&dat1}; + daNpcF_anmPlayData dat2 = {10, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat2[1] = {&dat2}; + daNpcF_anmPlayData dat3a = {12, daNpcAsh_Param_c::m.m44, 1}; + daNpcF_anmPlayData dat3b = {10, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat3[2] = {&dat3a, &dat3b}; + daNpcF_anmPlayData dat4a = {13, daNpcAsh_Param_c::m.m44, 1}; + daNpcF_anmPlayData dat4b = {10, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat4[2] = {&dat4a, &dat4b}; + daNpcF_anmPlayData dat5a = {14, daNpcAsh_Param_c::m.m44, 1}; + daNpcF_anmPlayData dat5b = {10, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat5[2] = {&dat5a, &dat5b}; + daNpcF_anmPlayData dat6a = {15, daNpcAsh_Param_c::m.m44, 1}; + daNpcF_anmPlayData dat6b = {8, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat6[2] = {&dat6a, &dat6b}; + daNpcF_anmPlayData dat7 = {16, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat7[1] = {&dat7}; + daNpcF_anmPlayData dat8 = {17, daNpcAsh_Param_c::m.m44, 0}; + daNpcF_anmPlayData* pDat8[1] = {&dat8}; + daNpcF_anmPlayData dat9 = {11, 4.0, 1}; + daNpcF_anmPlayData* pDat9[1] = {&dat9}; + daNpcF_anmPlayData** ppDat[10] = { + pDat0, + pDat1, + pDat2, + pDat3, + pDat4, + pDat5, + pDat6, + pDat7, + pDat8, + pDat9, + }; + if (mMotion >= 0 && mMotion < 10) { + playMotionAnm(ppDat); + } } -#pragma pop - -/* ############################################################################################## */ -/* 8095D6D0-8095D6DC 000090 000C+00 0/1 0/0 0/0 .rodata @4638 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4638[12] = { - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x8095D6D0, &lit_4638); -#pragma pop - -/* 8095D6DC-8095D6E0 00009C 0004+00 0/1 0/0 0/0 .rodata @4639 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4639[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x8095D6DC, &lit_4639); -#pragma pop - -/* 8095D6E0-8095D6EC 0000A0 000C+00 0/1 0/0 0/0 .rodata @4640 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4640[12] = { - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x8095D6E0, &lit_4640); -#pragma pop - -/* 8095D6EC-8095D6F0 0000AC 0004+00 0/1 0/0 0/0 .rodata @4641 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4641[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x8095D6EC, &lit_4641); -#pragma pop - -/* 8095D6F0-8095D6FC 0000B0 000C+00 0/1 0/0 0/0 .rodata @4642 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4642[12] = { - 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x8095D6F0, &lit_4642); -#pragma pop - -/* 8095D6FC-8095D700 0000BC 0004+00 0/1 0/0 0/0 .rodata @4643 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4643[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x8095D6FC, &lit_4643); -#pragma pop - -/* 8095D700-8095D70C 0000C0 000C+00 0/1 0/0 0/0 .rodata @4644 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4644[12] = { - 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x8095D700, &lit_4644); -#pragma pop - -/* 8095D70C-8095D710 0000CC 0004+00 0/1 0/0 0/0 .rodata @4645 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4645[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x8095D70C, &lit_4645); -#pragma pop - -/* 8095D710-8095D71C 0000D0 000C+00 0/1 0/0 0/0 .rodata @4646 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4646[12] = { - 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x8095D710, &lit_4646); -#pragma pop - -/* 8095D71C-8095D720 0000DC 0004+00 0/1 0/0 0/0 .rodata @4647 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4647[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x8095D71C, &lit_4647); -#pragma pop - -/* 8095D720-8095D72C 0000E0 000C+00 0/1 0/0 0/0 .rodata @4648 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4648[12] = { - 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x8095D720, &lit_4648); -#pragma pop - -/* 8095D72C-8095D730 0000EC 0004+00 0/1 0/0 0/0 .rodata @4649 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4649[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x8095D72C, &lit_4649); -#pragma pop - -/* 8095D730-8095D73C 0000F0 000C+00 0/1 0/0 0/0 .rodata @4650 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4650[12] = { - 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x8095D730, &lit_4650); -#pragma pop - -/* 8095D73C-8095D740 0000FC 0004+00 0/1 0/0 0/0 .rodata @4651 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4651[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x8095D73C, &lit_4651); -#pragma pop -/* 8095D740-8095D74C 000100 000C+00 0/1 0/0 0/0 .rodata @4652 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4652[12] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x8095D740, &lit_4652); -#pragma pop - -/* 8095D74C-8095D750 00010C 0004+00 0/1 0/0 0/0 .rodata @4653 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4653[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x8095D74C, &lit_4653); -#pragma pop - -/* 8095D750-8095D770 000110 0020+00 0/0 0/0 0/0 .rodata @4654 */ -#pragma push -#pragma force_active on -SECTION_RODATA static u8 const lit_4654[32] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x8095D750, &lit_4654); -#pragma pop +#else /* 8095D770-8095D77C 000130 000C+00 0/1 0/0 0/0 .rodata @4658 */ #pragma push @@ -1799,6 +1797,8 @@ SECTION_RODATA static u8 const lit_4682[40] = { COMPILER_STRIP_GATE(0x8095D850, &lit_4682); #pragma pop +#endif + /* 8095D878-8095D884 000238 000C+00 0/1 0/0 0/0 .rodata @4697 */ #pragma push #pragma force_active on @@ -1836,34 +1836,132 @@ COMPILER_STRIP_GATE(0x8095D890, &lit_4980); #pragma pop /* 80959C40-8095A67C 001A40 0A3C+00 4/0 0/0 0/0 .text wait_type0__10daNpcAsh_cFPv */ +#ifdef NONMATCHING +bool daNpcAsh_c::wait_type0(void* param_0) { + switch (field_0xf5c) { + case 0: + setExpression(7, -1.0f); + if (!isMap()) { + setMotion(0, -1.0f, false); + } else if (field_0x8f0.y == orig.angle.y) { + setMotion(1, -1.0f, false); + } + field_0x96c = 0; + speedF = 0.0f; + field_0xf5c = 2; + break; + case 2: + if (isSneaking()) { + setLookMode(0, NULL); + } else { + if (mActorMngr[0].getActorP() != NULL) { + if (!chkFindPlayer()) { + field_0x96c = 0; + } + } else { + if (chkFindPlayer()) { + field_0x96c = 0; + } + } + if (mActorMngr[0].getActorP() != NULL) { + setLookMode(2, NULL); + } else { + if (isMap()) { + setLookMode(4, NULL); + } else { + setLookMode(0, NULL); + } + if (orig.angle.y != field_0x8f0.y) { + if (step(orig.angle.y, true)) { + setExpression(7, -1.0f); + if (!isMap()) { + setMotion(0, -1.0f, false); + } else { + setMotion(1, -1.0f, false); + } + field_0x96c = 0; + } + } + daTag_EvtArea_c* evtArea = (daTag_EvtArea_c*)mActorMngr[5].getActorP(); + if (evtArea != NULL) { + if (evtArea->chkPointInArea(fopAcM_GetPosition_p(daPy_getPlayerActorClass()))) { + daNpcF_offTmpBit(11); + mOrderEvtNo = 2; + fopAcM_delete(evtArea); + } + } + } + } + if (field_0x8f0.y != orig.angle.y) { + if (step(orig.angle.y, true)) { + if (!isMap()) { + setMotion(0, -1.0f, false); + } else { + setMotion(1, -1.0f, false); + } + field_0x96c = 0; + } + } + if (i_dComIfGp_event_runCheck()) { + if (mEvtInfo.checkCommandTalk()) { + if (!dComIfGp_event_chkTalkXY() || dComIfGp_evmng_ChkPresentEnd()) { + if (isSneaking()) { + mOrderEvtNo = 3; + changeEvent(l_arcNames[0], l_evtNames[mOrderEvtNo], 1, -1); + } else { + setAction(&talk); + } + } + } else { + if (i_dComIfGp_getEventManager().getMyStaffId(l_myName, NULL, 0) != -1) { + setAction(&demo); + } + } + } else { + if (mOrderEvtNo != 0) { + mEvtInfo.setArchiveName("Ash"); + } + orderEvent(mMapToolId, mOrderEvtNo != 0 ? l_evtNames[mOrderEvtNo] : NULL, -1, 40, -1, 1); + } + break; + case 3: + break; + } + return true; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcAsh_c::wait_type0(void* param_0) { +asm bool daNpcAsh_c::wait_type0(void* param_0) { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/wait_type0__10daNpcAsh_cFPv.s" } #pragma pop +#endif /* 8095A67C-8095A6C0 00247C 0044+00 1/0 0/0 0/0 .text setMotion__10daNpcAsh_cFifi */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::setMotion(int param_0, f32 param_1, int param_2) { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setMotion__10daNpcAsh_cFifi.s" +void daNpcAsh_c::setMotion(int i_motion, f32 i_morf, BOOL i_restart) { + s16 motion = (s16)i_motion; + if ((i_restart || mMotion != motion)) { + if (i_motion >= 0 && i_motion < 10) { + mMotion = motion; + mMotionMorfOverride = i_morf; + mMotionPrevPhase = -1; + mMotionPhase = 0; + } + } } -#pragma pop /* 8095A6C0-8095A6EC 0024C0 002C+00 1/0 0/0 0/0 .text setExpression__10daNpcAsh_cFif */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::setExpression(int param_0, f32 param_1) { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setExpression__10daNpcAsh_cFif.s" +void daNpcAsh_c::setExpression(int i_expression, f32 i_morf) { + if (i_expression >= 0 && i_expression < 8) { + mExpression = i_expression; + mExpressionMorfOverride = i_morf; + mExpressionPrevPhase = -1; + mExpressionPhase = 0; + } } -#pragma pop /* ############################################################################################## */ /* 8095D898-8095D89C 000258 0004+00 0/1 0/0 0/0 .rodata @5033 */ @@ -1881,34 +1979,177 @@ COMPILER_STRIP_GATE(0x8095D89C, &lit_5034); #pragma pop /* 8095A6EC-8095A8EC 0024EC 0200+00 3/0 0/0 0/0 .text wait_type1__10daNpcAsh_cFPv */ +#ifdef NONMATCHING +// literals +bool daNpcAsh_c::wait_type1(void* param_0) { + switch (field_0xf5c) { + case 0: + setExpression(7, -1.0f); + setMotion(7, -1.0f, false); + field_0x96c = 0; + speedF = 0.0f; + mActorMngr[0].entry(daPy_getPlayerActorClass()); + setLookMode(0, NULL); + field_0xf5c = 2; + break; + case 2: + switch (field_0xf54) { + case 0: + if (daNpcF_chkTmpBit(0x76)) { + current.pos.set(-4300.0f, 0.0f, 8627.657f); + next.pos = current.pos; + setAngle(-0x6000); + field_0xf54++; + } + break; + case 1: + if (daNpcF_chkTmpBit(0x74)) { + setAction(&leave); + } + break; + } + break; + case 3: + break; + } + return true; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcAsh_c::wait_type1(void* param_0) { +asm bool daNpcAsh_c::wait_type1(void* param_0) { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/wait_type1__10daNpcAsh_cFPv.s" } #pragma pop +#endif /* 8095A8EC-8095AD28 0026EC 043C+00 1/0 0/0 0/0 .text talk__10daNpcAsh_cFPv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::talk(void* param_0) { +#ifdef NONMATCHING +// literals +bool daNpcAsh_c::talk(void* param_0) { + int expression, motion; + bool ret = false; + switch (field_0xf5c) { + case 0: + initTalk(mMessageNo, NULL); + field_0x96c = 0; + field_0x950 = 0; + if (mMessageNo == 0x42d) { + field_0xf5f++; + } + mMapToolId = 0; + speedF = 0.0f; + setLookMode(3, NULL); + setMotion(0, -1.0f, false); + field_0xf5c = 2; + break; + case 2: + if (field_0xf5f <= 2 || field_0x8f0.y == fopAcM_searchPlayerAngleY(this)) { + if (talkProc(NULL, 1, NULL)) { + mActorMngr[0].entry(daPy_getPlayerActorClass()); + setAction(&wait_type0); + ret = true; + } else { + s32 unk = field_0x950; + if (ctrlMsgAnm(expression, motion, this, 0)) { + setExpression(expression, -1.0f); + setMotion(motion, -1.0f, false); + } else { + if (unk != 0 && field_0x950 == 0) { + setExpressionTalkAfter(); + } + } + } + } else { + if (step(fopAcM_searchPlayerAngleY(this), true)) { + setMotion(0, -1.0f, false); + field_0x96c = 0; + } + } + break; + case 3: + setExpression(7, -1.0f); + if (field_0x9ec == 0) { + i_dComIfGp_event_reset(); + } + break; + } + return ret; +} +#else +#pragma push +#pragma optimization_level 0 +#pragma optimizewithasm off +asm bool daNpcAsh_c::talk(void* param_0) { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/talk__10daNpcAsh_cFPv.s" } #pragma pop +#endif /* 8095AD28-8095B164 002B28 043C+00 1/0 0/0 0/0 .text demo__10daNpcAsh_cFPv */ +#ifdef NONMATCHING +bool daNpcAsh_c::demo(void* param_0) { + switch (field_0xf5c) { + case 0: + setExpression(7, -1.0f); + if (!isMap()) { + setMotion(0, -1.0f, false); + } else { + setMotion(1, -1.0f, false); + } + field_0xf5c = 2; + // no break + case 2: + if (i_dComIfGp_event_runCheck() && !mEvtInfo.checkCommandTalk()) { + s32 cutIndex = i_dComIfGp_getEventManager().getMyStaffId(l_myName, NULL, 0); + if (cutIndex != -1) { + mCutIndex = cutIndex; + s32 eventIdx = i_dComIfGp_getEventManager().getMyActIdx(cutIndex, l_evtNames, 6, 0, 0); + if (eventIdx >= 1 && eventIdx < 6) { + mOrderEvtNo = eventIdx; + } + if ((this->*(mEvtSeqList[mOrderEvtNo]))(cutIndex)) { + i_dComIfGp_getEventManager().cutEnd(cutIndex); + } + } + if (mEvtInfo.checkCommandDemoAccrpt() && field_0x9d4 != -1 && i_dComIfGp_getEventManager().endCheck(field_0x9d4)) { + i_dComIfGp_event_reset(); + mOrderEvtNo = 0; + field_0x9d4 = -1; + if (field_0xf60 == 0) { + setAction(&wait_type0); + } else { + setAction(&wait_type1); + } + } + } else { + mOrderEvtNo = 0; + field_0x9d4 = -1; + if (field_0xf60 == 0) { + setAction(&wait_type0); + } else { + setAction(&wait_type1); + } + } + break; + case 3: + break; + } + return true; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcAsh_c::demo(void* param_0) { +asm bool daNpcAsh_c::demo(void* param_0) { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/demo__10daNpcAsh_cFPv.s" } #pragma pop +#endif /* ############################################################################################## */ /* 8095D8A0-8095D8A4 000260 0004+00 0/1 0/0 0/0 .rodata @5227 */ @@ -1953,14 +2194,41 @@ COMPILER_STRIP_GATE(0x8095D8B8, &lit_5231); #pragma pop /* 8095B164-8095B48C 002F64 0328+00 1/0 0/0 0/0 .text leave__10daNpcAsh_cFPv */ +#ifdef NONMATCHING +// literals +bool daNpcAsh_c::leave(void* param_0) { + cXyz target; + target.set(-6253.387, 0.0, 6251.76); + switch (field_0xf5c) { + case 0: + setExpression(7, -1.0f); + setMotion(8, -1.0f, false); + field_0x96c = 0; + speedF = 0.0f; + field_0xf5c = 2; + break; + case 2: + step(cLib_targetAngleY(¤t.pos, &target), true); + speedF = 15.0f; + if (mAcch.ChkWallHit() || current.pos.abs(target) < speedF) { + fopAcM_delete(this); + } + break; + case 3: + break; + } + return true; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcAsh_c::leave(void* param_0) { +asm bool daNpcAsh_c::leave(void* param_0) { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/leave__10daNpcAsh_cFPv.s" } #pragma pop +#endif /* ############################################################################################## */ /* 8095D910-8095D910 0002D0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ @@ -1971,14 +2239,26 @@ SECTION_DEAD static char const* const stringBase_8095D98B = "prm"; /* 8095B48C-8095B58C 00328C 0100+00 1/0 0/0 0/0 .text EvCut_Introduction__10daNpcAsh_cFi */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::EvCut_Introduction(int param_0) { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/EvCut_Introduction__10daNpcAsh_cFi.s" + +BOOL daNpcAsh_c::EvCut_Introduction(int cutIndex) { + int* prm = dComIfGp_evmng_getMyIntegerP(cutIndex, ((char*)&d_a_npc_ash__stringBase0) + 0x7B); + if (prm == NULL) { + return false; + } + if (i_dComIfGp_getEventManager().getIsAddvance(cutIndex)) { + switch (*prm) { + case 0: + case 2: + setLookMode(0, NULL); + return true; + case 1: + setLookMode(2, NULL); + return true; + } + } + return false; } -#pragma pop + /* ############################################################################################## */ /* 8095D8C0-8095D8D0 000280 0010+00 1/1 0/0 0/0 .rodata @5254 */ @@ -1988,14 +2268,66 @@ SECTION_RODATA static u8 const lit_5254[16] = { COMPILER_STRIP_GATE(0x8095D8C0, &lit_5254); /* 8095B58C-8095B83C 00338C 02B0+00 1/0 0/0 0/0 .text EvCut_Meeting__10daNpcAsh_cFi */ +#ifdef NONMATCHING +// literals +BOOL daNpcAsh_c::EvCut_Meeting(int cutIndex) { + int expression, motion; + fopAc_ac_c* talkPartner; + dEvent_manager_c& evtMgr = i_dComIfGp_getEventManager(); + fopAc_ac_c* actors[4] = { + mActorMngr[2].getActorP(), + (fopAc_ac_c*)this, + mActorMngr[1].getActorP(), + mActorMngr[3].getActorP(), + }; + int* cutName = (int*)evtMgr.getMyNowCutName(cutIndex); + if (evtMgr.getIsAddvance(cutIndex)) { + switch (*cutName) { + case 0x30303031: // "0001" + case 0x30303032: // "0002" + dComIfGp_setMesgCameraInfoActor(actors[0], actors[1], actors[2], actors[3], NULL, NULL, NULL, NULL, NULL, NULL); + initTalk(0x42e, actors); + } + } + int unk = field_0x950; + if (ctrlMsgAnm(expression, motion, this, 0)) { + setExpression(expression, -1.0f); + setMotion(motion, -1.0f, false); + } else { + if (unk != 0 && field_0x950 == 0) { + setExpressionTalkAfter(); + } + } + switch (*cutName) { + case 0x30303031: // "0001" + if (talkProc(NULL, 1, actors)) { + return true; + } + talkPartner = dComIfGp_event_getTalkPartner(); + if (talkPartner == this) { + talkPartner = NULL; + } + setLookMode(5, talkPartner); + break; + case 0x30303032: // "0002" + if (talkProc(NULL, 1, actors)) { + return true; + } + setLookMode(2, NULL); + break; + } + return false; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcAsh_c::EvCut_Meeting(int param_0) { +asm BOOL daNpcAsh_c::EvCut_Meeting(int param_0) { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/EvCut_Meeting__10daNpcAsh_cFi.s" } #pragma pop +#endif /* ############################################################################################## */ /* 8095D8D0-8095D8E0 000290 0010+00 1/1 0/0 0/0 .rodata @5295 */ @@ -2005,67 +2337,125 @@ SECTION_RODATA static u8 const lit_5295[16] = { COMPILER_STRIP_GATE(0x8095D8D0, &lit_5295); /* 8095B83C-8095BA80 00363C 0244+00 1/0 0/0 0/0 .text EvCut_WiretapSponsor__10daNpcAsh_cFi */ +#ifdef NONMATCHING +// literals +BOOL daNpcAsh_c::EvCut_WiretapSponsor(int cutIndex) { + int expression, motion; + fopAc_ac_c* talkPartner; + dEvent_manager_c& evtMgr = i_dComIfGp_getEventManager(); + fopAc_ac_c* actors[4] = { + mActorMngr[2].getActorP(), + (fopAc_ac_c*)this, + mActorMngr[1].getActorP(), + mActorMngr[3].getActorP(), + }; + int* cutName = (int*)evtMgr.getMyNowCutName(cutIndex); + if (evtMgr.getIsAddvance(cutIndex)) { + switch (*cutName) { + case 0x30303031: // "0001" + dComIfGp_setMesgCameraInfoActor(actors[0], actors[1], actors[2], actors[3], NULL, NULL, NULL, NULL, NULL, NULL); + initTalk(mMessageNo, actors); + } + } + int unk = field_0x950; + if (ctrlMsgAnm(expression, motion, this, 0)) { + setExpression(expression, -1.0f); + setMotion(motion, -1.0f, false); + } else { + if (unk != 0 && field_0x950 == 0) { + setExpressionTalkAfter(); + } + } + switch (*cutName) { + case 0x30303031: // "0001" + if (talkProc(NULL, 1, actors)) { + return true; + } + talkPartner = dComIfGp_event_getTalkPartner(); + if (talkPartner == this) { + talkPartner = NULL; + } + setLookMode(5, talkPartner); + } + return false; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcAsh_c::EvCut_WiretapSponsor(int param_0) { +asm BOOL daNpcAsh_c::EvCut_WiretapSponsor(int param_0) { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/EvCut_WiretapSponsor__10daNpcAsh_cFi.s" } #pragma pop +#endif /* 8095BA80-8095BC38 003880 01B8+00 2/0 0/0 0/0 .text EvCut_WiretapEntrant__10daNpcAsh_cFi */ +#ifdef NONMATCHING +BOOL daNpcAsh_c::EvCut_WiretapEntrant(int cutIndex) { + int expression, motion; + fopAc_ac_c* talkPartner; + int* prm = dComIfGp_evmng_getMyIntegerP(cutIndex, "prm"); + if (prm == NULL) { + return false; + } + if (i_dComIfGp_getEventManager().getIsAddvance(cutIndex)) { + switch (*prm) { + case 0: + setExpression(7, -1.0f); + setMotion(0, -1.0f, false); + break; + } + } + int unk = field_0x950; + if (ctrlMsgAnm(expression, motion, this, 0) != 0) { + setExpression(expression, -1.0f); + setMotion(motion, -1.0f, false); + } else { + if (unk != 0 && field_0x950 == 0) { + setExpressionTalkAfter(); + } + } + talkPartner = dComIfGp_event_getTalkPartner(); + if (talkPartner == this) { + talkPartner = NULL; + } + setLookMode(5, talkPartner); + return true; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcAsh_c::EvCut_WiretapEntrant(int param_0) { +asm BOOL daNpcAsh_c::EvCut_WiretapEntrant(int param_0) { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/EvCut_WiretapEntrant__10daNpcAsh_cFi.s" } #pragma pop +#endif /* 8095BC38-8095BC58 003A38 0020+00 1/0 0/0 0/0 .text daNpcAsh_Create__FPv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daNpcAsh_Create(void* param_0) { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Create__FPv.s" +static cPhs__Step daNpcAsh_Create(void* i_this) { + return static_cast(i_this)->Create(); } -#pragma pop /* 8095BC58-8095BC78 003A58 0020+00 1/0 0/0 0/0 .text daNpcAsh_Delete__FPv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daNpcAsh_Delete(void* param_0) { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Delete__FPv.s" +static bool daNpcAsh_Delete(void* i_this) { + return static_cast(i_this)->Delete(); } -#pragma pop /* 8095BC78-8095BC98 003A78 0020+00 1/0 0/0 0/0 .text daNpcAsh_Execute__FPv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daNpcAsh_Execute(void* param_0) { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Execute__FPv.s" +static bool daNpcAsh_Execute(void* i_this) { + return static_cast(i_this)->Execute(); } -#pragma pop /* 8095BC98-8095BCB8 003A98 0020+00 1/0 0/0 0/0 .text daNpcAsh_Draw__FPv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -static asm void daNpcAsh_Draw(void* param_0) { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/daNpcAsh_Draw__FPv.s" +static bool daNpcAsh_Draw(void* i_this) { + return static_cast(i_this)->Draw(); } -#pragma pop /* 8095BCB8-8095BCC0 003AB8 0008+00 1/0 0/0 0/0 .text daNpcAsh_IsDelete__FPv */ -static bool daNpcAsh_IsDelete(void* param_0) { +static bool daNpcAsh_IsDelete(void* i_this) { return true; } @@ -2073,13 +2463,37 @@ static bool daNpcAsh_IsDelete(void* param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void J3DTexNoAnm::calc(u16* param_0) const { +// asm void J3DTexNoAnm::calc(u16* param_0) const { +asm void calc__11J3DTexNoAnmCFPUs() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/calc__11J3DTexNoAnmCFPUs.s" } #pragma pop /* 8095BCF0-8095BF6C 003AF0 027C+00 1/0 0/0 0/0 .text setParam__10daNpcAsh_cFv */ +#ifdef NONMATCHING +// literals +void daNpcAsh_c::setParam() { + searchActors(); + mAttentionInfo.mFlags = 0xa; + if (isSneaking()) { + mAttentionInfo.field_0x0[0] = 0x4e; + mAttentionInfo.field_0x0[1] = mAttentionInfo.field_0x0[0]; + mAttentionInfo.field_0x0[3] = 0x4d; + mAttentionInfo.mFlags |= 0x800000; + } else { + if (!strcmp(dComIfGp_getStartStageName(), "R_SP116")) { + mAttentionInfo.field_0x0[0] = getDistTableIdx(3, 6); + mAttentionInfo.field_0x0[1] = mAttentionInfo.field_0x0[0]; + mAttentionInfo.field_0x0[3] = getDistTableIdx(2, 6); + } else { + mAttentionInfo.field_0x0[0] = getDistTableIdx(daNpcAsh_Param_c::m.m4C, daNpcAsh_Param_c::m.m4E); + mAttentionInfo.field_0x0[1] = mAttentionInfo.field_0x0[0]; + mAttentionInfo.field_0x0[3] = getDistTableIdx(daNpcAsh_Param_c::m.m48, daNpcAsh_Param_c::m.m4A); + } + } +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -2088,18 +2502,24 @@ asm void daNpcAsh_c::setParam() { #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setParam__10daNpcAsh_cFv.s" } #pragma pop +#endif /* 8095BF6C-8095C200 003D6C 0294+00 1/0 0/0 0/0 .text main__10daNpcAsh_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void daNpcAsh_c::main() { - nofralloc -#include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/main__10daNpcAsh_cFv.s" +BOOL daNpcAsh_c::main() { + if (mpActionFn != NULL) { + (this->*mpActionFn)(NULL); + } + if (i_dComIfGp_event_runCheck() && !mEvtInfo.checkCommandTalk() && mItemPartnerId != -1) { + dComIfGp_event_setItemPartnerId(mItemPartnerId); + mItemPartnerId = -1; + } + playExpression(); + playMotion(); + return true; } -#pragma pop -/* 8095C200-8095C520 004000 0320+00 1/1 0/0 0/0 .text playMotion__10daNpcAsh_cFv */ +// /* 8095C200-8095C520 004000 0320+00 1/1 0/0 0/0 .text playMotion__10daNpcAsh_cFv */ +#ifndef NONMATCHING #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -2108,6 +2528,7 @@ asm void daNpcAsh_c::playMotion() { #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/playMotion__10daNpcAsh_cFv.s" } #pragma pop +#endif /* ############################################################################################## */ /* 8095D8E0-8095D8E4 0002A0 0004+00 0/1 0/0 0/0 .rodata @5492 */ @@ -2125,14 +2546,25 @@ COMPILER_STRIP_GATE(0x8095D8E4, &lit_5493); #pragma pop /* 8095C520-8095C5C4 004320 00A4+00 1/0 0/0 0/0 .text ctrlBtk__10daNpcAsh_cFv */ +#ifdef NONMATCHING +BOOL daNpcAsh_c::ctrlBtk() { + if (mpMatAnm != NULL) { + mpMatAnm->setNowOffsetX(cM_ssin(field_0x8fc.y) * 0.2f * -1.0f); + mpMatAnm->setNowOffsetY(cM_ssin(field_0x8fc.x) * 0.4f); + mpMatAnm->onEyeMoveFlag(); + } + return mpMatAnm != NULL; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcAsh_c::ctrlBtk() { +asm BOOL daNpcAsh_c::ctrlBtk() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/ctrlBtk__10daNpcAsh_cFv.s" } #pragma pop +#endif /* ############################################################################################## */ /* 8095D8E8-8095D8EC 0002A8 0004+00 0/1 0/0 0/0 .rodata @5589 */ @@ -2178,6 +2610,53 @@ COMPILER_STRIP_GATE(0x8095D8FC, &lit_5594); #pragma pop /* 8095C5C4-8095C9BC 0043C4 03F8+00 1/0 0/0 0/0 .text setAttnPos__10daNpcAsh_cFv */ +#ifdef NONMATCHING +// literals +void daNpcAsh_c::setAttnPos() { + if (mLookMode == 1) { + for (int i = 0; i < 3; i++) { + field_0x91a[i].setall(0); + } + } + setMtx2(); + lookat(); + cXyz vec(10.0f, 10.0f, 0.0f); + mDoMtx_stack_c::copy(mMcaMorf->getModel()->i_getAnmMtx(4)); + mDoMtx_stack_c::multVecZero(&mHeadPos); + mDoMtx_stack_c::multVec(&vec, &mEyePos); + vec.x = 0.0f; + mDoMtx_stack_c::multVec(&vec, &vec); + field_0x902.x = cLib_targetAngleX(&mHeadPos, &vec); + field_0x902.y = cLib_targetAngleY(&mHeadPos, &vec); + cXyz* attnPos = mLookat.getAttnPos(); + if (attnPos != NULL) { + cXyz local_48 = *attnPos - mEyePos; + field_0x8fc.y = -(field_0x91a[2].y + field_0x8f0.y); + field_0x8fc.y += cM_atan2s(local_48.x, local_48.z); + field_0x8fc.x = -cM_atan2s(local_48.y, local_48.absXZ()); + field_0x8fc.x += field_0x902.x; + } else { + field_0x8fc.y = 0; + field_0x8fc.x = 0; + } + mAttentionInfo.mPosition.set(mHeadPos.x, mHeadPos.y + 35.0f, mHeadPos.z); + cXyz center; + mDoMtx_stack_c::copy(mMcaMorf->getModel()->i_getAnmMtx(2)); + mDoMtx_stack_c::multVecZero(¢er); + center.y = current.pos.y; + mCcCyl[0].SetC(center); + mCcCyl[0].SetH(daNpcAsh_Param_c::m.m14); + mCcCyl[0].SetR(daNpcAsh_Param_c::m.m1C); + dComIfG_Ccsp()->Set(&mCcCyl[0]); + if (field_0xf60 == 0 && (!daNpcF_chkEvtBit(0x169) || !daNpcF_chkEvtBit(0x10a) || !daNpcF_chkEvtBit(0x10b) || daNpcF_chkEvtBit(0x10c))) { + center.set(3070.0f, -1150.0f, 2446.0f); + mCcCyl[1].SetC(center); + mCcCyl[1].SetH(170.0f); + mCcCyl[1].SetR(60.0f); + dComIfG_Ccsp()->Set(&mCcCyl[1]); + } +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -2186,6 +2665,7 @@ asm void daNpcAsh_c::setAttnPos() { #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/setAttnPos__10daNpcAsh_cFv.s" } #pragma pop +#endif /* ############################################################################################## */ /* 8095D900-8095D904 0002C0 0004+00 0/1 0/0 0/0 .rodata @5649 */ @@ -2217,6 +2697,53 @@ COMPILER_STRIP_GATE(0x8095D90C, &lit_5652); #pragma pop /* 8095C9BC-8095CC8C 0047BC 02D0+00 1/1 0/0 0/0 .text lookat__10daNpcAsh_cFv */ +#ifdef NONMATCHING +// literals +void daNpcAsh_c::lookat() { + fopAc_ac_c* actor = NULL; + J3DModel* model = mMcaMorf->getModel(); + BOOL iv7 = false; + f32 fv13 = daNpcAsh_Param_c::m.m24; + f32 fv12 = daNpcAsh_Param_c::m.m20; + f32 fv17 = mMotion == 0 ? -15.0f : daNpcAsh_Param_c::m.m2C; + f32 fv16 = mMotion == 0 ? 15.0f : daNpcAsh_Param_c::m.m28; + f32 fv11 = daNpcAsh_Param_c::m.m34; + f32 fv10 = daNpcAsh_Param_c::m.m30; + f32 fv15 = mMotion == 0 ? 0.0f : daNpcAsh_Param_c::m.m3C; + f32 fv14 = mMotion == 0 ? 0.0f : daNpcAsh_Param_c::m.m38; + s16 idk = field_0x8f0.y - field_0x8f6.y; + cXyz lookatPos[3] = {mLookatPos[0], mLookatPos[1], mLookatPos[2]}; + csXyz* svecarray[3] = {&field_0x91a[0], &field_0x91a[1], &field_0x91a[2]}; + switch (mLookMode) { + case 0: + break; + case 1: + iv7 = true; + break; + case 2: + case 3: + actor = daPy_getPlayerActorClass(); + break; + case 4: + actor = mActorMngr[4].getActorP(); + break; + case 5: + actor = mTalkPartner; + break; + } + if (actor != NULL) { + mLookPos = actor->mAttentionInfo.mPosition; + if (mLookMode != 2 && mLookMode != 3) { + mLookPos.y -= 40.0f; + } + mLookat.setAttnPos(&mLookPos); + } else { + mLookat.setAttnPos(NULL); + } + mLookat.setParam(fv13, fv12, fv17, fv16, 0.0f, 0.0f, 0.0f, 0.0f, fv11, fv10, fv15, fv14, field_0x8f0.y, lookatPos); + mLookat.calc(this, model->getBaseTRMtx(), svecarray, iv7, idk, 0); +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -2225,9 +2752,10 @@ asm void daNpcAsh_c::lookat() { #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/lookat__10daNpcAsh_cFv.s" } #pragma pop +#endif /* 8095CC8C-8095CC94 004A8C 0008+00 1/0 0/0 0/0 .text drawDbgInfo__10daNpcAsh_cFv */ -bool daNpcAsh_c::drawDbgInfo() { +BOOL daNpcAsh_c::drawDbgInfo() { return false; } @@ -2274,7 +2802,8 @@ REGISTER_CTORS(0x8095CCA0, __sinit_d_a_npc_ash_cpp); #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm daNpcF_ActorMngr_c::~daNpcF_ActorMngr_c() { +// asm daNpcF_ActorMngr_c::~daNpcF_ActorMngr_c() { +asm void __dt__18daNpcF_ActorMngr_cFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__18daNpcF_ActorMngr_cFv.s" } @@ -2284,7 +2813,8 @@ asm daNpcF_ActorMngr_c::~daNpcF_ActorMngr_c() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm daNpcF_ActorMngr_c::daNpcF_ActorMngr_c() { +// asm daNpcF_ActorMngr_c::daNpcF_ActorMngr_c() { +asm void __ct__18daNpcF_ActorMngr_cFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__ct__18daNpcF_ActorMngr_cFv.s" } @@ -2294,7 +2824,8 @@ asm daNpcF_ActorMngr_c::daNpcF_ActorMngr_c() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm daNpcF_Lookat_c::~daNpcF_Lookat_c() { +// asm daNpcF_Lookat_c::~daNpcF_Lookat_c() { +asm void __dt__15daNpcF_Lookat_cFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__15daNpcF_Lookat_cFv.s" } @@ -2304,14 +2835,16 @@ asm daNpcF_Lookat_c::~daNpcF_Lookat_c() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm csXyz::~csXyz() { +// asm csXyz::~csXyz() { +asm void __dt__5csXyzFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__5csXyzFv.s" } #pragma pop /* 8095CF1C-8095CF20 004D1C 0004+00 2/2 0/0 0/0 .text __ct__5csXyzFv */ -csXyz::csXyz() { +// csXyz::csXyz() { +void __ct__5csXyzFv() { /* empty function */ } @@ -2319,14 +2852,16 @@ csXyz::csXyz() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm cXyz::~cXyz() { +// asm cXyz::~cXyz() { +asm void __dt__4cXyzFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__4cXyzFv.s" } #pragma pop /* 8095CF5C-8095CF60 004D5C 0004+00 2/2 0/0 0/0 .text __ct__4cXyzFv */ -cXyz::cXyz() { +// cXyz::cXyz() { +void __ct__4cXyzFv() { /* empty function */ } @@ -2334,7 +2869,8 @@ cXyz::cXyz() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm daNpcF_c::~daNpcF_c() { +// asm daNpcF_c::~daNpcF_c() { +asm void __dt__8daNpcF_cFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__8daNpcF_cFv.s" } @@ -2344,7 +2880,8 @@ asm daNpcF_c::~daNpcF_c() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm daNpcF_c::daNpcF_c() { +// asm daNpcF_c::daNpcF_c() { +asm void __ct__8daNpcF_cFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__ct__8daNpcF_cFv.s" } @@ -2354,7 +2891,8 @@ asm daNpcF_c::daNpcF_c() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm dBgS_AcchCir::~dBgS_AcchCir() { +// asm dBgS_AcchCir::~dBgS_AcchCir() { +asm void __dt__12dBgS_AcchCirFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__12dBgS_AcchCirFv.s" } @@ -2364,7 +2902,8 @@ asm dBgS_AcchCir::~dBgS_AcchCir() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm dCcD_GStts::~dCcD_GStts() { +// asm dCcD_GStts::~dCcD_GStts() { +asm void __dt__10dCcD_GSttsFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__10dCcD_GSttsFv.s" } @@ -2374,7 +2913,8 @@ asm dCcD_GStts::~dCcD_GStts() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm dBgS_ObjAcch::~dBgS_ObjAcch() { +// asm dBgS_ObjAcch::~dBgS_ObjAcch() { +asm void __dt__12dBgS_ObjAcchFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__12dBgS_ObjAcchFv.s" } @@ -2384,24 +2924,28 @@ asm dBgS_ObjAcch::~dBgS_ObjAcch() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J3DFrameCtrl::~J3DFrameCtrl() { +// asm J3DFrameCtrl::~J3DFrameCtrl() { +asm void __dt__12J3DFrameCtrlFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__12J3DFrameCtrlFv.s" } #pragma pop /* 8095D520-8095D524 005320 0004+00 1/0 0/0 0/0 .text adjustShapeAngle__8daNpcF_cFv */ -void daNpcF_c::adjustShapeAngle() { +// void daNpcF_c::adjustShapeAngle() { +void adjustShapeAngle__8daNpcF_cFv() { /* empty function */ } /* 8095D524-8095D528 005324 0004+00 1/0 0/0 0/0 .text setCollisions__8daNpcF_cFv */ -void daNpcF_c::setCollisions() { +// void daNpcF_c::setCollisions() { +void setCollisions__8daNpcF_cFv() { /* empty function */ } /* 8095D528-8095D52C 005328 0004+00 1/0 0/0 0/0 .text drawOtherMdls__8daNpcF_cFv */ -void daNpcF_c::drawOtherMdls() { +// void daNpcF_c::drawOtherMdls() { +void drawOtherMdls__8daNpcF_cFv() { /* empty function */ } @@ -2409,7 +2953,8 @@ void daNpcF_c::drawOtherMdls() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm cCcD_GStts::~cCcD_GStts() { +// asm cCcD_GStts::~cCcD_GStts() { +asm void __dt__10cCcD_GSttsFv() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/__dt__10cCcD_GSttsFv.s" } @@ -2419,7 +2964,8 @@ asm cCcD_GStts::~cCcD_GStts() { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daTag_EvtArea_c::chkPointInArea(cXyz param_0) { +// asm void daTag_EvtArea_c::chkPointInArea(cXyz param_0) { +asm void chkPointInArea__15daTag_EvtArea_cF4cXyz() { nofralloc #include "asm/rel/d/a/npc/d_a_npc_ash/d_a_npc_ash/chkPointInArea__15daTag_EvtArea_cF4cXyz.s" } diff --git a/src/d/a/d_a_npc.cpp b/src/d/a/d_a_npc.cpp index e5efa50ed2f..9ab7796e3ce 100644 --- a/src/d/a/d_a_npc.cpp +++ b/src/d/a/d_a_npc.cpp @@ -4167,7 +4167,8 @@ void daNpcF_MatAnm_c::calc(J3DMaterial* param_0) const { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void daNpcF_MatAnm_c::calc(J3DMaterial* param_0) const { +// asm void daNpcF_MatAnm_c::calc(J3DMaterial* param_0) const { +asm void calc__15daNpcF_MatAnm_cCFP11J3DMaterial() { nofralloc #include "asm/d/a/d_a_npc/calc__15daNpcF_MatAnm_cCFP11J3DMaterial.s" } @@ -6129,7 +6130,8 @@ bool daNpcF_c::setExpressionBtp(int param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm daNpcF_MatAnm_c::~daNpcF_MatAnm_c() { +// asm daNpcF_MatAnm_c::~daNpcF_MatAnm_c() { +asm void __dt__15daNpcF_MatAnm_cFv() { nofralloc #include "asm/d/a/d_a_npc/__dt__15daNpcF_MatAnm_cFv.s" } From 3b8d0f5eb20bb46519119bd637c010ca7d397ac6 Mon Sep 17 00:00:00 2001 From: randomsalience Date: Wed, 11 Oct 2023 09:07:49 -0400 Subject: [PATCH 3/5] work on Z2SoundHandles --- include/Z2AudioLib/Z2SoundHandles.h | 13 ++- include/d/a/d_a_npc.h | 27 ----- libs/Z2AudioLib/Z2SoundHandles.cpp | 166 ++++++++++++++-------------- obj_files.mk | 1 + 4 files changed, 90 insertions(+), 117 deletions(-) diff --git a/include/Z2AudioLib/Z2SoundHandles.h b/include/Z2AudioLib/Z2SoundHandles.h index 7e1b4b91efa..8b34c787af5 100644 --- a/include/Z2AudioLib/Z2SoundHandles.h +++ b/include/Z2AudioLib/Z2SoundHandles.h @@ -3,9 +3,14 @@ #include "JSystem/JAudio2/JAISoundHandles.h" #include "JSystem/JSupport/JSUList.h" +#include "JSystem/JAudio2/JASHeapCtrl.h" #include "dolphin/types.h" -class Z2SoundHandlePool : public JAISoundHandle, JSULink {}; +class Z2SoundHandlePool : public JAISoundHandle, public JSULink, public JASPoolAllocObject { +public: + Z2SoundHandlePool() : JAISoundHandle(), JSULink(this) {} + ~Z2SoundHandlePool() {} +}; class Z2SoundHandles : protected JSUList { public: @@ -14,8 +19,8 @@ class Z2SoundHandles : protected JSUList { void initHandlesPool(u8 pNumHandles); void deleteHandlesPool(); - void getFreeHandle(); - void getLowPrioSound(JAISoundID); + JAISoundHandle* getFreeHandle(); + JAISoundHandle* getLowPrioSound(JAISoundID pSoundId); bool isActive() const; @@ -26,7 +31,7 @@ class Z2SoundHandles : protected JSUList { void setPos(const JGeometry::TVec3& pos); - u32 getNumHandles() const { return this->getNumLinks(); } + int getNumHandles() const { return this->getNumLinks(); } private: /* 0xC */ u8 mNumHandles; diff --git a/include/d/a/d_a_npc.h b/include/d/a/d_a_npc.h index 02b57a728b8..4cda66ba8b2 100644 --- a/include/d/a/d_a_npc.h +++ b/include/d/a/d_a_npc.h @@ -920,33 +920,6 @@ class daNpcF_Lookat_c { void setAttnPos(cXyz* i_attnPos) { mAttnPos = i_attnPos; } }; -class daNpcF_Lookat_c { -private: - /* 0x00 */ cXyz field_0x00[4]; - /* 0x30 */ cXyz* mAttnPos; - /* 0x34 */ csXyz field_0x34[4]; - /* 0x4C */ csXyz field_0x4c[4]; - /* 0x64 */ csXyz field_0x64[4]; - /* 0x7C */ csXyz mRotAngle[4]; - /* 0x94 */ u8 field_0x94[4]; - /* 0x98 vtable */ - -public: - /* 80151038 */ void initialize(); - /* 801510B8 */ void setParam(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s16, - cXyz*); - /* 80151350 */ void calc(fopAc_ac_c*, f32 (*)[4], csXyz**, int, int, int); - /* 801515D4 */ void adjustMoveDisAngle(s16&, s16, s16, s16); - /* 80151648 */ void initCalc(fopAc_ac_c*, f32 (*)[4], cXyz*, csXyz*, f32*, cXyz&, int); - /* 80151A54 */ void update(cXyz*, csXyz*, f32*); - /* 80151B68 */ void calcMoveDisAngle(int, cXyz*, csXyz*, cXyz, int, int); - /* 80151F54 */ void setRotAngle(); - /* 80151FE0 */ void clrRotAngle(); - virtual ~daNpcF_Lookat_c() {} - cXyz* getAttnPos() { return mAttnPos; } - void setAttnPos(cXyz* i_attnPos) { mAttnPos = i_attnPos; } -}; - class daNpcF_MoveBgActor_c { private: diff --git a/libs/Z2AudioLib/Z2SoundHandles.cpp b/libs/Z2AudioLib/Z2SoundHandles.cpp index 900fb8f3f58..811a79adbe3 100644 --- a/libs/Z2AudioLib/Z2SoundHandles.cpp +++ b/libs/Z2AudioLib/Z2SoundHandles.cpp @@ -4,73 +4,10 @@ // #include "Z2AudioLib/Z2SoundHandles.h" +#include "JSystem/JAudio2/JASGadget.h" +#include "JSystem/JAudio2/JAISoundInfo.h" #include "dolphin/types.h" -// -// Types: -// - -template -struct JASMemPool {}; -/* JASMemPool */ -struct JASMemPool__template4 { - /* 802AB200 */ void func_802AB200(void* _this); -}; - -struct JASGenericMemPool { - /* 80290848 */ JASGenericMemPool(); - /* 80290860 */ ~JASGenericMemPool(); - /* 80290948 */ void alloc(u32); - /* 80290994 */ void free(void*, u32); -}; - -// -// Forward References: -// - -extern "C" void __ct__14Z2SoundHandlesFv(); -extern "C" void __dt__14Z2SoundHandlesFv(); -extern "C" void initHandlesPool__14Z2SoundHandlesFUc(); -extern "C" void deleteHandlesPool__14Z2SoundHandlesFv(); -extern "C" void func_802AB200(void* _this); -extern "C" void getHandleSoundID__14Z2SoundHandlesF10JAISoundID(); -extern "C" void getHandleUserData__14Z2SoundHandlesFUl(); -extern "C" void getFreeHandle__14Z2SoundHandlesFv(); -extern "C" void getLowPrioSound__14Z2SoundHandlesF10JAISoundID(); -extern "C" void stopAllSounds__14Z2SoundHandlesFUl(); -extern "C" void isActive__14Z2SoundHandlesCFv(); -extern "C" void func_802AB538(); - -// -// External References: -// - -extern "C" void __ct__17JASGenericMemPoolFv(); -extern "C" void __dt__17JASGenericMemPoolFv(); -extern "C" void alloc__17JASGenericMemPoolFUl(); -extern "C" void free__17JASGenericMemPoolFPvUl(); -extern "C" void releaseSound__14JAISoundHandleFv(); -extern "C" void stop__8JAISoundFUl(); -extern "C" void __dl__FPv(); -extern "C" void __ct__10JSUPtrLinkFPv(); -extern "C" void __dt__10JSUPtrLinkFv(); -extern "C" void __dt__10JSUPtrListFv(); -extern "C" void initiate__10JSUPtrListFv(); -extern "C" void append__10JSUPtrListFP10JSUPtrLink(); -extern "C" void remove__10JSUPtrListFP10JSUPtrLink(); -extern "C" void __register_global_object(); -extern "C" void _savegpr_26(); -extern "C" void _savegpr_28(); -extern "C" void _restgpr_26(); -extern "C" void _restgpr_28(); -extern "C" extern u8 data_80450B5C[4]; -extern "C" extern u8 data_80451348[8]; -extern "C" extern u8 __OSReport_disable; - -// -// Declarations: -// - // inline JAISoundID::JAISoundID(u32 pId) : mId(pId) {} inline JAISoundID JAISound::getID() const { @@ -89,16 +26,18 @@ void Z2SoundHandles::initHandlesPool(u8 pNumHandles) { mNumHandles = pNumHandles; } -/* ############################################################################################## */ -/* 804341B8-804341C4 060ED8 000C+00 3/3 0/0 0/0 .bss @632 */ -static u8 lit_632[12]; - -/* 804341C4-804341D8 060EE4 0010+04 3/3 1/1 0/0 .bss - * memPool_$localstatic3$getMemPool___39JASPoolAllocObject<17Z2SoundHandlePool>Fv */ -extern u8 data_804341C4[16 + 4 /* padding */]; -u8 data_804341C4[16 + 4 /* padding */]; - /* 802AB120-802AB200 2A5A60 00E0+00 1/1 1/1 0/0 .text deleteHandlesPool__14Z2SoundHandlesFv */ +#if 1 +void Z2SoundHandles::deleteHandlesPool() { + JSULink* link; + while (link = getFirst(), link != NULL) { + Z2SoundHandlePool* handle = link->getObject(); + remove(handle); + delete handle; + } + mNumHandles = 0; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -107,16 +46,7 @@ asm void Z2SoundHandles::deleteHandlesPool() { #include "asm/Z2AudioLib/Z2SoundHandles/deleteHandlesPool__14Z2SoundHandlesFv.s" } #pragma pop - -/* 802AB200-802AB254 2A5B40 0054+00 3/3 1/1 0/0 .text __dt__31JASMemPool<17Z2SoundHandlePool>Fv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -extern "C" asm void func_802AB200(void* _this) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundHandles/func_802AB200.s" -} -#pragma pop +#endif JAISoundHandle* Z2SoundHandles::getHandleSoundID(JAISoundID pSoundId) { JSULink* link; @@ -148,25 +78,73 @@ JAISoundHandle* Z2SoundHandles::getHandleUserData(u32 pUserData) { /* 802AB2D8-802AB3D0 2A5C18 00F8+00 0/0 3/3 0/0 .text getFreeHandle__14Z2SoundHandlesFv */ +#if 1 +JAISoundHandle* Z2SoundHandles::getFreeHandle() { + JSULink* link; + for (link = getFirst(); link != NULL; link = link->getNext()) { + JAISoundHandle* handle = link->getObject(); + if (!handle->isSoundAttached()) { + return handle; + } + } + + if (getNumHandles() < mNumHandles) + { + Z2SoundHandlePool* handle = new Z2SoundHandlePool(); + if (handle != NULL) { + append(handle); + return handle; + } + } + + return NULL; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void Z2SoundHandles::getFreeHandle() { +asm JAISoundHandle* Z2SoundHandles::getFreeHandle() { nofralloc #include "asm/Z2AudioLib/Z2SoundHandles/getFreeHandle__14Z2SoundHandlesFv.s" } #pragma pop +#endif /* 802AB3D0-802AB4A0 2A5D10 00D0+00 0/0 2/2 0/0 .text * getLowPrioSound__14Z2SoundHandlesF10JAISoundID */ +#if 1 +JAISoundHandle* Z2SoundHandles::getLowPrioSound(JAISoundID pSoundId) { + JAISoundInfo* sound_info = JASGlobalInstance::getInstance(); + JAISoundHandle* handle; + u32 low_prio = 0xffff; + JAISoundHandle* low_prio_handle = NULL; + JSULink* link; + for (link = getFirst(); link != NULL; link = link->getNext()) { + handle = link->getObject(); + if (!handle->isSoundAttached()) { + return handle; + } + u32 prio = sound_info->getPriority(handle->getSound()->getID()); + if (prio < low_prio) { + low_prio = prio; + low_prio_handle = handle; + } + } + if (sound_info->getPriority(pSoundId) >= low_prio) { + return low_prio_handle; + } + return NULL; +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void Z2SoundHandles::getLowPrioSound(JAISoundID param_0) { +asm JAISoundHandle* Z2SoundHandles::getLowPrioSound(JAISoundID param_0) { nofralloc #include "asm/Z2AudioLib/Z2SoundHandles/getLowPrioSound__14Z2SoundHandlesF10JAISoundID.s" } #pragma pop +#endif void Z2SoundHandles::stopAllSounds(u32 fadeout) { JSULink* link; @@ -194,6 +172,21 @@ bool Z2SoundHandles::isActive() const { /* 802AB538-802AB64C 2A5E78 0114+00 0/0 1/1 0/0 .text * setPos__14Z2SoundHandlesFRCQ29JGeometry8TVec3 */ +#if 1 +void Z2SoundHandles::setPos(JGeometry::TVec3 const& param_0) { + JSULink* link; + for (link = getFirst(); link != NULL; link = link->getNext()) { + Z2SoundHandlePool* handle = link->getObject(); + if (handle->isSoundAttached()) { + handle->getSound()->setPos(param_0); + } + else { + remove(handle); + delete handle; + } + } +} +#else #pragma push #pragma optimization_level 0 #pragma optimizewithasm off @@ -202,3 +195,4 @@ asm void Z2SoundHandles::setPos(JGeometry::TVec3 const& param_0) { #include "asm/Z2AudioLib/Z2SoundHandles/func_802AB538.s" } #pragma pop +#endif diff --git a/obj_files.mk b/obj_files.mk index 8bd871cddf5..3393bea7959 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -1047,6 +1047,7 @@ RELS := \ $(BUILD_DIR)/rel/d/a/d_a_warp_bug.plf \ O_FILES_SYM_ON := \ + $(BUILD_DIR)/libs/Z2AudioLib/Z2SoundHandles.o \ $(BUILD_DIR)/src/c/c_dylink.o \ $(BUILD_DIR)/src/d/a/d_a_alink.o \ $(BUILD_DIR)/src/DynamicLink.o \ From 17ab6b27b0e857452d598c9f14f1306f9dd07a0c Mon Sep 17 00:00:00 2001 From: randomsalience Date: Tue, 24 Oct 2023 01:00:07 -0400 Subject: [PATCH 4/5] Z2SoundObject, JAUSoundAnimator OK --- Progress.md | 8 +- ...getEndSoundIndex__17JAUSoundAnimationCFf.s | 60 -- ...tStartSoundIndex__17JAUSoundAnimationCFf.s | 61 -- ...PrioSound__14Z2SoundHandlesF10JAISoundID.s | 59 -- .../Z2SoundObject/__ct__15Z2SoundObjAnimeFv.s | 19 - .../Z2SoundObject/__ct__15Z2SoundObjArrowFv.s | 16 - .../__ct__16Z2SoundObjSimpleFv.s | 16 - .../__ct__21Z2DopplerSoundObjBaseFv.s | 24 - .../__dt__21Z2DopplerSoundObjBaseFv.s | 26 - .../ageSounds___15Z2SoundObjAnimeFv.s | 105 --- .../deleteObject__14Z2SoundObjBaseFv.s | 17 - .../dispose__14Z2SoundObjBaseFv.s | 42 - .../framework__21Z2DopplerSoundObjBaseFUlSc.s | 25 - asm/Z2AudioLib/Z2SoundObject/func_802BF660.s | 149 ---- asm/Z2AudioLib/Z2SoundObject/func_802BF890.s | 3 - asm/Z2AudioLib/Z2SoundObject/func_802BF898.s | 39 - .../initAnime__15Z2SoundObjAnimeFPvbff.s | 97 -- .../init__15Z2SoundObjAnimeFP3VecUc.s | 9 - .../init__15Z2SoundObjArrowFP3VecUc.s | 9 - .../init__21Z2DopplerSoundObjBaseFP3VecUc.s | 25 - ...__14Z2SoundObjBaseFUlUlP14Z2SoundObjBase.s | 70 -- ...Sound__14Z2SoundObjBaseF10JAISoundIDUlSc.s | 126 --- ...und__16Z2SoundObjSimpleF10JAISoundIDUlSc.s | 104 --- ...21Z2DopplerSoundObjBaseF10JAISoundIDUlSc.s | 40 - ...Sound__14Z2SoundObjBaseF10JAISoundIDUlSc.s | 111 --- ...und__16Z2SoundObjSimpleF10JAISoundIDUlSc.s | 70 -- ...21Z2DopplerSoundObjBaseF10JAISoundIDUlSc.s | 40 - ...K__14Z2SoundObjBaseFR17Z2SoundHandlePool.s | 17 - .../updateAnime__15Z2SoundObjAnimeFff.s | 307 ------- ...dateSoundLifeTime___15Z2SoundObjAnimeFff.s | 248 ------ include/JSystem/JAudio2/JAISeMgr.h | 1 + include/JSystem/JAudio2/JAISound.h | 12 +- include/JSystem/JAudio2/JAUAudibleParam.h | 4 +- include/JSystem/JAudio2/JAUSoundAnimator.h | 104 +++ include/JSystem/JGeometry.h | 10 + include/JSystem/JSupport/JSUList.h | 2 + include/Z2AudioLib/Z2SeMgr.h | 2 +- include/Z2AudioLib/Z2SoundHandles.h | 5 +- include/Z2AudioLib/Z2SoundObject.h | 69 +- libs/JSystem/JAudio2/JAUSoundAnimator.cpp | 59 +- libs/Z2AudioLib/Z2Audience.cpp | 6 +- libs/Z2AudioLib/Z2Creature.cpp | 2 +- libs/Z2AudioLib/Z2SeMgr.cpp | 2 +- libs/Z2AudioLib/Z2SoundHandles.cpp | 57 +- libs/Z2AudioLib/Z2SoundObject.cpp | 840 ++++++++---------- obj_files.mk | 1 - 46 files changed, 626 insertions(+), 2492 deletions(-) delete mode 100644 asm/JSystem/JAudio2/JAUSoundAnimator/getEndSoundIndex__17JAUSoundAnimationCFf.s delete mode 100644 asm/JSystem/JAudio2/JAUSoundAnimator/getStartSoundIndex__17JAUSoundAnimationCFf.s delete mode 100644 asm/Z2AudioLib/Z2SoundHandles/getLowPrioSound__14Z2SoundHandlesF10JAISoundID.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/__ct__15Z2SoundObjAnimeFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/__ct__15Z2SoundObjArrowFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/__ct__16Z2SoundObjSimpleFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/__ct__21Z2DopplerSoundObjBaseFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/__dt__21Z2DopplerSoundObjBaseFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/ageSounds___15Z2SoundObjAnimeFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/deleteObject__14Z2SoundObjBaseFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/dispose__14Z2SoundObjBaseFv.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/framework__21Z2DopplerSoundObjBaseFUlSc.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/func_802BF660.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/func_802BF890.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/func_802BF898.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/initAnime__15Z2SoundObjAnimeFPvbff.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/init__15Z2SoundObjAnimeFP3VecUc.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/init__15Z2SoundObjArrowFP3VecUc.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/init__21Z2DopplerSoundObjBaseFP3VecUc.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/startCollisionSE__14Z2SoundObjBaseFUlUlP14Z2SoundObjBase.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/startLevelSound__14Z2SoundObjBaseF10JAISoundIDUlSc.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/startLevelSound__16Z2SoundObjSimpleF10JAISoundIDUlSc.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/startLevelSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/startSound__14Z2SoundObjBaseF10JAISoundIDUlSc.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/startSound__16Z2SoundObjSimpleF10JAISoundIDUlSc.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/startSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/stopOK__14Z2SoundObjBaseFR17Z2SoundHandlePool.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/updateAnime__15Z2SoundObjAnimeFff.s delete mode 100644 asm/Z2AudioLib/Z2SoundObject/updateSoundLifeTime___15Z2SoundObjAnimeFff.s diff --git a/Progress.md b/Progress.md index 44b26948f3d..fdecb38b330 100644 --- a/Progress.md +++ b/Progress.md @@ -7,22 +7,22 @@ Section | Percentage | Decompiled (bytes) | Total (bytes) .init | 97.972973% | 9280 | 9472 .extab | 100.000000% | 96 | 96 .extabindex | 100.000000% | 96 | 96 -.text | 34.328845% | 1234652 | 3596544 +.text | 34.522920% | 1241632 | 3596544 .ctors | 100.000000% | 448 | 448 .dtors | 100.000000% | 32 | 32 .rodata | 100.000000% | 193856 | 193856 .data | 100.000000% | 197632 | 197632 .sdata | 100.000000% | 1408 | 1408 .sdata2 | 100.000000% | 20832 | 20832 -Total | 41.251512% | 1658588 | 4020672 +Total | 41.425115% | 1665568 | 4020672 ## Total Section | Percentage | Decompiled (bytes) | Total (bytes) ---|---|---|--- -main.dol | 41.251512% | 1658588 | 4020672 +main.dol | 41.425115% | 1665568 | 4020672 RELs | 34.631963% | 3982788 | 11500324 -Total | 36.346740% | 5641376 | 15520996 +Total | 36.391711% | 5648356 | 15520996 ## RELs diff --git a/asm/JSystem/JAudio2/JAUSoundAnimator/getEndSoundIndex__17JAUSoundAnimationCFf.s b/asm/JSystem/JAudio2/JAUSoundAnimator/getEndSoundIndex__17JAUSoundAnimationCFf.s deleted file mode 100644 index 38a03bc552b..00000000000 --- a/asm/JSystem/JAudio2/JAUSoundAnimator/getEndSoundIndex__17JAUSoundAnimationCFf.s +++ /dev/null @@ -1,60 +0,0 @@ -lbl_802A7044: -/* 802A7044 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 802A7048 7C 08 02 A6 */ mflr r0 -/* 802A704C 90 01 00 34 */ stw r0, 0x34(r1) -/* 802A7050 DB E1 00 20 */ stfd f31, 0x20(r1) -/* 802A7054 F3 E1 00 28 */ psq_st f31, 40(r1), 0, 0 /* qr0 */ -/* 802A7058 39 61 00 20 */ addi r11, r1, 0x20 -/* 802A705C 48 0B B1 7D */ bl _savegpr_28 -/* 802A7060 7C 7C 1B 78 */ mr r28, r3 -/* 802A7064 FF E0 08 90 */ fmr f31, f1 -/* 802A7068 3B A0 00 00 */ li r29, 0 -/* 802A706C 3B E0 00 00 */ li r31, 0 -/* 802A7070 83 C3 00 04 */ lwz r30, 4(r3) -/* 802A7074 48 00 00 48 */ b lbl_802A70BC -lbl_802A7078: -/* 802A7078 28 1E 00 00 */ cmplwi r30, 0 -/* 802A707C 41 82 00 24 */ beq lbl_802A70A0 -/* 802A7080 7F C3 F3 78 */ mr r3, r30 -/* 802A7084 7F 84 E3 78 */ mr r4, r28 -/* 802A7088 7F A5 EB 78 */ mr r5, r29 -/* 802A708C 81 9E 00 00 */ lwz r12, 0(r30) -/* 802A7090 81 8C 00 0C */ lwz r12, 0xc(r12) -/* 802A7094 7D 89 03 A6 */ mtctr r12 -/* 802A7098 4E 80 04 21 */ bctrl -/* 802A709C 48 00 00 0C */ b lbl_802A70A8 -lbl_802A70A0: -/* 802A70A0 38 7F 00 08 */ addi r3, r31, 8 -/* 802A70A4 7C 7C 1A 14 */ add r3, r28, r3 -lbl_802A70A8: -/* 802A70A8 C0 03 00 04 */ lfs f0, 4(r3) -/* 802A70AC FC 00 F8 40 */ fcmpo cr0, f0, f31 -/* 802A70B0 41 81 00 40 */ bgt lbl_802A70F0 -/* 802A70B4 3B BD 00 01 */ addi r29, r29, 1 -/* 802A70B8 3B FF 00 20 */ addi r31, r31, 0x20 -lbl_802A70BC: -/* 802A70BC 28 1E 00 00 */ cmplwi r30, 0 -/* 802A70C0 41 82 00 20 */ beq lbl_802A70E0 -/* 802A70C4 7F C3 F3 78 */ mr r3, r30 -/* 802A70C8 7F 84 E3 78 */ mr r4, r28 -/* 802A70CC 81 9E 00 00 */ lwz r12, 0(r30) -/* 802A70D0 81 8C 00 10 */ lwz r12, 0x10(r12) -/* 802A70D4 7D 89 03 A6 */ mtctr r12 -/* 802A70D8 4E 80 04 21 */ bctrl -/* 802A70DC 48 00 00 08 */ b lbl_802A70E4 -lbl_802A70E0: -/* 802A70E0 A0 7C 00 00 */ lhz r3, 0(r28) -lbl_802A70E4: -/* 802A70E4 54 60 04 3E */ clrlwi r0, r3, 0x10 -/* 802A70E8 7C 1D 00 00 */ cmpw r29, r0 -/* 802A70EC 41 80 FF 8C */ blt lbl_802A7078 -lbl_802A70F0: -/* 802A70F0 7F A3 EB 78 */ mr r3, r29 -/* 802A70F4 E3 E1 00 28 */ psq_l f31, 40(r1), 0, 0 /* qr0 */ -/* 802A70F8 CB E1 00 20 */ lfd f31, 0x20(r1) -/* 802A70FC 39 61 00 20 */ addi r11, r1, 0x20 -/* 802A7100 48 0B B1 25 */ bl _restgpr_28 -/* 802A7104 80 01 00 34 */ lwz r0, 0x34(r1) -/* 802A7108 7C 08 03 A6 */ mtlr r0 -/* 802A710C 38 21 00 30 */ addi r1, r1, 0x30 -/* 802A7110 4E 80 00 20 */ blr diff --git a/asm/JSystem/JAudio2/JAUSoundAnimator/getStartSoundIndex__17JAUSoundAnimationCFf.s b/asm/JSystem/JAudio2/JAUSoundAnimator/getStartSoundIndex__17JAUSoundAnimationCFf.s deleted file mode 100644 index b9207449408..00000000000 --- a/asm/JSystem/JAudio2/JAUSoundAnimator/getStartSoundIndex__17JAUSoundAnimationCFf.s +++ /dev/null @@ -1,61 +0,0 @@ -lbl_802A6F70: -/* 802A6F70 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 802A6F74 7C 08 02 A6 */ mflr r0 -/* 802A6F78 90 01 00 34 */ stw r0, 0x34(r1) -/* 802A6F7C DB E1 00 20 */ stfd f31, 0x20(r1) -/* 802A6F80 F3 E1 00 28 */ psq_st f31, 40(r1), 0, 0 /* qr0 */ -/* 802A6F84 39 61 00 20 */ addi r11, r1, 0x20 -/* 802A6F88 48 0B B2 51 */ bl _savegpr_28 -/* 802A6F8C 7C 7C 1B 78 */ mr r28, r3 -/* 802A6F90 FF E0 08 90 */ fmr f31, f1 -/* 802A6F94 3B A0 00 00 */ li r29, 0 -/* 802A6F98 3B E0 00 00 */ li r31, 0 -/* 802A6F9C 83 C3 00 04 */ lwz r30, 4(r3) -/* 802A6FA0 48 00 00 4C */ b lbl_802A6FEC -lbl_802A6FA4: -/* 802A6FA4 28 1E 00 00 */ cmplwi r30, 0 -/* 802A6FA8 41 82 00 24 */ beq lbl_802A6FCC -/* 802A6FAC 7F C3 F3 78 */ mr r3, r30 -/* 802A6FB0 7F 84 E3 78 */ mr r4, r28 -/* 802A6FB4 7F A5 EB 78 */ mr r5, r29 -/* 802A6FB8 81 9E 00 00 */ lwz r12, 0(r30) -/* 802A6FBC 81 8C 00 0C */ lwz r12, 0xc(r12) -/* 802A6FC0 7D 89 03 A6 */ mtctr r12 -/* 802A6FC4 4E 80 04 21 */ bctrl -/* 802A6FC8 48 00 00 0C */ b lbl_802A6FD4 -lbl_802A6FCC: -/* 802A6FCC 38 7F 00 08 */ addi r3, r31, 8 -/* 802A6FD0 7C 7C 1A 14 */ add r3, r28, r3 -lbl_802A6FD4: -/* 802A6FD4 C0 03 00 04 */ lfs f0, 4(r3) -/* 802A6FD8 FC 00 F8 40 */ fcmpo cr0, f0, f31 -/* 802A6FDC 4C 41 13 82 */ cror 2, 1, 2 -/* 802A6FE0 41 82 00 40 */ beq lbl_802A7020 -/* 802A6FE4 3B BD 00 01 */ addi r29, r29, 1 -/* 802A6FE8 3B FF 00 20 */ addi r31, r31, 0x20 -lbl_802A6FEC: -/* 802A6FEC 28 1E 00 00 */ cmplwi r30, 0 -/* 802A6FF0 41 82 00 20 */ beq lbl_802A7010 -/* 802A6FF4 7F C3 F3 78 */ mr r3, r30 -/* 802A6FF8 7F 84 E3 78 */ mr r4, r28 -/* 802A6FFC 81 9E 00 00 */ lwz r12, 0(r30) -/* 802A7000 81 8C 00 10 */ lwz r12, 0x10(r12) -/* 802A7004 7D 89 03 A6 */ mtctr r12 -/* 802A7008 4E 80 04 21 */ bctrl -/* 802A700C 48 00 00 08 */ b lbl_802A7014 -lbl_802A7010: -/* 802A7010 A0 7C 00 00 */ lhz r3, 0(r28) -lbl_802A7014: -/* 802A7014 54 60 04 3E */ clrlwi r0, r3, 0x10 -/* 802A7018 7C 1D 00 00 */ cmpw r29, r0 -/* 802A701C 41 80 FF 88 */ blt lbl_802A6FA4 -lbl_802A7020: -/* 802A7020 7F A3 EB 78 */ mr r3, r29 -/* 802A7024 E3 E1 00 28 */ psq_l f31, 40(r1), 0, 0 /* qr0 */ -/* 802A7028 CB E1 00 20 */ lfd f31, 0x20(r1) -/* 802A702C 39 61 00 20 */ addi r11, r1, 0x20 -/* 802A7030 48 0B B1 F5 */ bl _restgpr_28 -/* 802A7034 80 01 00 34 */ lwz r0, 0x34(r1) -/* 802A7038 7C 08 03 A6 */ mtlr r0 -/* 802A703C 38 21 00 30 */ addi r1, r1, 0x30 -/* 802A7040 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundHandles/getLowPrioSound__14Z2SoundHandlesF10JAISoundID.s b/asm/Z2AudioLib/Z2SoundHandles/getLowPrioSound__14Z2SoundHandlesF10JAISoundID.s deleted file mode 100644 index 12d9bcdcc11..00000000000 --- a/asm/Z2AudioLib/Z2SoundHandles/getLowPrioSound__14Z2SoundHandlesF10JAISoundID.s +++ /dev/null @@ -1,59 +0,0 @@ -lbl_802AB3D0: -/* 802AB3D0 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 802AB3D4 7C 08 02 A6 */ mflr r0 -/* 802AB3D8 90 01 00 34 */ stw r0, 0x34(r1) -/* 802AB3DC 39 61 00 30 */ addi r11, r1, 0x30 -/* 802AB3E0 48 0B 6D F1 */ bl _savegpr_26 -/* 802AB3E4 7C 9A 23 78 */ mr r26, r4 -/* 802AB3E8 83 ED 85 DC */ lwz r31, __OSReport_disable-0x3C(r13) -/* 802AB3EC 3C 80 00 01 */ lis r4, 0x0001 /* 0x0000FFFF@ha */ -/* 802AB3F0 3B A4 FF FF */ addi r29, r4, 0xFFFF /* 0x0000FFFF@l */ -/* 802AB3F4 3B 80 00 00 */ li r28, 0 -/* 802AB3F8 83 63 00 00 */ lwz r27, 0(r3) -/* 802AB3FC 48 00 00 50 */ b lbl_802AB44C -lbl_802AB400: -/* 802AB400 83 DB 00 00 */ lwz r30, 0(r27) -/* 802AB404 80 7E 00 00 */ lwz r3, 0(r30) -/* 802AB408 28 03 00 00 */ cmplwi r3, 0 -/* 802AB40C 40 82 00 0C */ bne lbl_802AB418 -/* 802AB410 7F C3 F3 78 */ mr r3, r30 -/* 802AB414 48 00 00 74 */ b lbl_802AB488 -lbl_802AB418: -/* 802AB418 80 03 00 18 */ lwz r0, 0x18(r3) -/* 802AB41C 90 01 00 0C */ stw r0, 0xc(r1) -/* 802AB420 7F E3 FB 78 */ mr r3, r31 -/* 802AB424 38 81 00 0C */ addi r4, r1, 0xc -/* 802AB428 81 9F 00 00 */ lwz r12, 0(r31) -/* 802AB42C 81 8C 00 10 */ lwz r12, 0x10(r12) -/* 802AB430 7D 89 03 A6 */ mtctr r12 -/* 802AB434 4E 80 04 21 */ bctrl -/* 802AB438 7C 03 E8 40 */ cmplw r3, r29 -/* 802AB43C 40 80 00 0C */ bge lbl_802AB448 -/* 802AB440 7C 7D 1B 78 */ mr r29, r3 -/* 802AB444 7F DC F3 78 */ mr r28, r30 -lbl_802AB448: -/* 802AB448 83 7B 00 0C */ lwz r27, 0xc(r27) -lbl_802AB44C: -/* 802AB44C 28 1B 00 00 */ cmplwi r27, 0 -/* 802AB450 40 82 FF B0 */ bne lbl_802AB400 -/* 802AB454 80 1A 00 00 */ lwz r0, 0(r26) -/* 802AB458 90 01 00 08 */ stw r0, 8(r1) -/* 802AB45C 7F E3 FB 78 */ mr r3, r31 -/* 802AB460 38 81 00 08 */ addi r4, r1, 8 -/* 802AB464 81 9F 00 00 */ lwz r12, 0(r31) -/* 802AB468 81 8C 00 10 */ lwz r12, 0x10(r12) -/* 802AB46C 7D 89 03 A6 */ mtctr r12 -/* 802AB470 4E 80 04 21 */ bctrl -/* 802AB474 7C 03 E8 40 */ cmplw r3, r29 -/* 802AB478 41 80 00 0C */ blt lbl_802AB484 -/* 802AB47C 7F 83 E3 78 */ mr r3, r28 -/* 802AB480 48 00 00 08 */ b lbl_802AB488 -lbl_802AB484: -/* 802AB484 38 60 00 00 */ li r3, 0 -lbl_802AB488: -/* 802AB488 39 61 00 30 */ addi r11, r1, 0x30 -/* 802AB48C 48 0B 6D 91 */ bl _restgpr_26 -/* 802AB490 80 01 00 34 */ lwz r0, 0x34(r1) -/* 802AB494 7C 08 03 A6 */ mtlr r0 -/* 802AB498 38 21 00 30 */ addi r1, r1, 0x30 -/* 802AB49C 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/__ct__15Z2SoundObjAnimeFv.s b/asm/Z2AudioLib/Z2SoundObject/__ct__15Z2SoundObjAnimeFv.s deleted file mode 100644 index 16957807d26..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/__ct__15Z2SoundObjAnimeFv.s +++ /dev/null @@ -1,19 +0,0 @@ -lbl_802BEB94: -/* 802BEB94 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BEB98 7C 08 02 A6 */ mflr r0 -/* 802BEB9C 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BEBA0 93 E1 00 0C */ stw r31, 0xc(r1) -/* 802BEBA4 7C 7F 1B 78 */ mr r31, r3 -/* 802BEBA8 4B FF F3 49 */ bl __ct__14Z2SoundObjBaseFv -/* 802BEBAC 3C 60 80 3D */ lis r3, __vt__15Z2SoundObjAnime@ha /* 0x803CACD0@ha */ -/* 802BEBB0 38 03 AC D0 */ addi r0, r3, __vt__15Z2SoundObjAnime@l /* 0x803CACD0@l */ -/* 802BEBB4 90 1F 00 10 */ stw r0, 0x10(r31) -/* 802BEBB8 38 00 00 00 */ li r0, 0 -/* 802BEBBC 90 1F 00 20 */ stw r0, 0x20(r31) -/* 802BEBC0 98 1F 00 44 */ stb r0, 0x44(r31) -/* 802BEBC4 7F E3 FB 78 */ mr r3, r31 -/* 802BEBC8 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 802BEBCC 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BEBD0 7C 08 03 A6 */ mtlr r0 -/* 802BEBD4 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BEBD8 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/__ct__15Z2SoundObjArrowFv.s b/asm/Z2AudioLib/Z2SoundObject/__ct__15Z2SoundObjArrowFv.s deleted file mode 100644 index 1392362fd4f..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/__ct__15Z2SoundObjArrowFv.s +++ /dev/null @@ -1,16 +0,0 @@ -lbl_802BEB38: -/* 802BEB38 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BEB3C 7C 08 02 A6 */ mflr r0 -/* 802BEB40 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BEB44 93 E1 00 0C */ stw r31, 0xc(r1) -/* 802BEB48 7C 7F 1B 78 */ mr r31, r3 -/* 802BEB4C 4B FF FA 55 */ bl __ct__21Z2DopplerSoundObjBaseFv -/* 802BEB50 3C 60 80 3D */ lis r3, __vt__15Z2SoundObjArrow@ha /* 0x803CACF0@ha */ -/* 802BEB54 38 03 AC F0 */ addi r0, r3, __vt__15Z2SoundObjArrow@l /* 0x803CACF0@l */ -/* 802BEB58 90 1F 00 10 */ stw r0, 0x10(r31) -/* 802BEB5C 7F E3 FB 78 */ mr r3, r31 -/* 802BEB60 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 802BEB64 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BEB68 7C 08 03 A6 */ mtlr r0 -/* 802BEB6C 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BEB70 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/__ct__16Z2SoundObjSimpleFv.s b/asm/Z2AudioLib/Z2SoundObject/__ct__16Z2SoundObjSimpleFv.s deleted file mode 100644 index f8a29c47729..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/__ct__16Z2SoundObjSimpleFv.s +++ /dev/null @@ -1,16 +0,0 @@ -lbl_802BE844: -/* 802BE844 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BE848 7C 08 02 A6 */ mflr r0 -/* 802BE84C 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BE850 93 E1 00 0C */ stw r31, 0xc(r1) -/* 802BE854 7C 7F 1B 78 */ mr r31, r3 -/* 802BE858 4B FF F6 99 */ bl __ct__14Z2SoundObjBaseFv -/* 802BE85C 3C 60 80 3D */ lis r3, __vt__16Z2SoundObjSimple@ha /* 0x803CAD10@ha */ -/* 802BE860 38 03 AD 10 */ addi r0, r3, __vt__16Z2SoundObjSimple@l /* 0x803CAD10@l */ -/* 802BE864 90 1F 00 10 */ stw r0, 0x10(r31) -/* 802BE868 7F E3 FB 78 */ mr r3, r31 -/* 802BE86C 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 802BE870 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BE874 7C 08 03 A6 */ mtlr r0 -/* 802BE878 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BE87C 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/__ct__21Z2DopplerSoundObjBaseFv.s b/asm/Z2AudioLib/Z2SoundObject/__ct__21Z2DopplerSoundObjBaseFv.s deleted file mode 100644 index 4f4546b3ac2..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/__ct__21Z2DopplerSoundObjBaseFv.s +++ /dev/null @@ -1,24 +0,0 @@ -lbl_802BE5A0: -/* 802BE5A0 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BE5A4 7C 08 02 A6 */ mflr r0 -/* 802BE5A8 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BE5AC 93 E1 00 0C */ stw r31, 0xc(r1) -/* 802BE5B0 7C 7F 1B 78 */ mr r31, r3 -/* 802BE5B4 4B FF F9 3D */ bl __ct__14Z2SoundObjBaseFv -/* 802BE5B8 3C 60 80 3D */ lis r3, __vt__21Z2DopplerSoundObjBase@ha /* 0x803CAD30@ha */ -/* 802BE5BC 38 03 AD 30 */ addi r0, r3, __vt__21Z2DopplerSoundObjBase@l /* 0x803CAD30@l */ -/* 802BE5C0 90 1F 00 10 */ stw r0, 0x10(r31) -/* 802BE5C4 3C 60 80 3A */ lis r3, cNullVec__6Z2Calc@ha /* 0x8039C230@ha */ -/* 802BE5C8 38 63 C2 30 */ addi r3, r3, cNullVec__6Z2Calc@l /* 0x8039C230@l */ -/* 802BE5CC E0 23 00 00 */ psq_l f1, 0(r3), 0, 0 /* qr0 */ -/* 802BE5D0 C0 03 00 08 */ lfs f0, 8(r3) -/* 802BE5D4 F0 3F 00 20 */ psq_st f1, 32(r31), 0, 0 /* qr0 */ -/* 802BE5D8 D0 1F 00 28 */ stfs f0, 0x28(r31) -/* 802BE5DC F0 3F 00 2C */ psq_st f1, 44(r31), 0, 0 /* qr0 */ -/* 802BE5E0 D0 1F 00 34 */ stfs f0, 0x34(r31) -/* 802BE5E4 7F E3 FB 78 */ mr r3, r31 -/* 802BE5E8 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 802BE5EC 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BE5F0 7C 08 03 A6 */ mtlr r0 -/* 802BE5F4 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BE5F8 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/__dt__21Z2DopplerSoundObjBaseFv.s b/asm/Z2AudioLib/Z2SoundObject/__dt__21Z2DopplerSoundObjBaseFv.s deleted file mode 100644 index 50a21a59fac..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/__dt__21Z2DopplerSoundObjBaseFv.s +++ /dev/null @@ -1,26 +0,0 @@ -lbl_802BE5FC: -/* 802BE5FC 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BE600 7C 08 02 A6 */ mflr r0 -/* 802BE604 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BE608 93 E1 00 0C */ stw r31, 0xc(r1) -/* 802BE60C 93 C1 00 08 */ stw r30, 8(r1) -/* 802BE610 7C 7E 1B 79 */ or. r30, r3, r3 -/* 802BE614 7C 9F 23 78 */ mr r31, r4 -/* 802BE618 41 82 00 28 */ beq lbl_802BE640 -/* 802BE61C 3C 80 80 3D */ lis r4, __vt__21Z2DopplerSoundObjBase@ha /* 0x803CAD30@ha */ -/* 802BE620 38 04 AD 30 */ addi r0, r4, __vt__21Z2DopplerSoundObjBase@l /* 0x803CAD30@l */ -/* 802BE624 90 1E 00 10 */ stw r0, 0x10(r30) -/* 802BE628 38 80 00 00 */ li r4, 0 -/* 802BE62C 4B FF F9 1D */ bl __dt__14Z2SoundObjBaseFv -/* 802BE630 7F E0 07 35 */ extsh. r0, r31 -/* 802BE634 40 81 00 0C */ ble lbl_802BE640 -/* 802BE638 7F C3 F3 78 */ mr r3, r30 -/* 802BE63C 48 01 07 01 */ bl __dl__FPv -lbl_802BE640: -/* 802BE640 7F C3 F3 78 */ mr r3, r30 -/* 802BE644 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 802BE648 83 C1 00 08 */ lwz r30, 8(r1) -/* 802BE64C 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BE650 7C 08 03 A6 */ mtlr r0 -/* 802BE654 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BE658 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/ageSounds___15Z2SoundObjAnimeFv.s b/asm/Z2AudioLib/Z2SoundObject/ageSounds___15Z2SoundObjAnimeFv.s deleted file mode 100644 index 93ae5f3d9c3..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/ageSounds___15Z2SoundObjAnimeFv.s +++ /dev/null @@ -1,105 +0,0 @@ -lbl_802BED68: -/* 802BED68 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BED6C 7C 08 02 A6 */ mflr r0 -/* 802BED70 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BED74 93 E1 00 0C */ stw r31, 0xc(r1) -/* 802BED78 93 C1 00 08 */ stw r30, 8(r1) -/* 802BED7C 7C 7F 1B 78 */ mr r31, r3 -/* 802BED80 3B C0 00 00 */ li r30, 0 -/* 802BED84 48 00 01 2C */ b lbl_802BEEB0 -lbl_802BED88: -/* 802BED88 7F E3 FB 78 */ mr r3, r31 -/* 802BED8C 7F C4 F3 78 */ mr r4, r30 -/* 802BED90 48 01 D4 7D */ bl getNthLink__10JSUPtrListCFUl -/* 802BED94 28 03 00 00 */ cmplwi r3, 0 -/* 802BED98 41 82 00 08 */ beq lbl_802BEDA0 -/* 802BED9C 38 63 FF FC */ addi r3, r3, -4 -lbl_802BEDA0: -/* 802BEDA0 80 03 00 00 */ lwz r0, 0(r3) -/* 802BEDA4 28 00 00 00 */ cmplwi r0, 0 -/* 802BEDA8 41 82 01 04 */ beq lbl_802BEEAC -/* 802BEDAC 7F E3 FB 78 */ mr r3, r31 -/* 802BEDB0 7F C4 F3 78 */ mr r4, r30 -/* 802BEDB4 48 01 D4 59 */ bl getNthLink__10JSUPtrListCFUl -/* 802BEDB8 28 03 00 00 */ cmplwi r3, 0 -/* 802BEDBC 41 82 00 08 */ beq lbl_802BEDC4 -/* 802BEDC0 38 63 FF FC */ addi r3, r3, -4 -lbl_802BEDC4: -/* 802BEDC4 80 63 00 00 */ lwz r3, 0(r3) -/* 802BEDC8 88 03 00 1F */ lbz r0, 0x1f(r3) -/* 802BEDCC 54 00 E7 BE */ rlwinm r0, r0, 0x1c, 0x1e, 0x1f -/* 802BEDD0 2C 00 00 01 */ cmpwi r0, 1 -/* 802BEDD4 41 82 00 10 */ beq lbl_802BEDE4 -/* 802BEDD8 40 80 00 D4 */ bge lbl_802BEEAC -/* 802BEDDC 48 00 00 D0 */ b lbl_802BEEAC -/* 802BEDE0 48 00 00 CC */ b lbl_802BEEAC -lbl_802BEDE4: -/* 802BEDE4 7F E3 FB 78 */ mr r3, r31 -/* 802BEDE8 7F C4 F3 78 */ mr r4, r30 -/* 802BEDEC 48 01 D4 21 */ bl getNthLink__10JSUPtrListCFUl -/* 802BEDF0 28 03 00 00 */ cmplwi r3, 0 -/* 802BEDF4 41 82 00 08 */ beq lbl_802BEDFC -/* 802BEDF8 38 63 FF FC */ addi r3, r3, -4 -lbl_802BEDFC: -/* 802BEDFC 80 63 00 00 */ lwz r3, 0(r3) -/* 802BEE00 88 03 00 1D */ lbz r0, 0x1d(r3) -/* 802BEE04 54 00 D7 FF */ rlwinm. r0, r0, 0x1a, 0x1f, 0x1f -/* 802BEE08 41 82 00 28 */ beq lbl_802BEE30 -/* 802BEE0C 7F E3 FB 78 */ mr r3, r31 -/* 802BEE10 7F C4 F3 78 */ mr r4, r30 -/* 802BEE14 48 01 D3 F9 */ bl getNthLink__10JSUPtrListCFUl -/* 802BEE18 28 03 00 00 */ cmplwi r3, 0 -/* 802BEE1C 41 82 00 08 */ beq lbl_802BEE24 -/* 802BEE20 38 63 FF FC */ addi r3, r3, -4 -lbl_802BEE24: -/* 802BEE24 80 63 00 00 */ lwz r3, 0(r3) -/* 802BEE28 4B FE 37 71 */ bl stop__8JAISoundFv -/* 802BEE2C 48 00 00 80 */ b lbl_802BEEAC -lbl_802BEE30: -/* 802BEE30 7F E3 FB 78 */ mr r3, r31 -/* 802BEE34 7F C4 F3 78 */ mr r4, r30 -/* 802BEE38 48 01 D3 D5 */ bl getNthLink__10JSUPtrListCFUl -/* 802BEE3C 28 03 00 00 */ cmplwi r3, 0 -/* 802BEE40 41 82 00 08 */ beq lbl_802BEE48 -/* 802BEE44 38 63 FF FC */ addi r3, r3, -4 -lbl_802BEE48: -/* 802BEE48 80 63 00 00 */ lwz r3, 0(r3) -/* 802BEE4C 80 63 00 20 */ lwz r3, 0x20(r3) -/* 802BEE50 80 03 00 10 */ lwz r0, 0x10(r3) -/* 802BEE54 54 00 07 7B */ rlwinm. r0, r0, 0, 0x1d, 0x1d -/* 802BEE58 41 82 00 28 */ beq lbl_802BEE80 -/* 802BEE5C 7F E3 FB 78 */ mr r3, r31 -/* 802BEE60 7F C4 F3 78 */ mr r4, r30 -/* 802BEE64 48 01 D3 A9 */ bl getNthLink__10JSUPtrListCFUl -/* 802BEE68 28 03 00 00 */ cmplwi r3, 0 -/* 802BEE6C 41 82 00 08 */ beq lbl_802BEE74 -/* 802BEE70 38 63 FF FC */ addi r3, r3, -4 -lbl_802BEE74: -/* 802BEE74 80 63 00 00 */ lwz r3, 0(r3) -/* 802BEE78 4B FE 37 21 */ bl stop__8JAISoundFv -/* 802BEE7C 48 00 00 30 */ b lbl_802BEEAC -lbl_802BEE80: -/* 802BEE80 7F E3 FB 78 */ mr r3, r31 -/* 802BEE84 7F C4 F3 78 */ mr r4, r30 -/* 802BEE88 48 01 D3 85 */ bl getNthLink__10JSUPtrListCFUl -/* 802BEE8C 28 03 00 00 */ cmplwi r3, 0 -/* 802BEE90 41 82 00 08 */ beq lbl_802BEE98 -/* 802BEE94 38 63 FF FC */ addi r3, r3, -4 -lbl_802BEE98: -/* 802BEE98 80 83 00 00 */ lwz r4, 0(r3) -/* 802BEE9C 38 60 00 02 */ li r3, 2 -/* 802BEEA0 88 04 00 1F */ lbz r0, 0x1f(r4) -/* 802BEEA4 50 60 26 B6 */ rlwimi r0, r3, 4, 0x1a, 0x1b -/* 802BEEA8 98 04 00 1F */ stb r0, 0x1f(r4) -lbl_802BEEAC: -/* 802BEEAC 3B DE 00 01 */ addi r30, r30, 1 -lbl_802BEEB0: -/* 802BEEB0 80 1F 00 08 */ lwz r0, 8(r31) -/* 802BEEB4 7C 1E 00 00 */ cmpw r30, r0 -/* 802BEEB8 41 80 FE D0 */ blt lbl_802BED88 -/* 802BEEBC 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 802BEEC0 83 C1 00 08 */ lwz r30, 8(r1) -/* 802BEEC4 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BEEC8 7C 08 03 A6 */ mtlr r0 -/* 802BEECC 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BEED0 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/deleteObject__14Z2SoundObjBaseFv.s b/asm/Z2AudioLib/Z2SoundObject/deleteObject__14Z2SoundObjBaseFv.s deleted file mode 100644 index 322c5a6e2e5..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/deleteObject__14Z2SoundObjBaseFv.s +++ /dev/null @@ -1,17 +0,0 @@ -lbl_802BDFF8: -/* 802BDFF8 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BDFFC 7C 08 02 A6 */ mflr r0 -/* 802BE000 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BE004 93 E1 00 0C */ stw r31, 0xc(r1) -/* 802BE008 7C 7F 1B 78 */ mr r31, r3 -/* 802BE00C 81 83 00 10 */ lwz r12, 0x10(r3) -/* 802BE010 81 8C 00 0C */ lwz r12, 0xc(r12) -/* 802BE014 7D 89 03 A6 */ mtctr r12 -/* 802BE018 4E 80 04 21 */ bctrl -/* 802BE01C 7F E3 FB 78 */ mr r3, r31 -/* 802BE020 4B FE D1 01 */ bl deleteHandlesPool__14Z2SoundHandlesFv -/* 802BE024 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 802BE028 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BE02C 7C 08 03 A6 */ mtlr r0 -/* 802BE030 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BE034 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/dispose__14Z2SoundObjBaseFv.s b/asm/Z2AudioLib/Z2SoundObject/dispose__14Z2SoundObjBaseFv.s deleted file mode 100644 index ddbb352027a..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/dispose__14Z2SoundObjBaseFv.s +++ /dev/null @@ -1,42 +0,0 @@ -lbl_802BE070: -/* 802BE070 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 802BE074 7C 08 02 A6 */ mflr r0 -/* 802BE078 90 01 00 24 */ stw r0, 0x24(r1) -/* 802BE07C 39 61 00 20 */ addi r11, r1, 0x20 -/* 802BE080 48 0A 41 5D */ bl _savegpr_29 -/* 802BE084 7C 7D 1B 78 */ mr r29, r3 -/* 802BE088 83 C3 00 00 */ lwz r30, 0(r3) -/* 802BE08C 48 00 00 50 */ b lbl_802BE0DC -lbl_802BE090: -/* 802BE090 83 FE 00 00 */ lwz r31, 0(r30) -/* 802BE094 28 1F 00 00 */ cmplwi r31, 0 -/* 802BE098 41 82 00 40 */ beq lbl_802BE0D8 -/* 802BE09C 80 7F 00 00 */ lwz r3, 0(r31) -/* 802BE0A0 28 03 00 00 */ cmplwi r3, 0 -/* 802BE0A4 41 82 00 34 */ beq lbl_802BE0D8 -/* 802BE0A8 80 03 00 18 */ lwz r0, 0x18(r3) -/* 802BE0AC 90 01 00 08 */ stw r0, 8(r1) -/* 802BE0B0 80 6D 85 CC */ lwz r3, __OSReport_disable-0x4C(r13) -/* 802BE0B4 38 81 00 08 */ addi r4, r1, 8 -/* 802BE0B8 4B FF DA 11 */ bl getSwBit__11Z2SoundInfoCF10JAISoundID -/* 802BE0BC 54 60 04 21 */ rlwinm. r0, r3, 0, 0x10, 0x10 -/* 802BE0C0 41 82 00 10 */ beq lbl_802BE0D0 -/* 802BE0C4 7F E3 FB 78 */ mr r3, r31 -/* 802BE0C8 4B FE 40 BD */ bl releaseSound__14JAISoundHandleFv -/* 802BE0CC 48 00 00 0C */ b lbl_802BE0D8 -lbl_802BE0D0: -/* 802BE0D0 80 7F 00 00 */ lwz r3, 0(r31) -/* 802BE0D4 4B FE 44 C5 */ bl stop__8JAISoundFv -lbl_802BE0D8: -/* 802BE0D8 83 DE 00 0C */ lwz r30, 0xc(r30) -lbl_802BE0DC: -/* 802BE0DC 28 1E 00 00 */ cmplwi r30, 0 -/* 802BE0E0 40 82 FF B0 */ bne lbl_802BE090 -/* 802BE0E4 38 00 00 00 */ li r0, 0 -/* 802BE0E8 98 1D 00 1F */ stb r0, 0x1f(r29) -/* 802BE0EC 39 61 00 20 */ addi r11, r1, 0x20 -/* 802BE0F0 48 0A 41 39 */ bl _restgpr_29 -/* 802BE0F4 80 01 00 24 */ lwz r0, 0x24(r1) -/* 802BE0F8 7C 08 03 A6 */ mtlr r0 -/* 802BE0FC 38 21 00 20 */ addi r1, r1, 0x20 -/* 802BE100 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/framework__21Z2DopplerSoundObjBaseFUlSc.s b/asm/Z2AudioLib/Z2SoundObject/framework__21Z2DopplerSoundObjBaseFUlSc.s deleted file mode 100644 index 55b0950870d..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/framework__21Z2DopplerSoundObjBaseFUlSc.s +++ /dev/null @@ -1,25 +0,0 @@ -lbl_802BE6B8: -/* 802BE6B8 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BE6BC 7C 08 02 A6 */ mflr r0 -/* 802BE6C0 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BE6C4 93 E1 00 0C */ stw r31, 0xc(r1) -/* 802BE6C8 7C 7F 1B 78 */ mr r31, r3 -/* 802BE6CC 4B FF F9 6D */ bl framework__14Z2SoundObjBaseFUlSc -/* 802BE6D0 80 1F 00 18 */ lwz r0, 0x18(r31) -/* 802BE6D4 28 00 00 00 */ cmplwi r0, 0 -/* 802BE6D8 41 82 00 28 */ beq lbl_802BE700 -/* 802BE6DC E0 3F 00 2C */ psq_l f1, 44(r31), 0, 0 /* qr0 */ -/* 802BE6E0 C0 1F 00 34 */ lfs f0, 0x34(r31) -/* 802BE6E4 F0 3F 00 20 */ psq_st f1, 32(r31), 0, 0 /* qr0 */ -/* 802BE6E8 D0 1F 00 28 */ stfs f0, 0x28(r31) -/* 802BE6EC 80 7F 00 18 */ lwz r3, 0x18(r31) -/* 802BE6F0 E0 23 00 00 */ psq_l f1, 0(r3), 0, 0 /* qr0 */ -/* 802BE6F4 C0 03 00 08 */ lfs f0, 8(r3) -/* 802BE6F8 F0 3F 00 2C */ psq_st f1, 44(r31), 0, 0 /* qr0 */ -/* 802BE6FC D0 1F 00 34 */ stfs f0, 0x34(r31) -lbl_802BE700: -/* 802BE700 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 802BE704 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BE708 7C 08 03 A6 */ mtlr r0 -/* 802BE70C 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BE710 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/func_802BF660.s b/asm/Z2AudioLib/Z2SoundObject/func_802BF660.s deleted file mode 100644 index 678f836cf8e..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/func_802BF660.s +++ /dev/null @@ -1,149 +0,0 @@ -lbl_802BF660: -/* 802BF660 94 21 FF A0 */ stwu r1, -0x60(r1) -/* 802BF664 7C 08 02 A6 */ mflr r0 -/* 802BF668 90 01 00 64 */ stw r0, 0x64(r1) -/* 802BF66C DB E1 00 50 */ stfd f31, 0x50(r1) -/* 802BF670 F3 E1 00 58 */ psq_st f31, 88(r1), 0, 0 /* qr0 */ -/* 802BF674 39 61 00 50 */ addi r11, r1, 0x50 -/* 802BF678 48 0A 2B 4D */ bl _savegpr_23 -/* 802BF67C 7C 78 1B 78 */ mr r24, r3 -/* 802BF680 7C 99 23 78 */ mr r25, r4 -/* 802BF684 FF E0 08 90 */ fmr f31, f1 -/* 802BF688 7C BA 2B 78 */ mr r26, r5 -/* 802BF68C 7C DB 33 78 */ mr r27, r6 -/* 802BF690 7C FC 3B 78 */ mr r28, r7 -/* 802BF694 80 A3 00 40 */ lwz r5, 0x40(r3) -/* 802BF698 80 83 00 20 */ lwz r4, 0x20(r3) -/* 802BF69C 80 64 00 04 */ lwz r3, 4(r4) -/* 802BF6A0 28 03 00 00 */ cmplwi r3, 0 -/* 802BF6A4 41 82 00 18 */ beq lbl_802BF6BC -/* 802BF6A8 81 83 00 00 */ lwz r12, 0(r3) -/* 802BF6AC 81 8C 00 0C */ lwz r12, 0xc(r12) -/* 802BF6B0 7D 89 03 A6 */ mtctr r12 -/* 802BF6B4 4E 80 04 21 */ bctrl -/* 802BF6B8 48 00 00 10 */ b lbl_802BF6C8 -lbl_802BF6BC: -/* 802BF6BC 54 A3 28 34 */ slwi r3, r5, 5 -/* 802BF6C0 38 63 00 08 */ addi r3, r3, 8 -/* 802BF6C4 7C 64 1A 14 */ add r3, r4, r3 -lbl_802BF6C8: -/* 802BF6C8 7C 7F 1B 78 */ mr r31, r3 -/* 802BF6CC 7C 7E 1B 78 */ mr r30, r3 -/* 802BF6D0 88 18 00 44 */ lbz r0, 0x44(r24) -/* 802BF6D4 28 00 00 00 */ cmplwi r0, 0 -/* 802BF6D8 41 82 00 14 */ beq lbl_802BF6EC -/* 802BF6DC 80 78 00 40 */ lwz r3, 0x40(r24) -/* 802BF6E0 38 03 FF FF */ addi r0, r3, -1 -/* 802BF6E4 90 18 00 40 */ stw r0, 0x40(r24) -/* 802BF6E8 48 00 00 10 */ b lbl_802BF6F8 -lbl_802BF6EC: -/* 802BF6EC 80 78 00 40 */ lwz r3, 0x40(r24) -/* 802BF6F0 38 03 00 01 */ addi r0, r3, 1 -/* 802BF6F4 90 18 00 40 */ stw r0, 0x40(r24) -lbl_802BF6F8: -/* 802BF6F8 88 7F 00 1A */ lbz r3, 0x1a(r31) -/* 802BF6FC 7C 60 07 75 */ extsb. r0, r3 -/* 802BF700 40 81 00 08 */ ble lbl_802BF708 -/* 802BF704 7C 7B 07 74 */ extsb r27, r3 -lbl_802BF708: -/* 802BF708 7F 03 C3 78 */ mr r3, r24 -/* 802BF70C 7F E4 FB 78 */ mr r4, r31 -/* 802BF710 7F 25 CB 78 */ mr r5, r25 -/* 802BF714 FC 20 F8 90 */ fmr f1, f31 -/* 802BF718 48 00 01 81 */ bl func_802BF898 -/* 802BF71C 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 802BF720 41 82 01 50 */ beq lbl_802BF870 -/* 802BF724 7F 03 C3 78 */ mr r3, r24 -/* 802BF728 7F E4 FB 78 */ mr r4, r31 -/* 802BF72C 7F 25 CB 78 */ mr r5, r25 -/* 802BF730 FC 20 F8 90 */ fmr f1, f31 -/* 802BF734 48 00 01 5D */ bl func_802BF890 -/* 802BF738 7C 77 1B 78 */ mr r23, r3 -/* 802BF73C 92 E1 00 0C */ stw r23, 0xc(r1) -/* 802BF740 80 6D 86 08 */ lwz r3, __OSReport_disable-0x10(r13) -/* 802BF744 38 81 00 0C */ addi r4, r1, 0xc -/* 802BF748 4B FE EE 69 */ bl isSoundCulling__7Z2SeMgrF10JAISoundID -/* 802BF74C 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 802BF750 40 82 01 20 */ bne lbl_802BF870 -/* 802BF754 7F 03 C3 78 */ mr r3, r24 -/* 802BF758 7F C4 F3 78 */ mr r4, r30 -/* 802BF75C 4B FE BB 45 */ bl getHandleUserData__14Z2SoundHandlesFUl -/* 802BF760 7C 7D 1B 79 */ or. r29, r3, r3 -/* 802BF764 41 82 00 24 */ beq lbl_802BF788 -/* 802BF768 80 7D 00 00 */ lwz r3, 0(r29) -/* 802BF76C 28 03 00 00 */ cmplwi r3, 0 -/* 802BF770 41 82 00 18 */ beq lbl_802BF788 -/* 802BF774 88 03 00 1F */ lbz r0, 0x1f(r3) -/* 802BF778 54 00 E7 BE */ rlwinm r0, r0, 0x1c, 0x1e, 0x1f -/* 802BF77C 28 00 00 01 */ cmplwi r0, 1 -/* 802BF780 41 82 00 08 */ beq lbl_802BF788 -/* 802BF784 3B A0 00 00 */ li r29, 0 -lbl_802BF788: -/* 802BF788 28 1D 00 00 */ cmplwi r29, 0 -/* 802BF78C 40 82 00 10 */ bne lbl_802BF79C -/* 802BF790 7F 03 C3 78 */ mr r3, r24 -/* 802BF794 4B FE BB 45 */ bl getFreeHandle__14Z2SoundHandlesFv -/* 802BF798 7C 7D 1B 78 */ mr r29, r3 -lbl_802BF79C: -/* 802BF79C 28 1D 00 00 */ cmplwi r29, 0 -/* 802BF7A0 41 82 00 D0 */ beq lbl_802BF870 -/* 802BF7A4 92 E1 00 08 */ stw r23, 8(r1) -/* 802BF7A8 7F 43 D3 78 */ mr r3, r26 -/* 802BF7AC 38 81 00 08 */ addi r4, r1, 8 -/* 802BF7B0 7F A5 EB 78 */ mr r5, r29 -/* 802BF7B4 7F 26 CB 78 */ mr r6, r25 -/* 802BF7B8 7F 67 DB 78 */ mr r7, r27 -/* 802BF7BC 7F 80 07 74 */ extsb r0, r28 -/* 802BF7C0 C8 22 C1 48 */ lfd f1, lit_3564(r2) -/* 802BF7C4 6C 00 80 00 */ xoris r0, r0, 0x8000 -/* 802BF7C8 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BF7CC 3D 00 43 30 */ lis r8, 0x4330 -/* 802BF7D0 91 01 00 10 */ stw r8, 0x10(r1) -/* 802BF7D4 C8 01 00 10 */ lfd f0, 0x10(r1) -/* 802BF7D8 EC 00 08 28 */ fsubs f0, f0, f1 -/* 802BF7DC C0 82 C1 38 */ lfs f4, lit_3559(r2) -/* 802BF7E0 EC 20 20 24 */ fdivs f1, f0, f4 -/* 802BF7E4 C0 5F 00 0C */ lfs f2, 0xc(r31) -/* 802BF7E8 88 1F 00 14 */ lbz r0, 0x14(r31) -/* 802BF7EC C8 62 C1 68 */ lfd f3, lit_3828(r2) -/* 802BF7F0 90 01 00 1C */ stw r0, 0x1c(r1) -/* 802BF7F4 91 01 00 18 */ stw r8, 0x18(r1) -/* 802BF7F8 C8 01 00 18 */ lfd f0, 0x18(r1) -/* 802BF7FC EC 00 18 28 */ fsubs f0, f0, f3 -/* 802BF800 EC 60 20 24 */ fdivs f3, f0, f4 -/* 802BF804 C0 82 C1 40 */ lfs f4, lit_3561(r2) -/* 802BF808 FC A0 20 90 */ fmr f5, f4 -/* 802BF80C 39 00 00 00 */ li r8, 0 -/* 802BF810 81 9A 00 00 */ lwz r12, 0(r26) -/* 802BF814 81 8C 00 10 */ lwz r12, 0x10(r12) -/* 802BF818 7D 89 03 A6 */ mtctr r12 -/* 802BF81C 4E 80 04 21 */ bctrl -/* 802BF820 80 9D 00 00 */ lwz r4, 0(r29) -/* 802BF824 28 04 00 00 */ cmplwi r4, 0 -/* 802BF828 41 82 00 48 */ beq lbl_802BF870 -/* 802BF82C 38 60 00 01 */ li r3, 1 -/* 802BF830 88 04 00 1F */ lbz r0, 0x1f(r4) -/* 802BF834 50 60 26 B6 */ rlwimi r0, r3, 4, 0x1a, 0x1b -/* 802BF838 98 04 00 1F */ stb r0, 0x1f(r4) -/* 802BF83C 80 9D 00 00 */ lwz r4, 0(r29) -/* 802BF840 93 C4 00 20 */ stw r30, 0x20(r4) -/* 802BF844 80 1F 00 10 */ lwz r0, 0x10(r31) -/* 802BF848 54 00 06 73 */ rlwinm. r0, r0, 0, 0x19, 0x19 -/* 802BF84C 41 82 00 24 */ beq lbl_802BF870 -/* 802BF850 80 9D 00 00 */ lwz r4, 0(r29) -/* 802BF854 90 64 00 10 */ stw r3, 0x10(r4) -/* 802BF858 88 04 00 1D */ lbz r0, 0x1d(r4) -/* 802BF85C 50 60 3E 30 */ rlwimi r0, r3, 7, 0x18, 0x18 -/* 802BF860 98 04 00 1D */ stb r0, 0x1d(r4) -/* 802BF864 88 04 00 1D */ lbz r0, 0x1d(r4) -/* 802BF868 50 60 36 72 */ rlwimi r0, r3, 6, 0x19, 0x19 -/* 802BF86C 98 04 00 1D */ stb r0, 0x1d(r4) -lbl_802BF870: -/* 802BF870 E3 E1 00 58 */ psq_l f31, 88(r1), 0, 0 /* qr0 */ -/* 802BF874 CB E1 00 50 */ lfd f31, 0x50(r1) -/* 802BF878 39 61 00 50 */ addi r11, r1, 0x50 -/* 802BF87C 48 0A 29 95 */ bl _restgpr_23 -/* 802BF880 80 01 00 64 */ lwz r0, 0x64(r1) -/* 802BF884 7C 08 03 A6 */ mtlr r0 -/* 802BF888 38 21 00 60 */ addi r1, r1, 0x60 -/* 802BF88C 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/func_802BF890.s b/asm/Z2AudioLib/Z2SoundObject/func_802BF890.s deleted file mode 100644 index 60468df522b..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/func_802BF890.s +++ /dev/null @@ -1,3 +0,0 @@ -lbl_802BF890: -/* 802BF890 80 64 00 00 */ lwz r3, 0(r4) -/* 802BF894 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/func_802BF898.s b/asm/Z2AudioLib/Z2SoundObject/func_802BF898.s deleted file mode 100644 index 8376f46f7ee..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/func_802BF898.s +++ /dev/null @@ -1,39 +0,0 @@ -lbl_802BF898: -/* 802BF898 80 E4 00 10 */ lwz r7, 0x10(r4) -/* 802BF89C 54 E0 07 39 */ rlwinm. r0, r7, 0, 0x1c, 0x1c -/* 802BF8A0 41 82 00 1C */ beq lbl_802BF8BC -/* 802BF8A4 80 A3 00 3C */ lwz r5, 0x3c(r3) -/* 802BF8A8 88 04 00 16 */ lbz r0, 0x16(r4) -/* 802BF8AC 7C 05 00 00 */ cmpw r5, r0 -/* 802BF8B0 41 82 00 3C */ beq lbl_802BF8EC -/* 802BF8B4 38 60 00 00 */ li r3, 0 -/* 802BF8B8 4E 80 00 20 */ blr -lbl_802BF8BC: -/* 802BF8BC 54 E0 06 31 */ rlwinm. r0, r7, 0, 0x18, 0x18 -/* 802BF8C0 41 82 00 2C */ beq lbl_802BF8EC -/* 802BF8C4 88 C4 00 16 */ lbz r6, 0x16(r4) -/* 802BF8C8 80 A3 00 3C */ lwz r5, 0x3c(r3) -/* 802BF8CC 88 84 00 19 */ lbz r4, 0x19(r4) -/* 802BF8D0 7C 05 23 D6 */ divw r0, r5, r4 -/* 802BF8D4 7C 00 21 D6 */ mullw r0, r0, r4 -/* 802BF8D8 7C 00 28 50 */ subf r0, r0, r5 -/* 802BF8DC 7C 06 00 00 */ cmpw r6, r0 -/* 802BF8E0 41 82 00 0C */ beq lbl_802BF8EC -/* 802BF8E4 38 60 00 00 */ li r3, 0 -/* 802BF8E8 4E 80 00 20 */ blr -lbl_802BF8EC: -/* 802BF8EC 88 03 00 44 */ lbz r0, 0x44(r3) -/* 802BF8F0 28 00 00 00 */ cmplwi r0, 0 -/* 802BF8F4 41 82 00 14 */ beq lbl_802BF908 -/* 802BF8F8 54 E0 07 FF */ clrlwi. r0, r7, 0x1f -/* 802BF8FC 41 82 00 1C */ beq lbl_802BF918 -/* 802BF900 38 60 00 00 */ li r3, 0 -/* 802BF904 4E 80 00 20 */ blr -lbl_802BF908: -/* 802BF908 54 E0 07 BD */ rlwinm. r0, r7, 0, 0x1e, 0x1e -/* 802BF90C 41 82 00 0C */ beq lbl_802BF918 -/* 802BF910 38 60 00 00 */ li r3, 0 -/* 802BF914 4E 80 00 20 */ blr -lbl_802BF918: -/* 802BF918 38 60 00 01 */ li r3, 1 -/* 802BF91C 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/initAnime__15Z2SoundObjAnimeFPvbff.s b/asm/Z2AudioLib/Z2SoundObject/initAnime__15Z2SoundObjAnimeFPvbff.s deleted file mode 100644 index 536a5e69640..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/initAnime__15Z2SoundObjAnimeFPvbff.s +++ /dev/null @@ -1,97 +0,0 @@ -lbl_802BEBFC: -/* 802BEBFC 94 21 FF C0 */ stwu r1, -0x40(r1) -/* 802BEC00 7C 08 02 A6 */ mflr r0 -/* 802BEC04 90 01 00 44 */ stw r0, 0x44(r1) -/* 802BEC08 DB E1 00 30 */ stfd f31, 0x30(r1) -/* 802BEC0C F3 E1 00 38 */ psq_st f31, 56(r1), 0, 0 /* qr0 */ -/* 802BEC10 DB C1 00 20 */ stfd f30, 0x20(r1) -/* 802BEC14 F3 C1 00 28 */ psq_st f30, 40(r1), 0, 0 /* qr0 */ -/* 802BEC18 39 61 00 20 */ addi r11, r1, 0x20 -/* 802BEC1C 48 0A 35 C1 */ bl _savegpr_29 -/* 802BEC20 7C 7F 1B 78 */ mr r31, r3 -/* 802BEC24 7C 9D 23 78 */ mr r29, r4 -/* 802BEC28 7C BE 2B 78 */ mr r30, r5 -/* 802BEC2C FF C0 08 90 */ fmr f30, f1 -/* 802BEC30 FF E0 10 90 */ fmr f31, f2 -/* 802BEC34 48 00 01 35 */ bl ageSounds___15Z2SoundObjAnimeFv -/* 802BEC38 93 BF 00 20 */ stw r29, 0x20(r31) -/* 802BEC3C 80 1F 00 20 */ lwz r0, 0x20(r31) -/* 802BEC40 28 00 00 00 */ cmplwi r0, 0 -/* 802BEC44 41 82 00 FC */ beq lbl_802BED40 -/* 802BEC48 57 C0 06 3E */ clrlwi r0, r30, 0x18 -/* 802BEC4C 7C 00 00 34 */ cntlzw r0, r0 -/* 802BEC50 54 00 D9 7E */ srwi r0, r0, 5 -/* 802BEC54 98 1F 00 44 */ stb r0, 0x44(r31) -/* 802BEC58 38 60 00 00 */ li r3, 0 -/* 802BEC5C 90 7F 00 3C */ stw r3, 0x3c(r31) -/* 802BEC60 88 1F 00 44 */ lbz r0, 0x44(r31) -/* 802BEC64 28 00 00 00 */ cmplwi r0, 0 -/* 802BEC68 41 82 00 70 */ beq lbl_802BECD8 -/* 802BEC6C 80 9F 00 20 */ lwz r4, 0x20(r31) -/* 802BEC70 80 64 00 04 */ lwz r3, 4(r4) -/* 802BEC74 28 03 00 00 */ cmplwi r3, 0 -/* 802BEC78 41 82 00 18 */ beq lbl_802BEC90 -/* 802BEC7C 81 83 00 00 */ lwz r12, 0(r3) -/* 802BEC80 81 8C 00 10 */ lwz r12, 0x10(r12) -/* 802BEC84 7D 89 03 A6 */ mtctr r12 -/* 802BEC88 4E 80 04 21 */ bctrl -/* 802BEC8C 48 00 00 08 */ b lbl_802BEC94 -lbl_802BEC90: -/* 802BEC90 A0 64 00 00 */ lhz r3, 0(r4) -lbl_802BEC94: -/* 802BEC94 54 63 04 3E */ clrlwi r3, r3, 0x10 -/* 802BEC98 38 03 FF FF */ addi r0, r3, -1 -/* 802BEC9C 90 1F 00 40 */ stw r0, 0x40(r31) -/* 802BECA0 3C 60 80 45 */ lis r3, __float_max@ha /* 0x80450AE8@ha */ -/* 802BECA4 C0 03 0A E8 */ lfs f0, __float_max@l(r3) /* 0x80450AE8@l */ -/* 802BECA8 D0 1F 00 28 */ stfs f0, 0x28(r31) -/* 802BECAC C0 22 C1 50 */ lfs f1, lit_3821(r2) -/* 802BECB0 D0 3F 00 2C */ stfs f1, 0x2c(r31) -/* 802BECB4 80 7F 00 20 */ lwz r3, 0x20(r31) -/* 802BECB8 4B FE 82 B9 */ bl getStartSoundIndex__17JAUSoundAnimationCFf -/* 802BECBC 90 7F 00 34 */ stw r3, 0x34(r31) -/* 802BECC0 D3 DF 00 30 */ stfs f30, 0x30(r31) -/* 802BECC4 80 7F 00 20 */ lwz r3, 0x20(r31) -/* 802BECC8 FC 20 F0 90 */ fmr f1, f30 -/* 802BECCC 4B FE 83 79 */ bl getEndSoundIndex__17JAUSoundAnimationCFf -/* 802BECD0 90 7F 00 38 */ stw r3, 0x38(r31) -/* 802BECD4 48 00 00 38 */ b lbl_802BED0C -lbl_802BECD8: -/* 802BECD8 90 7F 00 40 */ stw r3, 0x40(r31) -/* 802BECDC C0 02 C1 50 */ lfs f0, lit_3821(r2) -/* 802BECE0 D0 1F 00 28 */ stfs f0, 0x28(r31) -/* 802BECE4 D3 DF 00 2C */ stfs f30, 0x2c(r31) -/* 802BECE8 80 7F 00 20 */ lwz r3, 0x20(r31) -/* 802BECEC FC 20 F0 90 */ fmr f1, f30 -/* 802BECF0 4B FE 82 81 */ bl getStartSoundIndex__17JAUSoundAnimationCFf -/* 802BECF4 90 7F 00 34 */ stw r3, 0x34(r31) -/* 802BECF8 C0 22 C1 50 */ lfs f1, lit_3821(r2) -/* 802BECFC D0 3F 00 30 */ stfs f1, 0x30(r31) -/* 802BED00 80 7F 00 20 */ lwz r3, 0x20(r31) -/* 802BED04 4B FE 83 41 */ bl getEndSoundIndex__17JAUSoundAnimationCFf -/* 802BED08 90 7F 00 38 */ stw r3, 0x38(r31) -lbl_802BED0C: -/* 802BED0C D3 FF 00 28 */ stfs f31, 0x28(r31) -/* 802BED10 80 7F 00 20 */ lwz r3, 0x20(r31) -/* 802BED14 FC 20 F8 90 */ fmr f1, f31 -/* 802BED18 4B FE 82 59 */ bl getStartSoundIndex__17JAUSoundAnimationCFf -/* 802BED1C 90 7F 00 40 */ stw r3, 0x40(r31) -/* 802BED20 88 1F 00 44 */ lbz r0, 0x44(r31) -/* 802BED24 28 00 00 00 */ cmplwi r0, 0 -/* 802BED28 41 82 00 18 */ beq lbl_802BED40 -/* 802BED2C 80 7F 00 40 */ lwz r3, 0x40(r31) -/* 802BED30 2C 03 00 00 */ cmpwi r3, 0 -/* 802BED34 40 81 00 0C */ ble lbl_802BED40 -/* 802BED38 38 03 FF FF */ addi r0, r3, -1 -/* 802BED3C 90 1F 00 40 */ stw r0, 0x40(r31) -lbl_802BED40: -/* 802BED40 E3 E1 00 38 */ psq_l f31, 56(r1), 0, 0 /* qr0 */ -/* 802BED44 CB E1 00 30 */ lfd f31, 0x30(r1) -/* 802BED48 E3 C1 00 28 */ psq_l f30, 40(r1), 0, 0 /* qr0 */ -/* 802BED4C CB C1 00 20 */ lfd f30, 0x20(r1) -/* 802BED50 39 61 00 20 */ addi r11, r1, 0x20 -/* 802BED54 48 0A 34 D5 */ bl _restgpr_29 -/* 802BED58 80 01 00 44 */ lwz r0, 0x44(r1) -/* 802BED5C 7C 08 03 A6 */ mtlr r0 -/* 802BED60 38 21 00 40 */ addi r1, r1, 0x40 -/* 802BED64 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/init__15Z2SoundObjAnimeFP3VecUc.s b/asm/Z2AudioLib/Z2SoundObject/init__15Z2SoundObjAnimeFP3VecUc.s deleted file mode 100644 index 94ddff13547..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/init__15Z2SoundObjAnimeFP3VecUc.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_802BEBDC: -/* 802BEBDC 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BEBE0 7C 08 02 A6 */ mflr r0 -/* 802BEBE4 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BEBE8 4B FF F3 C9 */ bl init__14Z2SoundObjBaseFP3VecUc -/* 802BEBEC 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BEBF0 7C 08 03 A6 */ mtlr r0 -/* 802BEBF4 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BEBF8 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/init__15Z2SoundObjArrowFP3VecUc.s b/asm/Z2AudioLib/Z2SoundObject/init__15Z2SoundObjArrowFP3VecUc.s deleted file mode 100644 index 11d3dcfcc12..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/init__15Z2SoundObjArrowFP3VecUc.s +++ /dev/null @@ -1,9 +0,0 @@ -lbl_802BEB74: -/* 802BEB74 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BEB78 7C 08 02 A6 */ mflr r0 -/* 802BEB7C 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BEB80 4B FF F4 31 */ bl init__14Z2SoundObjBaseFP3VecUc -/* 802BEB84 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BEB88 7C 08 03 A6 */ mtlr r0 -/* 802BEB8C 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BEB90 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/init__21Z2DopplerSoundObjBaseFP3VecUc.s b/asm/Z2AudioLib/Z2SoundObject/init__21Z2DopplerSoundObjBaseFP3VecUc.s deleted file mode 100644 index d2e6a331547..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/init__21Z2DopplerSoundObjBaseFP3VecUc.s +++ /dev/null @@ -1,25 +0,0 @@ -lbl_802BE65C: -/* 802BE65C 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BE660 7C 08 02 A6 */ mflr r0 -/* 802BE664 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BE668 93 E1 00 0C */ stw r31, 0xc(r1) -/* 802BE66C 7C 7F 1B 78 */ mr r31, r3 -/* 802BE670 4B FF F9 41 */ bl init__14Z2SoundObjBaseFP3VecUc -/* 802BE674 80 7F 00 18 */ lwz r3, 0x18(r31) -/* 802BE678 28 03 00 00 */ cmplwi r3, 0 -/* 802BE67C 41 82 00 28 */ beq lbl_802BE6A4 -/* 802BE680 E0 23 00 00 */ psq_l f1, 0(r3), 0, 0 /* qr0 */ -/* 802BE684 C0 03 00 08 */ lfs f0, 8(r3) -/* 802BE688 F0 3F 00 20 */ psq_st f1, 32(r31), 0, 0 /* qr0 */ -/* 802BE68C D0 1F 00 28 */ stfs f0, 0x28(r31) -/* 802BE690 80 7F 00 18 */ lwz r3, 0x18(r31) -/* 802BE694 E0 23 00 00 */ psq_l f1, 0(r3), 0, 0 /* qr0 */ -/* 802BE698 C0 03 00 08 */ lfs f0, 8(r3) -/* 802BE69C F0 3F 00 2C */ psq_st f1, 44(r31), 0, 0 /* qr0 */ -/* 802BE6A0 D0 1F 00 34 */ stfs f0, 0x34(r31) -lbl_802BE6A4: -/* 802BE6A4 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 802BE6A8 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BE6AC 7C 08 03 A6 */ mtlr r0 -/* 802BE6B0 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BE6B4 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/startCollisionSE__14Z2SoundObjBaseFUlUlP14Z2SoundObjBase.s b/asm/Z2AudioLib/Z2SoundObject/startCollisionSE__14Z2SoundObjBaseFUlUlP14Z2SoundObjBase.s deleted file mode 100644 index 7a4a6ec7015..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/startCollisionSE__14Z2SoundObjBaseFUlUlP14Z2SoundObjBase.s +++ /dev/null @@ -1,70 +0,0 @@ -lbl_802BE4A4: -/* 802BE4A4 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 802BE4A8 7C 08 02 A6 */ mflr r0 -/* 802BE4AC 90 01 00 24 */ stw r0, 0x24(r1) -/* 802BE4B0 39 61 00 20 */ addi r11, r1, 0x20 -/* 802BE4B4 48 0A 3D 25 */ bl _savegpr_28 -/* 802BE4B8 7C 7C 1B 78 */ mr r28, r3 -/* 802BE4BC 7C 9D 23 78 */ mr r29, r4 -/* 802BE4C0 7C BE 2B 78 */ mr r30, r5 -/* 802BE4C4 28 06 00 00 */ cmplwi r6, 0 -/* 802BE4C8 41 82 00 14 */ beq lbl_802BE4DC -/* 802BE4CC 7C C3 33 78 */ mr r3, r6 -/* 802BE4D0 38 C0 00 00 */ li r6, 0 -/* 802BE4D4 4B FF FF D1 */ bl startCollisionSE__14Z2SoundObjBaseFUlUlP14Z2SoundObjBase -/* 802BE4D8 48 00 00 B0 */ b lbl_802BE588 -lbl_802BE4DC: -/* 802BE4DC 28 1E 00 35 */ cmplwi r30, 0x35 -/* 802BE4E0 40 81 00 08 */ ble lbl_802BE4E8 -/* 802BE4E4 3B C0 00 00 */ li r30, 0 -lbl_802BE4E8: -/* 802BE4E8 80 6D 85 E0 */ lwz r3, __OSReport_disable-0x38(r13) -/* 802BE4EC 83 E3 02 20 */ lwz r31, 0x220(r3) -/* 802BE4F0 48 00 00 30 */ b lbl_802BE520 -lbl_802BE4F4: -/* 802BE4F4 80 7F 00 00 */ lwz r3, 0(r31) -/* 802BE4F8 80 03 00 28 */ lwz r0, 0x28(r3) -/* 802BE4FC 90 01 00 0C */ stw r0, 0xc(r1) -/* 802BE500 7C 1D 00 40 */ cmplw r29, r0 -/* 802BE504 40 82 00 18 */ bne lbl_802BE51C -/* 802BE508 80 03 00 30 */ lwz r0, 0x30(r3) -/* 802BE50C 7C 1E 00 40 */ cmplw r30, r0 -/* 802BE510 40 82 00 0C */ bne lbl_802BE51C -/* 802BE514 38 63 00 10 */ addi r3, r3, 0x10 -/* 802BE518 4B FE 40 81 */ bl stop__8JAISoundFv -lbl_802BE51C: -/* 802BE51C 83 FF 00 0C */ lwz r31, 0xc(r31) -lbl_802BE520: -/* 802BE520 28 1F 00 00 */ cmplwi r31, 0 -/* 802BE524 40 82 FF D0 */ bne lbl_802BE4F4 -/* 802BE528 93 A1 00 08 */ stw r29, 8(r1) -/* 802BE52C 7F 83 E3 78 */ mr r3, r28 -/* 802BE530 38 81 00 08 */ addi r4, r1, 8 -/* 802BE534 7F C5 F3 78 */ mr r5, r30 -/* 802BE538 38 C0 FF FF */ li r6, -1 -/* 802BE53C 4B FF FC 09 */ bl startSound__14Z2SoundObjBaseF10JAISoundIDUlSc -/* 802BE540 28 03 00 00 */ cmplwi r3, 0 -/* 802BE544 41 82 00 44 */ beq lbl_802BE588 -/* 802BE548 80 83 00 00 */ lwz r4, 0(r3) -/* 802BE54C 28 04 00 00 */ cmplwi r4, 0 -/* 802BE550 41 82 00 38 */ beq lbl_802BE588 -/* 802BE554 93 C4 00 20 */ stw r30, 0x20(r4) -/* 802BE558 28 1E 00 1E */ cmplwi r30, 0x1e -/* 802BE55C 41 80 00 2C */ blt lbl_802BE588 -/* 802BE560 28 1E 00 34 */ cmplwi r30, 0x34 -/* 802BE564 41 81 00 24 */ bgt lbl_802BE588 -/* 802BE568 80 83 00 00 */ lwz r4, 0(r3) -/* 802BE56C 80 A4 00 08 */ lwz r5, 8(r4) -/* 802BE570 28 05 00 00 */ cmplwi r5, 0 -/* 802BE574 41 82 00 14 */ beq lbl_802BE588 -/* 802BE578 38 80 00 08 */ li r4, 8 -/* 802BE57C 88 05 00 11 */ lbz r0, 0x11(r5) -/* 802BE580 50 80 06 BE */ rlwimi r0, r4, 0, 0x1a, 0x1f -/* 802BE584 98 05 00 11 */ stb r0, 0x11(r5) -lbl_802BE588: -/* 802BE588 39 61 00 20 */ addi r11, r1, 0x20 -/* 802BE58C 48 0A 3C 99 */ bl _restgpr_28 -/* 802BE590 80 01 00 24 */ lwz r0, 0x24(r1) -/* 802BE594 7C 08 03 A6 */ mtlr r0 -/* 802BE598 38 21 00 20 */ addi r1, r1, 0x20 -/* 802BE59C 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/startLevelSound__14Z2SoundObjBaseF10JAISoundIDUlSc.s b/asm/Z2AudioLib/Z2SoundObject/startLevelSound__14Z2SoundObjBaseF10JAISoundIDUlSc.s deleted file mode 100644 index c22d97ecddd..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/startLevelSound__14Z2SoundObjBaseF10JAISoundIDUlSc.s +++ /dev/null @@ -1,126 +0,0 @@ -lbl_802BE2D4: -/* 802BE2D4 94 21 FF C0 */ stwu r1, -0x40(r1) -/* 802BE2D8 7C 08 02 A6 */ mflr r0 -/* 802BE2DC 90 01 00 44 */ stw r0, 0x44(r1) -/* 802BE2E0 DB E1 00 30 */ stfd f31, 0x30(r1) -/* 802BE2E4 F3 E1 00 38 */ psq_st f31, 56(r1), 0, 0 /* qr0 */ -/* 802BE2E8 39 61 00 30 */ addi r11, r1, 0x30 -/* 802BE2EC 48 0A 3E ED */ bl _savegpr_28 -/* 802BE2F0 7C 7E 1B 78 */ mr r30, r3 -/* 802BE2F4 7C 9C 23 78 */ mr r28, r4 -/* 802BE2F8 7C BF 2B 78 */ mr r31, r5 -/* 802BE2FC 88 03 00 1F */ lbz r0, 0x1f(r3) -/* 802BE300 28 00 00 00 */ cmplwi r0, 0 -/* 802BE304 40 82 00 0C */ bne lbl_802BE310 -/* 802BE308 38 60 00 00 */ li r3, 0 -/* 802BE30C 48 00 01 78 */ b lbl_802BE484 -lbl_802BE310: -/* 802BE310 28 1F 00 00 */ cmplwi r31, 0 -/* 802BE314 40 82 00 08 */ bne lbl_802BE31C -/* 802BE318 A3 FE 00 1C */ lhz r31, 0x1c(r30) -lbl_802BE31C: -/* 802BE31C 7C C0 07 75 */ extsb. r0, r6 -/* 802BE320 40 80 00 08 */ bge lbl_802BE328 -/* 802BE324 88 DE 00 1E */ lbz r6, 0x1e(r30) -lbl_802BE328: -/* 802BE328 7C C0 07 74 */ extsb r0, r6 -/* 802BE32C C8 22 C1 48 */ lfd f1, lit_3564(r2) -/* 802BE330 6C 00 80 00 */ xoris r0, r0, 0x8000 -/* 802BE334 90 01 00 1C */ stw r0, 0x1c(r1) -/* 802BE338 3C 00 43 30 */ lis r0, 0x4330 -/* 802BE33C 90 01 00 18 */ stw r0, 0x18(r1) -/* 802BE340 C8 01 00 18 */ lfd f0, 0x18(r1) -/* 802BE344 EC 20 08 28 */ fsubs f1, f0, f1 -/* 802BE348 C0 02 C1 38 */ lfs f0, lit_3559(r2) -/* 802BE34C EF E1 00 24 */ fdivs f31, f1, f0 -/* 802BE350 80 1C 00 00 */ lwz r0, 0(r28) -/* 802BE354 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BE358 7F C3 F3 78 */ mr r3, r30 -/* 802BE35C 38 81 00 14 */ addi r4, r1, 0x14 -/* 802BE360 4B FE CE F5 */ bl getHandleSoundID__14Z2SoundHandlesF10JAISoundID -/* 802BE364 7C 7D 1B 79 */ or. r29, r3, r3 -/* 802BE368 41 82 00 4C */ beq lbl_802BE3B4 -/* 802BE36C 80 7D 00 00 */ lwz r3, 0(r29) -/* 802BE370 80 03 00 10 */ lwz r0, 0x10(r3) -/* 802BE374 28 00 00 01 */ cmplwi r0, 1 -/* 802BE378 40 80 00 0C */ bge lbl_802BE384 -/* 802BE37C 38 00 00 01 */ li r0, 1 -/* 802BE380 90 03 00 10 */ stw r0, 0x10(r3) -lbl_802BE384: -/* 802BE384 80 7E 00 14 */ lwz r3, 0x14(r30) -/* 802BE388 7F A4 EB 78 */ mr r4, r29 -/* 802BE38C 38 A0 00 06 */ li r5, 6 -/* 802BE390 57 E6 04 3E */ clrlwi r6, r31, 0x10 -/* 802BE394 38 E0 FF FF */ li r7, -1 -/* 802BE398 4B FE CB 45 */ bl setPortData__14Z2SoundStarterFP14JAISoundHandleUlUsSc -/* 802BE39C 80 7D 00 00 */ lwz r3, 0(r29) -/* 802BE3A0 38 63 00 48 */ addi r3, r3, 0x48 -/* 802BE3A4 FC 20 F8 90 */ fmr f1, f31 -/* 802BE3A8 38 80 00 00 */ li r4, 0 -/* 802BE3AC 4B FE 4A B9 */ bl moveFxMix__18JAISoundParamsMoveFfUl -/* 802BE3B0 48 00 00 D0 */ b lbl_802BE480 -lbl_802BE3B4: -/* 802BE3B4 80 1C 00 00 */ lwz r0, 0(r28) -/* 802BE3B8 90 01 00 10 */ stw r0, 0x10(r1) -/* 802BE3BC 80 6D 86 08 */ lwz r3, __OSReport_disable-0x10(r13) -/* 802BE3C0 38 81 00 10 */ addi r4, r1, 0x10 -/* 802BE3C4 4B FF 01 ED */ bl isSoundCulling__7Z2SeMgrF10JAISoundID -/* 802BE3C8 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 802BE3CC 41 82 00 0C */ beq lbl_802BE3D8 -/* 802BE3D0 38 60 00 00 */ li r3, 0 -/* 802BE3D4 48 00 00 B0 */ b lbl_802BE484 -lbl_802BE3D8: -/* 802BE3D8 7F C3 F3 78 */ mr r3, r30 -/* 802BE3DC 4B FE CE FD */ bl getFreeHandle__14Z2SoundHandlesFv -/* 802BE3E0 7C 7D 1B 79 */ or. r29, r3, r3 -/* 802BE3E4 40 82 00 1C */ bne lbl_802BE400 -/* 802BE3E8 80 1C 00 00 */ lwz r0, 0(r28) -/* 802BE3EC 90 01 00 0C */ stw r0, 0xc(r1) -/* 802BE3F0 7F C3 F3 78 */ mr r3, r30 -/* 802BE3F4 38 81 00 0C */ addi r4, r1, 0xc -/* 802BE3F8 4B FE CF D9 */ bl getLowPrioSound__14Z2SoundHandlesF10JAISoundID -/* 802BE3FC 7C 7D 1B 78 */ mr r29, r3 -lbl_802BE400: -/* 802BE400 28 1D 00 00 */ cmplwi r29, 0 -/* 802BE404 41 82 00 7C */ beq lbl_802BE480 -/* 802BE408 80 1C 00 00 */ lwz r0, 0(r28) -/* 802BE40C 90 01 00 08 */ stw r0, 8(r1) -/* 802BE410 80 7E 00 14 */ lwz r3, 0x14(r30) -/* 802BE414 38 81 00 08 */ addi r4, r1, 8 -/* 802BE418 7F A5 EB 78 */ mr r5, r29 -/* 802BE41C 80 DE 00 18 */ lwz r6, 0x18(r30) -/* 802BE420 7F E7 FB 78 */ mr r7, r31 -/* 802BE424 FC 20 F8 90 */ fmr f1, f31 -/* 802BE428 C0 42 C1 3C */ lfs f2, lit_3560(r2) -/* 802BE42C FC 60 10 90 */ fmr f3, f2 -/* 802BE430 C0 82 C1 40 */ lfs f4, lit_3561(r2) -/* 802BE434 FC A0 20 90 */ fmr f5, f4 -/* 802BE438 39 00 00 00 */ li r8, 0 -/* 802BE43C 81 83 00 00 */ lwz r12, 0(r3) -/* 802BE440 81 8C 00 10 */ lwz r12, 0x10(r12) -/* 802BE444 7D 89 03 A6 */ mtctr r12 -/* 802BE448 4E 80 04 21 */ bctrl -/* 802BE44C 28 1D 00 00 */ cmplwi r29, 0 -/* 802BE450 41 82 00 30 */ beq lbl_802BE480 -/* 802BE454 80 9D 00 00 */ lwz r4, 0(r29) -/* 802BE458 28 04 00 00 */ cmplwi r4, 0 -/* 802BE45C 41 82 00 24 */ beq lbl_802BE480 -/* 802BE460 38 60 00 01 */ li r3, 1 -/* 802BE464 90 64 00 10 */ stw r3, 0x10(r4) -/* 802BE468 88 04 00 1D */ lbz r0, 0x1d(r4) -/* 802BE46C 50 60 3E 30 */ rlwimi r0, r3, 7, 0x18, 0x18 -/* 802BE470 98 04 00 1D */ stb r0, 0x1d(r4) -/* 802BE474 88 04 00 1D */ lbz r0, 0x1d(r4) -/* 802BE478 50 60 36 72 */ rlwimi r0, r3, 6, 0x19, 0x19 -/* 802BE47C 98 04 00 1D */ stb r0, 0x1d(r4) -lbl_802BE480: -/* 802BE480 7F A3 EB 78 */ mr r3, r29 -lbl_802BE484: -/* 802BE484 E3 E1 00 38 */ psq_l f31, 56(r1), 0, 0 /* qr0 */ -/* 802BE488 CB E1 00 30 */ lfd f31, 0x30(r1) -/* 802BE48C 39 61 00 30 */ addi r11, r1, 0x30 -/* 802BE490 48 0A 3D 95 */ bl _restgpr_28 -/* 802BE494 80 01 00 44 */ lwz r0, 0x44(r1) -/* 802BE498 7C 08 03 A6 */ mtlr r0 -/* 802BE49C 38 21 00 40 */ addi r1, r1, 0x40 -/* 802BE4A0 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/startLevelSound__16Z2SoundObjSimpleF10JAISoundIDUlSc.s b/asm/Z2AudioLib/Z2SoundObject/startLevelSound__16Z2SoundObjSimpleF10JAISoundIDUlSc.s deleted file mode 100644 index 18d8ddd5e1b..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/startLevelSound__16Z2SoundObjSimpleF10JAISoundIDUlSc.s +++ /dev/null @@ -1,104 +0,0 @@ -lbl_802BE9B0: -/* 802BE9B0 94 21 FF C0 */ stwu r1, -0x40(r1) -/* 802BE9B4 7C 08 02 A6 */ mflr r0 -/* 802BE9B8 90 01 00 44 */ stw r0, 0x44(r1) -/* 802BE9BC DB E1 00 30 */ stfd f31, 0x30(r1) -/* 802BE9C0 F3 E1 00 38 */ psq_st f31, 56(r1), 0, 0 /* qr0 */ -/* 802BE9C4 39 61 00 30 */ addi r11, r1, 0x30 -/* 802BE9C8 48 0A 38 15 */ bl _savegpr_29 -/* 802BE9CC 7C 9D 23 78 */ mr r29, r4 -/* 802BE9D0 7C BE 2B 78 */ mr r30, r5 -/* 802BE9D4 80 04 00 00 */ lwz r0, 0(r4) -/* 802BE9D8 90 01 00 08 */ stw r0, 8(r1) -/* 802BE9DC 38 81 00 08 */ addi r4, r1, 8 -/* 802BE9E0 4B FF F8 F5 */ bl startLevelSound__14Z2SoundObjBaseF10JAISoundIDUlSc -/* 802BE9E4 7C 7F 1B 79 */ or. r31, r3, r3 -/* 802BE9E8 41 82 01 2C */ beq lbl_802BEB14 -/* 802BE9EC 80 1F 00 00 */ lwz r0, 0(r31) -/* 802BE9F0 28 00 00 00 */ cmplwi r0, 0 -/* 802BE9F4 41 82 01 20 */ beq lbl_802BEB14 -/* 802BE9F8 C0 C2 C1 3C */ lfs f6, lit_3560(r2) -/* 802BE9FC FF E0 30 90 */ fmr f31, f6 -/* 802BEA00 80 9D 00 00 */ lwz r4, 0(r29) -/* 802BEA04 3C 60 00 08 */ lis r3, 0x0008 /* 0x0008025C@ha */ -/* 802BEA08 38 03 02 5C */ addi r0, r3, 0x025C /* 0x0008025C@l */ -/* 802BEA0C 7C 04 00 00 */ cmpw r4, r0 -/* 802BEA10 41 82 00 8C */ beq lbl_802BEA9C -/* 802BEA14 40 80 00 D8 */ bge lbl_802BEAEC -/* 802BEA18 3C 60 00 02 */ lis r3, 0x0002 /* 0x000200C6@ha */ -/* 802BEA1C 38 03 00 C6 */ addi r0, r3, 0x00C6 /* 0x000200C6@l */ -/* 802BEA20 7C 04 00 00 */ cmpw r4, r0 -/* 802BEA24 41 82 00 08 */ beq lbl_802BEA2C -/* 802BEA28 48 00 00 C4 */ b lbl_802BEAEC -lbl_802BEA2C: -/* 802BEA2C C8 22 C1 68 */ lfd f1, lit_3828(r2) -/* 802BEA30 93 C1 00 14 */ stw r30, 0x14(r1) -/* 802BEA34 3C 00 43 30 */ lis r0, 0x4330 -/* 802BEA38 90 01 00 10 */ stw r0, 0x10(r1) -/* 802BEA3C C8 01 00 10 */ lfd f0, 0x10(r1) -/* 802BEA40 EC 20 08 28 */ fsubs f1, f0, f1 -/* 802BEA44 C0 42 C1 50 */ lfs f2, lit_3821(r2) -/* 802BEA48 C0 62 C1 38 */ lfs f3, lit_3559(r2) -/* 802BEA4C C0 82 C1 54 */ lfs f4, lit_3822(r2) -/* 802BEA50 C0 A2 C1 58 */ lfs f5, lit_3823(r2) -/* 802BEA54 38 60 00 01 */ li r3, 1 -/* 802BEA58 4B FE AC 9D */ bl getParamByExp__6Z2CalcFffffffQ26Z2Calc9CurveSign -/* 802BEA5C FF E0 08 90 */ fmr f31, f1 -/* 802BEA60 C8 22 C1 68 */ lfd f1, lit_3828(r2) -/* 802BEA64 93 C1 00 1C */ stw r30, 0x1c(r1) -/* 802BEA68 3C 00 43 30 */ lis r0, 0x4330 -/* 802BEA6C 90 01 00 18 */ stw r0, 0x18(r1) -/* 802BEA70 C8 01 00 18 */ lfd f0, 0x18(r1) -/* 802BEA74 EC 20 08 28 */ fsubs f1, f0, f1 -/* 802BEA78 C0 42 C1 50 */ lfs f2, lit_3821(r2) -/* 802BEA7C C0 62 C1 38 */ lfs f3, lit_3559(r2) -/* 802BEA80 C0 82 C1 54 */ lfs f4, lit_3822(r2) -/* 802BEA84 C0 A2 C1 5C */ lfs f5, lit_3824(r2) -/* 802BEA88 C0 C2 C1 60 */ lfs f6, lit_3825(r2) -/* 802BEA8C 38 60 00 01 */ li r3, 1 -/* 802BEA90 4B FE AC 65 */ bl getParamByExp__6Z2CalcFffffffQ26Z2Calc9CurveSign -/* 802BEA94 FC C0 08 90 */ fmr f6, f1 -/* 802BEA98 48 00 00 54 */ b lbl_802BEAEC -lbl_802BEA9C: -/* 802BEA9C 28 1E 00 64 */ cmplwi r30, 0x64 -/* 802BEAA0 40 81 00 0C */ ble lbl_802BEAAC -/* 802BEAA4 C0 C2 C1 70 */ lfs f6, lit_3859(r2) -/* 802BEAA8 48 00 00 44 */ b lbl_802BEAEC -lbl_802BEAAC: -/* 802BEAAC 28 1E 00 15 */ cmplwi r30, 0x15 -/* 802BEAB0 40 81 00 3C */ ble lbl_802BEAEC -/* 802BEAB4 C8 22 C1 68 */ lfd f1, lit_3828(r2) -/* 802BEAB8 93 C1 00 1C */ stw r30, 0x1c(r1) -/* 802BEABC 3C 00 43 30 */ lis r0, 0x4330 -/* 802BEAC0 90 01 00 18 */ stw r0, 0x18(r1) -/* 802BEAC4 C8 01 00 18 */ lfd f0, 0x18(r1) -/* 802BEAC8 EC 20 08 28 */ fsubs f1, f0, f1 -/* 802BEACC C0 42 C1 74 */ lfs f2, lit_3860(r2) -/* 802BEAD0 C0 62 C1 78 */ lfs f3, lit_3861(r2) -/* 802BEAD4 C0 82 C1 58 */ lfs f4, lit_3823(r2) -/* 802BEAD8 FC A0 30 90 */ fmr f5, f6 -/* 802BEADC C0 C2 C1 7C */ lfs f6, lit_3862(r2) -/* 802BEAE0 38 60 00 00 */ li r3, 0 -/* 802BEAE4 4B FE AC 11 */ bl getParamByExp__6Z2CalcFffffffQ26Z2Calc9CurveSign -/* 802BEAE8 FC C0 08 90 */ fmr f6, f1 -lbl_802BEAEC: -/* 802BEAEC 80 7F 00 00 */ lwz r3, 0(r31) -/* 802BEAF0 38 63 00 48 */ addi r3, r3, 0x48 -/* 802BEAF4 FC 20 30 90 */ fmr f1, f6 -/* 802BEAF8 38 80 00 00 */ li r4, 0 -/* 802BEAFC 4B FE 43 11 */ bl movePitch__18JAISoundParamsMoveFfUl -/* 802BEB00 80 7F 00 00 */ lwz r3, 0(r31) -/* 802BEB04 38 63 00 48 */ addi r3, r3, 0x48 -/* 802BEB08 FC 20 F8 90 */ fmr f1, f31 -/* 802BEB0C 38 80 00 00 */ li r4, 0 -/* 802BEB10 4B FE 42 A5 */ bl moveVolume__18JAISoundParamsMoveFfUl -lbl_802BEB14: -/* 802BEB14 7F E3 FB 78 */ mr r3, r31 -/* 802BEB18 E3 E1 00 38 */ psq_l f31, 56(r1), 0, 0 /* qr0 */ -/* 802BEB1C CB E1 00 30 */ lfd f31, 0x30(r1) -/* 802BEB20 39 61 00 30 */ addi r11, r1, 0x30 -/* 802BEB24 48 0A 37 05 */ bl _restgpr_29 -/* 802BEB28 80 01 00 44 */ lwz r0, 0x44(r1) -/* 802BEB2C 7C 08 03 A6 */ mtlr r0 -/* 802BEB30 38 21 00 40 */ addi r1, r1, 0x40 -/* 802BEB34 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/startLevelSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc.s b/asm/Z2AudioLib/Z2SoundObject/startLevelSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc.s deleted file mode 100644 index cb88f9314ec..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/startLevelSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc.s +++ /dev/null @@ -1,40 +0,0 @@ -lbl_802BE7AC: -/* 802BE7AC 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 802BE7B0 7C 08 02 A6 */ mflr r0 -/* 802BE7B4 90 01 00 24 */ stw r0, 0x24(r1) -/* 802BE7B8 39 61 00 20 */ addi r11, r1, 0x20 -/* 802BE7BC 48 0A 3A 21 */ bl _savegpr_29 -/* 802BE7C0 7C 7D 1B 78 */ mr r29, r3 -/* 802BE7C4 83 E3 00 18 */ lwz r31, 0x18(r3) -/* 802BE7C8 38 00 00 00 */ li r0, 0 -/* 802BE7CC 90 03 00 18 */ stw r0, 0x18(r3) -/* 802BE7D0 80 04 00 00 */ lwz r0, 0(r4) -/* 802BE7D4 90 01 00 08 */ stw r0, 8(r1) -/* 802BE7D8 38 81 00 08 */ addi r4, r1, 8 -/* 802BE7DC 4B FF FA F9 */ bl startLevelSound__14Z2SoundObjBaseF10JAISoundIDUlSc -/* 802BE7E0 7C 7E 1B 78 */ mr r30, r3 -/* 802BE7E4 28 1F 00 00 */ cmplwi r31, 0 -/* 802BE7E8 41 82 00 3C */ beq lbl_802BE824 -/* 802BE7EC 28 1E 00 00 */ cmplwi r30, 0 -/* 802BE7F0 41 82 00 34 */ beq lbl_802BE824 -/* 802BE7F4 80 7E 00 00 */ lwz r3, 0(r30) -/* 802BE7F8 28 03 00 00 */ cmplwi r3, 0 -/* 802BE7FC 41 82 00 28 */ beq lbl_802BE824 -/* 802BE800 4B FE 3C 4D */ bl acceptsNewAudible__8JAISoundCFv -/* 802BE804 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 802BE808 41 82 00 1C */ beq lbl_802BE824 -/* 802BE80C 80 7E 00 00 */ lwz r3, 0(r30) -/* 802BE810 7F E4 FB 78 */ mr r4, r31 -/* 802BE814 38 BD 00 20 */ addi r5, r29, 0x20 -/* 802BE818 38 C0 00 00 */ li r6, 0 -/* 802BE81C 38 E0 00 00 */ li r7, 0 -/* 802BE820 4B FE 3C 55 */ bl func_802A2474 -lbl_802BE824: -/* 802BE824 93 FD 00 18 */ stw r31, 0x18(r29) -/* 802BE828 7F C3 F3 78 */ mr r3, r30 -/* 802BE82C 39 61 00 20 */ addi r11, r1, 0x20 -/* 802BE830 48 0A 39 F9 */ bl _restgpr_29 -/* 802BE834 80 01 00 24 */ lwz r0, 0x24(r1) -/* 802BE838 7C 08 03 A6 */ mtlr r0 -/* 802BE83C 38 21 00 20 */ addi r1, r1, 0x20 -/* 802BE840 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/startSound__14Z2SoundObjBaseF10JAISoundIDUlSc.s b/asm/Z2AudioLib/Z2SoundObject/startSound__14Z2SoundObjBaseF10JAISoundIDUlSc.s deleted file mode 100644 index 54fa3a0d351..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/startSound__14Z2SoundObjBaseF10JAISoundIDUlSc.s +++ /dev/null @@ -1,111 +0,0 @@ -lbl_802BE144: -/* 802BE144 94 21 FF B0 */ stwu r1, -0x50(r1) -/* 802BE148 7C 08 02 A6 */ mflr r0 -/* 802BE14C 90 01 00 54 */ stw r0, 0x54(r1) -/* 802BE150 DB E1 00 40 */ stfd f31, 0x40(r1) -/* 802BE154 F3 E1 00 48 */ psq_st f31, 72(r1), 0, 0 /* qr0 */ -/* 802BE158 39 61 00 40 */ addi r11, r1, 0x40 -/* 802BE15C 48 0A 40 7D */ bl _savegpr_28 -/* 802BE160 7C 7D 1B 78 */ mr r29, r3 -/* 802BE164 7C 9E 23 78 */ mr r30, r4 -/* 802BE168 7C BF 2B 78 */ mr r31, r5 -/* 802BE16C 7C DC 33 78 */ mr r28, r6 -/* 802BE170 88 03 00 1F */ lbz r0, 0x1f(r3) -/* 802BE174 28 00 00 00 */ cmplwi r0, 0 -/* 802BE178 40 82 00 0C */ bne lbl_802BE184 -/* 802BE17C 38 60 00 00 */ li r3, 0 -/* 802BE180 48 00 01 34 */ b lbl_802BE2B4 -lbl_802BE184: -/* 802BE184 80 1E 00 00 */ lwz r0, 0(r30) -/* 802BE188 90 01 00 18 */ stw r0, 0x18(r1) -/* 802BE18C 80 6D 86 08 */ lwz r3, __OSReport_disable-0x10(r13) -/* 802BE190 38 81 00 18 */ addi r4, r1, 0x18 -/* 802BE194 4B FF 04 1D */ bl isSoundCulling__7Z2SeMgrF10JAISoundID -/* 802BE198 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 802BE19C 41 82 00 0C */ beq lbl_802BE1A8 -/* 802BE1A0 38 60 00 00 */ li r3, 0 -/* 802BE1A4 48 00 01 10 */ b lbl_802BE2B4 -lbl_802BE1A8: -/* 802BE1A8 28 1F 00 00 */ cmplwi r31, 0 -/* 802BE1AC 40 82 00 08 */ bne lbl_802BE1B4 -/* 802BE1B0 A3 FD 00 1C */ lhz r31, 0x1c(r29) -lbl_802BE1B4: -/* 802BE1B4 7F 80 07 75 */ extsb. r0, r28 -/* 802BE1B8 40 80 00 08 */ bge lbl_802BE1C0 -/* 802BE1BC 8B 9D 00 1E */ lbz r28, 0x1e(r29) -lbl_802BE1C0: -/* 802BE1C0 7F 80 07 74 */ extsb r0, r28 -/* 802BE1C4 C8 22 C1 48 */ lfd f1, lit_3564(r2) -/* 802BE1C8 6C 00 80 00 */ xoris r0, r0, 0x8000 -/* 802BE1CC 90 01 00 24 */ stw r0, 0x24(r1) -/* 802BE1D0 3C 00 43 30 */ lis r0, 0x4330 -/* 802BE1D4 90 01 00 20 */ stw r0, 0x20(r1) -/* 802BE1D8 C8 01 00 20 */ lfd f0, 0x20(r1) -/* 802BE1DC EC 20 08 28 */ fsubs f1, f0, f1 -/* 802BE1E0 C0 02 C1 38 */ lfs f0, lit_3559(r2) -/* 802BE1E4 EF E1 00 24 */ fdivs f31, f1, f0 -/* 802BE1E8 80 1E 00 00 */ lwz r0, 0(r30) -/* 802BE1EC 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BE1F0 7F A3 EB 78 */ mr r3, r29 -/* 802BE1F4 38 81 00 14 */ addi r4, r1, 0x14 -/* 802BE1F8 4B FE D0 5D */ bl getHandleSoundID__14Z2SoundHandlesF10JAISoundID -/* 802BE1FC 7C 7C 1B 79 */ or. r28, r3, r3 -/* 802BE200 41 82 00 30 */ beq lbl_802BE230 -/* 802BE204 80 1E 00 00 */ lwz r0, 0(r30) -/* 802BE208 90 01 00 10 */ stw r0, 0x10(r1) -/* 802BE20C 80 6D 85 CC */ lwz r3, __OSReport_disable-0x4C(r13) -/* 802BE210 38 81 00 10 */ addi r4, r1, 0x10 -/* 802BE214 4B FF D8 B5 */ bl getSwBit__11Z2SoundInfoCF10JAISoundID -/* 802BE218 54 60 04 63 */ rlwinm. r0, r3, 0, 0x11, 0x11 -/* 802BE21C 41 82 00 0C */ beq lbl_802BE228 -/* 802BE220 3B 80 00 00 */ li r28, 0 -/* 802BE224 48 00 00 0C */ b lbl_802BE230 -lbl_802BE228: -/* 802BE228 38 60 00 00 */ li r3, 0 -/* 802BE22C 48 00 00 88 */ b lbl_802BE2B4 -lbl_802BE230: -/* 802BE230 28 1C 00 00 */ cmplwi r28, 0 -/* 802BE234 40 82 00 10 */ bne lbl_802BE244 -/* 802BE238 7F A3 EB 78 */ mr r3, r29 -/* 802BE23C 4B FE D0 9D */ bl getFreeHandle__14Z2SoundHandlesFv -/* 802BE240 7C 7C 1B 78 */ mr r28, r3 -lbl_802BE244: -/* 802BE244 28 1C 00 00 */ cmplwi r28, 0 -/* 802BE248 40 82 00 1C */ bne lbl_802BE264 -/* 802BE24C 80 1E 00 00 */ lwz r0, 0(r30) -/* 802BE250 90 01 00 0C */ stw r0, 0xc(r1) -/* 802BE254 7F A3 EB 78 */ mr r3, r29 -/* 802BE258 38 81 00 0C */ addi r4, r1, 0xc -/* 802BE25C 4B FE D1 75 */ bl getLowPrioSound__14Z2SoundHandlesF10JAISoundID -/* 802BE260 7C 7C 1B 78 */ mr r28, r3 -lbl_802BE264: -/* 802BE264 28 1C 00 00 */ cmplwi r28, 0 -/* 802BE268 41 82 00 48 */ beq lbl_802BE2B0 -/* 802BE26C 80 1E 00 00 */ lwz r0, 0(r30) -/* 802BE270 90 01 00 08 */ stw r0, 8(r1) -/* 802BE274 80 7D 00 14 */ lwz r3, 0x14(r29) -/* 802BE278 38 81 00 08 */ addi r4, r1, 8 -/* 802BE27C 7F 85 E3 78 */ mr r5, r28 -/* 802BE280 80 DD 00 18 */ lwz r6, 0x18(r29) -/* 802BE284 7F E7 FB 78 */ mr r7, r31 -/* 802BE288 FC 20 F8 90 */ fmr f1, f31 -/* 802BE28C C0 42 C1 3C */ lfs f2, lit_3560(r2) -/* 802BE290 FC 60 10 90 */ fmr f3, f2 -/* 802BE294 C0 82 C1 40 */ lfs f4, lit_3561(r2) -/* 802BE298 FC A0 20 90 */ fmr f5, f4 -/* 802BE29C 39 00 00 00 */ li r8, 0 -/* 802BE2A0 81 83 00 00 */ lwz r12, 0(r3) -/* 802BE2A4 81 8C 00 10 */ lwz r12, 0x10(r12) -/* 802BE2A8 7D 89 03 A6 */ mtctr r12 -/* 802BE2AC 4E 80 04 21 */ bctrl -lbl_802BE2B0: -/* 802BE2B0 7F 83 E3 78 */ mr r3, r28 -lbl_802BE2B4: -/* 802BE2B4 E3 E1 00 48 */ psq_l f31, 72(r1), 0, 0 /* qr0 */ -/* 802BE2B8 CB E1 00 40 */ lfd f31, 0x40(r1) -/* 802BE2BC 39 61 00 40 */ addi r11, r1, 0x40 -/* 802BE2C0 48 0A 3F 65 */ bl _restgpr_28 -/* 802BE2C4 80 01 00 54 */ lwz r0, 0x54(r1) -/* 802BE2C8 7C 08 03 A6 */ mtlr r0 -/* 802BE2CC 38 21 00 50 */ addi r1, r1, 0x50 -/* 802BE2D0 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/startSound__16Z2SoundObjSimpleF10JAISoundIDUlSc.s b/asm/Z2AudioLib/Z2SoundObject/startSound__16Z2SoundObjSimpleF10JAISoundIDUlSc.s deleted file mode 100644 index 0ecdf6fbba7..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/startSound__16Z2SoundObjSimpleF10JAISoundIDUlSc.s +++ /dev/null @@ -1,70 +0,0 @@ -lbl_802BE8A0: -/* 802BE8A0 94 21 FF C0 */ stwu r1, -0x40(r1) -/* 802BE8A4 7C 08 02 A6 */ mflr r0 -/* 802BE8A8 90 01 00 44 */ stw r0, 0x44(r1) -/* 802BE8AC DB E1 00 30 */ stfd f31, 0x30(r1) -/* 802BE8B0 F3 E1 00 38 */ psq_st f31, 56(r1), 0, 0 /* qr0 */ -/* 802BE8B4 39 61 00 30 */ addi r11, r1, 0x30 -/* 802BE8B8 48 0A 39 25 */ bl _savegpr_29 -/* 802BE8BC 7C 9D 23 78 */ mr r29, r4 -/* 802BE8C0 7C BE 2B 78 */ mr r30, r5 -/* 802BE8C4 80 04 00 00 */ lwz r0, 0(r4) -/* 802BE8C8 90 01 00 08 */ stw r0, 8(r1) -/* 802BE8CC 38 81 00 08 */ addi r4, r1, 8 -/* 802BE8D0 4B FF F8 75 */ bl startSound__14Z2SoundObjBaseF10JAISoundIDUlSc -/* 802BE8D4 7C 7F 1B 78 */ mr r31, r3 -/* 802BE8D8 80 7D 00 00 */ lwz r3, 0(r29) -/* 802BE8DC 3C 03 FF FE */ addis r0, r3, 0xfffe -/* 802BE8E0 28 00 00 C7 */ cmplwi r0, 0xc7 -/* 802BE8E4 40 82 00 A8 */ bne lbl_802BE98C -/* 802BE8E8 28 1F 00 00 */ cmplwi r31, 0 -/* 802BE8EC 41 82 00 A0 */ beq lbl_802BE98C -/* 802BE8F0 80 1F 00 00 */ lwz r0, 0(r31) -/* 802BE8F4 28 00 00 00 */ cmplwi r0, 0 -/* 802BE8F8 41 82 00 94 */ beq lbl_802BE98C -/* 802BE8FC C8 22 C1 68 */ lfd f1, lit_3828(r2) -/* 802BE900 93 C1 00 14 */ stw r30, 0x14(r1) -/* 802BE904 3C 00 43 30 */ lis r0, 0x4330 -/* 802BE908 90 01 00 10 */ stw r0, 0x10(r1) -/* 802BE90C C8 01 00 10 */ lfd f0, 0x10(r1) -/* 802BE910 EC 20 08 28 */ fsubs f1, f0, f1 -/* 802BE914 C0 42 C1 50 */ lfs f2, lit_3821(r2) -/* 802BE918 C0 62 C1 38 */ lfs f3, lit_3559(r2) -/* 802BE91C C0 82 C1 54 */ lfs f4, lit_3822(r2) -/* 802BE920 C0 A2 C1 58 */ lfs f5, lit_3823(r2) -/* 802BE924 C0 C2 C1 3C */ lfs f6, lit_3560(r2) -/* 802BE928 38 60 00 01 */ li r3, 1 -/* 802BE92C 4B FE AD C9 */ bl getParamByExp__6Z2CalcFffffffQ26Z2Calc9CurveSign -/* 802BE930 FF E0 08 90 */ fmr f31, f1 -/* 802BE934 C8 22 C1 68 */ lfd f1, lit_3828(r2) -/* 802BE938 93 C1 00 1C */ stw r30, 0x1c(r1) -/* 802BE93C 3C 00 43 30 */ lis r0, 0x4330 -/* 802BE940 90 01 00 18 */ stw r0, 0x18(r1) -/* 802BE944 C8 01 00 18 */ lfd f0, 0x18(r1) -/* 802BE948 EC 20 08 28 */ fsubs f1, f0, f1 -/* 802BE94C C0 42 C1 50 */ lfs f2, lit_3821(r2) -/* 802BE950 C0 62 C1 38 */ lfs f3, lit_3559(r2) -/* 802BE954 C0 82 C1 54 */ lfs f4, lit_3822(r2) -/* 802BE958 C0 A2 C1 5C */ lfs f5, lit_3824(r2) -/* 802BE95C C0 C2 C1 60 */ lfs f6, lit_3825(r2) -/* 802BE960 38 60 00 01 */ li r3, 1 -/* 802BE964 4B FE AD 91 */ bl getParamByExp__6Z2CalcFffffffQ26Z2Calc9CurveSign -/* 802BE968 80 7F 00 00 */ lwz r3, 0(r31) -/* 802BE96C 38 63 00 48 */ addi r3, r3, 0x48 -/* 802BE970 38 80 00 00 */ li r4, 0 -/* 802BE974 4B FE 44 99 */ bl movePitch__18JAISoundParamsMoveFfUl -/* 802BE978 80 7F 00 00 */ lwz r3, 0(r31) -/* 802BE97C 38 63 00 48 */ addi r3, r3, 0x48 -/* 802BE980 FC 20 F8 90 */ fmr f1, f31 -/* 802BE984 38 80 00 00 */ li r4, 0 -/* 802BE988 4B FE 44 2D */ bl moveVolume__18JAISoundParamsMoveFfUl -lbl_802BE98C: -/* 802BE98C 7F E3 FB 78 */ mr r3, r31 -/* 802BE990 E3 E1 00 38 */ psq_l f31, 56(r1), 0, 0 /* qr0 */ -/* 802BE994 CB E1 00 30 */ lfd f31, 0x30(r1) -/* 802BE998 39 61 00 30 */ addi r11, r1, 0x30 -/* 802BE99C 48 0A 38 8D */ bl _restgpr_29 -/* 802BE9A0 80 01 00 44 */ lwz r0, 0x44(r1) -/* 802BE9A4 7C 08 03 A6 */ mtlr r0 -/* 802BE9A8 38 21 00 40 */ addi r1, r1, 0x40 -/* 802BE9AC 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/startSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc.s b/asm/Z2AudioLib/Z2SoundObject/startSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc.s deleted file mode 100644 index 8cbeffe5fba..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/startSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc.s +++ /dev/null @@ -1,40 +0,0 @@ -lbl_802BE714: -/* 802BE714 94 21 FF E0 */ stwu r1, -0x20(r1) -/* 802BE718 7C 08 02 A6 */ mflr r0 -/* 802BE71C 90 01 00 24 */ stw r0, 0x24(r1) -/* 802BE720 39 61 00 20 */ addi r11, r1, 0x20 -/* 802BE724 48 0A 3A B9 */ bl _savegpr_29 -/* 802BE728 7C 7D 1B 78 */ mr r29, r3 -/* 802BE72C 83 E3 00 18 */ lwz r31, 0x18(r3) -/* 802BE730 38 00 00 00 */ li r0, 0 -/* 802BE734 90 03 00 18 */ stw r0, 0x18(r3) -/* 802BE738 80 04 00 00 */ lwz r0, 0(r4) -/* 802BE73C 90 01 00 08 */ stw r0, 8(r1) -/* 802BE740 38 81 00 08 */ addi r4, r1, 8 -/* 802BE744 4B FF FA 01 */ bl startSound__14Z2SoundObjBaseF10JAISoundIDUlSc -/* 802BE748 7C 7E 1B 78 */ mr r30, r3 -/* 802BE74C 28 1F 00 00 */ cmplwi r31, 0 -/* 802BE750 41 82 00 3C */ beq lbl_802BE78C -/* 802BE754 28 1E 00 00 */ cmplwi r30, 0 -/* 802BE758 41 82 00 34 */ beq lbl_802BE78C -/* 802BE75C 80 7E 00 00 */ lwz r3, 0(r30) -/* 802BE760 28 03 00 00 */ cmplwi r3, 0 -/* 802BE764 41 82 00 28 */ beq lbl_802BE78C -/* 802BE768 4B FE 3C E5 */ bl acceptsNewAudible__8JAISoundCFv -/* 802BE76C 54 60 06 3F */ clrlwi. r0, r3, 0x18 -/* 802BE770 41 82 00 1C */ beq lbl_802BE78C -/* 802BE774 80 7E 00 00 */ lwz r3, 0(r30) -/* 802BE778 7F E4 FB 78 */ mr r4, r31 -/* 802BE77C 38 BD 00 20 */ addi r5, r29, 0x20 -/* 802BE780 38 C0 00 00 */ li r6, 0 -/* 802BE784 38 E0 00 00 */ li r7, 0 -/* 802BE788 4B FE 3C ED */ bl func_802A2474 -lbl_802BE78C: -/* 802BE78C 93 FD 00 18 */ stw r31, 0x18(r29) -/* 802BE790 7F C3 F3 78 */ mr r3, r30 -/* 802BE794 39 61 00 20 */ addi r11, r1, 0x20 -/* 802BE798 48 0A 3A 91 */ bl _restgpr_29 -/* 802BE79C 80 01 00 24 */ lwz r0, 0x24(r1) -/* 802BE7A0 7C 08 03 A6 */ mtlr r0 -/* 802BE7A4 38 21 00 20 */ addi r1, r1, 0x20 -/* 802BE7A8 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/stopOK__14Z2SoundObjBaseFR17Z2SoundHandlePool.s b/asm/Z2AudioLib/Z2SoundObject/stopOK__14Z2SoundObjBaseFR17Z2SoundHandlePool.s deleted file mode 100644 index b8631e97a96..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/stopOK__14Z2SoundObjBaseFR17Z2SoundHandlePool.s +++ /dev/null @@ -1,17 +0,0 @@ -lbl_802BE104: -/* 802BE104 94 21 FF F0 */ stwu r1, -0x10(r1) -/* 802BE108 7C 08 02 A6 */ mflr r0 -/* 802BE10C 90 01 00 14 */ stw r0, 0x14(r1) -/* 802BE110 80 64 00 00 */ lwz r3, 0(r4) -/* 802BE114 80 03 00 18 */ lwz r0, 0x18(r3) -/* 802BE118 90 01 00 08 */ stw r0, 8(r1) -/* 802BE11C 80 6D 85 CC */ lwz r3, __OSReport_disable-0x4C(r13) -/* 802BE120 38 81 00 08 */ addi r4, r1, 8 -/* 802BE124 4B FF D9 A5 */ bl getSwBit__11Z2SoundInfoCF10JAISoundID -/* 802BE128 54 60 04 20 */ rlwinm r0, r3, 0, 0x10, 0x10 -/* 802BE12C 7C 00 00 34 */ cntlzw r0, r0 -/* 802BE130 54 03 D9 7E */ srwi r3, r0, 5 -/* 802BE134 80 01 00 14 */ lwz r0, 0x14(r1) -/* 802BE138 7C 08 03 A6 */ mtlr r0 -/* 802BE13C 38 21 00 10 */ addi r1, r1, 0x10 -/* 802BE140 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/updateAnime__15Z2SoundObjAnimeFff.s b/asm/Z2AudioLib/Z2SoundObject/updateAnime__15Z2SoundObjAnimeFff.s deleted file mode 100644 index 86246bbc793..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/updateAnime__15Z2SoundObjAnimeFff.s +++ /dev/null @@ -1,307 +0,0 @@ -lbl_802BEED4: -/* 802BEED4 94 21 FF C0 */ stwu r1, -0x40(r1) -/* 802BEED8 7C 08 02 A6 */ mflr r0 -/* 802BEEDC 90 01 00 44 */ stw r0, 0x44(r1) -/* 802BEEE0 DB E1 00 30 */ stfd f31, 0x30(r1) -/* 802BEEE4 F3 E1 00 38 */ psq_st f31, 56(r1), 0, 0 /* qr0 */ -/* 802BEEE8 DB C1 00 20 */ stfd f30, 0x20(r1) -/* 802BEEEC F3 C1 00 28 */ psq_st f30, 40(r1), 0, 0 /* qr0 */ -/* 802BEEF0 39 61 00 20 */ addi r11, r1, 0x20 -/* 802BEEF4 48 0A 32 E9 */ bl _savegpr_29 -/* 802BEEF8 7C 7F 1B 78 */ mr r31, r3 -/* 802BEEFC FF C0 08 90 */ fmr f30, f1 -/* 802BEF00 FF E0 10 90 */ fmr f31, f2 -/* 802BEF04 3B C0 00 00 */ li r30, 0 -/* 802BEF08 48 00 00 98 */ b lbl_802BEFA0 -lbl_802BEF0C: -/* 802BEF0C 7F E3 FB 78 */ mr r3, r31 -/* 802BEF10 7F C4 F3 78 */ mr r4, r30 -/* 802BEF14 48 01 D2 F9 */ bl getNthLink__10JSUPtrListCFUl -/* 802BEF18 28 03 00 00 */ cmplwi r3, 0 -/* 802BEF1C 41 82 00 08 */ beq lbl_802BEF24 -/* 802BEF20 38 63 FF FC */ addi r3, r3, -4 -lbl_802BEF24: -/* 802BEF24 80 03 00 00 */ lwz r0, 0(r3) -/* 802BEF28 28 00 00 00 */ cmplwi r0, 0 -/* 802BEF2C 41 82 00 70 */ beq lbl_802BEF9C -/* 802BEF30 7F E3 FB 78 */ mr r3, r31 -/* 802BEF34 7F C4 F3 78 */ mr r4, r30 -/* 802BEF38 48 01 D2 D5 */ bl getNthLink__10JSUPtrListCFUl -/* 802BEF3C 28 03 00 00 */ cmplwi r3, 0 -/* 802BEF40 41 82 00 08 */ beq lbl_802BEF48 -/* 802BEF44 38 63 FF FC */ addi r3, r3, -4 -lbl_802BEF48: -/* 802BEF48 80 63 00 00 */ lwz r3, 0(r3) -/* 802BEF4C 88 03 00 1F */ lbz r0, 0x1f(r3) -/* 802BEF50 54 00 E7 BF */ rlwinm. r0, r0, 0x1c, 0x1e, 0x1f -/* 802BEF54 41 82 00 48 */ beq lbl_802BEF9C -/* 802BEF58 83 BF 00 18 */ lwz r29, 0x18(r31) -/* 802BEF5C 7F E3 FB 78 */ mr r3, r31 -/* 802BEF60 7F C4 F3 78 */ mr r4, r30 -/* 802BEF64 48 01 D2 A9 */ bl getNthLink__10JSUPtrListCFUl -/* 802BEF68 28 03 00 00 */ cmplwi r3, 0 -/* 802BEF6C 41 82 00 08 */ beq lbl_802BEF74 -/* 802BEF70 38 63 FF FC */ addi r3, r3, -4 -lbl_802BEF74: -/* 802BEF74 80 63 00 00 */ lwz r3, 0(r3) -/* 802BEF78 80 63 00 08 */ lwz r3, 8(r3) -/* 802BEF7C 28 03 00 00 */ cmplwi r3, 0 -/* 802BEF80 41 82 00 1C */ beq lbl_802BEF9C -/* 802BEF84 C0 1D 00 00 */ lfs f0, 0(r29) -/* 802BEF88 D0 03 00 04 */ stfs f0, 4(r3) -/* 802BEF8C C0 1D 00 04 */ lfs f0, 4(r29) -/* 802BEF90 D0 03 00 08 */ stfs f0, 8(r3) -/* 802BEF94 C0 1D 00 08 */ lfs f0, 8(r29) -/* 802BEF98 D0 03 00 0C */ stfs f0, 0xc(r3) -lbl_802BEF9C: -/* 802BEF9C 3B DE 00 01 */ addi r30, r30, 1 -lbl_802BEFA0: -/* 802BEFA0 80 1F 00 08 */ lwz r0, 8(r31) -/* 802BEFA4 7C 1E 00 00 */ cmpw r30, r0 -/* 802BEFA8 41 80 FF 64 */ blt lbl_802BEF0C -/* 802BEFAC 80 9F 00 20 */ lwz r4, 0x20(r31) -/* 802BEFB0 28 04 00 00 */ cmplwi r4, 0 -/* 802BEFB4 41 82 03 28 */ beq lbl_802BF2DC -/* 802BEFB8 80 64 00 04 */ lwz r3, 4(r4) -/* 802BEFBC 28 03 00 00 */ cmplwi r3, 0 -/* 802BEFC0 41 82 00 18 */ beq lbl_802BEFD8 -/* 802BEFC4 81 83 00 00 */ lwz r12, 0(r3) -/* 802BEFC8 81 8C 00 10 */ lwz r12, 0x10(r12) -/* 802BEFCC 7D 89 03 A6 */ mtctr r12 -/* 802BEFD0 4E 80 04 21 */ bctrl -/* 802BEFD4 48 00 00 08 */ b lbl_802BEFDC -lbl_802BEFD8: -/* 802BEFD8 A0 64 00 00 */ lhz r3, 0(r4) -lbl_802BEFDC: -/* 802BEFDC 54 60 04 3F */ clrlwi. r0, r3, 0x10 -/* 802BEFE0 40 82 00 08 */ bne lbl_802BEFE8 -/* 802BEFE4 48 00 02 F8 */ b lbl_802BF2DC -lbl_802BEFE8: -/* 802BEFE8 88 1F 00 44 */ lbz r0, 0x44(r31) -/* 802BEFEC 28 00 00 00 */ cmplwi r0, 0 -/* 802BEFF0 40 82 01 8C */ bne lbl_802BF17C -/* 802BEFF4 C0 1F 00 28 */ lfs f0, 0x28(r31) -/* 802BEFF8 FC 1E 00 40 */ fcmpo cr0, f30, f0 -/* 802BEFFC 40 80 00 5C */ bge lbl_802BF058 -/* 802BF000 48 00 00 20 */ b lbl_802BF020 -lbl_802BF004: -/* 802BF004 7F E3 FB 78 */ mr r3, r31 -/* 802BF008 80 9F 00 18 */ lwz r4, 0x18(r31) -/* 802BF00C FC 20 F8 90 */ fmr f1, f31 -/* 802BF010 80 BF 00 14 */ lwz r5, 0x14(r31) -/* 802BF014 A0 DF 00 1C */ lhz r6, 0x1c(r31) -/* 802BF018 88 FF 00 1E */ lbz r7, 0x1e(r31) -/* 802BF01C 48 00 06 45 */ bl func_802BF660 -lbl_802BF020: -/* 802BF020 80 7F 00 40 */ lwz r3, 0x40(r31) -/* 802BF024 80 1F 00 38 */ lwz r0, 0x38(r31) -/* 802BF028 7C 03 00 00 */ cmpw r3, r0 -/* 802BF02C 41 80 FF D8 */ blt lbl_802BF004 -/* 802BF030 80 1F 00 34 */ lwz r0, 0x34(r31) -/* 802BF034 90 1F 00 40 */ stw r0, 0x40(r31) -/* 802BF038 D3 DF 00 28 */ stfs f30, 0x28(r31) -/* 802BF03C 80 9F 00 3C */ lwz r4, 0x3c(r31) -/* 802BF040 3C 60 00 01 */ lis r3, 0x0001 /* 0x0000FFFF@ha */ -/* 802BF044 38 03 FF FF */ addi r0, r3, 0xFFFF /* 0x0000FFFF@l */ -/* 802BF048 7C 04 00 00 */ cmpw r4, r0 -/* 802BF04C 40 80 00 0C */ bge lbl_802BF058 -/* 802BF050 38 04 00 01 */ addi r0, r4, 1 -/* 802BF054 90 1F 00 3C */ stw r0, 0x3c(r31) -lbl_802BF058: -/* 802BF058 7F E3 FB 78 */ mr r3, r31 -/* 802BF05C FC 20 F0 90 */ fmr f1, f30 -/* 802BF060 FC 40 F8 90 */ fmr f2, f31 -/* 802BF064 48 00 02 A1 */ bl updateSoundLifeTime___15Z2SoundObjAnimeFff -/* 802BF068 48 00 00 20 */ b lbl_802BF088 -lbl_802BF06C: -/* 802BF06C 7F E3 FB 78 */ mr r3, r31 -/* 802BF070 80 9F 00 18 */ lwz r4, 0x18(r31) -/* 802BF074 FC 20 F8 90 */ fmr f1, f31 -/* 802BF078 80 BF 00 14 */ lwz r5, 0x14(r31) -/* 802BF07C A0 DF 00 1C */ lhz r6, 0x1c(r31) -/* 802BF080 88 FF 00 1E */ lbz r7, 0x1e(r31) -/* 802BF084 48 00 05 DD */ bl func_802BF660 -lbl_802BF088: -/* 802BF088 80 9F 00 20 */ lwz r4, 0x20(r31) -/* 802BF08C 80 64 00 04 */ lwz r3, 4(r4) -/* 802BF090 28 03 00 00 */ cmplwi r3, 0 -/* 802BF094 41 82 00 18 */ beq lbl_802BF0AC -/* 802BF098 81 83 00 00 */ lwz r12, 0(r3) -/* 802BF09C 81 8C 00 10 */ lwz r12, 0x10(r12) -/* 802BF0A0 7D 89 03 A6 */ mtctr r12 -/* 802BF0A4 4E 80 04 21 */ bctrl -/* 802BF0A8 48 00 00 08 */ b lbl_802BF0B0 -lbl_802BF0AC: -/* 802BF0AC A0 64 00 00 */ lhz r3, 0(r4) -lbl_802BF0B0: -/* 802BF0B0 80 BF 00 40 */ lwz r5, 0x40(r31) -/* 802BF0B4 54 60 04 3E */ clrlwi r0, r3, 0x10 -/* 802BF0B8 7C 05 00 00 */ cmpw r5, r0 -/* 802BF0BC 40 80 02 1C */ bge lbl_802BF2D8 -/* 802BF0C0 80 9F 00 20 */ lwz r4, 0x20(r31) -/* 802BF0C4 80 64 00 04 */ lwz r3, 4(r4) -/* 802BF0C8 28 03 00 00 */ cmplwi r3, 0 -/* 802BF0CC 41 82 00 18 */ beq lbl_802BF0E4 -/* 802BF0D0 81 83 00 00 */ lwz r12, 0(r3) -/* 802BF0D4 81 8C 00 0C */ lwz r12, 0xc(r12) -/* 802BF0D8 7D 89 03 A6 */ mtctr r12 -/* 802BF0DC 4E 80 04 21 */ bctrl -/* 802BF0E0 48 00 00 10 */ b lbl_802BF0F0 -lbl_802BF0E4: -/* 802BF0E4 54 A3 28 34 */ slwi r3, r5, 5 -/* 802BF0E8 38 63 00 08 */ addi r3, r3, 8 -/* 802BF0EC 7C 64 1A 14 */ add r3, r4, r3 -lbl_802BF0F0: -/* 802BF0F0 80 03 00 10 */ lwz r0, 0x10(r3) -/* 802BF0F4 54 00 06 73 */ rlwinm. r0, r0, 0, 0x19, 0x19 -/* 802BF0F8 41 82 00 64 */ beq lbl_802BF15C -/* 802BF0FC C0 23 00 04 */ lfs f1, 4(r3) -/* 802BF100 C0 03 00 08 */ lfs f0, 8(r3) -/* 802BF104 FC 01 00 00 */ fcmpu cr0, f1, f0 -/* 802BF108 40 82 00 0C */ bne lbl_802BF114 -/* 802BF10C 38 00 00 01 */ li r0, 1 -/* 802BF110 48 00 00 60 */ b lbl_802BF170 -lbl_802BF114: -/* 802BF114 FC 01 00 40 */ fcmpo cr0, f1, f0 -/* 802BF118 40 81 00 20 */ ble lbl_802BF138 -/* 802BF11C FC 00 F0 40 */ fcmpo cr0, f0, f30 -/* 802BF120 4C 40 13 82 */ cror 2, 0, 2 -/* 802BF124 40 82 00 30 */ bne lbl_802BF154 -/* 802BF128 FC 1E 08 40 */ fcmpo cr0, f30, f1 -/* 802BF12C 40 80 00 28 */ bge lbl_802BF154 -/* 802BF130 38 00 00 01 */ li r0, 1 -/* 802BF134 48 00 00 3C */ b lbl_802BF170 -lbl_802BF138: -/* 802BF138 FC 01 F0 40 */ fcmpo cr0, f1, f30 -/* 802BF13C 4C 40 13 82 */ cror 2, 0, 2 -/* 802BF140 40 82 00 14 */ bne lbl_802BF154 -/* 802BF144 FC 1E 00 40 */ fcmpo cr0, f30, f0 -/* 802BF148 40 80 00 0C */ bge lbl_802BF154 -/* 802BF14C 38 00 00 01 */ li r0, 1 -/* 802BF150 48 00 00 20 */ b lbl_802BF170 -lbl_802BF154: -/* 802BF154 38 00 00 00 */ li r0, 0 -/* 802BF158 48 00 00 18 */ b lbl_802BF170 -lbl_802BF15C: -/* 802BF15C C0 03 00 04 */ lfs f0, 4(r3) -/* 802BF160 FC 1E 00 40 */ fcmpo cr0, f30, f0 -/* 802BF164 4C 41 13 82 */ cror 2, 1, 2 -/* 802BF168 7C 00 00 26 */ mfcr r0 -/* 802BF16C 54 00 1F FE */ rlwinm r0, r0, 3, 0x1f, 0x1f -lbl_802BF170: -/* 802BF170 54 00 06 3F */ clrlwi. r0, r0, 0x18 -/* 802BF174 40 82 FE F8 */ bne lbl_802BF06C -/* 802BF178 48 00 01 60 */ b lbl_802BF2D8 -lbl_802BF17C: -/* 802BF17C C0 1F 00 28 */ lfs f0, 0x28(r31) -/* 802BF180 FC 1E 00 40 */ fcmpo cr0, f30, f0 -/* 802BF184 40 81 00 60 */ ble lbl_802BF1E4 -/* 802BF188 48 00 00 20 */ b lbl_802BF1A8 -lbl_802BF18C: -/* 802BF18C 7F E3 FB 78 */ mr r3, r31 -/* 802BF190 80 9F 00 18 */ lwz r4, 0x18(r31) -/* 802BF194 FC 20 F8 90 */ fmr f1, f31 -/* 802BF198 80 BF 00 14 */ lwz r5, 0x14(r31) -/* 802BF19C A0 DF 00 1C */ lhz r6, 0x1c(r31) -/* 802BF1A0 88 FF 00 1E */ lbz r7, 0x1e(r31) -/* 802BF1A4 48 00 04 BD */ bl func_802BF660 -lbl_802BF1A8: -/* 802BF1A8 80 7F 00 40 */ lwz r3, 0x40(r31) -/* 802BF1AC 80 1F 00 34 */ lwz r0, 0x34(r31) -/* 802BF1B0 7C 03 00 00 */ cmpw r3, r0 -/* 802BF1B4 40 80 FF D8 */ bge lbl_802BF18C -/* 802BF1B8 80 7F 00 38 */ lwz r3, 0x38(r31) -/* 802BF1BC 38 03 FF FF */ addi r0, r3, -1 -/* 802BF1C0 90 1F 00 40 */ stw r0, 0x40(r31) -/* 802BF1C4 D3 DF 00 28 */ stfs f30, 0x28(r31) -/* 802BF1C8 80 9F 00 3C */ lwz r4, 0x3c(r31) -/* 802BF1CC 3C 60 00 01 */ lis r3, 0x0001 /* 0x0000FFFF@ha */ -/* 802BF1D0 38 03 FF FF */ addi r0, r3, 0xFFFF /* 0x0000FFFF@l */ -/* 802BF1D4 7C 04 00 00 */ cmpw r4, r0 -/* 802BF1D8 40 80 00 0C */ bge lbl_802BF1E4 -/* 802BF1DC 38 04 00 01 */ addi r0, r4, 1 -/* 802BF1E0 90 1F 00 3C */ stw r0, 0x3c(r31) -lbl_802BF1E4: -/* 802BF1E4 7F E3 FB 78 */ mr r3, r31 -/* 802BF1E8 FC 20 F0 90 */ fmr f1, f30 -/* 802BF1EC FC 40 F8 90 */ fmr f2, f31 -/* 802BF1F0 48 00 01 15 */ bl updateSoundLifeTime___15Z2SoundObjAnimeFff -/* 802BF1F4 48 00 00 20 */ b lbl_802BF214 -lbl_802BF1F8: -/* 802BF1F8 7F E3 FB 78 */ mr r3, r31 -/* 802BF1FC 80 9F 00 18 */ lwz r4, 0x18(r31) -/* 802BF200 FC 20 F8 90 */ fmr f1, f31 -/* 802BF204 80 BF 00 14 */ lwz r5, 0x14(r31) -/* 802BF208 A0 DF 00 1C */ lhz r6, 0x1c(r31) -/* 802BF20C 88 FF 00 1E */ lbz r7, 0x1e(r31) -/* 802BF210 48 00 04 51 */ bl func_802BF660 -lbl_802BF214: -/* 802BF214 80 BF 00 40 */ lwz r5, 0x40(r31) -/* 802BF218 2C 05 00 00 */ cmpwi r5, 0 -/* 802BF21C 41 80 00 BC */ blt lbl_802BF2D8 -/* 802BF220 80 9F 00 20 */ lwz r4, 0x20(r31) -/* 802BF224 80 64 00 04 */ lwz r3, 4(r4) -/* 802BF228 28 03 00 00 */ cmplwi r3, 0 -/* 802BF22C 41 82 00 18 */ beq lbl_802BF244 -/* 802BF230 81 83 00 00 */ lwz r12, 0(r3) -/* 802BF234 81 8C 00 0C */ lwz r12, 0xc(r12) -/* 802BF238 7D 89 03 A6 */ mtctr r12 -/* 802BF23C 4E 80 04 21 */ bctrl -/* 802BF240 48 00 00 10 */ b lbl_802BF250 -lbl_802BF244: -/* 802BF244 54 A3 28 34 */ slwi r3, r5, 5 -/* 802BF248 38 63 00 08 */ addi r3, r3, 8 -/* 802BF24C 7C 64 1A 14 */ add r3, r4, r3 -lbl_802BF250: -/* 802BF250 80 03 00 10 */ lwz r0, 0x10(r3) -/* 802BF254 54 00 06 73 */ rlwinm. r0, r0, 0, 0x19, 0x19 -/* 802BF258 41 82 00 64 */ beq lbl_802BF2BC -/* 802BF25C C0 23 00 04 */ lfs f1, 4(r3) -/* 802BF260 C0 03 00 08 */ lfs f0, 8(r3) -/* 802BF264 FC 01 00 00 */ fcmpu cr0, f1, f0 -/* 802BF268 40 82 00 0C */ bne lbl_802BF274 -/* 802BF26C 38 00 00 01 */ li r0, 1 -/* 802BF270 48 00 00 60 */ b lbl_802BF2D0 -lbl_802BF274: -/* 802BF274 FC 01 00 40 */ fcmpo cr0, f1, f0 -/* 802BF278 40 81 00 20 */ ble lbl_802BF298 -/* 802BF27C FC 00 F0 40 */ fcmpo cr0, f0, f30 -/* 802BF280 4C 40 13 82 */ cror 2, 0, 2 -/* 802BF284 40 82 00 30 */ bne lbl_802BF2B4 -/* 802BF288 FC 1E 08 40 */ fcmpo cr0, f30, f1 -/* 802BF28C 40 80 00 28 */ bge lbl_802BF2B4 -/* 802BF290 38 00 00 01 */ li r0, 1 -/* 802BF294 48 00 00 3C */ b lbl_802BF2D0 -lbl_802BF298: -/* 802BF298 FC 01 F0 40 */ fcmpo cr0, f1, f30 -/* 802BF29C 4C 40 13 82 */ cror 2, 0, 2 -/* 802BF2A0 40 82 00 14 */ bne lbl_802BF2B4 -/* 802BF2A4 FC 1E 00 40 */ fcmpo cr0, f30, f0 -/* 802BF2A8 40 80 00 0C */ bge lbl_802BF2B4 -/* 802BF2AC 38 00 00 01 */ li r0, 1 -/* 802BF2B0 48 00 00 20 */ b lbl_802BF2D0 -lbl_802BF2B4: -/* 802BF2B4 38 00 00 00 */ li r0, 0 -/* 802BF2B8 48 00 00 18 */ b lbl_802BF2D0 -lbl_802BF2BC: -/* 802BF2BC C0 03 00 04 */ lfs f0, 4(r3) -/* 802BF2C0 FC 1E 00 40 */ fcmpo cr0, f30, f0 -/* 802BF2C4 4C 40 13 82 */ cror 2, 0, 2 -/* 802BF2C8 7C 00 00 26 */ mfcr r0 -/* 802BF2CC 54 00 1F FE */ rlwinm r0, r0, 3, 0x1f, 0x1f -lbl_802BF2D0: -/* 802BF2D0 54 00 06 3F */ clrlwi. r0, r0, 0x18 -/* 802BF2D4 40 82 FF 24 */ bne lbl_802BF1F8 -lbl_802BF2D8: -/* 802BF2D8 D3 DF 00 28 */ stfs f30, 0x28(r31) -lbl_802BF2DC: -/* 802BF2DC E3 E1 00 38 */ psq_l f31, 56(r1), 0, 0 /* qr0 */ -/* 802BF2E0 CB E1 00 30 */ lfd f31, 0x30(r1) -/* 802BF2E4 E3 C1 00 28 */ psq_l f30, 40(r1), 0, 0 /* qr0 */ -/* 802BF2E8 CB C1 00 20 */ lfd f30, 0x20(r1) -/* 802BF2EC 39 61 00 20 */ addi r11, r1, 0x20 -/* 802BF2F0 48 0A 2F 39 */ bl _restgpr_29 -/* 802BF2F4 80 01 00 44 */ lwz r0, 0x44(r1) -/* 802BF2F8 7C 08 03 A6 */ mtlr r0 -/* 802BF2FC 38 21 00 40 */ addi r1, r1, 0x40 -/* 802BF300 4E 80 00 20 */ blr diff --git a/asm/Z2AudioLib/Z2SoundObject/updateSoundLifeTime___15Z2SoundObjAnimeFff.s b/asm/Z2AudioLib/Z2SoundObject/updateSoundLifeTime___15Z2SoundObjAnimeFff.s deleted file mode 100644 index df0c7a9f471..00000000000 --- a/asm/Z2AudioLib/Z2SoundObject/updateSoundLifeTime___15Z2SoundObjAnimeFff.s +++ /dev/null @@ -1,248 +0,0 @@ -lbl_802BF304: -/* 802BF304 94 21 FF D0 */ stwu r1, -0x30(r1) -/* 802BF308 7C 08 02 A6 */ mflr r0 -/* 802BF30C 90 01 00 34 */ stw r0, 0x34(r1) -/* 802BF310 DB E1 00 20 */ stfd f31, 0x20(r1) -/* 802BF314 F3 E1 00 28 */ psq_st f31, 40(r1), 0, 0 /* qr0 */ -/* 802BF318 DB C1 00 10 */ stfd f30, 0x10(r1) -/* 802BF31C F3 C1 00 18 */ psq_st f30, 24(r1), 0, 0 /* qr0 */ -/* 802BF320 93 E1 00 0C */ stw r31, 0xc(r1) -/* 802BF324 93 C1 00 08 */ stw r30, 8(r1) -/* 802BF328 7C 7F 1B 78 */ mr r31, r3 -/* 802BF32C FF C0 08 90 */ fmr f30, f1 -/* 802BF330 FF E0 10 90 */ fmr f31, f2 -/* 802BF334 80 03 00 20 */ lwz r0, 0x20(r3) -/* 802BF338 28 00 00 00 */ cmplwi r0, 0 -/* 802BF33C 41 82 02 FC */ beq lbl_802BF638 -/* 802BF340 3B C0 00 00 */ li r30, 0 -/* 802BF344 48 00 02 E8 */ b lbl_802BF62C -lbl_802BF348: -/* 802BF348 7F E3 FB 78 */ mr r3, r31 -/* 802BF34C 7F C4 F3 78 */ mr r4, r30 -/* 802BF350 48 01 CE BD */ bl getNthLink__10JSUPtrListCFUl -/* 802BF354 28 03 00 00 */ cmplwi r3, 0 -/* 802BF358 41 82 00 08 */ beq lbl_802BF360 -/* 802BF35C 38 63 FF FC */ addi r3, r3, -4 -lbl_802BF360: -/* 802BF360 80 03 00 00 */ lwz r0, 0(r3) -/* 802BF364 28 00 00 00 */ cmplwi r0, 0 -/* 802BF368 41 82 02 C0 */ beq lbl_802BF628 -/* 802BF36C 7F E3 FB 78 */ mr r3, r31 -/* 802BF370 7F C4 F3 78 */ mr r4, r30 -/* 802BF374 48 01 CE 99 */ bl getNthLink__10JSUPtrListCFUl -/* 802BF378 28 03 00 00 */ cmplwi r3, 0 -/* 802BF37C 41 82 00 08 */ beq lbl_802BF384 -/* 802BF380 38 63 FF FC */ addi r3, r3, -4 -lbl_802BF384: -/* 802BF384 80 63 00 00 */ lwz r3, 0(r3) -/* 802BF388 88 03 00 1F */ lbz r0, 0x1f(r3) -/* 802BF38C 54 00 E7 BE */ rlwinm r0, r0, 0x1c, 0x1e, 0x1f -/* 802BF390 2C 00 00 01 */ cmpwi r0, 1 -/* 802BF394 41 82 00 10 */ beq lbl_802BF3A4 -/* 802BF398 40 80 02 90 */ bge lbl_802BF628 -/* 802BF39C 48 00 02 8C */ b lbl_802BF628 -/* 802BF3A0 48 00 02 88 */ b lbl_802BF628 -lbl_802BF3A4: -/* 802BF3A4 7F E3 FB 78 */ mr r3, r31 -/* 802BF3A8 7F C4 F3 78 */ mr r4, r30 -/* 802BF3AC 48 01 CE 61 */ bl getNthLink__10JSUPtrListCFUl -/* 802BF3B0 28 03 00 00 */ cmplwi r3, 0 -/* 802BF3B4 41 82 00 08 */ beq lbl_802BF3BC -/* 802BF3B8 38 63 FF FC */ addi r3, r3, -4 -lbl_802BF3BC: -/* 802BF3BC 80 63 00 00 */ lwz r3, 0(r3) -/* 802BF3C0 80 63 00 20 */ lwz r3, 0x20(r3) -/* 802BF3C4 38 80 00 00 */ li r4, 0 -/* 802BF3C8 C0 02 C1 50 */ lfs f0, lit_3821(r2) -/* 802BF3CC FC 00 F8 00 */ fcmpu cr0, f0, f31 -/* 802BF3D0 40 82 00 14 */ bne lbl_802BF3E4 -/* 802BF3D4 80 03 00 10 */ lwz r0, 0x10(r3) -/* 802BF3D8 54 00 06 B5 */ rlwinm. r0, r0, 0, 0x1a, 0x1a -/* 802BF3DC 41 82 00 08 */ beq lbl_802BF3E4 -/* 802BF3E0 38 80 00 01 */ li r4, 1 -lbl_802BF3E4: -/* 802BF3E4 80 A3 00 10 */ lwz r5, 0x10(r3) -/* 802BF3E8 54 A6 06 73 */ rlwinm. r6, r5, 0, 0x19, 0x19 -/* 802BF3EC 41 82 01 24 */ beq lbl_802BF510 -/* 802BF3F0 54 80 06 3F */ clrlwi. r0, r4, 0x18 -/* 802BF3F4 41 82 00 34 */ beq lbl_802BF428 -/* 802BF3F8 7F E3 FB 78 */ mr r3, r31 -/* 802BF3FC 7F C4 F3 78 */ mr r4, r30 -/* 802BF400 48 01 CE 0D */ bl getNthLink__10JSUPtrListCFUl -/* 802BF404 28 03 00 00 */ cmplwi r3, 0 -/* 802BF408 41 82 00 08 */ beq lbl_802BF410 -/* 802BF40C 38 63 FF FC */ addi r3, r3, -4 -lbl_802BF410: -/* 802BF410 80 83 00 00 */ lwz r4, 0(r3) -/* 802BF414 38 60 00 01 */ li r3, 1 -/* 802BF418 88 04 00 1C */ lbz r0, 0x1c(r4) -/* 802BF41C 50 60 36 72 */ rlwimi r0, r3, 6, 0x19, 0x19 -/* 802BF420 98 04 00 1C */ stb r0, 0x1c(r4) -/* 802BF424 48 00 02 04 */ b lbl_802BF628 -lbl_802BF428: -/* 802BF428 C0 23 00 04 */ lfs f1, 4(r3) -/* 802BF42C C0 03 00 08 */ lfs f0, 8(r3) -/* 802BF430 FC 01 00 00 */ fcmpu cr0, f1, f0 -/* 802BF434 40 82 00 0C */ bne lbl_802BF440 -/* 802BF438 38 00 00 01 */ li r0, 1 -/* 802BF43C 48 00 00 48 */ b lbl_802BF484 -lbl_802BF440: -/* 802BF440 FC 01 00 40 */ fcmpo cr0, f1, f0 -/* 802BF444 40 81 00 20 */ ble lbl_802BF464 -/* 802BF448 FC 00 F0 40 */ fcmpo cr0, f0, f30 -/* 802BF44C 4C 40 13 82 */ cror 2, 0, 2 -/* 802BF450 40 82 00 30 */ bne lbl_802BF480 -/* 802BF454 FC 1E 08 40 */ fcmpo cr0, f30, f1 -/* 802BF458 40 80 00 28 */ bge lbl_802BF480 -/* 802BF45C 38 00 00 01 */ li r0, 1 -/* 802BF460 48 00 00 24 */ b lbl_802BF484 -lbl_802BF464: -/* 802BF464 FC 01 F0 40 */ fcmpo cr0, f1, f30 -/* 802BF468 4C 40 13 82 */ cror 2, 0, 2 -/* 802BF46C 40 82 00 14 */ bne lbl_802BF480 -/* 802BF470 FC 1E 00 40 */ fcmpo cr0, f30, f0 -/* 802BF474 40 80 00 0C */ bge lbl_802BF480 -/* 802BF478 38 00 00 01 */ li r0, 1 -/* 802BF47C 48 00 00 08 */ b lbl_802BF484 -lbl_802BF480: -/* 802BF480 38 00 00 00 */ li r0, 0 -lbl_802BF484: -/* 802BF484 54 00 06 3F */ clrlwi. r0, r0, 0x18 -/* 802BF488 41 82 00 64 */ beq lbl_802BF4EC -/* 802BF48C 7F E3 FB 78 */ mr r3, r31 -/* 802BF490 7F C4 F3 78 */ mr r4, r30 -/* 802BF494 48 01 CD 79 */ bl getNthLink__10JSUPtrListCFUl -/* 802BF498 28 03 00 00 */ cmplwi r3, 0 -/* 802BF49C 41 82 00 08 */ beq lbl_802BF4A4 -/* 802BF4A0 38 63 FF FC */ addi r3, r3, -4 -lbl_802BF4A4: -/* 802BF4A4 80 63 00 00 */ lwz r3, 0(r3) -/* 802BF4A8 80 03 00 10 */ lwz r0, 0x10(r3) -/* 802BF4AC 28 00 00 01 */ cmplwi r0, 1 -/* 802BF4B0 40 80 00 0C */ bge lbl_802BF4BC -/* 802BF4B4 38 00 00 01 */ li r0, 1 -/* 802BF4B8 90 03 00 10 */ stw r0, 0x10(r3) -lbl_802BF4BC: -/* 802BF4BC 7F E3 FB 78 */ mr r3, r31 -/* 802BF4C0 7F C4 F3 78 */ mr r4, r30 -/* 802BF4C4 48 01 CD 49 */ bl getNthLink__10JSUPtrListCFUl -/* 802BF4C8 28 03 00 00 */ cmplwi r3, 0 -/* 802BF4CC 41 82 00 08 */ beq lbl_802BF4D4 -/* 802BF4D0 38 63 FF FC */ addi r3, r3, -4 -lbl_802BF4D4: -/* 802BF4D4 80 83 00 00 */ lwz r4, 0(r3) -/* 802BF4D8 38 60 00 00 */ li r3, 0 -/* 802BF4DC 88 04 00 1C */ lbz r0, 0x1c(r4) -/* 802BF4E0 50 60 36 72 */ rlwimi r0, r3, 6, 0x19, 0x19 -/* 802BF4E4 98 04 00 1C */ stb r0, 0x1c(r4) -/* 802BF4E8 48 00 01 40 */ b lbl_802BF628 -lbl_802BF4EC: -/* 802BF4EC 7F E3 FB 78 */ mr r3, r31 -/* 802BF4F0 7F C4 F3 78 */ mr r4, r30 -/* 802BF4F4 48 01 CD 19 */ bl getNthLink__10JSUPtrListCFUl -/* 802BF4F8 28 03 00 00 */ cmplwi r3, 0 -/* 802BF4FC 41 82 00 08 */ beq lbl_802BF504 -/* 802BF500 38 63 FF FC */ addi r3, r3, -4 -lbl_802BF504: -/* 802BF504 80 63 00 00 */ lwz r3, 0(r3) -/* 802BF508 4B FE 30 91 */ bl stop__8JAISoundFv -/* 802BF50C 48 00 01 1C */ b lbl_802BF628 -lbl_802BF510: -/* 802BF510 54 80 06 3F */ clrlwi. r0, r4, 0x18 -/* 802BF514 41 82 00 28 */ beq lbl_802BF53C -/* 802BF518 7F E3 FB 78 */ mr r3, r31 -/* 802BF51C 7F C4 F3 78 */ mr r4, r30 -/* 802BF520 48 01 CC ED */ bl getNthLink__10JSUPtrListCFUl -/* 802BF524 28 03 00 00 */ cmplwi r3, 0 -/* 802BF528 41 82 00 08 */ beq lbl_802BF530 -/* 802BF52C 38 63 FF FC */ addi r3, r3, -4 -lbl_802BF530: -/* 802BF530 80 63 00 00 */ lwz r3, 0(r3) -/* 802BF534 4B FE 30 65 */ bl stop__8JAISoundFv -/* 802BF538 48 00 00 F0 */ b lbl_802BF628 -lbl_802BF53C: -/* 802BF53C 54 A0 06 F7 */ rlwinm. r0, r5, 0, 0x1b, 0x1b -/* 802BF540 41 82 00 E8 */ beq lbl_802BF628 -/* 802BF544 88 1F 00 44 */ lbz r0, 0x44(r31) -/* 802BF548 28 06 00 00 */ cmplwi r6, 0 -/* 802BF54C 41 82 00 70 */ beq lbl_802BF5BC -/* 802BF550 C0 23 00 04 */ lfs f1, 4(r3) -/* 802BF554 C0 03 00 08 */ lfs f0, 8(r3) -/* 802BF558 FC 01 00 00 */ fcmpu cr0, f1, f0 -/* 802BF55C 40 82 00 0C */ bne lbl_802BF568 -/* 802BF560 38 00 00 01 */ li r0, 1 -/* 802BF564 48 00 00 48 */ b lbl_802BF5AC -lbl_802BF568: -/* 802BF568 FC 01 00 40 */ fcmpo cr0, f1, f0 -/* 802BF56C 40 81 00 20 */ ble lbl_802BF58C -/* 802BF570 FC 00 F0 40 */ fcmpo cr0, f0, f30 -/* 802BF574 4C 40 13 82 */ cror 2, 0, 2 -/* 802BF578 40 82 00 30 */ bne lbl_802BF5A8 -/* 802BF57C FC 1E 08 40 */ fcmpo cr0, f30, f1 -/* 802BF580 40 80 00 28 */ bge lbl_802BF5A8 -/* 802BF584 38 00 00 01 */ li r0, 1 -/* 802BF588 48 00 00 24 */ b lbl_802BF5AC -lbl_802BF58C: -/* 802BF58C FC 01 F0 40 */ fcmpo cr0, f1, f30 -/* 802BF590 4C 40 13 82 */ cror 2, 0, 2 -/* 802BF594 40 82 00 14 */ bne lbl_802BF5A8 -/* 802BF598 FC 1E 00 40 */ fcmpo cr0, f30, f0 -/* 802BF59C 40 80 00 0C */ bge lbl_802BF5A8 -/* 802BF5A0 38 00 00 01 */ li r0, 1 -/* 802BF5A4 48 00 00 08 */ b lbl_802BF5AC -lbl_802BF5A8: -/* 802BF5A8 38 00 00 00 */ li r0, 0 -lbl_802BF5AC: -/* 802BF5AC 54 00 06 3E */ clrlwi r0, r0, 0x18 -/* 802BF5B0 7C 00 00 34 */ cntlzw r0, r0 -/* 802BF5B4 54 00 D9 7E */ srwi r0, r0, 5 -/* 802BF5B8 48 00 00 48 */ b lbl_802BF600 -lbl_802BF5BC: -/* 802BF5BC C0 03 00 04 */ lfs f0, 4(r3) -/* 802BF5C0 C0 23 00 08 */ lfs f1, 8(r3) -/* 802BF5C4 FC 00 08 00 */ fcmpu cr0, f0, f1 -/* 802BF5C8 40 82 00 0C */ bne lbl_802BF5D4 -/* 802BF5CC 38 00 00 00 */ li r0, 0 -/* 802BF5D0 48 00 00 30 */ b lbl_802BF600 -lbl_802BF5D4: -/* 802BF5D4 28 00 00 00 */ cmplwi r0, 0 -/* 802BF5D8 41 82 00 18 */ beq lbl_802BF5F0 -/* 802BF5DC FC 1E 08 40 */ fcmpo cr0, f30, f1 -/* 802BF5E0 4C 40 13 82 */ cror 2, 0, 2 -/* 802BF5E4 7C 00 00 26 */ mfcr r0 -/* 802BF5E8 54 00 1F FE */ rlwinm r0, r0, 3, 0x1f, 0x1f -/* 802BF5EC 48 00 00 14 */ b lbl_802BF600 -lbl_802BF5F0: -/* 802BF5F0 FC 1E 08 40 */ fcmpo cr0, f30, f1 -/* 802BF5F4 4C 41 13 82 */ cror 2, 1, 2 -/* 802BF5F8 7C 00 00 26 */ mfcr r0 -/* 802BF5FC 54 00 1F FE */ rlwinm r0, r0, 3, 0x1f, 0x1f -lbl_802BF600: -/* 802BF600 54 00 06 3F */ clrlwi. r0, r0, 0x18 -/* 802BF604 41 82 00 24 */ beq lbl_802BF628 -/* 802BF608 7F E3 FB 78 */ mr r3, r31 -/* 802BF60C 7F C4 F3 78 */ mr r4, r30 -/* 802BF610 48 01 CB FD */ bl getNthLink__10JSUPtrListCFUl -/* 802BF614 28 03 00 00 */ cmplwi r3, 0 -/* 802BF618 41 82 00 08 */ beq lbl_802BF620 -/* 802BF61C 38 63 FF FC */ addi r3, r3, -4 -lbl_802BF620: -/* 802BF620 80 63 00 00 */ lwz r3, 0(r3) -/* 802BF624 4B FE 2F 75 */ bl stop__8JAISoundFv -lbl_802BF628: -/* 802BF628 3B DE 00 01 */ addi r30, r30, 1 -lbl_802BF62C: -/* 802BF62C 80 1F 00 08 */ lwz r0, 8(r31) -/* 802BF630 7C 1E 00 00 */ cmpw r30, r0 -/* 802BF634 41 80 FD 14 */ blt lbl_802BF348 -lbl_802BF638: -/* 802BF638 E3 E1 00 28 */ psq_l f31, 40(r1), 0, 0 /* qr0 */ -/* 802BF63C CB E1 00 20 */ lfd f31, 0x20(r1) -/* 802BF640 E3 C1 00 18 */ psq_l f30, 24(r1), 0, 0 /* qr0 */ -/* 802BF644 CB C1 00 10 */ lfd f30, 0x10(r1) -/* 802BF648 83 E1 00 0C */ lwz r31, 0xc(r1) -/* 802BF64C 83 C1 00 08 */ lwz r30, 8(r1) -/* 802BF650 80 01 00 34 */ lwz r0, 0x34(r1) -/* 802BF654 7C 08 03 A6 */ mtlr r0 -/* 802BF658 38 21 00 30 */ addi r1, r1, 0x30 -/* 802BF65C 4E 80 00 20 */ blr diff --git a/include/JSystem/JAudio2/JAISeMgr.h b/include/JSystem/JAudio2/JAISeMgr.h index bc607e809e7..3fe166473e0 100644 --- a/include/JSystem/JAudio2/JAISeMgr.h +++ b/include/JSystem/JAudio2/JAISeMgr.h @@ -48,6 +48,7 @@ class JAISeCategoryMgr : public JAISeqDataUser { int getMaxActiveSe() const { return mMaxActiveSe; } void setMaxActiveSe(int se) { mMaxActiveSe = se; } void setMaxInactiveSe(int se) { mMaxInactiveSe = se; } + JSUList* getSeList() { return &mSeList; } int getNumSe() const { return mSeList.getNumLinks(); } JAIAudience* getAudience() { return (JAIAudience*)field_0x4.field_0x0; } diff --git a/include/JSystem/JAudio2/JAISound.h b/include/JSystem/JAudio2/JAISound.h index ff737fd885b..5a60a6eae26 100644 --- a/include/JSystem/JAudio2/JAISound.h +++ b/include/JSystem/JAudio2/JAISound.h @@ -90,8 +90,7 @@ struct JAISoundStatus_ { struct { u8 flag1 : 1; u8 flag2 : 1; - u8 flag3 : 1; - u8 flag4 : 1; + u8 animationState : 2; u8 flag5 : 1; u8 flag6 : 1; u8 flag7 : 1; @@ -227,9 +226,16 @@ class JAISound { virtual bool JAISound_tryDie_() = 0; JAISoundID getID() const; + u8 getAnimationState() const { return status_.state.flags.animationState; } + bool isAnimated() const { return getAnimationState() != 0; } + void setAnimationState(u8 pState) { + status_.state.flags.animationState = pState; + } u32 getUserData() const { return status_.user_data; } + void setUserData(u32 pUserData) { status_.user_data = pUserData; } + JAIAudible* getAudible() const { return audible_; } bool isHandleAttached() const { return handle_ != NULL; } - + bool hasLifeTime() const { return status_.field_0x1.flags.flag2; } void removeLifeTime_() { status_.field_0x1.flags.flag1 = false; } void stop_JAISound_() { status_.state.flags.flag5 = 0; diff --git a/include/JSystem/JAudio2/JAUAudibleParam.h b/include/JSystem/JAudio2/JAUAudibleParam.h index b51b419c6b0..079864c06e6 100644 --- a/include/JSystem/JAudio2/JAUAudibleParam.h +++ b/include/JSystem/JAudio2/JAUAudibleParam.h @@ -21,7 +21,9 @@ struct JAUAudibleParam { u8 b0_5 : 1; u8 b0_6 : 1; u8 b0_7 : 1; - u8 b1; + u8 b1_0 : 1; + u8 b1_1 : 1; + u8 b1_2_7 : 6; u8 b2; u8 b3; } bytes; diff --git a/include/JSystem/JAudio2/JAUSoundAnimator.h b/include/JSystem/JAudio2/JAUSoundAnimator.h index e1b6ce08f09..b6dc7204a65 100644 --- a/include/JSystem/JAudio2/JAUSoundAnimator.h +++ b/include/JSystem/JAudio2/JAUSoundAnimator.h @@ -1,5 +1,109 @@ #ifndef JAUSOUNDANIMATOR_H #define JAUSOUNDANIMATOR_H +#include "JSystem/JAudio2/JAISound.h" +#include "dolphin/types.h" + +class JAUSoundAnimation; + +class JAUSoundAnimationSound { +public: + bool playsOnlyForward() const { return (mFlags & 1) != 0; } + bool playsOnlyReverse() const { return (mFlags & 2) != 0; } + bool stopsWhenAnimationChanges() const { return (mFlags & 4) != 0; } + bool playsOnlyOnce() const { return (mFlags & 8) != 0; } + bool stopsWhenNoteOff() const { return (mFlags & 0x10) != 0; } + bool stopsWhenSpeedIsZero() const { return (mFlags & 0x20) != 0; } + bool setsLifeTime() const { return (mFlags & 0x40) != 0; } + bool playsAtIntervals() const { return (mFlags & 0x80) != 0; } + + bool isNoting(f32 param_0) const { + if (field_0x04 == field_0x08) { + return true; + } + if (field_0x04 > field_0x08) { + if (field_0x08 <= param_0 && param_0 < field_0x04) { + return true; + } + } else { + if (field_0x04 <= param_0 && param_0 < field_0x08) { + return true; + } + } + return false; + } + + bool isNotingOn(f32 param_0, bool param_1) const { + if (setsLifeTime()) { + return isNoting(param_0); + } + if (param_1) { + return param_0 <= field_0x04; + } else { + return param_0 >= field_0x04; + } + } + + bool isNotingOff(f32 param_0, bool param_1) const { + if (setsLifeTime()) { + return !isNoting(param_0); + } + if (field_0x04 == field_0x08) { + return false; + } + if (param_1) { + return param_0 <= field_0x08; + } else { + return param_0 >= field_0x08; + } + } + + /* 0x00 */ JAISoundID mSoundId; + /* 0x04 */ f32 field_0x04; + /* 0x08 */ f32 field_0x08; + /* 0x0C */ f32 field_0x0c; + /* 0x10 */ u32 mFlags; + /* 0x14 */ u8 field_0x14; + /* 0x15 */ u8 field_0x15; + /* 0x16 */ u8 field_0x16; + /* 0x17 */ u8 field_0x17; + /* 0x18 */ u8 field_0x18; + /* 0x19 */ u8 field_0x19; + /* 0x1A */ s8 field_0x1a; + /* 0x1B */ u8 unk_0x1b[5]; +}; /* size 0x20 */ + +class JAUSoundAnimationControl { +public: + virtual ~JAUSoundAnimationControl() = 0; + virtual JAUSoundAnimationSound* getSound(const JAUSoundAnimation*, int) = 0; + virtual u16 getNumSounds(const JAUSoundAnimation*) = 0; +}; + +class JAUSoundAnimation { +public: + /* 802A6F70 */ int getStartSoundIndex(f32) const; + /* 802A7044 */ int getEndSoundIndex(f32) const; + + u16 getNumSounds() const { + if (mControl != NULL) { + return mControl->getNumSounds(this); + } else { + return mNumSounds; + } + } + + const JAUSoundAnimationSound* getSound(int i_index) const { + if (mControl != NULL) { + return mControl->getSound(this, i_index); + } else { + return &mSounds + i_index; + } + } + + /* 0x0 */ u16 mNumSounds; + /* 0x4 */ JAUSoundAnimationControl* mControl; + /* 0x8 */ JAUSoundAnimationSound mSounds; // actually an array +}; #endif /* JAUSOUNDANIMATOR_H */ diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h index ac4857ec30f..9d24942e3f9 100644 --- a/include/JSystem/JGeometry.h +++ b/include/JSystem/JGeometry.h @@ -122,6 +122,16 @@ struct TVec3 { }; } + inline TVec3& operator=(const Vec& b) { + setTVec3f(&b.x, &this->x); + return *this; + } + + // inline TVec3& operator=(const TVec3& b) { + // setTVec3f(&b.x, &this->x); + // return *this; + // } + inline TVec3& operator+=(const TVec3& b) { add(b); return *this; diff --git a/include/JSystem/JSupport/JSUList.h b/include/JSystem/JSupport/JSUList.h index e117824b060..2c045ef0893 100644 --- a/include/JSystem/JSupport/JSUList.h +++ b/include/JSystem/JSupport/JSUList.h @@ -97,6 +97,8 @@ class JSUList : public JSUPtrList { JSULink* getLast() const { return (JSULink*)getLastLink(); } + JSULink* getNth(int index) { return (JSULink*)getNthLink(index); } + JSULink* getEnd() const { return NULL; } u32 getNumLinks() const { return this->JSUPtrList::getNumLinks(); } diff --git a/include/Z2AudioLib/Z2SeMgr.h b/include/Z2AudioLib/Z2SeMgr.h index d0fce310dce..d7c0ba33304 100644 --- a/include/Z2AudioLib/Z2SeMgr.h +++ b/include/Z2AudioLib/Z2SeMgr.h @@ -53,7 +53,7 @@ class Z2SeMgr : public JASGlobalInstance { /* 802ADFF4 */ void setMultiTriggerSE(u32, Vec*, s8); /* 802AE184 */ void processSeFramework(); /* 802AE524 */ void isLevelSe(JAISoundID); - /* 802AE5B0 */ void isSoundCulling(JAISoundID); + /* 802AE5B0 */ bool isSoundCulling(JAISoundID); /* 802B9AC4 */ void resetCrowdSize(); private: diff --git a/include/Z2AudioLib/Z2SoundHandles.h b/include/Z2AudioLib/Z2SoundHandles.h index 8b34c787af5..4ff460bc8ab 100644 --- a/include/Z2AudioLib/Z2SoundHandles.h +++ b/include/Z2AudioLib/Z2SoundHandles.h @@ -6,7 +6,7 @@ #include "JSystem/JAudio2/JASHeapCtrl.h" #include "dolphin/types.h" -class Z2SoundHandlePool : public JAISoundHandle, public JSULink, public JASPoolAllocObject { +class Z2SoundHandlePool : public JAISoundHandle, public JSULink { // , public JASPoolAllocObject { public: Z2SoundHandlePool() : JAISoundHandle(), JSULink(this) {} ~Z2SoundHandlePool() {} @@ -31,7 +31,8 @@ class Z2SoundHandles : protected JSUList { void setPos(const JGeometry::TVec3& pos); - int getNumHandles() const { return this->getNumLinks(); } + int getNumHandles() const { return getNumLinks(); } + JAISoundHandle* getHandle(int index) { return (Z2SoundHandlePool*)getNth(index); } private: /* 0xC */ u8 mNumHandles; diff --git a/include/Z2AudioLib/Z2SoundObject.h b/include/Z2AudioLib/Z2SoundObject.h index 26f2829bcc5..a022ba4abc5 100644 --- a/include/Z2AudioLib/Z2SoundObject.h +++ b/include/Z2AudioLib/Z2SoundObject.h @@ -2,11 +2,10 @@ #define Z2SOUNDOBJECT_H #include "Z2AudioLib/Z2SoundHandles.h" +#include "JSystem/JAudio2/JAUSoundAnimator.h" #include "dolphin/types.h" -struct Z2SoundStarter; - -struct JAUSoundAnimationSound {}; +class Z2SoundStarter; class Z2SoundObjBase : protected Z2SoundHandles { public: @@ -14,7 +13,7 @@ class Z2SoundObjBase : protected Z2SoundHandles { ~Z2SoundObjBase(); void deleteObject(); - void startCollisionSE(u32, u32, Z2SoundObjBase*); + JAISoundHandle* startCollisionSE(u32, u32, Z2SoundObjBase*); bool isAlive() const { return mIsInitialized; } void setSoundStarter(Z2SoundStarter* i_soundStarter) { mSoundStarter = i_soundStarter; } @@ -23,13 +22,13 @@ class Z2SoundObjBase : protected Z2SoundHandles { virtual void dispose(); virtual bool stopOK(Z2SoundHandlePool& pool); virtual void init(Vec* pSoundPos, u8 pNumHandles); - virtual void startSound(JAISoundID, u32, s8); - virtual void startLevelSound(JAISoundID, u32, s8); + virtual JAISoundHandle* startSound(JAISoundID, u32, s8); + virtual JAISoundHandle* startLevelSound(JAISoundID, u32, s8); /* 0x14 */ Z2SoundStarter* mSoundStarter; - /* 0x18 */ Vec* mSoundPos; + /* 0x18 */ JGeometry::TVec3* mSoundPos; /* 0x1C */ u16 field_0x1c; - /* 0x1E */ u8 field_0x1e; + /* 0x1E */ s8 field_0x1e; /* 0x1F */ bool mIsInitialized; }; @@ -38,10 +37,9 @@ class Z2SoundObjSimple : public Z2SoundObjBase { Z2SoundObjSimple(); ~Z2SoundObjSimple(); - virtual void temp(); // temp to build OK, remove later virtual void init(Vec* pSoundPos, u8 pNumHandles); - virtual void startSound(JAISoundID, u32, s8); - virtual void startLevelSound(JAISoundID, u32, s8); + virtual JAISoundHandle* startSound(JAISoundID, u32, s8); + virtual JAISoundHandle* startLevelSound(JAISoundID, u32, s8); }; class Z2SoundObjAnime : public Z2SoundObjBase { @@ -53,42 +51,49 @@ class Z2SoundObjAnime : public Z2SoundObjBase { /* 802BF304 */ void updateSoundLifeTime_(f32, f32); /* 802BF660 */ void startSoundInner(JGeometry::TVec3 const&, f32, Z2SoundStarter*, u32, s8); - /* 802BF890 */ void getSoundID(JAUSoundAnimationSound const*, JGeometry::TVec3 const&, - f32); - /* 802BF898 */ void playsSound(JAUSoundAnimationSound const*, JGeometry::TVec3 const&, + /* 802BF890 */ u32 getSoundID(JAUSoundAnimationSound const*, + JGeometry::TVec3 const&, f32); + /* 802BF898 */ bool playsSound(JAUSoundAnimationSound const*, JGeometry::TVec3 const&, f32); /* 802BEBDC */ virtual void init(Vec*, u8); - void stopAnime() { animation_ = NULL; } - - /* 0x20 */ void* animation_; // JAUSoundAnimation* + void stopAnime() { mpAnimation = NULL; } + void setLoopStartFrame(f32 i_frame) { + mStartSoundFrame = i_frame; + mStartSoundIndex = mpAnimation->getStartSoundIndex(i_frame); + } + void setLoopEndFrame(f32 i_frame) { + mEndSoundFrame = i_frame; + mEndSoundIndex = mpAnimation->getEndSoundIndex(i_frame); + } + void setLoopFrame(f32 i_startFrame, f32 i_endFrame) { + setLoopStartFrame(i_startFrame); + setLoopEndFrame(i_endFrame); + } + + /* 0x20 */ JAUSoundAnimation* mpAnimation; /* 0x24 */ int field_0x24; - /* 0x28 */ float field_0x28; - /* 0x2C */ float field_0x2c; - /* 0x30 */ float field_0x30; - /* 0x34 */ int field_0x34; - /* 0x38 */ int field_0x38; + /* 0x28 */ f32 mCurSoundFrame; + /* 0x2C */ f32 mStartSoundFrame; + /* 0x30 */ f32 mEndSoundFrame; + /* 0x34 */ int mStartSoundIndex; + /* 0x38 */ int mEndSoundIndex; /* 0x3C */ int field_0x3c; - /* 0x40 */ int curSoundIndex_; - /* 0x44 */ bool field_0x44; + /* 0x40 */ int mCurSoundIndex; + /* 0x44 */ bool mReverse; }; -class Z2DopplerSoundObjBase : public Z2SoundHandles { +class Z2DopplerSoundObjBase : public Z2SoundObjBase { public: Z2DopplerSoundObjBase(); ~Z2DopplerSoundObjBase(); virtual void framework(u32, s8); virtual void init(Vec*, u8); - virtual void startSound(JAISoundID, u32, s8); - virtual void startLevelSound(JAISoundID, u32, s8); + virtual JAISoundHandle* startSound(JAISoundID, u32, s8); + virtual JAISoundHandle* startLevelSound(JAISoundID, u32, s8); - /* 0x14 */ Z2SoundStarter* field_0x14; - /* 0x18 */ JGeometry::TVec3* field_0x18; - /* 0x1C */ u16 field_0x1c; - /* 0x1E */ u8 field_0x1e; - /* 0x1F */ bool field_0x1f; /* 0x20 */ JGeometry::TVec3 field_0x20; /* 0x2C */ JGeometry::TVec3 field_0x2c; }; diff --git a/libs/JSystem/JAudio2/JAUSoundAnimator.cpp b/libs/JSystem/JAudio2/JAUSoundAnimator.cpp index 5d013ba0c60..472c4606679 100644 --- a/libs/JSystem/JAudio2/JAUSoundAnimator.cpp +++ b/libs/JSystem/JAudio2/JAUSoundAnimator.cpp @@ -1,55 +1,28 @@ // -// Generated By: dol2asm // Translation Unit: JAUSoundAnimator // #include "JSystem/JAudio2/JAUSoundAnimator.h" -#include "dolphin/types.h" - -// -// Types: -// - -struct JAUSoundAnimation { - /* 802A6F70 */ void getStartSoundIndex(f32) const; - /* 802A7044 */ void getEndSoundIndex(f32) const; -}; - -// -// Forward References: -// - -extern "C" void getStartSoundIndex__17JAUSoundAnimationCFf(); -extern "C" void getEndSoundIndex__17JAUSoundAnimationCFf(); - -// -// External References: -// - -extern "C" void _savegpr_28(); -extern "C" void _restgpr_28(); - -// -// Declarations: -// /* 802A6F70-802A7044 2A18B0 00D4+00 0/0 1/1 0/0 .text getStartSoundIndex__17JAUSoundAnimationCFf */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void JAUSoundAnimation::getStartSoundIndex(f32 param_0) const { - nofralloc -#include "asm/JSystem/JAudio2/JAUSoundAnimator/getStartSoundIndex__17JAUSoundAnimationCFf.s" +int JAUSoundAnimation::getStartSoundIndex(f32 param_0) const { + int i; + for (i = 0; i < getNumSounds(); i++) { + if (getSound(i)->field_0x04 >= param_0) { + break; + } + } + return i; } -#pragma pop /* 802A7044-802A7114 2A1984 00D0+00 0/0 1/1 0/0 .text getEndSoundIndex__17JAUSoundAnimationCFf */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void JAUSoundAnimation::getEndSoundIndex(f32 param_0) const { - nofralloc -#include "asm/JSystem/JAudio2/JAUSoundAnimator/getEndSoundIndex__17JAUSoundAnimationCFf.s" +int JAUSoundAnimation::getEndSoundIndex(f32 param_0) const { + int i; + for (i = 0; i < getNumSounds(); i++) { + if (getSound(i)->field_0x04 > param_0) { + break; + } + } + return i; } -#pragma pop diff --git a/libs/Z2AudioLib/Z2Audience.cpp b/libs/Z2AudioLib/Z2Audience.cpp index 67a342bc2b2..b5d4f9909a9 100644 --- a/libs/Z2AudioLib/Z2Audience.cpp +++ b/libs/Z2AudioLib/Z2Audience.cpp @@ -1194,20 +1194,20 @@ void Z2Audience::mixChannelOut(JASSoundParams const& param_0, JAIAudible* param_ } local_60.mVolume = dVar9; JAUAudibleParam* puVar7 = z2Audible->getAudibleParam(); - if ((puVar7->field_0x0.bytes.b1 & 8) && (local_60.mVolume <= 0.2f)) { + if ((puVar7->field_0x0.bytes.b1_2_7 & 8) && (local_60.mVolume <= 0.2f)) { local_60.mVolume = 0.2f; } } else { local_60.mVolume = 1.0f; } - if (((z2Audible->getAudibleParam()->field_0x0.bytes.b1 >> 6) & 1) && mNumPlayers == 1) { + if (z2Audible->getAudibleParam()->field_0x0.bytes.b1_1 && mNumPlayers == 1) { local_60.mDolby = calcRelPosDolby(*(Vec*)&pZVar5->field_0x14.field_0x00, param_2); } else { local_60.mDolby = 0.5f; } - if ((z2Audible->getAudibleParam()->field_0x0.bytes.b1 >> 7) & 1) { + if (z2Audible->getAudibleParam()->field_0x0.bytes.b1_0) { if (mNumPlayers > 2) { f32 fVar1; if (param_2 & 1) { diff --git a/libs/Z2AudioLib/Z2Creature.cpp b/libs/Z2AudioLib/Z2Creature.cpp index dac809178b8..dfe0137b6c6 100644 --- a/libs/Z2AudioLib/Z2Creature.cpp +++ b/libs/Z2AudioLib/Z2Creature.cpp @@ -537,7 +537,7 @@ asm Z2Creature::~Z2Creature() { /* 802C04E8-802C0530 2BAE28 0048+00 4/2 2/2 0/0 .text deleteObject__10Z2CreatureFv */ void Z2Creature::deleteObject() { - mSoundObjAnime.animation_ = NULL; + mSoundObjAnime.mpAnimation = NULL; mSoundObjAnime.deleteObject(); mSoundObjSimple1.deleteObject(); mSoundObjSimple2.deleteObject(); diff --git a/libs/Z2AudioLib/Z2SeMgr.cpp b/libs/Z2AudioLib/Z2SeMgr.cpp index bc5e959cc79..9792e01a73b 100644 --- a/libs/Z2AudioLib/Z2SeMgr.cpp +++ b/libs/Z2AudioLib/Z2SeMgr.cpp @@ -651,7 +651,7 @@ asm void Z2SeMgr::isLevelSe(JAISoundID param_0) { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void Z2SeMgr::isSoundCulling(JAISoundID param_0) { +asm bool Z2SeMgr::isSoundCulling(JAISoundID param_0) { nofralloc #include "asm/Z2AudioLib/Z2SeMgr/isSoundCulling__7Z2SeMgrF10JAISoundID.s" } diff --git a/libs/Z2AudioLib/Z2SoundHandles.cpp b/libs/Z2AudioLib/Z2SoundHandles.cpp index 811a79adbe3..81003b1cd8d 100644 --- a/libs/Z2AudioLib/Z2SoundHandles.cpp +++ b/libs/Z2AudioLib/Z2SoundHandles.cpp @@ -7,6 +7,36 @@ #include "JSystem/JAudio2/JASGadget.h" #include "JSystem/JAudio2/JAISoundInfo.h" #include "dolphin/types.h" +#include "dol2asm.h" + +extern "C" void func_802AB200(void* _this); +extern "C" void __ct__17JASGenericMemPoolFv(); +extern "C" void __dt__17JASGenericMemPoolFv(); +extern "C" void alloc__17JASGenericMemPoolFUl(); +extern "C" void free__17JASGenericMemPoolFPvUl(); +extern "C" void releaseSound__14JAISoundHandleFv(); +extern "C" void stop__8JAISoundFUl(); +extern "C" void __dl__FPv(); +extern "C" void __ct__10JSUPtrLinkFPv(); +extern "C" void __dt__10JSUPtrLinkFv(); +extern "C" void __dt__10JSUPtrListFv(); +extern "C" void initiate__10JSUPtrListFv(); +extern "C" void append__10JSUPtrListFP10JSUPtrLink(); +extern "C" void remove__10JSUPtrListFP10JSUPtrLink(); +extern "C" void __register_global_object(); +extern "C" void _savegpr_26(); +extern "C" void _savegpr_28(); +extern "C" void _restgpr_26(); +extern "C" void _restgpr_28(); +extern "C" extern u8 data_80451348[8]; + +/* 804341B8-804341C4 060ED8 000C+00 3/3 0/0 0/0 .bss @632 */ +static u8 lit_632[12]; + +/* 804341C4-804341D8 060EE4 0010+04 3/3 1/1 0/0 .bss + * memPool_$localstatic3$getMemPool___39JASPoolAllocObject<17Z2SoundHandlePool>Fv */ +extern u8 data_804341C4[16 + 4 /* padding */]; +u8 data_804341C4[16 + 4 /* padding */]; // inline JAISoundID::JAISoundID(u32 pId) : mId(pId) {} @@ -27,7 +57,7 @@ void Z2SoundHandles::initHandlesPool(u8 pNumHandles) { } /* 802AB120-802AB200 2A5A60 00E0+00 1/1 1/1 0/0 .text deleteHandlesPool__14Z2SoundHandlesFv */ -#if 1 +#ifdef NONMATCHING void Z2SoundHandles::deleteHandlesPool() { JSULink* link; while (link = getFirst(), link != NULL) { @@ -48,6 +78,16 @@ asm void Z2SoundHandles::deleteHandlesPool() { #pragma pop #endif +/* 802AB200-802AB254 2A5B40 0054+00 3/3 1/1 0/0 .text __dt__31JASMemPool<17Z2SoundHandlePool>Fv */ +#pragma push +#pragma optimization_level 0 +#pragma optimizewithasm off +extern "C" asm void func_802AB200(void* _this) { + nofralloc +#include "asm/Z2AudioLib/Z2SoundHandles/func_802AB200.s" +} +#pragma pop + JAISoundHandle* Z2SoundHandles::getHandleSoundID(JAISoundID pSoundId) { JSULink* link; for (link = getFirst(); link != NULL; link = link->getNext()) { @@ -78,7 +118,7 @@ JAISoundHandle* Z2SoundHandles::getHandleUserData(u32 pUserData) { /* 802AB2D8-802AB3D0 2A5C18 00F8+00 0/0 3/3 0/0 .text getFreeHandle__14Z2SoundHandlesFv */ -#if 1 +#ifdef NONMATCHING JAISoundHandle* Z2SoundHandles::getFreeHandle() { JSULink* link; for (link = getFirst(); link != NULL; link = link->getNext()) { @@ -112,7 +152,6 @@ asm JAISoundHandle* Z2SoundHandles::getFreeHandle() { /* 802AB3D0-802AB4A0 2A5D10 00D0+00 0/0 2/2 0/0 .text * getLowPrioSound__14Z2SoundHandlesF10JAISoundID */ -#if 1 JAISoundHandle* Z2SoundHandles::getLowPrioSound(JAISoundID pSoundId) { JAISoundInfo* sound_info = JASGlobalInstance::getInstance(); JAISoundHandle* handle; @@ -135,16 +174,6 @@ JAISoundHandle* Z2SoundHandles::getLowPrioSound(JAISoundID pSoundId) { } return NULL; } -#else -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm JAISoundHandle* Z2SoundHandles::getLowPrioSound(JAISoundID param_0) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundHandles/getLowPrioSound__14Z2SoundHandlesF10JAISoundID.s" -} -#pragma pop -#endif void Z2SoundHandles::stopAllSounds(u32 fadeout) { JSULink* link; @@ -172,7 +201,7 @@ bool Z2SoundHandles::isActive() const { /* 802AB538-802AB64C 2A5E78 0114+00 0/0 1/1 0/0 .text * setPos__14Z2SoundHandlesFRCQ29JGeometry8TVec3 */ -#if 1 +#ifdef NONMATCHING void Z2SoundHandles::setPos(JGeometry::TVec3 const& param_0) { JSULink* link; for (link = getFirst(); link != NULL; link = link->getNext()) { diff --git a/libs/Z2AudioLib/Z2SoundObject.cpp b/libs/Z2AudioLib/Z2SoundObject.cpp index a14b3a78240..967f7586f5d 100644 --- a/libs/Z2AudioLib/Z2SoundObject.cpp +++ b/libs/Z2AudioLib/Z2SoundObject.cpp @@ -4,172 +4,18 @@ // #include "Z2AudioLib/Z2SoundObject.h" +#include "Z2AudioLib/Z2Calc.h" +#include "Z2AudioLib/Z2SeMgr.h" +#include "Z2AudioLib/Z2SoundInfo.h" +#include "Z2AudioLib/Z2SoundMgr.h" +#include "Z2AudioLib/Z2SoundStarter.h" +#include "Z2AudioLib/Z2Audience.h" #include "JSystem/JAudio2/JASGadget.h" -#include "dol2asm.h" +#include "JSystem/JAudio2/JAUSoundAnimator.h" -// -// Types: -// - -struct Z2SoundInfo { - /* 802BBAC8 */ int getSwBit(JAISoundID) const; -}; - -struct Z2SeMgr { - /* 802AE5B0 */ void isSoundCulling(JAISoundID); -}; - -struct Z2Calc { - struct CurveSign {}; - - /* 802A96F4 */ void getParamByExp(f32, f32, f32, f32, f32, f32, Z2Calc::CurveSign); -}; - -struct JAUSoundAnimation { - /* 802A6F70 */ void getStartSoundIndex(f32) const; - /* 802A7044 */ void getEndSoundIndex(f32) const; -}; - -// -// Forward References: -// - -extern "C" void __ct__14Z2SoundObjBaseFv(); -extern "C" void __dt__14Z2SoundObjBaseFv(); -extern "C" void init__14Z2SoundObjBaseFP3VecUc(); -extern "C" void deleteObject__14Z2SoundObjBaseFv(); -extern "C" void framework__14Z2SoundObjBaseFUlSc(); -extern "C" void dispose__14Z2SoundObjBaseFv(); -extern "C" void stopOK__14Z2SoundObjBaseFR17Z2SoundHandlePool(); -extern "C" void startSound__14Z2SoundObjBaseF10JAISoundIDUlSc(); -extern "C" void startLevelSound__14Z2SoundObjBaseF10JAISoundIDUlSc(); -extern "C" void startCollisionSE__14Z2SoundObjBaseFUlUlP14Z2SoundObjBase(); -extern "C" void __ct__21Z2DopplerSoundObjBaseFv(); -extern "C" void __dt__21Z2DopplerSoundObjBaseFv(); -extern "C" void init__21Z2DopplerSoundObjBaseFP3VecUc(); -extern "C" void framework__21Z2DopplerSoundObjBaseFUlSc(); -extern "C" void startSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc(); -extern "C" void startLevelSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc(); -extern "C" void __ct__16Z2SoundObjSimpleFv(); -extern "C" void init__16Z2SoundObjSimpleFP3VecUc(); -extern "C" void startSound__16Z2SoundObjSimpleF10JAISoundIDUlSc(); -extern "C" void startLevelSound__16Z2SoundObjSimpleF10JAISoundIDUlSc(); -extern "C" void __ct__15Z2SoundObjArrowFv(); -extern "C" void init__15Z2SoundObjArrowFP3VecUc(); -extern "C" void __ct__15Z2SoundObjAnimeFv(); -extern "C" void init__15Z2SoundObjAnimeFP3VecUc(); -extern "C" void initAnime__15Z2SoundObjAnimeFPvbff(); -extern "C" void ageSounds___15Z2SoundObjAnimeFv(); -extern "C" void updateAnime__15Z2SoundObjAnimeFff(); -extern "C" void updateSoundLifeTime___15Z2SoundObjAnimeFff(); -extern "C" void func_802BF660(); -extern "C" void func_802BF890(); -extern "C" void func_802BF898(); - -// -// External References: -// - -extern "C" void releaseSound__14JAISoundHandleFv(); -extern "C" void acceptsNewAudible__8JAISoundCFv(); -extern "C" void func_802A2474(); -extern "C" void stop__8JAISoundFv(); -extern "C" void moveVolume__18JAISoundParamsMoveFfUl(); -extern "C" void movePitch__18JAISoundParamsMoveFfUl(); -extern "C" void moveFxMix__18JAISoundParamsMoveFfUl(); -extern "C" void getStartSoundIndex__17JAUSoundAnimationCFf(); -extern "C" void getEndSoundIndex__17JAUSoundAnimationCFf(); -extern "C" void getParamByExp__6Z2CalcFffffffQ26Z2Calc9CurveSign(); -extern "C" void setPortData__14Z2SoundStarterFP14JAISoundHandleUlUsSc(); -extern "C" void __ct__14Z2SoundHandlesFv(); -extern "C" void __dt__14Z2SoundHandlesFv(); -extern "C" void initHandlesPool__14Z2SoundHandlesFUc(); -extern "C" void deleteHandlesPool__14Z2SoundHandlesFv(); -extern "C" void getHandleSoundID__14Z2SoundHandlesF10JAISoundID(); -extern "C" void getHandleUserData__14Z2SoundHandlesFUl(); -extern "C" void getFreeHandle__14Z2SoundHandlesFv(); -extern "C" void getLowPrioSound__14Z2SoundHandlesF10JAISoundID(); -extern "C" void func_802AB538(); -extern "C" void isSoundCulling__7Z2SeMgrF10JAISoundID(); -extern "C" void getSwBit__11Z2SoundInfoCF10JAISoundID(); -extern "C" void __dl__FPv(); -extern "C" void getNthLink__10JSUPtrListCFUl(); -extern "C" void _savegpr_23(); -extern "C" void _savegpr_28(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_23(); -extern "C" void _restgpr_28(); -extern "C" void _restgpr_29(); -extern "C" extern Z2SoundInfo* data_80450B4C; -extern "C" extern u8 data_80450B60[4]; -extern "C" extern Z2SoundStarter* data_80450B74; -extern "C" extern u8 data_80450B88[4]; -extern "C" extern u8 __OSReport_disable; - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 803CACD0-803CACF0 027DF0 0020+00 1/1 1/1 0/0 .data __vt__15Z2SoundObjAnime */ -SECTION_DATA extern void* __vt__15Z2SoundObjAnime[8] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)framework__14Z2SoundObjBaseFUlSc, - (void*)dispose__14Z2SoundObjBaseFv, - (void*)stopOK__14Z2SoundObjBaseFR17Z2SoundHandlePool, - (void*)init__15Z2SoundObjAnimeFP3VecUc, - (void*)startSound__14Z2SoundObjBaseF10JAISoundIDUlSc, - (void*)startLevelSound__14Z2SoundObjBaseF10JAISoundIDUlSc, -}; - -/* 803CACF0-803CAD10 027E10 0020+00 1/1 0/0 1/1 .data __vt__15Z2SoundObjArrow */ -SECTION_DATA extern void* __vt__15Z2SoundObjArrow[8] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)framework__21Z2DopplerSoundObjBaseFUlSc, - (void*)dispose__14Z2SoundObjBaseFv, - (void*)stopOK__14Z2SoundObjBaseFR17Z2SoundHandlePool, - (void*)init__15Z2SoundObjArrowFP3VecUc, - (void*)startSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc, - (void*)startLevelSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc, -}; - -/* 803CAD10-803CAD30 027E30 0020+00 1/1 3/3 14/14 .data __vt__16Z2SoundObjSimple */ -SECTION_DATA extern void* __vt__16Z2SoundObjSimple[8] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)framework__14Z2SoundObjBaseFUlSc, - (void*)dispose__14Z2SoundObjBaseFv, - (void*)stopOK__14Z2SoundObjBaseFR17Z2SoundHandlePool, - (void*)init__16Z2SoundObjSimpleFP3VecUc, - (void*)startSound__16Z2SoundObjSimpleF10JAISoundIDUlSc, - (void*)startLevelSound__16Z2SoundObjSimpleF10JAISoundIDUlSc, -}; - -/* 803CAD30-803CAD50 027E50 0020+00 2/2 0/0 0/0 .data __vt__21Z2DopplerSoundObjBase */ -SECTION_DATA extern void* __vt__21Z2DopplerSoundObjBase[8] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)framework__21Z2DopplerSoundObjBaseFUlSc, - (void*)dispose__14Z2SoundObjBaseFv, - (void*)stopOK__14Z2SoundObjBaseFR17Z2SoundHandlePool, - (void*)init__21Z2DopplerSoundObjBaseFP3VecUc, - (void*)startSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc, - (void*)startLevelSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc, -}; - -/* 803CAD50-803CAD70 027E70 0020+00 2/2 0/0 0/0 .data __vt__14Z2SoundObjBase */ -SECTION_DATA extern void* __vt__14Z2SoundObjBase[8] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)framework__14Z2SoundObjBaseFUlSc, - (void*)dispose__14Z2SoundObjBaseFv, - (void*)stopOK__14Z2SoundObjBaseFR17Z2SoundHandlePool, - (void*)init__14Z2SoundObjBaseFP3VecUc, - (void*)startSound__14Z2SoundObjBaseF10JAISoundIDUlSc, - (void*)startLevelSound__14Z2SoundObjBaseF10JAISoundIDUlSc, -}; +inline JAISoundID JAISound::getID() const { + return JAISoundID((u32)soundID); +} Z2SoundObjBase::Z2SoundObjBase() { //! @note initializer list doesn't work since fields were initialized out of @@ -187,47 +33,33 @@ Z2SoundObjBase::~Z2SoundObjBase() { void Z2SoundObjBase::init(Vec* pSoundPos, u8 pNumHandles) { initHandlesPool(pNumHandles); - mSoundPos = pSoundPos; + mSoundPos = (JGeometry::TVec3*)pSoundPos; mIsInitialized = true; } /* 802BDFF8-802BE038 2B8938 0040+00 1/1 8/8 61/61 .text deleteObject__14Z2SoundObjBaseFv */ -// issue from using temp virtuals i think -#ifdef NONMATCHING void Z2SoundObjBase::deleteObject() { dispose(); deleteHandlesPool(); } -#else -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjBase::deleteObject() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/deleteObject__14Z2SoundObjBaseFv.s" -} -#pragma pop -#endif void Z2SoundObjBase::framework(u32 p1, s8 p2) { if (mIsInitialized) { field_0x1c = p1; field_0x1e = p2; - setPos(*(JGeometry::TVec3*)mSoundPos); + setPos(*mSoundPos); } } /* 802BE070-802BE104 2B89B0 0094+00 5/0 3/0 0/0 .text dispose__14Z2SoundObjBaseFv */ -// sInstance stuff -#ifdef NONMATCHING void Z2SoundObjBase::dispose() { JAISoundHandle* handle; JSULink* link; for (link = getFirst(); link != NULL; link = link->getNext()) { handle = link->getObject(); if (handle != NULL && (bool)*handle) { - u32 swBit = data_80450B4C->getSwBit((*handle)->getID()); + u32 swBit = JASGlobalInstance::sInstance->getSwBit((*handle)->getID()); if ((swBit & 0x8000) != 0) { handle->releaseSound(); } else { @@ -238,366 +70,470 @@ void Z2SoundObjBase::dispose() { mIsInitialized = false; } -#else -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjBase::dispose() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/dispose__14Z2SoundObjBaseFv.s" -} -#pragma pop -#endif /* 802BE104-802BE144 2B8A44 0040+00 5/0 3/0 0/0 .text * stopOK__14Z2SoundObjBaseFR17Z2SoundHandlePool */ - -// sInstance stuff -#ifdef NONMATCHING bool Z2SoundObjBase::stopOK(Z2SoundHandlePool& pSoundHandlePool) { - return !(data_80450B4C->getSwBit(pSoundHandlePool->getID()) & 0x8000); + return !(JASGlobalInstance::sInstance-> + getSwBit(pSoundHandlePool->getID()) & 0x8000); } -#else -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm bool Z2SoundObjBase::stopOK(Z2SoundHandlePool& param_0) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/stopOK__14Z2SoundObjBaseFR17Z2SoundHandlePool.s" -} -#pragma pop -#endif - -/* ############################################################################################## */ -/* 80455B38-80455B3C 004138 0004+00 5/5 0/0 0/0 .sdata2 @3559 */ -SECTION_SDATA2 static f32 lit_3559 = 127.0f; - -/* 80455B3C-80455B40 00413C 0004+00 4/4 0/0 0/0 .sdata2 @3560 */ -SECTION_SDATA2 static f32 lit_3560 = 1.0f; - -/* 80455B40-80455B48 004140 0004+04 3/3 0/0 0/0 .sdata2 @3561 */ -SECTION_SDATA2 static f32 lit_3561[1 + 1 /* padding */] = { - -1.0f, - /* padding */ - 0.0f, -}; - -/* 80455B48-80455B50 004148 0008+00 3/3 0/0 0/0 .sdata2 @3564 */ -SECTION_SDATA2 static f64 lit_3564 = 4503601774854144.0 /* cast s32 to float */; /* 802BE144-802BE2D4 2B8A84 0190+00 5/3 3/1 0/0 .text * startSound__14Z2SoundObjBaseF10JAISoundIDUlSc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjBase::startSound(JAISoundID param_0, u32 param_1, s8 param_2) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/startSound__14Z2SoundObjBaseF10JAISoundIDUlSc.s" +JAISoundHandle* Z2SoundObjBase::startSound(JAISoundID pSoundId, u32 param_1, s8 param_2) { + if (!mIsInitialized) { + return NULL; + } + if (JASGlobalInstance::getInstance()->isSoundCulling(pSoundId)) { + return NULL; + } + if (param_1 == 0) { + param_1 = (u32)field_0x1c; + } + if (param_2 < 0) { + param_2 = field_0x1e; + } + f32 local_0 = (f32)param_2 / 127.0f; + JAISoundHandle* handle = getHandleSoundID(pSoundId); + if (handle != NULL) { + if ((JASGlobalInstance::getInstance()->getSwBit(pSoundId) & 0x4000) != 0) { + handle = NULL; + } else { + return NULL; + } + } + if (handle == NULL) { + handle = getFreeHandle(); + } + if (handle == NULL) { + handle = getLowPrioSound(pSoundId); + } + if (handle != NULL) { + mSoundStarter->startSound(pSoundId, handle, mSoundPos, param_1, local_0, + 1.0f, 1.0f, -1.0f, -1.0f, 0); + } + return handle; } -#pragma pop /* 802BE2D4-802BE4A4 2B8C14 01D0+00 4/2 3/0 0/0 .text * startLevelSound__14Z2SoundObjBaseF10JAISoundIDUlSc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjBase::startLevelSound(JAISoundID param_0, u32 param_1, s8 param_2) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/startLevelSound__14Z2SoundObjBaseF10JAISoundIDUlSc.s" +JAISoundHandle* Z2SoundObjBase::startLevelSound(JAISoundID pSoundId, u32 param_1, s8 param_2) { + if (!mIsInitialized) { + return NULL; + } + if (param_1 == 0) { + param_1 = (u32)field_0x1c; + } + if (param_2 < 0) { + param_2 = field_0x1e; + } + f32 local_0 = (f32)param_2 / 127.0f; + JAISoundHandle* handle = getHandleSoundID(pSoundId); + if (handle != NULL) { + handle->getSound()->updateLifeTime(1); + mSoundStarter->setPortData(handle, 6, (u16)param_1, -1); + handle->getSound()->getAuxiliary().moveFxMix(local_0, 0); + } else { + if (JASGlobalInstance::getInstance()->isSoundCulling(pSoundId)) { + return NULL; + } + handle = getFreeHandle(); + if (handle == NULL) { + handle = getLowPrioSound(pSoundId); + } + if (handle != NULL) { + mSoundStarter->startSound(pSoundId, handle, mSoundPos, param_1, local_0, + 1.0f, 1.0f, -1.0f, -1.0f, 0); + if (handle != NULL && handle->getSound() != NULL) { + handle->getSound()->setLifeTime(1, false); + } + } + } + return handle; } -#pragma pop /* 802BE4A4-802BE5A0 2B8DE4 00FC+00 0/0 5/5 21/21 .text * startCollisionSE__14Z2SoundObjBaseFUlUlP14Z2SoundObjBase */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjBase::startCollisionSE(u32 param_0, u32 param_1, Z2SoundObjBase* param_2) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/startCollisionSE__14Z2SoundObjBaseFUlUlP14Z2SoundObjBase.s" +JAISoundHandle* Z2SoundObjBase::startCollisionSE(u32 pId, u32 pUserData, Z2SoundObjBase* pOther) { + if (pOther != NULL) { + return pOther->startCollisionSE(pId, pUserData, NULL); + } + if (53 < pUserData) { + pUserData = 0; + } + for (JSULink* link = + Z2GetSoundMgr()->getSeMgr()->getCategory(4)->getSeList()->getFirst(); + link != NULL; link = link->getNext()) { + if (pId == link->getObject()->getID() && pUserData == link->getObject()->getUserData()) { + link->getObject()->stop(); + } + } + JAISoundHandle* handle = Z2SoundObjBase::startSound(JAISoundID(pId), pUserData, -1); + if (handle != NULL && handle->getSound() != NULL) { + handle->getSound()->setUserData(pUserData); + if (30 <= pUserData && pUserData <= 52) { + Z2Audible* audible = (Z2Audible*)handle->getSound()->getAudible(); + if (audible != NULL) { + JAUAudibleParam* param = audible->getAudibleParam(); + param->field_0x0.bytes.b1_2_7 = 8; + } + } + } + return handle; } -#pragma pop /* ############################################################################################## */ /* 8039C230-8039C240 028890 000C+04 1/1 0/0 0/0 .rodata cNullVec__6Z2Calc */ -SECTION_RODATA static u8 const cNullVec__6Z2Calc[12 + 4 /* padding */] = { - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - /* padding */ - 0x00, - 0x00, - 0x00, - 0x00, -}; -COMPILER_STRIP_GATE(0x8039C230, &cNullVec__6Z2Calc); +static Vec const cNullVec__6Z2Calc = {0.0f, 0.0f, 0.0f}; /* 802BE5A0-802BE5FC 2B8EE0 005C+00 1/1 0/0 0/0 .text __ct__21Z2DopplerSoundObjBaseFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm Z2DopplerSoundObjBase::Z2DopplerSoundObjBase() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/__ct__21Z2DopplerSoundObjBaseFv.s" +Z2DopplerSoundObjBase::Z2DopplerSoundObjBase() : Z2SoundObjBase() { + field_0x20 = cNullVec__6Z2Calc; + field_0x2c = cNullVec__6Z2Calc; } -#pragma pop /* 802BE5FC-802BE65C 2B8F3C 0060+00 0/0 0/0 1/1 .text __dt__21Z2DopplerSoundObjBaseFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm Z2DopplerSoundObjBase::~Z2DopplerSoundObjBase() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/__dt__21Z2DopplerSoundObjBaseFv.s" -} -#pragma pop +Z2DopplerSoundObjBase::~Z2DopplerSoundObjBase() {} /* 802BE65C-802BE6B8 2B8F9C 005C+00 1/0 0/0 0/0 .text init__21Z2DopplerSoundObjBaseFP3VecUc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2DopplerSoundObjBase::init(Vec* param_0, u8 param_1) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/init__21Z2DopplerSoundObjBaseFP3VecUc.s" +void Z2DopplerSoundObjBase::init(Vec* param_0, u8 param_1) { + Z2SoundObjBase::init(param_0, param_1); + if (mSoundPos != NULL) { + // field_0x20 = *mSoundPos; + JGeometry::setTVec3f(&mSoundPos->x, &field_0x20.x); + // field_0x2c = *mSoundPos; + JGeometry::setTVec3f(&mSoundPos->x, &field_0x2c.x); + } } -#pragma pop /* 802BE6B8-802BE714 2B8FF8 005C+00 2/0 0/0 0/0 .text framework__21Z2DopplerSoundObjBaseFUlSc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -// asm void Z2DopplerSoundObjBase::framework(u32 param_0, s8 param_1) { -extern "C" asm void framework__21Z2DopplerSoundObjBaseFUlSc() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/framework__21Z2DopplerSoundObjBaseFUlSc.s" +void Z2DopplerSoundObjBase::framework(u32 param_0, s8 param_1) { + Z2SoundObjBase::framework(param_0, param_1); + if (mSoundPos != NULL) { + // field_0x20 = field_0x2c; + JGeometry::setTVec3f(&field_0x2c.x, &field_0x20.x); + // field_0x2c = *mSoundPos; + JGeometry::setTVec3f(&mSoundPos->x, &field_0x2c.x); + } } -#pragma pop /* 802BE714-802BE7AC 2B9054 0098+00 2/0 0/0 0/0 .text * startSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2DopplerSoundObjBase::startSound(JAISoundID param_0, u32 param_1, s8 param_2) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/startSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc.s" +JAISoundHandle* Z2DopplerSoundObjBase::startSound(JAISoundID pSoundId, u32 param_1, s8 param_2) { + JGeometry::TVec3* pos = mSoundPos; + mSoundPos = NULL; + JAISoundHandle* handle = Z2SoundObjBase::startSound(pSoundId, param_1, param_2); + if (pos != NULL && handle != NULL && handle->getSound() != NULL) { + if (handle->getSound()->acceptsNewAudible()) { + handle->getSound()->newAudible(*pos, &field_0x20, 0, NULL); + } + } + mSoundPos = pos; + return handle; } -#pragma pop /* 802BE7AC-802BE844 2B90EC 0098+00 2/0 0/0 0/0 .text * startLevelSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2DopplerSoundObjBase::startLevelSound(JAISoundID param_0, u32 param_1, s8 param_2) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/startLevelSound__21Z2DopplerSoundObjBaseF10JAISoundIDUlSc.s" +JAISoundHandle* Z2DopplerSoundObjBase::startLevelSound(JAISoundID pSoundId, + u32 param_1, s8 param_2) { + JGeometry::TVec3* pos = mSoundPos; + mSoundPos = NULL; + JAISoundHandle* handle = Z2SoundObjBase::startLevelSound(pSoundId, param_1, param_2); + if (pos != NULL && handle != NULL && handle->getSound() != NULL) { + if (handle->getSound()->acceptsNewAudible()) { + handle->getSound()->newAudible(*pos, &field_0x20, 0, NULL); + } + } + mSoundPos = pos; + return handle; } -#pragma pop /* 802BE844-802BE880 2B9184 003C+00 0/0 8/8 65/65 .text __ct__16Z2SoundObjSimpleFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm Z2SoundObjSimple::Z2SoundObjSimple() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/__ct__16Z2SoundObjSimpleFv.s" -} -#pragma pop +Z2SoundObjSimple::Z2SoundObjSimple() : Z2SoundObjBase() {} void Z2SoundObjSimple::init(Vec* pSoundPos, u8 pNumHandles) { Z2SoundObjBase::init(pSoundPos, pNumHandles); } -/* ############################################################################################## */ -/* 80455B50-80455B54 004150 0004+00 4/4 0/0 0/0 .sdata2 @3821 */ -SECTION_SDATA2 static u8 lit_3821[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; - -/* 80455B54-80455B58 004154 0004+00 2/2 0/0 0/0 .sdata2 @3822 */ -SECTION_SDATA2 static f32 lit_3822 = 1.0f / 5.0f; - -/* 80455B58-80455B5C 004158 0004+00 2/2 0/0 0/0 .sdata2 @3823 */ -SECTION_SDATA2 static f32 lit_3823 = 2.0f / 5.0f; - -/* 80455B5C-80455B60 00415C 0004+00 2/2 0/0 0/0 .sdata2 @3824 */ -SECTION_SDATA2 static f32 lit_3824 = 3.0f / 5.0f; - -/* 80455B60-80455B68 004160 0004+04 2/2 0/0 0/0 .sdata2 @3825 */ -SECTION_SDATA2 static f32 lit_3825[1 + 1 /* padding */] = { - 6.0f / 5.0f, - /* padding */ - 0.0f, -}; - -/* 80455B68-80455B70 004168 0008+00 3/3 0/0 0/0 .sdata2 @3828 */ -SECTION_SDATA2 static f64 lit_3828 = 4503599627370496.0 /* cast u32 to float */; - /* 802BE8A0-802BE9B0 2B91E0 0110+00 1/0 0/0 0/0 .text * startSound__16Z2SoundObjSimpleF10JAISoundIDUlSc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjSimple::startSound(JAISoundID param_0, u32 param_1, s8 param_2) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/startSound__16Z2SoundObjSimpleF10JAISoundIDUlSc.s" +JAISoundHandle* Z2SoundObjSimple::startSound(JAISoundID pSoundId, u32 param_1, s8 param_2) { + JAISoundHandle* handle = Z2SoundObjBase::startSound(pSoundId, param_1, param_2); + if (pSoundId == 0x200c7 && handle != NULL && handle->getSound() != NULL) { + f32 local_0 = Z2Calc::getParamByExp((f32)param_1, 0.0f, 127.0f, 0.2f, 0.4f, 1.0f, + Z2Calc::CURVE_SIGN_1); + f32 local_1 = Z2Calc::getParamByExp((f32)param_1, 0.0f, 127.0f, 0.2f, 0.6f, 1.2f, + Z2Calc::CURVE_SIGN_1); + handle->getSound()->getAuxiliary().movePitch(local_1, 0); + handle->getSound()->getAuxiliary().moveVolume(local_0, 0); + } + return handle; } -#pragma pop - -/* ############################################################################################## */ -/* 80455B70-80455B74 004170 0004+00 1/1 0/0 0/0 .sdata2 @3859 */ -SECTION_SDATA2 static f32 lit_3859 = 2.0f; - -/* 80455B74-80455B78 004174 0004+00 1/1 0/0 0/0 .sdata2 @3860 */ -SECTION_SDATA2 static f32 lit_3860 = 22.0f; - -/* 80455B78-80455B7C 004178 0004+00 1/1 0/0 0/0 .sdata2 @3861 */ -SECTION_SDATA2 static f32 lit_3861 = 50.0f; - -/* 80455B7C-80455B80 00417C 0004+00 1/1 0/0 0/0 .sdata2 @3862 */ -SECTION_SDATA2 static f32 lit_3862 = 1.5f; /* 802BE9B0-802BEB38 2B92F0 0188+00 1/0 0/0 0/0 .text * startLevelSound__16Z2SoundObjSimpleF10JAISoundIDUlSc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjSimple::startLevelSound(JAISoundID param_0, u32 param_1, s8 param_2) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/startLevelSound__16Z2SoundObjSimpleF10JAISoundIDUlSc.s" +JAISoundHandle* Z2SoundObjSimple::startLevelSound(JAISoundID pSoundId, u32 param_1, s8 param_2) { + JAISoundHandle* handle = Z2SoundObjBase::startLevelSound(pSoundId, param_1, param_2); + if (handle != NULL && handle->getSound() != NULL) { + f32 local_0 = 1.0f; + f32 local_1 = 1.0f; + switch (pSoundId) { + case 0x200c6: + local_1 = Z2Calc::getParamByExp((f32)param_1, 0.0f, 127.0f, 0.2f, 0.4f, 1.0f, + Z2Calc::CURVE_SIGN_1); + local_0 = Z2Calc::getParamByExp((f32)param_1, 0.0f, 127.0f, 0.2f, 0.6f, 1.2f, + Z2Calc::CURVE_SIGN_1); + break; + case 0x8025c: + if (param_1 > 100) { + local_0 = 2.0f; + } else if (param_1 > 21) { + local_0 = Z2Calc::getParamByExp((f32)param_1, 22.0f, 50.0f, 0.4f, 1.0f, 1.5f, + Z2Calc::CURVE_SIGN_0); + } + break; + } + handle->getSound()->getAuxiliary().movePitch(local_0, 0); + handle->getSound()->getAuxiliary().moveVolume(local_1, 0); + } + return handle; } -#pragma pop /* 802BEB38-802BEB74 2B9478 003C+00 0/0 0/0 2/2 .text __ct__15Z2SoundObjArrowFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm Z2SoundObjArrow::Z2SoundObjArrow() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/__ct__15Z2SoundObjArrowFv.s" -} -#pragma pop +Z2SoundObjArrow::Z2SoundObjArrow() : Z2DopplerSoundObjBase() {} /* 802BEB74-802BEB94 2B94B4 0020+00 1/0 0/0 0/0 .text init__15Z2SoundObjArrowFP3VecUc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -// asm void Z2SoundObjArrow::init(Vec* param_0, u8 param_1) { -extern "C" asm void init__15Z2SoundObjArrowFP3VecUc() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/init__15Z2SoundObjArrowFP3VecUc.s" +void Z2SoundObjArrow::init(Vec* param_0, u8 param_1) { + Z2SoundObjBase::init(param_0, param_1); } -#pragma pop /* 802BEB94-802BEBDC 2B94D4 0048+00 0/0 2/2 0/0 .text __ct__15Z2SoundObjAnimeFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm Z2SoundObjAnime::Z2SoundObjAnime() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/__ct__15Z2SoundObjAnimeFv.s" +Z2SoundObjAnime::Z2SoundObjAnime() : Z2SoundObjBase() { + mpAnimation = NULL; + mReverse = false; } -#pragma pop /* 802BEBDC-802BEBFC 2B951C 0020+00 1/0 1/0 0/0 .text init__15Z2SoundObjAnimeFP3VecUc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -extern "C" asm void init__15Z2SoundObjAnimeFP3VecUc() { - // asm void Z2SoundObjAnime::init(Vec* param_0, u8 param_1) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/init__15Z2SoundObjAnimeFP3VecUc.s" +void Z2SoundObjAnime::init(Vec* param_0, u8 param_1) { + Z2SoundObjBase::init(param_0, param_1); } -#pragma pop /* 802BEBFC-802BED68 2B953C 016C+00 0/0 2/2 0/0 .text initAnime__15Z2SoundObjAnimeFPvbff */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjAnime::initAnime(void* param_0, bool param_1, f32 param_2, f32 param_3) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/initAnime__15Z2SoundObjAnimeFPvbff.s" +void Z2SoundObjAnime::initAnime(void* param_0, bool param_1, f32 param_2, f32 param_3) { + ageSounds_(); + mpAnimation = (JAUSoundAnimation*)param_0; + if (mpAnimation != NULL) { + mReverse = !param_1; + field_0x3c = 0; + if (mReverse) { + mCurSoundIndex = mpAnimation->getNumSounds() - 1; + mCurSoundFrame = FLT_MAX; + setLoopFrame(0.0f, param_2); + } else { + mCurSoundIndex = 0; + mCurSoundFrame = 0.0f; + setLoopFrame(param_2, 0.0f); + } + mCurSoundFrame = param_3; + mCurSoundIndex = mpAnimation->getStartSoundIndex(param_3); + if (mReverse && mCurSoundIndex > 0) { + mCurSoundIndex--; + } + } } -#pragma pop /* 802BED68-802BEED4 2B96A8 016C+00 1/1 0/0 0/0 .text ageSounds___15Z2SoundObjAnimeFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjAnime::ageSounds_() { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/ageSounds___15Z2SoundObjAnimeFv.s" +void Z2SoundObjAnime::ageSounds_() { + for (int i = 0; i < getNumHandles(); i++) { + if (getHandle(i)->getSound() != NULL) { + switch (getHandle(i)->getSound()->getAnimationState()) { + case 0: + break; + case 1: + if (getHandle(i)->getSound()->hasLifeTime()) { + getHandle(i)->getSound()->stop(); + } else { + JAUSoundAnimationSound* sound = + (JAUSoundAnimationSound*)getHandle(i)->getSound()->getUserData(); + if (sound->stopsWhenAnimationChanges()) { + getHandle(i)->getSound()->stop(); + } else { + getHandle(i)->getSound()->setAnimationState(2); + } + } + break; + case 2: + break; + } + } + } } -#pragma pop /* 802BEED4-802BF304 2B9814 0430+00 0/0 2/2 0/0 .text updateAnime__15Z2SoundObjAnimeFff */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjAnime::updateAnime(f32 param_0, f32 param_1) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/updateAnime__15Z2SoundObjAnimeFff.s" +void Z2SoundObjAnime::updateAnime(f32 param_0, f32 param_1) { + for (int i = 0; i < getNumHandles(); i++) { + if (getHandle(i)->getSound() != NULL && getHandle(i)->getSound()->isAnimated()) { + getHandle(i)->getSound()->setPos(*mSoundPos); + } + } + + if (mpAnimation == NULL || mpAnimation->getNumSounds() == 0) { + return; + } + + if (!mReverse) { + if (param_0 < mCurSoundFrame) { + while (mCurSoundIndex < mEndSoundIndex) { + startSoundInner(*mSoundPos, param_1, mSoundStarter, field_0x1c, field_0x1e); + } + mCurSoundIndex = mStartSoundIndex; + mCurSoundFrame = param_0; + if (field_0x3c < 0xffff) { + field_0x3c++; + } + } + updateSoundLifeTime_(param_0, param_1); + while (mCurSoundIndex < mpAnimation->getNumSounds() && + mpAnimation->getSound(mCurSoundIndex)->isNotingOn(param_0, false)) { + startSoundInner(*mSoundPos, param_1, mSoundStarter, field_0x1c, field_0x1e); + } + } else { + if (param_0 > mCurSoundFrame) { + while (mCurSoundIndex >= mStartSoundIndex) { + startSoundInner(*mSoundPos, param_1, mSoundStarter, field_0x1c, field_0x1e); + } + mCurSoundIndex = mEndSoundIndex - 1; + mCurSoundFrame = param_0; + if (field_0x3c < 0xffff) { + field_0x3c++; + } + } + updateSoundLifeTime_(param_0, param_1); + while (mCurSoundIndex >= 0 && + mpAnimation->getSound(mCurSoundIndex)->isNotingOn(param_0, true)) { + startSoundInner(*mSoundPos, param_1, mSoundStarter, field_0x1c, field_0x1e); + } + } + + mCurSoundFrame = param_0; } -#pragma pop /* 802BF304-802BF660 2B9C44 035C+00 1/1 0/0 0/0 .text updateSoundLifeTime___15Z2SoundObjAnimeFff */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjAnime::updateSoundLifeTime_(f32 param_0, f32 param_1) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/updateSoundLifeTime___15Z2SoundObjAnimeFff.s" +void Z2SoundObjAnime::updateSoundLifeTime_(f32 param_0, f32 param_1) { + if (mpAnimation == NULL) { + return; + } + for (int i = 0; i < getNumHandles(); i++) { + if (getHandle(i)->getSound() != NULL) { + switch (getHandle(i)->getSound()->getAnimationState()) { + case 0: + break; + case 1: + JAUSoundAnimationSound* sound = + (JAUSoundAnimationSound*)getHandle(i)->getSound()->getUserData(); + bool bvar1 = param_1 == 0.0f && sound->stopsWhenSpeedIsZero(); + if (sound->setsLifeTime()) { + if (bvar1) { + getHandle(i)->getSound()->pause(true); + } else { + if (sound->isNoting(param_0)) { + getHandle(i)->getSound()->updateLifeTime(1); + getHandle(i)->getSound()->pause(false); + } else { + getHandle(i)->getSound()->stop(); + } + } + } else { + if (bvar1) { + getHandle(i)->getSound()->stop(); + } else if (sound->stopsWhenNoteOff() && + sound->isNotingOff(param_0, mReverse)) { + getHandle(i)->getSound()->stop(); + } + } + break; + case 2: + break; + } + } + } } -#pragma pop /* 802BF660-802BF890 2B9FA0 0230+00 1/1 0/0 0/0 .text * startSoundInner__15Z2SoundObjAnimeFRCQ29JGeometry8TVec3fP14Z2SoundStarterUlSc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjAnime::startSoundInner(JGeometry::TVec3 const& param_0, f32 param_1, - Z2SoundStarter* param_2, u32 param_3, s8 param_4) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/func_802BF660.s" +void Z2SoundObjAnime::startSoundInner(JGeometry::TVec3 const& param_0, f32 param_1, + Z2SoundStarter* param_2, u32 param_3, s8 param_4) { + const JAUSoundAnimationSound* sound = mpAnimation->getSound(mCurSoundIndex); + u32 user_data = (u32)sound; + if (mReverse) { + mCurSoundIndex--; + } else { + mCurSoundIndex++; + } + if (sound->field_0x1a > 0) { + param_3 = sound->field_0x1a; + } + if (playsSound(sound, param_0, param_1)) { + u32 id = getSoundID(sound, param_0, param_1); + if (!Z2GetSeMgr()->isSoundCulling(id)) { + JAISoundHandle* handle = getHandleUserData(user_data); + if (handle != NULL && handle->getSound() != NULL && + handle->getSound()->getAnimationState() != 1) { + handle = NULL; + } + if (handle == NULL) { + handle = getFreeHandle(); + } + if (handle != NULL) { + param_2->startSound(id, handle, ¶m_0, param_3, (f32)param_4 / 127.0f, + sound->field_0x0c, (f32)sound->field_0x14 / 127.0f, + -1.0f, -1.0f, 0); + if (handle->getSound() != NULL) { + handle->getSound()->setAnimationState(1); + handle->getSound()->setUserData(user_data); + if (sound->setsLifeTime()) { + handle->getSound()->setLifeTime(1, false); + } + } + } + } + } } -#pragma pop /* 802BF890-802BF898 2BA1D0 0008+00 1/1 0/0 0/0 .text * getSoundID__15Z2SoundObjAnimeFPC22JAUSoundAnimationSoundRCQ29JGeometry8TVec3f */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjAnime::getSoundID(JAUSoundAnimationSound const* param_0, +u32 Z2SoundObjAnime::getSoundID(JAUSoundAnimationSound const* i_sound, JGeometry::TVec3 const& param_1, f32 param_2) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/func_802BF890.s" + return i_sound->mSoundId; } -#pragma pop /* 802BF898-802BF920 2BA1D8 0088+00 1/1 0/0 0/0 .text * playsSound__15Z2SoundObjAnimeFPC22JAUSoundAnimationSoundRCQ29JGeometry8TVec3f */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void Z2SoundObjAnime::playsSound(JAUSoundAnimationSound const* param_0, - JGeometry::TVec3 const& param_1, f32 param_2) { - nofralloc -#include "asm/Z2AudioLib/Z2SoundObject/func_802BF898.s" +bool Z2SoundObjAnime::playsSound(JAUSoundAnimationSound const* i_sound, + JGeometry::TVec3 const& param_1, f32 param_2) { + if (i_sound->playsOnlyOnce()) { + if (field_0x3c != i_sound->field_0x16) { + return false; + } + } else { + if (i_sound->playsAtIntervals() && + i_sound->field_0x16 != field_0x3c % i_sound->field_0x19) { + return false; + } + } + + if (mReverse) { + if (i_sound->playsOnlyForward()) { + return false; + } + } else { + if (i_sound->playsOnlyReverse()) { + return false; + } + } + + return true; } -#pragma pop diff --git a/obj_files.mk b/obj_files.mk index 3393bea7959..8bd871cddf5 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -1047,7 +1047,6 @@ RELS := \ $(BUILD_DIR)/rel/d/a/d_a_warp_bug.plf \ O_FILES_SYM_ON := \ - $(BUILD_DIR)/libs/Z2AudioLib/Z2SoundHandles.o \ $(BUILD_DIR)/src/c/c_dylink.o \ $(BUILD_DIR)/src/d/a/d_a_alink.o \ $(BUILD_DIR)/src/DynamicLink.o \ From 031fcb34aab66902ec8fcffb9f02e2407887cbd0 Mon Sep 17 00:00:00 2001 From: randomsalience Date: Wed, 25 Oct 2023 21:02:11 -0400 Subject: [PATCH 5/5] Update Progress.md --- Progress.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Progress.md b/Progress.md index 2d515ee5e67..90af26b551f 100644 --- a/Progress.md +++ b/Progress.md @@ -7,22 +7,22 @@ Section | Percentage | Decompiled (bytes) | Total (bytes) .init | 97.972973% | 9280 | 9472 .extab | 100.000000% | 96 | 96 .extabindex | 100.000000% | 96 | 96 -.text | 34.522920% | 1241632 | 3596544 +.text | 34.566072% | 1243184 | 3596544 .ctors | 100.000000% | 448 | 448 .dtors | 100.000000% | 32 | 32 .rodata | 100.000000% | 193856 | 193856 .data | 100.000000% | 197632 | 197632 .sdata | 100.000000% | 1408 | 1408 .sdata2 | 100.000000% | 20832 | 20832 -Total | 41.425115% | 1665568 | 4020672 +Total | 41.463716% | 1667120 | 4020672 ## Total Section | Percentage | Decompiled (bytes) | Total (bytes) ---|---|---|--- -main.dol | 41.251512% | 1658588 | 4020672 +main.dol | 41.463716% | 1667120 | 4020672 RELs | 34.646328% | 3984440 | 11500324 -Total | 36.357383% | 5643028 | 15520996 +Total | 36.412354% | 5651560 | 15520996 ## RELs