Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
J3DMaterialFactory_v21.h
Go to the documentation of this file.
1#ifndef J3DMATERIALFACTORY_V21_H
2#define J3DMATERIALFACTORY_V21_H
3
7
8class J3DMaterial;
11
17 /* 0x000 */ u8 mMaterialMode;
18 /* 0x001 */ u8 mCullModeIdx;
19 /* 0x002 */ u8 mColorChanNumIdx;
20 /* 0x003 */ u8 mTexGenNumIdx;
21 /* 0x004 */ u8 mTevStageNumIdx;
22 /* 0x005 */ u8 mZCompLocIdx;
23 /* 0x006 */ u8 mZModeIdx;
24 /* 0x007 */ u8 mDitherIdx;
25 /* 0x008 */ u16 mMatColorIdx[2];
26 /* 0x00C */ u16 mColorChanIdx[4];
27 /* 0x014 */ u16 mTexCoordIdx[8];
28 /* 0x024 */ u8 field_0x038[0x10];
29 /* 0x034 */ u16 mTexMtxIdx[8];
30 /* 0x044 */ u8 field_0x058[0x2c];
31 /* 0x070 */ u16 mTexNoIdx[8];
32 /* 0x080 */ u16 mTevKColorIdx[4];
33 /* 0x088 */ u8 mTevKColorSel[0x10];
34 /* 0x098 */ u8 mTevKAlphaSel[0x10];
35 /* 0x0A8 */ u16 mTevOrderIdx[0x10];
36 /* 0x0C8 */ u16 mTevColorIdx[4];
37 /* 0x0D0 */ u16 mTevStageIdx[0x10];
38 /* 0x0F0 */ u16 mTevSwapModeIdx[0x10];
39 /* 0x110 */ u16 mTevSwapModeTableIdx[4];
40 /* 0x118 */ u8 field_0x12c[0x18];
41 /* 0x130 */ u16 mFogIdx;
42 /* 0x132 */ u16 mAlphaCompIdx;
43 /* 0x134 */ u16 mBlendIdx;
44 /* 0x136 */ u16 mNBTScaleIdx;
45}; // size 0x138
46
52public:
53 /* 80332DA4 */ J3DMaterialFactory_v21(J3DMaterialBlock_v21 const&);
54 /* 80332F84 */ u16 countUniqueMaterials();
55 /* 80332FA8 */ u32 countTexGens(int) const;
56 /* 80332FE0 */ u32 countStages(int) const;
57 /* 80333068 */ J3DMaterial* create(J3DMaterial*, int, u32) const;
58 /* 803337D8 */ J3DGXColor newMatColor(int, int) const;
59 /* 80333834 */ u8 newColorChanNum(int) const;
60 /* 8033386C */ J3DColorChan newColorChan(int, int) const;
61 /* 80333A10 */ u32 newTexGenNum(int) const;
62 /* 80333A48 */ J3DTexCoord newTexCoord(int, int) const;
63 /* 80333AA8 */ J3DTexMtx* newTexMtx(int, int) const;
64 /* 80333B30 */ u8 newCullMode(int) const;
65 /* 80333B70 */ u16 newTexNo(int, int) const;
66 /* 80333BB8 */ J3DTevOrder newTevOrder(int, int) const;
67 /* 80333C04 */ J3DGXColorS10 newTevColor(int, int) const;
68 /* 80333C74 */ J3DGXColor newTevKColor(int, int) const;
69 /* 80333CD0 */ u8 newTevStageNum(int) const;
70 /* 80333D08 */ J3DTevStage newTevStage(int, int) const;
71 /* 80333D68 */ J3DTevSwapModeTable newTevSwapModeTable(int, int) const;
72 /* 80333E04 */ J3DFog newFog(int) const;
73 /* 80333EE0 */ J3DAlphaComp newAlphaComp(int) const;
74 /* 80333F60 */ J3DBlend newBlend(int) const;
75 /* 80333FA4 */ J3DZMode newZMode(int) const;
76 /* 80334004 */ u8 newZCompLoc(int) const;
77 /* 8033403C */ u8 newDither(int) const;
78 /* 80334074 */ J3DNBTScale newNBTScale(int) const;
79
80 u16 getMaterialID(u16 idx) { return mpMaterialID[idx]; }
82
83 static int getMdlDataFlag_TevStageNum(u32 flags) { return (flags >> 0x10) & 0x1f; }
84 static int getMdlDataFlag_TexGenFlag(u32 flags) { return flags & 0x0c000000; }
85 static u32 getMdlDataFlag_ColorFlag(u32 flags) { return flags & 0xc0000000; }
86 static u32 getMdlDataFlag_PEFlag(u32 flags) { return flags & 0x30000000; }
87
88 /* 0x00 */ u16 mMaterialNum;
90 /* 0x08 */ u16* mpMaterialID;
91 /* 0x0C */ GXColor* mpMatColor;
92 /* 0x10 */ u8* mpColorChanNum;
94 /* 0x18 */ u8* mpTexGenNum;
99 /* 0x2C */ u16* mpTexNo;
103 /* 0x3C */ GXColor* mpTevKColor;
104 /* 0x40 */ u8* mpTevStageNum;
112 /* 0x60 */ u8* mpZCompLoc;
113 /* 0x64 */ u8* mpDither;
115 /* 0x6C */ u16 field_0x6c;
116 /* 0x6E */ u8 field_0x6e;
117 /* 0x6F */ u8 field_0x6f;
118};
119
120#endif /* J3DMATERIALFACTORY_V21_H */
enum _GXCullMode GXCullMode
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition J3DShape.h:12
Definition J3DMaterialFactory_v21.h:51
static u32 getMdlDataFlag_PEFlag(u32 flags)
Definition J3DMaterialFactory_v21.h:86
u16 * mpTexNo
Definition J3DMaterialFactory_v21.h:99
u8 getMaterialMode(int idx) const
Definition J3DMaterialFactory_v21.h:81
u8 field_0x6f
Definition J3DMaterialFactory_v21.h:117
J3DTevSwapModeTable newTevSwapModeTable(int, int) const
Definition J3DMaterialFactory_v21.cpp:318
static int getMdlDataFlag_TexGenFlag(u32 flags)
Definition J3DMaterialFactory_v21.h:84
u32 countStages(int) const
Definition J3DMaterialFactory_v21.cpp:61
J3DNBTScale newNBTScale(int) const
Definition J3DMaterialFactory_v21.cpp:388
u16 mMaterialNum
Definition J3DMaterialFactory_v21.h:88
u8 newZCompLoc(int) const
Definition J3DMaterialFactory_v21.cpp:368
J3DGXColor newTevKColor(int, int) const
Definition J3DMaterialFactory_v21.cpp:285
u8 * mpZCompLoc
Definition J3DMaterialFactory_v21.h:112
J3DTexCoord newTexCoord(int, int) const
Definition J3DMaterialFactory_v21.cpp:222
J3DTevStageInfo * mpTevStageInfo
Definition J3DMaterialFactory_v21.h:105
u16 newTexNo(int, int) const
Definition J3DMaterialFactory_v21.cpp:252
u32 newTexGenNum(int) const
Definition J3DMaterialFactory_v21.cpp:212
J3DGXColor newMatColor(int, int) const
Definition J3DMaterialFactory_v21.cpp:178
u16 getMaterialID(u16 idx)
Definition J3DMaterialFactory_v21.h:80
u8 * mpDither
Definition J3DMaterialFactory_v21.h:113
u8 * mpTevStageNum
Definition J3DMaterialFactory_v21.h:104
J3DTexCoord2Info * mpTexCoord2Info
Definition J3DMaterialFactory_v21.h:96
u8 field_0x6e
Definition J3DMaterialFactory_v21.h:116
J3DBlendInfo * mpBlendInfo
Definition J3DMaterialFactory_v21.h:110
J3DZMode newZMode(int) const
Definition J3DMaterialFactory_v21.cpp:358
J3DAlphaCompInfo * mpAlphaCompInfo
Definition J3DMaterialFactory_v21.h:109
J3DTevSwapModeInfo * mpTevSwapModeInfo
Definition J3DMaterialFactory_v21.h:106
J3DTevOrderInfo * mpTevOrderInfo
Definition J3DMaterialFactory_v21.h:101
J3DMaterialInitData_v21 * mpMaterialInitData
Definition J3DMaterialFactory_v21.h:89
J3DFog newFog(int) const
Definition J3DMaterialFactory_v21.cpp:328
J3DTexMtxInfo * field_0x28
Definition J3DMaterialFactory_v21.h:98
GXColor * mpMatColor
Definition J3DMaterialFactory_v21.h:91
GXCullMode * mpCullMode
Definition J3DMaterialFactory_v21.h:100
u8 newColorChanNum(int) const
Definition J3DMaterialFactory_v21.cpp:190
J3DColorChanInfo * mpColorChanInfo
Definition J3DMaterialFactory_v21.h:93
J3DBlend newBlend(int) const
Definition J3DMaterialFactory_v21.cpp:348
u8 * mpColorChanNum
Definition J3DMaterialFactory_v21.h:92
J3DColorChan newColorChan(int, int) const
Definition J3DMaterialFactory_v21.cpp:202
J3DFogInfo * mpFogInfo
Definition J3DMaterialFactory_v21.h:108
J3DMaterial * create(J3DMaterial *, int, u32) const
Definition J3DMaterialFactory_v21.cpp:87
u8 newTevStageNum(int) const
Definition J3DMaterialFactory_v21.cpp:297
J3DTevSwapModeTableInfo * mpTevSwapModeTableInfo
Definition J3DMaterialFactory_v21.h:107
u8 newCullMode(int) const
Definition J3DMaterialFactory_v21.cpp:242
GXColorS10 * mpTevColor
Definition J3DMaterialFactory_v21.h:102
J3DTexCoordInfo * mpTexCoordInfo
Definition J3DMaterialFactory_v21.h:95
J3DTexMtxInfo * mpTexMtxInfo
Definition J3DMaterialFactory_v21.h:97
J3DTexMtx * newTexMtx(int, int) const
Definition J3DMaterialFactory_v21.cpp:232
J3DAlphaComp newAlphaComp(int) const
Definition J3DMaterialFactory_v21.cpp:339
static int getMdlDataFlag_TevStageNum(u32 flags)
Definition J3DMaterialFactory_v21.h:83
u8 newDither(int) const
Definition J3DMaterialFactory_v21.cpp:378
J3DNBTScaleInfo * mpNBTScaleInfo
Definition J3DMaterialFactory_v21.h:114
u16 countUniqueMaterials()
Definition J3DMaterialFactory_v21.cpp:44
u16 field_0x6c
Definition J3DMaterialFactory_v21.h:115
J3DTevStage newTevStage(int, int) const
Definition J3DMaterialFactory_v21.cpp:307
GXColor * mpTevKColor
Definition J3DMaterialFactory_v21.h:103
u16 * mpMaterialID
Definition J3DMaterialFactory_v21.h:90
static u32 getMdlDataFlag_ColorFlag(u32 flags)
Definition J3DMaterialFactory_v21.h:85
J3DZModeInfo * mpZModeInfo
Definition J3DMaterialFactory_v21.h:111
J3DGXColorS10 newTevColor(int, int) const
Definition J3DMaterialFactory_v21.cpp:272
u8 * mpTexGenNum
Definition J3DMaterialFactory_v21.h:94
J3DTevOrder newTevOrder(int, int) const
Definition J3DMaterialFactory_v21.cpp:262
u32 countTexGens(int) const
Definition J3DMaterialFactory_v21.cpp:52
Definition J3DTexture.h:40
Definition J3DMatBlock.h:735
Definition J3DMatBlock.h:761
Definition J3DMatBlock.h:680
Definition J3DMatBlock.h:696
Definition J3DMatBlock.h:1123
Definition J3DMatBlock.h:1147
Definition J3DStruct.h:120
Definition J3DMatBlock.h:719
Definition J3DMatBlock.h:12
Definition J3DMatBlock.h:30
Definition J3DModelLoader.h:131
Definition J3DMaterialFactory_v21.h:16
u8 mMaterialMode
Definition J3DMaterialFactory_v21.h:17
u16 mTevSwapModeIdx[0x10]
Definition J3DMaterialFactory_v21.h:38
u16 mTexCoordIdx[8]
Definition J3DMaterialFactory_v21.h:27
u8 mTevKAlphaSel[0x10]
Definition J3DMaterialFactory_v21.h:34
u8 mTevKColorSel[0x10]
Definition J3DMaterialFactory_v21.h:33
u8 mZCompLocIdx
Definition J3DMaterialFactory_v21.h:22
u8 field_0x038[0x10]
Definition J3DMaterialFactory_v21.h:28
u16 mTevStageIdx[0x10]
Definition J3DMaterialFactory_v21.h:37
u8 mDitherIdx
Definition J3DMaterialFactory_v21.h:24
u16 mBlendIdx
Definition J3DMaterialFactory_v21.h:43
u16 mNBTScaleIdx
Definition J3DMaterialFactory_v21.h:44
u16 mTexMtxIdx[8]
Definition J3DMaterialFactory_v21.h:29
u16 mColorChanIdx[4]
Definition J3DMaterialFactory_v21.h:26
u8 field_0x12c[0x18]
Definition J3DMaterialFactory_v21.h:40
u8 mTevStageNumIdx
Definition J3DMaterialFactory_v21.h:21
u16 mMatColorIdx[2]
Definition J3DMaterialFactory_v21.h:25
u16 mTevOrderIdx[0x10]
Definition J3DMaterialFactory_v21.h:35
u8 mTexGenNumIdx
Definition J3DMaterialFactory_v21.h:20
u8 mColorChanNumIdx
Definition J3DMaterialFactory_v21.h:19
u16 mTevSwapModeTableIdx[4]
Definition J3DMaterialFactory_v21.h:39
u8 mZModeIdx
Definition J3DMaterialFactory_v21.h:23
u8 mCullModeIdx
Definition J3DMaterialFactory_v21.h:18
u16 mAlphaCompIdx
Definition J3DMaterialFactory_v21.h:42
u16 mFogIdx
Definition J3DMaterialFactory_v21.h:41
u16 mTexNoIdx[8]
Definition J3DMaterialFactory_v21.h:31
u8 field_0x058[0x2c]
Definition J3DMaterialFactory_v21.h:30
u16 mTevKColorIdx[4]
Definition J3DMaterialFactory_v21.h:32
u16 mTevColorIdx[4]
Definition J3DMaterialFactory_v21.h:36
Definition d_a_hozelda.cpp:93
Definition J3DStruct.h:138
Definition J3DMatBlock.h:51
Definition J3DTevs.h:217
Definition J3DTevs.h:234
Definition J3DTevs.h:12
Definition J3DTevs.h:67
Definition J3DTevs.h:54
Definition J3DTevs.h:41
Definition J3DTevs.h:249
Definition J3DTexture.h:68
Definition J3DTexture.h:81
Definition J3DStruct.h:93
Definition J3DMatBlock.h:632
Definition J3DMatBlock.h:645
Definition d_a_obj_sekizoa.cpp:191
Definition d_a_ep.cpp:68
unsigned long u32
Definition types.h:10
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8