NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches

Description

Classes

struct  _GXColor
 A 32-bit RGBA color. More...
 
struct  _GXTexObj
 
union  _GXFifo
 

Typedefs

typedef struct _GXColor GXColor
 A 32-bit RGBA color.
 
typedef enum _GXAttr GXAttr
 
typedef enum _GXMtxType GXMtxType
 
typedef enum _GXVtxFmtIdx GXVtxFmtIdx
 
typedef enum _GXPrimitive GXPrimitive
 
typedef enum _GXCompare GXCompare
 
typedef enum _GXTevStageID GXTevStageID
 
typedef enum _GXTevColorArg GXTevColorArg
 
typedef enum _GXTevAlphaArg GXTevAlphaArg
 
typedef enum _GXTevBias GXTevBias
 
typedef enum _GXTevScale GXTevScale
 
typedef enum _GXTevOp GXTevOp
 
typedef enum _GXTevRegID GXTevRegID
 
typedef enum _GXAlphaOp GXAlphaOp
 
typedef struct _GXTexObj GXTexObj
 
typedef enum _GXTexFmt GXTexFmt
 
typedef enum _GXTexWrapMode GXTexWrapMode
 
typedef enum _GXTexCoordID GXTexCoordID
 
typedef enum _GXTexGenSrc GXTexGenSrc
 
typedef enum _GXTexGenType GXTexGenType
 
typedef enum _GXTexMapID GXTexMapID
 
typedef enum _GXProjectionType GXProjectionType
 
typedef enum _GXChannelID GXChannelID
 
typedef enum _GXColorSrc GXColorSrc
 
typedef enum _GXLightID GXLightID
 
typedef enum _GXDiffuseFn GXDiffuseFn
 
typedef enum _GXAttnFn GXAttnFn
 
typedef enum _GXBlendMode GXBlendMode
 
typedef enum _GXBlendFactor GXBlendFactor
 
typedef enum _GXLogicOp GXLogicOp
 
typedef union _GXFifo GXFifo
 

Enumerations

enum  _GXAttr {
  GX_VA_PNMTXIDX ,
  GX_VA_TEX0MTXIDX ,
  GX_VA_TEX1MTXIDX ,
  GX_VA_TEX2MTXIDX ,
  GX_VA_TEX3MTXIDX ,
  GX_VA_TEX4MTXIDX ,
  GX_VA_TEX5MTXIDX ,
  GX_VA_TEX6MTXIDX ,
  GX_VA_TEX7MTXIDX ,
  GX_VA_POS ,
  GX_VA_NRM ,
  GX_VA_CLR0 ,
  GX_VA_CLR1 ,
  GX_VA_TEX0 ,
  GX_VA_TEX1 ,
  GX_VA_TEX2 ,
  GX_VA_TEX3 ,
  GX_VA_TEX4 ,
  GX_VA_TEX5 ,
  GX_VA_TEX6 ,
  GX_VA_TEX7 ,
  GX_POS_MTX_ARRAY ,
  GX_NRM_MTX_ARRAY ,
  GX_TEX_MTX_ARRAY ,
  GX_LIGHT_ARRAY ,
  GX_VA_NBT ,
  GX_VA_MAX_ATTR ,
  GX_VA_NULL = 255
}
 
enum  _GXMtxType {
  GX_MTX_3x4 ,
  GX_MTX_2x4
}
 
enum  _GXVtxFmtIdx { GX_VTXFMT0 }
 
enum  _GXPrimitive {
  GX_POINTS = 0xB8 ,
  GX_LINES = 0xA8 ,
  GX_LINESTRIP = 0xB0 ,
  GX_TRIANGLES = 0x90 ,
  GX_TRIANGLESTRIP = 0x98 ,
  GX_TRIANGLEFAN = 0xA0 ,
  GX_QUADS = 0x80
}
 
enum  _GXCompare {
  GX_NEVER ,
  GX_LESS ,
  GX_EQUAL ,
  GX_LEQUAL ,
  GX_GREATER ,
  GX_NEQUAL ,
  GX_GEQUAL ,
  GX_ALWAYS
}
 
