Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
lyt_types.h
Go to the documentation of this file.
1#ifndef NW4HBM_LYT_TYPES_H
2#define NW4HBM_LYT_TYPES_H
3
4#include <revolution/types.h>
5
6#include <revolution/gx.h>
7
8#include "../math/types.h"
9#include "../ut/LinkList.h"
10
11namespace nw4hbm {
12 namespace lyt {
13 static const u32 RESOURCE_TYPE_ANIMATION = 'anim';
14 static const u32 RESOURCE_TYPE_LAYOUT = 'blyt';
15 static const u32 RESOURCE_TYPE_FONT = 'font';
16 static const u32 RESOURCE_TYPE_TEXTURE = 'timg';
17
18 enum {
23
25 };
26
27 enum {
31
33 };
34
35 enum {
40 };
41 enum {
46 };
47
48 enum {
51
53 };
54
55 enum {
58
60 };
61
62 enum {
67
72
74 };
75
76 enum {
83
85 };
86
87 enum {
90
92 };
93
94 namespace detail {
95 template <typename T>
96 const T* ConvertOffsToPtr(const void* baseAddress, unsigned offset) {
97 return reinterpret_cast<const T*>(reinterpret_cast<unsigned>(baseAddress) + offset);
98 }
99
100 template <typename T>
101 T* ConvertOffsToPtr(void* baseAddress, unsigned offset) {
102 return reinterpret_cast<T*>(reinterpret_cast<unsigned>(baseAddress) + offset);
103 }
104
105 template <typename T>
106 inline void SetBit(T* pBits, int pos, bool val) {
107 const T mask = (T)(~(1 << pos));
108 *pBits &= mask;
109 *pBits |= (val ? 1 : 0) << pos;
110 }
111
112 template <typename T>
113 inline bool TestBit(T bits, int pos) {
114 const T mask = (T)(1 << pos);
115 return 0 != (bits & mask);
116 }
117
118 template <typename T>
119 T GetBits(T bits, int pos, int len) {
120 T mask = static_cast<T>(~(-1 << len));
121 return static_cast<T>((bits >> pos) & mask);
122 }
123 } // namespace detail
124
125 typedef struct Size {
126 Size() : width(), height() {}
127
128 Size(f32 aWidth, f32 aHeight) : width(aWidth), height(aHeight) {}
129
130 Size(const Size& other) : width(other.width), height(other.height) {}
131
132 friend bool operator==(const Size& a, const Size& b) {
133 return a.width == b.width && a.height == b.height;
134 }
135
136 /* 0x00 */ f32 width;
137 /* 0x04 */ f32 height;
138 } Size; // size = 0x08
139
140 typedef struct TexSRT {
142 /* 0x08 */ f32 rotate;
143 /* 0x0C */ math::VEC2 scale;
145
147 public:
149
150 u32 GetTexMtx() const { return texMtx; }
151
152 GXTexGenType GetTexGenType() const { return static_cast<GXTexGenType>(texGenType); }
153 GXTexGenSrc GetTexGenSrc() const { return static_cast<GXTexGenSrc>(texGenSrc); }
154
155 void Set(GXTexGenType aTexGenType, GXTexGenSrc aTexGenSrc, u32 aTexMtx) {
156 texGenType = aTexGenType;
157 texGenSrc = aTexGenSrc;
158 texMtx = aTexMtx;
159 }
160
161 private:
162 /* 0x00 */ u8 texGenType;
163 /* 0x01 */ u8 texGenSrc;
164 /* 0x02 */ u8 texMtx;
165 /* 0x03 */ u8 reserve;
166 };
167
169 public:
171
172 GXTexCoordID GetTexCoordGen() const { return static_cast<GXTexCoordID>(texCoordGen); }
173
174 GXTexMapID GetTexMap() const { return static_cast<GXTexMapID>(texMap); }
175
176 GXIndTexScale GetScaleS() const { return static_cast<GXIndTexScale>(scaleS); }
177 GXIndTexScale GetScaleT() const { return static_cast<GXIndTexScale>(scaleT); }
178
179 void Set(GXTexCoordID aTexCoordGen, GXTexMapID aTexMap, GXIndTexScale aScaleS,
180 GXIndTexScale aScaleT) {
181 texCoordGen = aTexCoordGen;
182
183 texMap = aTexMap;
184 scaleS = aScaleS;
185 scaleT = aScaleT;
186 }
187
188 private:
189 /* 0x00 */ u8 texCoordGen;
190 /* 0x01 */ u8 texMap;
191 /* 0x02 */ u8 scaleS;
192 /* 0x03 */ u8 scaleT;
193 };
194
196 public:
197 GXTevColorChan GetR() const { return static_cast<GXTevColorChan>((swap) & 0x03); }
198 GXTevColorChan GetG() const { return static_cast<GXTevColorChan>((swap >> 2) & 0x03); }
199 GXTevColorChan GetB() const { return static_cast<GXTevColorChan>((swap >> 4) & 0x03); }
200 GXTevColorChan GetA() const { return static_cast<GXTevColorChan>((swap >> 6) & 0x03); }
201
203 swap = r | g << 2 | b << 4 | a << 6;
204 }
205
206 private:
207 /* 0x00 */ u8 swap;
208 };
209
211 public:
212 u8 GetA() const { return ab & 0x0F; }
213 u8 GetB() const { return (ab >> 4) & 0x0F; }
214 u8 GetC() const { return cd & 0x0F; }
215 u8 GetD() const { return (cd >> 4) & 0x0F; }
216
217 u8 GetScale() const { return (op >> 6) & 0x03; }
218 u8 GetBias() const { return (op >> 4) & 0x03; }
219 u8 GetOp() const { return op & 0x0F; }
220
221 u8 GetKSel() const { return (cl >> 3) & 0x1F; }
222 u8 GetOutReg() const { return (cl >> 1) & 0x03; }
223 bool IsClamp() const { return static_cast<bool>(cl & 0x01); }
224
225 void SetIn(u8 a, u8 b, u8 c, u8 d) {
226 ab = a | b << 4;
227 cd = c | d << 4;
228 }
229
230 void SetOp(u8 aOp, u8 bias, u8 scale, bool clamp, u8 outReg, u8 kSel) {
231 op = aOp | bias << 4 | scale << 6;
232 cl = (clamp ? 1 : 0) | outReg << 1 | kSel << 3;
233 }
234
235 private:
236 /* 0x00 */ u8 ab;
237 /* 0x01 */ u8 cd;
238 /* 0x02 */ u8 op;
239 /* 0x03 */ u8 cl;
240 };
241
242 class TevStage {
243 public:
255
256 GXTexCoordID GetTexCoordGen() const { return static_cast<GXTexCoordID>(texCoordGen); }
257 GXChannelID GetColorChan() const { return static_cast<GXChannelID>(colChan); }
258
260 return static_cast<GXTexMapID>((swapSel & 1) << 8 | texMap);
261 }
262
264 return static_cast<GXTevSwapSel>((swapSel >> 3) & 0x03);
265 }
267 return static_cast<GXTevSwapSel>((swapSel >> 1) & 0x03);
268 }
269
270 GXTevColorArg GetColorInA() const { return static_cast<GXTevColorArg>(colIn.GetA()); }
271 GXTevColorArg GetColorInB() const { return static_cast<GXTevColorArg>(colIn.GetB()); }
272 GXTevColorArg GetColorInC() const { return static_cast<GXTevColorArg>(colIn.GetC()); }
273 GXTevColorArg GetColorInD() const { return static_cast<GXTevColorArg>(colIn.GetD()); }
274
275 GXTevOp GetColorOp() const { return static_cast<GXTevOp>(colIn.GetOp()); }
276 GXTevBias GetColorBias() const { return static_cast<GXTevBias>(colIn.GetBias()); }
277 GXTevScale GetColorScale() const { return static_cast<GXTevScale>(colIn.GetScale()); }
278
279 bool IsColorClamp() const { return colIn.IsClamp(); }
280
281 GXTevRegID GetColorOutReg() const { return static_cast<GXTevRegID>(colIn.GetOutReg()); }
282
284 return static_cast<GXTevKColorSel>(colIn.GetKSel());
285 }
286
287 GXTevAlphaArg GetAlphaInA() const { return static_cast<GXTevAlphaArg>(alpIn.GetA()); }
288 GXTevAlphaArg GetAlphaInB() const { return static_cast<GXTevAlphaArg>(alpIn.GetB()); }
289 GXTevAlphaArg GetAlphaInC() const { return static_cast<GXTevAlphaArg>(alpIn.GetC()); }
290 GXTevAlphaArg GetAlphaInD() const { return static_cast<GXTevAlphaArg>(alpIn.GetD()); }
291
292 GXTevOp GetAlphaOp() const { return static_cast<GXTevOp>(alpIn.GetOp()); }
293 GXTevBias GetAlphaBias() const { return static_cast<GXTevBias>(alpIn.GetBias()); }
294 GXTevScale GetAlphaScale() const { return static_cast<GXTevScale>(alpIn.GetScale()); }
295
296 bool IsAlphaClamp() const { return alpIn.IsClamp(); }
297
298 GXTevRegID GetAlphaOutReg() const { return static_cast<GXTevRegID>(alpIn.GetOutReg()); }
299
301 return static_cast<GXTevKAlphaSel>(alpIn.GetKSel());
302 }
303
304 GXIndTexStageID GetIndStage() const { return static_cast<GXIndTexStageID>(indStage); }
306 return static_cast<GXIndTexMtxID>((indBiMt >> 3) & 0x0F);
307 }
309 return static_cast<GXIndTexBiasSel>(indBiMt & 0x07);
310 }
311
312 GXIndTexWrap GetIndWrapS() const { return static_cast<GXIndTexWrap>(indWrap & 0x07); }
314 return static_cast<GXIndTexWrap>((indWrap >> 3) & 0x07);
315 }
316
318 return static_cast<GXIndTexAlphaSel>((indFoAdUtAl >> 4) & 0x03);
319 }
320
321 bool IsIndUtcLod() const { return static_cast<bool>((indFoAdUtAl >> 3) & 0x01); }
322 bool IsIndAddPrev() const { return static_cast<bool>((indFoAdUtAl >> 2) & 0x01); }
323
325 return static_cast<GXIndTexFormat>(indFoAdUtAl & 0x03);
326 }
327
328 void SetOrder(GXTexCoordID aTexCoordGen, GXTexMapID aTexMap, GXChannelID aColChan,
329 GXTevSwapSel rasSel, GXTevSwapSel texSel) {
330 texCoordGen = aTexCoordGen;
331 colChan = aColChan;
332 texMap = aTexMap;
333 swapSel = aTexMap >> 8 | rasSel << 1 | texSel << 3;
334 }
335
339
341 GXTevRegID outReg, GXTevKColorSel kSel) {
342 colIn.SetOp(op, bias, scale, clamp, outReg, kSel);
343 }
344
348
350 GXTevRegID outReg, GXTevKAlphaSel kSel) {
351 alpIn.SetOp(op, bias, scale, clamp, outReg, kSel);
352 }
353
355 GXIndTexMtxID mtxSel, GXIndTexWrap wrapS, GXIndTexWrap wrapT,
356 bool addPrev, bool utcLod, GXIndTexAlphaSel alphaSel) {
357 indStage = stage;
358 indBiMt = biasSel | mtxSel << 3;
359 indWrap = wrapS | wrapT << 3;
361 format | (addPrev ? 1 : 0) << 2 | (utcLod ? 1 : 0) << 3 | alphaSel << 4;
362 }
363
364 private:
365 /* 0x00 */ u8 texCoordGen;
366 /* 0x01 */ u8 colChan;
367 /* 0x02 */ u8 texMap;
368 /* 0x03 */ u8 swapSel;
369 /* 0x04 */ TevStageInOp colIn;
370 /* 0x08 */ TevStageInOp alpIn;
371 /* 0x0C */ u8 indStage;
372 /* 0x0D */ u8 indBiMt;
373 /* 0x0E */ u8 indWrap;
374 /* 0x0F */ u8 indFoAdUtAl;
375 };
376
377 class ChanCtrl {
378 public:
380
381 GXColorSrc GetColorSrc() const { return static_cast<GXColorSrc>(matSrcCol); }
382 GXColorSrc GetAlphaSrc() const { return static_cast<GXColorSrc>(matSrcAlp); }
383
384 void Set(GXColorSrc colSrc, GXColorSrc alpSrc) {
385 matSrcCol = colSrc;
386 matSrcAlp = alpSrc;
387 }
388
389 private:
390 /* 0x00 */ u8 matSrcCol;
391 /* 0x01 */ u8 matSrcAlp;
392 /* 0x02 */ u8 reserve1;
393 /* 0x03 */ u8 reserve2;
394 };
395
397 public:
399
400 GXCompare GetComp0() const { return static_cast<GXCompare>(comp & 0x0F); }
401 GXCompare GetComp1() const { return static_cast<GXCompare>((comp >> 4) & 0x0F); }
402
403 GXAlphaOp GetOp() const { return static_cast<GXAlphaOp>(op); }
404
405 u8 GetRef0() const { return ref0; }
406 u8 GetRef1() const { return ref1; }
407
408 void Set(GXCompare aComp0, u8 aRef0, GXAlphaOp aOp, GXCompare aComp1, u8 aRef1) {
409 comp = aComp0 | aComp1 << 4;
410 op = aOp;
411 ref0 = aRef0;
412 ref1 = aRef1;
413 }
414
415 private:
416 /* 0x00 */ u8 comp;
417 /* 0x01 */ u8 op;
418 /* 0x02 */ u8 ref0;
419 /* 0x03 */ u8 ref1;
420 };
421
422 class BlendMode {
423 public:
425
426 GXBlendMode GetType() const { return static_cast<GXBlendMode>(type); }
427 GXBlendFactor GetSrcFactor() const { return static_cast<GXBlendFactor>(srcFactor); }
428 GXBlendFactor GetDstFactor() const { return static_cast<GXBlendFactor>(dstFactor); }
429 GXLogicOp GetOp() const { return static_cast<GXLogicOp>(op); }
430
431 void Set(GXBlendMode aType, GXBlendFactor aSrcFactor, GXBlendFactor aDstFactor,
432 GXLogicOp aOp) {
433 type = aType;
434 srcFactor = aSrcFactor;
435 dstFactor = aDstFactor;
436 op = aOp;
437 }
438
439 private:
440 /* 0x00 */ u8 type;
441 /* 0x01 */ u8 srcFactor;
442 /* 0x02 */ u8 dstFactor;
443 /* 0x03 */ u8 op;
444 };
445
446 } // namespace lyt
447} // namespace nw4hbm
448
449#endif
static s32 offset
Definition WUD.c:1669
Ordon Goat.
Definition lyt_types.h:396
GXCompare GetComp0() const
Definition lyt_types.h:400
u8 comp
Definition lyt_types.h:416
void Set(GXCompare aComp0, u8 aRef0, GXAlphaOp aOp, GXCompare aComp1, u8 aRef1)
Definition lyt_types.h:408
GXAlphaOp GetOp() const
Definition lyt_types.h:403
AlphaCompare()
Definition lyt_types.h:398
u8 GetRef1() const
Definition lyt_types.h:406
GXCompare GetComp1() const
Definition lyt_types.h:401
u8 ref1
Definition lyt_types.h:419
u8 ref0
Definition lyt_types.h:418
u8 op
Definition lyt_types.h:417
u8 GetRef0() const
Definition lyt_types.h:405
Definition lyt_types.h:422
GXBlendFactor GetDstFactor() const
Definition lyt_types.h:428
BlendMode()
Definition lyt_types.h:424
void Set(GXBlendMode aType, GXBlendFactor aSrcFactor, GXBlendFactor aDstFactor, GXLogicOp aOp)
Definition lyt_types.h:431
u8 op
Definition lyt_types.h:443
GXBlendMode GetType() const
Definition lyt_types.h:426
u8 srcFactor
Definition lyt_types.h:441
u8 type
Definition lyt_types.h:440
u8 dstFactor
Definition lyt_types.h:442
GXLogicOp GetOp() const
Definition lyt_types.h:429
GXBlendFactor GetSrcFactor() const
Definition lyt_types.h:427
Definition lyt_types.h:377
u8 matSrcCol
Definition lyt_types.h:390
ChanCtrl()
Definition lyt_types.h:379
u8 matSrcAlp
Definition lyt_types.h:391
u8 reserve2
Definition lyt_types.h:393
void Set(GXColorSrc colSrc, GXColorSrc alpSrc)
Definition lyt_types.h:384
u8 reserve1
Definition lyt_types.h:392
GXColorSrc GetAlphaSrc() const
Definition lyt_types.h:382
GXColorSrc GetColorSrc() const
Definition lyt_types.h:381
Definition lyt_types.h:168
u8 scaleS
Definition lyt_types.h:191
u8 scaleT
Definition lyt_types.h:192
u8 texCoordGen
Definition lyt_types.h:189
u8 texMap
Definition lyt_types.h:190
GXIndTexScale GetScaleS() const
Definition lyt_types.h:176
GXIndTexScale GetScaleT() const
Definition lyt_types.h:177
GXTexCoordID GetTexCoordGen() const
Definition lyt_types.h:172
GXTexMapID GetTexMap() const
Definition lyt_types.h:174
void Set(GXTexCoordID aTexCoordGen, GXTexMapID aTexMap, GXIndTexScale aScaleS, GXIndTexScale aScaleT)
Definition lyt_types.h:179
IndirectStage()
Definition lyt_types.h:170
Definition lyt_types.h:210
void SetIn(u8 a, u8 b, u8 c, u8 d)
Definition lyt_types.h:225
u8 cd
Definition lyt_types.h:237
u8 GetB() const
Definition lyt_types.h:213
u8 GetA() const
Definition lyt_types.h:212
void SetOp(u8 aOp, u8 bias, u8 scale, bool clamp, u8 outReg, u8 kSel)
Definition lyt_types.h:230
u8 GetBias() const
Definition lyt_types.h:218
u8 GetOutReg() const
Definition lyt_types.h:222
u8 cl
Definition lyt_types.h:239
u8 GetD() const
Definition lyt_types.h:215
u8 GetScale() const
Definition lyt_types.h:217
u8 ab
Definition lyt_types.h:236
u8 GetKSel() const
Definition lyt_types.h:221
bool IsClamp() const
Definition lyt_types.h:223
u8 op
Definition lyt_types.h:238
u8 GetOp() const
Definition lyt_types.h:219
u8 GetC() const
Definition lyt_types.h:214
Definition lyt_types.h:242
GXTevRegID GetColorOutReg() const
Definition lyt_types.h:281
void SetColorIn(GXTevColorArg a, GXTevColorArg b, GXTevColorArg c, GXTevColorArg d)
Definition lyt_types.h:336
GXTevColorArg GetColorInB() const
Definition lyt_types.h:271
GXTevAlphaArg GetAlphaInA() const
Definition lyt_types.h:287
GXTevColorArg GetColorInD() const
Definition lyt_types.h:273
GXTevAlphaArg GetAlphaInD() const
Definition lyt_types.h:290
void SetAlphaOp(GXTevOp op, GXTevBias bias, GXTevScale scale, bool clamp, GXTevRegID outReg, GXTevKAlphaSel kSel)
Definition lyt_types.h:349
bool IsIndAddPrev() const
Definition lyt_types.h:322
TevStageInOp alpIn
Definition lyt_types.h:370
GXTevSwapSel GetTexSwapSel() const
Definition lyt_types.h:263
GXTevRegID GetAlphaOutReg() const
Definition lyt_types.h:298
GXIndTexBiasSel GetIndBiasSel() const
Definition lyt_types.h:308
void SetIndirect(GXIndTexStageID stage, GXIndTexFormat format, GXIndTexBiasSel biasSel, GXIndTexMtxID mtxSel, GXIndTexWrap wrapS, GXIndTexWrap wrapT, bool addPrev, bool utcLod, GXIndTexAlphaSel alphaSel)
Definition lyt_types.h:354
u8 texCoordGen
Definition lyt_types.h:365
GXTevScale GetAlphaScale() const
Definition lyt_types.h:294
GXTexMapID GetTexMap() const
Definition lyt_types.h:259
void SetOrder(GXTexCoordID aTexCoordGen, GXTexMapID aTexMap, GXChannelID aColChan, GXTevSwapSel rasSel, GXTevSwapSel texSel)
Definition lyt_types.h:328
GXIndTexStageID GetIndStage() const
Definition lyt_types.h:304
GXTevBias GetAlphaBias() const
Definition lyt_types.h:293
GXIndTexMtxID GetIndMtxSel() const
Definition lyt_types.h:305
GXTevSwapSel GetRasSwapSel() const
Definition lyt_types.h:266
bool IsAlphaClamp() const
Definition lyt_types.h:296
bool IsColorClamp() const
Definition lyt_types.h:279
GXTevKColorSel GetKColorSel() const
Definition lyt_types.h:283
GXTevColorArg GetColorInA() const
Definition lyt_types.h:270
GXIndTexAlphaSel GetIndAlphaSel() const
Definition lyt_types.h:317
GXIndTexWrap GetIndWrapT() const
Definition lyt_types.h:313
u8 indFoAdUtAl
Definition lyt_types.h:374
u8 indBiMt
Definition lyt_types.h:372
u8 indStage
Definition lyt_types.h:371
GXTevOp GetAlphaOp() const
Definition lyt_types.h:292
void SetAlphaIn(GXTevAlphaArg a, GXTevAlphaArg b, GXTevAlphaArg c, GXTevAlphaArg d)
Definition lyt_types.h:345
u8 indWrap
Definition lyt_types.h:373
u8 texMap
Definition lyt_types.h:367
void SetColorOp(GXTevOp op, GXTevBias bias, GXTevScale scale, bool clamp, GXTevRegID outReg, GXTevKColorSel kSel)
Definition lyt_types.h:340
GXTevScale GetColorScale() const
Definition lyt_types.h:277
GXTevColorArg GetColorInC() const
Definition lyt_types.h:272
GXTevOp GetColorOp() const
Definition lyt_types.h:275
GXIndTexFormat GetIndFormat() const
Definition lyt_types.h:324
GXTexCoordID GetTexCoordGen() const
Definition lyt_types.h:256
GXTevAlphaArg GetAlphaInC() const
Definition lyt_types.h:289
GXTevAlphaArg GetAlphaInB() const
Definition lyt_types.h:288
GXTevBias GetColorBias() const
Definition lyt_types.h:276
TevStageInOp colIn
Definition lyt_types.h:369
u8 swapSel
Definition lyt_types.h:368
GXChannelID GetColorChan() const
Definition lyt_types.h:257
GXIndTexWrap GetIndWrapS() const
Definition lyt_types.h:312
u8 colChan
Definition lyt_types.h:366
TevStage()
Definition lyt_types.h:244
bool IsIndUtcLod() const
Definition lyt_types.h:321
GXTevKAlphaSel GetKAlphaSel() const
Definition lyt_types.h:300
Definition lyt_types.h:195
void Set(GXTevColorChan r, GXTevColorChan g, GXTevColorChan b, GXTevColorChan a)
Definition lyt_types.h:202
GXTevColorChan GetB() const
Definition lyt_types.h:199
GXTevColorChan GetA() const
Definition lyt_types.h:200
u8 swap
Definition lyt_types.h:207
GXTevColorChan GetR() const
Definition lyt_types.h:197
GXTevColorChan GetG() const
Definition lyt_types.h:198
Definition lyt_types.h:146
GXTexGenSrc GetTexGenSrc() const
Definition lyt_types.h:153
u8 reserve
Definition lyt_types.h:165
TexCoordGen()
Definition lyt_types.h:148
GXTexGenType GetTexGenType() const
Definition lyt_types.h:152
u8 texMtx
Definition lyt_types.h:164
void Set(GXTexGenType aTexGenType, GXTexGenSrc aTexGenSrc, u32 aTexMtx)
Definition lyt_types.h:155
u8 texGenSrc
Definition lyt_types.h:163
u32 GetTexMtx() const
Definition lyt_types.h:150
u8 texGenType
Definition lyt_types.h:162
@ GX_ITBA_OFF
Definition GXEnum.h:683
@ GX_TB_ZERO
Definition GXEnum.h:575
@ GX_ITB_NONE
Definition GXEnum.h:671
@ GX_BM_BLEND
Definition GXEnum.h:330
@ GX_TEXCOORD_NULL
Definition GXEnum.h:214
@ GX_TEXCOORD0
Definition GXEnum.h:205
@ GX_CC_ZERO
Definition GXEnum.h:540
@ GX_CC_RASC
Definition GXEnum.h:535
@ GX_CS_SCALE_1
Definition GXEnum.h:582
enum _GXTevColorArg GXTevColorArg
@ GX_TG_MTX2x4
Definition GXEnum.h:252
enum _GXTevScale GXTevScale
enum _GXIndTexBiasSel GXIndTexBiasSel
enum _GXTexCoordID GXTexCoordID
@ GX_TEVPREV
Definition GXEnum.h:419
@ GX_AOP_AND
Definition GXEnum.h:34
enum _GXIndTexFormat GXIndTexFormat
enum _GXIndTexAlphaSel GXIndTexAlphaSel
enum _GXTexGenSrc GXTexGenSrc
enum _GXIndTexScale GXIndTexScale
enum _GXIndTexStageID GXIndTexStageID
@ GX_ITW_OFF
Definition GXEnum.h:704
enum _GXTexMapID GXTexMapID
enum _GXAlphaOp GXAlphaOp
@ GX_ITM_OFF
Definition GXEnum.h:691
enum _GXTevColorChan GXTevColorChan
@ GX_INDTEXSTAGE0
Definition GXEnum.h:715
enum _GXBlendMode GXBlendMode
@ GX_TEV_SWAP0
Definition GXEnum.h:491
@ GX_TEV_ADD
Definition GXEnum.h:560
@ GX_TEV_KCSEL_K0
Definition GXEnum.h:598
enum _GXTevKAlphaSel GXTevKAlphaSel
@ GX_SRC_VTX
Definition GXEnum.h:434
@ GX_LO_SET
Definition GXEnum.h:365
enum _GXIndTexMtxID GXIndTexMtxID
@ GX_ITS_1
Definition GXEnum.h:723
@ GX_BL_INVSRCALPHA
Definition GXEnum.h:342
@ GX_BL_SRCALPHA
Definition GXEnum.h:341
enum _GXChannelID GXChannelID
enum _GXTevSwapSel GXTevSwapSel
@ GX_TG_TEX0
Definition GXEnum.h:309
@ GX_ALWAYS
Definition GXEnum.h:30
enum _GXTevBias GXTevBias
@ GX_ITF_8
Definition GXEnum.h:663
@ GX_TEV_KASEL_K0_R
Definition GXEnum.h:629
enum _GXTevAlphaArg GXTevAlphaArg
enum _GXColorSrc GXColorSrc
enum _GXTevKColorSel GXTevKColorSel
@ GX_TEXMAP_NULL
Definition GXEnum.h:200
@ GX_TEXMAP0
Definition GXEnum.h:191
enum _GXTevRegID GXTevRegID
@ GX_CA_ZERO
Definition GXEnum.h:555
@ GX_CA_RASA
Definition GXEnum.h:553
enum _GXCompare GXCompare
@ GX_IDENTITY
Definition GXEnum.h:288
enum _GXLogicOp GXLogicOp
enum _GXTexGenType GXTexGenType
enum _GXTevOp GXTevOp
@ GX_COLOR0A0
Definition GXEnum.h:296
enum _GXIndTexWrap GXIndTexWrap
enum _GXBlendFactor GXBlendFactor
u32 clamp
Definition GXTev.c:10
u32 bias
Definition GXTev.c:12
r
Definition e_acos.c:105
unsigned long u32
Definition types.h:12
float f32
Definition types.h:25
unsigned char u8
Definition types.h:8
a
Definition k_cos.c:89
static const double T[]
Definition k_tan.c:106
bool TestBit(T bits, int pos)
Definition lyt_types.h:113
void SetBit(T *pBits, int pos, bool val)
Definition lyt_types.h:106
const T * ConvertOffsToPtr(const void *baseAddress, unsigned offset)
Definition lyt_types.h:96
T GetBits(T bits, int pos, int len)
Definition lyt_types.h:119
@ ORIGINTYPE_TOPLEFT
Definition lyt_types.h:49
@ ORIGINTYPE_MAX
Definition lyt_types.h:52
@ ORIGINTYPE_CENTER
Definition lyt_types.h:50
@ TEVCOLOR_REG2
Definition lyt_types.h:30
@ TEVCOLOR_REG1
Definition lyt_types.h:29
@ TEVCOLOR_MAX
Definition lyt_types.h:32
@ TEVCOLOR_REG0
Definition lyt_types.h:28
@ HORIZONTALPOSITION_CENTER
Definition lyt_types.h:37
@ HORIZONTALPOSITION_MAX
Definition lyt_types.h:39
@ HORIZONTALPOSITION_RIGHT
Definition lyt_types.h:38
@ HORIZONTALPOSITION_LEFT
Definition lyt_types.h:36
@ TEXTCOLOR_MAX
Definition lyt_types.h:59
@ TEXTCOLOR_TOP
Definition lyt_types.h:56
@ TEXTCOLOR_BOTTOM
Definition lyt_types.h:57
struct nw4hbm::lyt::Size Size
@ WINDOWFRAME_B
Definition lyt_types.h:71
@ WINDOWFRAME_L
Definition lyt_types.h:68
@ WINDOWFRAME_LB
Definition lyt_types.h:65
@ WINDOWFRAME_RT
Definition lyt_types.h:64
@ WINDOWFRAME_LT
Definition lyt_types.h:63
@ WINDOWFRAME_R
Definition lyt_types.h:69
@ WINDOWFRAME_T
Definition lyt_types.h:70
@ WINDOWFRAME_MAX
Definition lyt_types.h:73
@ WINDOWFRAME_RB
Definition lyt_types.h:66
static const u32 RESOURCE_TYPE_TEXTURE
Definition lyt_types.h:16
static const u32 RESOURCE_TYPE_LAYOUT
Definition lyt_types.h:14
static const u32 RESOURCE_TYPE_FONT
Definition lyt_types.h:15
@ FLIPINDEX_Y
Definition lyt_types.h:89
@ FLIPINDEX_X
Definition lyt_types.h:88
@ FLIPINDEX_MAX
Definition lyt_types.h:91
@ TEXTUREFLIP_90
Definition lyt_types.h:80
@ TEXTUREFLIP_V
Definition lyt_types.h:79
@ TEXTUREFLIP_H
Definition lyt_types.h:78
@ TEXTUREFLIP_180
Definition lyt_types.h:81
@ TEXTUREFLIP_270
Definition lyt_types.h:82
@ TEXTUREFLIP_NONE
Definition lyt_types.h:77
@ TEXTUREFLIP_MAX
Definition lyt_types.h:84
@ VERTEXCOLOR_RT
Definition lyt_types.h:20
@ VERTEXCOLOR_LB
Definition lyt_types.h:21
@ VERTEXCOLOR_MAX
Definition lyt_types.h:24
@ VERTEXCOLOR_RB
Definition lyt_types.h:22
@ VERTEXCOLOR_LT
Definition lyt_types.h:19
static const u32 RESOURCE_TYPE_ANIMATION
Definition lyt_types.h:13
@ VERTICALPOSITION_CENTER
Definition lyt_types.h:43
@ VERTICALPOSITION_TOP
Definition lyt_types.h:42
@ VERTICALPOSITION_BOTTOM
Definition lyt_types.h:44
@ VERTICALPOSITION_MAX
Definition lyt_types.h:45
struct nw4hbm::lyt::TexSRT TexSRT
Definition HBMAnmController.h:6
Definition lyt_types.h:125
friend bool operator==(const Size &a, const Size &b)
Definition lyt_types.h:132
f32 width
Definition lyt_types.h:136
f32 height
Definition lyt_types.h:137
Size(f32 aWidth, f32 aHeight)
Definition lyt_types.h:128
Size(const Size &other)
Definition lyt_types.h:130
Size()
Definition lyt_types.h:126
Definition lyt_types.h:140
math::VEC2 scale
Definition lyt_types.h:143
f32 rotate
Definition lyt_types.h:142
math::VEC2 translate
Definition lyt_types.h:141
Definition types.h:103