This commit is contained in:
TakaRikka
2021-11-10 23:54:31 -08:00
parent 74ed2da8bc
commit 70eabb12bd
47 changed files with 3777 additions and 3726 deletions
@@ -299,6 +299,8 @@ public:
virtual ~J3DFrameCtrl() {}
f32 getRate() const { return mRate; }
f32 getFrame() const { return mFrame; }
u8 getAttribute() const { return mAttribute; }
void setAttribute(u8 attr) { mAttribute = attr; }
void setEnd(s16 end) { mEnd = end; }
void setRate(f32 rate) { mRate = rate; }
@@ -124,6 +124,8 @@ public:
/* 800A4820 */ virtual ~J3DMaterialAnm();
/* 8032C3C4 */ virtual void calc(J3DMaterial*) const;
const J3DTexMtxAnm& getTexMtxAnm(int i) const { return mTexMtxAnm[i]; }
private:
/* 0x04 */ J3DMatColorAnm mMatColorAnm[2];
/* 0x14 */ J3DTexMtxAnm mTexMtxAnm[8];
+2 -1
View File
@@ -34,7 +34,7 @@ public:
/* 803281B4 */ void calcBumpMtx();
/* 803282B8 */ void calcBBoardMtx();
/* 803282EC */ void prepareShapePackets();
Mtx* getAnmMtx(int);
MtxP getAnmMtx(int);
/* 80327CA4 */ virtual void update();
/* 80327E4C */ virtual void entry();
@@ -48,6 +48,7 @@ public:
void onFlag(u32 flag) { mFlags |= flag; }
void offFlag(u32 flag) { mFlags &= ~flag; }
bool checkFlag(u32 flag) const { return (mFlags & flag) ? true : false; }
Mtx& getBaseTRMtx() { return mBaseTransformMtx; }
// is there a better way to handle inlines with same name as non-inlines?
MtxP i_getAnmMtx(int p1) { return mMtxBuffer->getAnmMtx(p1); }
@@ -49,6 +49,7 @@ public:
J3DColorBlock* getColorBlock() const { return mColorBlock; }
J3DTexGenBlock* getTexGenBlock() const { return mTexGenBlock; }
J3DDisplayListObj* getSharedDisplayListObj() const { return mSharedDLObj; }
J3DShape* getShape() { return mShape; }
J3DMaterialAnm* getMaterialAnm() const {
if ((u32)mMaterialAnm < 0xC0000000) {
return mMaterialAnm;
+2
View File
@@ -48,6 +48,8 @@ public:
void setVertexDataPointer(J3DVertexData* pVtxData) { mVertexData = pVtxData; }
void* getVcdVatCmd() const { return mVcdVatCmd; }
void setVcdVatCmd(void* pVatCmd) { mVcdVatCmd = pVatCmd; }
void show() { offFlag(1); }
void hide() { onFlag(1); }
static void resetVcdVatCache() { sOldVcdVatCmd = NULL; }
+8
View File
@@ -10,6 +10,14 @@ inline f32 JMAFastReciprocal(f32 value) {
return __fres(value);
}
inline f32 JMAFastSqrt(f32 input) {
if (input > 0.0f) {
f64 tmp = __frsqrte(input);
return tmp * input;
}
return input;
}
namespace JMath {
inline f32 fastReciprocal(f32 value) {