enum  _GXTevStageID {
  GX_TEVSTAGE0 ,
  GX_TEVSTAGE1 ,
  GX_TEVSTAGE2 ,
  GX_TEVSTAGE3 ,
  GX_TEVSTAGE4 ,
  GX_TEVSTAGE5 ,
  GX_TEVSTAGE6 ,
  GX_TEVSTAGE7 ,
  GX_TEVSTAGE8 ,
  GX_TEVSTAGE9 ,
  GX_TEVSTAGE10 ,
  GX_TEVSTAGE11 ,
  GX_TEVSTAGE12 ,
  GX_TEVSTAGE13 ,
  GX_TEVSTAGE14 ,
  GX_TEVSTAGE15 ,
  GX_MAX_TEVSTAGE
}
 
enum  _GXTevColorArg {
  GX_CC_CPREV ,
  GX_CC_APREV ,
  GX_CC_C0 ,
  GX_CC_A0 ,
  GX_CC_C1 ,
  GX_CC_A1 ,
  GX_CC_C2 ,
  GX_CC_A2 ,
  GX_CC_TEXC ,
  GX_CC_TEXA ,
  GX_CC_RASC ,
  GX_CC_RASA ,
  GX_CC_ONE ,
  GX_CC_HALF ,
  GX_CC_KONST ,
  GX_CC_ZERO ,
  GX_CC_TEXRRR ,
  GX_CC_TEXGGG ,
  GX_CC_TEXBBB ,
  GX_CC_QUARTER = GX_CC_KONST
}
 
enum  _GXTevAlphaArg {
  GX_CA_APREV ,
  GX_CA_A0 ,
  GX_CA_A1 ,
  GX_CA_A2 ,
  GX_CA_TEXA ,
  GX_CA_RASA ,
  GX_CA_KONST ,
  GX_CA_ZERO ,
  GX_CA_ONE
}
 
enum  _GXTevBias {
  GX_TB_ZERO ,
  GX_TB_ADDHALF ,
  GX_TB_SUBHALF ,
  GX_MAX_TEVBIAS
}
 
enum  _GXTevScale {
  GX_TEV_SCALE_0 ,
  GX_TEV_SCALE_1 ,
  GX_TEV_SCALE_2 ,
  GX_TEV_SCALE_3
}
 
enum  _GXTevOp {
  GX_TEV_ADD ,
  GX_TEV_SUB ,
  GX_TEV_COMP_R8_GT = 8 ,
  GX_TEV_COMP_R8_EQ ,
  GX_TEV_COMP_GR16_GT ,
  GX_TEV_COMP_GR16_EQ ,
  GX_TEV_COMP_BGR24_GT ,
  GX_TEV_COMP_BGR24_EQ ,
  GX_TEV_COMP_RGB8_GT ,
  GX_TEV_COMP_RGB8_EQ ,
  GX_TEV_COMP_A8_GT = GX_TEV_COMP_RGB8_GT ,
  GX_TEV_COMP_A8_EQ = GX_TEV_COMP_RGB8_EQ
}
 
enum  _GXTevRegID {
  GX_TEVPREV ,
  GX_TEVREG0 ,
  GX_TEVREG1 ,
  GX_TEVREG2 ,
  GX_MAX_TEVREG
}
 
enum  _GXAlphaOp {
  GX_AOP_AND ,
  GX_AOP_OR ,
  GX_AOP_XOR ,
  GX_AOP_XNOR ,
  GX_MAX_ALPHAOP
}
 
enum  _GXTexFmt {
  GX_TF_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TG_TEXCOORD6 ,
  GX_TG_COLOR0 ,
  GX_TG_COLOR1
}
 
enum  _GXTexGenType {
  GX_TG_MTX3x4 ,
  GX_TG_MTX2x4 ,
  GX_TG_BUMP0 ,
  GX_TG_BUMP1 ,
  GX_TG_BUMP2 ,
  GX_TG_BUMP3 ,
  GX_TG_BUMP4 ,
  GX_TG_BUMP5 ,
  GX_TG_BUMP6 ,
  GX_TG_BUMP7 ,
  GX_TG_SRTG
}
 
enum  _GXTexMapID {
  GX_TEXMAP0 ,
  GX_TEXMAP1 ,
  GX_TEXMAP2 ,
  GX_TEXMAP3 ,
  GX_TEXMAP4 ,
  GX_TEXMAP5 ,
  GX_TEXMAP6 ,
  GX_TEXMAP7 ,
  GX_MAX_TEXMAP ,
  GX_TEXMAP_NULL = 255 ,
  GX_TEX_DISABLE
}
 
enum  _GXProjectionType {
  GX_PERSPECTIVE ,
  GX_ORTHOGRAPHIC
}
 
