From e2d51bf9564c60435cfd5ee3fc05adddc8db04c7 Mon Sep 17 00:00:00 2001 From: TakaRikka <38417346+TakaRikka@users.noreply.github.com> Date: Wed, 25 Oct 2023 13:16:56 -0700 Subject: d_envse mostly OK. more work on kankyo_rain (#1969) * d_envse OK, work on kankyo_rain * remove asm --- include/SSystem/SComponent/c_bg_s_gnd_chk.h | 1 - include/SSystem/SComponent/c_m3d.h | 5 +++++ include/SSystem/SComponent/c_m3d_g_lin.h | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'include/SSystem/SComponent') diff --git a/include/SSystem/SComponent/c_bg_s_gnd_chk.h b/include/SSystem/SComponent/c_bg_s_gnd_chk.h index f4446c0786..b000324ee1 100644 --- a/include/SSystem/SComponent/c_bg_s_gnd_chk.h +++ b/include/SSystem/SComponent/c_bg_s_gnd_chk.h @@ -19,7 +19,6 @@ public: const cXyz& GetPointP() { return m_pos; } u32 GetWallPrecheck() const { return mWallPrecheck; } -private: /* 0x24 */ cXyz m_pos; /* 0x30 */ u32 mFlags; /* 0x34 */ f32 mNowY; diff --git a/include/SSystem/SComponent/c_m3d.h b/include/SSystem/SComponent/c_m3d.h index 23ad25f582..31d5715c8e 100644 --- a/include/SSystem/SComponent/c_m3d.h +++ b/include/SSystem/SComponent/c_m3d.h @@ -3,6 +3,7 @@ #include "MSL_C/math.h" #include "dolphin/types.h" +#include "dolphin/mtx/vec.h" class cM3dGAab; class cM3dGCps; @@ -95,4 +96,8 @@ inline bool cM3d_IsZero_inverted(f32 param_0) { return !(fabsf(param_0) < G_CM3D_F_ABS_MIN); } +inline f32 cM3d_LenSq(const Vec* a, const Vec* b) { + return VECSquareDistance(a, b); +} + #endif \ No newline at end of file diff --git a/include/SSystem/SComponent/c_m3d_g_lin.h b/include/SSystem/SComponent/c_m3d_g_lin.h index 096ad4ce90..640c872f5b 100644 --- a/include/SSystem/SComponent/c_m3d_g_lin.h +++ b/include/SSystem/SComponent/c_m3d_g_lin.h @@ -20,6 +20,8 @@ public: void CalcPos(Vec*, f32) const; void CalcVec(Vec* pOut) const { VECSubtract(&this->mEnd, &this->mStart, pOut); } void SetEnd(const cXyz&); + + void set(const Vec& i_start, const Vec& i_end) { SetStartEnd(i_start, i_end); } const cXyz& GetStartP(void) const { return mStart; } cXyz& GetStartP(void) { return mStart; } const cXyz& GetEndP(void) const { return mEnd; } -- cgit v1.2.3