d_particle almost finished (#2193)

* d_particle almost finished

* Remove dolasm.h include from JKRDvdRipper
This commit is contained in:
hatal175
2024-08-17 08:19:53 +03:00
committed by GitHub
parent edd2d30a33
commit 18f4489dd6
7 changed files with 582 additions and 42 deletions
+13
View File
@@ -305,6 +305,19 @@ struct TVec3<f32> : public Vec {
};
return res;
}
void cubic(const TVec3<f32>& param_1, const TVec3<f32>& param_2, const TVec3<f32>& param_3,
const TVec3<f32>& param_4, f32 param_5) {
f32 fVar5 = param_5 * param_5;
f32 fVar6 = fVar5 * param_5;
f32 fVar8 = 1.0f + (2.0f * fVar6 - 3.0f * fVar5);
f32 fVar9 = -2.0f * fVar6 + 3.0f * fVar5;
f32 fVar7 = param_5 + (fVar6 - 2.0f * fVar5);
f32 fVar4 = fVar6 - fVar5;
x = fVar8 * param_1.x + fVar9 * param_4.x + fVar7 * param_2.x + fVar4 * param_3.x;
y = fVar8 * param_1.y + fVar9 * param_4.y + fVar7 * param_2.y + fVar4 * param_3.y;
z = fVar8 * param_1.z + fVar9 * param_4.z + fVar7 * param_2.z + fVar4 * param_3.z;
}
};
template <typename T>
+1
View File
@@ -43,6 +43,7 @@ public:
void setDeleteParticleFlag() { setStatus(2); }
void getVelVec(JGeometry::TVec3<f32>& vec) const { vec.set(mVelocity); }
void getLocalPosition(JGeometry::TVec3<f32>& vec) const { vec.set(mLocalPosition); }
void getBaseAxis(JGeometry::TVec3<f32>& vec) const { vec.set(mBaseAxis); }
public:
/* 0x00 */ JGeometry::TVec3<f32> mPosition;
+1
View File
@@ -599,6 +599,7 @@ void dKy_ParticleColor_get_bg(cXyz* param_0, dKy_tevstr_c* param_1, _GXColor* pa
f32 param_6);
_GXColor dKy_light_influence_col(_GXColor* param_0, f32 param_1);
static void dKy_WaterIn_Light_set();
void dKy_SordFlush_set(cXyz param_0, int param_1);
#endif /* D_KANKYO_D_KANKYO_H */
+5 -2
View File
@@ -46,6 +46,7 @@ class cBgS_PolyInfo;
class JPAEmitterManager;
class JPADrawInfo;
class J3DAnmBase;
class dPa_simpleData_c;
class dPa_simpleEcallBack : public JPAEmitterCallBack {
public:
@@ -67,7 +68,7 @@ public:
/* 0x0A */ u8 field_0xa;
/* 0x0C */ s16 field_0xc;
/* 0x0C */ u16 field_0xe;
/* 0x10 */ void* mData;
/* 0x10 */ dPa_simpleData_c* mData;
}; // Size: 0x14
class dPa_followEcallBack : public dPa_levelEcallBack {
@@ -256,7 +257,9 @@ public:
/* 8004B024 */ ~dPa_simpleData_c();
/* 8004B060 */ dPa_simpleData_c();
u8 field_0x0[20];
cXyz field_0x00;
GXColor field_0x0c;
GXColor field_0x10;
};
class dPa_control_c {
+7
View File
@@ -120,6 +120,13 @@ static inline void GXColor1u32(const u32 c) {
GXWGFifo.u32 = c;
}
static inline void GXColor4u8(const u8 r, const u8 g, const u8 b, const u8 a) {
GXWGFifo.u8 = r;
GXWGFifo.u8 = g;
GXWGFifo.u8 = b;
GXWGFifo.u8 = a;
}
static inline void GXTexCoord2f32(const f32 s, const f32 t) {
GXWGFifo.f32 = s;
GXWGFifo.f32 = t;