mirror of https://github.com/zeldaret/tp.git
d_a_npc_ins equivalent (#2685)
* initial work * over half done * almostish done * equivalent * PR cleanup
This commit is contained in:
parent
125f2325a5
commit
aecc7c8420
|
|
@ -1847,7 +1847,7 @@ config.libs = [
|
|||
ActorRel(NonMatching, "d_a_npc_hoz"),
|
||||
ActorRel(NonMatching, "d_a_npc_impal", extra_cflags=[DANPCF_C_HACK]),
|
||||
ActorRel(NonMatching, "d_a_npc_inko"),
|
||||
ActorRel(NonMatching, "d_a_npc_ins"),
|
||||
ActorRel(Equivalent, "d_a_npc_ins", extra_cflags=[DANPCF_C_HACK]), # weak func order
|
||||
ActorRel(MatchingFor("GZ2E01", "GZ2P01", "GZ2J01"), "d_a_npc_jagar"),
|
||||
ActorRel(NonMatching, "d_a_npc_kasi_hana", extra_cflags=[DANPCF_C_HACK]),
|
||||
ActorRel(NonMatching, "d_a_npc_kasi_kyu", extra_cflags=[DANPCF_C_HACK]),
|
||||
|
|
|
|||
|
|
@ -10,63 +10,136 @@
|
|||
*
|
||||
* @details
|
||||
*
|
||||
*/
|
||||
class daNpcIns_c : public fopAc_ac_c {
|
||||
*/
|
||||
|
||||
struct daNpcIns_HIOParam {
|
||||
/* 0x00 */ daNpcF_HIOParam common;
|
||||
/* 0x70 */ f32 walk_speed; // 歩行速度 - Walking Speed
|
||||
};
|
||||
|
||||
class daNpcIns_HIO_c : public mDoHIO_entry_c {
|
||||
/* 0x8 */ daNpcIns_HIOParam param;
|
||||
};
|
||||
|
||||
class daNpcIns_Param_c {
|
||||
public:
|
||||
/* 80A13D40 */ virtual ~daNpcIns_Param_c() {}
|
||||
|
||||
static daNpcIns_HIOParam const m;
|
||||
};
|
||||
|
||||
struct insect_param_data {
|
||||
int evt_bit_no;
|
||||
s16 msg_no;
|
||||
u8 field_0x6;
|
||||
u8 field_0x7;
|
||||
};
|
||||
|
||||
class daNpcIns_c : public daNpcF_c {
|
||||
public:
|
||||
typedef int (daNpcIns_c::*actionFunc)(void*);
|
||||
typedef BOOL (daNpcIns_c::*eventFunc)(int);
|
||||
|
||||
/* 80A0E24C */ daNpcIns_c();
|
||||
/* 80A0E460 */ ~daNpcIns_c();
|
||||
/* 80A0E660 */ void Create();
|
||||
/* 80A0EA30 */ void CreateHeap();
|
||||
/* 80A0EF3C */ void Delete();
|
||||
/* 80A0EF70 */ void Execute();
|
||||
/* 80A0EF94 */ void Draw();
|
||||
/* 80A0F0BC */ void ctrlJoint(J3DJoint*, J3DModel*);
|
||||
/* 80A0F28C */ void createHeapCallBack(fopAc_ac_c*);
|
||||
/* 80A0F2AC */ void ctrlJointCallBack(J3DJoint*, int);
|
||||
/* 80A0F2F8 */ void setExpressionAnm(int, bool);
|
||||
/* 80A0F538 */ void setExpressionBtp(int);
|
||||
/* 80A0F618 */ bool setMotionAnm(int, f32);
|
||||
/* 80A0E660 */ cPhs__Step Create();
|
||||
/* 80A0EA30 */ int CreateHeap();
|
||||
/* 80A0EF3C */ int Delete();
|
||||
/* 80A0EF70 */ int Execute();
|
||||
/* 80A0EF94 */ int Draw();
|
||||
/* 80A0F0BC */ int ctrlJoint(J3DJoint*, J3DModel*);
|
||||
/* 80A0F28C */ static int createHeapCallBack(fopAc_ac_c*);
|
||||
/* 80A0F2AC */ static int ctrlJointCallBack(J3DJoint*, int);
|
||||
/* 80A0F2F8 */ bool setExpressionAnm(int, bool);
|
||||
/* 80A0F538 */ bool setExpressionBtp(int);
|
||||
/* 80A0F618 */ void setMotionAnm(int, f32);
|
||||
/* 80A0F78C */ void reset();
|
||||
/* 80A0F984 */ void waitShop(void*);
|
||||
/* 80A0F984 */ int waitShop(void*);
|
||||
/* 80A0FF40 */ void setMotion(int, f32, int);
|
||||
/* 80A0FFC4 */ void setExpression(int, f32);
|
||||
/* 80A0FFF0 */ void waitPresent(void*);
|
||||
/* 80A103A0 */ void waitOutSide1(void*);
|
||||
/* 80A10950 */ void waitOutSide2(void*);
|
||||
/* 80A10CD8 */ void goHome(void*);
|
||||
/* 80A11378 */ void talk(void*);
|
||||
/* 80A11A7C */ void demo(void*);
|
||||
/* 80A11BE8 */ void isInsectComplete();
|
||||
/* 80A11C50 */ void getInsectParamData(int);
|
||||
/* 80A0FFF0 */ int waitPresent(void*);
|
||||
/* 80A103A0 */ int waitOutSide1(void*);
|
||||
/* 80A10950 */ int waitOutSide2(void*);
|
||||
/* 80A10CD8 */ int goHome(void*);
|
||||
/* 80A11378 */ int talk(void*);
|
||||
/* 80A11A7C */ int demo(void*);
|
||||
/* 80A11BE8 */ bool isInsectComplete();
|
||||
/* 80A11C50 */ const insect_param_data& getInsectParamData(int);
|
||||
/* 80A11D44 */ void setWaitAction();
|
||||
/* 80A11F84 */ void setPath(int);
|
||||
/* 80A1211C */ void checkPoint(cXyz&, f32);
|
||||
/* 80A122D0 */ void setNextPoint();
|
||||
/* 80A12480 */ void getTargetPoint(int, Vec*);
|
||||
/* 80A11F84 */ bool setPath(int);
|
||||
/* 80A1211C */ bool checkPoint(cXyz&, f32);
|
||||
/* 80A122D0 */ bool setNextPoint();
|
||||
/* 80A12480 */ inline void getTargetPoint(int, Vec*);
|
||||
/* 80A124D0 */ void pathMoveF();
|
||||
/* 80A12618 */ void setParam();
|
||||
/* 80A126D4 */ void main();
|
||||
/* 80A12A10 */ void playMotion();
|
||||
/* 80A12DC8 */ void ctrlBtk();
|
||||
/* 80A12EA4 */ void setAttnPos();
|
||||
/* 80A131AC */ void lookat();
|
||||
/* 80A1339C */ void setMtx();
|
||||
/* 80A13460 */ bool drawDbgInfo();
|
||||
/* 80A12618 */ inline void setParam();
|
||||
/* 80A126D4 */ inline BOOL main();
|
||||
/* 80A12A10 */ inline void playMotion();
|
||||
/* 80A12DC8 */ inline BOOL ctrlBtk();
|
||||
/* 80A12EA4 */ inline void setAttnPos();
|
||||
/* 80A131AC */ inline void lookat();
|
||||
/* 80A1339C */ inline void setMtx();
|
||||
/* 80A13460 */ inline int drawDbgInfo();
|
||||
|
||||
static u8 mEvtSeqList[12];
|
||||
int getStartTime() { return fopAcM_GetParam(this) & 0xFF; }
|
||||
int getEndTime() { return (fopAcM_GetParam(this) >> 8) & 0xFF; }
|
||||
int getTimeHour() { return dKy_getdaytime_hour(); }
|
||||
int getTimeMinute() { return dKy_getdaytime_minute(); }
|
||||
int getTime() { return getTimeMinute() + getTimeHour() * 60; }
|
||||
s16 getMessageNo() { return shape_angle.x; }
|
||||
int getPathID1() { return (fopAcM_GetParam(this) >> 16) & 0xFF; }
|
||||
int getPathID2() { return fopAcM_GetParam(this) >> 24; }
|
||||
inline BOOL setAction(actionFunc);
|
||||
inline void waitEventMng();
|
||||
inline BOOL step(s16, int);
|
||||
void setLookMode(int i_lookMode) { if (i_lookMode >= 0 && i_lookMode < 4 && i_lookMode != mLookMode) mLookMode = i_lookMode; }
|
||||
inline BOOL chkFindPlayer();
|
||||
inline void checkPlayerSearch();
|
||||
bool isInsect(int type) {
|
||||
bool rv = false;
|
||||
|
||||
if (type >= fpcNm_ITEM_M_BEETLE && type <= fpcNm_ITEM_F_MAYFLY) {
|
||||
rv = true;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
s16 getInsectMessageNo(int type) { return getInsectParamData(type).msg_no; }
|
||||
u32 getInsectEvtBitNo(int type) { return getInsectParamData(type).evt_bit_no; }
|
||||
inline void setExpressionTalkAfter();
|
||||
inline void playExpression();
|
||||
BOOL chkAction(actionFunc action) { return action == mAction; }
|
||||
|
||||
static eventFunc mEvtSeqList[1];
|
||||
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568[0xe24 - 0x568];
|
||||
/* 0xB48 */ Z2Creature mSound;
|
||||
/* 0xBD8 */ J3DModel* mpUmbrellaModel;
|
||||
/* 0xBDC */ J3DModel* mpKagoModel;
|
||||
/* 0xBE0 */ daNpcF_MatAnm_c* mpMatAnm;
|
||||
/* 0xBE4 */ daNpcF_Lookat_c mLookat;
|
||||
/* 0xC80 */ daNpcF_ActorMngr_c mActorMngr[1];
|
||||
/* 0xC88 */ daNpcIns_HIO_c* mHIO;
|
||||
/* 0xC8C */ dCcD_Cyl mCyl;
|
||||
/* 0xDC8 */ actionFunc mAction;
|
||||
/* 0xDD4 */ actionFunc mPrevAction;
|
||||
/* 0xDE0 */ request_of_phase_process_class mPhases[3];
|
||||
/* 0xDF8 */ fpc_ProcID mItemID;
|
||||
/* 0xDFC */ int field_0xdfc;
|
||||
/* 0xE00 */ int mRndValue;
|
||||
/* 0xE04 */ dPath* mPath;
|
||||
/* 0xE08 */ int mPntIndex;
|
||||
/* 0xE0C */ f32 field_0xe0c;
|
||||
/* 0xE10 */ f32 mCurrentPosY;
|
||||
/* 0xE14 */ s16 field_0xe14;
|
||||
/* 0xE16 */ s16 field_0xe16;
|
||||
/* 0xE18 */ s16 mInsectMsgNo;
|
||||
/* 0xE1A */ s16 mLookMode;
|
||||
/* 0xE1C */ u16 mGoHomeTime;
|
||||
/* 0xE1E */ u16 mMode;
|
||||
/* 0xE20 */ u8 mOrderSpeakEvent;
|
||||
/* 0xE21 */ u8 mType;
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(daNpcIns_c) == 0xe24);
|
||||
|
||||
class daNpcIns_Param_c {
|
||||
public:
|
||||
/* 80A13D40 */ ~daNpcIns_Param_c();
|
||||
|
||||
static u8 const m[112];
|
||||
};
|
||||
|
||||
|
||||
#endif /* D_A_NPC_INS_H */
|
||||
|
|
|
|||
|
|
@ -1238,6 +1238,8 @@ public:
|
|||
onHeavyState();
|
||||
onEndResetFlg1(ERFLG1_UNK_40000);
|
||||
}
|
||||
|
||||
BOOL checkInsectRelease() { return checkResetFlg1(RFLG1_UNK_100); }
|
||||
};
|
||||
|
||||
int daPy_addCalcShort(s16* param_0, s16 param_1, s16 param_2, s16 param_3, s16 param_4);
|
||||
|
|
|
|||
|
|
@ -548,6 +548,10 @@ inline bool dMsgObject_isMouthCheck() {
|
|||
return dMsgObject_getMsgObjectClass()->isMouthCheck();
|
||||
}
|
||||
|
||||
inline void dMsgObject_setInsectItemNo(u8 i_insectItemNo) {
|
||||
dMsgObject_getMsgObjectClass()->setInsectItemNo(i_insectItemNo);
|
||||
}
|
||||
|
||||
class dMsgObject_HowlHIO_c {
|
||||
public:
|
||||
/* 80232AEC */ dMsgObject_HowlHIO_c();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue