tag_allmato almost, swhit0 treesh swball done, misc cleanup (#2312)

* d_a_tag_allmato almost done

* d_a_swhit0 done

* some SSystem cleanup

* treesh done

* swball done, some other rel cleanup
This commit is contained in:
TakaRikka
2025-03-01 04:48:49 -08:00
committed by GitHub
parent 80edf3c8a8
commit f06311cd09
54 changed files with 2162 additions and 1767 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ public:
public:
cBgS_Chk();
void SetExtChk(cBgS_Chk&);
bool ChkSameActorPid(unsigned int) const;
bool ChkSameActorPid(fpc_ProcID) const;
void SetActorPid(fpc_ProcID pid) { mActorPid = pid; }
fpc_ProcID GetActorPid() const { return mActorPid; }
@@ -34,7 +34,7 @@ public:
cBgS_GrpPassChk* GetGrpPassChk() const { return mGrpPassChk; }
void OffSameActorChk() { mSameActorChk = false; }
virtual ~cBgS_Chk(void);
virtual ~cBgS_Chk();
}; // Size: 0x14
#endif /* C_BG_S_CHK_H */
@@ -2,21 +2,22 @@
#define C_BG_S_POLY_INFO_H
#include "dolphin/types.h"
#include "f_pc/f_pc_manager.h"
class cBgS_PolyInfo {
private:
/* 0x00 */ u16 mPolyIndex;
/* 0x02 */ u16 mBgIndex;
/* 0x04 */ void* unk_0x04;
/* 0x08 */ unsigned int mActorId;
/* 0x08 */ fpc_ProcID mActorId;
public:
cBgS_PolyInfo();
bool ChkSetInfo() const;
void ClearPi();
void SetPolyInfo(const cBgS_PolyInfo&);
void SetActorInfo(int, void*, unsigned int);
bool ChkSafe(const void*, unsigned int) const;
void SetActorInfo(int, void*, fpc_ProcID);
bool ChkSafe(const void*, fpc_ProcID) const;
void SetPolyIndex(int);
bool ChkBgIndex() const;
+4
View File
@@ -211,6 +211,8 @@ public:
/* 8026476C */ virtual bool GetNVec(cXyz const&, cXyz*) const;
/* 80264808 */ virtual void getShapeAccess(cCcD_ShapeAttr::Shape*) const;
const cM3dGSph* GetShapeP() const { return this; }
}; // Size = 0x34
STATIC_ASSERT(0x34 == sizeof(cCcD_SphAttr));
@@ -243,6 +245,8 @@ public:
/* 802643D0 */ virtual bool GetNVec(cXyz const&, cXyz*) const;
/* 802644B8 */ virtual void getShapeAccess(cCcD_ShapeAttr::Shape*) const;
const cM3dGCyl* GetShapeP() const { return this; }
}; // Size = 0x38
STATIC_ASSERT(0x38 == sizeof(cCcD_CylAttr));
+10
View File
@@ -101,4 +101,14 @@ inline f32 cM3d_LenSq(const Vec* a, const Vec* b) {
return VECSquareDistance(a, b);
}
inline bool cM3d_Cross_LinSph(const cM3dGLin* lin_p, const cM3dGSph* sph_p) {
Vec sp10;
return cM3d_Cross_LinSph(lin_p, sph_p, &sp10);
}
inline bool cM3d_Cross_CylSph(const cM3dGCyl* cyl, const cM3dGSph* sph, Vec* out) {
f32 sp10;
return cM3d_Cross_CylSph(cyl, sph, out, &sp10);
}
#endif
+2
View File
@@ -26,7 +26,9 @@ public:
void CalcCenter(cXyz*) const;
void PlusR(f32);
const cXyz* GetMaxP(void) const { return &mMax; }
const cXyz* GetMaxP(void) { return &mMax; }
const cXyz* GetMinP(void) const { return &mMin; }
const 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; }
+6
View File
@@ -13,6 +13,12 @@ public:
f32 GetCy() const { return mPosY; }
f32 GetR() const { return mRadius; }
void Set(f32 pos_x, f32 pos_y, f32 radius) {
mPosX = pos_x;
mPosY = pos_y;
mRadius = radius;
}
cM2dGCir() {}
virtual ~cM2dGCir() {}
};
+5 -1
View File
@@ -34,6 +34,10 @@ public:
bool cross(const cM3dGLin* lin, Vec* xyz, bool param_2, bool param_3) const {
return cM3d_Cross_LinTri(lin, this, xyz, param_2, param_3);
}
void setUp() {
SetupFrom3Vtx(&mA, &mB, &mC);
}
};
#endif
#endif
+13
View File
@@ -0,0 +1,13 @@
#ifndef C_M3D_G_VTX_H_
#define C_M3D_G_VTX_H_
#include "SSystem/SComponent/c_xyz.h"
class cM3dGVtx {
public:
~cM3dGVtx();
cXyz vtx;
};
#endif
+7 -25
View File
@@ -97,37 +97,16 @@ struct cXyz : Vec {
void setall(f32 f) { set(f, f, f); }
void setMin(const cXyz& other) {
if (x > other.x) {
x = other.x;
}
if (y > other.y) {
y = other.y;
}
if (z > other.z) {
z = other.z;
}
}
void setMax(const cXyz& other) {
if (x < other.x) {
x = other.x;
}
if (y < other.y) {
y = other.y;
}
if (z < other.z) {
z = other.z;
}
}
void zero() { set(0.0f, 0.0f, 0.0f); }
float getSquareMag() const { return VECSquareMag(this); }
f32 getSquareMag() const { return VECSquareMag(this); }
f32 getSquareDistance(const Vec& other) const { return VECSquareDistance(this, &other); }
static float getNearZeroValue() { return 8e-11f; }
static f32 getNearZeroValue() { return 8e-11f; }
bool isNearZeroSquare() const { return (this->getSquareMag() < getNearZeroValue()); }
bool isNearZeroSquare(const cXyz& other) const { return (PSVECSquareMag(&other) < getNearZeroValue()); }
f32 abs2() const { return this->getSquareMag(); }
f32 abs2(const Vec& other) const { return this->getSquareDistance(other); }
f32 abs2XZ() const {
@@ -139,13 +118,16 @@ struct cXyz : Vec {
cXyz tmp2(other.x, 0, other.z);
return tmp.abs2(tmp2);
}
f32 abs() const { return sqrtf(this->abs2()); }
f32 abs(const Vec& other) const { return sqrtf(this->abs2(other)); }
f32 absXZ() const { return sqrtf(this->abs2XZ()); }
f32 absXZ(const Vec& other) const { return sqrtf(this->abs2XZ(other)); }
f32 getMagXZ() const { return cXyz(this->x, 0, this->z).getSquareMag(); }
f32 getDotProduct(const Vec& other) const { return VECDotProduct(this, &other); }
f32 inprod(const Vec& other) const { return getDotProduct(other); }
f32 inprodXZ(const Vec& other) const { return x * other.x + z * other.z; }
};