Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
J3DShapeMtx.h
Go to the documentation of this file.
1#ifndef J3DSHAPEMTX_H
2#define J3DSHAPEMTX_H
3
4#include "dolphin/mtx.h"
5
6class J3DTexMtx;
8
14public:
15 Mtx& getMtx(u16 idx) { return mpTexMtx[idx]; }
16 Mtx44& getEffectMtx(u16 idx) { return mpEffectMtx[idx]; }
18 void setMtx(u16 idx, Mtx const* mtx) { MTXCopy(*mtx, mpTexMtx[idx]); }
19
20 /* 0x00 */ Mtx* mpTexMtx;
21 /* 0x04 */ Mtx44* mpEffectMtx;
22 /* 0x08 */ u16 mTexMtxNum;
23};
24
30public:
31 /* 8031322C */ static void loadExecute(f32 const (*)[4]);
32
33 static inline void load(Mtx m) {
34 if (sTexGenBlock != NULL)
36 }
37
40};
41
42class J3DShapeMtx;
44
50public:
54
55 /* 803130E4 */ void loadMtxIndx_PNGP(int, u16) const;
56 /* 80313128 */ void loadMtxIndx_PCPU(int, u16) const;
57 /* 80313188 */ void loadMtxIndx_NCPU(int, u16) const;
58 /* 803131D4 */ void loadMtxIndx_PNCPU(int, u16) const;
59
60 /* 80314798 */ virtual ~J3DShapeMtx() {}
61 /* 803147E0 */ virtual u32 getType() const { return 'SMTX'; }
62 /* 80273E08 */ virtual u32 getUseMtxNum() const { return 1; }
63 /* 8031459C */ virtual u32 getUseMtxIndex(u16) const { return mUseMtxIndex; }
64 /* 80313B94 */ virtual void load() const;
65 /* 80313BF0 */ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
72 static u8 sLODFlag;
74
76 static void setLODFlag(u8 flag) { sLODFlag = flag; }
77 static u8 getLODFlag() { return sLODFlag; }
78 static void resetMtxLoadCache();
79
80protected:
81 /* 0x04 */ u16 mUseMtxIndex;
82};
83
86
92public:
96
97 /* 80314730 */ virtual ~J3DShapeMtxConcatView() {}
98 /* 803147E0 */ virtual u32 getType() const { return 'SMCV'; }
99 /* 80313C54 */ virtual void load() const;
100 /* 80314598 */ virtual void loadNrmMtx(int, u16) const {}
101 /* 80313D28 */ virtual void loadNrmMtx(int, u16, f32 (*)[4]) const;
102
103 /* 80313828 */ void loadMtxConcatView_PNGP(int, u16) const;
104 /* 803138C8 */ void loadMtxConcatView_PCPU(int, u16) const;
105 /* 8031396C */ void loadMtxConcatView_NCPU(int, u16) const;
106 /* 80313A14 */ void loadMtxConcatView_PNCPU(int, u16) const;
107 /* 80313AC8 */ void loadMtxConcatView_PNGP_LOD(int, u16) const;
108
111 static MtxP sMtxPtrTbl[2];
112};
113
119public:
123
124 /* 80314520 */ virtual ~J3DShapeMtxYBBoardConcatView() {}
125 /* 803147E0 */ virtual u32 getType() const { return 'SMYB'; }
126 /* 803143E4 */ virtual void load() const;
127};
128
134public:
138
139 /* 803145A4 */ virtual ~J3DShapeMtxBBoardConcatView() {}
140 /* 803147E0 */ virtual u32 getType() const { return 'SMBB'; }
141 /* 803142D4 */ virtual void load() const;
142};
143
149public:
155
156 /* 803146B0 */ virtual ~J3DShapeMtxMulti() {}
157 /* 803147E0 */ virtual u32 getType() const { return 'SMML'; }
158 /* 80273E08 */ virtual u32 getUseMtxNum() const { return mUseMtxNum; }
159 /* 8031459C */ virtual u32 getUseMtxIndex(u16 no) const { return mUseMtxIndexTable[no]; }
160 /* 80313E4C */ virtual void load() const;
161 /* 80313EEC */ virtual void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
162
163private:
164 /* 0x8 */ u16 mUseMtxNum;
166};
167
173public:
179
180 /* 8031461C */ virtual ~J3DShapeMtxMultiConcatView() {}
181 /* 803147E0 */ virtual u32 getType() const { return 'SMMC'; }
182 /* 80273E08 */ virtual u32 getUseMtxNum() const { return mUseMtxNum; }
183 /* 8031459C */ virtual u32 getUseMtxIndex(u16 no) const { return mUseMtxIndexTable[no]; }
184 /* 80313FA4 */ virtual void load() const;
185 /* 803146AC */ virtual void loadNrmMtx(int, u16) const {}
186 /* 8031419C */ virtual void loadNrmMtx(int, u16, f32 (*)[4]) const;
187
188private:
189 /* 0x8 */ u16 mUseMtxNum;
191};
192
193#endif /* J3DSHAPEMTX_H */
void(J3DShapeMtxConcatView::* J3DShapeMtxConcatView_LoadFunc)(int, u16) const
Definition J3DShapeMtx.h:85
void(J3DShapeMtx::* J3DShapeMtx_LoadFunc)(int, u16) const
Definition J3DShapeMtx.h:43
static Mtx mtx[10]
Definition c_lib.cpp:347
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition J3DShapeMtx.h:29
static J3DTexMtxObj * sTexMtxObj
Definition J3DShapeMtx.h:39
static void loadExecute(f32 const (*)[4])
Definition J3DShapeMtx.cpp:113
static void load(Mtx m)
Definition J3DShapeMtx.h:33
static J3DTexGenBlock * sTexGenBlock
Definition J3DShapeMtx.h:38
Definition J3DShapeMtx.h:133
J3DShapeMtxBBoardConcatView(u16 useMtxIndex)
Definition J3DShapeMtx.h:135
virtual u32 getType() const
Definition J3DShapeMtx.h:140
virtual void load() const
Definition J3DShapeMtx.cpp:528
virtual ~J3DShapeMtxBBoardConcatView()
Definition J3DShapeMtx.h:139
Definition J3DShapeMtx.h:91
virtual ~J3DShapeMtxConcatView()
Definition J3DShapeMtx.h:97
void loadMtxConcatView_PNCPU(int, u16) const
Definition J3DShapeMtx.cpp:351
void loadMtxConcatView_PNGP(int, u16) const
Definition J3DShapeMtx.cpp:319
virtual u32 getType() const
Definition J3DShapeMtx.h:98
static MtxP sMtxPtrTbl[2]
Definition J3DShapeMtx.h:111
virtual void loadNrmMtx(int, u16, f32(*)[4]) const
static J3DShapeMtxConcatView_LoadFunc sMtxLoadLODPipeline[4]
Definition J3DShapeMtx.h:75
static J3DShapeMtxConcatView_LoadFunc sMtxLoadPipeline[4]
Definition J3DShapeMtx.h:66
J3DShapeMtxConcatView(u16 useMtxIndex)
Definition J3DShapeMtx.h:93
virtual void loadNrmMtx(int, u16) const
Definition J3DShapeMtx.h:100
void loadMtxConcatView_NCPU(int, u16) const
Definition J3DShapeMtx.cpp:339
void loadMtxConcatView_PNGP_LOD(int, u16) const
Definition J3DShapeMtx.cpp:365
virtual void load() const
Definition J3DShapeMtx.cpp:388
void loadMtxConcatView_PCPU(int, u16) const
Definition J3DShapeMtx.cpp:329
Definition J3DShapeMtx.h:172
u16 * mUseMtxIndexTable
Definition J3DShapeMtx.h:190
virtual ~J3DShapeMtxMultiConcatView()
Definition J3DShapeMtx.h:180
u16 mUseMtxNum
Definition J3DShapeMtx.h:189
virtual u32 getUseMtxIndex(u16 no) const
Definition J3DShapeMtx.h:183
J3DShapeMtxMultiConcatView(u16 useMtxIndex, u16 useMtxNum, u16 *useMtxIndexTable)
Definition J3DShapeMtx.h:174
virtual u32 getType() const
Definition J3DShapeMtx.h:181
virtual void load() const
Definition J3DShapeMtx.cpp:456
virtual void loadNrmMtx(int, u16) const
Definition J3DShapeMtx.h:185
virtual u32 getUseMtxNum() const
Definition J3DShapeMtx.h:182
virtual void loadNrmMtx(int, u16, f32(*)[4]) const
Definition J3DShapeMtx.h:148
u16 mUseMtxNum
Definition J3DShapeMtx.h:164
virtual void calcNBTScale(Vec const &, f32(*)[3][3], f32(*)[3][3])
Definition J3DShapeMtx.cpp:444
virtual u32 getUseMtxIndex(u16 no) const
Definition J3DShapeMtx.h:159
J3DShapeMtxMulti(u16 useMtxIndex, u16 useMtxNum, u16 *useMtxIndexTable)
Definition J3DShapeMtx.h:150
u16 * mUseMtxIndexTable
Definition J3DShapeMtx.h:165
virtual u32 getUseMtxNum() const
Definition J3DShapeMtx.h:158
virtual ~J3DShapeMtxMulti()
Definition J3DShapeMtx.h:156
virtual void load() const
Definition J3DShapeMtx.cpp:431
virtual u32 getType() const
Definition J3DShapeMtx.h:157
Definition J3DShapeMtx.h:118
virtual u32 getType() const
Definition J3DShapeMtx.h:125
J3DShapeMtxYBBoardConcatView(u16 useMtxIndex)
Definition J3DShapeMtx.h:120
virtual ~J3DShapeMtxYBBoardConcatView()
Definition J3DShapeMtx.h:124
virtual void load() const
Definition J3DShapeMtx.cpp:557
Definition J3DShapeMtx.h:49
static u32 sCurrentPipeline
Definition J3DShapeMtx.h:69
static u8 * sCurrentScaleFlag
Definition J3DShapeMtx.h:70
void loadMtxIndx_PCPU(int, u16) const
Definition J3DShapeMtx.cpp:40
static u8 sNBTFlag
Definition J3DShapeMtx.h:71
static u8 getLODFlag()
Definition J3DShapeMtx.h:77
void loadMtxIndx_PNCPU(int, u16) const
Definition J3DShapeMtx.cpp:52
static u16 sMtxLoadCache[10]
Definition J3DShapeMtx.h:68
static u8 sLODFlag
Definition J3DShapeMtx.h:72
u16 mUseMtxIndex
Definition J3DShapeMtx.h:81
static void resetMtxLoadCache()
Definition J3DShapeMtx.cpp:18
virtual void load() const
Definition J3DShapeMtx.cpp:375
virtual u32 getUseMtxNum() const
Definition J3DShapeMtx.h:62
static void setCurrentPipeline(u32 pipeline)
Definition J3DShapeMtx.h:75
void loadMtxIndx_NCPU(int, u16) const
Definition J3DShapeMtx.cpp:46
J3DShapeMtx(u16 useMtxIndex)
Definition J3DShapeMtx.h:51
static void setLODFlag(u8 flag)
Definition J3DShapeMtx.h:76
virtual void calcNBTScale(Vec const &, f32(*)[3][3], f32(*)[3][3])
Definition J3DShapeMtx.cpp:382
static J3DShapeMtx_LoadFunc sMtxLoadPipeline[4]
Definition J3DShapeMtx.h:58
static u32 sTexMtxLoadType
Definition J3DShapeMtx.h:73
void loadMtxIndx_PNGP(int, u16) const
Definition J3DShapeMtx.cpp:32
virtual u32 getUseMtxIndex(u16) const
Definition J3DShapeMtx.h:63
virtual ~J3DShapeMtx()
Definition J3DShapeMtx.h:60
virtual u32 getType() const
Definition J3DShapeMtx.h:61
Definition J3DMatBlock.h:66
Definition J3DShapeMtx.h:13
u16 mTexMtxNum
Definition J3DShapeMtx.h:22
Mtx * mpTexMtx
Definition J3DShapeMtx.h:20
u16 getNumTexMtx()
Definition J3DShapeMtx.h:17
Mtx & getMtx(u16 idx)
Definition J3DShapeMtx.h:15
Mtx44 & getEffectMtx(u16 idx)
Definition J3DShapeMtx.h:16
Mtx44 * mpEffectMtx
Definition J3DShapeMtx.h:21
void setMtx(u16 idx, Mtx const *mtx)
Definition J3DShapeMtx.h:18
Definition J3DTexture.h:40
static volatile BOOL flag
Definition dspproc.cpp:20
int m
Definition e_atan2.c:62
f32 Mtx44[4][4]
Definition mtx44.h:6
f32(* MtxP)[4]
Definition mtx.h:18
f32 Mtx[3][4]
Definition mtx.h:15
Definition d_a_hozelda.cpp:18
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8