mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-18 13:13:29 -04:00
Add fpc_ProcID type and use it for all process IDs
See https://github.com/zeldaret/tp/pull/2173
This commit is contained in:
@@ -25,7 +25,7 @@ public:
|
||||
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
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
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*);
|
||||
|
||||
@@ -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 {};
|
||||
@@ -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__
|
||||
|
||||
@@ -33,10 +34,10 @@ public:
|
||||
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; }
|
||||
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
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() {}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ private:
|
||||
/* 0x00 */ u16 mPolyIndex;
|
||||
/* 0x02 */ u16 mBgIndex;
|
||||
/* 0x04 */ cBgW* mpBgW;
|
||||
/* 0x08 */ uint mActorId;
|
||||
/* 0x08 */ fpc_ProcID mActorId;
|
||||
|
||||
public:
|
||||
cBgS_PolyInfo() {
|
||||
@@ -27,13 +27,13 @@ public:
|
||||
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;
|
||||
@@ -50,16 +50,19 @@ public:
|
||||
|
||||
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;
|
||||
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -364,7 +365,7 @@ public:
|
||||
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() {
|
||||
@@ -381,7 +382,7 @@ public:
|
||||
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));
|
||||
|
||||
Reference in New Issue
Block a user