mirror of
https://github.com/zeldaret/tp
synced 2026-06-19 07:47:11 -04:00
d_a_kytag10 almost done
This commit is contained in:
@@ -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; }
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user