pokeheartgold/lib/include/nitro/gx/g3imm.h
2022-03-06 12:13:02 -05:00

27 lines
659 B
C

#ifndef NITRO_GX_G3IMM_H_
#define NITRO_GX_G3IMM_H_
typedef enum {
GX_SORTMODE_AUTO = 0,
GX_SORTMODE_MANUAL = 1
} GXSortMode;
typedef enum {
GX_BUFFERMODE_Z = 0,
GX_BUFFERMODE_W = 1
} GXBufferMode;
#define GX_PACK_SWAPBUFFERS_PARAM(am, zw) \
((u32) (((am) << REG_G3_SWAP_BUFFERS_XS_SHIFT) | \
((zw) << REG_G3_SWAP_BUFFERS_DP_SHIFT)))
static inline void G3_SwapBuffers(GXSortMode am, GXBufferMode zw) {
reg_G3_SWAP_BUFFERS = GX_PACK_SWAPBUFFERS_PARAM(am, zw);
}
static inline void G3_ViewPort(int x1, int y1, int x2, int y2) {
reg_G3_VIEWPORT = GX_PACK_VIEWPORT_PARAM(x1, y1, x2, y2);
}
#endif //NITRO_GX_G3IMM_H_