mirror of
https://github.com/zeldaret/tww.git
synced 2026-09-03 01:54:02 -04:00
Some particle work and cleanup
This commit is contained in:
@@ -82,8 +82,14 @@ public:
|
||||
s32 entryTexMtxAnimator(J3DAnmTextureSRTKey* anm) { return mMaterialTable.entryTexMtxAnimator(anm); }
|
||||
s32 entryTevRegAnimator(J3DAnmTevRegKey* anm) { return mMaterialTable.entryTevRegAnimator(anm); }
|
||||
s32 entryMatColorAnimator(J3DAnmColor* anm) { return mMaterialTable.entryMatColorAnimator(anm); }
|
||||
void setTexMtxAnimator(J3DAnmTextureSRTKey* pAnm, J3DTexMtxAnm* pTexAnm, J3DTexMtxAnm* pDualAnmR) {
|
||||
mMaterialTable.setTexMtxAnimator(pAnm, pTexAnm, pDualAnmR);
|
||||
int setTexMtxAnimator(J3DAnmTextureSRTKey* pAnm, J3DTexMtxAnm* pTexAnm, J3DTexMtxAnm* pDualAnmR) {
|
||||
return mMaterialTable.setTexMtxAnimator(pAnm, pTexAnm, pDualAnmR);
|
||||
}
|
||||
int setTexNoAnimator(J3DAnmTexPattern* anm, J3DTexNoAnm* anmR) {
|
||||
return mMaterialTable.setTexNoAnimator(anm, anmR);
|
||||
}
|
||||
int setMatColorAnimator(J3DAnmColor* anm, J3DMatColorAnm* anmR) {
|
||||
return mMaterialTable.setMatColorAnimator(anm, anmR);
|
||||
}
|
||||
int removeTexNoAnimator(J3DAnmTexPattern* anm) {
|
||||
return mMaterialTable.removeTexNoAnimator(anm);
|
||||
@@ -106,8 +112,6 @@ public:
|
||||
// TODO
|
||||
void getBasicMtxCalc() {}
|
||||
void getRootNode() {}
|
||||
void setMatColorAnimator(J3DAnmColor*, J3DMatColorAnm*) {}
|
||||
void setTexNoAnimator(J3DAnmTexPattern*, J3DTexNoAnm*) {}
|
||||
|
||||
private:
|
||||
friend class J3DModelLoader;
|
||||
|
||||
@@ -228,6 +228,9 @@ public:
|
||||
mGlobalDynamicsScale.set(scale);
|
||||
mGlobalParticleScale.set(scale);
|
||||
}
|
||||
void getGlobalParticleScale(JGeometry::TVec3<f32>& out) const {
|
||||
out.set(mGlobalParticleScale);
|
||||
}
|
||||
void setGlobalParticleScale(const JGeometry::TVec3<f32>& scale) {
|
||||
mGlobalParticleScale.set(scale);
|
||||
}
|
||||
@@ -315,7 +318,6 @@ public:
|
||||
void getBasePrmColor(GXColor&) {}
|
||||
void getCurrentCreateNumber() const {}
|
||||
void getFrame() {}
|
||||
void getGlobalParticleScale(JGeometry::TVec3<f32>&) const {}
|
||||
void getgReRDirection(JGeometry::TVec3<f32>&) {}
|
||||
void isContinuousParticle() {}
|
||||
void loadTexture(u8, GXTexMapID) {}
|
||||
|
||||
@@ -27,6 +27,24 @@ enum JPAParticleStatus {
|
||||
JPAPtclStts_Invisible = 0x08,
|
||||
};
|
||||
|
||||
// fake name
|
||||
struct JPADrawParams {
|
||||
/* 0x00 */ JGeometry::TVec3<f32> mAxis;
|
||||
/* 0x0C */ f32 mScaleOut;
|
||||
/* 0x10 */ f32 mScaleX;
|
||||
/* 0x14 */ f32 mScaleY;
|
||||
/* 0x18 */ u8 field_0x18[0x20 - 0x18];
|
||||
/* 0x20 */ f32 mAlphaOut;
|
||||
/* 0x24 */ f32 mAlphaWaveRandom;
|
||||
/* 0x28 */ int mLoopOffset;
|
||||
/* 0x2C */ GXColor mPrmColor;
|
||||
/* 0x30 */ GXColor mEnvColor;
|
||||
/* 0x34 */ u16 mRotateAngle;
|
||||
/* 0x36 */ s16 mRotateSpeed;
|
||||
/* 0x38 */ u8 field_0x38[0x3A - 0x38];
|
||||
/* 0x3A */ u16 mTexIdx;
|
||||
}; // Size: 0x3C
|
||||
|
||||
class JPABaseParticle {
|
||||
public:
|
||||
void initParticle();
|
||||
@@ -44,6 +62,7 @@ public:
|
||||
void getOffsetPosition(JGeometry::TVec3<f32>& out) const { out.set(mOffsetPosition); }
|
||||
void getLocalPosition(JGeometry::TVec3<f32>& out) const { out.set(mLocalPosition); }
|
||||
void getGlobalPosition(JGeometry::TVec3<f32>& out) const { out.set(mGlobalPosition); }
|
||||
void getVelVec(JGeometry::TVec3<f32>& out) const { out.set(mVelocity); }
|
||||
s32 getAge() const { return mCurFrame; } // TODO: Not sure about this one, especially the cast to s32; this could also be mCurNormTime?
|
||||
void calcCB(JPABaseEmitter* emtr) { if (mpCallBack2 != NULL) mpCallBack2->execute(emtr, this); }
|
||||
void drawCB(JPABaseEmitter* emtr) { if (mpCallBack2 != NULL) mpCallBack2->draw(emtr, this); }
|
||||
@@ -56,12 +75,12 @@ public:
|
||||
bool isInvisibleParticle() { return checkStatus(JPAPtclStts_Invisible); }
|
||||
void setInvisibleParticleFlag() { setStatus(JPAPtclStts_Invisible); }
|
||||
|
||||
JPADrawParams* getDrawParamPPtr() { return &mDrawParams; }
|
||||
void getDrawParamCPtr() {}
|
||||
void getDrawParamPPtr() {}
|
||||
|
||||
void getWidth() {}
|
||||
void getHeight() {}
|
||||
void getLifeTime() const {}
|
||||
void getVelVec(JGeometry::TVec3<f32>&) const {}
|
||||
void getWidth() {}
|
||||
void setDeleteParticleFlag() {}
|
||||
|
||||
public:
|
||||
@@ -81,20 +100,7 @@ public:
|
||||
/* 0x80 */ f32 mCurNormTime;
|
||||
/* 0x84 */ f32 mFieldDrag;
|
||||
/* 0x88 */ f32 mDrag;
|
||||
/* 0x8C */ JGeometry::TVec3<f32> mAxis;
|
||||
/* 0x98 */ f32 mScaleOut;
|
||||
/* 0x9C */ f32 mScaleX;
|
||||
/* 0xA0 */ f32 mScaleY;
|
||||
/* 0xA4 */ u8 field_0xA4[0xAC - 0xA4];
|
||||
/* 0xAC */ f32 mAlphaOut;
|
||||
/* 0xB0 */ f32 mAlphaWaveRandom;
|
||||
/* 0xB4 */ int mLoopOffset;
|
||||
/* 0xB8 */ GXColor mPrmColor;
|
||||
/* 0xBC */ GXColor mEnvColor;
|
||||
/* 0xC0 */ u16 mRotateAngle;
|
||||
/* 0xC2 */ s16 mRotateSpeed;
|
||||
/* 0xC4 */ u16 field_0xC4;
|
||||
/* 0xC6 */ u16 mTexIdx;
|
||||
/* 0x8C */ JPADrawParams mDrawParams;
|
||||
/* 0xC8 */ JPACallBackBase2<JPABaseEmitter*, JPABaseParticle*>* mpCallBack2;
|
||||
/* 0xCC */ u32 mStatus;
|
||||
/* 0xD0 */ u32 field_0xd0;
|
||||
|
||||
Reference in New Issue
Block a user