[Video] Make GFX_CMBX an enum

This commit is contained in:
zilmar 2017-07-22 13:48:25 +10:00
parent dc9fdca11f
commit 47698e69e1
5 changed files with 294 additions and 271 deletions

File diff suppressed because one or more lines are too long

View File

@ -2107,7 +2107,7 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_
else
strcat(fragment_shader_texture1, "vec4 ctex1s_a = vec4(readtex1.a); \n");
break;
case GR_CMBX_LOCAL_TEXTURE_RGB:
case GFX_CMBX_LOCAL_TEXTURE_RGB:
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0s_a = readtex0; \n");
else
@ -2205,7 +2205,7 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_
else
strcat(fragment_shader_texture1, "vec4 ctex1s_b = vec4(readtex1.a); \n");
break;
case GR_CMBX_LOCAL_TEXTURE_RGB:
case GFX_CMBX_LOCAL_TEXTURE_RGB:
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0s_b = readtex0; \n");
else
@ -2315,7 +2315,7 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_
else
strcat(fragment_shader_texture1, "vec4 ctex1_c = vec4(readtex1.a); \n");
break;
case GR_CMBX_LOCAL_TEXTURE_RGB:
case GFX_CMBX_LOCAL_TEXTURE_RGB:
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0_c = readtex0; \n");
else

View File

@ -2070,7 +2070,7 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_
else
strcat(fragment_shader_texture1, "vec4 ctex1s_a = vec4(readtex1.a); \n");
break;
case GR_CMBX_LOCAL_TEXTURE_RGB:
case GFX_CMBX_LOCAL_TEXTURE_RGB:
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0s_a = readtex0; \n");
else
@ -2168,7 +2168,7 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_
else
strcat(fragment_shader_texture1, "vec4 ctex1s_b = vec4(readtex1.a); \n");
break;
case GR_CMBX_LOCAL_TEXTURE_RGB:
case GFX_CMBX_LOCAL_TEXTURE_RGB:
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0s_b = readtex0; \n");
else
@ -2278,7 +2278,7 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_
else
strcat(fragment_shader_texture1, "vec4 ctex1_c = vec4(readtex1.a); \n");
break;
case GR_CMBX_LOCAL_TEXTURE_RGB:
case GFX_CMBX_LOCAL_TEXTURE_RGB:
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0_c = readtex0; \n");
else

View File

@ -82,3 +82,26 @@ enum gfxTextureFormat_t
GFX_TEXFMT_RGB_888 = 0xFF,
GFX_TEXFMT_GZ = 0x8000,
};
enum GFX_CMBX
{
GFX_CMBX_ZERO = 0x00,
GFX_CMBX_TEXTURE_ALPHA = 0x01,
GFX_CMBX_ALOCAL = 0x02,
GFX_CMBX_AOTHER = 0x03,
GFX_CMBX_B = 0x04,
GFX_CMBX_CONSTANT_ALPHA = 0x05,
GFX_CMBX_CONSTANT_COLOR = 0x06,
GFX_CMBX_DETAIL_FACTOR = 0x07,
GFX_CMBX_ITALPHA = 0x08,
GFX_CMBX_ITRGB = 0x09,
GFX_CMBX_LOCAL_TEXTURE_ALPHA = 0x0a,
GFX_CMBX_LOCAL_TEXTURE_RGB = 0x0b,
GFX_CMBX_LOD_FRAC = 0x0c,
GFX_CMBX_OTHER_TEXTURE_ALPHA = 0x0d,
GFX_CMBX_OTHER_TEXTURE_RGB = 0x0e,
GFX_CMBX_TEXTURE_RGB = 0x0f,
GFX_CMBX_TMU_CALPHA = 0x10,
GFX_CMBX_TMU_CCOLOR = 0x11,
};

View File

@ -555,7 +555,7 @@ void TexCache()
{
cmb.t0c_ext_a = GR_CMBX_OTHER_TEXTURE_RGB;
cmb.t0c_ext_a_mode = GFX_FUNC_MODE_X;
cmb.t0c_ext_b = GR_CMBX_LOCAL_TEXTURE_RGB;
cmb.t0c_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB;
cmb.t0c_ext_b_mode = GFX_FUNC_MODE_ZERO;
cmb.t0c_ext_c = GR_CMBX_ZERO;
cmb.t0c_ext_c_invert = 1;
@ -576,9 +576,9 @@ void TexCache()
cmb.tmu0_fac = cmb.tmu0_a_fac = GR_COMBINE_FACTOR_NONE;
if (cmb.tex_cmb_ext_use)
{
cmb.t0c_ext_a = GR_CMBX_LOCAL_TEXTURE_RGB;
cmb.t0c_ext_a = GFX_CMBX_LOCAL_TEXTURE_RGB;
cmb.t0c_ext_a_mode = GFX_FUNC_MODE_ZERO;
cmb.t0c_ext_b = GR_CMBX_LOCAL_TEXTURE_RGB;
cmb.t0c_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB;
cmb.t0c_ext_b_mode = GFX_FUNC_MODE_ZERO;
cmb.t0c_ext_c = GR_CMBX_ZERO;
cmb.t0c_ext_c_invert = 0;
@ -601,7 +601,7 @@ void TexCache()
{
cmb.t1c_ext_a = GR_CMBX_OTHER_TEXTURE_RGB;
cmb.t1c_ext_a_mode = GFX_FUNC_MODE_X;
cmb.t1c_ext_b = GR_CMBX_LOCAL_TEXTURE_RGB;
cmb.t1c_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB;
cmb.t1c_ext_b_mode = GFX_FUNC_MODE_ZERO;
cmb.t1c_ext_c = GR_CMBX_ZERO;
cmb.t1c_ext_c_invert = 1;
@ -622,9 +622,9 @@ void TexCache()
cmb.tmu1_fac = cmb.tmu1_a_fac = GR_COMBINE_FACTOR_NONE;
if (cmb.tex_cmb_ext_use)
{
cmb.t1c_ext_a = GR_CMBX_LOCAL_TEXTURE_RGB;
cmb.t1c_ext_a = GFX_CMBX_LOCAL_TEXTURE_RGB;
cmb.t1c_ext_a_mode = GFX_FUNC_MODE_ZERO;
cmb.t1c_ext_b = GR_CMBX_LOCAL_TEXTURE_RGB;
cmb.t1c_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB;
cmb.t1c_ext_b_mode = GFX_FUNC_MODE_ZERO;
cmb.t1c_ext_c = GR_CMBX_ZERO;
cmb.t1c_ext_c_invert = 0;