mirror of https://github.com/zeldaret/tp.git
Work on d_a_npc_cdn3 (#2351)
This commit is contained in:
parent
764eb0493e
commit
6648566b7a
|
|
@ -13,7 +13,7 @@ struct daFmtMng_Path_c {
|
|||
|
||||
bool isPathClose() { return dPath_ChkClose(mPath); }
|
||||
s8 getArg0() { return mPath->m_points[field_0x4].mArg0; }
|
||||
s8 getArg1() { return mPath->m_points[field_0x4].field_0x0; }
|
||||
s8 getArg1() { return mPath->m_points[field_0x4].mArg1; }
|
||||
|
||||
void chgDir() {
|
||||
int dir;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define A_NPC_D_A_NPC_CD2_H
|
||||
|
||||
#include "Z2AudioLib/Z2Creature.h"
|
||||
#include "d/actor/d_a_tag_escape.h"
|
||||
#include "d/d_npc_lib.h"
|
||||
#include "d/d_path.h"
|
||||
#include "dolphin/types.h"
|
||||
|
|
@ -13,9 +14,319 @@ enum {
|
|||
JntW_NUM_e = 0x15,
|
||||
};
|
||||
|
||||
|
||||
enum AnmNum {
|
||||
CD2_ANM_0 = 0,
|
||||
CD2_ANM_14 = 14,
|
||||
};
|
||||
|
||||
struct daNpcCd2_HIO_Jnt_c
|
||||
#ifdef DEBUG
|
||||
: public JORReflexible
|
||||
#endif
|
||||
{
|
||||
/* 8015A6E8 */ virtual ~daNpcCd2_HIO_Jnt_c() {}
|
||||
/* 8015A788 */ daNpcCd2_HIO_Jnt_c();
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x04 */ f32 field_0x04[3];
|
||||
/* 0x10 */ s16 field_0x10[3];
|
||||
};
|
||||
|
||||
struct daNpcCd2_HIO_MChild_c {
|
||||
/* 8015A798 */ virtual ~daNpcCd2_HIO_MChild_c() {}
|
||||
/* 8015A808 */ daNpcCd2_HIO_MChild_c();
|
||||
|
||||
/* 0x004 */ daNpcCd2_HIO_Jnt_c field_0x004[19];
|
||||
/* 0x1CE */ s16 mMaxLmtY_BACKBONE;
|
||||
/* 0x1CA */ s16 mMaxLmtX_BACKBONE;
|
||||
/* 0x1CC */ s16 mMinLmtY_BACKBONE;
|
||||
/* 0x1CE */ s16 mMinLmtX_BACKBONE;
|
||||
/* 0x1D0 */ s16 mMaxLmtY_NECK;
|
||||
/* 0x1D2 */ s16 mMaxLmtX_NECK;
|
||||
/* 0x1D4 */ s16 mMinLmtY_NECK;
|
||||
/* 0x1D6 */ s16 mMinLmtX_NECK;
|
||||
/* 0x1D0 */ s16 mMaxLmtY_HEAD;
|
||||
/* 0x1D2 */ s16 mMaxLmtX_HEAD;
|
||||
/* 0x1D4 */ s16 mMinLmtY_HEAD;
|
||||
/* 0x1D6 */ s16 mMinLmtX_HEAD;
|
||||
/* 0x1E0 */ f32 mScale;
|
||||
/* 0x1E4 */ s16 mAttn;
|
||||
/* 0x1E8 */ f32 mAnmPlaySpeed;
|
||||
/* 0x1EC */ f32 mWalkAnmPlaySpeed;
|
||||
/* 0x1F0 */ f32 mMaxSpeed;
|
||||
/* 0x1F4 */ f32 mWalkMaxSpeed;
|
||||
/* 0x1F8 */ f32 mCylH;
|
||||
/* 0x1FC */ f32 mCylR;
|
||||
/* 0x200 */ f32 mChkWallH;
|
||||
/* 0x204 */ f32 mChkWallR;
|
||||
};
|
||||
|
||||
struct daNpcCd2_HIO_WChild_c {
|
||||
/* 8015A678 */ virtual ~daNpcCd2_HIO_WChild_c() {}
|
||||
/* 8015A730 */ daNpcCd2_HIO_WChild_c();
|
||||
|
||||
/* 0x004 */ daNpcCd2_HIO_Jnt_c field_0x004[21];
|
||||
/* 0x1FE */ s16 mMaxLmtY_BACKBONE;
|
||||
/* 0x1FA */ s16 mMaxLmtX_BACKBONE;
|
||||
/* 0x1FC */ s16 mMinLmtY_BACKBONE;
|
||||
/* 0x1FE */ s16 mMinLmtX_BACKBONE;
|
||||
/* 0x200 */ s16 mMaxLmtY_NECK;
|
||||
/* 0x202 */ s16 mMaxLmtX_NECK;
|
||||
/* 0x204 */ s16 mMinLmtY_NECK;
|
||||
/* 0x206 */ s16 mMinLmtX_NECK;
|
||||
/* 0x200 */ s16 mMaxLmtY_HEAD;
|
||||
/* 0x202 */ s16 mMaxLmtX_HEAD;
|
||||
/* 0x204 */ s16 mMinLmtY_HEAD;
|
||||
/* 0x206 */ s16 mMinLmtX_HEAD;
|
||||
/* 0x218 */ f32 mScale;
|
||||
/* 0x21C */ s16 mAttn;
|
||||
/* 0x220 */ f32 mAnmPlaySpeed;
|
||||
/* 0x224 */ f32 mWalkAnmPlaySpeed;
|
||||
/* 0x228 */ f32 mMaxSpeed;
|
||||
/* 0x22C */ f32 mWalkMaxSpeed;
|
||||
/* 0x230 */ f32 mCylH;
|
||||
/* 0x234 */ f32 mCylR;
|
||||
/* 0x238 */ f32 mChkWallH;
|
||||
/* 0x23C */ f32 mChkWallR;
|
||||
};
|
||||
|
||||
struct daNpcCd2_HIO_c : public fOpAcm_HIO_entry_c {
|
||||
/* 8015A4D8 */ daNpcCd2_HIO_c();
|
||||
/* 8015A860 */ virtual ~daNpcCd2_HIO_c() {}
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x0004 */ daNpcCd2_HIO_MChild_c field_0x0004[16];
|
||||
/* 0x20C4 */ daNpcCd2_HIO_WChild_c field_0x20c4[14];
|
||||
};
|
||||
|
||||
extern daNpcCd2_HIO_c l_Cd2_HIO;
|
||||
|
||||
inline s16 Cd2_HIO_atnOfs(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mAttn;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mAttn;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline f32 Cd2_HIO_objScale(int param_1) {
|
||||
f32 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mScale;
|
||||
} else {
|
||||
return l_Cd2_HIO.field_0x20c4[param_1 - 16].mScale;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline f32 Cd2_HIO_walkMaxSpeed(int param_1) {
|
||||
f32 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mWalkMaxSpeed;
|
||||
} else {
|
||||
return l_Cd2_HIO.field_0x20c4[param_1 - 16].mWalkMaxSpeed;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline f32 Cd2_HIO_walkAnmPlaySpeed(int param_1) {
|
||||
f32 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mWalkAnmPlaySpeed;
|
||||
} else {
|
||||
return l_Cd2_HIO.field_0x20c4[param_1 - 16].mWalkAnmPlaySpeed;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline f32 Cd2_HIO_maxSpeed(int param_1) {
|
||||
f32 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxSpeed;
|
||||
} else {
|
||||
return l_Cd2_HIO.field_0x20c4[param_1 - 16].mMaxSpeed;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline f32 Cd2_HIO_anmPlaySpeed(int param_1) {
|
||||
f32 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mAnmPlaySpeed;
|
||||
} else {
|
||||
return l_Cd2_HIO.field_0x20c4[param_1 - 16].mAnmPlaySpeed;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline f32 Cd2_HIO_chkWallH(int param_1) {
|
||||
f32 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mChkWallH;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mChkWallH;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline f32 Cd2_HIO_chkWallR(int param_1) {
|
||||
f32 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mChkWallR;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mChkWallR;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline f32 Cd2_HIO_cylR(int param_1) {
|
||||
f32 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mCylR;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mCylR;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline f32 Cd2_HIO_cylH(int param_1) {
|
||||
f32 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mCylH;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mCylH;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline int Cd2_HIO_maxLmtX_BACKBONE(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtX_BACKBONE;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mMaxLmtX_BACKBONE;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline int Cd2_HIO_maxLmtY_BACKBONE(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtY_BACKBONE;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mMaxLmtY_BACKBONE;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline int Cd2_HIO_maxLmtX_NECK(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtX_NECK;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mMaxLmtX_NECK;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline int Cd2_HIO_maxLmtY_NECK(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtY_NECK;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mMaxLmtY_NECK;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline int Cd2_HIO_maxLmtX_HEAD(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtX_HEAD;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mMaxLmtX_HEAD;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline int Cd2_HIO_maxLmtY_HEAD(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMaxLmtY_HEAD;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mMaxLmtY_HEAD;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline int Cd2_HIO_minLmtX_BACKBONE(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtX_BACKBONE;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mMinLmtX_BACKBONE;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline int Cd2_HIO_minLmtY_BACKBONE(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtY_BACKBONE;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mMinLmtY_BACKBONE;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline int Cd2_HIO_minLmtX_NECK(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtX_NECK;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mMinLmtX_NECK;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline int Cd2_HIO_minLmtY_NECK(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtY_NECK;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mMinLmtY_NECK;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline int Cd2_HIO_minLmtX_HEAD(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtX_HEAD;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mMinLmtX_HEAD;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
inline int Cd2_HIO_minLmtY_HEAD(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].mMinLmtY_HEAD;
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].mMinLmtY_HEAD;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
class PathTrace_c {
|
||||
public:
|
||||
/* 80159A38 */ BOOL setPath(int, int, int, cXyz*, bool);
|
||||
/* 80159A38 */ bool setPath(int, int, int, cXyz*, bool);
|
||||
/* 80159C14 */ bool checkPoint(cXyz, f32);
|
||||
/* 80159DC0 */ bool checkPathEnd(cXyz, f32);
|
||||
/* 80159E54 */ void getTargetPoint(Vec*);
|
||||
|
|
@ -29,6 +340,20 @@ public:
|
|||
|
||||
void getAvoidPoint(Vec* avoidPoint) { *avoidPoint = mAvoidPoint; }
|
||||
BOOL isClose() { return dPath_ChkClose(mPath); }
|
||||
bool isPath() { return mPath != NULL; }
|
||||
s8 getArg0() { return mPath->m_points[field_0x20].mArg0; }
|
||||
s8 getArg1() { return mPath->m_points[field_0x20].mArg1; }
|
||||
Vec getPoint(int index) { return mPath->m_points[index].m_position; }
|
||||
void setLastPointNum() { field_0x20 = mPath->m_num - 1; }
|
||||
u16 getLastPointNum() {
|
||||
u32 rv;
|
||||
if (field_0x24 == 1) {
|
||||
rv = mPath->m_num - 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* 0x00 */ fopAc_ac_c* mMyself;
|
||||
/* 0x04 */ fopAc_ac_c* mObstacle;
|
||||
|
|
@ -46,7 +371,7 @@ public:
|
|||
/* 80157F28 */ J3DModel* ObjCreate(int);
|
||||
/* 80157F68 */ J3DModel* ChairCreate(f32);
|
||||
/* 801580A8 */ bool isM_();
|
||||
/* 801580F0 */ void* getAnmP(int, int);
|
||||
/* 801580F0 */ J3DAnmTransform* getAnmP(int, int);
|
||||
/* 80158420 */ int setAttention(int);
|
||||
/* 80158BB8 */ int loadResrc(int, int);
|
||||
/* 80158CBC */ int removeResrc(int, int);
|
||||
|
|
@ -59,14 +384,14 @@ public:
|
|||
/* 801590FC */ int drawNpc();
|
||||
/* 80159258 */ int jntNodeCB(J3DJoint*, J3DModel*);
|
||||
/* 80159550 */ void setHitodamaParticle();
|
||||
/* 801597C0 */ void* getEscapeTag();
|
||||
/* 801597C0 */ daTagEscape_c* getEscapeTag();
|
||||
/* 80159818 */ bool checkFearSituation();
|
||||
/* 801598E8 */ J3DModelData* getNpcMdlDataP(int);
|
||||
/* 8015994C */ J3DModelData* getObjMdlDataP(int);
|
||||
/* 801599C4 */ J3DAnmTexPattern* getTexAnmP(int);
|
||||
/* 8097F030 */ virtual ~daNpcCd2_c();
|
||||
/* 8097F030 */ virtual ~daNpcCd2_c() {}
|
||||
|
||||
static u8 const m_cylDat[68];
|
||||
static dCcD_SrcCyl const m_cylDat;
|
||||
|
||||
/* 0x56C */ request_of_phase_process_class mPhase1;
|
||||
/* 0x574 */ request_of_phase_process_class mPhase2;
|
||||
|
|
@ -75,24 +400,24 @@ public:
|
|||
/* 0x58C */ mDoExt_McaMorfSO* mpMorf;
|
||||
/* 0x590 */ mDoExt_btpAnm* mpBtpAnm;
|
||||
/* 0x594 */ Z2CreatureCitizen mCitizen;
|
||||
/* 0x638 */ dBgS_Acch mAcch;
|
||||
/* 0x638 */ dBgS_ObjAcch mAcch;
|
||||
/* 0x810 */ dBgS_AcchCir mAcchCir;
|
||||
/* 0x850 */ dCcD_Stts mStts;
|
||||
/* 0x88C */ dCcD_Cyl mCyl;
|
||||
/* 0x9C8 */ dNpcLib_lookat_c mLookat;
|
||||
/* 0xA98 */ int m_type;
|
||||
/* 0xA9C */ u8 field_0xa9c[0xAA0 - 0xA9C];
|
||||
/* 0xA9C */ int field_0xa9c;
|
||||
/* 0xAA4 */ int field_0xaa0;
|
||||
/* 0xAA4 */ int field_0xaa4;
|
||||
/* 0xAA8 */ int mHitodamaEmitters[2];
|
||||
/* 0xAB0 */ int field_0xab0;
|
||||
/* 0xAB0 */ daTagEscape_c* mEscapeTag;
|
||||
/* 0xAB4 */ f32 field_0xab4;
|
||||
/* 0xAB8 */ f32 field_0xab8;
|
||||
/* 0xABC */ f32 field_0xabc;
|
||||
/* 0xAC0 */ s16 field_0xac0;
|
||||
/* 0xAC2 */ s16 field_0xac2;
|
||||
/* 0xAC4 */ s16 field_0xac4;
|
||||
/* 0xAC6 */ bool field_0xac6;
|
||||
/* 0xAC6 */ bool mIsDarkWorld;
|
||||
};
|
||||
|
||||
#endif /* A_NPC_D_A_NPC_CD2_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef D_A_NPC_CDN3_H
|
||||
#define D_A_NPC_CDN3_H
|
||||
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "d/actor/d_a_npc_cd2.h"
|
||||
#include "d/actor/d_a_tag_schedule.h"
|
||||
|
||||
|
|
@ -15,8 +16,19 @@
|
|||
class daNpcCdn3_c : public daNpcCd2_c {
|
||||
public:
|
||||
typedef void (daNpcCdn3_c::*actionFunc)();
|
||||
typedef int (daNpcCdn3_c::*seqFunc)(void*);
|
||||
|
||||
struct Mode_e {};
|
||||
enum Mode_e {
|
||||
MODE_WAIT,
|
||||
MODE_PATH,
|
||||
MODE_TALK,
|
||||
MODE_ESCAPSE,
|
||||
MODE_FEAR,
|
||||
MODE_FEAR2,
|
||||
MODE_FIGHT,
|
||||
MODE_RELIEF,
|
||||
MODE_MAX_e,
|
||||
};
|
||||
|
||||
/* 80978DD4 */ void setAction(daNpcCdn3_c::Mode_e);
|
||||
/* 80978E18 */ void callInit();
|
||||
|
|
@ -39,103 +51,354 @@ public:
|
|||
/* 8097A9E4 */ void executeRelief();
|
||||
/* 8097ABDC */ void setAngle();
|
||||
/* 8097ABE8 */ void pathMoveF();
|
||||
/* 8097AF14 */ void ctrlMsgAnm();
|
||||
/* 8097B04C */ void searchNextScheduleTagSub(fopAc_ac_c*);
|
||||
/* 8097B194 */ void searchFirstScheduleTagSub(fopAc_ac_c*);
|
||||
/* 8097AF14 */ int ctrlMsgAnm();
|
||||
/* 8097B04C */ bool searchNextScheduleTagSub(fopAc_ac_c*);
|
||||
/* 8097B194 */ bool searchFirstScheduleTagSub(fopAc_ac_c*);
|
||||
/* 8097B288 */ void checkSchedule();
|
||||
/* 8097B38C */ void setSchedule(daTagSchedule_c*);
|
||||
/* 8097B5A8 */ void isInShop();
|
||||
/* 8097B60C */ void isChairStyle();
|
||||
/* 8097B684 */ void isNoTurnTalk();
|
||||
/* 8097B6D0 */ void waita(void*);
|
||||
/* 8097B754 */ void talka(void*);
|
||||
/* 8097B7D8 */ void waitwall(void*);
|
||||
/* 8097B85C */ void talkwall(void*);
|
||||
/* 8097B8E0 */ void talkbwall(void*);
|
||||
/* 8097B964 */ void talkb(void*);
|
||||
/* 8097B9E8 */ void talkc(void*);
|
||||
/* 8097BA6C */ void waitb(void*);
|
||||
/* 8097BAF0 */ void sitwaita(void*);
|
||||
/* 8097BB74 */ void sittalka(void*);
|
||||
/* 8097BBF8 */ void sittalkab(void*);
|
||||
/* 8097BC7C */ void sitwaitb(void*);
|
||||
/* 8097BD00 */ void sittalkb(void*);
|
||||
/* 8097BD84 */ void sittalkbb(void*);
|
||||
/* 8097BE08 */ void looka(void*);
|
||||
/* 8097BE8C */ void lookb(void*);
|
||||
/* 8097BF10 */ void playm(void*);
|
||||
/* 8097C070 */ void turnr(void*);
|
||||
/* 8097C12C */ void turnl(void*);
|
||||
/* 8097C1E8 */ void walka(void*);
|
||||
/* 8097C250 */ void walkb(void*);
|
||||
/* 8097C2B8 */ void runa(void*);
|
||||
/* 8097C320 */ void runb(void*);
|
||||
/* 8097C388 */ void browsea(void*);
|
||||
/* 8097C40C */ void browseb(void*);
|
||||
/* 8097C490 */ void dance(void*);
|
||||
/* 8097C5B0 */ void ladytalka(void*);
|
||||
/* 8097C634 */ void ladytalkb(void*);
|
||||
/* 8097C6B8 */ void normtalka(void*);
|
||||
/* 8097C73C */ void normtalkb(void*);
|
||||
/* 8097C7C0 */ void sellme(void*);
|
||||
/* 8097C844 */ void sing(void*);
|
||||
/* 8097C910 */ void create();
|
||||
/* 8097B5A8 */ inline bool isInShop();
|
||||
/* 8097B60C */ bool isChairStyle();
|
||||
/* 8097B684 */ bool isNoTurnTalk();
|
||||
/* 8097B6D0 */ int waita(void*);
|
||||
/* 8097B754 */ int talka(void*);
|
||||
/* 8097B7D8 */ int waitwall(void*);
|
||||
/* 8097B85C */ int talkwall(void*);
|
||||
/* 8097B8E0 */ int talkbwall(void*);
|
||||
/* 8097B964 */ int talkb(void*);
|
||||
/* 8097B9E8 */ int talkc(void*);
|
||||
/* 8097BA6C */ int waitb(void*);
|
||||
/* 8097BAF0 */ int sitwaita(void*);
|
||||
/* 8097BB74 */ int sittalka(void*);
|
||||
/* 8097BBF8 */ int sittalkab(void*);
|
||||
/* 8097BC7C */ int sitwaitb(void*);
|
||||
/* 8097BD00 */ int sittalkb(void*);
|
||||
/* 8097BD84 */ int sittalkbb(void*);
|
||||
/* 8097BE08 */ int looka(void*);
|
||||
/* 8097BE8C */ int lookb(void*);
|
||||
/* 8097BF10 */ int playm(void*);
|
||||
/* 8097C070 */ int turnr(void*);
|
||||
/* 8097C12C */ int turnl(void*);
|
||||
/* 8097C1E8 */ int walka(void*);
|
||||
/* 8097C250 */ int walkb(void*);
|
||||
/* 8097C2B8 */ int runa(void*);
|
||||
/* 8097C320 */ int runb(void*);
|
||||
/* 8097C388 */ int browsea(void*);
|
||||
/* 8097C40C */ int browseb(void*);
|
||||
/* 8097C490 */ int dance(void*);
|
||||
/* 8097C5B0 */ int ladytalka(void*);
|
||||
/* 8097C634 */ int ladytalkb(void*);
|
||||
/* 8097C6B8 */ int normtalka(void*);
|
||||
/* 8097C73C */ int normtalkb(void*);
|
||||
/* 8097C7C0 */ int sellme(void*);
|
||||
/* 8097C844 */ int sing(void*);
|
||||
/* 8097C910 */ int create();
|
||||
/* 8097CC58 */ void create_init();
|
||||
/* 8097D078 */ void setMtx();
|
||||
/* 8097D120 */ void lookat();
|
||||
/* 8097D684 */ ~daNpcCdn3_c();
|
||||
/* 8097D748 */ void execute();
|
||||
/* 8097D684 */ virtual ~daNpcCdn3_c();
|
||||
/* 8097D748 */ int execute();
|
||||
/* 8097DABC */ void checkTimeSchedule();
|
||||
|
||||
static actionFunc ActionTable[16];
|
||||
static void* m_funcTbl[44];
|
||||
static u8 m_seq00_funcTbl[24];
|
||||
static u8 m_seq01_funcTbl[24];
|
||||
static u8 m_seq02_funcTbl[24];
|
||||
static u8 m_seq03_funcTbl[24];
|
||||
static u8 m_seq04_funcTbl[24];
|
||||
static u8 m_seq05_funcTbl[48];
|
||||
static u8 m_seq06_funcTbl[48];
|
||||
static u8 m_seq07_funcTbl[24];
|
||||
static u8 m_seq08_funcTbl[84];
|
||||
static u8 m_seq09_funcTbl[24];
|
||||
static u8 m_seq10_funcTbl[24];
|
||||
static u8 m_seq11_funcTbl[72];
|
||||
static u8 m_seq12_funcTbl[24];
|
||||
static u8 m_seq13_funcTbl[72];
|
||||
static u8 m_seq14_funcTbl[24];
|
||||
static u8 m_seq15_funcTbl[24];
|
||||
static u8 m_seq16_funcTbl[84];
|
||||
static u8 m_seq17_funcTbl[24];
|
||||
static u8 m_seq18_funcTbl[24];
|
||||
static u8 m_seq19_funcTbl[84];
|
||||
static u8 m_seq20_funcTbl[24];
|
||||
static u8 m_seq21_funcTbl[24];
|
||||
static u8 m_seq22_funcTbl[48];
|
||||
static u8 m_seq23_funcTbl[84];
|
||||
static u8 m_seq24_funcTbl[60];
|
||||
static u8 m_seq25_funcTbl[84];
|
||||
static u8 m_seq26_funcTbl[36];
|
||||
static u8 m_seq27_funcTbl[24];
|
||||
static u8 m_seq28_funcTbl[36];
|
||||
static u8 m_seq29_funcTbl[36];
|
||||
static u8 m_seq30_funcTbl[72];
|
||||
static u8 m_seq31_funcTbl[72];
|
||||
static u8 m_seq32_funcTbl[84];
|
||||
static u8 m_seq33_funcTbl[84];
|
||||
static u8 m_seq34_funcTbl[108];
|
||||
static u8 m_seq35_funcTbl[24];
|
||||
static u8 m_seq36_funcTbl[48];
|
||||
static u8 m_seq37_funcTbl[24];
|
||||
static u8 m_seq38_funcTbl[24];
|
||||
static u8 m_seq39_funcTbl[24];
|
||||
static u8 m_seq40_funcTbl[36];
|
||||
static u8 m_seq41_funcTbl[24];
|
||||
static u8 m_seq42_funcTbl[24];
|
||||
static u8 m_seq43_funcTbl[36];
|
||||
inline int draw();
|
||||
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568[0xb9c - 0xAC8];
|
||||
int getTimeHour() {
|
||||
if (mIsDarkWorld) {
|
||||
return dKy_getDarktime_hour();
|
||||
}
|
||||
return dKy_getdaytime_hour();
|
||||
}
|
||||
|
||||
int getTimeMinute() {
|
||||
if (mIsDarkWorld) {
|
||||
return dKy_getDarktime_minute();
|
||||
}
|
||||
return dKy_getdaytime_minute();
|
||||
}
|
||||
|
||||
int getTime() {
|
||||
return getTimeHour() * 60 + getTimeMinute();
|
||||
}
|
||||
|
||||
int getDayOfWeek() {
|
||||
if (mIsDarkWorld) {
|
||||
return dKy_getDarktime_week();
|
||||
} else {
|
||||
return dKy_get_dayofweek();
|
||||
}
|
||||
}
|
||||
|
||||
void setSpeed(f32* param_1, f32 param_2, f32 param_3, int param_4) {
|
||||
f32 target = field_0xb5c * (param_3 * field_0xb5c);
|
||||
f32 step = field_0xb5c * (param_2 * field_0xb5c);
|
||||
if (param_3 < target) {
|
||||
target = param_3;
|
||||
}
|
||||
cLib_chaseF(param_1, target, step);
|
||||
}
|
||||
|
||||
int getGroupID() { return fopAcM_GetParam(this) & 0xff; }
|
||||
u8 getPathID() { return fopAcM_GetParam(this) >> 24; }
|
||||
int isStop() { return TRUE; }
|
||||
int getType() { return subtype & 0x7f; }
|
||||
int getSeqNum() { return shape_angle.x & 0x3f; }
|
||||
int getFlowNodeNum() { return shape_angle.z; }
|
||||
u16 getStartTime() { return (fopAcM_GetParam(this) >> 8) & 0xff; }
|
||||
u16 getEndTime() { return (fopAcM_GetParam(this) >> 16) & 0xff; }
|
||||
|
||||
void initParamTime() {
|
||||
u16 startTime = getStartTime();
|
||||
u16 endTime = getEndTime();
|
||||
if (startTime != 0xff && endTime != 0xff) {
|
||||
u32 x = (u16)(startTime / 10);
|
||||
u32 y = startTime % 10;
|
||||
field_0xb8e = ((u16)(y * 10) + (x * 60));
|
||||
u32 x2 = (u16)(endTime / 10);
|
||||
u32 y2 = endTime % 10;
|
||||
field_0xb8e = ((u16)(y2 * 10) + (x2 * 60));
|
||||
field_0xb96 = 0;
|
||||
} else {
|
||||
field_0xb96 = 1;
|
||||
}
|
||||
field_0xb90 = 30;
|
||||
}
|
||||
|
||||
void initTimeSchedule() {
|
||||
if (getGroupID() == 0xff) {
|
||||
initParamTime();
|
||||
if (field_0xb96 == 0) {
|
||||
int iVar1 = getTime();
|
||||
if (field_0xb8c > iVar1 || field_0xb8e <= iVar1)
|
||||
{
|
||||
field_0xb95 = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mTagSched = NULL;
|
||||
field_0xb88 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int getObjNum() {
|
||||
u8 uVar3 = (shape_angle.x >> 6) & 0xf;
|
||||
int rv;
|
||||
if (isM_()) {
|
||||
switch (uVar3) {
|
||||
case 0:
|
||||
rv = 0;
|
||||
break;
|
||||
case 1:
|
||||
rv = 1;
|
||||
break;
|
||||
case 2:
|
||||
rv = 2;
|
||||
break;
|
||||
case 3:
|
||||
rv = 4;
|
||||
break;
|
||||
case 4:
|
||||
rv = 6;
|
||||
break;
|
||||
case 5:
|
||||
rv = 0;
|
||||
break;
|
||||
case 6:
|
||||
rv = 0;
|
||||
break;
|
||||
case 7:
|
||||
rv = 9;
|
||||
break;
|
||||
default:
|
||||
rv = 0;
|
||||
break;
|
||||
}
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[281]) && rv == 9) {
|
||||
rv = 0xb;
|
||||
}
|
||||
} else {
|
||||
switch (uVar3) {
|
||||
case 0:
|
||||
rv = 0;
|
||||
break;
|
||||
case 1:
|
||||
rv = 8;
|
||||
break;
|
||||
case 2:
|
||||
rv = 3;
|
||||
break;
|
||||
case 3:
|
||||
rv = 5;
|
||||
break;
|
||||
case 4:
|
||||
rv = 7;
|
||||
break;
|
||||
case 5:
|
||||
rv = 0;
|
||||
break;
|
||||
case 6:
|
||||
rv = 0;
|
||||
break;
|
||||
case 7:
|
||||
rv = 10;
|
||||
break;
|
||||
default:
|
||||
rv = 0;
|
||||
break;
|
||||
}
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[281]) && rv == 10) {
|
||||
rv = 12;
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
void initCollision() {
|
||||
mStts.Init(0xd9, 0xff, this);
|
||||
mStts.SetRoomId(fopAcM_GetRoomNo(this));
|
||||
mCyl.SetStts(&mStts);
|
||||
mCyl.Set(m_cylDat);
|
||||
mCyl.SetR(Cd2_HIO_cylR(m_type));
|
||||
mCyl.SetH(Cd2_HIO_cylH(m_type));
|
||||
}
|
||||
|
||||
void setCollision() {
|
||||
#ifdef DEBUG
|
||||
mCyl.SetR(Cd2_HIO_cylR(m_type));
|
||||
mCyl.SetH(Cd2_HIO_cylH(m_type));
|
||||
#endif
|
||||
mCyl.SetC(current.pos);
|
||||
if (!fopAcM_CheckCondition(this, 4)) {
|
||||
dComIfG_Ccsp()->Set(&mCyl);
|
||||
}
|
||||
}
|
||||
|
||||
bool isOrchestra() {
|
||||
if (strcmp(dComIfGp_getStartStageName(), "F_SP116") != 0) {
|
||||
return 0;
|
||||
} else {
|
||||
if (mSeqNum == 17 &&
|
||||
(getType() == 4 || getType() == 5 || getType() == 6 || getType() == 16))
|
||||
{
|
||||
return 1;
|
||||
} else if (mSeqNum == 37 && getType() == 7) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int chkEvent() {
|
||||
attention_info.flags = 0;
|
||||
if (mFlowNodeNum > 0) {
|
||||
attention_info.flags = 0xa;
|
||||
}
|
||||
if (mIsDarkWorld) {
|
||||
if (daPy_py_c::checkNowWolfEyeUp()) {
|
||||
attention_info.flags |= 0xc00000;
|
||||
} else {
|
||||
attention_info.flags = 0;
|
||||
}
|
||||
}
|
||||
if (dComIfGp_event_runCheck()) {
|
||||
if (eventInfo.checkCommandDemoAccrpt()) {
|
||||
return 1;
|
||||
}
|
||||
if (eventInfo.checkCommandTalk() && mMode != MODE_TALK) {
|
||||
setAction(MODE_TALK);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int orderEvent() {
|
||||
if ((!mIsDarkWorld || daPy_py_c::checkNowWolfEyeUp()) && mFlowNodeNum > 0 && ((attention_info.flags & 8) || (attention_info.flags & 2))) {
|
||||
eventInfo.onCondition(dEvtCnd_CANTALK_e);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
inline bool searchFirstScheduleTag(fopAc_ac_c* param_1);
|
||||
inline bool searchNextScheduleTag();
|
||||
|
||||
static actionFunc ActionTable[8][2];
|
||||
static seqFunc* m_funcTbl[44];
|
||||
static seqFunc m_seq00_funcTbl[2];
|
||||
static seqFunc m_seq01_funcTbl[2];
|
||||
static seqFunc m_seq02_funcTbl[2];
|
||||
static seqFunc m_seq03_funcTbl[2];
|
||||
static seqFunc m_seq04_funcTbl[2];
|
||||
static seqFunc m_seq05_funcTbl[4];
|
||||
static seqFunc m_seq06_funcTbl[4];
|
||||
static seqFunc m_seq07_funcTbl[2];
|
||||
static seqFunc m_seq08_funcTbl[7];
|
||||
static seqFunc m_seq09_funcTbl[2];
|
||||
static seqFunc m_seq10_funcTbl[2];
|
||||
static seqFunc m_seq11_funcTbl[6];
|
||||
static seqFunc m_seq12_funcTbl[2];
|
||||
static seqFunc m_seq13_funcTbl[6];
|
||||
static seqFunc m_seq14_funcTbl[2];
|
||||
static seqFunc m_seq15_funcTbl[2];
|
||||
static seqFunc m_seq16_funcTbl[7];
|
||||
static seqFunc m_seq17_funcTbl[2];
|
||||
static seqFunc m_seq18_funcTbl[2];
|
||||
static seqFunc m_seq19_funcTbl[7];
|
||||
static seqFunc m_seq20_funcTbl[2];
|
||||
static seqFunc m_seq21_funcTbl[2];
|
||||
static seqFunc m_seq22_funcTbl[4];
|
||||
static seqFunc m_seq23_funcTbl[7];
|
||||
static seqFunc m_seq24_funcTbl[5];
|
||||
static seqFunc m_seq25_funcTbl[7];
|
||||
static seqFunc m_seq26_funcTbl[3];
|
||||
static seqFunc m_seq27_funcTbl[2];
|
||||
static seqFunc m_seq28_funcTbl[3];
|
||||
static seqFunc m_seq29_funcTbl[3];
|
||||
static seqFunc m_seq30_funcTbl[6];
|
||||
static seqFunc m_seq31_funcTbl[6];
|
||||
static seqFunc m_seq32_funcTbl[7];
|
||||
static seqFunc m_seq33_funcTbl[7];
|
||||
static seqFunc m_seq34_funcTbl[9];
|
||||
static seqFunc m_seq35_funcTbl[2];
|
||||
static seqFunc m_seq36_funcTbl[4];
|
||||
static seqFunc m_seq37_funcTbl[2];
|
||||
static seqFunc m_seq38_funcTbl[2];
|
||||
static seqFunc m_seq39_funcTbl[2];
|
||||
static seqFunc m_seq40_funcTbl[3];
|
||||
static seqFunc m_seq41_funcTbl[2];
|
||||
static seqFunc m_seq42_funcTbl[2];
|
||||
static seqFunc m_seq43_funcTbl[3];
|
||||
|
||||
/* 0xAC8 */ J3DModel* field_0xac8;
|
||||
/* 0xACC */ J3DModel* field_0xacc;
|
||||
/* 0xAD0 */ PathTrace_c m_path;
|
||||
/* 0xAE8 */ daNpcT_ActorMngr_c m_targetAct;
|
||||
/* 0xB00 */ dMsgFlow_c mMsgFlow;
|
||||
/* 0xB4C */ daNpcCdn3_c::actionFunc* mAction;
|
||||
/* 0xB50 */ Mode_e mMode;
|
||||
/* 0xB54 */ Mode_e mPrevMode;
|
||||
/* 0xB58 */ int mObjNum;
|
||||
/* 0xB5C */ f32 field_0xb5c;
|
||||
/* 0xB60 */ f32 field_0xb60;
|
||||
/* 0xB64 */ f32 field_0xb64;
|
||||
/* 0xB68 */ u32 field_0xb68;
|
||||
/* 0xB6C */ int mMsgIndex;
|
||||
/* 0xB70 */ int mFlowNodeNum;
|
||||
/* 0xB74 */ int field_0xb74;
|
||||
/* 0xB78 */ int mSeqNum;
|
||||
/* 0xB7C */ int field_0xb7c;
|
||||
/* 0xB80 */ J3DAnmTransform* field_0xb80;
|
||||
/* 0xB84 */ daTagSchedule_c* mTagSched;
|
||||
/* 0xB88 */ daTagSchedule_c* field_0xb88;
|
||||
/* 0xB8C */ u16 field_0xb8c;
|
||||
/* 0xB8C */ u16 field_0xb8e;
|
||||
/* 0xB90 */ u16 field_0xb90;
|
||||
/* 0xB92 */ s16 field_0xb92;
|
||||
/* 0xB94 */ u8 field_0xb94;
|
||||
/* 0xB95 */ u8 field_0xb95;
|
||||
/* 0xB96 */ u8 field_0xb96;
|
||||
/* 0xB97 */ u8 field_0xb97;
|
||||
/* 0xB98 */ u8 field_0xb98;
|
||||
/* 0xB99 */ u8 field_0xb99;
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daNpcCdn3_c) == 0xb9c);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ class daTagEscape_c : public fopAc_ac_c {
|
|||
public:
|
||||
daTagEscape_c() {}
|
||||
~daTagEscape_c() {}
|
||||
|
||||
int getPathID() { return fopAcM_GetParam(this) & 0xff; }
|
||||
};
|
||||
|
||||
#endif /* D_A_TAG_ESCAPE_H */
|
||||
|
|
|
|||
|
|
@ -10,7 +10,16 @@ public:
|
|||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
/* 0x568 */ u8 field_0x568[4];
|
||||
int getSeqNum() { return (fopAcM_GetParam(this) >> 6) & 0x3f; }
|
||||
u16 getStartTime() { return (fopAcM_GetParam(this) >> 12) & 0xff; }
|
||||
u8 getStartEnd() { return (fopAcM_GetParam(this) >> 20) & 0xff; }
|
||||
int getGroupID() { return fopAcM_GetParam(this) & 0x3f; }
|
||||
int getWeekNum() { return mWeekNum; }
|
||||
void setWeekNum(int weekNum) { mWeekNum = weekNum; }
|
||||
u8 getPathID() { return shape_angle.x & 0xff; }
|
||||
s16 getFlowNodeNum() { return shape_angle.z; }
|
||||
|
||||
/* 0x568 */ int mWeekNum;
|
||||
};
|
||||
|
||||
#endif /* D_A_TAG_SCHEDULE_H */
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ public:
|
|||
/* 80251B64 */ void setPrm();
|
||||
/* 80251EF8 */ void update();
|
||||
/* 80252018 */ int limitter(s16*, s16, s16, s16);
|
||||
/* 80252094 */ virtual ~dNpcLib_lookat_c();
|
||||
/* 80252094 */ virtual ~dNpcLib_lookat_c() {}
|
||||
|
||||
/* 0x04 */ cXyz field_0x04[4];
|
||||
/* 0x34 */ csXyz field_0x34[4];
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ public:
|
|||
|
||||
// PPNT
|
||||
struct dStage_dPnt_c {
|
||||
/* 0x0 */ u8 field_0x0;
|
||||
/* 0x0 */ u8 mArg1;
|
||||
/* 0x1 */ u8 field_0x1;
|
||||
/* 0x2 */ u8 field_0x2;
|
||||
/* 0x3 */ u8 mArg0;
|
||||
|
|
|
|||
|
|
@ -1236,7 +1236,7 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
|
||||
if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
|
||||
fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
|
||||
a_this->eventInfo.onCondition(2);
|
||||
a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1420,7 +1420,7 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
case 10:
|
||||
if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
|
||||
fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
|
||||
a_this->eventInfo.onCondition(2);
|
||||
a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1639,7 +1639,7 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
|
||||
if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
|
||||
fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
|
||||
a_this->eventInfo.onCondition(2);
|
||||
a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1699,7 +1699,7 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
case 30:
|
||||
if (!monkeybomb->eventInfo.checkCommandDemoAccrpt()) {
|
||||
fopAcM_orderPotentialEvent(monkeybomb, 2, 0xFFFF, 0);
|
||||
monkeybomb->eventInfo.onCondition(2);
|
||||
monkeybomb->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1808,7 +1808,7 @@ static void demo_camera(b_bq_class* i_this) {
|
|||
case 50:
|
||||
if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
|
||||
fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
|
||||
a_this->eventInfo.onCondition(2);
|
||||
a_this->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,47 +9,6 @@
|
|||
#include "dol2asm.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
struct daNpcCd2_HIO_Jnt_c
|
||||
#ifdef DEBUG
|
||||
: public JORReflexible
|
||||
#endif
|
||||
{
|
||||
/* 8015A6E8 */ virtual ~daNpcCd2_HIO_Jnt_c() {}
|
||||
/* 8015A788 */ daNpcCd2_HIO_Jnt_c();
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x04 */ f32 field_0x04[3];
|
||||
/* 0x10 */ s16 field_0x10[3];
|
||||
};
|
||||
|
||||
struct daNpcCd2_HIO_MChild_c {
|
||||
/* 8015A798 */ virtual ~daNpcCd2_HIO_MChild_c() {}
|
||||
/* 8015A808 */ daNpcCd2_HIO_MChild_c();
|
||||
|
||||
/* 0x004 */ daNpcCd2_HIO_Jnt_c field_0x004[19];
|
||||
/* 0x1C8 */ u8 field_0x1c8[0x1c];
|
||||
/* 0x1E8 */ s16 field_0x1ec[0x12];
|
||||
};
|
||||
|
||||
struct daNpcCd2_HIO_WChild_c {
|
||||
/* 8015A678 */ virtual ~daNpcCd2_HIO_WChild_c() {}
|
||||
/* 8015A730 */ daNpcCd2_HIO_WChild_c();
|
||||
|
||||
/* 0x004 */ daNpcCd2_HIO_Jnt_c field_0x004[21];
|
||||
/* 0x1F8 */ s16 field_0x1f8[0x20];
|
||||
};
|
||||
|
||||
struct daNpcCd2_HIO_c : public fOpAcm_HIO_entry_c {
|
||||
/* 8015A4D8 */ daNpcCd2_HIO_c();
|
||||
/* 8015A860 */ virtual ~daNpcCd2_HIO_c() {}
|
||||
|
||||
void genMessage(JORMContext*);
|
||||
|
||||
/* 0x0004 */ daNpcCd2_HIO_MChild_c field_0x0004[16];
|
||||
/* 0x20C4 */ daNpcCd2_HIO_WChild_c field_0x20c4[14];
|
||||
};
|
||||
|
||||
/* 80157CB4-80157D00 1525F4 004C+00 1/1 0/0 0/0 .text jntNodeCallBack__FP8J3DJointi */
|
||||
static int jntNodeCallBack(J3DJoint* i_jnt, int param_1) {
|
||||
if (param_1 == 0) {
|
||||
|
|
@ -262,14 +221,19 @@ SECTION_RODATA static anmTblPrm const l_bckTbl_W[54] = {
|
|||
COMPILER_STRIP_GATE(0x803937A0, &l_bckTbl_W);
|
||||
|
||||
/* 80393950-80393994 01FFB0 0044+00 0/0 0/0 4/4 .rodata m_cylDat__10daNpcCd2_c */
|
||||
SECTION_RODATA u8 const daNpcCd2_c::m_cylDat[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, 0x79,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
dCcD_SrcCyl const daNpcCd2_c::m_cylDat = {
|
||||
{
|
||||
{0x0, {{0x0, 0x0, 0x0}, {0, 0}, 0x79}}, // mObj
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0}, // mGObjTg
|
||||
{0x0}, // mGObjCo
|
||||
}, // mObjInf
|
||||
{
|
||||
{0.0f, 0.0f, 0.0f}, // mCenter
|
||||
0.0f, // mRadius
|
||||
0.0f // mHeight
|
||||
} // mCyl
|
||||
};
|
||||
COMPILER_STRIP_GATE(0x80393950, &daNpcCd2_c::m_cylDat);
|
||||
|
||||
/* 80393994-80393AFC 01FFF4 0168+00 1/1 0/0 0/0 .rodata a_transScaleTbl$3998 */
|
||||
static Vec const a_transScaleTbl[30] = {
|
||||
|
|
@ -311,7 +275,7 @@ int daNpcCd2_c::NpcCreate(int param_1) {
|
|||
return 0;
|
||||
}
|
||||
mCitizen.init(¤t.pos, &eyePos, 3, 1);
|
||||
mCitizen.setMdlType(param_1, false, field_0xac6 != 0 ? 1 : 0);
|
||||
mCitizen.setMdlType(param_1, false, mIsDarkWorld != 0 ? 1 : 0);
|
||||
if (anmTex != NULL) {
|
||||
mpBtpAnm = new mDoExt_btpAnm();
|
||||
JUT_ASSERT(622, 0 != mpBtpAnm);
|
||||
|
|
@ -345,8 +309,8 @@ J3DModel* daNpcCd2_c::ObjCreate(int param_0) {
|
|||
|
||||
/* 80157F68-801580A8 1528A8 0140+00 0/0 0/0 1/1 .text ChairCreate__10daNpcCd2_cFf */
|
||||
J3DModel* daNpcCd2_c::ChairCreate(f32 param_1) {
|
||||
const char* resName = (field_0xac6) ? "objectTW" : "object";
|
||||
int resIndex = isM_() ? ((field_0xac6 != 0) ? 4 : 4) : ((field_0xac6 != 0) ? 5 : 5);
|
||||
const char* resName = (mIsDarkWorld) ? "objectTW" : "object";
|
||||
int resIndex = isM_() ? ((mIsDarkWorld != 0) ? 4 : 4) : ((mIsDarkWorld != 0) ? 5 : 5);
|
||||
|
||||
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes(resName, resIndex);
|
||||
if (modelData != NULL) {
|
||||
|
|
@ -1325,7 +1289,7 @@ static u8 a_prmTbl_W[896] = {
|
|||
#pragma pop
|
||||
|
||||
/* 801580F0-80158420 152A30 0330+00 2/0 0/0 93/93 .text getAnmP__10daNpcCd2_cFii */
|
||||
void* daNpcCd2_c::getAnmP(int param_1, int param_2) {
|
||||
J3DAnmTransform* daNpcCd2_c::getAnmP(int param_1, int param_2) {
|
||||
int a_anmNum = param_1;
|
||||
switch (a_anmNum) {
|
||||
case 0:
|
||||
|
|
@ -1569,9 +1533,9 @@ void* daNpcCd2_c::getAnmP(int param_1, int param_2) {
|
|||
index = l_bckTbl_W[a_anmNum].index;
|
||||
}
|
||||
if (index == -1) {
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
return dComIfG_getObjectRes(name, index);
|
||||
return (J3DAnmTransform*)dComIfG_getObjectRes(name, index);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
|
|
@ -1581,16 +1545,6 @@ void* daNpcCd2_c::getAnmP(int param_1, int param_2) {
|
|||
/* 8042861C-8042C628 05533C 400C+00 2/3 0/0 20/20 .bss l_Cd2_HIO */
|
||||
daNpcCd2_HIO_c l_Cd2_HIO;
|
||||
|
||||
static inline f32 Cd2_HIO_atnOfs(int param_1) {
|
||||
s16 rv;
|
||||
if (param_1 < 16) {
|
||||
rv = l_Cd2_HIO.field_0x0004[param_1].field_0x1ec[0];
|
||||
} else {
|
||||
rv = l_Cd2_HIO.field_0x20c4[param_1 - 16].field_0x1f8[14];
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* 80158420-80158BB8 152D60 0798+00 0/0 0/0 5/5 .text setAttention__10daNpcCd2_cFi */
|
||||
int daNpcCd2_c::setAttention(int param_1) {
|
||||
static cXyz a_eyeOfsTbl[30] = {
|
||||
|
|
@ -1629,14 +1583,14 @@ int daNpcCd2_c::setAttention(int param_1) {
|
|||
int anmIdx = isM_() ? 3 : 3;
|
||||
mDoMtx_stack_c::copy(mpMorf->getModel()->getAnmMtx(anmIdx));
|
||||
mDoMtx_stack_c::multVec(&a_eyeOfsTbl[param_1], &eyePos);
|
||||
attention_info.position.set(current.pos.x, current.pos.y + Cd2_HIO_atnOfs(param_1), current.pos.z);
|
||||
attention_info.position.set(current.pos.x, Cd2_HIO_atnOfs(param_1) + current.pos.y, current.pos.z);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80158BB8-80158CBC 1534F8 0104+00 0/0 0/0 4/4 .text loadResrc__10daNpcCd2_cFii */
|
||||
int daNpcCd2_c::loadResrc(int idx, int param_1) {
|
||||
int result;
|
||||
if (field_0xac6) {
|
||||
if (mIsDarkWorld) {
|
||||
result = dComIfG_resLoad(&mPhase1, l_resNameTbl[idx][1]);
|
||||
if (result != cPhs_COMPLEATE_e) {
|
||||
return result;
|
||||
|
|
@ -1668,7 +1622,7 @@ int daNpcCd2_c::loadResrc(int idx, int param_1) {
|
|||
|
||||
/* 80158CBC-80158D88 1535FC 00CC+00 0/0 0/0 4/4 .text removeResrc__10daNpcCd2_cFii */
|
||||
int daNpcCd2_c::removeResrc(int idx, int param_1) {
|
||||
if (field_0xac6) {
|
||||
if (mIsDarkWorld) {
|
||||
dComIfG_resDelete(&mPhase1, l_resNameTbl[idx][1]);
|
||||
dComIfG_resDelete(&mPhase4, l_resNameTbl[idx][5]);
|
||||
} else {
|
||||
|
|
@ -1720,7 +1674,7 @@ void daNpcCd2_c::setAnm(J3DAnmTransformKey* param_1, f32 param_2, f32 param_3, i
|
|||
|
||||
/* 80158F6C-80158FF0 1538AC 0084+00 0/0 0/0 4/4 .text drawShadow__10daNpcCd2_cFf */
|
||||
int daNpcCd2_c::drawShadow(f32 param_0) {
|
||||
if (field_0xac6 && !daPy_py_c::checkNowWolfEyeUp()) {
|
||||
if (mIsDarkWorld && !daPy_py_c::checkNowWolfEyeUp()) {
|
||||
return 1;
|
||||
}
|
||||
dComIfGd_setSimpleShadow(¤t.pos, mAcch.GetGroundH(), param_0, mAcch.m_gnd, 0,
|
||||
|
|
@ -1741,7 +1695,7 @@ int daNpcCd2_c::drawObj(int idx, J3DModel* i_model, f32 i_scale) {
|
|||
if (i_model == NULL) {
|
||||
return 0;
|
||||
}
|
||||
if (field_0xac6 && !daPy_py_c::checkNowWolfEyeUp()) {
|
||||
if (mIsDarkWorld && !daPy_py_c::checkNowWolfEyeUp()) {
|
||||
return 0;
|
||||
}
|
||||
int x = isM_() ? 0 : 1;
|
||||
|
|
@ -1758,17 +1712,17 @@ int daNpcCd2_c::drawObj(int idx, J3DModel* i_model, f32 i_scale) {
|
|||
|
||||
/* 801590FC-80159258 153A3C 015C+00 0/0 0/0 4/4 .text drawNpc__10daNpcCd2_cFv */
|
||||
int daNpcCd2_c::drawNpc() {
|
||||
if (field_0xac6) {
|
||||
if (mIsDarkWorld) {
|
||||
g_env_light.settingTevStruct(4, ¤t.pos, &tevStr);
|
||||
} else {
|
||||
g_env_light.settingTevStruct(0, ¤t.pos, &tevStr);
|
||||
}
|
||||
if (field_0xac6 && !daPy_py_c::checkNowWolfEyeUp()) {
|
||||
if (mIsDarkWorld && !daPy_py_c::checkNowWolfEyeUp()) {
|
||||
setHitodamaParticle();
|
||||
return 1;
|
||||
}
|
||||
g_env_light.setLightTevColorType_MAJI(mpMorf->getModel(), &tevStr);
|
||||
if (field_0xac6) {
|
||||
if (mIsDarkWorld) {
|
||||
dComIfGd_setListDark();
|
||||
}
|
||||
if (mpBtpAnm) {
|
||||
|
|
@ -1778,7 +1732,7 @@ int daNpcCd2_c::drawNpc() {
|
|||
} else {
|
||||
mpMorf->entryDL();
|
||||
}
|
||||
if (field_0xac6) {
|
||||
if (mIsDarkWorld) {
|
||||
dComIfGd_setList();
|
||||
}
|
||||
return 1;
|
||||
|
|
@ -1924,11 +1878,11 @@ static void* s_sub1(void* param_0, void* param_1) {
|
|||
}
|
||||
|
||||
/* 801597C0-80159818 154100 0058+00 0/0 0/0 2/2 .text getEscapeTag__10daNpcCd2_cFv */
|
||||
void* daNpcCd2_c::getEscapeTag() {
|
||||
daTagEscape_c* daNpcCd2_c::getEscapeTag() {
|
||||
target = NULL;
|
||||
wolfAngle = fopAcM_searchPlayerAngleY(this);
|
||||
fpcM_Search(s_sub1, this);
|
||||
return target;
|
||||
return (daTagEscape_c*)target;
|
||||
}
|
||||
|
||||
/* 80159818-801598E8 154158 00D0+00 0/0 0/0 5/5 .text checkFearSituation__10daNpcCd2_cFv
|
||||
|
|
@ -1940,7 +1894,7 @@ bool daNpcCd2_c::checkFearSituation() {
|
|||
bool rv;
|
||||
bool bVar5;
|
||||
rv = false;
|
||||
bVar5 = ((!field_0xac6 && daPy_py_c::checkNowWolf()) && dVar10 < 200.0f);
|
||||
bVar5 = ((!mIsDarkWorld && daPy_py_c::checkNowWolf()) && dVar10 < 200.0f);
|
||||
if (bVar5) {
|
||||
f32 maxDist = pow(500.0f, 2.0f);
|
||||
if (fopAcM_searchPlayerDistanceXZ2(this) < maxDist) {
|
||||
|
|
@ -1953,7 +1907,7 @@ bool daNpcCd2_c::checkFearSituation() {
|
|||
/* 801598E8-8015994C 154228 0064+00 1/1 0/0 0/0 .text getNpcMdlDataP__10daNpcCd2_cFi */
|
||||
J3DModelData* daNpcCd2_c::getNpcMdlDataP(int param_1) {
|
||||
const anmTblPrm* def;
|
||||
if (field_0xac6) {
|
||||
if (mIsDarkWorld) {
|
||||
def = &l_bmdTWTbl[param_1];
|
||||
} else {
|
||||
def = &l_bmdTbl[param_1];
|
||||
|
|
@ -1965,7 +1919,7 @@ J3DModelData* daNpcCd2_c::getNpcMdlDataP(int param_1) {
|
|||
J3DModelData* daNpcCd2_c::getObjMdlDataP(int param_1) {
|
||||
J3DModelData* model_data = NULL;
|
||||
const anmTblPrm* def;
|
||||
if (field_0xac6) {
|
||||
if (mIsDarkWorld) {
|
||||
def = &l_objTWTbl[param_1];
|
||||
} else {
|
||||
def = &l_objTbl[param_1];
|
||||
|
|
@ -1979,7 +1933,7 @@ J3DModelData* daNpcCd2_c::getObjMdlDataP(int param_1) {
|
|||
/* 801599C4-80159A38 154304 0074+00 1/1 0/0 0/0 .text getTexAnmP__10daNpcCd2_cFi */
|
||||
J3DAnmTexPattern* daNpcCd2_c::getTexAnmP(int param_1) {
|
||||
const anmTblPrm* def;
|
||||
if (field_0xac6) {
|
||||
if (mIsDarkWorld) {
|
||||
def = &l_btpTWTbl[param_1];
|
||||
} else {
|
||||
def = &l_btpTbl[param_1];
|
||||
|
|
@ -1992,7 +1946,7 @@ J3DAnmTexPattern* daNpcCd2_c::getTexAnmP(int param_1) {
|
|||
|
||||
/* 80159A38-80159C14 154378 01DC+00 0/0 0/0 9/9 .text setPath__11PathTrace_cFiiiP4cXyzb
|
||||
*/
|
||||
BOOL PathTrace_c::setPath(int param_1, int param_2, int param_3, cXyz* param_4, bool param_5) {
|
||||
bool PathTrace_c::setPath(int param_1, int param_2, int param_3, cXyz* param_4, bool param_5) {
|
||||
mPath = NULL;
|
||||
mPath = dPath_GetRoomPath(param_1, param_2);
|
||||
field_0x24 = param_3;
|
||||
|
|
@ -2186,12 +2140,12 @@ daNpcCd2_HIO_c::daNpcCd2_HIO_c() {
|
|||
for (int j = 0; j < 19; j++) {
|
||||
memcpy(&field_0x0004[i].field_0x004[j].field_0x04, a_jntTbl_M[i][j], 20);
|
||||
}
|
||||
memcpy(&field_0x0004[i].field_0x1c8, a_prmTbl_M + i * 0x40, 0x40);
|
||||
memcpy(&field_0x0004[i].mMaxLmtY_BACKBONE, a_prmTbl_M + i * 0x40, 0x40);
|
||||
}
|
||||
for (int i = 0; i < 14; i++) {
|
||||
for (int j = 0; j < 21; j++) {
|
||||
memcpy(&field_0x20c4[i].field_0x004[j].field_0x04, a_jntTbl_W[i][j], 20);
|
||||
}
|
||||
memcpy(&field_0x20c4[i].field_0x1f8, a_prmTbl_W + i * 0x40, 0x40);
|
||||
memcpy(&field_0x20c4[i].mMaxLmtY_BACKBONE, a_prmTbl_W + i * 0x40, 0x40);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -536,9 +536,9 @@ static void func_809BAE78() {
|
|||
}
|
||||
|
||||
/* 809BAE80-809BB0D0 000A40 0250+00 2/1 0/0 0/0 .text __dt__10daNpcCd2_cFv */
|
||||
daNpcCd2_c::~daNpcCd2_c() {
|
||||
// NONMATCHING
|
||||
}
|
||||
// daNpcCd2_c::~daNpcCd2_c() {
|
||||
// // NONMATCHING
|
||||
// }
|
||||
|
||||
/* 809BB0D0-809BB10C 000C90 003C+00 2/2 0/0 0/0 .text __dt__5csXyzFv */
|
||||
csXyz::~csXyz() {
|
||||
|
|
@ -546,9 +546,9 @@ csXyz::~csXyz() {
|
|||
}
|
||||
|
||||
/* 809BB10C-809BB1F4 000CCC 00E8+00 1/0 0/0 0/0 .text __dt__16dNpcLib_lookat_cFv */
|
||||
dNpcLib_lookat_c::~dNpcLib_lookat_c() {
|
||||
// NONMATCHING
|
||||
}
|
||||
// dNpcLib_lookat_c::~dNpcLib_lookat_c() {
|
||||
// // NONMATCHING
|
||||
// }
|
||||
|
||||
/* 809BB1F4-809BB23C 000DB4 0048+00 1/0 0/0 0/0 .text __dt__8cM3dGCylFv */
|
||||
cM3dGCyl::~cM3dGCyl() {
|
||||
|
|
@ -578,4 +578,4 @@ dBgS_AcchCir::~dBgS_AcchCir() {
|
|||
/* 809BB38C-809BB3FC 000F4C 0070+00 3/2 0/0 0/0 .text __dt__12dBgS_ObjAcchFv */
|
||||
dBgS_ObjAcch::~dBgS_ObjAcch() {
|
||||
// NONMATCHING
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ int daObjDigpl_c::execute() {
|
|||
|
||||
u8 item_no;
|
||||
if (mpDigPoints != NULL) {
|
||||
item_no = mpDigPoints->m_points[mCurrentDigPoint].field_0x0;
|
||||
item_no = mpDigPoints->m_points[mCurrentDigPoint].mArg1;
|
||||
} else {
|
||||
item_no = getItemNum();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -471,7 +471,7 @@ static int daObj_Tp_Create(fopAc_ac_c* i_this) {
|
|||
int local_40 = (pPoint->mArg0 & 0xf);
|
||||
int parameters = local_40 | ((fopAcM_GetParam(tp) & 0xff000000) | 0xff0000 | (i << 8));
|
||||
cStack_28 = pPoint->m_position;
|
||||
cStack_30.y = pPoint->field_0x0 * 364;
|
||||
cStack_30.y = pPoint->mArg1 * 364;
|
||||
cStack_30.z = tp->field_0x597 | (tp->field_0x598 << 8);
|
||||
if (i == path->m_num - 1) {
|
||||
if (!dPath_ChkClose(path)) {
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ int daTagWljump_c::execute() {
|
|||
if (!player->checkWolfTagLockJumpLand()) {
|
||||
if (!player->checkWolfTagLockJump()) {
|
||||
for (var_r28 = 0; var_r28 < field_0x5c4->m_num; var_r28++, point_p++) {
|
||||
if (player->current.pos.abs2(point_p->m_position) < point_p->field_0x0 * point_p->field_0x0 * 10.0f * 10.0f) {
|
||||
if (player->current.pos.abs2(point_p->m_position) < point_p->mArg1 * point_p->mArg1 * 10.0f * 10.0f) {
|
||||
field_0x56a = var_r28;
|
||||
if (var_r28 == 0) {
|
||||
field_0x568 = 1;
|
||||
|
|
|
|||
|
|
@ -251,6 +251,3 @@ int dNpcLib_lookat_c::limitter(s16* o_value, s16 param_1, s16 param_2, s16 param
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 80252094-8025217C 24C9D4 00E8+00 1/0 0/0 0/0 .text __dt__16dNpcLib_lookat_cFv */
|
||||
dNpcLib_lookat_c::~dNpcLib_lookat_c() {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue