summaryrefslogtreecommitdiff
path: root/include/JSystem
diff options
context:
space:
mode:
authorTakaRikka <38417346+TakaRikka@users.noreply.github.com>2021-12-05 17:15:10 -0800
committerGitHub <noreply@github.com>2021-12-05 17:15:10 -0800
commitf7916ebde17cb384c75921cf55878f5b7b305366 (patch)
treed78f1b895c9f6b515933c3549134c3be2f590eab /include/JSystem
parentcc29e8e5c961daee206ebe49543517aee901fe71 (diff)
parent751a4112a02a7ddc4f638d8300e66ab57afcde34 (diff)
Merge pull request #165 from TakaRikka/link
daAlink work
Diffstat (limited to 'include/JSystem')
-rw-r--r--include/JSystem/J2DGraph/J2DAnmLoader.h2
-rw-r--r--include/JSystem/J2DGraph/J2DPane.h1
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DAnimation.h2
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DJoint.h8
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h2
-rw-r--r--include/JSystem/J3DGraphAnimator/J3DModel.h4
-rw-r--r--include/JSystem/J3DGraphBase/J3DMaterial.h1
-rw-r--r--include/JSystem/J3DGraphBase/J3DShape.h2
-rw-r--r--include/JSystem/JMath/JMath.h8
9 files changed, 28 insertions, 2 deletions
diff --git a/include/JSystem/J2DGraph/J2DAnmLoader.h b/include/JSystem/J2DGraph/J2DAnmLoader.h
index 0c2f69d007..b6867363da 100644
--- a/include/JSystem/J2DGraph/J2DAnmLoader.h
+++ b/include/JSystem/J2DGraph/J2DAnmLoader.h
@@ -6,7 +6,7 @@
#include "dolphin/types.h"
struct J2DAnmLoaderDataBase {
- /* 80308A6C */ static void load(void const*);
+ /* 80308A6C */ static void* load(void const*);
};
class J2DAnmLoader {
diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h
index d73d42d169..a58858aa85 100644
--- a/include/JSystem/J2DGraph/J2DPane.h
+++ b/include/JSystem/J2DGraph/J2DPane.h
@@ -128,6 +128,7 @@ public:
void* getPointer(JSURandomInputStream* stream, u32 size, JKRArchive* archive);
void animationTransform();
void updateTransform(const J2DAnmTransform* transform);
+ void setUserInfo(u64 info) { mUserInfoTag = info; }
static f32 static_mBounds[4];
diff --git a/include/JSystem/J3DGraphAnimator/J3DAnimation.h b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
index e0b78ce035..18ff4ee9e2 100644
--- a/include/JSystem/J3DGraphAnimator/J3DAnimation.h
+++ b/include/JSystem/J3DGraphAnimator/J3DAnimation.h
@@ -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; }
diff --git a/include/JSystem/J3DGraphAnimator/J3DJoint.h b/include/JSystem/J3DGraphAnimator/J3DJoint.h
index 9cbf745d43..25a21bad57 100644
--- a/include/JSystem/J3DGraphAnimator/J3DJoint.h
+++ b/include/JSystem/J3DGraphAnimator/J3DJoint.h
@@ -29,6 +29,14 @@ public:
static J3DJoint* mJoint;
}; // Size: 0x4
+class J3DMtxCalcNoAnmBase : public J3DMtxCalc {
+public:
+ /* 8000FA8C */ virtual ~J3DMtxCalcNoAnmBase();
+};
+
+template <typename A, typename B>
+class J3DMtxCalcNoAnm : public J3DMtxCalcNoAnmBase, public A, public B {};
+
class J3DJoint;
typedef int (*J3DJointCallBack)(J3DJoint*, int);
diff --git a/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h b/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h
index 191908b869..f3c349f72a 100644
--- a/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h
+++ b/include/JSystem/J3DGraphAnimator/J3DMaterialAnm.h
@@ -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];
diff --git a/include/JSystem/J3DGraphAnimator/J3DModel.h b/include/JSystem/J3DGraphAnimator/J3DModel.h
index 290f05fe66..02c71511b1 100644
--- a/include/JSystem/J3DGraphAnimator/J3DModel.h
+++ b/include/JSystem/J3DGraphAnimator/J3DModel.h
@@ -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,8 @@ 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; }
+ void i_setBaseTRMtx(Mtx m) { PSMTXCopy(m, mBaseTransformMtx); }
// is there a better way to handle inlines with same name as non-inlines?
MtxP i_getAnmMtx(int p1) { return mMtxBuffer->getAnmMtx(p1); }
diff --git a/include/JSystem/J3DGraphBase/J3DMaterial.h b/include/JSystem/J3DGraphBase/J3DMaterial.h
index d4219a9985..5478f70764 100644
--- a/include/JSystem/J3DGraphBase/J3DMaterial.h
+++ b/include/JSystem/J3DGraphBase/J3DMaterial.h
@@ -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;
diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h
index 9410d61ab9..332acb3d15 100644
--- a/include/JSystem/J3DGraphBase/J3DShape.h
+++ b/include/JSystem/J3DGraphBase/J3DShape.h
@@ -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; }
diff --git a/include/JSystem/JMath/JMath.h b/include/JSystem/JMath/JMath.h
index d71f5de5e7..cb252d9aea 100644
--- a/include/JSystem/JMath/JMath.h
+++ b/include/JSystem/JMath/JMath.h
@@ -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) {