mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 06:54:28 -04:00
d_particle debug improvements (#3010)
This commit is contained in:
+14
-14
@@ -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()) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user