SSBM Decomp
Loading...
Searching...
No Matches
state.c File Reference
#include "state.h"
#include "lobj.h"
#include "mobj.h"
#include "pobj.h"
#include "tev.h"
#include "texp.h"
#include "util.h"
#include <dolphin/gx/GXEnum.h>
#include <dolphin/gx/GXGeometry.h>
#include <dolphin/gx/GXPixel.h>
#include <dolphin/gx/GXTev.h>

Functions

void HSD_SetupChannelMode (u32 arg0)
 
void HSD_SetupPEMode (u32 flags, HSD_PEDesc *pe)
 
static void setupTevMode_last (void)
 
void HSD_SetupRenderModeWithCustomPE (u32 rendermode, HSD_PEDesc *pe)
 
void HSD_SetupRenderMode (u32 rendermode)
 
void HSD_SetMaterialColor (GXColor ambient, GXColor diffuse, GXColor specular, f32 alpha)
 
void HSD_SetMaterialShininess (f32 shininess)
 
void HSD_StateSetLineWidth (u8 arg0, int arg1)
 
void HSD_StateSetCullMode (int mode)
 
void HSD_StateSetBlendMode (int type, int src_factor, int dst_factor, int op)
 
void HSD_StateSetZMode (int arg0, int arg1, int arg2)
 
void HSD_StateSetPointSize (u8 arg0, int arg1)
 
void HSD_StateSetAlphaCompare (int arg0, u8 arg1, int arg2, int arg3, u8 arg4)
 
void HSD_StateSetColorUpdate (int arg0)
 
void HSD_StateSetAlphaUpdate (int arg0)
 
void HSD_StateSetDstAlpha (int arg0, u8 arg1)
 
void HSD_StateSetZCompLoc (int arg0)
 
void HSD_StateSetDither (int arg0)
 
void _HSD_StateInvalidatePrimitive (void)
 
void _HSD_StateInvalidateVtxAttr (void)
 
void _HSD_StateInvalidateRenderMode (void)
 
void HSD_StateInvalidate (int mask)
 

Variables

static GXColor dark_matter = { 0x00, 0x00, 0x00, 0xFF }
 
static u8 state_line_width
 
static int state_line_tex_offsets
 
static u8 state_point_size
 
static int HSD_State_804D75BC
 
static int state_cull_mode
 
static int state_blend_type
 
static int state_src_factor
 
static int state_dst_factor
 
static int state_logic_op
 
static u8 state_z_enable
 
static int state_z_func
 
static u8 state_z_update
 
static int state_alpha_comp0
 
static u8 state_alpha_ref0
 
static int state_alpha_op
 
static int state_alpha_comp1
 
static u8 state_alpha_ref1
 
static u8 state_color_update
 
static u8 state_alpha_update
 
static u8 state_enable_dst_alpha
 
static u8 state_dst_alpha
 
static u8 state_before_tex
 
static u8 state_dither
 
struct { 
 
   GXColor   ambient 
 
   GXColor   diffuse 
 
   GXColor   specular 
 
   u8   alpha 
 
   f32   shininess 
 
matstate 
 
HSD_Chan HSD_State_80405A38
 
HSD_Chan HSD_State_80405A38_30
 
HSD_Chan HSD_State_80405A38_60
 
HSD_Chan HSD_State_80405A38_90
 
HSD_Chan HSD_State_80405A38_C0
 
HSD_Chan HSD_State_80405A38_F0
 
struct { 
 
   int   mask 
 
