mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
d_a_npc cleanup (#2466)
* d_a_npc first cleanup pass * more d_a_npc cleanup
This commit is contained in:
+186
-119
@@ -5,6 +5,7 @@
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "Z2AudioLib/Z2Creature.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_bg_s_movebg_actor.h"
|
||||
#include "d/d_path.h"
|
||||
#include "d/d_msg_flow.h"
|
||||
#include "d/d_particle_copoly.h"
|
||||
@@ -354,28 +355,34 @@ struct daNpcT_motionAnmData_c {
|
||||
class daNpcT_Hermite_c {
|
||||
public:
|
||||
/* 0x00 */ f32 field_0x00;
|
||||
/* 0x04 */ f32 field_0x04;
|
||||
/* 0x08 */ f32 field_0x08;
|
||||
/* 0x0C */ f32 field_0x0c;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
/* 0x04 */ f32 H00;
|
||||
/* 0x08 */ f32 H01;
|
||||
/* 0x0C */ f32 H10;
|
||||
/* 0x10 */ f32 H11;
|
||||
|
||||
/* 8014CBAC */ virtual ~daNpcT_Hermite_c() {}
|
||||
|
||||
f32 GetH00() { return H00; }
|
||||
f32 GetH01() { return H01; }
|
||||
f32 GetH10() { return H10; }
|
||||
f32 GetH11() { return H11; }
|
||||
|
||||
// constants might be wrong, regalloc
|
||||
void Set(f32 param_1) {
|
||||
field_0x00 = param_1;
|
||||
f32 sqr = param_1 * param_1;
|
||||
f32 cubed = param_1 * sqr;
|
||||
field_0x04 = 1.0f + (2.0f * cubed - 3.0f * sqr);
|
||||
field_0x08 = -2.0f * cubed + 3.0f * sqr;
|
||||
field_0x0c = param_1 + (cubed - 2.0f * sqr);
|
||||
field_0x10 = cubed - sqr;
|
||||
|
||||
H00 = 1.0f + (2.0f * cubed - 3.0f * sqr);
|
||||
H01 = -2.0f * cubed + 3.0f * sqr;
|
||||
H10 = param_1 + (cubed - 2.0f * sqr);
|
||||
H11 = cubed - sqr;
|
||||
}
|
||||
};
|
||||
|
||||
class daNpcT_Path_c {
|
||||
public:
|
||||
/* 0x00 */ dPath* mpRoomPath;
|
||||
/* 0x00 */ dPath* mPathInfo;
|
||||
/* 0x04 */ cXyz mPosition;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
/* 0x14 */ f32 field_0x14;
|
||||
@@ -395,26 +402,38 @@ public:
|
||||
/* 80145FB4 */ int getDstPosH(cXyz, cXyz*, int, int);
|
||||
/* 80146188 */ int chkPassed1(cXyz, int);
|
||||
/* 801464D8 */ int chkPassed2(cXyz, cXyz*, int, int);
|
||||
|
||||
daNpcT_Path_c() {
|
||||
initialize();
|
||||
}
|
||||
|
||||
virtual ~daNpcT_Path_c() {}
|
||||
|
||||
inline Vec getPntPos(int i_idx) { return mpRoomPath->m_points[i_idx].m_position; }
|
||||
Vec getPntPos(int i_idx) { return mPathInfo->m_points[i_idx].m_position; }
|
||||
|
||||
int chkClose() {
|
||||
int roomPath = dPath_ChkClose(mpRoomPath);
|
||||
return roomPath;
|
||||
BOOL rt = dPath_ChkClose(mPathInfo);
|
||||
return rt;
|
||||
}
|
||||
|
||||
bool chkReverse() { return mDirection == 1; }
|
||||
|
||||
int getNumPnts() {
|
||||
dPath* path = mpRoomPath;
|
||||
dPath* path = mPathInfo;
|
||||
return path->m_num;
|
||||
}
|
||||
|
||||
u16& getIdx() { return mIdx; }
|
||||
const u16 getIdx() { return mIdx; }
|
||||
|
||||
void onReverse() {
|
||||
mDirection = 1;
|
||||
field_0x1E = 1;
|
||||
}
|
||||
|
||||
void offReverse() {
|
||||
mDirection = 0;
|
||||
field_0x1E = 1;
|
||||
}
|
||||
};
|
||||
|
||||
class mDoExt_McaMorfSO;
|
||||
@@ -465,10 +484,10 @@ public:
|
||||
/* 0xD7E */ csXyz field_0xd7e;
|
||||
/* 0xD84 */ csXyz field_0xd84;
|
||||
/* 0xD8A */ csXyz field_0xd8a;
|
||||
/* 0xD90 */ fpc_ProcID mItemId;
|
||||
/* 0xD90 */ fpc_ProcID mItemPartnerId;
|
||||
/* 0xD94 */ u32 mShadowKey;
|
||||
/* 0xD98 */ u32 mAnmFlags;
|
||||
/* 0xD9C */ u32 mMsgId;
|
||||
/* 0xD9C */ fpc_ProcID mMsgId;
|
||||
/* 0xDA0 */ u32 mHitodamaPrtclKey[2];
|
||||
/* 0xDA8 */ u32 mPolSound;
|
||||
/* 0xDAC */ int mStaffId;
|
||||
@@ -541,6 +560,7 @@ public:
|
||||
mMotionSeqMngr(i_motionSequenceData, i_motionStepNum) {
|
||||
initialize();
|
||||
}
|
||||
|
||||
/* 80147FA4 */ static void tgHitCallBack(fopAc_ac_c*, dCcD_GObjInf*, fopAc_ac_c*, dCcD_GObjInf*);
|
||||
/* 80147FD4 */ static void* srchActor(void*, void*);
|
||||
/* 80148058 */ J3DAnmTransform* getTrnsfrmAnmP(char const*, int);
|
||||
@@ -663,7 +683,7 @@ public:
|
||||
field_0xba0.initialize();
|
||||
mJntAnm.initialize();
|
||||
mStagger.initialize();
|
||||
mItemId = fpcM_ERROR_PROCESS_ID_e;
|
||||
mItemPartnerId = fpcM_ERROR_PROCESS_ID_e;
|
||||
field_0xe26 = true;
|
||||
field_0xe1a = cM_rndF(65536.0f);
|
||||
field_0xde0 = 0.2f;
|
||||
@@ -718,34 +738,31 @@ void daNpcT_onEvtBit(u32 i_idx);
|
||||
BOOL daNpcT_getPlayerInfoFromPlayerList(int param_0, int i_roomNo, cXyz* o_spawnPos,
|
||||
csXyz* o_angle);
|
||||
|
||||
struct daBaseNpc_matAnm_c {
|
||||
/* 8014D884 */ void calc(J3DMaterial*) const;
|
||||
/* 80150444 */ ~daBaseNpc_matAnm_c();
|
||||
class daBaseNpc_matAnm_c : public J3DMaterialAnm {
|
||||
public:
|
||||
/* 80150444 */ virtual ~daBaseNpc_matAnm_c() {}
|
||||
/* 8014D884 */ virtual void calc(J3DMaterial*) const;
|
||||
|
||||
/* 0x0F4 */ mutable f32 field_0xF4;
|
||||
/* 0x0F8 */ mutable f32 field_0xF8;
|
||||
/* 0x0FC */ f32 mNowOffsetX;
|
||||
/* 0x100 */ f32 mNowOffsetY;
|
||||
/* 0x104 */ u8 mEyeMoveFlg;
|
||||
/* 0x105 */ u8 mMorfFrm;
|
||||
};
|
||||
|
||||
class daBaseNpc_acMngr_c {
|
||||
private:
|
||||
/* 0x00 */ u8 field_0x00[4];
|
||||
/* 0x04 */ u32 mActorId;
|
||||
|
||||
public:
|
||||
/* 8014D804 */ daBaseNpc_acMngr_c();
|
||||
/* 8014D81C */ void entry(fopAc_ac_c*);
|
||||
/* 8014D838 */ fopAc_ac_c* getActor();
|
||||
/* 80150524 */ ~daBaseNpc_acMngr_c();
|
||||
/* 80150524 */ virtual ~daBaseNpc_acMngr_c() {}
|
||||
|
||||
private:
|
||||
/* 0x04 */ fpc_ProcID mActorId;
|
||||
};
|
||||
|
||||
class daBaseNpc_path_c {
|
||||
private:
|
||||
/* 0x000 */ f32 field_0x0;
|
||||
/* 0x004 */ dPath* mpRoomPath;
|
||||
/* 0x008 */ f32 field_0x8;
|
||||
/* 0x010 */ u8 field_0xc[2562];
|
||||
/* 0xA0E */ u16 field_0xa0e;
|
||||
/* 0xA10 */ u16 mIdx;
|
||||
/* 0xA12 */ s8 mDirection;
|
||||
/* 0xA13 */ u8 field_0xa13[17];
|
||||
|
||||
public:
|
||||
/* 8014D998 */ daBaseNpc_path_c();
|
||||
/* 8014D9A8 */ BOOL isPath();
|
||||
@@ -756,24 +773,22 @@ public:
|
||||
/* 8014DB04 */ u16 getIdx();
|
||||
/* 8014DB0C */ void setIdx(u16);
|
||||
/* 8014DB14 */ Vec getPntPos(u16);
|
||||
/* 801503FC */ ~daBaseNpc_path_c();
|
||||
/* 801503FC */ virtual ~daBaseNpc_path_c() {}
|
||||
|
||||
static const int MAXNUMCONTROLPNT_e = 64;
|
||||
|
||||
private:
|
||||
/* 0x004 */ dPath* mPathInfo;
|
||||
/* 0x008 */ f32 field_0x8;
|
||||
/* 0x00C */ dPnt mCurvePnts[160];
|
||||
/* 0xA0C */ u8 field_0xa0c[0xA0E - 0xA0C];
|
||||
/* 0xA0E */ u16 mCurvePntNum;
|
||||
/* 0xA10 */ u16 mIdx;
|
||||
/* 0xA12 */ s8 mDirection;
|
||||
/* 0xA13 */ u8 field_0xa13[17];
|
||||
};
|
||||
|
||||
class daBaseNpc_lookat_c {
|
||||
private:
|
||||
/* 0x00 */ int field_0x00;
|
||||
/* 0x04 */ csXyz mMaxJntLmt[2];
|
||||
/* 0x10 */ u8 field_0x0A[12];
|
||||
/* 0x1C */ csXyz mMinJntLmt[2];
|
||||
/* 0x28 */ u8 field_0x28[12];
|
||||
/* 0x34 */ cXyz mJntPos[3];
|
||||
/* 0x4C */ u8 field_0x4C[24];
|
||||
/* 0x64 */ csXyz mUnk[2];
|
||||
/* 0x70 */ csXyz mRotation[2];
|
||||
/* 0x7C */ csXyz mUnk2[2];
|
||||
/* 0x88 */ u8 field_0x88[4];
|
||||
/* 0x8C */ cXyz* mpAttnPos;
|
||||
|
||||
public:
|
||||
/* 8014DB40 */ void limitter(s16, s16*, s16, s16);
|
||||
/* 8014DBB4 */ void calc(fopAc_ac_c*, f32 (*)[4], s16);
|
||||
@@ -782,14 +797,22 @@ public:
|
||||
/* 8014E67C */ void setJntPos(cXyz, int);
|
||||
/* 8014E6A0 */ int setAttnPos(cXyz*);
|
||||
/* 8014E6AC */ csXyz getRot(int);
|
||||
/* 801502EC */ ~daBaseNpc_lookat_c();
|
||||
/* 801502EC */ virtual ~daBaseNpc_lookat_c() {}
|
||||
|
||||
/* 0x04 */ csXyz mMaxJntLmt[4];
|
||||
/* 0x1C */ csXyz mMinJntLmt[4];
|
||||
/* 0x34 */ cXyz mJntPos[4];
|
||||
/* 0x64 */ csXyz field_0x64[4];
|
||||
/* 0x7C */ csXyz mRot[4];
|
||||
/* 0x94 */ u8 field_0x94[4];
|
||||
/* 0x98 */ cXyz* mpAttnPos;
|
||||
};
|
||||
|
||||
class daBaseNpc_c : public fopAc_ac_c {
|
||||
public:
|
||||
/* 8014E6C8 */ daBaseNpc_c();
|
||||
/* 8014EE44 */ J3DAnmTransform* getTrnsfrmKeyAnmP(char*, int);
|
||||
/* 8014EE80 */ void setMcaMorfAnm(J3DAnmTransformKey*, f32, f32, int, int, int);
|
||||
/* 8014EE80 */ int setMcaMorfAnm(J3DAnmTransformKey*, f32, f32, int, int, int);
|
||||
/* 8014EEE4 */ void setBckAnm(J3DAnmTransform*, f32, int, int, int, bool);
|
||||
/* 8014EF28 */ J3DAnmTransform* getTexPtrnAnmP(char*, int);
|
||||
/* 8014EF64 */ void setBtpAnm(J3DAnmTexPattern*, J3DModelData*, f32, int);
|
||||
@@ -800,13 +823,13 @@ public:
|
||||
/* 8014F1C8 */ int checkEndAnm(J3DFrameCtrl*);
|
||||
|
||||
/* 8014E89C */ virtual ~daBaseNpc_c();
|
||||
/* 8014EAD0 */ virtual void execute();
|
||||
/* 8014EC50 */ virtual void draw(f32);
|
||||
/* 8014EE3C */ virtual bool getResName();
|
||||
/* 8014EAD0 */ virtual int execute();
|
||||
/* 8014EC50 */ virtual int draw(f32);
|
||||
/* 8014EE3C */ virtual const char* getResName();
|
||||
/* 8014EFA4 */ virtual void attnSttsOn(int, int);
|
||||
/* 8014EFF0 */ virtual void setParam();
|
||||
/* 8014F09C */ virtual void mainProc();
|
||||
/* 8014F140 */ virtual bool btkCtrl();
|
||||
/* 8014F140 */ virtual BOOL btkCtrl();
|
||||
/* 8014F228 */ virtual void allAnmPlay();
|
||||
/* 8014F38C */ virtual void adjustShapeAngle();
|
||||
/* 8014F390 */ virtual void setMtx(int);
|
||||
@@ -815,71 +838,68 @@ public:
|
||||
/* 8014F4A8 */ virtual void drawOtherMdls();
|
||||
/* 8014F4AC */ virtual bool dbgDraw();
|
||||
|
||||
static u8 const mCcDObj[48];
|
||||
static dCcD_SrcGObjInf const mCcDObj;
|
||||
static dCcD_SrcCyl mCcDCyl;
|
||||
static dCcD_SrcSph mCcDSph;
|
||||
|
||||
private:
|
||||
/* 0x56C */ dBgS_Acch field_0x56c;
|
||||
/* 0x744 */ u8 field_0x744[16];
|
||||
/* 0x754 */ mDoExt_McaMorfSO* mpMorf[2];
|
||||
/* 0x758 */ Z2Creature mCreature;
|
||||
/* 0x7EC */ mDoExt_bckAnm mBckAnm;
|
||||
/* 0x808 */ mDoExt_btpAnm mBtpAnm;
|
||||
/* 0x820 */ u8 tmp2[28];
|
||||
/* 0x83c */ u16* field_0x83c;
|
||||
/* 0x56C */ dBgS_ObjAcch mAcch;
|
||||
/* 0x744 */ u8 field_0x744[0x754 - 0x744];
|
||||
/* 0x754 */ mDoExt_McaMorfSO* mpModelMorf;
|
||||
/* 0x758 */ Z2Creature mSound;
|
||||
/* 0x7E8 */ u32 mShadowId;
|
||||
/* 0x7EC */ mDoExt_bckAnm mBck;
|
||||
/* 0x808 */ mDoExt_btpAnm mBtp;
|
||||
/* 0x820 */ mDoExt_btkAnm mBtk;
|
||||
/* 0x838 */ s16 field_0x838;
|
||||
/* 0x83C */ u16* field_0x83c;
|
||||
/* 0x840 */ u16 field_0x840;
|
||||
/* 0x842 */ u8 field_0x842[6];
|
||||
/* 0x848 */ s32 mUnk;
|
||||
/* 0x84C */ dMsgFlow_c mMsg;
|
||||
/* 0x898 */ u8 field_0x898[2];
|
||||
/* 0x842 */ u16 field_0x842;
|
||||
/* 0x844 */ u8 field_0x844[0x848 - 0x844];
|
||||
/* 0x848 */ s32 field_0x848;
|
||||
/* 0x84C */ dMsgFlow_c mMsgFlow;
|
||||
/* 0x898 */ u8 field_0x898[0x89A - 0x898];
|
||||
/* 0x89A */ s16 mEvtIdx;
|
||||
/* 0x89C */ u8 field_0x89C[34];
|
||||
/* 0x8BE */ u8 mRoomId;
|
||||
/* 0x8C0 */ u8 field_0x8C0[90];
|
||||
/* 0x89C */ dCcD_Stts mCcStts;
|
||||
/* 0x8D8 */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x918 */ s16 field_0x918;
|
||||
/* 0x91A */ csXyz field_0x91a;
|
||||
/* 0x920 */ csXyz field_0xd7e;
|
||||
/* 0x926 */ csXyz field_0xd84;
|
||||
/* 0x92C */ csXyz field_0xd8a;
|
||||
/* 0x932 */ csXyz field_0x932;
|
||||
/* 0x938 */ u8 field_0x938[4];
|
||||
/* 0x93C */ csXyz field_0x93c;
|
||||
/* 0x940 */ u8 field_0x940[18];
|
||||
/* 0x954 */ cXyz field_0x954;
|
||||
/* 0x960 */ u8 field_0x960[36];
|
||||
/* 0x984 */ csXyz field_0x984;
|
||||
/* 0x98A */ u8 field_0x98A[18];
|
||||
/* 0x99C */ csXyz field_0x99c;
|
||||
/* 0x9A2 */ u8 field_0x9a2[70];
|
||||
/* 0x9E8 */ const cBgS_PolyInfo mBgSPolyInfo;
|
||||
/* 0x9F9 */ u8 field_0x9f9[27];
|
||||
/* 0x920 */ daBaseNpc_lookat_c mLookat;
|
||||
/* 0x9BC */ csXyz field_0x9bc;
|
||||
/* 0x9C2 */ csXyz field_0x9c2;
|
||||
/* 0x9C8 */ csXyz field_0x9c8;
|
||||
/* 0x9CE */ csXyz field_0x9ce;
|
||||
/* 0x9D4 */ cBgS_GndChk field_0x9d4;
|
||||
/* 0xA10 */ f32 mGroundY;
|
||||
};
|
||||
|
||||
class daBaseNpc_moveBgActor_c : public daBaseNpc_c {
|
||||
private:
|
||||
/* 0xA14 */ u32 field_0xa14;
|
||||
STATIC_ASSERT(sizeof(daBaseNpc_c) == 0xA14);
|
||||
|
||||
class daBaseNpc_moveBgActor_c : public daBaseNpc_c {
|
||||
public:
|
||||
/* 8014F4B4 */ daBaseNpc_moveBgActor_c();
|
||||
/* 8014F518 */ void MoveBGCreateHeap();
|
||||
/* 8014F60C */ void
|
||||
MoveBGCreate(char const*, int,
|
||||
void (*)(dBgW*, void*, cBgS_PolyInfo const&, bool, cXyz*, csXyz*, csXyz*), u32);
|
||||
/* 8014F6FC */ void MoveBGDelete();
|
||||
/* 8014F770 */ void MoveBGExecute();
|
||||
/* 801503BC */ bool CreateHeap();
|
||||
/* 801503C4 */ bool Create();
|
||||
/* 801503CC */ bool Delete();
|
||||
/* 801503D4 */ bool Execute(f32 (**)[3][4]);
|
||||
/* 801503DC */ bool Draw();
|
||||
/* 801503E4 */ bool IsDelete();
|
||||
/* 801503EC */ bool ToFore();
|
||||
/* 801503F4 */ bool ToBack();
|
||||
/* 80155FB0 */ ~daBaseNpc_moveBgActor_c();
|
||||
/* 8014F518 */ int MoveBGCreateHeap();
|
||||
/* 8014F60C */ int MoveBGCreate(char const*, int, MoveBGActor_SetFunc, u32);
|
||||
/* 8014F6FC */ int MoveBGDelete();
|
||||
/* 8014F770 */ int MoveBGExecute();
|
||||
|
||||
static u8 m_name[4];
|
||||
static u8 m_dzb_id[4];
|
||||
static u8 m_set_func[4];
|
||||
/* 80155FB0 */ virtual ~daBaseNpc_moveBgActor_c();
|
||||
/* 801503BC */ virtual int CreateHeap() { return 1; }
|
||||
/* 801503C4 */ virtual int Create() { return 1; }
|
||||
/* 801503D4 */ virtual int Execute(Mtx**) { return 1; }
|
||||
/* 801503DC */ virtual int Draw() { return 1; }
|
||||
/* 801503CC */ virtual int Delete() { return 1; }
|
||||
/* 801503E4 */ virtual int IsDelete() { return 1; }
|
||||
/* 801503EC */ virtual int ToFore() { return 1; }
|
||||
/* 801503F4 */ virtual int ToBack() { return 1; }
|
||||
|
||||
static const char* m_name;
|
||||
static int m_dzb_id;
|
||||
static MoveBGActor_SetFunc m_set_func;
|
||||
|
||||
private:
|
||||
/* 0xA14 */ dBgW* mpBgw;
|
||||
/* 0xA18 */ Mtx mBgMtx;
|
||||
};
|
||||
|
||||
class daNpcF_ActorMngr_c {
|
||||
@@ -1121,7 +1141,7 @@ public:
|
||||
void setCutType(int i_cutType) { mCutType = i_cutType; }
|
||||
void onInterrupt(u8 param_0) { field_0x9ef = param_0; }
|
||||
|
||||
static u8 const mCcDObjInfo[48];
|
||||
static dCcD_SrcGObjInf const mCcDObjInfo;
|
||||
static dCcD_SrcCyl mCcDCyl;
|
||||
static dCcD_SrcSph mCcDSph;
|
||||
static fopAc_ac_c* mFindActorPList[100];
|
||||
@@ -1170,7 +1190,7 @@ class daNpcF_SPCurve_c {
|
||||
private:
|
||||
/* 0x00 */ u16 mNurbs;
|
||||
/* 0x02 */ u16 field_0x02;
|
||||
/* 0x04 */ bool mIsReversed;
|
||||
/* 0x04 */ u8 mIsReversed;
|
||||
/* 0x05 */ bool mIsClosed;
|
||||
/* 0x08 */ dPnt mPoints[96];
|
||||
|
||||
@@ -1189,7 +1209,7 @@ protected:
|
||||
/* 0x00 */ u16 mIdx;
|
||||
/* 0x02 */ u8 mIsReversed;
|
||||
/* 0x03 */ bool mIsClosed;
|
||||
/* 0x04 */ dPath* mpRoomPath;
|
||||
/* 0x04 */ dPath* mPathInfo;
|
||||
/* 0x08 */ f32 mRange;
|
||||
/* 0x0C */ f32 mPosDst;
|
||||
/* 0x10 */ f32 field_0x10;
|
||||
@@ -1218,20 +1238,21 @@ public:
|
||||
|
||||
int getIdx() { return mIdx; };
|
||||
void setIdx(int i_idx) { mIdx = i_idx; }
|
||||
int getArg0() { return mpRoomPath->m_points[mIdx].mArg0; }
|
||||
u8 getArg0(int i_idx) { return mpRoomPath->m_points[i_idx].mArg0; }
|
||||
Vec getPntPos(int i_idx) { return mpRoomPath->m_points[i_idx].m_position; }
|
||||
BOOL chkClose() { return dPath_ChkClose(mpRoomPath); }
|
||||
int getArg0() { return mPathInfo->m_points[mIdx].mArg0; }
|
||||
u8 getArg0(int i_idx) { return mPathInfo->m_points[i_idx].mArg0; }
|
||||
Vec getPntPos(int i_idx) { return mPathInfo->m_points[i_idx].m_position; }
|
||||
BOOL chkClose() { return dPath_ChkClose(mPathInfo); }
|
||||
BOOL chkReverse() { return mIsReversed == true; }
|
||||
void onReverse() { mIsReversed = true; }
|
||||
dPath* getPathInfo() { return mpRoomPath; }
|
||||
void offReverse() { mIsReversed = false; }
|
||||
dPath* getPathInfo() { return mPathInfo; }
|
||||
void setRange(f32 i_range) { mRange = i_range; }
|
||||
}; // Size: 0x630
|
||||
|
||||
class daNpcF_Lookat_c {
|
||||
private:
|
||||
/* 0x00 */ cXyz mJointPos[4];
|
||||
/* 0x30 */ cXyz* mAttnPos;
|
||||
/* 0x30 */ cXyz* mAttnPos_p;
|
||||
/* 0x34 */ csXyz mAngularMoveDis[4];
|
||||
/* 0x4C */ csXyz mMinAngle[4];
|
||||
/* 0x64 */ csXyz mMaxAngle[4];
|
||||
@@ -1250,10 +1271,12 @@ public:
|
||||
/* 80151B68 */ void calcMoveDisAngle(int, cXyz*, csXyz*, cXyz, int, BOOL);
|
||||
/* 80151F54 */ void setRotAngle();
|
||||
/* 80151FE0 */ void clrRotAngle();
|
||||
|
||||
daNpcF_Lookat_c() { initialize(); }
|
||||
virtual ~daNpcF_Lookat_c() {}
|
||||
cXyz* getAttnPos() { return mAttnPos; }
|
||||
void setAttnPos(cXyz* i_attnPos) { mAttnPos = i_attnPos; }
|
||||
|
||||
cXyz* getAttnPos() { return mAttnPos_p; }
|
||||
void setAttnPos(cXyz* i_attnPos) { mAttnPos_p = i_attnPos; }
|
||||
};
|
||||
|
||||
class daNpcF_MoveBgActor_c : public daNpcF_c {
|
||||
@@ -1270,4 +1293,48 @@ public:
|
||||
/* 80155EC0 */ virtual bool ToBack();
|
||||
};
|
||||
|
||||
struct daNpcT_HIOParam {
|
||||
/* 0x00 */ f32 unk0;
|
||||
/* 0x04 */ f32 unk4;
|
||||
/* 0x08 */ f32 unk8;
|
||||
/* 0x0C */ f32 unkC;
|
||||
/* 0x10 */ f32 unk10;
|
||||
/* 0x14 */ f32 unk14;
|
||||
/* 0x18 */ f32 unk18;
|
||||
/* 0x1C */ f32 unk1C;
|
||||
/* 0x20 */ f32 unk20;
|
||||
/* 0x24 */ f32 unk24;
|
||||
/* 0x28 */ f32 unk28;
|
||||
/* 0x2C */ f32 unk2C;
|
||||
/* 0x30 */ f32 unk30;
|
||||
/* 0x34 */ f32 unk34;
|
||||
/* 0x38 */ f32 unk38;
|
||||
/* 0x3C */ f32 unk3C;
|
||||
/* 0x40 */ f32 unk40;
|
||||
/* 0x44 */ f32 unk44;
|
||||
/* 0x48 */ s16 unk48;
|
||||
/* 0x4A */ s16 unk4A;
|
||||
/* 0x4C */ s16 unk4C;
|
||||
/* 0x4E */ s16 unk4E;
|
||||
/* 0x50 */ f32 unk50;
|
||||
/* 0x54 */ f32 unk54;
|
||||
/* 0x58 */ f32 unk58;
|
||||
/* 0x5C */ f32 unk5C;
|
||||
/* 0x60 */ s16 unk60;
|
||||
/* 0x62 */ s16 unk62;
|
||||
/* 0x64 */ s16 unk64;
|
||||
/* 0x66 */ s16 unk66;
|
||||
/* 0x68 */ s16 unk68;
|
||||
/* 0x6A */ u8 unk6A;
|
||||
/* 0x6B */ u8 unk6B;
|
||||
/* 0x6C */ f32 unk6C;
|
||||
/* 0x70 */ f32 unk70;
|
||||
/* 0x74 */ f32 unk74;
|
||||
/* 0x78 */ f32 unk78;
|
||||
/* 0x7C */ f32 unk7C;
|
||||
/* 0x80 */ f32 unk80;
|
||||
/* 0x84 */ f32 unk84;
|
||||
/* 0x88 */ f32 unk88;
|
||||
};
|
||||
|
||||
#endif /* D_A_D_A_NPC_H */
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
/* 80B78CFC */ int getDstPosChase(u16, cXyz, cXyz&);
|
||||
/* 80B78E08 */ f32 chkPassDst(u16, cXyz);
|
||||
/* 80B7EF88 */ ~daNpc_zrA_Path_c() {}
|
||||
int getEndIdx() { return mpRoomPath->m_num - 1; }
|
||||
int getEndIdx() { return mPathInfo->m_num - 1; }
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daNpc_zrA_Path_c) == 0x630);
|
||||
|
||||
@@ -20,9 +20,9 @@ public:
|
||||
|
||||
/* 8048CD68 */ virtual ~daTag_EvtArea_c() {}
|
||||
|
||||
s32 getType() {
|
||||
u8 type = (u8)shape_angle.z;
|
||||
return type == 0xff ? 0 : type;
|
||||
int getType() {
|
||||
u16 type = shape_angle.z & 0xFF;
|
||||
return type == 0xFF ? 0 : type;
|
||||
}
|
||||
|
||||
s32 getNo() {
|
||||
|
||||
+542
-3220
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,301 @@
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/d_bg_w.h"
|
||||
|
||||
static void daBaseNpc_incIdx(int i_pathNo, u16* i_pathIdx, int i_pathClosed, int i_pathDirection);
|
||||
static void daBaseNpc_decIdx(int i_pathNo, u16* i_pathIdx, int i_pathClosed, int i_pathDirection);
|
||||
static f32 daNpcBase_BBasis(int i_deg, int i_pntNo, int i_knotNo, int* i_knotVector_p);
|
||||
|
||||
/* 8014F4B4-8014F4F8 149DF4 0044+00 0/0 0/0 1/1 .text __ct__23daBaseNpc_moveBgActor_cFv
|
||||
*/
|
||||
daBaseNpc_moveBgActor_c::daBaseNpc_moveBgActor_c() {
|
||||
mpBgw = 0;
|
||||
}
|
||||
|
||||
/* 8014F4F8-8014F518 149E38 0020+00 1/1 0/0 0/0 .text CheckCreateHeap__FP10fopAc_ac_c */
|
||||
static int CheckCreateHeap(fopAc_ac_c* i_this) {
|
||||
return ((daBaseNpc_moveBgActor_c*)i_this)->MoveBGCreateHeap();
|
||||
}
|
||||
|
||||
/* 80450FE0-80450FE4 0004E0 0004+00 2/2 0/0 0/0 .sbss m_name__23daBaseNpc_moveBgActor_c
|
||||
*/
|
||||
const char* daBaseNpc_moveBgActor_c::m_name;
|
||||
|
||||
/* 80450FE4-80450FE8 0004E4 0004+00 2/2 0/0 0/0 .sbss m_dzb_id__23daBaseNpc_moveBgActor_c
|
||||
*/
|
||||
int daBaseNpc_moveBgActor_c::m_dzb_id;
|
||||
|
||||
/* 80450FE8-80450FEC 0004E8 0004+00 2/2 0/0 0/0 .sbss m_set_func__23daBaseNpc_moveBgActor_c */
|
||||
MoveBGActor_SetFunc daBaseNpc_moveBgActor_c::m_set_func;
|
||||
|
||||
/* 8014F518-8014F60C 149E58 00F4+00 1/1 0/0 0/0 .text
|
||||
* MoveBGCreateHeap__23daBaseNpc_moveBgActor_cFv */
|
||||
int daBaseNpc_moveBgActor_c::MoveBGCreateHeap() {
|
||||
if (!CreateHeap()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (m_dzb_id == -1) {
|
||||
mpBgw = NULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
mpBgw = new dBgW();
|
||||
|
||||
if (mpBgw != NULL && !mpBgw->Set((cBgD_t*)dComIfG_getObjectRes(m_name, m_dzb_id), 1, &mBgMtx)) {
|
||||
if (m_set_func != NULL) {
|
||||
mpBgw->SetCrrFunc(m_set_func);
|
||||
}
|
||||
} else {
|
||||
mpBgw = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 8014F60C-8014F6FC 149F4C 00F0+00 0/0 0/0 1/1 .text
|
||||
* MoveBGCreate__23daBaseNpc_moveBgActor_cFPCciPFP4dBgWPvRC13cBgS_PolyInfobP4cXyzP5csXyzP5csXyz_vUl
|
||||
*/
|
||||
int daBaseNpc_moveBgActor_c::MoveBGCreate(char const* i_arcName, int i_dzbId, MoveBGActor_SetFunc i_setFunc,
|
||||
u32 i_heapSize) {
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
mDoMtx_stack_c::scaleM(scale);
|
||||
MTXCopy(mDoMtx_stack_c::get(), mBgMtx);
|
||||
|
||||
m_name = i_arcName;
|
||||
m_dzb_id = i_dzbId;
|
||||
m_set_func = i_setFunc;
|
||||
|
||||
if (!fopAcM_entrySolidHeap(this, CheckCreateHeap, i_heapSize)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
if (mpBgw != NULL && mpBgw->ChkUsed() && mDoCPd_c::isConnect(PAD_3)) {
|
||||
JUT_WARN(2019, "%s", "dBgS_MoveBgActor::MoveBGCreate() Don't Regist CreateHeap\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mpBgw != NULL && dComIfG_Bgsp().Regist(mpBgw, this)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
// return Create() ? cPhs_COMPLEATE_e : cPhs_ERROR_e; // using enums here changes code gen
|
||||
return Create() ? 4 : 5;
|
||||
}
|
||||
|
||||
/* 8014F6FC-8014F770 14A03C 0074+00 0/0 0/0 1/1 .text MoveBGDelete__23daBaseNpc_moveBgActor_cFv */
|
||||
int daBaseNpc_moveBgActor_c::MoveBGDelete() {
|
||||
int rt = Delete();
|
||||
if (mpBgw != NULL && mpBgw->ChkUsed() && dComIfG_Bgsp().Release(mpBgw)) {
|
||||
OS_REPORT("Release Error\n");
|
||||
}
|
||||
|
||||
return rt;
|
||||
}
|
||||
|
||||
/* 8014F770-8014F81C 14A0B0 00AC+00 0/0 0/0 2/2 .text MoveBGExecute__23daBaseNpc_moveBgActor_cFv
|
||||
*/
|
||||
int daBaseNpc_moveBgActor_c::MoveBGExecute() {
|
||||
Mtx* sp8 = NULL;
|
||||
int rt = Execute(&sp8);
|
||||
|
||||
if (sp8 == NULL) {
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::YrotM(shape_angle.y);
|
||||
mDoMtx_stack_c::scaleM(scale);
|
||||
MTXCopy(mDoMtx_stack_c::get(), mBgMtx);
|
||||
} else {
|
||||
MTXCopy(*sp8, mBgMtx);
|
||||
}
|
||||
|
||||
if (mpBgw != NULL) {
|
||||
mpBgw->Move();
|
||||
}
|
||||
|
||||
return rt;
|
||||
}
|
||||
|
||||
/* 8014F81C-8014F8C4 14A15C 00A8+00 1/1 0/0 0/0 .text
|
||||
* daBaseNpc_PntVsLineSegmentLengthSquare2D__FffffffPfPfPf */
|
||||
static int daBaseNpc_PntVsLineSegmentLengthSquare2D(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) {
|
||||
int var_r31 = 0;
|
||||
|
||||
f32 temp_f31 = param_4 - param_2;
|
||||
f32 temp_f30 = param_5 - param_3;
|
||||
f32 temp_f28 = (temp_f31 * temp_f31) + (temp_f30 * temp_f30);
|
||||
if (temp_f28 == 0.0f) {
|
||||
*param_8 = 0.0f;
|
||||
return 0;
|
||||
}
|
||||
|
||||
f32 temp_f29 = ((temp_f31 * (param_0 - param_2)) + (temp_f30 * (param_1 - param_3))) / temp_f28;
|
||||
if (0.0f <= temp_f29 && temp_f29 <= 1.0f) {
|
||||
var_r31 = 1;
|
||||
}
|
||||
|
||||
*param_6 = param_2 + (temp_f31 * temp_f29);
|
||||
*param_7 = param_3 + (temp_f30 * temp_f29);
|
||||
*param_8 = ((*param_6 - param_0) * (*param_6 - param_0)) + ((*param_7 - param_1) * (*param_7 - param_1));
|
||||
return var_r31;
|
||||
}
|
||||
|
||||
/* 8014F8C4-8014FB28 14A204 0264+00 1/1 0/0 0/0 .text daBaseNpc_putNurbs__FP4dPntiiP4dPnti */
|
||||
static u16 daBaseNpc_putNurbs(dPnt* i_CPnts, int i_CPntNum, int i_maxPntNum, dPnt* o_curve_p, BOOL i_isClosed) {
|
||||
int knotVector[daBaseNpc_path_c::MAXNUMCONTROLPNT_e + 4];
|
||||
int weights[daBaseNpc_path_c::MAXNUMCONTROLPNT_e];
|
||||
|
||||
int i;
|
||||
int aDeg = 2; // curve degree
|
||||
int aMaxNumCPnt; // max control points
|
||||
if (i_isClosed) {
|
||||
aMaxNumCPnt = i_CPntNum + 1;
|
||||
} else {
|
||||
aMaxNumCPnt = i_CPntNum;
|
||||
}
|
||||
|
||||
JUT_ASSERT(2190, aDeg < aMaxNumCPnt && aMaxNumCPnt < daBaseNpc_path_c::MAXNUMCONTROLPNT_e);
|
||||
JUT_ASSERT(2191, aDeg == 2 || aDeg == 3);
|
||||
|
||||
// create knot vector
|
||||
for (i = 0; i < aDeg + aMaxNumCPnt + 1; i++) {
|
||||
if (aMaxNumCPnt < i) {
|
||||
knotVector[i] = knotVector[i - 1];
|
||||
} else if (aDeg < i) {
|
||||
knotVector[i] = knotVector[i - 1] + 10;
|
||||
} else {
|
||||
knotVector[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// initialize weights
|
||||
for (i = 0; i < aMaxNumCPnt; i++) {
|
||||
weights[i] = 1;
|
||||
}
|
||||
|
||||
int cur_knot;
|
||||
u16 out_pnt_no;
|
||||
for (out_pnt_no = 0, cur_knot = knotVector[aDeg]; cur_knot < knotVector[aDeg + aMaxNumCPnt]; cur_knot += 2, out_pnt_no++) {
|
||||
if (i_maxPntNum <= out_pnt_no) {
|
||||
break;
|
||||
}
|
||||
|
||||
o_curve_p[out_pnt_no].m_position.x = 0.0f;
|
||||
o_curve_p[out_pnt_no].m_position.z = 0.0f;
|
||||
|
||||
f32 total_weight = 0.0f;
|
||||
for (i = 0; i < aMaxNumCPnt; i++) {
|
||||
f32 basis = daNpcBase_BBasis(aDeg, i, cur_knot, knotVector);
|
||||
if (i == i_CPntNum) {
|
||||
o_curve_p[out_pnt_no].m_position.x += i_CPnts[0].m_position.x * basis;
|
||||
o_curve_p[out_pnt_no].m_position.z += i_CPnts[0].m_position.z * basis;
|
||||
} else {
|
||||
o_curve_p[out_pnt_no].m_position.x += i_CPnts[i].m_position.x * basis;
|
||||
o_curve_p[out_pnt_no].m_position.z += i_CPnts[i].m_position.z * basis;
|
||||
}
|
||||
|
||||
total_weight += basis * weights[i];
|
||||
}
|
||||
|
||||
o_curve_p[out_pnt_no].m_position.x /= total_weight;
|
||||
o_curve_p[out_pnt_no].m_position.z /= total_weight;
|
||||
}
|
||||
|
||||
// add final point for open curves
|
||||
if (!i_isClosed) {
|
||||
o_curve_p[out_pnt_no].m_position.x = i_CPnts[i_CPntNum - 1].m_position.x;
|
||||
o_curve_p[out_pnt_no].m_position.z = i_CPnts[i_CPntNum - 1].m_position.z;
|
||||
out_pnt_no++;
|
||||
}
|
||||
|
||||
return out_pnt_no;
|
||||
}
|
||||
|
||||
/* 8014FB28-80150230 14A468 0708+00 1/1 0/0 0/0 .text daBaseNpc_chkPnt__F4cXyzP4dPntUsUsii */
|
||||
static s32 daBaseNpc_chkPnt(cXyz param_0, dPnt* param_1, u16 param_2, u16 param_3, int param_4,
|
||||
int param_5) {
|
||||
u16 sp12, sp10;
|
||||
sp10 = param_2;
|
||||
sp12 = param_2;
|
||||
daBaseNpc_incIdx(param_3, &sp10, param_4, 1);
|
||||
daBaseNpc_decIdx(param_3, &sp12, param_4, 1);
|
||||
|
||||
cXyz sp70;
|
||||
cXyz sp64(param_1[sp12].m_position.x, param_1[sp12].m_position.y, param_1[sp12].m_position.z);
|
||||
cXyz sp58(param_1[param_2].m_position.x, param_1[param_2].m_position.y, param_1[param_2].m_position.z);
|
||||
cXyz sp4C(param_1[sp10].m_position.x, param_1[sp10].m_position.y, param_1[sp10].m_position.z);
|
||||
|
||||
f32 sp24;
|
||||
if (sp12 == param_2 && param_2 == sp10) {
|
||||
JUT_ASSERT(2288, 0);
|
||||
} else if (sp12 < param_2 && param_2 < sp10) {
|
||||
sp24 = (sp4C - sp64).absXZ();
|
||||
s16 temp_r31 = cM_atan2s(sp4C.x - sp64.x, sp4C.z - sp64.z);
|
||||
|
||||
sp70 = sp64;
|
||||
sp64.x = sp70.x + (-1.0f * sp24 * cM_ssin(temp_r31));
|
||||
sp64.z = sp70.z + (-1.0f * sp24 * cM_scos(temp_r31));
|
||||
sp4C.x = sp70.x + (2.0f * sp24 * cM_ssin(temp_r31));
|
||||
sp4C.z = sp70.z + (2.0f * sp24 * cM_scos(temp_r31));
|
||||
} else if (sp12 < param_2) {
|
||||
sp24 = (sp58 - sp64).absXZ();
|
||||
s16 temp_r31_2 = cM_atan2s(sp58.x - sp64.x, sp58.z - sp64.z);
|
||||
|
||||
sp70 = sp58;
|
||||
sp64.x = sp70.x + (-2.0f * sp24 * cM_ssin(temp_r31_2));
|
||||
sp64.z = sp70.z + (-2.0f * sp24 * cM_scos(temp_r31_2));
|
||||
sp4C.x = sp70.x + (2.0f * sp24 * cM_ssin(temp_r31_2));
|
||||
sp4C.z = sp70.z + (2.0f * sp24 * cM_scos(temp_r31_2));
|
||||
} else if (param_2 < sp10) {
|
||||
sp24 = (sp4C - sp58).absXZ();
|
||||
s16 temp_r31_3 = cM_atan2s(sp4C.x - sp58.x, sp4C.z - sp58.z);
|
||||
|
||||
sp70 = sp58;
|
||||
sp64.x = sp70.x + (-2.0f * sp24 * cM_ssin(temp_r31_3));
|
||||
sp64.z = sp70.z + (-2.0f * sp24 * cM_scos(temp_r31_3));
|
||||
sp4C.x = sp70.x + (2.0f * sp24 * cM_ssin(temp_r31_3));
|
||||
sp4C.z = sp70.z + (2.0f * sp24 * cM_scos(temp_r31_3));
|
||||
} else {
|
||||
JUT_ASSERT(2322, 0);
|
||||
}
|
||||
|
||||
f32 sp20;
|
||||
f32 sp1C;
|
||||
f32 sp18;
|
||||
f32 sp14;
|
||||
|
||||
daBaseNpc_PntVsLineSegmentLengthSquare2D(param_0.x, param_0.z, sp64.x, sp64.z, sp4C.x, sp4C.z, &sp20, &sp1C, &sp24);
|
||||
|
||||
if (cM3d_IsZero(sp24)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
daBaseNpc_PntVsLineSegmentLengthSquare2D(sp58.x, sp58.z, sp64.x, sp64.z, sp4C.x, sp4C.z, &sp18, &sp14, &sp24);
|
||||
|
||||
s16 var_r31;
|
||||
if (param_5 < 0) {
|
||||
var_r31 = cM_atan2s(sp64.x - sp4C.x, sp64.z - sp4C.z);
|
||||
} else {
|
||||
var_r31 = cM_atan2s(sp4C.x - sp64.x, sp4C.z - sp64.z);
|
||||
}
|
||||
|
||||
return 0x4000 - (u16)abs((s16)(var_r31 - cM_atan2s(sp18 - sp20, sp14 - sp1C))) < 0;
|
||||
}
|
||||
|
||||
/* 80150230-801502EC 14AB70 00BC+00 1/1 0/0 0/0 .text daBaseNpc_getGroundAngle__FP13cBgS_PolyInfos
|
||||
*/
|
||||
static s16 daBaseNpc_getGroundAngle(cBgS_PolyInfo* param_0, s16 param_1) {
|
||||
if (dComIfG_Bgsp().ChkPolySafe(*param_0)) {
|
||||
cM3dGPla spC;
|
||||
if (!dComIfG_Bgsp().GetTriPla(*param_0, &spC) || !cBgW_CheckBGround(spC.mNormal.y)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return fopAcM_getPolygonAngle(&spC, param_1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -372,11 +372,11 @@ int daNpc_FairySeirei_c::talk(int param_0) {
|
||||
}
|
||||
int itemNo;
|
||||
if ((int)mFlow.getEventId(&itemNo) == 1) {
|
||||
if (mItemId == -1) {
|
||||
mItemId = fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1, -1, NULL,
|
||||
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
|
||||
mItemPartnerId = fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1, -1, NULL,
|
||||
NULL);
|
||||
}
|
||||
if (fopAcM_IsExecuting(mItemId)) {
|
||||
if (fopAcM_IsExecuting(mItemPartnerId)) {
|
||||
mTalking = TRUE;
|
||||
evtChange();
|
||||
}
|
||||
|
||||
@@ -1306,7 +1306,7 @@ int daNpc_Hanjo_c::cutPursuitBee(int param_1) {
|
||||
break;
|
||||
case 3:
|
||||
mJntAnm.lookNone(0);
|
||||
if (field_0x10e8.getDstPosH(current.pos, &cStack_6c, field_0x10e8.mpRoomPath->m_num, 4)) {
|
||||
if (field_0x10e8.getDstPosH(current.pos, &cStack_6c, field_0x10e8.mPathInfo->m_num, 4)) {
|
||||
rv = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ void daNpc_Uri_c::reset() {
|
||||
cStack_44 = mPath.getPntPos(1);
|
||||
setPos(acStack_38);
|
||||
cStack_a0.y = cLib_targetAngleY(&acStack_38, &cStack_44);
|
||||
mPath.setNextIdx(mPath.mpRoomPath->m_num);
|
||||
mPath.setNextIdx(mPath.mPathInfo->m_num);
|
||||
}
|
||||
if (daNpcT_chkEvtBit(0x20) != 0 || daNpcT_chkEvtBit(0x1e) != 0 ||
|
||||
daNpcT_chkEvtBit(0x92) != 0)
|
||||
@@ -955,7 +955,7 @@ int daNpc_Uri_c::getTutorialCond(cXyz param_1) {
|
||||
cXyz local_50;
|
||||
cXyz cStack_5c;
|
||||
|
||||
local_44 = mPath.getPntPos(mPath.mpRoomPath->m_num - 1);
|
||||
local_44 = mPath.getPntPos(mPath.mPathInfo->m_num - 1);
|
||||
if (local_44.absXZ(param_1) < daNpc_Uri_Param_c::m.field_0x98) {
|
||||
return 9;
|
||||
}
|
||||
@@ -1137,7 +1137,7 @@ int daNpc_Uri_c::cutEndCarryTutorial(int param_1) {
|
||||
break;
|
||||
case 2:
|
||||
initTalk(19, NULL);
|
||||
mItemId = -1;
|
||||
mItemPartnerId = fpcM_ERROR_PROCESS_ID_e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1154,11 +1154,11 @@ int daNpc_Uri_c::cutEndCarryTutorial(int param_1) {
|
||||
if (talkProc(NULL, 0, NULL, 0) && mFlow.checkEndFlow() &&
|
||||
(s32)mFlow.getEventId(&local_48) == 1)
|
||||
{
|
||||
if (mItemId == fpcM_ERROR_PROCESS_ID_e) {
|
||||
mItemId =
|
||||
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
|
||||
mItemPartnerId =
|
||||
fopAcM_createItemForPresentDemo(¤t.pos, local_48, 0, -1, -1, NULL, NULL);
|
||||
}
|
||||
if (fopAcM_IsExecuting(mItemId)) {
|
||||
if (fopAcM_IsExecuting(mItemPartnerId)) {
|
||||
daNpcT_offTmpBit(7);
|
||||
daNpcT_offTmpBit(10);
|
||||
daNpcT_offTmpBit(0x20);
|
||||
@@ -1385,7 +1385,7 @@ int daNpc_Uri_c::krun(void* param_0) {
|
||||
mJntAnm.lookNone(0);
|
||||
if (field_0xfec == 0) {
|
||||
cXyz cStack_58;
|
||||
int iVar2 = mPath.getDstPosH(current.pos, &cStack_58, mPath.mpRoomPath->m_num, 4);
|
||||
int iVar2 = mPath.getDstPosH(current.pos, &cStack_58, mPath.mPathInfo->m_num, 4);
|
||||
|
||||
calcSpeedAndAngle(cStack_58, iVar2, 6, 0x800);
|
||||
if (iVar2 != 0 && cM3d_IsZero(speedF)) {
|
||||
@@ -1616,7 +1616,7 @@ int daNpc_Uri_c::walk(void* param_0) {
|
||||
}
|
||||
if (!mStagger.checkStagger()) {
|
||||
cXyz cStack_84;
|
||||
int iVar2 = mPath.getDstPosH(current.pos, &cStack_84, mPath.mpRoomPath->m_num, 4);
|
||||
int iVar2 = mPath.getDstPosH(current.pos, &cStack_84, mPath.mPathInfo->m_num, 4);
|
||||
if (iVar2) {
|
||||
bVar = TRUE;
|
||||
}
|
||||
|
||||
@@ -219,8 +219,8 @@ BOOL daNpc_zrA_Path_c::getDstPosDstXZ(cXyz i_pos, cXyz& o_pnt) {
|
||||
/* 80B78CA0-80B78CFC 000880 005C+00 1/1 0/0 0/0 .text chkPassedChase__16daNpc_zrA_Path_cFUs4cXyz
|
||||
*/
|
||||
BOOL daNpc_zrA_Path_c::chkPassedChase(u16 i_idx, cXyz i_pos) {
|
||||
return daNpcF_chkPassed(i_pos, (dPnt*)mpRoomPath->m_points, i_idx,
|
||||
mpRoomPath->m_num, mIsClosed, mIsReversed);
|
||||
return daNpcF_chkPassed(i_pos, (dPnt*)mPathInfo->m_points, i_idx,
|
||||
mPathInfo->m_num, mIsClosed, mIsReversed);
|
||||
}
|
||||
|
||||
/* 80B78CFC-80B78E08 0008DC 010C+00 1/1 0/0 0/0 .text
|
||||
@@ -253,7 +253,7 @@ int daNpc_zrA_Path_c::getDstPosChase(u16 i_idx, cXyz i_pos, cXyz& o_pnt) {
|
||||
/* 80B78E08-80B7956C 0009E8 0764+00 1/1 0/0 0/0 .text chkPassDst__16daNpc_zrA_Path_cFUs4cXyz */
|
||||
f32 daNpc_zrA_Path_c::chkPassDst(u16 i_idx, cXyz i_pos) {
|
||||
u16 prev_idx, next_idx;
|
||||
dPnt* points = mpRoomPath->m_points;
|
||||
dPnt* points = mPathInfo->m_points;
|
||||
u16 idx = mIdx;
|
||||
u8 reversed = mIsReversed;
|
||||
mIdx = i_idx;
|
||||
|
||||
@@ -940,12 +940,12 @@ int dShopSystem_c::seq_start(fopAc_ac_c* actor, dMsgFlow_c* i_flow) {
|
||||
if (i_flow->doFlow(actor, NULL, 0)) {
|
||||
int itemNo;
|
||||
if (mFlow.getEventId(&itemNo) == 1) {
|
||||
if (mItemId == -1) {
|
||||
mItemId = fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1,
|
||||
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
|
||||
mItemPartnerId = fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1,
|
||||
-1, NULL, NULL);
|
||||
}
|
||||
|
||||
if (fpcEx_IsExist(mItemId)) {
|
||||
if (fpcEx_IsExist(mItemPartnerId)) {
|
||||
mEvtNo = 1;
|
||||
evtChange();
|
||||
return 1;
|
||||
@@ -1244,12 +1244,12 @@ int dShopSystem_c::seq_decide_yes(fopAc_ac_c* actor, dMsgFlow_c* i_flow) {
|
||||
int itemNo;
|
||||
if (mFlow.getEventId(&itemNo) == 1) {
|
||||
if (i_flow->doFlow(actor, NULL, 0)) {
|
||||
if (mItemId == -1) {
|
||||
mItemId =
|
||||
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
|
||||
mItemPartnerId =
|
||||
fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1, -1, NULL, NULL);
|
||||
}
|
||||
|
||||
if (fpcEx_IsExist(mItemId)) {
|
||||
if (fpcEx_IsExist(mItemPartnerId)) {
|
||||
offFlag(8);
|
||||
setSoldOutItemHide();
|
||||
mEvtNo = 1;
|
||||
|
||||
Reference in New Issue
Block a user