enum  _GXChannelID {
  GX_COLOR0 ,
  GX_COLOR1 ,
  GX_ALPHA0 ,
  GX_ALPHA1 ,
  GX_COLOR0A0 ,
  GX_COLOR1A1 ,
  GX_COLOR_ZERO ,
  GX_ALPHA_BUMP ,
  GX_ALPHA_BUMPN ,
  GX_COLOR_NULL = 255
}
 
enum  _GXColorSrc {
  GX_SRC_REG ,
  GX_SRC_VTX
}
 
enum  _GXLightID {
  GX_LIGHT0 = 1 ,
  GX_LIGHT1 = 2 ,
  GX_LIGHT2 = 4 ,
  GX_LIGHT3 = 8 ,
  GX_LIGHT4 = 16 ,
  GX_LIGHT5 = 32 ,
  GX_LIGHT6 = 64 ,
  GX_LIGHT7 = 128 ,
  GX_MAX_LIGHT = 256 ,
  GX_LIGHT_NULL = 0
}
 
enum  _GXDiffuseFn {
  GX_DF_NONE ,
  GX_DF_SIGN ,
  GX_DF_CLAMP
}
 
enum  _GXAttnFn {
  GX_AF_SPEC ,
  GX_AF_SPOT ,
  GX_AF_NONE
}
 
enum  _GXBlendMode {
  GX_BM_NONE ,
  GX_BM_BLEND ,
  GX_BM_LOGIC ,
  GX_BM_SUBTRACT ,
  GX_MAX_BLENDMODE
}
 
enum  _GXBlendFactor {
  GX_BL_ZERO ,
  GX_BL_ONE ,
  GX_BL_SRCCLR ,
  GX_BL_INVSRCCLR ,
  GX_BL_SRCALPHA ,
  GX_BL_INVSRCALPHA ,
  GX_BL_DSTALPHA ,
  GX_BL_INVDSTALPHA ,
  GX_BL_DSTCLR = GX_BL_SRCCLR ,
  GX_BL_INVDSTCLR = GX_BL_INVSRCCLR
}
 
enum  _GXLogicOp {
  GX_LO_CLEAR ,
  GX_LO_AND ,
  GX_LO_REVAND ,
  GX_LO_COPY ,
  GX_LO_INVAND ,
  GX_LO_NOOP ,
  GX_LO_XOR ,
  GX_LO_OR ,
  GX_LO_NOR ,
  GX_LO_EQUIV ,
  GX_LO_INV ,
  GX_LO_REVOR ,
  GX_LO_INVCOPY ,
  GX_LO_INVOR ,
  GX_LO_NAND ,
  GX_LO_SET
}
 

Functions

void GXSetProjection (const Mtx44 *, int)
 
void GXLoadPosMtxImm (const Mtx *, u32)
 
void GXSetCurrentMtx (u32 id)
 
void GXLoadTexMtxImm (const Mtx *, u32, GXMtxType)
 
void GXSetViewport (float, float, float, float, float, float)
 
void GXSetScissor (u32, u32, u32, u32)
 
void GXSetVtxDesc (GXAttr, GXAttr)
 
void GXClearVtxDesc ()
 
void GXSetVtxAttrFmt (u32, GXAttr, u32, u32, u8)
 
void GXSetNumTexGens (u8)
 
void GXSetTexCoordGen2 (GXTexCoordID, GXTexGenType, GXTexGenSrc, u8, u8, u32)
 
void GXBegin (GXPrimitive, GXVtxFmtIdx, u16)
 
void GXSetCullMode (int)
 
static void GXEnd ()
 
void GXSetNumIndStages (u8)
 
void __GXSetIndirectMask (u32)
 
void GXSetColorUpdate (u8)
 
void GXSetAlphaUpdate (u8)
 
void GXSetZMode (u8, GXCompare, u8)
 
void GXSetZCompLoc (u8)
 
void GXSetTevColorIn (GXTevStageID, GXTevColorArg, GXTevColorArg, GXTevColorArg, GXTevColorArg)
 
void GXSetTevAlphaIn (GXTevStageID, GXTevAlphaArg, GXTevAlphaArg, GXTevAlphaArg, GXTevAlphaArg)
 
void GXSetTevColorOp (GXTevStageID, GXTevOp, GXTevBias, GXTevScale, u8, GXTevRegID)
 
void GXSetTevAlphaOp (GXTevStageID, GXTevOp, GXTevBias, GXTevScale, u8, GXTevRegID)
 
void GXSetTevOp (GXTevStageID, u32)
 
