diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2024-06-15 10:09:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-15 11:09:55 -0600 |
| commit | 3c82015f69403d22f7ee3809425cb217f5bdc3b5 (patch) | |
| tree | 4cc0975f6a485b0679ca01b11c10d3b682c6f5f7 /include | |
| parent | 569d183b2cd27d1bdd8af2e8257256b27d939a90 (diff) | |
d_bg_w done (#2169)
* ClassifyPlane matched
* d_bg_w full match
* remove asm
Diffstat (limited to 'include')
| -rw-r--r-- | include/SSystem/SComponent/c_m3d.h | 2 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_m3d_g_pla.h | 5 | ||||
| -rw-r--r-- | include/d/bg/d_bg_s_acch.h | 23 | ||||
| -rw-r--r-- | include/d/bg/d_bg_w.h | 4 | ||||
| -rw-r--r-- | include/d/bg/d_bg_w_base.h | 2 | ||||
| -rw-r--r-- | include/d/bg/d_bg_w_kcol.h | 2 |
6 files changed, 30 insertions, 8 deletions
diff --git a/include/SSystem/SComponent/c_m3d.h b/include/SSystem/SComponent/c_m3d.h index e68ed1e2a8..0855f6d908 100644 --- a/include/SSystem/SComponent/c_m3d.h +++ b/include/SSystem/SComponent/c_m3d.h @@ -17,7 +17,7 @@ class cXyz; struct cM3d_Range; struct Vec; -extern f32 G_CM3D_F_ABS_MIN; +extern const f32 G_CM3D_F_ABS_MIN; static void cM3d_InDivPos1(const Vec*, const Vec*, f32, Vec*); void cM3d_InDivPos2(const Vec*, const Vec*, f32, Vec*); diff --git a/include/SSystem/SComponent/c_m3d_g_pla.h b/include/SSystem/SComponent/c_m3d_g_pla.h index 2eeb39c25f..568f46f6dc 100644 --- a/include/SSystem/SComponent/c_m3d_g_pla.h +++ b/include/SSystem/SComponent/c_m3d_g_pla.h @@ -19,13 +19,12 @@ public: bool getCrossY(const cXyz&, f32*) const; bool getCrossYLessD(const Vec&, f32*) const; void Set(const cM3dGPla*); - void GetNP(); virtual ~cM3dGPla() {} f32 getPlaneFunc(const Vec* pPoint) const { return mD + VECDotProduct(&mNormal, pPoint); } - const cXyz& GetNP() const { return mNormal; } - const cXyz* i_GetNP() const { return &mNormal; } + cXyz* GetNP() { return &mNormal; } + const cXyz* GetNP() const { return &mNormal; } f32 GetD() const { return mD; } void SetupFrom3Vtx(const Vec* v1, const Vec* v2, const Vec* v3) { cM3d_CalcPla(v1, v2, v3, &mNormal, &mD); diff --git a/include/d/bg/d_bg_s_acch.h b/include/d/bg/d_bg_s_acch.h index 02b0555962..c410a680ea 100644 --- a/include/d/bg/d_bg_s_acch.h +++ b/include/d/bg/d_bg_s_acch.h @@ -8,6 +8,7 @@ #include "d/bg/d_bg_s_gnd_chk.h" #include "d/bg/d_bg_s_roof_chk.h" #include "d/bg/d_bg_s_wtr_chk.h" +#include "JSystem/JUtility/JUTAssert.h" class fopAc_ac_c; @@ -47,6 +48,12 @@ public: void ClrWallHDirect() { m_flags &= ~WALL_H_DIRECT; } bool ChkWallHit() { return m_flags & WALL_HIT; } s16 GetWallAngleY() { return m_wall_angle_y; } + bool ChkWallHDirect() { return m_flags & WALL_H_DIRECT; } + f32 GetWallHDirect() { return m_wall_h_direct; } + f32 GetWallRR() { return m_wall_rr; } + void SetWallHit() { m_flags |= WALL_HIT; } + void SetWallAngleY(s16 i_angle) { m_wall_angle_y = i_angle; } + cM3dGCir* GetCirP() { return &m_cir; } void SetCir(cXyz& pos) { m_cir.Set(pos.x, pos.z, pos.y + GetWallH(), m_wall_r); } }; // Size: 0x40 @@ -166,7 +173,23 @@ public: void SetWallNone() { m_flags |= WALL_NONE; } void OnLineCheckHit() { m_flags |= LINE_CHECK_HIT; } cM3dGCyl* GetWallBmdCylP() { return &m_wall_cyl; } + fopAc_ac_c* getMyAc() { return m_my_ac; } + + cM3dGCir* GetWallCirP(int index) { + JUT_ASSERT(index <= m_tbl_size); + return pm_acch_cir[index].GetCirP(); + } + f32 GetWallH(int i_no) { return pm_acch_cir[i_no].GetWallH(); } + f32 GetWallR(int i_no) { return pm_acch_cir[i_no].GetWallR(); } + bool ChkWallHDirect(int i_no) { return pm_acch_cir[i_no].ChkWallHDirect(); } + f32 GetWallHDirect(int i_no) { return pm_acch_cir[i_no].GetWallHDirect(); } + f32 GetWallRR(int i_no) { return pm_acch_cir[i_no].GetWallRR(); } + void SetWallCirHit(int i_no) { pm_acch_cir[i_no].SetWallHit(); } + void SetWallAngleY(int i_no, s16 i_angle) { pm_acch_cir[i_no].SetWallAngleY(i_angle); } + + f32 GetCx() const { return pm_pos->x; } + f32 GetCz() const { return pm_pos->z; } // inline dupe void i_ClrGroundHit() { m_flags &= ~GROUND_HIT; } diff --git a/include/d/bg/d_bg_w.h b/include/d/bg/d_bg_w.h index 85ea2160b4..4ca8f91446 100644 --- a/include/d/bg/d_bg_w.h +++ b/include/d/bg/d_bg_w.h @@ -171,7 +171,7 @@ public: /* 8007B084 */ virtual void ShdwDraw(cBgS_ShdwDraw*); virtual void CaptPoly(dBgS_CaptPoly&) = 0; virtual bool WallCorrect(dBgS_Acch*) = 0; - virtual void WallCorrectSort(dBgS_Acch*) = 0; + virtual bool WallCorrectSort(dBgS_Acch*) = 0; virtual bool RoofChk(dBgS_RoofChk*) = 0; virtual bool SplGrpChk(dBgS_SplGrpChk*) = 0; virtual bool SphChk(dBgS_SphChk*, void*) = 0; @@ -276,7 +276,7 @@ public: /* 8007E4A4 */ virtual void OffMoveFlag(); /* 8007DAF8 */ virtual void CaptPoly(dBgS_CaptPoly&); /* 8007C484 */ virtual bool WallCorrect(dBgS_Acch*); - /* 8007C910 */ virtual void WallCorrectSort(dBgS_Acch*); + /* 8007C910 */ virtual bool WallCorrectSort(dBgS_Acch*); /* 8007D470 */ virtual bool RoofChk(dBgS_RoofChk*); /* 8007D830 */ virtual bool SplGrpChk(dBgS_SplGrpChk*); /* 8007DF00 */ virtual bool SphChk(dBgS_SphChk*, void*); diff --git a/include/d/bg/d_bg_w_base.h b/include/d/bg/d_bg_w_base.h index c8260c2b83..587829898d 100644 --- a/include/d/bg/d_bg_w_base.h +++ b/include/d/bg/d_bg_w_base.h @@ -50,7 +50,7 @@ public: virtual void ShdwDraw(cBgS_ShdwDraw*) = 0; virtual void CaptPoly(dBgS_CaptPoly&) = 0; virtual bool WallCorrect(dBgS_Acch*) = 0; - virtual void WallCorrectSort(dBgS_Acch*) = 0; + virtual bool WallCorrectSort(dBgS_Acch*) = 0; virtual bool RoofChk(dBgS_RoofChk*) = 0; virtual bool SplGrpChk(dBgS_SplGrpChk*) = 0; virtual bool SphChk(dBgS_SphChk*, void*) = 0; diff --git a/include/d/bg/d_bg_w_kcol.h b/include/d/bg/d_bg_w_kcol.h index 23a8531c0c..ee842966cb 100644 --- a/include/d/bg/d_bg_w_kcol.h +++ b/include/d/bg/d_bg_w_kcol.h @@ -71,7 +71,7 @@ public: /* 8007F9A4 */ virtual void ShdwDraw(cBgS_ShdwDraw*); /* 8007FF1C */ virtual void CaptPoly(dBgS_CaptPoly&); /* 800811A0 */ virtual bool WallCorrect(dBgS_Acch*); - /* 80080330 */ virtual void WallCorrectSort(dBgS_Acch*); + /* 80080330 */ virtual bool WallCorrectSort(dBgS_Acch*); /* 80081E18 */ virtual bool RoofChk(dBgS_RoofChk*); /* 80082184 */ virtual bool SplGrpChk(dBgS_SplGrpChk*); /* 800824EC */ virtual bool SphChk(dBgS_SphChk*, void*); |
