From 8509a38a8e7dd70275e57ee14dbd2aec9c2bcb31 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Mon, 10 Mar 2025 20:59:09 -0400 Subject: [PATCH] Cleanup --- include/SSystem/SComponent/c_xyz.h | 18 +++++++++--------- src/JSystem/JParticle/JPAEmitterLoader.cpp | 7 +++---- src/SSystem/SComponent/c_xyz.cpp | 2 -- src/d/actor/d_a_agbsw0.cpp | 2 +- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/include/SSystem/SComponent/c_xyz.h b/include/SSystem/SComponent/c_xyz.h index c924fae83..b6fb430fc 100644 --- a/include/SSystem/SComponent/c_xyz.h +++ b/include/SSystem/SComponent/c_xyz.h @@ -1,7 +1,7 @@ #ifndef C_XYZ_H #define C_XYZ_H -#include "math.h" +#include "math.h" // IWYU pragma: keep #include "dolphin/mtx/vec.h" struct cXy { @@ -40,12 +40,12 @@ struct cXyz : Vec { y = vec.y; z = vec.z; } - cXyz operator+(Vec const&) const; - cXyz operator-(Vec const&) const; + cXyz operator+(const Vec&) const; + cXyz operator-(const Vec&) const; cXyz operator*(f32) const; - cXyz operator*(Vec const&) const; + cXyz operator*(const Vec&) const; cXyz operator/(f32) const; - // void operator=(cXyz const&); + // void operator=(const cXyz&); void operator+=(f32 f) { x += f; @@ -60,16 +60,16 @@ struct cXyz : Vec { void operator-=(const Vec& other) { VECSubtract(this, &other, this); } void operator+=(const Vec& other) { VECAdd(this, &other, this); } void operator*=(f32 scale) { VECScale(this, this, scale); } - cXyz getCrossProduct(Vec const&) const; - cXyz outprod(Vec const&) const; + cXyz getCrossProduct(const Vec&) const; + cXyz outprod(const Vec&) const; cXyz norm() const; cXyz normZP() const; cXyz normZC() const; cXyz normalize(); cXyz normalizeZP(); bool normalizeRS(); - bool operator==(Vec const&) const; - bool operator!=(Vec const&) const; + bool operator==(const Vec&) const; + bool operator!=(const Vec&) const; bool isZero() const; s16 atan2sX_Z() const; s16 atan2sY_XZ() const; diff --git a/src/JSystem/JParticle/JPAEmitterLoader.cpp b/src/JSystem/JParticle/JPAEmitterLoader.cpp index 4a6a2f49b..e8ff1bd97 100644 --- a/src/JSystem/JParticle/JPAEmitterLoader.cpp +++ b/src/JSystem/JParticle/JPAEmitterLoader.cpp @@ -32,7 +32,7 @@ public: /* 0x0C */ JPATextureResource* mpTexRes; }; -static void dummy() { +static void dummy(u32 texNum) { JUT_WARN(0, "%s", "This is WRONG Version File\n"); JUT_WARN(0, "%s", "This is NO JPA File\n"); JPAEmitterData* pEmtrRes; @@ -42,11 +42,10 @@ static void dummy() { JUT_ASSERT(0, pLinkInfo); JUT_ASSERT(0, pLinkInfo->keyBlocks || pLinkInfo->keyNum == 0); JUT_ASSERT(0, pLinkInfo->fldBlocks || pLinkInfo->fldNum == 0); - u32 texNum; JUT_ASSERT(0, pLinkInfo->texDataBase || texNum == 0); - u32 fldCntr; + u32 fldCntr = 0; JUT_ASSERT(0, pLinkInfo->fldBlocks[fldCntr]); - u32 keyCntr; + u32 keyCntr = 0; JUT_ASSERT(0, pLinkInfo->keyBlocks[keyCntr]); JUT_ASSERT(0, pLinkInfo->dynBlock); JUT_ASSERT(0, pLinkInfo->bspBlock); diff --git a/src/SSystem/SComponent/c_xyz.cpp b/src/SSystem/SComponent/c_xyz.cpp index 946ba8650..ffc851a72 100644 --- a/src/SSystem/SComponent/c_xyz.cpp +++ b/src/SSystem/SComponent/c_xyz.cpp @@ -5,8 +5,6 @@ #include "SSystem/SComponent/c_xyz.h" #include "JSystem/JUtility/JUTAssert.h" -#include "float.h" -#include "SSystem/SComponent/c_math.h" const cXyz cXyz::Zero(0, 0, 0); const cXyz cXyz::BaseX(1, 0, 0); diff --git a/src/d/actor/d_a_agbsw0.cpp b/src/d/actor/d_a_agbsw0.cpp index dfb6ae648..7f18674b3 100644 --- a/src/d/actor/d_a_agbsw0.cpp +++ b/src/d/actor/d_a_agbsw0.cpp @@ -1255,7 +1255,7 @@ BOOL daAgbsw0_c::ExeSubR() { if(mDoGaC_GbaLink() && mDoGac_SendStatusCheck(5)) { if(sw0 != 0xFF && fopAcM_isSwitch(this, sw0)) { s32 itemNo = getParamNo(); - if(itemNo < 0 || 0x1E < itemNo) { + if(itemNo < 0 || dItem_TRIPLE_HEART_e < itemNo) { itemNo = 0; }