Improve d_particle destructors

This commit is contained in:
LagoLunatic
2023-10-03 15:27:53 -04:00
parent 7824fb54c0
commit 3ce4a6f388
7 changed files with 243 additions and 110 deletions
+2
View File
@@ -11,6 +11,8 @@ class JPAExtraShapeArc;
class JPASweepShapeArc;
class JPAExTexShapeArc;
class JPATextureResource;
class JPABaseEmitter;
class JPABaseParticle;
class JPADraw;
class JPADrawExecEmitterVisitor;
+12 -1
View File
@@ -36,6 +36,17 @@ public:
virtual void draw(JPABaseEmitter*);
};
template<typename T, typename U>
class JPACallBackBase2 {
public:
JPACallBackBase2() {}
virtual ~JPACallBackBase2() {}
virtual void init(JPABaseEmitter*, JPABaseParticle*);
virtual void execute(JPABaseEmitter*, JPABaseParticle*);
virtual void draw(JPABaseEmitter*, JPABaseParticle*);
};
class JPABaseEmitter {
public:
typedef void (JPABaseEmitter::*VolumeFunc)();
@@ -128,7 +139,7 @@ public:
/* 0x194 */ JSUPtrList* mpPtclVacList;
/* 0x198 */ JPADataBlockLinkInfo* mpDataLinkInfo;
/* 0x19C */ JPACallBackBase<JPABaseEmitter>* mpEmitterCallBack;
/* 0x1A0 */ JPACallBackBase2* mpParticleCallBack;
/* 0x1A0 */ JPACallBackBase2<JPABaseEmitter,JPABaseParticle>* mpParticleCallBack;
/* 0x1A4 */ JMath::TRandom_fast_ mRandomSeed;
/* 0x1A8 */ Mtx mGlobalRotation;
/* 0x1D8 */ JGeometry::TVec3<f32> mGlobalScale;
+2 -2
View File
@@ -2,6 +2,7 @@
#define JPAPARTICLE_H
#include "JSystem/JSupport/JSUList.h"
#include "JSystem/JParticle/JPAEmitter.h"
#include "SSystem/SComponent/c_xyz.h"
#include "dolphin/gx/GXStruct.h"
@@ -13,7 +14,6 @@ class JPAEmitterManager;
class JPAParticleCallBack;
class JPAResourceManager;
struct JPAEmitterWorkData;
struct JPACallBackBase2;
class JPABaseParticle {
public:
@@ -58,7 +58,7 @@ public:
/* 0xC2 */ s16 mRotateSpeed;
/* 0xC4 */ u8 field_0xC4[0xC6 - 0xC4];
/* 0xC6 */ u16 mTexIdx;
/* 0xC8 */ JPACallBackBase2* mpCallBack2;
/* 0xC8 */ JPACallBackBase2<JPABaseEmitter,JPABaseParticle>* mpCallBack2;
/* 0xCC */ u32 mFlags;
};