70 virtual bool SetupGX(
bool modulate, u8 alpha);
74 virtual void UnbindAllAnimation();
76 virtual void Animate();
85 virtual void SetAnimationEnable(
const AnimResource& animRes,
90 GXColorS10 GetTevColor(ulong idx) {
93 void SetTevColor(ulong idx,
const GXColorS10& rColor) {
94 mTevCols[idx] = rColor;
98 return mTevKCols[idx];
100 void SetTevKColor(ulong idx,
ut::Color color) {
101 mTevKCols[idx] = color;
104 u8 GetTextureNum()
const {
105 return mGXMemNum.texMap;
107 u8 GetTextureCap()
const {
108 return mGXMemCap.texMap;
110 void SetTextureNum(u8 num);
112 u8 GetTexSRTCap()
const {
113 return mGXMemCap.texSRT;
116 u8 GetTexCoordGenCap()
const {
117 return mGXMemCap.texCoordGen;
119 void SetTexCoordGenNum(u8 num);
121 u8 GetIndTexSRTCap()
const {
122 return mGXMemCap.indSRT;
125 u8 GetTevStageNum()
const {
126 return mGXMemNum.tevStage;
128 void SetTevStageNum(u8 num);
130 void SetIndStageNum(u8 num);
132 void SetColorElement(ulong idx, s16 value);
134 bool IsTevSwapCap()
const {
135 return mGXMemCap.tevSwap;
137 bool IsChanCtrlCap()
const {
138 return mGXMemCap.chanCtrl;
140 bool IsMatColorCap()
const {
141 return mGXMemCap.matCol;
143 bool IsAlphaCompareCap()
const {
144 return mGXMemCap.alpComp;
146 bool IsBlendModeCap()
const {
147 return mGXMemCap.blendMode;
150 const TexMap* GetTexMapAry()
const;
153 const TexSRT* GetTexSRTAry()
const;
159 const ChanCtrl* GetChanCtrlAry()
const;
171 const BlendMode* GetBlendModePtr()
const;
177 const TexSRT* GetIndTexSRTAry()
const;
178 TexSRT* GetIndTexSRTAry();
180 const TevStage* GetTevStageAry()
const;
183 const TexMap& GetTexture(u8 idx)
const {
184 return GetTexMapAry()[idx];
186 void GetTexture(GXTexObj* pTexObj, u8 idx)
const {
187 GetTexMapAry()[idx].Get(pTexObj);
189 void SetTexture(u8 idx,
const TexMap& rTexMap) {
190 GetTexMapAry()[idx].Set(rTexMap);
192 void SetTextureNoWrap(u8 idx,
const TexMap& rTexMap) {
193 GetTexMapAry()[idx].SetNoWrap(rTexMap);
196 const TexSRT& GetTexSRT(ulong idx)
const {
197 return GetTexSRTAry()[idx];
199 void SetTexSRT(
const TexSRT& rTexSRT, ulong idx) {
200 GetTexSRTAry()[idx] = rTexSRT;
203 void SetTexSRTElement(ulong srt, ulong idx, f32 value) {
204 f32*
const pArray =
reinterpret_cast<f32*
>(&GetTexSRTAry()[srt]);
209 GetTexCoordGenAry()[idx] = gen;
213 return GetMatColAry()[0];
216 void SetIndTexSRTElement(ulong srt, ulong idx, f32 value) {
217 f32*
const pArray =
reinterpret_cast<f32*
>(&GetIndTexSRTAry()[srt]);
221 void SetName(
const char* pName);
222 const char* GetName()
const {
226 bool IsUserAllocated()
const {
227 return mbUserAllocated;
231 static const int MAX_TEX_SRT = (GX_TEXMTX9 - GX_TEXMTX0) / 3 + 1;
232 static const int MAX_IND_SRT = (GX_ITM_2 - GX_ITM_0) + 1;
235 AnimationLinkList mAnimList;
237 GXColorS10 mTevCols[TEVCOLOR_MAX];
244 char mName[NW4R_LYT_MATERIAL_NAME_LEN + 1];
245 bool mbUserAllocated;
247 u8 PADDING_0x5A[0x5C - 0x5A];
253 void ReserveGXMem(u8 texMapNum, u8 texSrtNum, u8 texCoordGenNum,
254 u8 tevStageNum,
bool allocTevSwap, u8 indStageNum,
255 u8 indSrtNum,
bool allocChanCtrl,
bool allocMatCol,
256 bool allocAlpComp,
bool allocBlendMode);