void F3DEX2CBFD_MoveWord( u32 w0, u32 w1 ) { switch (_SHIFTR( w0, 16, 8 )) { case G_MW_NUMLIGHT: gSPNumLights(w1 / 48); break; case G_MW_CLIP: gSPClipRatio( w1 ); break; case G_MW_SEGMENT: gSPSegment( _SHIFTR( w0, 0, 16 ) >> 2, w1 & 0x00FFFFFF ); break; case G_MW_FOG: gSPFogFactor( (s16)_SHIFTR( w1, 16, 16 ), (s16)_SHIFTR( w1, 0, 16 ) ); break; case G_MW_PERSPNORM: gSPPerspNormalize( w1 ); break; case G_MV_COORDMOD: gSPCoordMod( w0, w1 ); break; } }
void F3DSETA_MoveWord(u32 w0, u32 w1) { switch (_SHIFTR( w0, 8, 8 )) { case F3DSETA_MW_NUMLIGHT: gSPNumLights( ((w1 - 0x80000000) >> 5) - 1 ); break; case F3DSETA_MW_CLIP: gSPClipRatio( w1 ); break; case F3DSETA_MW_SEGMENT: gSPSegment( _SHIFTR( w0, 10, 4 ), w1 & 0x00FFFFFF ); break; case F3DSETA_MW_FOG: gSPFogFactor( (s16)_SHIFTR( w1, 16, 16 ), (s16)_SHIFTR( w1, 0, 16 ) ); break; case F3DSETA_MW_LIGHTCOL: switch (_SHIFTR( w0, 0, 8 )) { case F3D_MWO_aLIGHT_1: gSPLightColor( LIGHT_1, w1 ); break; case F3D_MWO_aLIGHT_2: gSPLightColor( LIGHT_2, w1 ); break; case F3D_MWO_aLIGHT_3: gSPLightColor( LIGHT_3, w1 ); break; case F3D_MWO_aLIGHT_4: gSPLightColor( LIGHT_4, w1 ); break; case F3D_MWO_aLIGHT_5: gSPLightColor( LIGHT_5, w1 ); break; case F3D_MWO_aLIGHT_6: gSPLightColor( LIGHT_6, w1 ); break; case F3D_MWO_aLIGHT_7: gSPLightColor( LIGHT_7, w1 ); break; case F3D_MWO_aLIGHT_8: gSPLightColor( LIGHT_8, w1 ); break; } break; default: assert(false && "F3DSETA unknown MoveWord"); } }
void F3D_MoveWord( u32 w0, u32 w1 ) { switch (_SHIFTR( w0, 0, 8 )) { case G_MW_MATRIX: gSPInsertMatrix( _SHIFTR( w0, 8, 16 ), w1 ); break; case G_MW_NUMLIGHT: gSPNumLights( ((w1 - 0x80000000) >> 5) - 1 ); break; case G_MW_CLIP: gSPClipRatio( w1 ); break; case G_MW_SEGMENT: gSPSegment( _SHIFTR( w0, 8, 16 ) >> 2, w1 & 0x00FFFFFF ); break; case G_MW_FOG: /* u32 fm, fo, min, max; fm = _SHIFTR( w1, 16, 16 ); fo = _SHIFTR( w1, 0, 16 ); min = 500 - (fo * (128000 / fm)) / 256; max = (128000 / fm) + min;*/ gSPFogFactor( (s16)_SHIFTR( w1, 16, 16 ), (s16)_SHIFTR( w1, 0, 16 ) ); break; case G_MW_LIGHTCOL: switch (_SHIFTR( w0, 8, 16 )) { case F3D_MWO_aLIGHT_1: gSPLightColor( LIGHT_1, w1 ); break; case F3D_MWO_aLIGHT_2: gSPLightColor( LIGHT_2, w1 ); break; case F3D_MWO_aLIGHT_3: gSPLightColor( LIGHT_3, w1 ); break; case F3D_MWO_aLIGHT_4: gSPLightColor( LIGHT_4, w1 ); break; case F3D_MWO_aLIGHT_5: gSPLightColor( LIGHT_5, w1 ); break; case F3D_MWO_aLIGHT_6: gSPLightColor( LIGHT_6, w1 ); break; case F3D_MWO_aLIGHT_7: gSPLightColor( LIGHT_7, w1 ); break; case F3D_MWO_aLIGHT_8: gSPLightColor( LIGHT_8, w1 ); break; } break; case G_MW_POINTS: gSPModifyVertex( _SHIFTR( w0, 8, 16 ) / 40, _SHIFTR( w0, 0, 8 ) % 40, w1 ); break; case G_MW_PERSPNORM: gSPPerspNormalize( w1 ); break; } }
void F3D_MoveWord( u32 w0, u32 w1 ) { switch (_SHIFTR( w0, 0, 8 )) { case G_MW_MATRIX: gSPInsertMatrix( _SHIFTR( w0, 8, 16 ), w1 ); break; case G_MW_NUMLIGHT: gSPNumLights( ((w1 - 0x80000000) >> 5) - 1 ); break; case G_MW_CLIP: gSPClipRatio( w1 ); break; case G_MW_SEGMENT: gSPSegment( _SHIFTR( w0, 10, 4 ), w1 & 0x00FFFFFF ); break; case G_MW_FOG: gSPFogFactor( (s16)_SHIFTR( w1, 16, 16 ), (s16)_SHIFTR( w1, 0, 16 ) ); break; case G_MW_LIGHTCOL: switch (_SHIFTR( w0, 8, 16 )) { case F3D_MWO_aLIGHT_1: gSPLightColor( LIGHT_1, w1 ); break; case F3D_MWO_aLIGHT_2: gSPLightColor( LIGHT_2, w1 ); break; case F3D_MWO_aLIGHT_3: gSPLightColor( LIGHT_3, w1 ); break; case F3D_MWO_aLIGHT_4: gSPLightColor( LIGHT_4, w1 ); break; case F3D_MWO_aLIGHT_5: gSPLightColor( LIGHT_5, w1 ); break; case F3D_MWO_aLIGHT_6: gSPLightColor( LIGHT_6, w1 ); break; case F3D_MWO_aLIGHT_7: gSPLightColor( LIGHT_7, w1 ); break; case F3D_MWO_aLIGHT_8: gSPLightColor( LIGHT_8, w1 ); break; } break; case G_MW_POINTS: { const u32 val = _SHIFTR(w0, 8, 16); gSPModifyVertex(val / 40, val % 40, w1); } break; case G_MW_PERSPNORM: gSPPerspNormalize( w1 ); break; } }