Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
J3DMaterial.h
Go to the documentation of this file.
1#ifndef J3DMATERIAL_H
2#define J3DMATERIAL_H
3
7#include "dolphin/types.h"
8
9class J3DJoint;
10class J3DMaterialAnm;
11
16class J3DMaterial {
17public:
18 /* 803157A0 */ static J3DColorBlock* createColorBlock(u32);
19 /* 803159A0 */ static J3DTexGenBlock* createTexGenBlock(u32);
20 /* 80315B04 */ static J3DTevBlock* createTevBlock(int);
21 /* 80315E78 */ static J3DIndBlock* createIndBlock(int);
22 /* 80315F60 */ static J3DPEBlock* createPEBlock(u32, u32);
23 /* 80316100 */ static u32 calcSizeColorBlock(u32);
24 /* 80316150 */ static u32 calcSizeTexGenBlock(u32);
25 /* 8031617C */ static u32 calcSizeTevBlock(int);
26 /* 803161C4 */ static u32 calcSizeIndBlock(int);
27 /* 803161D8 */ static u32 calcSizePEBlock(u32, u32);
28 /* 80316240 */ void initialize();
29 /* 80316290 */ u32 countDLSize();
30 /* 80316344 */ void makeDisplayList_private(J3DDisplayListObj*);
31 /* 80316AB0 */ void setCurrentMtx();
32 /* 80316AC8 */ void calcCurrentMtx();
33 /* 80316D68 */ void copy(J3DMaterial*);
34 /* 80316E90 */ s32 newSharedDisplayList(u32);
35 /* 80316F24 */ s32 newSingleSharedDisplayList(u32);
36
37 /* 803169DC */ virtual void calc(f32 const (*)[4]);
38 /* 80316A54 */ virtual void calcDiffTexMtx(f32 const (*)[4]);
39 /* 80316620 */ virtual void makeDisplayList();
40 /* 80316668 */ virtual void makeSharedDisplayList();
41 /* 8031668C */ virtual void load();
42 /* 803166DC */ virtual void loadSharedDL();
43 /* 80316740 */ virtual void patch();
44 /* 803167D8 */ virtual void diff(u32);
45 /* 80316E14 */ virtual void reset();
46 /* 80316E70 */ virtual void change();
47
50 J3DMaterial* getNext() const { return mNext; }
51 J3DShape* getShape() const { return mShape; }
52 J3DTevBlock* getTevBlock() const { return mTevBlock; }
56 J3DIndBlock* getIndBlock() const { return mIndBlock; }
57 J3DShape* getShape() { return mShape; }
58 J3DJoint* getJoint() { return mJoint; }
60 if ((u32)mMaterialAnm < 0xC0000000) {
61 return mMaterialAnm;
62 } else {
63 return NULL;
64 }
65 }
67 u16 getTexNo(u32 idx) const { return mTevBlock->getTexNo(idx); }
70 J3DFog* getFog() { return mPEBlock->getFog(); }
72 u16 getIndex() { return mIndex; }
73 bool isDrawModeOpaTexEdge() { return (mMaterialMode & 3) == 0; }
75 void onInvalid() { mInvalid = 1; }
81
89
90public:
91 /* 0x04 */ J3DMaterial* mNext;
92 /* 0x08 */ J3DShape* mShape;
93 /* 0x0C */ J3DJoint* mJoint;
94 /* 0x10 */ u32 mMaterialMode;
95 /* 0x14 */ u16 mIndex;
96 /* 0x18 */ u32 mInvalid;
97 /* 0x1C */ u32 field_0x1c;
98 /* 0x20 */ u32 mDiffFlag;
103 /* 0x34 */ J3DPEBlock* mPEBlock;
108};
109
115public:
117 /* 80316FB8 */ void initialize();
118
119 /* 80316FD8 */ virtual void makeDisplayList();
120 /* 80316FDC */ virtual void makeSharedDisplayList();
121 /* 80316FE0 */ virtual void load();
122 /* 80316FFC */ virtual void loadSharedDL();
123 /* 8031703C */ virtual void reset();
124 /* 80317040 */ virtual void change();
125};
126
132public:
134 /* 80317044 */ void initialize();
135
136 /* 803170D0 */ virtual void calc(f32 const (*)[4]);
137 /* 80317064 */ virtual void makeDisplayList();
138 /* 80317068 */ virtual void makeSharedDisplayList();
139 /* 8031706C */ virtual void load();
140 /* 80317088 */ virtual void loadSharedDL();
141 /* 803170C8 */ virtual void patch();
142 /* 803170CC */ virtual void diff(u32);
143 /* 803170D4 */ virtual void reset();
144 /* 803170D8 */ virtual void change();
145};
146
147#endif /* J3DMATERIAL_H */
static Mtx mtx[10]
Definition c_lib.cpp:347
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition J3DMatBlock.h:1203
virtual void setCullMode(u8 const *)
Definition J3DMatBlock.h:1231
Definition J3DShape.h:34
Definition J3DPacket.h:65
Definition J3DMatBlock.h:1050
Definition J3DMaterial.h:131
virtual void reset()
Definition J3DMaterial.cpp:475
virtual void load()
Definition J3DMaterial.cpp:444
virtual void calc(f32 const (*)[4])
Definition J3DMaterial.cpp:470
J3DLockedMaterial()
Definition J3DMaterial.h:133
virtual void change()
Definition J3DMaterial.cpp:480
virtual void loadSharedDL()
Definition J3DMaterial.cpp:453
virtual void makeSharedDisplayList()
Definition J3DMaterial.cpp:439
void initialize()
Definition J3DMaterial.cpp:428
virtual void patch()
Definition J3DMaterial.cpp:460
virtual void diff(u32)
Definition J3DMaterial.cpp:465
virtual void makeDisplayList()
Definition J3DMaterial.cpp:433
Definition J3DMatBlock.h:800
virtual J3DBlend * getBlend()
Definition J3DMatBlock.h:818
virtual J3DFog * getFog()
Definition J3DMatBlock.h:812
virtual J3DZMode * getZMode()
Definition J3DMatBlock.h:821
virtual void setZCompLoc(u8 const *)
Definition J3DMatBlock.h:822
Definition J3DMaterial.h:114
virtual void load()
Definition J3DMaterial.cpp:402
virtual void makeSharedDisplayList()
Definition J3DMaterial.cpp:397
virtual void reset()
Definition J3DMaterial.cpp:417
virtual void change()
Definition J3DMaterial.cpp:422
virtual void loadSharedDL()
Definition J3DMaterial.cpp:410
virtual void makeDisplayList()
Definition J3DMaterial.cpp:391
J3DPatchedMaterial()
Definition J3DMaterial.h:116
void initialize()
Definition J3DMaterial.cpp:386
Definition J3DShape.h:82
Definition J3DMatBlock.h:201
virtual void setTevColor(u32, J3DGXColorS10 const *)
Definition J3DMatBlock.h:225
virtual J3DGXColor * getTevKColor(u32)
Definition J3DMatBlock.h:230
virtual J3DGXColorS10 * getTevColor(u32)
Definition J3DMatBlock.h:227
virtual u16 getTexNo(u32) const
Definition J3DMatBlock.h:221
virtual void setTevKColor(u32, J3DGXColor const *)
Definition J3DMatBlock.h:228
virtual u8 getTevStageNum() const
Definition J3DMatBlock.h:239
Definition J3DMatBlock.h:66
virtual J3DTexMtx * getTexMtx(u32)
Definition J3DMatBlock.h:86
virtual void setTexMtx(u32, J3DTexMtx *)
Definition J3DMatBlock.h:85
virtual J3DNBTScale * getNBTScale()
Definition J3DMatBlock.h:89
virtual u32 getTexGenNum() const
Definition J3DMatBlock.h:82
virtual J3DTexCoord * getTexCoord(u32)
Definition J3DMatBlock.h:84
Definition J3DTexture.h:40
int i
Definition e_pow.c:165
Definition J3DMatBlock.h:696
Definition J3DMatBlock.h:719
Definition J3DMatBlock.h:12
Definition J3DMatBlock.h:30
Definition d_a_hozelda.cpp:239
Definition d_a_hozelda.cpp:229
Definition d_a_hozelda.cpp:93
bool isDrawModeOpaTexEdge()
Definition J3DMaterial.h:73
u8 getTevStageNum() const
Definition J3DMaterial.h:77
J3DZMode * getZMode()
Definition J3DMaterial.h:79
u16 getTexNo(u32 idx) const
Definition J3DMaterial.h:67
static u32 calcSizeColorBlock(u32)
Definition J3DMaterial.cpp:92
void setCurrentMtx()
Definition J3DMaterial.cpp:286
virtual void change()
Definition J3DMaterial.cpp:340
virtual void makeDisplayList()
Definition J3DMaterial.cpp:208
virtual void reset()
Definition J3DMaterial.cpp:329
J3DDisplayListObj * getSharedDisplayListObj() const
Definition J3DMaterial.h:55
J3DDisplayListObj * mSharedDLObj
Definition J3DMaterial.h:107
void calcCurrentMtx()
Definition J3DMaterial.cpp:292
J3DPEBlock * getPEBlock()
Definition J3DMaterial.h:74
static J3DIndBlock * createIndBlock(int)
Definition J3DMaterial.cpp:56
s32 newSingleSharedDisplayList(u32)
Definition J3DMaterial.cpp:367
u32 field_0x1c
Definition J3DMaterial.h:97
J3DColorBlock * mColorBlock
Definition J3DMaterial.h:99
static J3DColorBlock * createColorBlock(u32)
Definition J3DMaterial.cpp:11
J3DTexGenBlock * getTexGenBlock() const
Definition J3DMaterial.h:54
void setMaterialMode(u32 i_mode)
Definition J3DMaterial.h:88
J3DJoint * mJoint
Definition J3DMaterial.h:93
void setMaterialAnm(J3DMaterialAnm *i_anm)
Definition J3DMaterial.h:84
J3DMaterial * mNext
Definition J3DMaterial.h:91
J3DShape * getShape()
Definition J3DMaterial.h:57
void setTevColor(u32 i, const J3DGXColorS10 *i_color)
Definition J3DMaterial.h:82
virtual void calcDiffTexMtx(f32 const (*)[4])
Definition J3DMaterial.cpp:277
static u32 calcSizeTevBlock(int)
Definition J3DMaterial.cpp:122
u32 mDiffFlag
Definition J3DMaterial.h:98
J3DTevBlock * getTevBlock() const
Definition J3DMaterial.h:52
J3DMaterial * mpOrigMaterial
Definition J3DMaterial.h:104
J3DTexCoord * getTexCoord(u32 idx)
Definition J3DMaterial.h:78
static u32 calcSizePEBlock(u32, u32)
Definition J3DMaterial.cpp:148
void setCullMode(u8 i_mode)
Definition J3DMaterial.h:85
void setZCompLoc(u8 i_comploc)
Definition J3DMaterial.h:87
J3DColorBlock * getColorBlock() const
Definition J3DMaterial.h:53
J3DMaterial()
Definition J3DMaterial.h:48
u32 getTexGenNum() const
Definition J3DMaterial.h:76
void initialize()
Definition J3DMaterial.cpp:168
u16 mIndex
Definition J3DMaterial.h:95
J3DTevBlock * mTevBlock
Definition J3DMaterial.h:101
virtual void calc(f32 const (*)[4])
Definition J3DMaterial.cpp:265
virtual void load()
Definition J3DMaterial.cpp:221
static J3DPEBlock * createPEBlock(u32, u32)
Definition J3DMaterial.cpp:66
J3DBlend * getBlend()
Definition J3DMaterial.h:80
void onInvalid()
Definition J3DMaterial.h:75
u32 countDLSize()
Definition J3DMaterial.cpp:187
void copy(J3DMaterial *)
Definition J3DMaterial.cpp:320
s32 newSharedDisplayList(u32)
Definition J3DMaterial.cpp:348
void makeDisplayList_private(J3DDisplayListObj *)
Definition J3DMaterial.cpp:194
void setTevKColor(u32 i, const J3DGXColor *i_color)
Definition J3DMaterial.h:83
J3DIndBlock * mIndBlock
Definition J3DMaterial.h:102
J3DTexGenBlock * mTexGenBlock
Definition J3DMaterial.h:100
J3DJoint * getJoint()
Definition J3DMaterial.h:58
J3DGXColorS10 * getTevColor(u32 param_0)
Definition J3DMaterial.h:69
J3DShape * getShape() const
Definition J3DMaterial.h:51
J3DIndBlock * getIndBlock() const
Definition J3DMaterial.h:56
J3DNBTScale * getNBTScale() const
Definition J3DMaterial.h:66
J3DFog * getFog()
Definition J3DMaterial.h:70
J3DMaterialAnm * getMaterialAnm() const
Definition J3DMaterial.h:59
virtual void loadSharedDL()
Definition J3DMaterial.cpp:229
J3DCurrentMtx mCurrentMtx
Definition J3DMaterial.h:106
u32 mInvalid
Definition J3DMaterial.h:96
static u32 calcSizeTexGenBlock(u32)
Definition J3DMaterial.cpp:110
J3DMaterialAnm * mMaterialAnm
Definition J3DMaterial.h:105
u32 mMaterialMode
Definition J3DMaterial.h:94
void setTexMtx(u32 idx, J3DTexMtx *mtx)
Definition J3DMaterial.h:86
J3DPEBlock * mPEBlock
Definition J3DMaterial.h:103
J3DShape * mShape
Definition J3DMaterial.h:92
static J3DTevBlock * createTevBlock(int)
Definition J3DMaterial.cpp:41
J3DTexMtx * getTexMtx(u32 idx)
Definition J3DMaterial.h:71
J3DGXColor * getTevKColor(u32 param_0)
Definition J3DMaterial.h:68
virtual void patch()
Definition J3DMaterial.cpp:238
virtual void diff(u32)
Definition J3DMaterial.cpp:248
static J3DTexGenBlock * createTexGenBlock(u32)
Definition J3DMaterial.cpp:30
J3DMaterial * getNext() const
Definition J3DMaterial.h:50
virtual void makeSharedDisplayList()
Definition J3DMaterial.cpp:216
u16 getIndex()
Definition J3DMaterial.h:72
~J3DMaterial()
Definition J3DMaterial.h:49
static u32 calcSizeIndBlock(int)
Definition J3DMaterial.cpp:138
Definition J3DMatBlock.h:51
Definition J3DTexture.h:81
Definition J3DMatBlock.h:645
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
unsigned short u16
Definition types.h:9
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8