diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2026-03-17 22:48:37 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-17 22:48:37 -0700 |
| commit | f64015ea383cc3ba93a90918ac3dd1d2f66e1e17 (patch) | |
| tree | e5b1205895176398034a77ccba6e2c498522fd88 /include/SSystem | |
| parent | 6694c1b281a142972fce587bd20cd82ee65ab38f (diff) | |
cc debug work (#3133)
Diffstat (limited to 'include/SSystem')
| -rw-r--r-- | include/SSystem/SComponent/c_bg_s_lin_chk.h | 8 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_cc_d.h | 27 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_cc_s.h | 2 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_m3d_g_aab.h | 24 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_m3d_g_cps.h | 6 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_m3d_g_cyl.h | 4 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_m3d_g_lin.h | 8 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_m3d_g_sph.h | 5 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_m3d_g_tri.h | 8 |
9 files changed, 51 insertions, 41 deletions
diff --git a/include/SSystem/SComponent/c_bg_s_lin_chk.h b/include/SSystem/SComponent/c_bg_s_lin_chk.h index 1c0b26c4a5..bf71667131 100644 --- a/include/SSystem/SComponent/c_bg_s_lin_chk.h +++ b/include/SSystem/SComponent/c_bg_s_lin_chk.h @@ -36,7 +36,7 @@ public: void SetHit() { mStts |= STTS_HIT; } u32 ChkHit() const { return mStts & STTS_HIT; } void SetCross(const cXyz& pos) { mLin.SetEnd(pos); } - cXyz* GetCrossP() { return &mLin.GetEndP(); } + cXyz* GetCrossP() { return mLin.GetEndP(); } cM3dGLin* GetLinP() { return &mLin; } bool ChkBackFlag() const { return mBackFlag; } void OnBackFlag() { mBackFlag = true; } @@ -45,13 +45,17 @@ public: bool GetPreWallChk() const { return mPreWallChk; } bool GetPreGroundChk() const { return mPreGroundChk; } bool GetPreRoofChk() const { return mPreRoofChk; } - cXyz* GetStartP() { return &mLin.GetStartP(); } + cXyz* GetStartP() { return mLin.GetStartP(); } void ClrSttsRoofOff() { mStts &= ~STTS_ROOF_OFF; } void SetSttsRoofOff() { mStts |= STTS_ROOF_OFF; } void ClrSttsWallOff() { mStts &= ~STTS_WALL_OFF; } void SetSttsWallOff() { mStts |= STTS_WALL_OFF; } void ClrSttsGroundOff() { mStts &= ~STTS_GROUND_OFF; } void SetSttsGroundOff() { mStts |= STTS_GROUND_OFF; } + void ClearCheckIndex() { ClearPi(); } + bool ChkSttsWallOff() const { return (mStts & STTS_WALL_OFF); } + bool ChkSttsGroundOff() const { return (mStts & STTS_GROUND_OFF); } + bool ChkSttsRoofOff() const { return (mStts & STTS_ROOF_OFF); } }; #endif /* C_BG_S_LIN_CHK_H */ diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h index f80c33b823..3d402d1825 100644 --- a/include/SSystem/SComponent/c_cc_d.h +++ b/include/SSystem/SComponent/c_cc_d.h @@ -188,6 +188,7 @@ public: cXyz* GetCCMoveP() { return &m_cc_move; } fpc_ProcID GetApid() const { return m_apid; } u8 GetDmg() const { return m_dmg; } + void ClrCo() { ClrCcMove(); } }; // Size = 0x1C STATIC_ASSERT(0x1C == sizeof(cCcD_Stts)); @@ -213,7 +214,7 @@ public: void ct(); void SetSPrm(u32 sprm) { mSPrm = sprm; } s32 getSPrm() const { return mSPrm; } - void setRPrm(s32 rprm) { mRPrm = rprm; } + void SetRPrm(u32 rprm) { mRPrm = rprm; } s32 getRPrm() const { return mRPrm; } cCcD_Obj* GetHitObj() { return mHitObj; } const cCcD_Obj* GetHitObj() const { return mHitObj; } @@ -222,6 +223,9 @@ public: void OnSPrmBit(u32 flag) { mSPrm |= flag; } void OffSPrmBit(u32 flag) { mSPrm &= ~flag; } u32 ChkSPrm(u32 prm) const { return MskSPrm(prm) != 0; } + void SetHitObj(cCcD_Obj* pobj) { mHitObj = pobj; } + void ClrRPrm(u32 prm) { mRPrm &= ~prm; } + void ClrObj() { mHitObj = NULL; } void Set(cCcD_SrcObjCommonBase const& src) { mSPrm = src.mSPrm; } }; @@ -240,7 +244,7 @@ public: void ClrHit(); int GetType() const { return mType; } u32 GetGrp() const { return MskSPrm(0x1E); } - bool ChkSet() const { return MskSPrm(1); } + BOOL ChkSet() const { return MskSPrm(1); } u8 GetAtp() const { return mAtp; } u32 MskType(u32 msk) const { return mType & msk; } void SetType(u32 type) { mType = type; } @@ -269,7 +273,7 @@ public: int GetType() const { return mType; } void SetType(u32 type) { mType = type; } u32 GetGrp() const { return MskSPrm(0x1E); } - bool ChkSet() const { return MskSPrm(1); } + BOOL ChkSet() const { return MskSPrm(1); } void ClrSet() { OffSPrmBit(1); } u32 ChkHit() const { return MskRPrm(1); } @@ -289,7 +293,7 @@ public: void SetIGrp(u32); void SetVsGrp(u32); u32 GetGrp() const { return MskSPrm(0x1E); } - bool ChkSet() const { return MskSPrm(1); } + BOOL ChkSet() const { return MskSPrm(1); } u32 GetVsGrp() const { return MskSPrm(0x70); } u32 GetIGrp() const { return MskSPrm(0xE); } u32 ChkNoCrr() const { return MskSPrm(0x100); } @@ -323,10 +327,10 @@ public: u32 GetCoGrp() const { return mObjCo.GetGrp(); } int GetTgType() const { return mObjTg.GetType(); } u32 GetAtType() const { return mObjAt.GetType(); } - bool ChkTgSet() const { return mObjTg.ChkSet(); } - bool ChkAtSet() const { return mObjAt.ChkSet(); } - bool ChkCoSet() const { return mObjCo.ChkSet(); } - u32 ChkCoSameActorHit() const { return mObjCo.ChkCoSameActorHit(); } + BOOL ChkTgSet() const { return mObjTg.ChkSet(); } + BOOL ChkAtSet() const { return mObjAt.ChkSet(); } + BOOL ChkCoSet() const { return mObjCo.ChkSet(); } + u32 ChkCoSameActorHit() { return mObjCo.MskSPrm(0x400); } void OnCoSameActorHit() { mObjCo.OnCoSameActorHit(); } void OffCoSameActorHit() { mObjCo.OffCoSameActorHit(); } u32 GetCoVsGrp() const { return mObjCo.GetVsGrp(); } @@ -334,8 +338,8 @@ public: u8 GetAtAtp() const { return mObjAt.GetAtp(); } u32 ChkAtNoTgHitInfSet() const { return mObjAt.MskSPrm(0x20); } u32 ChkTgNoAtHitInfSet() const { return mObjTg.MskSPrm(0x20); } - u32 ChkCoNoCoHitInfSet() const { return mObjCo.MskSPrm(0x200); } - bool ChkTgNoSlingHitInfSet() const { return mObjTg.MskSPrm(0x40); } + u32 ChkCoNoCoHitInfSet() { return mObjCo.MskSPrm(0x200); } + BOOL ChkTgNoSlingHitInfSet() { return mObjTg.MskSPrm(0x40); } void SetAtHit(cCcD_Obj* obj) { mObjAt.SetHit(obj); } void SetTgHit(cCcD_Obj* obj) { mObjTg.SetHit(obj); } void SetCoHit(cCcD_Obj* obj) { mObjCo.SetHit(obj); } @@ -430,7 +434,6 @@ public: /* vt[21]*/ virtual void getShapeAccess(cCcD_ShapeAttr::Shape*) const; cM3dGAab& GetWorkAab() { return mAab; } - cM3dGAab const& GetWorkAab() const { return mAab; } static cXyz m_virtual_center; }; @@ -456,7 +459,7 @@ public: void SetStts(cCcD_Stts* stts) { mStts = stts; } cCcD_DivideInfo& GetDivideInfo() { return mDivideInfo; } cCcD_DivideInfo* GetPDivideInfo() { return &mDivideInfo; } - int ChkBsRevHit() const { return mFlags & 2; } + int ChkBsRevHit() { return mFlags & 2; } private: /* 0x040 */ int mFlags; diff --git a/include/SSystem/SComponent/c_cc_s.h b/include/SSystem/SComponent/c_cc_s.h index 334f7351d8..4bdf70efd5 100644 --- a/include/SSystem/SComponent/c_cc_s.h +++ b/include/SSystem/SComponent/c_cc_s.h @@ -16,7 +16,7 @@ public: /* 0x1000 */ cCcD_Obj* mpObjCo[0x100]; /* 0x1400 */ cCcD_Obj* mpObj[0x500]; #if DEBUG - /* 0x2800 */ int m_debug_code; + /* 0x2800 */ u32 m_debug_code; #endif /* 0x2800 */ u16 mObjAtCount; /* 0x2802 */ u16 mObjTgCount; diff --git a/include/SSystem/SComponent/c_m3d_g_aab.h b/include/SSystem/SComponent/c_m3d_g_aab.h index b070e776eb..a685efb007 100644 --- a/include/SSystem/SComponent/c_m3d_g_aab.h +++ b/include/SSystem/SComponent/c_m3d_g_aab.h @@ -18,25 +18,25 @@ public: bool CrossY(const cXyz*) const; bool UnderPlaneYUnder(f32) const; bool TopPlaneYUnder(f32) const; - void ClearForMinMax(void); + void ClearForMinMax(); void SetMinMax(const cXyz&); void SetMinMax(const cM3dGAab&); void SetMin(const cXyz&); void SetMax(const cXyz&); void CalcCenter(cXyz*) const; void PlusR(f32); - const cXyz* GetMaxP(void) const { return &mMax; } - cXyz* GetMaxP(void) { return &mMax; } - const cXyz* GetMinP(void) const { return &mMin; } - cXyz* GetMinP(void) { return &mMin; } - const f32 GetMaxX(void) const { return mMax.x; } - const f32 GetMaxY(void) const { return mMax.y; } - const f32 GetMaxZ(void) const { return mMax.z; } - const f32 GetMinX(void) const { return mMin.x; } - const f32 GetMinY(void) const { return mMin.y; } - const f32 GetMinZ(void) const { return mMin.z; } + const cXyz* GetMaxP() const { return &mMax; } + cXyz* GetMaxP() { return &mMax; } + const cXyz* GetMinP() const { return &mMin; } + cXyz* GetMinP() { return &mMin; } + const f32 GetMaxX() const { return mMax.x; } + const f32 GetMaxY() const { return mMax.y; } + const f32 GetMaxZ() const { return mMax.z; } + const f32 GetMinX() const { return mMin.x; } + const f32 GetMinY() const { return mMin.y; } + const f32 GetMinZ() const { return mMin.z; } bool Cross(const cM3dGLin *param_1) const { - return cM3d_Cross_MinMaxBoxLine(GetMinP(), GetMaxP(), (Vec*)¶m_1->GetStartP(), (Vec*)¶m_1->GetEndP()); + return cM3d_Cross_MinMaxBoxLine(GetMinP(), GetMaxP(), param_1->GetStartP(), param_1->GetEndP()); } bool Cross(const cM3dGAab *param_1) const { return cM3d_Cross_AabAab(this, param_1); diff --git a/include/SSystem/SComponent/c_m3d_g_cps.h b/include/SSystem/SComponent/c_m3d_g_cps.h index 5147e02114..f24b352dae 100644 --- a/include/SSystem/SComponent/c_m3d_g_cps.h +++ b/include/SSystem/SComponent/c_m3d_g_cps.h @@ -3,6 +3,7 @@ #include "SSystem/SComponent/c_m3d.h" #include "SSystem/SComponent/c_m3d_g_lin.h" +#include "SSystem/SComponent/c_m3d_g_tri.h" struct cM3dGCpsS { /* 0x00 */ Vec mStart; @@ -14,8 +15,8 @@ class cM3dGCps : public cM3dGLin { public: /* 0x1C */ f32 mRadius; - cM3dGCps(void); - virtual ~cM3dGCps(void); + cM3dGCps(); + virtual ~cM3dGCps(); void Set(const cXyz&, const cXyz&, f32); void Set(const cM3dGCpsS&); void SetCps(const cM3dGCps&); @@ -24,6 +25,7 @@ public: } bool Cross(cM3dGCyl const* cyl, cXyz* xyz) const { return cM3d_Cross_CpsCyl(*this, *cyl, xyz); } bool Cross(cM3dGSph const* sph, cXyz* xyz) const { return cM3d_Cross_CpsSph(*this, *sph, xyz); } + bool Cross(cM3dGTri const& tri, cXyz* xyz) const { return cM3d_Cross_CpsTri(*this, tri, xyz); } void SetR(f32 r) { mRadius = r; } f32 GetR() const { return mRadius; } diff --git a/include/SSystem/SComponent/c_m3d_g_cyl.h b/include/SSystem/SComponent/c_m3d_g_cyl.h index 5d5f3a395b..4983084d83 100644 --- a/include/SSystem/SComponent/c_m3d_g_cyl.h +++ b/include/SSystem/SComponent/c_m3d_g_cyl.h @@ -40,8 +40,8 @@ public: bool Cross(const cM3dGCps* cps, cXyz* xyz) const { return cM3d_Cross_CpsCyl(*cps, *this, xyz); } bool Cross(const cM3dGTri& tri, cXyz* xyz) const { return cM3d_Cross_CylTri(this, &tri, xyz); } - bool Cross(const cM3dGCyl* other, f32* f) const { return cM3d_Cross_CylCyl(this, other, f); } - bool Cross(const cM3dGSph* sph, f32* f) const { return cM3d_Cross_CylSph(this, sph, f); } + bool cross(const cM3dGCyl* other, f32* f) const { return cM3d_Cross_CylCyl(this, other, f); } + bool cross(const cM3dGSph* sph, f32* f) const { return cM3d_Cross_CylSph(this, sph, f); } }; // Size = 0x18 STATIC_ASSERT(0x18 == sizeof(cM3dGCyl)); diff --git a/include/SSystem/SComponent/c_m3d_g_lin.h b/include/SSystem/SComponent/c_m3d_g_lin.h index d6b86ebcf0..fbe65d9b33 100644 --- a/include/SSystem/SComponent/c_m3d_g_lin.h +++ b/include/SSystem/SComponent/c_m3d_g_lin.h @@ -22,13 +22,13 @@ public: void SetEnd(const cXyz&); void set(const Vec& i_start, const Vec& i_end) { SetStartEnd(i_start, i_end); } - const cXyz& GetStartP(void) const { return mStart; } - cXyz& GetStartP(void) { return mStart; } + const cXyz* GetStartP() const { return &mStart; } + cXyz* GetStartP() { return &mStart; } cXyz& GetStart() { return mStart; } const cXyz& GetStart() const { return mStart; } - const cXyz& GetEndP(void) const { return mEnd; } - cXyz& GetEndP(void) { return mEnd; } + const cXyz* GetEndP() const { return &mEnd; } + cXyz* GetEndP() { return &mEnd; } cXyz& GetEnd() { return mEnd; } const cXyz& GetEnd() const { return mEnd; } f32 GetLen() const { return PSVECDistance(&mStart, &mEnd); } diff --git a/include/SSystem/SComponent/c_m3d_g_sph.h b/include/SSystem/SComponent/c_m3d_g_sph.h index b8f868b8a5..9a9248d0a4 100644 --- a/include/SSystem/SComponent/c_m3d_g_sph.h +++ b/include/SSystem/SComponent/c_m3d_g_sph.h @@ -39,9 +39,10 @@ public: f32 GetCY(void) const { return mCenter.y; } f32 GetCZ(void) const { return mCenter.z; } - bool Cross(const cM3dGSph* other, f32* f) const { return cM3d_Cross_SphSph(this, other, f); } + bool cross(const cM3dGSph* other, f32* f) const { return cM3d_Cross_SphSph(this, other, f); } bool Cross(const cM3dGCps* cps, cXyz* xyz) const { return cM3d_Cross_CpsSph(*cps, *this, xyz); } - bool Cross(const cM3dGCyl* cyl, f32* f) const { return cM3d_Cross_CylSph(cyl, this, f); } + bool cross(const cM3dGCyl* cyl, f32* f) const { return cM3d_Cross_CylSph(cyl, this, f); } + bool Cross(const cM3dGTri& tri, cXyz* xyz) const { return cM3d_Cross_SphTri(this, &tri, xyz); } }; // Size = 0x14 STATIC_ASSERT(0x14 == sizeof(cM3dGSph)); diff --git a/include/SSystem/SComponent/c_m3d_g_tri.h b/include/SSystem/SComponent/c_m3d_g_tri.h index 214c1d0285..cd535d66c3 100644 --- a/include/SSystem/SComponent/c_m3d_g_tri.h +++ b/include/SSystem/SComponent/c_m3d_g_tri.h @@ -25,10 +25,10 @@ public: void setPos(const Vec*, const Vec*, const Vec*); void setBg(const Vec*, const Vec*, const Vec*, const cM3dGPla*); void set(const Vec*, const Vec*, const Vec*, const Vec*); - bool Cross(cM3dGCps const& cps, cXyz* xyz) const { return cM3d_Cross_CpsTri(cps, *this, xyz); } - bool Cross(cM3dGCyl const& cyl, cXyz* xyz) const { return this->cross(&cyl, xyz); } - bool Cross(cM3dGSph const& sph, cXyz* xyz) const { return cM3d_Cross_SphTri(&sph, this, xyz); } - bool Cross(cM3dGTri const& other, cXyz* xyz) const { + bool Cross(cM3dGCps const& cps, Vec* xyz) const { return cM3d_Cross_CpsTri(cps, *this, xyz); } + bool Cross(cM3dGCyl const& cyl, Vec* xyz) const { return this->cross(&cyl, xyz); } + bool Cross(cM3dGSph const& sph, Vec* xyz) const { return cM3d_Cross_SphTri(&sph, this, xyz); } + bool Cross(cM3dGTri const& other, Vec* xyz) const { return cM3d_Cross_TriTri(*this, other, xyz); } bool cross(const cM3dGLin* lin, Vec* xyz, bool param_2, bool param_3) const { |