void GXSetTevOrder (GXTevStageID, GXTexCoordID, GXTexMapID, GXChannelID)
 
void GXSetAlphaCompare (GXCompare, u8, GXAlphaOp, GXCompare, u8)
 
void GXSetNumTevStages (u8)
 
void GXInitTexObj (GXTexObj *, void *, u16, u16, GXTexFmt, GXTexWrapMode, GXTexWrapMode, u8)
 
void GXLoadTexObj (GXTexObj *, GXTexMapID)
 
void GXSetChanMatColor (GXChannelID, GXColor)
 
void GXSetNumChans (u8)
 
void GXSetChanCtrl (GXChannelID, u8, GXColorSrc, GXColorSrc, GXLightID, GXDiffuseFn, GXAttnFn)
 
void GXSetBlendMode (GXBlendMode, GXBlendFactor, GXBlendFactor, GXLogicOp)
 
void GXInvalidateVtxCache ()
 
static void GXPosition3f32 (float x, float y, float z)
 
static void GXTexCoord2f32 (float x, float y)
 

Variables

volatile GXFifo WGPIPE
 

Typedef Documentation

◆ GXColor

typedef struct _GXColor GXColor

A 32-bit RGBA color.

Enumeration Type Documentation

◆ _GXAttr

enum _GXAttr

Definition at line 25 of file GX.h.

◆ _GXMtxType

enum _GXMtxType

Definition at line 57 of file GX.h.

◆ _GXVtxFmtIdx

enum _GXVtxFmtIdx

Definition at line 62 of file GX.h.

◆ _GXPrimitive

enum _GXPrimitive

Definition at line 66 of file GX.h.

◆ _GXCompare

enum _GXCompare

Definition at line 76 of file GX.h.

◆ _GXTevStageID

enum _GXTevStageID

Definition at line 87 of file GX.h.

◆ _GXTevColorArg

enum _GXTevColorArg

Definition at line 108 of file GX.h.

◆ _GXTevAlphaArg

enum _GXTevAlphaArg

Definition at line 132 of file GX.h.

◆ _GXTevBias

enum _GXTevBias

Definition at line 144 of file GX.h.

◆ _GXTevScale

enum _GXTevScale

Definition at line 152 of file GX.h.

◆ _GXTevOp

enum _GXTevOp

Definition at line 159 of file GX.h.

◆ _GXTevRegID

enum _GXTevRegID

Definition at line 176 of file GX.h.

◆ _GXAlphaOp

enum _GXAlphaOp

Definition at line 185 of file GX.h.

◆ _GXTexFmt

enum _GXTexFmt

Definition at line 198 of file GX.h.

◆ _GXTexWrapMode

enum _GXTexWrapMode

Definition at line 231 of file GX.h.

◆ _GXTexCoordID

enum _GXTexCoordID

Definition at line 239 of file GX.h.

◆ _GXTexGenSrc

enum _GXTexGenSrc

Definition at line 253 of file GX.h.

◆ _GXTexGenType

enum _GXTexGenType

Definition at line 277 of file GX.h.

◆ _GXTexMapID

enum _GXTexMapID

Definition at line 291 of file GX.h.

◆ _GXProjectionType

enum _GXProjectionType

Definition at line 306 of file GX.h.

◆ _GXChannelID

enum _GXChannelID

Definition at line 311 of file GX.h.

◆ _GXColorSrc

enum _GXColorSrc

Definition at line 325 of file GX.h.

◆ _GXLightID

enum _GXLightID

Definition at line 327 of file GX.h.

◆ _GXDiffuseFn

enum _GXDiffuseFn

Definition at line 341 of file GX.h.

◆ _GXAttnFn

enum _GXAttnFn

Definition at line 343 of file GX.h.

◆ _GXBlendMode

enum _GXBlendMode

Definition at line 349 of file GX.h.

◆ _GXBlendFactor

enum _GXBlendFactor

Definition at line 358 of file GX.h.

◆ _GXLogicOp

enum _GXLogicOp

Definition at line 372 of file GX.h.

Function Documentation

◆ GXEnd()

static void GXEnd ( )
inlinestatic

Definition at line 428 of file GX.h.

◆ GXPosition3f32()

static void GXPosition3f32 ( float x,
float y,
float z )
inlinestatic

Definition at line 458 of file GX.h.

◆ GXTexCoord2f32()

static void GXTexCoord2f32 ( float x,
float y )
inlinestatic

Definition at line 464 of file GX.h.