mirror of
https://github.com/zeldaret/tp
synced 2026-07-10 15:13:54 -04:00
cc debug work (#3133)
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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); }
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user