From e93bb0a65cca22f2f0063dc6aeeb57a1e7420164 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 20 Jan 2024 10:35:03 -0800 Subject: [PATCH] c_bg_w match --- configure.py | 2 +- include/SSystem/SComponent/c_bg_w.h | 8 +------- include/SSystem/SComponent/c_bg_w_tri_elm.h | 13 +++++++++++++ src/SSystem/SComponent/c_bg_w.cpp | 6 +++--- 4 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 include/SSystem/SComponent/c_bg_w_tri_elm.h diff --git a/configure.py b/configure.py index 385bf22e3..c4754cc55 100644 --- a/configure.py +++ b/configure.py @@ -531,7 +531,7 @@ config.libs = [ Object(Matching, "SSystem/SComponent/c_bg_s_chk.cpp"), Object(Matching, "SSystem/SComponent/c_bg_s_gnd_chk.cpp"), Object(Matching, "SSystem/SComponent/c_bg_s_lin_chk.cpp"), - Object(NonMatching, "SSystem/SComponent/c_bg_w.cpp"), + Object(Matching, "SSystem/SComponent/c_bg_w.cpp"), Object(Matching, "SSystem/SComponent/c_m2d.cpp"), Object(Matching, "SSystem/SComponent/c_m2d_g_box.cpp"), Object(NonMatching, "SSystem/SComponent/c_m3d.cpp"), diff --git a/include/SSystem/SComponent/c_bg_w.h b/include/SSystem/SComponent/c_bg_w.h index 58b2fe80b..d359b55ce 100644 --- a/include/SSystem/SComponent/c_bg_w.h +++ b/include/SSystem/SComponent/c_bg_w.h @@ -6,6 +6,7 @@ #include "SSystem/SComponent/c_sxyz.h" #include "SSystem/SComponent/c_m3d_g_aab.h" #include "SSystem/SComponent/c_m3d_g_pla.h" +#include "SSystem/SComponent/c_bg_w_tri_elm.h" #include "dolphin/mtx/mtx.h" class cBgW_BgId { @@ -120,13 +121,6 @@ public: /* 0x04 */ u16 ground; }; -class cBgW_TriElm { -public: - /* 0x00 */ cM3dGPla m_plane; - - virtual ~cBgW_TriElm() {} -}; - class cBgW_GrpElm { public: virtual ~cBgW_GrpElm() {} diff --git a/include/SSystem/SComponent/c_bg_w_tri_elm.h b/include/SSystem/SComponent/c_bg_w_tri_elm.h new file mode 100644 index 000000000..cfe19ec71 --- /dev/null +++ b/include/SSystem/SComponent/c_bg_w_tri_elm.h @@ -0,0 +1,13 @@ +#ifndef C_BG_W_TRI_ELM_H +#define C_BG_W_TRI_ELM_H + +#include "SSystem/SComponent/c_m3d_g_pla.h" + +class cBgW_TriElm { +public: + /* 0x00 */ cM3dGPla m_plane; + + virtual ~cBgW_TriElm() {} +}; + +#endif diff --git a/src/SSystem/SComponent/c_bg_w.cpp b/src/SSystem/SComponent/c_bg_w.cpp index 45ed03778..2844d6b22 100644 --- a/src/SSystem/SComponent/c_bg_w.cpp +++ b/src/SSystem/SComponent/c_bg_w.cpp @@ -632,9 +632,9 @@ void cBgW::Move() { if (!ChkFlush()) return; } else { - mTransVel.x = mCurMtx[0][3] - (*pm_base)[0][3]; - mTransVel.y = mCurMtx[1][3] - (*pm_base)[1][3]; - mTransVel.z = mCurMtx[2][3] - (*pm_base)[2][3]; + mTransVel.x = (*pm_base)[0][3] - mCurMtx[0][3]; + mTransVel.y = (*pm_base)[1][3] - mCurMtx[1][3]; + mTransVel.z = (*pm_base)[2][3] - mCurMtx[2][3]; mbNeedsFullTransform = false; }