Work on JPABaseShape (#1884)

This commit is contained in:
hatal175
2023-08-14 19:04:01 +03:00
committed by GitHub
parent da21df7ee7
commit f441e06d19
35 changed files with 850 additions and 915 deletions
+17
View File
@@ -97,9 +97,26 @@ public:
bool isTexAnm() const { return !!(mpData->mTexFlg & 0x01); }
u8 getTexAnmType() const { return (mpData->mTexFlg >> 2) & 0x07; }
u32 getTexIdx() const { return mpData->mTexIdx; }
u8 getTexIdx(u8 idx) const { return mpTexIdxAnimTbl[idx]; }
f32 getBaseSizeX() const { return mpData->mBaseSizeX; }
f32 getBaseSizeY() const { return mpData->mBaseSizeY; }
u8 getClrLoopOfstMask() const { return mpData->mClrAnmRndmMask; }
u32 getClrLoopOfst(u32 param_1) const { return getClrLoopOfstMask() & param_1; }
u8 getTexLoopOfstMask() const { return mpData->mTexAnmRndmMask; }
u32 getTexLoopOfst(u8 param_1) const { return getTexLoopOfstMask() & param_1; }
f32 getIncTransX() const { return ((f32*)mpTexCrdMtxAnmTbl)[5]; }
f32 getInitTransX() const { return ((f32*)mpTexCrdMtxAnmTbl)[0]; }
f32 getIncTransY() const { return ((f32*)mpTexCrdMtxAnmTbl)[6]; }
f32 getInitTransY() const { return ((f32*)mpTexCrdMtxAnmTbl)[1]; }
f32 getIncScaleX() const { return ((f32*)mpTexCrdMtxAnmTbl)[7]; }
f32 getInitScaleX() const { return ((f32*)mpTexCrdMtxAnmTbl)[2]; }
f32 getIncScaleY() const { return ((f32*)mpTexCrdMtxAnmTbl)[8]; }
f32 getInitScaleY() const { return ((f32*)mpTexCrdMtxAnmTbl)[3]; }
f32 getIncRot() const { return ((f32*)mpTexCrdMtxAnmTbl)[9]; }
f32 getInitRot() const { return ((f32*)mpTexCrdMtxAnmTbl)[4]; }
u8 getTexAnmKeyNum() const { return mpData->mTexAnmNum; }
public:
/* 0x00 */ const JPABaseShapeData* mpData;
+1 -1
View File
@@ -13,7 +13,6 @@
#include "JSystem/JParticle/JPADynamicsBlock.h"
#include "JSystem/JSupport/JSUList.h"
struct JPABaseEmitter;
struct JPAResourceManager;
struct JPABaseEmitter;
struct JPAEmitterManager;
@@ -164,6 +163,7 @@ public:
void setParticleCallBackPtr(JPAParticleCallBack* cb) { mpPtclCallBack = cb; }
JPAParticleCallBack* getParticleCallBackPtr() { return mpPtclCallBack; }
JPAEmitterCallBack* getEmitterCallBackPtr() const { return mpEmtrCallBack; }
u32 getAge() const { return mTick; }
public:
/* 0x00 */ JGeometry::TVec3<f32> mLocalScl;
+4
View File
@@ -10,6 +10,9 @@ struct JPANode {
mpNext = NULL;
}
~JPANode() {}
JPANode<T>* getPrev() { return mpPrev; }
JPANode<T>* getNext() { return mpNext; }
T* getObject() { return &mData; }
JPANode<T>* mpPrev;
JPANode<T>* mpNext;
T mData;
@@ -23,6 +26,7 @@ struct JPAList {
JPAList() : mpFirst(NULL), mpLast(NULL), mNum() {}
JPANode<T>* getEnd() { return NULL; }
JPANode<T>* getFirst() const { return mpFirst; }
JPANode<T>* getLast() const { return mpLast; }
u32 getNum() const { return mNum; }
+7 -4
View File
@@ -32,22 +32,25 @@ public:
void setOffsetPosition(f32 x, f32 y, f32 z) { mOffsetPosition.set(x, y, z); }
void getOffsetPosition(JGeometry::TVec3<f32>& pos) { pos.set(mOffsetPosition); }
u16 getRotateAngle() const { return mRotateAngle; }
void getGlobalPosition(JGeometry::TVec3<f32>& pos) { pos.set(mPosition); }
void getGlobalPosition(JGeometry::TVec3<f32>& pos) const { pos.set(mPosition); }
f32 getParticleScaleX() const { return mParticleScaleX; }
f32 getParticleScaleY() const { return mParticleScaleY; }
void setStatus(u32 flag) { mStatus |= flag; }
u32 checkStatus(u32 flag) { return mStatus & flag; }
void setInvisibleParticleFlag() { setStatus(8); }
void setDeleteParticleFlag() { setStatus(2); }
void getVelVec(JGeometry::TVec3<f32>& vec) const { vec.set(mVelocity); }
void getLocalPosition(JGeometry::TVec3<f32>& vec) const { vec.set(mLocalPosition); }
public:
/* 0x00 */ JGeometry::TVec3<f32> mPosition;
/* 0x0C */ Vec mLocalPosition;
/* 0x0C */ JGeometry::TVec3<f32> mLocalPosition;
/* 0x18 */ JGeometry::TVec3<f32> mOffsetPosition;
/* 0x24 */ Vec mVelocity;
/* 0x24 */ JGeometry::TVec3<f32> mVelocity;
/* 0x30 */ Vec mVelType1;
/* 0x3C */ Vec mVelType0;
/* 0x48 */ Vec mVelType2;
/* 0x54 */ Vec mBaseAxis;
/* 0x54 */ JGeometry::TVec3<f32> mBaseAxis;
/* 0x60 */ f32 mParticleScaleX;
/* 0x64 */ f32 mParticleScaleY;
/* 0x68 */ f32 mScaleOut;