Skip to content

Commit

Permalink
Add fpc_ProcID type and use it for all process IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Jul 13, 2024
1 parent 61d9f47 commit 2def735
Show file tree
Hide file tree
Showing 159 changed files with 401 additions and 382 deletions.
4 changes: 2 additions & 2 deletions include/SSystem/SComponent/c_bg_s.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class cBgS_ChkElm {
void Release();

virtual ~cBgS_ChkElm() {}
virtual void Regist2(cBgW*, uint, void*);
virtual void Regist2(cBgW*, fpc_ProcID, void*);

bool ChkUsed() const { return (m_flags & 1); }
}; // Size: 0x14
Expand All @@ -44,7 +44,7 @@ class cBgS {
cM3dGPla* GetTriPla(cBgS_PolyInfo& polyInfo) const {
return GetTriPla(polyInfo.GetBgIndex(), polyInfo.GetPolyIndex());
}
bool Regist(cBgW*, uint, void*);
bool Regist(cBgW*, fpc_ProcID, void*);
bool Release(cBgW*);
bool LineCross(cBgS_LinChk*);
f32 GroundCross(cBgS_GndChk*);
Expand Down
9 changes: 5 additions & 4 deletions include/SSystem/SComponent/c_bg_s_chk.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define C_BG_S_CHK_H

#include "dolphin/mtx/vec.h"
#include "f_pc/f_pc_base.h"
#include "global.h"

struct cBgD_Vtx_t : public Vec {};
Expand All @@ -17,7 +18,7 @@ class cBgS_Chk {
private:
/* 0x0 */ cBgS_PolyPassChk* mPolyPassChk;
/* 0x4 */ cBgS_GrpPassChk* mGrpPassChk;
/* 0x8 */ uint mActorPid;
/* 0x8 */ fpc_ProcID mActorPid;
/* 0xC */ u8 unk_0x0C;
/* 0x10 */ // __vtable__

Expand All @@ -33,10 +34,10 @@ class cBgS_Chk {
mActorPid = other.mActorPid;
unk_0x0C = other.unk_0x0C;
}
bool ChkSameActorPid(uint) const;
bool ChkSameActorPid(fpc_ProcID) const;

void SetActorPid(uint pid) { mActorPid = pid; }
uint GetActorPid() const { return mActorPid; }
void SetActorPid(fpc_ProcID pid) { mActorPid = pid; }
fpc_ProcID GetActorPid() const { return mActorPid; }
void SetPolyPassChk(cBgS_PolyPassChk* p_chk) { mPolyPassChk = p_chk; }
void SetGrpPassChk(cBgS_GrpPassChk* p_chk) { mGrpPassChk = p_chk; }
cBgS_PolyPassChk* GetPolyPassChk() const { return mPolyPassChk; }
Expand Down
2 changes: 1 addition & 1 deletion include/SSystem/SComponent/c_bg_s_lin_chk.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class cBgS_LinChk : public cBgS_Chk, public cBgS_PolyInfo {
public:
cBgS_LinChk() { ct(); }
void ct();
void Set2(cXyz* pStart, cXyz* pEnd, uint actorPid);
void Set2(cXyz* pStart, cXyz* pEnd, fpc_ProcID actorPid);

virtual ~cBgS_LinChk() {}

Expand Down
17 changes: 10 additions & 7 deletions include/SSystem/SComponent/c_bg_s_poly_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class cBgS_PolyInfo {
/* 0x00 */ u16 mPolyIndex;
/* 0x02 */ u16 mBgIndex;
/* 0x04 */ cBgW* mpBgW;
/* 0x08 */ uint mActorId;
/* 0x08 */ fpc_ProcID mActorId;

public:
cBgS_PolyInfo() {
Expand All @@ -27,13 +27,13 @@ class cBgS_PolyInfo {
void SetPolyInfo(const cBgS_PolyInfo& other) {
*this = other;
}
void SetActorInfo(int bg_index, void* bgw, uint actor_id) {
void SetActorInfo(int bg_index, void* bgw, fpc_ProcID actor_id) {
JUT_ASSERT(0x59, 0 <= bg_index);
mBgIndex = bg_index;
mpBgW = (cBgW*)bgw;
mActorId = actor_id;
}
bool ChkSafe(const void* bgw, uint pid) {
bool ChkSafe(const void* bgw, fpc_ProcID pid) const {
if (mpBgW == bgw && mActorId == pid)
return true;
return false;
Expand All @@ -50,16 +50,19 @@ class cBgS_PolyInfo {

return true;
}
bool ChkSetInf() const {
if (mPolyIndex == 0xFFFF || mBgIndex == 0x100) {
return false;
}

return true;
}
bool ChkBgIndex() const {
if (mBgIndex == 0x100) {
return false;
}
return true;
}

// TODO
void ChkSafe(const void*, uint) const {}
void ChkSetInf() const {}
void SetPolyIndex(int poly_index) {
JUT_ASSERT(0x7b, 0 <= poly_index);
mPolyIndex = poly_index;
Expand Down
7 changes: 4 additions & 3 deletions include/SSystem/SComponent/c_cc_d.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "SSystem/SComponent/c_m3d_g_cyl.h"
#include "SSystem/SComponent/c_m3d_g_sph.h"
#include "SSystem/SComponent/c_m3d_g_tri.h"
#include "f_pc/f_pc_base.h"

class fopAc_ac_c;
class cCcD_PntAttr;
Expand Down Expand Up @@ -353,7 +354,7 @@ class cCcD_Stts {
private:
/* 0x00 */ cXyz m_cc_move;
/* 0x0C */ fopAc_ac_c* mActor;
/* 0x10 */ uint mApid;
/* 0x10 */ fpc_ProcID mApid;
/* 0x14 */ u8 mWeight;
/* 0x15 */ u8 field_0x15;
/* 0x16 */ u8 mDmg;
Expand All @@ -364,7 +365,7 @@ class cCcD_Stts {
virtual ~cCcD_Stts() {}
virtual const cCcD_GStts* GetGStts() const;
virtual cCcD_GStts* GetGStts();
void Init(int, int, void*, uint);
void Init(int, int, void*, fpc_ProcID);
virtual void Ct();
void PlusCcMove(f32, f32, f32);
void ClrCcMove() {
Expand All @@ -381,7 +382,7 @@ class cCcD_Stts {
fopAc_ac_c* GetActor() const { return mActor; }
void SetActor(void* ac) { mActor = (fopAc_ac_c*)ac; }
cXyz* GetCCMoveP() { return &m_cc_move; }
uint GetApid() const { return mApid; }
fpc_ProcID GetApid() const { return mApid; }
}; // Size = 0x1C

STATIC_ASSERT(0x1C == sizeof(cCcD_Stts));
Expand Down
8 changes: 4 additions & 4 deletions include/d/actor/d_a_agb.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class dMsgCtrl_c {

public:
/* 0x00 */ u16 field_0x0;
/* 0x04 */ uint mMsgID;
/* 0x04 */ fpc_ProcID mMsgID;
/* 0x08 */ msg_class* mpMsg;
};

Expand Down Expand Up @@ -110,8 +110,8 @@ class daAgb_c : public fopAc_ac_c {
BOOL isHold() { return mHold; }
BOOL getFollowTarget() { return mFollowTarget; }
void setFollowTarget(bool follow) { mFollowTarget = follow; }
uint getTargetID() { return mTargetID; }
void setTargetID(uint pid) { mTargetID = pid; }
fpc_ProcID getTargetID() { return mTargetID; }
void setTargetID(fpc_ProcID pid) { mTargetID = pid; }

struct daAgb_ItemBuy {
union {
Expand Down Expand Up @@ -247,7 +247,7 @@ class daAgb_c : public fopAc_ac_c {
/* 0x634 */ cXyz field_0x634;
/* 0x640 */ int field_0x640;
/* 0x648 */ u64 mPlayerName;
/* 0x650 */ uint mTargetID;
/* 0x650 */ fpc_ProcID mTargetID;
/* 0x654 */ int field_0x654;
/* 0x658 */ s16 field_0x658;
/* 0x65A */ u16 mPrevButtons;
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_am.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class am_class : public fopEn_enemy_c {
/* 0x02DC */ s16 mSpawnRotY;
/* 0x02DE */ u8 m02DE[0x02E0 - 0x02DE];
/* 0x02E0 */ int mCurrBckIdx;
/* 0x02E4 */ uint mSwallowedActorPID;
/* 0x02E4 */ fpc_ProcID mSwallowedActorPID;
/* 0x02E8 */ f32 mAreaRadius;
/* 0x02EC */ f32 mCorrectionOffsetY;
/* 0x02F0 */ f32 mSpawnPosY;
Expand Down
4 changes: 2 additions & 2 deletions include/d/actor/d_a_arrow.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class daArrow_c : public fopAc_ac_c {
/* 0x606 */ u8 field_0x606[0x608 - 0x606];
/* 0x608 */ s16 mSparkleTimer;
/* 0x60C */ JPABaseEmitter* mpSparkleEmitter;
/* 0x610 */ uint mHitActorProcID;
/* 0x610 */ fpc_ProcID mHitActorProcID;
/* 0x614 */ s32 mHitJointIndex;
/* 0x618 */ cXyz field_0x618;
/* 0x624 */ u8 field_0x624[0x660 - 0x624];
Expand All @@ -96,7 +96,7 @@ class daArrow_c : public fopAc_ac_c {
/* 0x668 */ dPa_followEcallBack mBlurFollowCb;
/* 0x67C */ csXyz mBlurAngle;
/* 0x682 */ u8 field_0x682;
/* 0x684 */ uint mLightEffPID;
/* 0x684 */ fpc_ProcID mLightEffPID;
/* 0x688 */ bool mbHasLightEff;
/* 0x68C */ daArrow_c_ProcFunc mCurrProcFunc;
/* 0x698 */ bool field_0x698;
Expand Down
10 changes: 5 additions & 5 deletions include/d/actor/d_a_auction.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class daAuction_c : public fopNpc_npc_c {
void setAucMdlNo(u8 idx, u8 mdlNo) { mAucMdlNo[idx] = mdlNo; }
void setItemNo(unsigned char) {}
void setKind(unsigned char, unsigned char) {}
void setNpcID(int, uint) {}
void setNpcID(int, fpc_ProcID) {}
void setStart(unsigned char) {}

s32 _create();
Expand Down Expand Up @@ -95,10 +95,10 @@ class daAuction_c : public fopNpc_npc_c {
public:
/* 0x6C4 */ request_of_phase_process_class mPhs;
/* 0x6CC */ dNpc_EventCut_c mNpcEvtInfo;
/* 0x738 */ uint m738[8];
/* 0x758 */ uint mCurrAuctionItemPID;
/* 0x75C */ uint mTimerID;
/* 0x760 */ uint mGaugeID;
/* 0x738 */ fpc_ProcID m738[8];
/* 0x758 */ fpc_ProcID mCurrAuctionItemPID;
/* 0x75C */ fpc_ProcID mTimerID;
/* 0x760 */ fpc_ProcID mGaugeID;
/* 0x764 */ dTimer_c* mpTimer;
/* 0x768 */ LIGHT_INFLUENCE mLight;
/* 0x788 */ J3DModel* mpModel;
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_bflower.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class daBFlower_c : public fopAc_ac_c {
/* 0x59C */ fopAc_ac_c* mpBombActor; // Bomb2 actor
/* 0x5A0 */ s32 mAnimTimer;
/* 0x5A4 */ f32 mPrevPlayerDist;
/* 0x5A8 */ uint mPrevGrabActorID; // Actor held by player during previous frame?
/* 0x5A8 */ fpc_ProcID mPrevGrabActorID; // Actor held by player during previous frame?
/* 0x5AC */ cXyz mBombScale;
/* 0x5B8 */ u8 m5B8;
};
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_deku_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class daDekuItem_c : public fopAc_ac_c {
/* 0x62C */ Mode_e mMode;
/* 0x630 */ BOOL unk630;
/* 0x634 */ s32 mItemBitNo;
/* 0x638 */ uint mItemPID;
/* 0x638 */ fpc_ProcID mItemPID;
/* 0x63C */ JPABaseEmitter* mpEmitter;
};

Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_fan.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class daFan_c : public dBgS_MoveBgActor {
/* 0x4C8 */ mDoExt_btkAnm mWindBtkAnm1;
/* 0x4C8 */ mDoExt_bckAnm mWindBckAnm;
/* 0x500 */ cXyz mWindScale;
/* 0x50C */ uint mWindSePId;
/* 0x50C */ fpc_ProcID mWindSePId;

static const char* m_arcname[3];
static const char m_arcname2[8];
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_fganon.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class fganon_class : public fopAc_ac_c {
/* 0x68F */ u8 m68F;
/* 0x690 */ u8 m690;
/* 0x691 */ u8 m691[0x6B4 - 0x691];
/* 0x6B4 */ uint mCapeID;
/* 0x6B4 */ fpc_ProcID mCapeID;
/* 0x6B8 */ dBgS_AcchCir m6B8;
/* 0x6F8 */ dBgS_Acch m6F8;
/* 0x8BC */ dCcD_Stts mStts;
Expand Down
4 changes: 2 additions & 2 deletions include/d/actor/d_a_hookshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class daHookshot_c : public fopAc_ac_c {

int getChainCnt() { return mChainCnt; }
cXyz getMoveVec() const { return mMoveVec; }
uint getCarryActorID() const { return mCarryActorID; }
fpc_ProcID getCarryActorID() const { return mCarryActorID; }
void getHookAngle() {}
MtxP getMtxTop() { return mMtx; }
void getObjHookFlg() const {}
Expand Down Expand Up @@ -71,7 +71,7 @@ class daHookshot_c : public fopAc_ac_c {
/* 0x398 */ dCcD_Stts mStts;
/* 0x3D4 */ dCcD_Cps mCps;
/* 0x50C */ cXyz m50C;
/* 0x518 */ uint mCarryActorID;
/* 0x518 */ fpc_ProcID mCarryActorID;
/* 0x51C */ Mtx mMtx;
/* 0x54C */ ProcFunc mCurrProcFunc;
};
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class daItem_c : public daItemBase_c {
/* 0x66B */ u8 mItemStatus;
/* 0x66C */ u8 mOnGroundTimer;
/* 0x66D */ u8 field_0x66D[0x670 - 0x66D];
/* 0x670 */ uint mDemoItemBsPcId;
/* 0x670 */ fpc_ProcID mDemoItemBsPcId;
/* 0x674 */ dPa_rippleEcallBack mPtclRippleCb;
/* 0x688 */ dPa_followEcallBack mPtclFollowCb;
/* 0x69C */ dPa_smokeEcallBack mPtclSmokeCb;
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_kamome.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class kamome_class : public fopAc_ac_c {
/* 0x2EC */ s16 mRiseTimer;
/* 0x2EE */ u8 m2EE[0x2F0 - 0x2EE];
/* 0x2F0 */ f32 mScale;
/* 0x2F4 */ uint mEsaProcID;
/* 0x2F4 */ fpc_ProcID mEsaProcID;
/* 0x2F8 */ fopAc_ac_c* mpTargetActor;
/* 0x2FC */ s16 m2FC;
/* 0x2FE */ u8 mbUsePathMovement;
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_kantera.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class kantera_class : public fopAc_ac_c {
/* 0x29B */ u8 mSwitchID;
/* 0x29C */ J3DModel* mpModel;
/* 0x2A0 */ J3DModel* mpModel2;
/* 0x2A4 */ uint mTargetActorID;
/* 0x2A4 */ fpc_ProcID mTargetActorID;
/* 0x2A8 */ mDoExt_brkAnm* mpBrkAnm1;
/* 0x2AC */ mDoExt_brkAnm* mpBrkAnm2;
/* 0x2B0 */ int m2B0;
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_mo2.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class mo2_class : public fopEn_enemy_c {
/* 0x2951 */ u8 m2951;
/* 0x2952 */ s16 m2952;
/* 0x2954 */ int m2954;
/* 0x2958 */ uint mWeaponPcId;
/* 0x2958 */ fpc_ProcID mWeaponPcId;
/* 0x295C */ fopAc_ac_c* mpBomb;
/* 0x2960 */ u16 m2960;
/* 0x2962 */ u8 m2962[0x2968 - 0x2962];
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_mozo.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class daMozo_c : public fopAc_ac_c {
BOOL CreateHeap();
s32 CreateInit();
void event_move();
fopAc_ac_c* getBeamActor(uint);
fopAc_ac_c* getBeamActor(fpc_ProcID);
void search_beam_proc_init();
void search_beam_proc();
void search_fire_proc_init();
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_npc_ba1.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class daNpc_Ba1_c : public fopAc_ac_c {
void getMsg();
void chkAttention();
void setAttention(bool);
void searchByID(uint);
void searchByID(fpc_ProcID);
void partner_srch_sub(void* (*)(void*, void*));
void partner_srch();
void check_useFairyArea();
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_npc_bj1.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class daNpc_Bj1_c : public fopAc_ac_c {
void getMsg();
void chkAttention();
void setAttention(bool);
void searchByID(uint);
void searchByID(fpc_ProcID);
void partner_srch_sub(void* (*)(void*, void*));
void partner_srch();
void setCollision_SP_();
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_npc_bm1.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class daNpc_Bm1_c : public fopAc_ac_c {
void getMsg();
void chkAttention();
void setAttention(bool);
void searchByID(uint);
void searchByID(fpc_ProcID);
void partner_srch_sub(void* (*)(void*, void*));
void partner_srch();
void bm_movPass(bool);
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_npc_de1.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class daNpc_De1_c : public fopAc_ac_c {
void checkOrder();
void chkAttention();
void setAttention();
void searchByID(uint);
void searchByID(fpc_ProcID);
void setDemoStartCenter();
void partner_srch();
void ccCreate();
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_npc_gk1.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class daNpc_Gk1_c : public fopAc_ac_c {
void checkOrder();
void chk_talk();
void chk_parts_notMov();
void searchByID(uint, int*);
void searchByID(fpc_ProcID, int*);
void lookBack();
void chkAttention();
void setAttention(bool);
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_npc_gp1.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class daNpc_Gp1_c : public fopAc_ac_c {
void getMsg();
void chkAttention();
void setAttention(bool);
void searchByID(uint);
void searchByID(fpc_ProcID);
void partner_srch_sub(void* (*)(void*, void*));
void partner_srch();
void ctrl_WAITanm();
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_npc_hi1.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class daNpc_Hi1_c : public fopAc_ac_c {
void checkOrder();
void chk_talk();
void chk_parts_notMov();
void searchByID(uint, int*);
void searchByID(fpc_ProcID, int*);
void lookBack();
void chkAttention();
void setAttention(bool);
Expand Down
2 changes: 1 addition & 1 deletion include/d/actor/d_a_npc_hr.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class daNpc_Wind_Clothes {
/* 0x0E8 */ cXyz mSquallPos[4];
/* 0x118 */ u8 m118;
/* 0x119 */ u8 m119[0x11C - 0x119];
/* 0x11C */ uint mActorProcID;
/* 0x11C */ fpc_ProcID mActorProcID;
/* 0x120 */ f32 m120;
/* 0x124 */ f32 m124;
/* 0x128 */ f32 m128;
Expand Down
Loading

0 comments on commit 2def735

Please sign in to comment.