daObjTpost_c Nearly OK (#60)

* daObjTpost_c Nearly OK

Also a little bit more work on fopNpc_npc_c

* Remove Duplicate Struct
This commit is contained in:
SuperDude88
2023-09-19 19:49:23 -04:00
committed by GitHub
parent 667d122882
commit 54a8ffbe37
13 changed files with 1177 additions and 353 deletions
+7 -7
View File
@@ -29,14 +29,14 @@ public:
/* 0x4 */ WALL_H_DIRECT = 4,
};
/* 80075EAC */ dBgS_AcchCir();
/* 80075F14 */ void ClrWallHit();
/* 80075F40 */ void SetWallR(f32);
/* 80075F48 */ void CalcWallRR();
/* 80075F58 */ void SetWall(f32, f32);
/* 80075F80 */ void SetWallHDirect(f32);
dBgS_AcchCir();
void ClrWallHit();
void SetWallR(f32);
void CalcWallRR();
void SetWall(f32, f32);
void SetWallHDirect(f32);
/* 80077414 */ virtual ~dBgS_AcchCir() {}
virtual ~dBgS_AcchCir() {}
f32 GetWallH() { return m_wall_h; }
f32 GetWallR() { return m_wall_r; }
+32 -4
View File
@@ -164,6 +164,10 @@ public:
fopAc_ac_c* getPlayer(int idx) { return (fopAc_ac_c*)mpPlayer[idx]; }
s8 getPlayerCameraID(int idx) { return mCurCamera[idx]; }
int getItemRupeeCount() { return mItemRupeeCount; }
void setItemRupeeCount(int count) { mItemRupeeCount += count; }
void setMessageCountNumber(s16 num) { mMsgCountNumber = num; }
void setLkDemoAnmArchive(JKRArchive* i_arc) { mpLkDArc = i_arc; }
void setStatus(u16 status) { mStatus = status; }
@@ -263,7 +267,7 @@ public:
/* 0x48E8 */ u8 field_0x48E8[0x48F6 - 0x48E8];
/* 0x48F6 */ s16 mItemPendantNumCount;
/* 0x48F8 */ u8 field_0x48F8[0x4918 - 0x48F8];
/* 0x4918 */ u16 mCurrAuctionItemNameMsgID;
/* 0x4918 */ u16 mMsgCountNumber;
/* 0x491A */ s16 field_0x491a;
/* 0x491C */ s16 field_0x491c;
/* 0x491E */ s16 field_0x491e;
@@ -406,6 +410,10 @@ inline u8 dComIfGs_getWalletSize() {
return g_dComIfG_gameInfo.save.getPlayer().getPlayerStatusA().getWalletSize();
}
inline int dComIfGs_getRupee() {
return g_dComIfG_gameInfo.save.getPlayer().getPlayerStatusA().getRupee();
}
inline u8 dComIfGs_getMagic() {
return g_dComIfG_gameInfo.save.getPlayer().getPlayerStatusA().getMagic();
}
@@ -454,6 +462,10 @@ inline u8 dComIfGs_getReserveNum(int i_idx) {
return g_dComIfG_gameInfo.save.getPlayer().getBagItemRecord().getReserveNum(i_idx);
}
inline void dComIfGs_setReserveItemEmpty() {
g_dComIfG_gameInfo.save.getPlayer().getBagItem().setReserveItemEmpty();
}
inline void dComIfGs_setEventReg(u16 i_reg, u8 i_no) {
g_dComIfG_gameInfo.save.getEvent().setEventReg(i_reg, i_no);
}
@@ -960,6 +972,18 @@ inline BOOL dComIfGp_checkCameraAttentionStatus(int idx, u32 flag) {
return g_dComIfG_gameInfo.play.checkCameraAttentionStatus(idx, flag);
}
inline int dComIfGp_getItemRupeeCount() {
return g_dComIfG_gameInfo.play.getItemRupeeCount();
}
inline void dComIfGp_setItemRupeeCount(int count) {
g_dComIfG_gameInfo.play.setItemRupeeCount(count);
}
inline void dComIfGp_setMessageCountNumber(s16 num) {
g_dComIfG_gameInfo.play.setMessageCountNumber(num);
}
/**
* === EVENT ===*/
@@ -983,6 +1007,10 @@ inline void dComIfGp_event_offEventFlag(s16 flag) {
return g_dComIfG_gameInfo.play.getEvent().offEventFlag(flag);
}
inline u8 dComIfGp_event_getPreItemNo() {
return g_dComIfG_gameInfo.play.getEvent().getPreItemNo();
}
inline void dComIfGp_event_setItemPartnerId(u32 id) {
return g_dComIfG_gameInfo.play.getEvent().setPtI_Id(id);
}
@@ -995,11 +1023,11 @@ inline u32 dComIfGp_evmng_getEventIdx(char* pName, u8 evNo) {
return dComIfGp_getEventManager().getEventIdx(pName, evNo);
}
inline u32 dComIfGp_evmng_getMyStaffId(char* pName, fopAc_ac_c* pActor, s32 param_3) {
inline int dComIfGp_evmng_getMyStaffId(char* pName, fopAc_ac_c* pActor, s32 param_3) {
return dComIfGp_getEventManager().getMyStaffId(pName, pActor, param_3);
}
inline u32 dComIfGp_evmng_getMyActIdx(int staffIdx, const char* const* pActions, int actionCount, int force, int param_5) {
inline int dComIfGp_evmng_getMyActIdx(int staffIdx, const char* const* pActions, int actionCount, int force, int param_5) {
return dComIfGp_getEventManager().getMyActIdx(staffIdx, pActions, actionCount, force, param_5);
}
@@ -1035,7 +1063,7 @@ inline BOOL dComIfGp_evmng_getIsAddvance(s32 staffIdx) {
return dComIfGp_getEventManager().getIsAddvance(staffIdx);
}
inline void dComIfGp_evmng_cutEnd(s32 staffIdx) {
inline void dComIfGp_evmng_cutEnd(int staffIdx) {
return dComIfGp_getEventManager().cutEnd(staffIdx);
}
+1
View File
@@ -62,6 +62,7 @@ public:
u8 getTalkXYBtn() { return mTalkButton; }
bool chkTalkXY() { return mTalkButton == 1 || mTalkButton == 2 || mTalkButton == 3; }
void setPtI_Id(u32 id) { mPtItem = id; }
u8 getPreItemNo() { return mItemNo; }
u16 chkEventFlag(u16 flag) { return flag & mEventFlag; }
void onEventFlag(u16 flag) { mEventFlag |= flag; }
+15
View File
@@ -0,0 +1,15 @@
#ifndef D_LETTER_H
#define D_LETTER_H
bool dLetter_isNoSend(u16);
void dLetter_send(u16);
bool dLetter_isSend(u16);
bool dLetter_stock(u16);
bool dLetter_isStock(u16);
void dLetter_read(u16);
bool dLetter_isRead(u16);
void dLetter_delivery(u16);
void dLetter_autoStock(u16);
bool dLetter_isDelivery(u16);
#endif /* D_LETTER_H */
+14 -2
View File
@@ -5,7 +5,7 @@
class STControl {
public:
void STControl(s16, s16, s16, s16, f32, f32, s16, s16);
STControl(s16, s16, s16, s16, f32, f32, s16, s16);
void setWaitParm(s16, s16, s16, s16, f32, f32, s16, s16);
void init();
void Xinit();
@@ -38,4 +38,16 @@ public:
/* 0x26 */ s16 field_0x26;
};
#endif /* D_LIB_H */
class dLib_anm_prm_c {
public:
/* 0x00 */ s8 field_0x00;
/* 0x01 */ s8 field_0x01;
/* 0x02 */ s16 field_0x02;
/* 0x04 */ f32 field_0x04;
/* 0x08 */ f32 field_0x08;
/* 0x0C */ u32 loopMode;
};
void dLib_bcks_setAnm(const char*, mDoExt_McaMorf*, s8*, s8*, s8*, const int*, const dLib_anm_prm_c*, bool);
#endif /* D_LIB_H */
+22 -7
View File
@@ -37,14 +37,19 @@ class dNpc_JntCtrl_c {
/* 0x32 */ s16 field_0x32;
public:
dNpc_JntCtrl_c() {
field_0x0C = 0;
field_0x0B = 0;
}
bool angCalcS(s16*, s16, s16, s16);
void limitter(s16*, s16, s16);
void follow(s16*, s16, s16, int);
bool follow(s16*, s16, s16, int);
void move(s16, int);
void lookAtTarget(s16*, cXyz*, cXyz, s16, s16, bool);
void setParam(s16, s16, s16, s16, s16, s16, s16, s16, s16);
s16 chkLim(s16, int, int);
s32 chkLim(s16, int, int);
void turn_fromBackbone2Head(s16, s16*, s16*, bool);
void turn_fromHead2Backbone(s16, s16*, s16*);
s16 follow_current(s16*, s16);
@@ -53,10 +58,10 @@ public:
class dNpc_EventCut_c {
/* 0x00 */ char* mpEvtStaffName;
/* 0x04 */ s32 mEvtStaffId;
/* 0x04 */ int mEvtStaffId;
/* 0x08 */ fopAc_ac_c* mpActor;
/* 0x0C */ fopNpc_npc_c* mpTalkActor;
/* 0x10 */ s32 mCurActIdx;
/* 0x10 */ int mCurActIdx;
/* 0x14 */ u32 field_0x14;
/* 0x18 */ int mTimer;
/* 0x1C */ char* mpActorName;
@@ -78,6 +83,12 @@ class dNpc_EventCut_c {
/* 0x68 */ u8* field_0x68;
public:
dNpc_EventCut_c() {
mpActor = 0;
mpTalkActor = 0;
field_0x68 = 0;
}
void setActorInfo(char*, fopAc_ac_c*);
void setActorInfo2(char*, fopNpc_npc_c*);
@@ -166,8 +177,12 @@ enum dNpc_MessageStatus_e {
class fopNpc_npc_c : public fopAc_ac_c {
public:
fopNpc_npc_c() {
mCurrMsgBsPcId = -1;
mpCurrMsg = 0;
}
/* 0x290 */ dNpc_JntCtrl_c mJntCtrl;
/* 0x2C4 */ dNpc_EventCut_c mEventCtrl;
/* 0x2C4 */ dNpc_EventCut_c mEventCut;
/* 0x330 */ mDoExt_McaMorf* mpMcaMorf;
/* 0x334 */ dBgS_ObjAcch mObjAcch;
/* 0x4F8 */ dBgS_AcchCir mAcchCir;
@@ -179,8 +194,8 @@ public:
/* 0x6B0 */ msg_class* mpCurrMsg;
/* 0x6B4 */ u8 pad_0x6B4[0x6C0 - 0x6B4];
virtual u32 next_msgStatus(u32*) { return 0x10; }
virtual u32 getMsg() { return 1; }
virtual u16 next_msgStatus(u32* msgId) { return dNpcMsgStts_MSG_ENDS_e; }
virtual u32 getMsg() { return 0; }
virtual void anmAtr(u16) {}
void setCollision(float radius, float height);
+2 -1
View File
@@ -7,9 +7,10 @@
class dSv_player_status_a_c {
public:
/* 800589A8 */ void init();
u8 getSelectEquip(int i_no) { return mSelectEquip[i_no]; }
u8 getWalletSize() { return mWalletSize; }
int getRupee() const { return mRupee; }
u8 getMagic() { return mMagic; }
/* 0x00 */ u16 mMaxLife;
+2
View File
@@ -918,6 +918,8 @@ int dStage_mapInfo_GetOceanZ(stage_map_info_class*);
int dStage_mapInfo_GetOceanX(stage_map_info_class*);
void dStage_infoCreate();
dStage_objectNameInf* dStage_searchName(const char*);
inline s32 dStage_stagInfo_GetSaveTbl(stage_stag_info_class* i_stagInfo) {
return (i_stagInfo->field_0x09 >> 1) & 0x7F;
}
+1 -1
View File
@@ -411,7 +411,7 @@ f32 fopAcM_searchActorDistanceXZ(fopAc_ac_c* p_actorA, fopAc_ac_c* p_actorB);
f32 fopAcM_searchActorDistanceXZ2(fopAc_ac_c* p_actorA, fopAc_ac_c* p_actorB);
s32 fopAcM_rollPlayerCrash(fopAc_ac_c*, f32, u32, f32, f32, int, f32);
s32 fopAcM_rollPlayerCrash(fopAc_ac_c*, f32, u32);
s32 fopAcM_checkCullingBox(f32[3][4], f32, f32, f32, f32, f32, f32);
s32 fopAcM_cullingCheck(fopAc_ac_c*);
void* event_second_actor(u16);
+16
View File
@@ -248,11 +248,27 @@ public:
mDoExt_McaMorf(J3DModelData*, mDoExt_McaMorfCallBack1_c*, mDoExt_McaMorfCallBack2_c*, J3DAnmTransform*, int, float, int, int, int, void*, unsigned long, unsigned long);
virtual ~mDoExt_McaMorf();
void calc();
void calc(u16);
void setAnm(J3DAnmTransform*, int, f32, f32, f32, f32, void*);
void setMorf(f32);
J3DModel* getModel() { return mpModel; }
void setFrame(f32 frame) { mFrameCtrl.setFrame(frame); }
f32 getFrame() { return mFrameCtrl.getFrame(); }
bool isStop() const { //regswap somewhere here
bool stopped = true;
if (!mFrameCtrl.checkState(1) && mFrameCtrl.getRate() != 0.0f) {
stopped = false;
}
return stopped;
}
void update();
void updateDL();
void entry();
void entryDL();
void entryDL(J3DMaterialTable*);
void play(Vec *, u32, s8);
void stopZelAnime();