d_bg_s almost done

This commit is contained in:
LagoLunatic
2023-12-16 00:48:26 -05:00
parent 0b64eb7d7e
commit af28c5dfa1
6 changed files with 107 additions and 29 deletions
+12 -1
View File
@@ -42,7 +42,7 @@ public:
virtual ~cBgS_PolyInfo() {}
s32 GetPolyIndex() const { return mPolyIndex; }
s32 GetBgIndex() const { return mBgIndex; }
u16 GetBgIndex() const { return mBgIndex; }
bool ChkSetInfo() const {
if (mPolyIndex == 0xFFFF || mBgIndex == 0x100) {
return false;
@@ -50,6 +50,17 @@ public:
return true;
}
bool ChkBgIndex() const {
if (mBgIndex == 0x100) {
return false;
}
return true;
}
// TODO
void ChkSafe(const void*, unsigned int) const {}
void ChkSetInf() const {}
void SetPolyIndex(int) {}
}; // Size: 0x10
STATIC_ASSERT(sizeof(cBgS_PolyInfo) == 0x10);
+1 -1
View File
@@ -189,7 +189,7 @@ public:
void ChkLock() {}
bool ChkMoveBg() { return mFlags & MOVE_BG_e; }
void ChkNoCalcVtx() {}
bool ChkPriority(int prio) { return mWallCorrectPriority == prio; }
BOOL ChkPriority(int prio) { return mWallCorrectPriority == prio; }
void ChkRoofRegist() {}
void ChkThrough() {}
void ChkWallRegist() {}
+19 -5
View File
@@ -2,6 +2,7 @@
#define C_M3D_G_CYL_H
#include "SSystem/SComponent/c_xyz.h"
#include "SSystem/SComponent/c_m3d_g_cps.h"
#include "global.h"
// Cylinder
@@ -18,26 +19,39 @@ public:
/* 0x00 */ cXyz mCenter;
/* 0x0C */ f32 mRadius;
/* 0x10 */ f32 mHeight;
/* 0x14 vtable */
/* 0x14 */ /* vtable */
public:
cM3dGCyl() {}
cM3dGCyl(const cXyz*, f32, f32);
virtual ~cM3dGCyl() {}
void SetC(const cXyz& pos);
void SetH(f32 h);
void SetR(f32 r);
inline void Set(const cM3dGCylS & src) {
void Set(const cM3dGCylS & src) {
SetC(src.mCenter);
SetR(src.mRadius);
SetH(src.mHeight);
}
void Set(const cXyz& center, f32 radius, f32 height) {
SetC(center);
SetR(radius);
SetH(height);
}
bool cross(const cM3dGSph*, cXyz*) const;
bool cross(const cM3dGCyl*, cXyz*) const;
bool cross(const cM3dGSph*, f32*) const;
bool cross(const cM3dGCyl*, f32*) const;
const cXyz* GetCP(void) const { return &mCenter; }
f32 GetR(void) const { return mRadius; }
f32 GetH(void) const { return mHeight; }
const cXyz* GetCP() const { return &mCenter; }
f32 GetR() const { return mRadius; }
f32 GetH() const { return mHeight; }
cXyz& GetC() { return mCenter; }
void Cross(const cM3dGCps*, cXyz*) const {}
void Cross(const cM3dGTri&, cXyz*) const {}
void GetC() const {}
void GetCP() {}
void GetRP() {}
}; // Size = 0x18
STATIC_ASSERT(0x18 == sizeof(cM3dGCyl));
+35 -1
View File
@@ -101,7 +101,7 @@ public:
f32 RoofChk(dBgS_RoofChk*);
bool SplGrpChk(dBgS_SplGrpChk*);
bool SphChk(dBgS_SphChk*, void*);
void WallCrrPos(dBgS_CrrPos*);
bool WallCrrPos(dBgS_CrrPos*);
void MoveBgCrrPos(cBgS_PolyInfo&, bool, cXyz*, csXyz*, csXyz*);
void MoveBgTransPos(cBgS_PolyInfo&, bool, cXyz*, csXyz*, csXyz*);
void MoveBgMatrixCrrPos(cBgS_PolyInfo&, bool, cXyz*, csXyz*, csXyz*);
@@ -134,6 +134,40 @@ public:
field_0x38 &= ~8;
}
void ChkXCrr() {}
void ChkZCrr() {}
void ClrPosVec() {
field_0x4c.x = field_0x4c.y = field_0x4c.z = 0.0f;
}
void ClrWallHit() {}
void ClrXCrr() {}
void ClrZCrr() {}
void GetCylP() const {}
void GetGroundH() const {}
void GetOldPos() const {}
cXyz* GetPos() const { return pm_pos; }
cXyz& GetPosVec() { return field_0x4c; }
void GetWallH() const {}
void GetWallR() const {}
void Set(cXyz*, cXyz*, unsigned int, cXyz*) {}
void SetCyl() {
mCyl1.Set(*pm_pos, field_0x40, field_0x3c * 2.0f);
}
void SetLin() {
mLin.SetStartEnd(*mpLine0, *pm_pos);
}
void SetOldCyl() {
mCyl0.Set(*mpLine0, field_0x40, field_0x3c * 2.0f);
}
void SetWall(f32, f32) {}
void SetWallActorInfo(int bg_index, void* bgw, unsigned int actor_id) {
SetActorInfo(bg_index, bgw, actor_id);
}
void SetWallHit() {}
void SetWallPolyIndex(int) {}
void SetXCrr() {}
void SetZCrr() {}
/* 0x038 */ u32 field_0x38;
/* 0x03C */ f32 field_0x3c;
/* 0x040 */ f32 field_0x40;
+1 -1
View File
@@ -47,7 +47,7 @@ public:
void RwgWallCrrPos(u16, dBgS_CrrPos*);
void WallCrrPosRp(dBgS_CrrPos*, int);
void WallCrrPosGrpRp(dBgS_CrrPos*, int, int);
void WallCrrPos(dBgS_CrrPos*);
bool WallCrrPos(dBgS_CrrPos*);
void ChangeAttributeCodeByPathPntNo(int, u32);
virtual ~dBgW() {}