summaryrefslogtreecommitdiff
path: root/include/JSystem/J3DGraphBase
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2022-04-23 22:17:28 -0700
committerJasper St. Pierre <jstpierre@mecheye.net>2022-04-24 01:57:11 -0700
commitf1f9cc713d57df482fc8ea1ec6b73a928f088d21 (patch)
treea6eab74f0539f116bea58e561010eee7936aab70 /include/JSystem/J3DGraphBase
parentfb8b3251d6eeea44510e0bae251e63b122f56b36 (diff)
J3DShape/J3DShapeMtx: More work
Diffstat (limited to 'include/JSystem/J3DGraphBase')
-rw-r--r--include/JSystem/J3DGraphBase/J3DShape.h2
-rw-r--r--include/JSystem/J3DGraphBase/J3DShapeMtx.h31
-rw-r--r--include/JSystem/J3DGraphBase/J3DSys.h3
3 files changed, 22 insertions, 14 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DShape.h b/include/JSystem/J3DGraphBase/J3DShape.h
index e2d0cccae9..5bac7d8ddf 100644
--- a/include/JSystem/J3DGraphBase/J3DShape.h
+++ b/include/JSystem/J3DGraphBase/J3DShape.h
@@ -58,7 +58,7 @@ public:
/* 80314BB8 */ void addTexMtxIndexInDL(_GXAttr, u32);
/* 80314CBC */ void addTexMtxIndexInVcd(_GXAttr);
/* 80314DA8 */ void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
- /* 80314E28 */ void countBumpMtxNum() const;
+ /* 80314E28 */ u32 countBumpMtxNum() const;
/* 80314EEC */ void loadVtxArray() const;
/* 80314F5C */ bool isSameVcdVatCmd(J3DShape*);
/* 80314F98 */ void makeVtxArrayCmd();
diff --git a/include/JSystem/J3DGraphBase/J3DShapeMtx.h b/include/JSystem/J3DGraphBase/J3DShapeMtx.h
index 4b0249ac4c..0a346b2068 100644
--- a/include/JSystem/J3DGraphBase/J3DShapeMtx.h
+++ b/include/JSystem/J3DGraphBase/J3DShapeMtx.h
@@ -9,7 +9,12 @@ class J3DTexGenBlock;
class J3DDifferedTexMtx {
public:
- /* 8031322C */ void loadExecute(f32 const (*)[4]);
+ /* 8031322C */ static void loadExecute(f32 const (*)[4]);
+
+ static inline void load(Mtx m) {
+ if (sTexGenBlock != NULL)
+ loadExecute(m);
+ }
static J3DTexGenBlock* sTexGenBlock;
static J3DTexMtx* sTexMtxObj;
@@ -26,9 +31,9 @@ public:
/* 803131D4 */ void loadMtxIndx_PNCPU(int, u16) const;
/* 80314798 */ virtual ~J3DShapeMtx();
- /* 803147E0 */ virtual void getType() const;
- /* 80273E08 */ virtual bool getUseMtxNum() const;
- /* 8031459C */ virtual void getUseMtxIndex(u16) const;
+ /* 803147E0 */ virtual u32 getType() const;
+ /* 80273E08 */ virtual u32 getUseMtxNum() const;
+ /* 8031459C */ virtual u32 getUseMtxIndex(u16) const;
/* 80313B94 */ virtual void load() const;
/* 80313BF0 */ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
@@ -50,7 +55,7 @@ private:
class J3DShapeMtxConcatView : public J3DShapeMtx {
public:
/* 80314730 */ virtual ~J3DShapeMtxConcatView();
- /* 8031478C */ virtual void getType() const;
+ /* 803147E0 */ virtual u32 getType() const;
/* 80313C54 */ virtual void load() const;
/* 80314598 */ virtual void loadNrmMtx(int, u16) const;
/* 80313D28 */ virtual void loadNrmMtx(int, u16, f32 (*)[4]) const;
@@ -69,23 +74,23 @@ public:
class J3DShapeMtxYBBoardConcatView : public J3DShapeMtxConcatView {
public:
/* 80314520 */ virtual ~J3DShapeMtxYBBoardConcatView();
- /* 8031458C */ virtual void getType() const;
+ /* 803147E0 */ virtual u32 getType() const;
/* 803143E4 */ virtual void load() const;
};
class J3DShapeMtxBBoardConcatView : public J3DShapeMtxConcatView {
public:
/* 803145A4 */ virtual ~J3DShapeMtxBBoardConcatView();
- /* 80314610 */ virtual void getType() const;
+ /* 803147E0 */ virtual u32 getType() const;
/* 803142D4 */ virtual void load() const;
};
class J3DShapeMtxMulti : public J3DShapeMtx {
public:
/* 803146B0 */ virtual ~J3DShapeMtxMulti();
- /* 8031470C */ virtual void getType() const;
- /* 80314718 */ virtual void getUseMtxNum() const;
- /* 80314720 */ virtual void getUseMtxIndex(u16) const;
+ /* 803147E0 */ virtual u32 getType() const;
+ /* 80273E08 */ virtual u32 getUseMtxNum() const;
+ /* 8031459C */ virtual u32 getUseMtxIndex(u16) const;
/* 80313E4C */ virtual void load() const;
/* 80313EEC */ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
@@ -97,9 +102,9 @@ private:
class J3DShapeMtxMultiConcatView : public J3DShapeMtx {
public:
/* 8031461C */ virtual ~J3DShapeMtxMultiConcatView();
- /* 80314688 */ virtual void getType() const;
- /* 80314694 */ virtual void getUseMtxNum() const;
- /* 8031469C */ virtual void getUseMtxIndex(u16) const;
+ /* 803147E0 */ virtual u32 getType() const;
+ /* 80273E08 */ virtual u32 getUseMtxNum() const;
+ /* 8031459C */ virtual u32 getUseMtxIndex(u16) const;
/* 80313FA4 */ virtual void load() const;
/* 803146AC */ virtual void loadNrmMtx(int, u16) const;
/* 8031419C */ virtual void loadNrmMtx(int, u16, f32 (*)[4]) const;
diff --git a/include/JSystem/J3DGraphBase/J3DSys.h b/include/JSystem/J3DGraphBase/J3DSys.h
index c06c9a5777..a4bded7e42 100644
--- a/include/JSystem/J3DGraphBase/J3DSys.h
+++ b/include/JSystem/J3DGraphBase/J3DSys.h
@@ -118,6 +118,9 @@ struct J3DSys {
// Type 1: Xlu Buffer
J3DDrawBuffer* getDrawBuffer(int type) { return mDrawBuffer[type]; }
+ Mtx& getModelDrawMtx(u16 no) const { return mModelDrawMtx[no]; }
+ J3DShapePacket* getShapePacket() const { return mShapePacket; }
+
void setViewMtx(Mtx m) { PSMTXCopy(m, mViewMtx); }
static Mtx mCurrentMtx;