NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
GXAttr.h
1#ifndef RVL_SDK_GX_ATTR_H
2#define RVL_SDK_GX_ATTR_H
3#include <types.h>
4
5#include <revolution/GX/GXTypes.h>
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef struct _GXVtxDescList {
11 GXAttr attr; // at 0x0
12 GXAttrType type; // at 0x4
13} GXVtxDescList;
14
15typedef struct _GXVtxAttrFmtList {
16 GXAttr attr; // at 0x0
17 GXCompCnt compCnt; // at 0x4
18 GXCompType compType; // at 0x8
19 u8 shift; // at 0xC
20} GXVtxAttrFmtList;
21
22void GXSetVtxDesc(GXAttr name, GXAttrType type);
23void GXSetVtxDescv(const GXVtxDescList* list);
24void GXGetVtxDesc(GXAttr name, GXAttrType* type);
25void GXGetVtxDescv(GXVtxDescList* list);
26void GXClearVtxDesc(void);
27void GXSetVtxAttrFmt(GXVtxFmt fmt, GXAttr attr, GXCompCnt compCnt,
28 GXCompType compType, u8 shift);
29
30// TODO: Please find a way to get rid of this
31#ifdef GXATTR_MATCH_HACK
32void GXSetVtxAttrFmtv(s16 fmt, const GXVtxAttrFmtList* list);
33#else
34void GXSetVtxAttrFmtv(GXVtxFmt fmt, const GXVtxAttrFmtList* list);
35#endif
36
37void GXGetVtxAttrFmt(GXVtxFmt fmt, GXAttr attr, GXCompCnt* compCnt,
38 GXCompType* compType, u8* shift);
39void GXGetVtxAttrFmtv(GXVtxFmt fmt, GXVtxAttrFmtList* list);
40void GXSetArray(GXAttr attr, const void* base, u8 stride);
41void GXInvalidateVtxCache(void);
42void GXSetTexCoordGen2(GXTexCoordID id, GXTexGenType type, GXTexGenSrc src,
43 u32 texMtxIdx, GXBool normalize, u32 dualTexMtxIdx);
44void GXSetNumTexGens(u8 num);
45
46void __GXSetVCD(void);
47void __GXCalculateVLim(void);
48void __GXSetVAT(void);
49
50static void GXSetTexCoordGen(GXTexCoordID id, GXTexGenType type,
51 GXTexGenSrc src, u32 texMtxIdx) {
52 GXSetTexCoordGen2(id, type, src, texMtxIdx, FALSE, GX_PTIDENTITY);
53}
54
55#ifdef __cplusplus
56}
57#endif
58#endif