mirror of
https://github.com/zeldaret/tp
synced 2026-06-25 18:04:43 -04:00
d_particle debug work (#2944)
* misc work * more work * fixed error * more work * PR cleanup * missed cleanup * error fix * wii fix
This commit is contained in:
@@ -151,11 +151,11 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
virtual u8 getTextureCount() const { return mTextureNum; }
|
||||
virtual bool setBlack(JUtility::TColor i_black) {
|
||||
/* vt 0x128 */ virtual bool setBlack(JUtility::TColor i_black) {
|
||||
mBlack = i_black;
|
||||
return true;
|
||||
}
|
||||
virtual bool setWhite(JUtility::TColor i_white) {
|
||||
/* vt 0x12C */ virtual bool setWhite(JUtility::TColor i_white) {
|
||||
mWhite = i_white;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
int removeMatColorAnimator(J3DAnmColor* anm) {
|
||||
return mMaterialTable.removeMatColorAnimator(anm);
|
||||
}
|
||||
void syncJ3DSys() {
|
||||
void syncJ3DSys() const {
|
||||
syncJ3DSysFlags();
|
||||
syncJ3DSysPointers();
|
||||
}
|
||||
|
||||
@@ -17,6 +17,12 @@ inline int JMAAbs(int value) {
|
||||
#endif
|
||||
}
|
||||
|
||||
inline f32 JMAAbs(f32 x) {
|
||||
#ifdef __MWERKS__
|
||||
return __fabsf(x);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline f32 JMAFastReciprocal(f32 value) {
|
||||
#ifdef __MWERKS__
|
||||
return __fres(value);
|
||||
|
||||
@@ -134,6 +134,7 @@ public:
|
||||
void setGlobalTranslation(f32 x, f32 y, f32 z) { mGlobalTrs.set(x, y, z); }
|
||||
void setGlobalTranslation(const JGeometry::TVec3<f32>& trs) { mGlobalTrs.set(trs); }
|
||||
void getLocalTranslation(JGeometry::TVec3<f32>& vec) { vec.set(mLocalTrs); }
|
||||
void getLocalTranslation(JGeometry::TVec3<f32>* vec) const { vec->set(mLocalTrs); }
|
||||
void setGlobalRotation(const JGeometry::TVec3<s16>& rot) {
|
||||
JPAGetXYZRotateMtx(rot.x, rot.y, rot.z, mGlobalRot);
|
||||
}
|
||||
@@ -143,6 +144,7 @@ public:
|
||||
void setGlobalAlpha(u8 alpha) { mGlobalPrmClr.a = alpha; }
|
||||
u8 getGlobalAlpha() const { return mGlobalPrmClr.a; }
|
||||
void getGlobalPrmColor(GXColor& color) { color = mGlobalPrmClr; }
|
||||
void getGlobalPrmColor(_GXColor* color) const { *color = mGlobalPrmClr; }
|
||||
void setGlobalPrmColor(u8 r, u8 g, u8 b) { mGlobalPrmClr.r = r; mGlobalPrmClr.g = g; mGlobalPrmClr.b = b; }
|
||||
void setGlobalEnvColor(u8 r, u8 g, u8 b) { mGlobalEnvClr.r = r; mGlobalEnvClr.g = g; mGlobalEnvClr.b = b; }
|
||||
void setVolumeSize(u16 size) { mVolumeSize = size; }
|
||||
@@ -173,6 +175,18 @@ public:
|
||||
scale.z = 1.0f;
|
||||
#else
|
||||
scale.set(mGlobalPScl.x, mGlobalPScl.y, 1.0f);
|
||||
#endif
|
||||
}
|
||||
void getGlobalParticleScale(JGeometry::TVec3<f32>* scale) const {
|
||||
//TODO: Possible fakematch. Debug and Wii indicate TVec3::set, but using it breaks regalloc
|
||||
// in dPa_gen_b_light8PcallBack::draw on GCN (where the call to set would normally be
|
||||
// inlined).
|
||||
#if PLATFORM_GCN
|
||||
scale->x = mGlobalPScl.x;
|
||||
scale->y = mGlobalPScl.y;
|
||||
scale->z = 1.0f;
|
||||
#else
|
||||
scale->set(mGlobalPScl.x, mGlobalPScl.y, 1.0f);
|
||||
#endif
|
||||
}
|
||||
void setGlobalScale(const JGeometry::TVec3<f32>& scale) {
|
||||
@@ -208,7 +222,7 @@ public:
|
||||
void stopDrawParticle() { setStatus(JPAEmtrStts_StopDraw); }
|
||||
void playDrawParticle() { clearStatus(JPAEmtrStts_StopDraw); }
|
||||
|
||||
uintptr_t getUserWork() { return mpUserWork; }
|
||||
uintptr_t getUserWork() const { return mpUserWork; }
|
||||
void setUserWork(uintptr_t userWork) { mpUserWork = userWork; }
|
||||
u32 getParticleNumber() const {
|
||||
return mAlivePtclBase.getNum() + mAlivePtclChld.getNum();
|
||||
@@ -218,7 +232,7 @@ public:
|
||||
}
|
||||
void setDrawTimes(u8 drawTimes) { mDrawTimes = drawTimes; }
|
||||
void setParticleCallBackPtr(JPAParticleCallBack* cb) { mpPtclCallBack = cb; }
|
||||
JPAParticleCallBack* getParticleCallBackPtr() { return mpPtclCallBack; }
|
||||
JPAParticleCallBack* getParticleCallBackPtr() const { return mpPtclCallBack; }
|
||||
JPAEmitterCallBack* getEmitterCallBackPtr() const { return mpEmtrCallBack; }
|
||||
u32 getAge() const { return mTick; }
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "JSystem/JParticle/JPADrawInfo.h"
|
||||
#include "JSystem/JSupport/JSUList.h"
|
||||
#include "JSystem/JGeometry.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
class JPAEmitterCallBack;
|
||||
class JPAParticleCallBack;
|
||||
@@ -32,7 +33,12 @@ public:
|
||||
void entryResourceManager(JPAResourceManager*, u8);
|
||||
void clearResourceManager(u8);
|
||||
void calcYBBCam();
|
||||
JPAResourceManager* getResourceManager(u16 idx) { return pResMgrAry[idx]; }
|
||||
JPAResourceManager* getResourceManager(u16 idx) const { return pResMgrAry[idx]; }
|
||||
JPAResourceManager* getResourceManager(u8 res_mgr_id) const {
|
||||
JUT_ASSERT(147, res_mgr_id < ridMax);
|
||||
return pResMgrAry[res_mgr_id];
|
||||
}
|
||||
int getEmitterNumber() const { return emtrNum - mFreeEmtrList.getNumLinks(); }
|
||||
|
||||
public:
|
||||
/* 0x00 */ JSUList<JPABaseEmitter>* pEmtrUseList;
|
||||
|
||||
@@ -27,12 +27,14 @@ public:
|
||||
bool canCreateChild(JPAEmitterWorkData*);
|
||||
f32 getWidth(JPABaseEmitter const*) const;
|
||||
f32 getHeight(JPABaseEmitter const*) const;
|
||||
int getAge() { return mAge; }
|
||||
int getAge() const { return mAge; }
|
||||
void setOffsetPosition(const JGeometry::TVec3<f32>& pos) { mOffsetPosition.set(pos); }
|
||||
void setOffsetPosition(f32 x, f32 y, f32 z) { mOffsetPosition.set(x, y, z); }
|
||||
void getOffsetPosition(JGeometry::TVec3<f32>& pos) { pos.set(mOffsetPosition); }
|
||||
void getOffsetPosition(JGeometry::TVec3<f32>* pos) const { pos->set(mOffsetPosition); }
|
||||
u16 getRotateAngle() const { return mRotateAngle; }
|
||||
void getGlobalPosition(JGeometry::TVec3<f32>& pos) const { 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; }
|
||||
@@ -42,7 +44,9 @@ 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 getLocalPosition(JGeometry::TVec3<f32>* vec) const { vec->set(mLocalPosition); }
|
||||
void getBaseAxis(JGeometry::TVec3<f32>& vec) const { vec.set(mBaseAxis); }
|
||||
void getBaseAxis(JGeometry::TVec3<f32>* vec) const { vec->set(mBaseAxis); }
|
||||
|
||||
public:
|
||||
/* 0x00 */ JGeometry::TVec3<f32> mPosition;
|
||||
|
||||
Reference in New Issue
Block a user