NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
GXInit.h
1#ifndef RVL_SDK_GX_INIT_H
2#define RVL_SDK_GX_INIT_H
3#include <types.h>
4
5#include <revolution/GX/GXFifo.h>
6#include <revolution/GX/GXTransform.h>
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef struct _GXData {
12 union {
13 UNKWORD WORD_0x0;
14 struct {
15 u16 SHORT_0x0; // at 0x0
16 u16 lastWriteWasXF; // at 0x2
17 };
18 }; // at 0x0
19 u16 SHORT_0x4;
20 u16 vlim; // at 0x6
21 u32 cpCtrlReg; // at 0x8
22 u32 cpStatReg; // at 0xC
23 char UNK_0x10[0x4];
24 u32 vcdLoReg; // at 0x14
25 u32 vcdHiReg; // at 0x18
26 u32 vatA[GX_MAX_VTXFMT]; // at 0x1C
27 u32 vatB[GX_MAX_VTXFMT]; // at 0x3C
28 u32 vatC[GX_MAX_VTXFMT]; // at 0x5C
29 u32 linePtWidth; // at 0x7C
30 u32 matrixIndex0; // at 0x80
31 u32 matrixIndex1; // at 0x84
32 char UNK_0x88[0xA8 - 0x88];
33 GXColor ambColors[2]; // at 0xA8
34 GXColor matColors[2]; // at 0xB0
35 u32 colorControl[4]; // at 0xB8
36 u32 texRegs[GX_MAX_TEXCOORD]; // at 0xC8
37 u32 dualTexRegs[GX_MAX_TEXCOORD]; // at 0xE8
38 u32 txcRegs[GX_MAX_TEXCOORD]; // at 0x108
39 char UNK_0x128[0x148 - 0x128];
40 u32 scissorTL; // at 0x148
41 u32 scissorBR; // at 0x14C
42 char UNK_0x150[0x170 - 0x150];
43 u32 ras1_iref; // at 0x170
44 u32 ind_imask; // at 0x174
45 u32 ras1_ss0; // at 0x178
46 u32 ras1_ss1; // at 0x17C
47 char UNK_0x180[0x220 - 0x180];
48 u32 blendMode; // at 0x220
49 u32 dstAlpha; // at 0x224
50 u32 zMode; // at 0x228
51 u32 zControl; // at 0x22C
52 char UNK_0x230[0x254 - 0x230];
53 u32 genMode; // at 0x254
54 char UNK_0x258[0x520 - 0x258];
55 GXAttrType normalType; // at 0x520
56 GXBool normal; // at 0x524
57 GXBool binormal; // at 0x525
58 GXProjectionType projType; // at 0x528
59 f32 proj[GX_PROJECTION_SZ - 1]; // at 0x52C
60 union {
61 struct {
62 f32 vpOx; // at 0x544
63 f32 vpOy; // at 0x548
64 f32 vpSx; // at 0x54C
65 f32 vpSy; // at 0x550
66 f32 vpNear; // at 0x554
67 f32 vpFar; // at 0x558
68 };
69 f32 view[GX_VIEWPORT_SZ];
70 }; // at 0x544
71 f32 offsetZ; // at 0x55C
72 f32 scaleZ; // at 0x560
73 char UNK_0x564[0x5F8 - 0x564];
74 GXBool dlistActive; // at 0x5F8
75 GXBool dlistSave; // at 0x5F9
76 u8 BYTE_0x5FA;
77 u8 vatDirtyFlags; // at 0x5FB
78 u32 gxDirtyFlags; // at 0x5FC
79} GXData;
80
81extern GXData* const __GXData;
82
83// I hate typing this name out
84#define gxdt __GXData
85
86GXFifoObj* GXInit(void*, u32);
87
88#ifdef __cplusplus
89}
90#endif
91#endif