   void(*   func )(void) 
 
invalidate_funcs [] 
 

Function Documentation

◆ HSD_SetupChannelMode()

void HSD_SetupChannelMode ( u32  arg0)

◆ HSD_SetupPEMode()

void HSD_SetupPEMode ( u32  flags,
HSD_PEDesc pe 
)

◆ setupTevMode_last()

static void setupTevMode_last ( void  )
static

◆ HSD_SetupRenderModeWithCustomPE()

void HSD_SetupRenderModeWithCustomPE ( u32  rendermode,
HSD_PEDesc pe 
)

◆ HSD_SetupRenderMode()

void HSD_SetupRenderMode ( u32  rendermode)

◆ HSD_SetMaterialColor()

void HSD_SetMaterialColor ( GXColor  ambient,
GXColor  diffuse,
GXColor  specular,
f32  alpha 
)

◆ HSD_SetMaterialShininess()

void HSD_SetMaterialShininess ( f32  shininess)

◆ HSD_StateSetLineWidth()

void HSD_StateSetLineWidth ( u8  arg0,
int  arg1 
)

◆ HSD_StateSetCullMode()

void HSD_StateSetCullMode ( int  mode)

◆ HSD_StateSetBlendMode()

void HSD_StateSetBlendMode ( int  type,
int  src_factor,
int  dst_factor,
int  op 
)

◆ HSD_StateSetZMode()

void HSD_StateSetZMode ( int  arg0,
int  arg1,
int  arg2 
)

◆ HSD_StateSetPointSize()

void HSD_StateSetPointSize ( u8  arg0,
int  arg1 
)

◆ HSD_StateSetAlphaCompare()

void HSD_StateSetAlphaCompare ( int  arg0,
u8  arg1,
int  arg2,
int  arg3,
u8  arg4 
)

◆ HSD_StateSetColorUpdate()

void HSD_StateSetColorUpdate ( int  arg0)

◆ HSD_StateSetAlphaUpdate()

void HSD_StateSetAlphaUpdate ( int  arg0)

◆ HSD_StateSetDstAlpha()

void HSD_StateSetDstAlpha ( int  arg0,
u8  arg1 
)

◆ HSD_StateSetZCompLoc()

void HSD_StateSetZCompLoc ( int  arg0)

◆ HSD_StateSetDither()

void HSD_StateSetDither ( int  arg0)

◆ _HSD_StateInvalidatePrimitive()

void _HSD_StateInvalidatePrimitive ( void  )

◆ _HSD_StateInvalidateVtxAttr()

void _HSD_StateInvalidateVtxAttr ( void  )

◆ _HSD_StateInvalidateRenderMode()

void _HSD_StateInvalidateRenderMode ( void  )

◆ HSD_StateInvalidate()

void HSD_StateInvalidate ( int  mask)

Variable Documentation

◆ dark_matter

GXColor dark_matter = { 0x00, 0x00, 0x00, 0xFF }
static

◆ state_line_width

u8 state_line_width
static

◆ state_line_tex_offsets

int state_line_tex_offsets
static

◆ state_point_size

u8 state_point_size
static

◆ HSD_State_804D75BC

int HSD_State_804D75BC
static

◆ state_cull_mode

int state_cull_mode
static

◆ state_blend_type

int state_blend_type
static

◆ state_src_factor

int state_src_factor
static

◆ state_dst_factor

int state_dst_factor
static

◆ state_logic_op

int state_logic_op
static

◆ state_z_enable

u8 state_z_enable
static

◆ state_z_func

int state_z_func
static

◆ state_z_update

u8 state_z_update
static

◆ state_alpha_comp0

int state_alpha_comp0
static

◆ state_alpha_ref0

u8 state_alpha_ref0
static

◆ state_alpha_op

int state_alpha_op
static

◆ state_alpha_comp1

int state_alpha_comp1
static

◆ state_alpha_ref1

u8 state_alpha_ref1
static

◆ state_color_update

u8 state_color_update
static

◆ state_alpha_update

u8 state_alpha_update
static

◆ state_enable_dst_alpha

u8 state_enable_dst_alpha
static

◆ state_dst_alpha

u8 state_dst_alpha
static

◆ state_before_tex

u8 state_before_tex
static

◆ state_dither

u8 state_dither
static

◆ ambient

GXColor ambient

◆ diffuse

GXColor diffuse

◆ specular

GXColor specular

◆ alpha

u8 alpha

◆ shininess

f32 shininess

◆ [struct]

struct { ... } matstate

◆ HSD_State_80405A38

HSD_Chan HSD_State_80405A38
Initial value:
= {
1,
1,
{ 0 },
{ 0xFF, 0xFF, 0xFF, 0xFF },
1,
0,
0,
0,
2
}
#define NULL
A null pointer.
Definition stddef.h:19

◆ HSD_State_80405A38_30

HSD_Chan HSD_State_80405A38_30
Initial value:
= {
4,
0,
{ 0 },
{ 0 },
0,
0,
1,
0,
2,
2,
}

◆ HSD_State_80405A38_60

HSD_Chan HSD_State_80405A38_60
Initial value:
= {
0,
0,
{ 0 },
{ 0xFF, 0xFF, 0xFF, 0xFF },
1,
0,
0,
0,
2,
1,
}

◆ HSD_State_80405A38_90

HSD_Chan HSD_State_80405A38_90
Initial value:
= {
2,
0,
{ 0x00, 0x00, 0x00, 0xFF },
{ 0x00, 0x00, 0x00, 0xFF },
1,
0,
0,
0,
2,
1,
}

◆ HSD_State_80405A38_C0

HSD_Chan HSD_State_80405A38_C0
Initial value:
= {
2,
0,
{ 0 },
{ 0x00, 0x00, 0x00, 0xFF },
0,
0,
0,
0,
0,
2,
}

◆ HSD_State_80405A38_F0

HSD_Chan HSD_State_80405A38_F0
Initial value:
= {
4,
0,
{ 0 },
{ 0xFF, 0xFF, 0xFF, 0xFF },
0,
0,
0,
0,
2,
2,
}

◆ mask

int mask

◆ func

void(* func) (void) ( void  )

◆ [struct]

struct { ... } invalidate_funcs[]
Initial value:
= {
}
void _HSD_StateInvalidateRenderMode(void)
Definition state.c:415
void _HSD_StateInvalidateVtxAttr(void)
Definition state.c:410
void _HSD_StateInvalidatePrimitive(void)
Definition state.c:403
#define HSD_STATE_COLOR_CHANNEL
Definition state.h:14
#define HSD_STATE_VTX_ATTR
Definition state.h:13
#define HSD_STATE_NONE
Definition state.h:11
#define HSD_STATE_PRIMITIVE
Definition state.h:12
#define HSD_STATE_TEV_REGISTER
Definition state.h:16
#define HSD_STATE_RENDER_MODE
Definition state.h:18
#define HSD_STATE_TEX_COORD_GEN
Definition state.h:17
#define HSD_STATE_TEV_STAGE
Definition state.h:15
void _HSD_StateInvalidateTevRegister(void)
Definition tev.c:544
void _HSD_StateInvalidateTevStage(void)
Definition tev.c:539
void _HSD_StateInvalidateColorChannel(void)
Definition tev.c:529
void _HSD_StateInvalidateTexCoordGen(void)
Definition tev.c:552