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));