summaryrefslogtreecommitdiff
path: root/include/JSystem
diff options
context:
space:
mode:
authorMax Roncace <me@caseif.net>2026-01-02 11:24:40 -0500
committerGitHub <noreply@github.com>2026-01-02 08:24:40 -0800
commit7cf1038865d2ea49adf12c122889119bcea4af34 (patch)
treedddcede70cc116392e77effd8831f0168dc72e76 /include/JSystem
parentc3213e0c67cb60974569b4f20e84d85816b9ba8b (diff)
d_particle debug improvements (#3010)
Diffstat (limited to 'include/JSystem')
-rw-r--r--include/JSystem/JGeometry.h28
-rw-r--r--include/JSystem/JParticle/JPAEmitter.h22
2 files changed, 15 insertions, 35 deletions
diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h
index f080c91f72..c90d3bdc81 100644
--- a/include/JSystem/JGeometry.h
+++ b/include/JSystem/JGeometry.h
@@ -119,9 +119,9 @@ struct TVec3<s16> {
}
void set(s16 x_, s16 y_, s16 z_) {
- x = x_;
- y = y_;
- z = z_;
+ x = (s16)x_;
+ y = (s16)y_;
+ z = (s16)z_;
}
};
@@ -175,17 +175,17 @@ inline void mulInternal(__REGISTER const f32* a, __REGISTER const f32* b, __REGI
template <>
struct TVec3<f32> : public Vec {
- inline TVec3(const Vec& i_vec) {
+ TVec3(const Vec& i_vec) {
setTVec3f(&i_vec.x, &x);
}
- inline TVec3(const TVec3<f32>& i_vec) {
+ TVec3(const TVec3<f32>& i_vec) {
setTVec3f(&i_vec.x, &x);
}
template<class U>
TVec3(U x, U y, U z) {
- set(x, y, z);
+ set((U)x, (U)y, (U)z);
}
TVec3() {}
@@ -195,9 +195,9 @@ struct TVec3<f32> : public Vec {
template<class U>
void set(const TVec3<U>& other) {
- x = other.x;
- y = other.y;
- z = other.z;
+ x = (U)other.x;
+ y = (U)other.y;
+ z = (U)other.z;
}
void set(const Vec& other) {
@@ -208,9 +208,9 @@ struct TVec3<f32> : public Vec {
template<class U>
void set(U x_, U y_, U z_) {
- x = x_;
- y = y_;
- z = z_;
+ x = (U)x_;
+ y = (U)y_;
+ z = (U)z_;
}
inline void add(const TVec3<f32>& b) {
@@ -359,9 +359,9 @@ struct TVec3<f32> : public Vec {
}
void cross(const TVec3<f32>& a, const TVec3<f32>& b) {
- VECCrossProduct(a, b, *this);
+ PSVECCrossProduct(&a, &b, this);
}
-
+
f32 setLength(f32 len) {
f32 sq = squared();
if (sq <= TUtil<f32>::epsilon()) {
diff --git a/include/JSystem/JParticle/JPAEmitter.h b/include/JSystem/JParticle/JPAEmitter.h
index ebf82df33e..9ce16e8f22 100644
--- a/include/JSystem/JParticle/JPAEmitter.h
+++ b/include/JSystem/JParticle/JPAEmitter.h
@@ -79,8 +79,6 @@ public:
virtual void executeAfter(JPABaseEmitter*) {}
virtual void draw(JPABaseEmitter*) {}
virtual void drawAfter(JPABaseEmitter*) {}
-
- //~JPAEmitterCallBack();
};
enum {
@@ -160,34 +158,16 @@ public:
mGlobalPScl.y = height;
}
void setGlobalParticleScale(const JGeometry::TVec3<f32>& scale) {
- mGlobalPScl.set(scale.x, scale.y);
+ mGlobalPScl.set((f32)scale.x, (f32)scale.y);
}
void setGlobalParticleScale(f32 scaleX, f32 scaleY) {
mGlobalPScl.set(scaleX, scaleY);
}
void getGlobalParticleScale(JGeometry::TVec3<f32>& scale) const {
- //TODO: Possible fakematch. Debug and Wii indicate TVec3::set, but using it breaks regalloc
- // in dPa_gen_b_light8PcallBack::draw on GCN (where the call to set would normally be
- // inlined).
-#if PLATFORM_GCN
- scale.x = mGlobalPScl.x;
- scale.y = mGlobalPScl.y;
- scale.z = 1.0f;
-#else
scale.set(mGlobalPScl.x, mGlobalPScl.y, 1.0f);
-#endif
}
void getGlobalParticleScale(JGeometry::TVec3<f32>* scale) const {
- //TODO: Possible fakematch. Debug and Wii indicate TVec3::set, but using it breaks regalloc
- // in dPa_gen_b_light8PcallBack::draw on GCN (where the call to set would normally be
- // inlined).
-#if PLATFORM_GCN
- scale->x = mGlobalPScl.x;
- scale->y = mGlobalPScl.y;
- scale->z = 1.0f;
-#else
scale->set(mGlobalPScl.x, mGlobalPScl.y, 1.0f);
-#endif
}
void setGlobalScale(const JGeometry::TVec3<f32>& scale) {
mGlobalScl.set(scale);