NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
GXTransform.h
1#ifndef RVL_SDK_GX_TRANSFORM_H
2#define RVL_SDK_GX_TRANSFORM_H
3#include <types.h>
4
5#include <revolution/GX/GXTypes.h>
6
7#include <revolution/MTX.h>
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#define GX_PROJECTION_SZ 7
13#define GX_VIEWPORT_SZ 6
14
15typedef enum {
16 GX_FIELD_EVEN,
17 GX_FIELD_ODD,
18} GXInterlaceField;
19
20void GXSetProjection(const Mtx44 proj, GXProjectionType type);
21void GXSetProjectionv(const f32 proj[GX_PROJECTION_SZ]);
22void GXGetProjectionv(f32 proj[GX_PROJECTION_SZ]);
23void GXLoadPosMtxImm(const Mtx mtx, u32 id);
24void GXLoadPosMtxIndx(u16 index, u32 id);
25void GXLoadNrmMtxImm(const Mtx mtx, u32 id);
26void GXLoadNrmMtxIndx3x3(u16 index, u32 id);
27void GXSetCurrentMtx(u32 id);
28void GXLoadTexMtxImm(const Mtx mtx, u32 id, GXMtxType type);
29void GXSetViewportJitter(f32 ox, f32 oy, f32 sx, f32 sy, f32 near, f32 far,
30 u32 nextField);
31void GXSetViewport(f32 ox, f32 oy, f32 sx, f32 sy, f32 near, f32 far);
32void GXGetViewportv(f32 view[GX_VIEWPORT_SZ]);
33void GXSetZScaleOffset(f32 scale, f32 offset);
34void GXSetScissor(u32 x, u32 y, u32 w, u32 h);
35void GXGetScissor(u32* x, u32* y, u32* w, u32* h);
36void GXSetScissorBoxOffset(u32 ox, u32 oy);
37void GXSetClipMode(GXClipMode mode);
38
39void __GXSetProjection(void);
40void __GXSetViewport(void);
41void __GXSetMatrixIndex(GXAttr index);
42
43static void GXSetViewportv(const f32 view[GX_VIEWPORT_SZ]) {
44 GXSetViewport(view[0], view[1], view[2], view[3], view[4], view[5]);
45}
46
47#ifdef __cplusplus
48}
49#endif
50#endif