From 660a5ac6992b1224fab5bcc6b24f6c576f400136 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Sat, 24 Aug 2024 12:39:21 -0400 Subject: [PATCH] cc cleanup --- include/SSystem/SComponent/c_cc_d.h | 26 ++++++++++++------------ include/SSystem/SComponent/c_m3d_g_aab.h | 20 +++++++++--------- include/SSystem/SComponent/c_m3d_g_cir.h | 4 ++-- include/SSystem/SComponent/c_m3d_g_cps.h | 4 ++-- include/SSystem/SComponent/c_m3d_g_sph.h | 8 ++++---- include/d/d_cc_d.h | 16 ++++----------- include/d/d_cc_s.h | 5 ----- src/SSystem/SComponent/c_cc_d.cpp | 14 ++++++------- 8 files changed, 42 insertions(+), 55 deletions(-) diff --git a/include/SSystem/SComponent/c_cc_d.h b/include/SSystem/SComponent/c_cc_d.h index a01a7f9ff..bd8a4e567 100644 --- a/include/SSystem/SComponent/c_cc_d.h +++ b/include/SSystem/SComponent/c_cc_d.h @@ -353,11 +353,11 @@ class cCcD_GStts { class cCcD_Stts { private: /* 0x00 */ cXyz m_cc_move; - /* 0x0C */ fopAc_ac_c* mActor; - /* 0x10 */ fpc_ProcID mApid; - /* 0x14 */ u8 mWeight; + /* 0x0C */ fopAc_ac_c* mp_actor; + /* 0x10 */ fpc_ProcID m_apid; + /* 0x14 */ u8 m_weight; /* 0x15 */ u8 field_0x15; - /* 0x16 */ u8 mDmg; + /* 0x16 */ u8 m_dmg; /* 0x18 */ /* vtable */ public: @@ -371,18 +371,18 @@ class cCcD_Stts { void ClrCcMove() { m_cc_move.x = m_cc_move.y = m_cc_move.z = 0.0f; } - void PlusDmg(int dmg) { mDmg = dmg; } - u8 GetDmg() { return mDmg; } - f32 GetWeightF() const { return (s32)mWeight; } - u8 GetWeightUc() const { return mWeight; } - void SetWeight(u8 weight) { mWeight = weight; } + void PlusDmg(int dmg) { m_dmg = dmg; } + u8 GetDmg() { return m_dmg; } + f32 GetWeightF() const { return (s32)m_weight; } + u8 GetWeightUc() const { return m_weight; } + void SetWeight(u8 weight) { m_weight = weight; } virtual void ClrAt() {} - virtual void ClrTg() { mDmg = 0; } + virtual void ClrTg() { m_dmg = 0; } - fopAc_ac_c* GetActor() const { return mActor; } - void SetActor(void* ac) { mActor = (fopAc_ac_c*)ac; } + fopAc_ac_c* GetActor() const { return mp_actor; } + void SetActor(void* ac) { mp_actor = (fopAc_ac_c*)ac; } cXyz* GetCCMoveP() { return &m_cc_move; } - fpc_ProcID GetApid() const { return mApid; } + fpc_ProcID GetApid() const { return m_apid; } }; // Size = 0x1C STATIC_ASSERT(0x1C == sizeof(cCcD_Stts)); diff --git a/include/SSystem/SComponent/c_m3d_g_aab.h b/include/SSystem/SComponent/c_m3d_g_aab.h index a449ee0c3..33a936835 100644 --- a/include/SSystem/SComponent/c_m3d_g_aab.h +++ b/include/SSystem/SComponent/c_m3d_g_aab.h @@ -26,16 +26,16 @@ class cM3dGAab { } void SetMin(const cXyz&); void SetMax(const cXyz&); - const cXyz* GetMaxP(void) const { return &mMax; } - const cXyz* GetMinP(void) const { return &mMin; } - cXyz* GetMaxP(void) { return &mMax; } - cXyz* GetMinP(void) { return &mMin; } - const f32 GetMaxX(void) const { return mMax.x; } - const f32 GetMaxY(void) const { return mMax.y; } - const f32 GetMaxZ(void) const { return mMax.z; } - const f32 GetMinX(void) const { return mMin.x; } - const f32 GetMinY(void) const { return mMin.y; } - const f32 GetMinZ(void) const { return mMin.z; } + const cXyz* GetMaxP() const { return &mMax; } + const cXyz* GetMinP() const { return &mMin; } + cXyz* GetMaxP() { return &mMax; } + cXyz* GetMinP() { return &mMin; } + const f32 GetMaxX() const { return mMax.x; } + const f32 GetMaxY() const { return mMax.y; } + const f32 GetMaxZ() const { return mMax.z; } + const f32 GetMinX() const { return mMin.x; } + const f32 GetMinY() const { return mMin.y; } + const f32 GetMinZ() const { return mMin.z; } bool Cross(const cM3dGAab *aab) { return cM3d_Cross_AabAab(this, aab); } diff --git a/include/SSystem/SComponent/c_m3d_g_cir.h b/include/SSystem/SComponent/c_m3d_g_cir.h index 2a5560005..798e2c52a 100644 --- a/include/SSystem/SComponent/c_m3d_g_cir.h +++ b/include/SSystem/SComponent/c_m3d_g_cir.h @@ -26,8 +26,8 @@ class cM3dGCir : public cM2dGCir { f32 mPosZ; public: - cM3dGCir(void) {} - virtual ~cM3dGCir(void) {} + cM3dGCir() {} + virtual ~cM3dGCir() {} void Set(f32 x, f32 y, f32 z, f32 r) { cM2dGCir::Set(x, y, r); mPosZ = z; diff --git a/include/SSystem/SComponent/c_m3d_g_cps.h b/include/SSystem/SComponent/c_m3d_g_cps.h index 06e32390a..d85160958 100644 --- a/include/SSystem/SComponent/c_m3d_g_cps.h +++ b/include/SSystem/SComponent/c_m3d_g_cps.h @@ -16,8 +16,8 @@ class cM3dGCps : public cM3dGLin { public: /* 0x1C */ f32 mRadius; - cM3dGCps(void) {} - virtual ~cM3dGCps(void) {} + cM3dGCps() {} + virtual ~cM3dGCps() {} void Set(const cXyz& start, const cXyz& end, f32 radius) { SetStartEnd(start, end); SetR(radius); diff --git a/include/SSystem/SComponent/c_m3d_g_sph.h b/include/SSystem/SComponent/c_m3d_g_sph.h index 99f877402..ba466ebd6 100644 --- a/include/SSystem/SComponent/c_m3d_g_sph.h +++ b/include/SSystem/SComponent/c_m3d_g_sph.h @@ -47,10 +47,10 @@ class cM3dGSph { cXyz& GetC() { return mCenter; } const cXyz* GetCP() const { return &mCenter; } cXyz* GetCP() { return &mCenter; } - const f32 GetR(void) const { return mRadius; } - f32 GetCX(void) const { return mCenter.x; } - f32 GetCY(void) const { return mCenter.y; } - f32 GetCZ(void) const { return mCenter.z; } + const f32 GetR() const { return mRadius; } + f32 GetCX() const { return mCenter.x; } + f32 GetCY() const { return mCenter.y; } + f32 GetCZ() const { return mCenter.z; } }; // Size = 0x14 STATIC_ASSERT(0x14 == sizeof(cM3dGSph)); diff --git a/include/d/d_cc_d.h b/include/d/d_cc_d.h index 92eb279cb..c52c830fd 100644 --- a/include/d/d_cc_d.h +++ b/include/d/d_cc_d.h @@ -70,7 +70,7 @@ struct dCcD_SrcGObjAt { /* 0x0 */ u8 mSe; // Sound Effect ID /* 0x1 */ u8 mHitMark; // Hit Mark particle ID /* 0x2 */ u8 mSpl; - /* 0x3 */ u8 mMtrl; + /* 0x3 */ u8 mMtrl; // Seems to be unused and always 0 in TWW /* 0x4 */ dCcD_SrcGAtTgCoCommonBase mBase; }; // Size: 0x8 @@ -78,7 +78,7 @@ struct dCcD_SrcGObjTg { /* 0x0 */ u8 mSe; // Sound Effect ID /* 0x1 */ u8 mHitMark; // Hit Mark particle ID /* 0x2 */ u8 mSpl; - /* 0x3 */ u8 mMtrl; + /* 0x3 */ u8 mMtrl; // Seems to be unused and always 0 in TWW /* 0x4 */ dCcD_SrcGAtTgCoCommonBase mBase; }; // Size: 0x8 @@ -242,11 +242,9 @@ class dCcD_GObjAt : public dCcD_GAtTgCoCommonBase { cXyz* GetVecP() { return &mVec; } void SetHitMark(u8 mark) { mHitMark = mark; } void SetSe(u8 se) { mSe = se; } - void SetMtrl(u8 mtrl) { mMtrl = mtrl; } void SetSpl(dCcG_At_Spl spl) { mSpl = spl; } u8 GetSe() { return mSe; } u8 GetSpl() { return mSpl; } - u8 GetMtrl() { return mMtrl; } u8 GetHitMark() { return mHitMark; } void SetRVec(cXyz& vec) { mRVec = vec; } void SetHitPos(cXyz& pos) { mHitPos = pos; } @@ -255,7 +253,7 @@ class dCcD_GObjAt : public dCcD_GAtTgCoCommonBase { // private: /* 0x1C */ u8 mSe; - /* 0x1D */ u8 mMtrl; + /* 0x1D */ u8 mMtrl; // Seems to be unused and always 0 in TWW /* 0x1E */ u8 mHitMark; /* 0x1F */ u8 mSpl; /* 0x20 */ cXyz mHitPos; @@ -272,8 +270,6 @@ class dCcD_GObjTg : public dCcD_GAtTgCoCommonBase { void SetVec(cXyz& vec) { mVec = vec; } cXyz& GetVec() { return mVec; } void SetShieldFrontRangeYAngle(s16* angle) { mpShieldFrontRangeYAngle = angle; } - void SetMtrl(u8 mtrl) { mMtrl = mtrl; } - u8 GetMtrl() { return mMtrl; } void SetHitMark(CcG_Tg_HitMark mark) { mHitMark = mark; } s16* GetShieldFrontRangeYAngle() { return mpShieldFrontRangeYAngle; } u8 GetSpl() { return mSpl; } @@ -288,7 +284,7 @@ class dCcD_GObjTg : public dCcD_GAtTgCoCommonBase { private: /* 0x1C */ u8 mSe; - /* 0x1D */ u8 mMtrl; + /* 0x1D */ u8 mMtrl; // Seems to be unused and always 0 in TWW /* 0x1E */ u8 mHitMark; /* 0x1F */ u8 mSpl; /* 0x20 */ cXyz mVec; @@ -357,8 +353,6 @@ class dCcD_GObjInf : public cCcD_GObjInf { void SetTgHitMark(CcG_Tg_HitMark mark) { mGObjTg.SetHitMark(mark); } void SetAtSe(u8 se) { mGObjAt.SetSe(se); } void SetTgSe(u8 se) { mGObjTg.SetSe(se); } - void SetAtMtrl(u8 mtrl) { mGObjAt.SetMtrl(mtrl); } - void SetTgMtrl(u8 mtrl) { mGObjTg.SetMtrl(mtrl); } fopAc_ac_c* GetAtHitAc() { return mGObjAt.GetAc(); } cXyz* GetAtVecP() { return mGObjAt.GetVecP(); } cXyz* GetTgVecP() { return mGObjTg.GetVecP(); } @@ -371,8 +365,6 @@ class dCcD_GObjInf : public cCcD_GObjInf { void SetTgHitCallback(dCcD_HitCallback callback) { mGObjTg.SetHitCallback(callback); } void SetCoHitCallback(dCcD_HitCallback callback) { mGObjCo.SetHitCallback(callback); } u8 GetAtSe() { return mGObjAt.GetSe(); } - u8 GetAtMtrl() { return mGObjAt.GetMtrl(); } - u8 GetTgMtrl() { return mGObjTg.GetMtrl(); } fopAc_ac_c* GetTgHitAc() { return mGObjTg.GetAc(); } void SetTgShieldFrontRangeYAngle(s16* angle) { mGObjTg.SetShieldFrontRangeYAngle(angle); } bool ChkTgShield() { return mGObjTg.ChkSPrm(G_TG_SPRM_SHIELD); } diff --git a/include/d/d_cc_s.h b/include/d/d_cc_s.h index c22f94fae..e94582143 100644 --- a/include/d/d_cc_s.h +++ b/include/d/d_cc_s.h @@ -21,13 +21,10 @@ class dCcS : public cCcS { dCcD_GObjInf*, cCcD_Stts*, cCcD_Stts*, dCcD_GStts*, dCcD_GStts*, cXyz*); bool ChkCamera(cXyz&, cXyz&, f32, fopAc_ac_c*, fopAc_ac_c*); - bool chkCameraPoint(cXyz const&, cCcD_ShapeAttr::Shape*, fopAc_ac_c*, - fopAc_ac_c*); void DrawAfter(); void Move(); void Draw(); void MassClear(); - int ChkAtTgMtrlHit(u8, u8); virtual void SetPosCorrect(cCcD_Obj*, cXyz*, cCcD_Obj*, cXyz*, f32); virtual void SetCoGObjInf(bool, bool, cCcD_GObjInf*, cCcD_GObjInf*, cCcD_Stts*, @@ -60,8 +57,6 @@ class dCcS : public cCcS { void SetMassAreaChk(cCcD_Obj*, u8, void (*)(fopAc_ac_c*, cXyz*, u32)) {} void SetMassCam(cM3dGCps&) {} - static u8 m_mtrl_hit_tbl[64]; - // /* 0x0000 */ cCcS mCCcS; /* 0x2854 */ dCcMassS_Mng mMass_Mng; }; // Size = 0x29F4 diff --git a/src/SSystem/SComponent/c_cc_d.cpp b/src/SSystem/SComponent/c_cc_d.cpp index bc49a60bd..8da217443 100644 --- a/src/SSystem/SComponent/c_cc_d.cpp +++ b/src/SSystem/SComponent/c_cc_d.cpp @@ -186,10 +186,10 @@ cCcD_GStts* cCcD_Stts::GetGStts() { /* 80241934-80241994 .text Init__9cCcD_SttsFiiPvUi */ void cCcD_Stts::Init(int weight, int param_1, void* pProc, fpc_ProcID procID) { Ct(); - mWeight = weight; + m_weight = weight; field_0x15 = param_1; - mActor = (fopAc_ac_c*)pProc; - mApid = procID; + mp_actor = (fopAc_ac_c*)pProc; + m_apid = procID; } /* 80241994-802419C4 .text Ct__9cCcD_SttsFv */ @@ -197,11 +197,11 @@ void cCcD_Stts::Ct() { m_cc_move.x = 0.0f; m_cc_move.y = 0.0f; m_cc_move.z = 0.0f; - mActor = NULL; - mApid = fpcM_ERROR_PROCESS_ID_e; - mWeight = 0; + mp_actor = NULL; + m_apid = fpcM_ERROR_PROCESS_ID_e; + m_weight = 0; field_0x15 = 0; - mDmg = 0; + m_dmg = 0; } /* 802419C4-80241C5C .text PlusCcMove__9cCcD_SttsFfff */