summaryrefslogtreecommitdiff
path: root/include/JSystem
diff options
context:
space:
mode:
authorTakaRikka <takarikka@outlook.com>2023-07-06 16:30:11 -0700
committerTakaRikka <takarikka@outlook.com>2023-07-06 16:30:11 -0700
commit2c8bfedbbae84d3e8a73a81099e7b33396a061af (patch)
tree397a7668fffab6beb9a493e69bb52c313deaa0ac /include/JSystem
parent93d82399b3a0a459fae48eae19101968c2e3d343 (diff)
d_a_kytag10 almost done
Diffstat (limited to 'include/JSystem')
-rw-r--r--include/JSystem/JGeometry.h21
-rw-r--r--include/JSystem/JParticle/JPAParticle.h7
2 files changed, 28 insertions, 0 deletions
diff --git a/include/JSystem/JGeometry.h b/include/JSystem/JGeometry.h
index e01e72614a..dd984bcc85 100644
--- a/include/JSystem/JGeometry.h
+++ b/include/JSystem/JGeometry.h
@@ -31,12 +31,33 @@ struct TVec3<s16> {
}
};
+inline void setTVec3f(const f32* vec_a, f32* vec_b) {
+ const register f32* v_a = vec_a;
+ register f32* v_b = vec_b;
+
+ register f32 a_x;
+ register f32 b_x;
+
+ asm {
+ psq_l a_x, 0(v_a), 0, 0 /* qr0 */
+ lfs b_x, 8(v_a)
+ psq_st a_x, 0(v_b), 0, 0 /* qr0 */
+ stfs b_x, 8(v_b)
+ };
+}
+
template <>
struct TVec3<f32> {
f32 x;
f32 y;
f32 z;
+ /* TVec3(const Vec& i_vec) {
+ setTVec3f(&i_vec.x, &x);
+ } */
+
+ /* TVec3() {} */
+
operator Vec*() { return (Vec*)&x; }
operator const Vec*() const { return (Vec*)&x; }
diff --git a/include/JSystem/JParticle/JPAParticle.h b/include/JSystem/JParticle/JPAParticle.h
index 3448720ae0..ed4fe9142a 100644
--- a/include/JSystem/JParticle/JPAParticle.h
+++ b/include/JSystem/JParticle/JPAParticle.h
@@ -250,6 +250,13 @@ public:
void setGlobalRTMatrix(const Mtx m) { JPASetRMtxTVecfromMtx(m, mGlobalRot, &mGlobalTrs); }
void setGlobalTranslation(f32 x, f32 y, f32 z) { mGlobalTrs.set(x, y, z); }
void setGlobalAlpha(u8 alpha) { mGlobalPrmClr.a = alpha; }
+ void setVolumeSize(u16 size) { mVolumeSize = size; }
+ void setLifeTime(s16 lifetime) { mLifeTime = lifetime; }
+
+ void setGlobalParticleScale(const JGeometry::TVec3<f32>& scale) {
+ mGlobalPScl.set(scale.x, scale.y);
+ }
+
// void setGlobalScale(const JGeometry::TVec3<f32>& scale) {
// mGlobalScl = scale;
// mGlobalPScl = scale;