d_a_kytag10 almost done

This commit is contained in:
TakaRikka
2023-07-06 16:30:11 -07:00
parent 93d82399b3
commit 2c8bfedbba
5 changed files with 336 additions and 180 deletions
+21
View File
@@ -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; }
+7
View File
@@ -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;
@@ -1,6 +1,22 @@
#ifndef D_A_KYTAG10_H
#define D_A_KYTAG10_H
#include "dolphin/types.h"
#include "f_op/f_op_actor_mng.h"
struct dPath;
class kytag10_class : public fopAc_ac_c {
public:
/* 0x568 */ dPath* mpPath;
/* 0x56C */ JPABaseEmitter* mpEmitter1;
/* 0x570 */ JPABaseEmitter* mpEmitter2;
/* 0x574 */ cXyz mEmitterPtclScale;
/* 0x580 */ s16 mEmitterVolSize;
/* 0x582 */ s16 mEmitterLifeTime;
/* 0x584 */ u8 field_0x584;
/* 0x588 */ cXyz field_0x588;
/* 0x594 */ f32 field_0x594;
/* 0x598 */ int mPathPoint;
};
#endif /* D_A_KYTAG10_H */