d_bg_w progress

This commit is contained in:
LagoLunatic
2025-03-06 01:12:50 -05:00
parent a80f464ab7
commit d882c16b55
28 changed files with 362 additions and 93 deletions
-3
View File
@@ -1,12 +1,9 @@
#ifndef C_BG_S_CHK_H
#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 {};
class cBgS_GrpPassChk {
public:
virtual ~cBgS_GrpPassChk() {}
@@ -7,6 +7,7 @@
#include "global.h"
class cBgW;
class cBgS_PolyInfo {
private:
/* 0x00 */ u16 mPolyIndex;
+9 -8
View File
@@ -33,7 +33,7 @@ public:
}
};
struct cBgD_Vtx_t;
struct cBgD_Vtx_t : public Vec {};
struct cBgD_Blk_t {
/* 0x00 */ u16 startTri;
@@ -201,6 +201,7 @@ public:
BOOL ChkPriority(int prio) { return mWallCorrectPriority == prio; }
Mtx* GetBaseMtxP() { return pm_base; }
void SetBaseMtxP(Mtx* mtx_p) { pm_base = mtx_p; }
u32 GetPolyInfId(int poly_index) const {
JUT_ASSERT(0x2f1, 0 <= poly_index && poly_index < pm_bgd->m_t_num);
return pm_bgd->m_t_tbl[poly_index].id;
@@ -222,8 +223,8 @@ public:
return pm_bgd->m_ti_tbl[id].mPolyInf3;
}
int GetVtxNum() const { return pm_bgd->m_v_num; }
Vec* GetVtxTbl() const { return pm_vtx_tbl; }
void SetVtxTbl(Vec* v) { pm_vtx_tbl = v; }
cBgD_Vtx_t* GetVtxTbl() const { return pm_vtx_tbl; }
void SetVtxTbl(Vec* v) { pm_vtx_tbl = (cBgD_Vtx_t*)v; }
bool GroundCross(cBgS_GndChk* chk) {
return GroundCrossGrpRp(chk, m_rootGrpIdx, 1);
}
@@ -231,6 +232,10 @@ public:
return LineCheckGrpRp(chk, m_rootGrpIdx, 1);
}
void ShdwDraw(cBgS_ShdwDraw* shdw) {
ShdwDrawGrpRp(shdw, m_rootGrpIdx);
}
void GetOldInvMtx(Mtx) const {}
bool ChkFlush() { return mIgnorePlaneType & 8; }
void ChkGroundRegist() {}
@@ -238,10 +243,6 @@ public:
void ChkThrough() {}
void ChkWallRegist() {}
void OffRoofRegist() {}
void SetBaseMtxP(Mtx* mtx_p) { pm_base = mtx_p; }
void ShdwDraw(cBgS_ShdwDraw* shdw) {
ShdwDrawGrpRp(shdw, m_rootGrpIdx);
}
virtual ~cBgW();
virtual u32 GetGrpToRoomIndex(int) const;
@@ -264,7 +265,7 @@ public:
/* 0x7C */ cXyz mTransVel;
/* 0x88 */ cBgW_TriElm* pm_tri;
/* 0x8C */ cBgW_RwgElm* pm_rwg;
/* 0x90 */ Vec* pm_vtx_tbl;
/* 0x90 */ cBgD_Vtx_t* pm_vtx_tbl;
/* 0x94 */ cBgD_t* pm_bgd;
/* 0x98 */ cBgW_BlkElm* pm_blk;
/* 0x9C */ cBgW_GrpElm* pm_grp;
+2
View File
@@ -332,6 +332,8 @@ private:
/* 0x00 vtable */
}; // Size = 0x4
STATIC_ASSERT(sizeof(cCcD_GStts) == 0x4);
class cCcD_Stts {
private:
/* 0x00 */ cXyz m_cc_move;
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef C_M2D_H
#define C_M2D_H
#include "dolphin/types.h"
#include "global.h"
struct cM2dGCir;
+6
View File
@@ -52,6 +52,12 @@ struct cM3d_Range {
f32 end;
};
inline f32 cM3d_Len2dSq(f32 x0, f32 y0, f32 x1, f32 y1) {
f32 x = x0 - x1;
f32 y = y0 - y1;
return x*x + y*y;
}
void cM3d_InDivPos1(const Vec*, const Vec*, f32, Vec*);
void cM3d_InDivPos2(const Vec*, const Vec*, f32, Vec*);
bool cM3d_Len2dSqPntAndSegLine(f32, f32, f32, f32, f32, f32, f32*, f32*, f32*);
+7 -3
View File
@@ -1,7 +1,7 @@
#ifndef C_M3D_G_CIR_H
#define C_M3D_G_CIR_H
#include "dolphin/types.h"
#include "global.h"
class cM2dGCir {
public:
@@ -20,7 +20,9 @@ public:
cM2dGCir() {}
virtual ~cM2dGCir() {}
};
}; // Size: 0x10
STATIC_ASSERT(sizeof(cM2dGCir) == 0x10);
class cM3dGCir : public cM2dGCir {
f32 mPosZ;
@@ -32,6 +34,8 @@ public:
cM2dGCir::Set(x, y, r);
mPosZ = z;
}
};
}; // Size: 0x14
STATIC_ASSERT(sizeof(cM3dGCir) == 0x14);
#endif /* C_M3D_G_CIR_H */
+3
View File
@@ -4,6 +4,7 @@
#include "SSystem/SComponent/c_xyz.h"
#include "SSystem/SComponent/c_m3d.h"
#include "dolphin/mtx/vec.h"
#include "global.h"
// Plane with a normal
class cM3dGPla {
@@ -61,4 +62,6 @@ public:
cM3dGPla(const cXyz*, f32) {}
}; // Size: 0x14
STATIC_ASSERT(sizeof(cM3dGPla) == 0x14);
#endif
+3 -1
View File
@@ -45,7 +45,9 @@ public:
cXyz temp;
return cM3d_Cross_CylSph(cyl, this, &temp, out);
}
void cross(const cM3dGTri*) const {}
bool cross(const cM3dGTri *param_1) const {
return cM3d_Cross_SphTri(this, param_1);
}
const cXyz& GetC() const { return mCenter; }
cXyz& GetC() { return mCenter; }
const cXyz* GetCP() const { return &mCenter; }
+1 -1
View File
@@ -61,7 +61,7 @@ public:
void setUp() {
SetupFrom3Vtx(&mA, &mB, &mC);
}
~cM3dGTri() {}
virtual ~cM3dGTri() {}
}; // Size: 0x38
#endif