From 7cbb1940fac54c890139ed2f57bb215b8edafb4b Mon Sep 17 00:00:00 2001 From: zilmar Date: Sat, 22 Jul 2017 15:57:49 +1000 Subject: [PATCH] [Video] Rename GR_CMBX constants to GFX_CMBX --- Source/Project64-video/Combine.cpp | 2806 ++++++++--------- .../Renderer/OGLEScombiner.cpp | 196 +- .../Project64-video/Renderer/OGLcombiner.cpp | 196 +- Source/Project64-video/TexCache.cpp | 52 +- 4 files changed, 1625 insertions(+), 1625 deletions(-) diff --git a/Source/Project64-video/Combine.cpp b/Source/Project64-video/Combine.cpp index 6170714cc..6f3245a71 100644 --- a/Source/Project64-video/Combine.cpp +++ b/Source/Project64-video/Combine.cpp @@ -209,17 +209,17 @@ COMBINE cmb; cmb.t1c_ext_a_mode = GFX_FUNC_MODE_ZERO, \ 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 = GFX_CMBX_ZERO, \ cmb.t1c_ext_c_invert = 0, \ - cmb.t1c_ext_d= GR_CMBX_B, \ + cmb.t1c_ext_d= GFX_CMBX_B, \ cmb.t1c_ext_d_invert = 0, \ - cmb.t0c_ext_a = GR_CMBX_OTHER_TEXTURE_RGB, \ + cmb.t0c_ext_a = GFX_CMBX_OTHER_TEXTURE_RGB, \ cmb.t0c_ext_a_mode = GFX_FUNC_MODE_X, \ cmb.t0c_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB, \ cmb.t0c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X, \ - cmb.t0c_ext_c = GR_CMBX_OTHER_TEXTURE_RGB, \ + cmb.t0c_ext_c = GFX_CMBX_OTHER_TEXTURE_RGB, \ cmb.t0c_ext_c_invert = 0, \ - cmb.t0c_ext_d= GR_CMBX_B, \ + cmb.t0c_ext_d= GFX_CMBX_B, \ cmb.t0c_ext_d_invert = 0, \ cmb.tex_cmb_ext_use |= TEX_COMBINE_EXT_COLOR; \ } @@ -240,17 +240,17 @@ COMBINE cmb; cmb.t1c_ext_a_mode = GFX_FUNC_MODE_ZERO, \ 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 = GFX_CMBX_ZERO, \ cmb.t1c_ext_c_invert = 0, \ - cmb.t1c_ext_d= GR_CMBX_B, \ + cmb.t1c_ext_d= GFX_CMBX_B, \ cmb.t1c_ext_d_invert = 0, \ - cmb.t0c_ext_a = GR_CMBX_OTHER_TEXTURE_RGB, \ + cmb.t0c_ext_a = GFX_CMBX_OTHER_TEXTURE_RGB, \ cmb.t0c_ext_a_mode = GFX_FUNC_MODE_X, \ cmb.t0c_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB, \ cmb.t0c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X, \ - cmb.t0c_ext_c = GR_CMBX_TMU_CCOLOR, \ + cmb.t0c_ext_c = GFX_CMBX_TMU_CCOLOR, \ cmb.t0c_ext_c_invert = 0, \ - cmb.t0c_ext_d= GR_CMBX_B, \ + cmb.t0c_ext_d= GFX_CMBX_B, \ cmb.t0c_ext_d_invert = 0, \ cmb.tex_ccolor = rdp.prim_color, \ cmb.tex_cmb_ext_use |= TEX_COMBINE_EXT_COLOR; \ @@ -266,17 +266,17 @@ COMBINE cmb; cmb.t1c_ext_a_mode = GFX_FUNC_MODE_ZERO, \ 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 = GFX_CMBX_ZERO, \ cmb.t1c_ext_c_invert = 0, \ - cmb.t1c_ext_d= GR_CMBX_B, \ + cmb.t1c_ext_d= GFX_CMBX_B, \ cmb.t1c_ext_d_invert = 0, \ cmb.t0c_ext_a = GFX_CMBX_LOCAL_TEXTURE_RGB, \ cmb.t0c_ext_a_mode = GFX_FUNC_MODE_X, \ - cmb.t0c_ext_b = GR_CMBX_OTHER_TEXTURE_RGB, \ + cmb.t0c_ext_b = GFX_CMBX_OTHER_TEXTURE_RGB, \ cmb.t0c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X, \ - cmb.t0c_ext_c = GR_CMBX_TMU_CCOLOR, \ + cmb.t0c_ext_c = GFX_CMBX_TMU_CCOLOR, \ cmb.t0c_ext_c_invert = 0, \ - cmb.t0c_ext_d= GR_CMBX_B, \ + cmb.t0c_ext_d= GFX_CMBX_B, \ cmb.t0c_ext_d_invert = 0, \ cmb.tex_ccolor = rdp.prim_color, \ cmb.tex_cmb_ext_use |= TEX_COMBINE_EXT_COLOR; \ @@ -292,17 +292,17 @@ COMBINE cmb; cmb.t1c_ext_a_mode = GFX_FUNC_MODE_ZERO, \ 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 = GFX_CMBX_ZERO, \ cmb.t1c_ext_c_invert = 0, \ - cmb.t1c_ext_d= GR_CMBX_B, \ + cmb.t1c_ext_d= GFX_CMBX_B, \ cmb.t1c_ext_d_invert = 0, \ - cmb.t0c_ext_a = GR_CMBX_OTHER_TEXTURE_RGB, \ + cmb.t0c_ext_a = GFX_CMBX_OTHER_TEXTURE_RGB, \ cmb.t0c_ext_a_mode = GFX_FUNC_MODE_X, \ cmb.t0c_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB, \ cmb.t0c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X, \ - cmb.t0c_ext_c = GR_CMBX_TMU_CCOLOR, \ + cmb.t0c_ext_c = GFX_CMBX_TMU_CCOLOR, \ cmb.t0c_ext_c_invert = 0, \ - cmb.t0c_ext_d= GR_CMBX_B, \ + cmb.t0c_ext_d= GFX_CMBX_B, \ cmb.t0c_ext_d_invert = 0, \ cmb.tex_ccolor = rdp.env_color, \ cmb.tex_cmb_ext_use |= TEX_COMBINE_EXT_COLOR; \ @@ -319,17 +319,17 @@ COMBINE cmb; cmb.t1c_ext_a_mode = GFX_FUNC_MODE_ZERO, \ 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 = GFX_CMBX_ZERO, \ cmb.t1c_ext_c_invert = 0, \ - cmb.t1c_ext_d= GR_CMBX_B, \ + cmb.t1c_ext_d= GFX_CMBX_B, \ cmb.t1c_ext_d_invert = 0, \ - cmb.t0c_ext_a = GR_CMBX_OTHER_TEXTURE_RGB, \ + cmb.t0c_ext_a = GFX_CMBX_OTHER_TEXTURE_RGB, \ cmb.t0c_ext_a_mode = GFX_FUNC_MODE_X, \ cmb.t0c_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB, \ cmb.t0c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X, \ - cmb.t0c_ext_c = GR_CMBX_ITALPHA, \ + cmb.t0c_ext_c = GFX_CMBX_ITALPHA, \ cmb.t0c_ext_c_invert = 0, \ - cmb.t0c_ext_d= GR_CMBX_B, \ + cmb.t0c_ext_d= GFX_CMBX_B, \ cmb.t0c_ext_d_invert = 0, \ cmb.tex_cmb_ext_use |= TEX_COMBINE_EXT_COLOR; \ } @@ -342,17 +342,17 @@ COMBINE cmb; cmb.t1c_ext_a_mode = GFX_FUNC_MODE_ZERO, \ 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 = GFX_CMBX_ZERO, \ cmb.t1c_ext_c_invert = 0, \ - cmb.t1c_ext_d= GR_CMBX_B, \ + cmb.t1c_ext_d= GFX_CMBX_B, \ cmb.t1c_ext_d_invert = 0, \ cmb.t0c_ext_a = GFX_CMBX_LOCAL_TEXTURE_RGB, \ cmb.t0c_ext_a_mode = GFX_FUNC_MODE_X, \ - cmb.t0c_ext_b = GR_CMBX_OTHER_TEXTURE_RGB, \ + cmb.t0c_ext_b = GFX_CMBX_OTHER_TEXTURE_RGB, \ cmb.t0c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X, \ - cmb.t0c_ext_c = GR_CMBX_ITALPHA, \ + cmb.t0c_ext_c = GFX_CMBX_ITALPHA, \ cmb.t0c_ext_c_invert = 0, \ - cmb.t0c_ext_d= GR_CMBX_B, \ + cmb.t0c_ext_d= GFX_CMBX_B, \ cmb.t0c_ext_d_invert = 0, \ cmb.tex_cmb_ext_use |= TEX_COMBINE_EXT_COLOR; \ } @@ -401,13 +401,13 @@ COMBINE cmb; if (cmb.combine_ext) \ { \ T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, \ - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, \ - GR_CMBX_DETAIL_FACTOR, 0, \ - GR_CMBX_ZERO, 0); \ - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, \ + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, \ + GFX_CMBX_DETAIL_FACTOR, 0, \ + GFX_CMBX_ZERO, 0); \ + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, \ GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, \ - GR_CMBX_ZERO, 1, \ - GR_CMBX_ZERO, 0); \ + GFX_CMBX_ZERO, 1, \ + GFX_CMBX_ZERO, 0); \ cmb.tex_ccolor = rdp.prim_color; \ cmb.tex |= 3; \ percent = (float)(lod_frac) / 255.0f; \ @@ -429,11 +429,11 @@ COMBINE cmb; cmb.tex |= 1, \ cmb.t0c_ext_a = GFX_CMBX_LOCAL_TEXTURE_RGB, \ cmb.t0c_ext_a_mode = GFX_FUNC_MODE_X, \ - cmb.t0c_ext_b = GR_CMBX_TMU_CCOLOR, \ + cmb.t0c_ext_b = GFX_CMBX_TMU_CCOLOR, \ cmb.t0c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X, \ - cmb.t0c_ext_c = GR_CMBX_ITALPHA, \ + cmb.t0c_ext_c = GFX_CMBX_ITALPHA, \ cmb.t0c_ext_c_invert = 0, \ - cmb.t0c_ext_d= GR_CMBX_B, \ + cmb.t0c_ext_d= GFX_CMBX_B, \ cmb.t0c_ext_d_invert = 0, \ cmb.tex_ccolor = rdp.prim_color, \ cmb.tex_cmb_ext_use |= TEX_COMBINE_EXT_COLOR; \ @@ -527,21 +527,21 @@ COMBINE cmb; else {\ rdp.best_tex = 0; \ cmb.tex |= 3, \ - cmb.t1a_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA, \ + cmb.t1a_ext_a = GFX_CMBX_LOCAL_TEXTURE_ALPHA, \ cmb.t1a_ext_a_mode = GFX_FUNC_MODE_ZERO, \ - cmb.t1a_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA, \ + cmb.t1a_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA, \ cmb.t1a_ext_b_mode = GFX_FUNC_MODE_ZERO, \ - cmb.t1a_ext_c = GR_CMBX_ZERO, \ + cmb.t1a_ext_c = GFX_CMBX_ZERO, \ cmb.t1a_ext_c_invert = 0, \ - cmb.t1a_ext_d= GR_CMBX_B, \ + cmb.t1a_ext_d= GFX_CMBX_B, \ cmb.t1a_ext_d_invert = 0, \ - cmb.t0a_ext_a = GR_CMBX_OTHER_TEXTURE_ALPHA, \ + cmb.t0a_ext_a = GFX_CMBX_OTHER_TEXTURE_ALPHA, \ cmb.t0a_ext_a_mode = GFX_FUNC_MODE_X, \ - cmb.t0a_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA, \ + cmb.t0a_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA, \ cmb.t0a_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X, \ - cmb.t0a_ext_c = GR_CMBX_ITALPHA, \ + cmb.t0a_ext_c = GFX_CMBX_ITALPHA, \ cmb.t0a_ext_c_invert = 0, \ - cmb.t0a_ext_d= GR_CMBX_B, \ + cmb.t0a_ext_d= GFX_CMBX_B, \ cmb.t0a_ext_d_invert = 0, \ cmb.tex_cmb_ext_use |= TEX_COMBINE_EXT_ALPHA; \ } @@ -901,17 +901,17 @@ static void cc_t1_inter_t0_using_env() cmb.t1c_ext_a_mode = GFX_FUNC_MODE_ZERO; 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 = GFX_CMBX_ZERO; cmb.t1c_ext_c_invert = 0; - cmb.t1c_ext_d = GR_CMBX_B; + cmb.t1c_ext_d = GFX_CMBX_B; cmb.t1c_ext_d_invert = 0; cmb.t0c_ext_a = GFX_CMBX_LOCAL_TEXTURE_RGB; cmb.t0c_ext_a_mode = GFX_FUNC_MODE_X; - cmb.t0c_ext_b = GR_CMBX_OTHER_TEXTURE_RGB; + cmb.t0c_ext_b = GFX_CMBX_OTHER_TEXTURE_RGB; cmb.t0c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - cmb.t0c_ext_c = GR_CMBX_TMU_CCOLOR; + cmb.t0c_ext_c = GFX_CMBX_TMU_CCOLOR; cmb.t0c_ext_c_invert = 0; - cmb.t0c_ext_d = GR_CMBX_B; + cmb.t0c_ext_d = GFX_CMBX_B; cmb.t0c_ext_d_invert = 0; cmb.tex_ccolor = rdp.env_color; cmb.tex_cmb_ext_use |= TEX_COMBINE_EXT_COLOR; @@ -1060,10 +1060,10 @@ static void cc__t0_inter_one_using_primlod__mul_prim() CC_PRIM(); if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ONE_MINUS_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex |= 1; percent = (float)lod_frac / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; @@ -1086,14 +1086,14 @@ static void cc__t1_inter_one_using_env__mul_prim() CC_PRIM(); if (cmb.combine_ext) { - T1CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T1CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, 1, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex |= 2; cmb.tex_ccolor = rdp.env_color; } @@ -1111,14 +1111,14 @@ static void cc__t1_inter_one_using_enva__mul_t0() GR_COMBINE_OTHER_TEXTURE); if (cmb.combine_ext) { - T1CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T1CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_ZERO, 0); cmb.tex |= 3; cmb.tex_ccolor = 0xFFFFFF00 | (rdp.env_color & 0xFF); } @@ -1295,13 +1295,13 @@ static void cc__t0_mul_shade__add__t1_mul_shade() { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; - CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_B, 0); } else { @@ -1323,15 +1323,15 @@ static void cc__t0_mul_prim__inter_env_using_enva() else if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.prim_color; - CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); SETSHADE_ENV(); CC_ENVA(); } @@ -1360,12 +1360,12 @@ static void cc__t1_inter_t0_using_t1__mul_shade() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_B, 0, - GR_CMBX_B, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_B, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; } else @@ -1392,10 +1392,10 @@ static void cc__t1_inter_t0_using_shadea__mul_shade() cc_t0_mul_shade(); return; } - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); T1_INTER_T0_USING_SHADEA(); } @@ -1409,10 +1409,10 @@ static void cc__t0_inter_one_using_prim__mul_shade() GR_COMBINE_OTHER_TEXTURE); if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ONE_MINUS_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ONE_MINUS_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.prim_color; } @@ -1433,10 +1433,10 @@ static void cc__t0_inter_one_using_primlod__mul_shade() GR_COMBINE_OTHER_TEXTURE); if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ONE_MINUS_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex |= 1; percent = (float)lod_frac / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; @@ -1460,10 +1460,10 @@ static void cc__t0_inter_env_using_enva__mul_shade() GR_COMBINE_OTHER_TEXTURE); if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_B, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.env_color; } @@ -1482,16 +1482,16 @@ static void cc__t0_inter_env_using_shadea__mul_shade() // (env-t0)*shade_a+t0, (cmb-0)*shade+0 if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_B, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.env_color; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); } else { @@ -1505,14 +1505,14 @@ static void cc__t0_mul_prim_add_env__mul_shade() { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.prim_color; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_ENV(); } else @@ -1534,19 +1534,19 @@ static void cc__t1_sub_t0_mul_primlod_add_prim__mul_shade() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 3; percent = (float)lod_frac / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } else @@ -1569,12 +1569,12 @@ static void cc__t1_sub_prim_mul_t0__mul_shade() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 3; } @@ -1594,12 +1594,12 @@ static void cc__t1_sub_t0_mul_t0_add_shade__mul_shade() //Aded by Gonetz { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_ITRGB, 0); + GFX_CMBX_ITRGB, 0); cmb.tex |= 3; } else @@ -1613,14 +1613,14 @@ static void cc__one_sub_shade_mul_t0_add_shade__mul_shade() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ONE_MINUS_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ONE_MINUS_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); } else { @@ -1647,12 +1647,12 @@ static void cc__t0_sub_prim_mul_t1_add_t1__mul_shade() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex |= 3; } else @@ -1670,13 +1670,13 @@ static void cc__t1_sub_env_mul_t0_add_t0__mul_shade() if (cmb.combine_ext) { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 3; } @@ -1697,9 +1697,9 @@ static void cc__t0_mul_prima_add_prim_mul__shade() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; } @@ -1716,16 +1716,16 @@ static void cc__t0_inter_prim_using_prima__inter_env_using_enva() { if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; - CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); CC_ENVA(); SETSHADE_ENV(); } @@ -1751,17 +1751,17 @@ static void cc_prim_inter_t1_mul_shade_using_texa() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 3; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TEXTURE_ALPHA, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TEXTURE_ALPHA, 0, + GFX_CMBX_B, 0); } else { @@ -1778,9 +1778,9 @@ static void cc__prim_inter_t0_using_t0a__mul_shade() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; } @@ -1797,15 +1797,15 @@ static void cc__prim_inter_t0_using_t0a__inter_env_using_enva() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; - CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); CC_ENVA(); SETSHADE_ENV(); } @@ -1841,14 +1841,14 @@ static void cc__shade_inter_t0_using_shadea__mul_shade() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_B, 0); cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); } else { @@ -1984,18 +1984,18 @@ static void cc__t0_mul_t1__add_env_mul__t0_mul_t1__add_env() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 3; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_TEXTURE_RGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TEXTURE_RGB, 0, + GFX_CMBX_ZERO, 0); } else cc__t0_mul_t1__add_env(); @@ -2033,14 +2033,14 @@ static void cc_t0_add_prim_mul_one_sub_t0_add_t0() //Aded by Gonetz { if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 1, - GR_CMBX_B, 0); - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; } @@ -2056,13 +2056,13 @@ static void cc__one_sub_prim_mul_t0_add_prim__mul_prima_add__one_sub_prim_mul_t0 if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 1, - GR_CMBX_B, 0); - CCMBEXT(GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CCOLOR, 1, + GFX_CMBX_B, 0); + CCMBEXT(GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; CC_PRIMA(); cmb.tex |= 3; //hw frame buffer allocated as tile1, but not used in combiner @@ -2129,17 +2129,17 @@ static void cc_env_sub__t0_sub_t1_mul_primlod__mul_prim() //Aded by Gonetz { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 3; - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); SETSHADE_PRIM(); SETSHADE_PRIMLOD(); CC_ENV(); @@ -2161,15 +2161,15 @@ static void cc_env_sub__t0_mul_scale_add_env__mul_prim() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.SCALE; cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); SETSHADE_ENV(); CC_PRIM(); } @@ -2182,17 +2182,17 @@ static void cc_one_sub__one_sub_t0_mul_enva_add_prim__mul_prim() //Aded by Gonet if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ONE_MINUS_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; percent = (float)(rdp.env_color & 0xFF) / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; - CCMBEXT(GR_CMBX_ZERO, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_ZERO, 1); + CCMBEXT(GFX_CMBX_ZERO, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_ZERO, 1); CC_PRIM(); } else @@ -2249,18 +2249,18 @@ static void cc__t0_sub_env_mul_enva__add_prim_mul_shade() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 1; percent = (float)(rdp.env_color & 0xFF) / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; - CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); CC_PRIM(); } else { @@ -2288,12 +2288,12 @@ static void cc_t0_mul_prim_add_t1() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; cmb.tex_ccolor = rdp.prim_color; } @@ -2317,19 +2317,19 @@ static void cc_shirt() /* T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_ZERO, 0); //*/ //* T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); //*/ - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, 1, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex |= 3; cmb.tex_ccolor = rdp.prim_color; } @@ -2381,13 +2381,13 @@ static void cc__t0_add_primlod__mul_prim_add_env() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); CC_PRIMLOD(); cmb.tex_ccolor = cmb.ccolor; CC_ENV(); @@ -2443,13 +2443,13 @@ static void cc__t1_sub_prim_mul_enva_add_t0__mul_prim_add_env() if (cmb.combine_ext) { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_ZERO, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_ZERO, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 3; percent = (float)(rdp.env_color & 0xFF) / 255.0f; @@ -2506,18 +2506,18 @@ static void cc__t0_mul_t1__sub_prim_mul_env_add_shade() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_ZERO, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_ZERO, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 3; - CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_TEXTURE_RGB, 0); + CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_TEXTURE_RGB, 0); CC_PRIMMULENV(); } else @@ -2547,12 +2547,12 @@ static void cc__t0_sub_prim_mul_t1_add_t1__mul_env_add_shade() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex |= 3; } else @@ -2576,15 +2576,15 @@ static void cc__t0_mul_shadea_add_env__mul_shade_add_prim() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); CC_PRIM(); } else @@ -2728,19 +2728,19 @@ static void cc__t1_sub_t0_mul_primlod_add_prim__mul_shade_add_shade() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 3; percent = (float)lod_frac / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ITRGB, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ITRGB, 0); CC_PRIM(); } else @@ -2932,12 +2932,12 @@ static void cc__t0_mul_enva_add_t1__mul_shade_add_prim() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; percent = (float)(rdp.env_color & 0xFF) / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; @@ -2982,10 +2982,10 @@ static void cc__t0_add_prim__mul_shade_add_t0() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); CC_PRIM(); } else @@ -3006,17 +3006,17 @@ static void cc__t0_add_prim__mul_shade_add_t1() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); CC_PRIM(); } else @@ -3035,17 +3035,17 @@ static void cc__t0_add_primlod__mul_shade_add_env() if (cmb.combine_ext) { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); CC_PRIMLOD(); cmb.tex_ccolor = cmb.ccolor; CC_ENV(); @@ -3075,9 +3075,9 @@ static void cc__t0_mul_prima_add_prim_mul__shade_add_env() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; } @@ -3327,12 +3327,12 @@ static void cc__t1_mul_t1_add_t0__mul_prim() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_OTHER_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; } else @@ -3573,15 +3573,15 @@ static void cc__t0_mul_prim_add_shade__mul_env() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_B, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.prim_color; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_ZERO, 0); CC_ENV(); } else @@ -3627,16 +3627,16 @@ static void cc__prim_mul_shade_add_env__mul_shade() //Aded by Gonetz cc_prim_mul_shade_add_env(); return; } - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.prim_color; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_ENV(); } @@ -3648,12 +3648,12 @@ static void cc__t0_sub_t1__mul_prim_mul_shade_add_prim_mul_env() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex |= 3; } else @@ -3763,14 +3763,14 @@ static void cc_t0_mul_scale_add_prim__mul_shade() //Aded by Gonetz { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.SCALE; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } else @@ -3789,10 +3789,10 @@ static void cc__t0_mul_t1_add_prim__mul_shade() //Aded by Gonetz { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } else @@ -3841,15 +3841,15 @@ static void cc__t0_mul_prim_add_shade__sub_env_mul_shade() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_ENV(); } else @@ -3874,15 +3874,15 @@ static void cc__t0_sub_env_mul_shade__sub_prim_mul_shade() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ITRGB, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ITRGB, 0); CC_PRIM(); } else @@ -3895,10 +3895,10 @@ static void cc_t0_sub_prim_mul_shade() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } else @@ -3920,10 +3920,10 @@ static void cc__t0_mul_t1__sub_prim_mul_shade() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } else @@ -3940,10 +3940,10 @@ static void cc_t0_sub_env_mul_shade() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_ENV(); } else @@ -3967,15 +3967,15 @@ static void cc__t0_mul_prima_add_t0__sub_center_mul_scale() { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_B, 0); uint32_t prima = rdp.prim_color & 0xFF; cmb.tex_ccolor = (prima << 24) | (prima << 16) | (prima << 8) | prima; cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC(rdp.CENTER); SETSHADE(rdp.SCALE); } @@ -3989,10 +3989,10 @@ static void cc__t1_inter_t0_using_primlod__sub_shade_mul_prim() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } else @@ -4010,10 +4010,10 @@ static void cc__t0_inter_t1_using_enva__sub_shade_mul_prim() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } else @@ -4143,14 +4143,14 @@ static void cc_one_sub__t0_mul_shadea__mul_shade() //Aded by Gonetz { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ONE_MINUS_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ONE_MINUS_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); } else { @@ -4252,17 +4252,17 @@ static void cc_t0_sub_t1_mul_prim_mul_shade_add_t1() //Aded by Gonetz { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); MULSHADE_PRIM(); } else @@ -4292,18 +4292,18 @@ static void cc_t0_sub_prim_mul_t1_add_shade() //Aded by Gonetz { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_OTHER_TEXTURE_RGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_OTHER_TEXTURE_RGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 3; cmb.tex_ccolor = rdp.prim_color; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_B, 0); } else { @@ -4321,10 +4321,10 @@ static void cc_t0_sub_prim_mul_primlod_add_prim() //Aded by Gonetz { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); SETSHADE_PRIM(); CC_PRIMLOD(); } @@ -4371,15 +4371,15 @@ static void cc_t0_sub_prim_mul_env_add_shade() //Aded by Gonetz if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.prim_color; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); CC_ENV(); } else @@ -4392,15 +4392,15 @@ static void cc__t0_inter_t1_using_shadea__sub_prim_mul_env_add_shade() //Aded b { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); //have to pass shade alpha to combiner - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_ZERO, 0); } else { @@ -4430,10 +4430,10 @@ static void cc_t0_sub_prim_mul_enva_add_prim() //Aded by Gonetz41 { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); SETSHADE_PRIM(); CC_ENVA(); } @@ -4516,15 +4516,15 @@ static void cc_t0_sub_prim_mul_shade_add_env() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.prim_color; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); CC_ENV(); } else @@ -4546,18 +4546,18 @@ static void cc_t1_sub_prim_mul_shade_add_env() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex |= 2; cmb.tex_ccolor = rdp.prim_color; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); CC_ENV(); } else @@ -4578,22 +4578,22 @@ static void cc_t1_sub_k4_mul_prima_add_t0() if (cmb.combine_ext) { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 1, - GR_CMBX_ZERO, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 1, + GFX_CMBX_ZERO, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex |= 3; CC_BYTE(rdp.K4); cmb.tex_ccolor = cmb.ccolor; percent = (float)(rdp.prim_color & 0xFF) / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; - CCMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); } else { @@ -4610,15 +4610,15 @@ static void cc__t0_sub_prim_mul_shade_add_env__mul_shade() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.prim_color; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_ENV(); } else @@ -4639,15 +4639,15 @@ static void cc__t0_sub_prim_mul_shade_add_env__mul_shadea() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.prim_color; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); CC_ENV(); } else @@ -4705,10 +4705,10 @@ static void cc_t0_sub_k4_mul_k5_add_t0() //Aded by Gonetz { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); uint32_t temp = rdp.prim_lodfrac; rdp.prim_lodfrac = rdp.K4; SETSHADE_PRIMLOD(); @@ -4727,10 +4727,10 @@ static void cc__t0_inter_t1_using_t0__sub_shade_mul_prima_add_shade() //Aded by if (cmb.combine_ext) { cmb.tex |= 3; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); CC_PRIMA(); T0_INTER_T1_USING_T0(); } @@ -4774,9 +4774,9 @@ static void cc_t0_sub_env_mul_prima_add_env() //Aded by Gonetz if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex |= 1; percent = (rdp.prim_color & 0xFF) / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; @@ -4827,9 +4827,9 @@ static void cc_t0_sub_env_mul_shade_add_prim() //Aded by Gonetz if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.env_color; } @@ -4848,19 +4848,19 @@ static void cc__t0_sub_t1_mul_enva_add_shade__sub_env_mul_prim() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_ITRGB, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_ITRGB, 0); cmb.tex |= 3; CC_COLMULBYTE(rdp.prim_color, (rdp.env_color & 0xFF)); cmb.tex_ccolor = cmb.ccolor; - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_TEXTURE_RGB, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_TEXTURE_RGB, 0); MULSHADE_PRIM(); CC_PRIMMULENV(); } @@ -4884,10 +4884,10 @@ static void cc__t0_inter_t1_using_primlod__sub_env_mul_shade_add_prim() //Aded cc_t0_sub_env_mul_shade(); return; } - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_ENV(); T0_INTER_T1_USING_FACTOR(lod_frac); return; @@ -4903,15 +4903,15 @@ static void cc__t0_sub_env_mul_shade_add_prim__mul_shade() //Aded by Gonetz return; } T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } @@ -4923,18 +4923,18 @@ static void cc__t0_sub_env_mul_shade_add_prim__mul_shadea() //Aded by Gonetz return; } T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; MOD_0(TMOD_TEX_SUB_COL); MOD_0_COL(rdp.env_color & 0xFFFFFF00); - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); } static void cc__t0_inter_t1_using_primlod__sub_env_mul_shade_add_env() @@ -4942,10 +4942,10 @@ static void cc__t0_inter_t1_using_primlod__sub_env_mul_shade_add_env() // (t1-t0)*primlod+t0, (cmb-env)*shade+env if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); } else { @@ -5062,10 +5062,10 @@ static void cc_one_sub_prim_mul_t0a_add_prim() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ONE_MINUS_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_TEXTURE_ALPHA, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ONE_MINUS_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TEXTURE_ALPHA, 0, + GFX_CMBX_B, 0); CC_PRIM(); } else { @@ -5133,10 +5133,10 @@ static void cc_t0_sub_prim_mul_shade_add_shade() //Aded by Gonetz { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ITRGB, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ITRGB, 0); CC_PRIM(); } else @@ -5161,12 +5161,12 @@ static void cc__t0_mul_t0__sub_prim_mul_shade_add_shade() //Aded by Gonetz T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_ZERO, 0); cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ITRGB, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ITRGB, 0); CC_PRIM(); } else @@ -5177,10 +5177,10 @@ static void cc__t0_mul_t1__sub_prim_mul_shade_add_shade() //Aded by Gonetz { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ITRGB, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ITRGB, 0); CC_PRIM(); } else @@ -5197,10 +5197,10 @@ static void cc__t0_mul_t1__sub_env_mul_shade_add_shade() //Aded by Gonetz { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ITRGB, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ITRGB, 0); CC_ENV(); } else @@ -5244,10 +5244,10 @@ static void cc_t0_inter_env_using_enva() GR_COMBINE_OTHER_TEXTURE); if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 1; } @@ -5446,8 +5446,8 @@ static void cc_one_sub_shade_mul__t0_mul_shadea__add_shade() { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; } else @@ -5535,12 +5535,12 @@ static void cc__t0_mul_t1_add_env__mul_shadea_add_shade() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 3; } @@ -5577,18 +5577,18 @@ static void cc_prim_sub_t0_mul_t1_add_t0() //Aded by Gonetz } T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_OTHER_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 3; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); } static void cc_env_sub_t0_mul_prim_add_t0() //Aded by Gonetz @@ -5611,10 +5611,10 @@ static void cc_env_sub_t0_mul_shade_add_t0() //Aded by Gonetz cc_t0_mul_shade(); return; } - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); CC_ENV(); USE_T0(); } @@ -5649,16 +5649,16 @@ static void cc__prim_sub_env_mul_t0_add_env__add_primlod() return; } T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 1; SETSHADE_PRIMSUBENV(); - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_TEXTURE_RGB, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_TEXTURE_RGB, 0); CC_PRIMLOD(); } @@ -5670,16 +5670,16 @@ static void cc__prim_sub_env_mul_t0_add_env__add_shadea() return; } T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 1; SETSHADE_PRIMSUBENV(); - CCMBEXT(GR_CMBX_ITALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_TEXTURE_RGB, 0); + CCMBEXT(GFX_CMBX_ITALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_TEXTURE_RGB, 0); } static void cc_prim_sub_env_mul__t0_mul_t1a__add_env() @@ -5705,8 +5705,8 @@ static void cc_prim_sub_env_mul__t0_mul_prim__add_env() { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; } @@ -5722,8 +5722,8 @@ static void cc_prim_sub_env_mul_t0_mul_shade_add_env() { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_ZERO, 0); CC_PRIMSUBENV(); cmb.tex_ccolor = cmb.ccolor; cmb.tex |= 1; @@ -5766,9 +5766,9 @@ static void cc_prim_sub_env_mul__one_sub_t0_mul_primlod_add_prim__add_env() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ONE_MINUS_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; cmb.dc0_detailmax = cmb.dc1_detailmax = (float)lod_frac / 255.0f; @@ -5825,23 +5825,23 @@ static void cc_prim_sub_env_mul__t1_sub_prim_mul_enva_add_t0__add_env() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); } else { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_ZERO, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_ZERO, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); } cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 3; @@ -5868,13 +5868,13 @@ static void cc_prim_sub_env_mul__t1_sub_prim_mul_prima_add_t0__add_env() if (cmb.combine_ext) { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 3; cmb.dc0_detailmax = cmb.dc1_detailmax = (float)(rdp.prim_color & 0xFF) / 255.0f; @@ -5965,10 +5965,10 @@ static void cc_prim_sub_env_mul_t0a_add_t0() CC_PRIMSUBENV(); if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = cmb.ccolor; cmb.tex |= 1; } @@ -6085,10 +6085,10 @@ static void cc_prim_sub_env_mul__t0_sub_prim_mul_primlod_add_t0__add_env() SETSHADE_ENV(); if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; percent = (float)(lod_frac) / 255.0f; @@ -6111,13 +6111,13 @@ static void cc_prim_sub_env_mul__t0_sub_prim_mul_primlod_add_shade__add_env() return; } T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_ITRGB, 0); - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_ITRGB, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TEXTURE_RGB, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; CC_PRIM(); SETSHADE_ENV(); @@ -6134,13 +6134,13 @@ static void cc_prim_sub_env_mul__t0_sub_shade_mul_primlod_add_shade__add_env() return; } T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TEXTURE_RGB, 0, + GFX_CMBX_B, 0); CC_PRIM(); SETSHADE_ENV(); cmb.tex |= 1; @@ -6153,10 +6153,10 @@ static void cc_lavatex_sub_prim_mul_shade_add_lavatex() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); CC_PRIM(); T0_SUB_PRIM_MUL_PRIMLOD_ADD_T1(); } @@ -6238,13 +6238,13 @@ static void cc__env_inter_prim_using_t0__sub_shade_mul_t0a_add_shade() else { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TEXTURE_ALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TEXTURE_ALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 1; uint32_t pse = (rdp.prim_color >> 24) - (rdp.env_color >> 24); @@ -6271,10 +6271,10 @@ static void cc_prim_sub_env_mul_prima_add_t0() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_TEXTURE_RGB, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_TEXTURE_RGB, 0); CC_PRIM(); SETSHADE_ENV(); } @@ -6400,12 +6400,12 @@ static void cc_prim_sub_env_mul__t0_mul_enva_add_t1__add_env() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; percent = (float)(rdp.env_color & 0xFF) / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; @@ -6483,13 +6483,13 @@ static void cc_prim_sub_env_mul__t1_sub_prim_mul_t0_add_t0__add_env() if (cmb.combine_ext) { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 3; } @@ -6507,16 +6507,16 @@ static void cc__prim_sub_env_mul_prim_add_t0__mul_prim() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_ITRGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; SETSHADE_PRIMSUBENV(); SETSHADE_PRIM(); - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } else @@ -6536,10 +6536,10 @@ static void cc_prim_sub_env_mul_prim_add_env() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_B, 0); SETSHADE_ENV(); CC_PRIM(); } @@ -6560,16 +6560,16 @@ static void cc_prim_sub_env_mul_primlod_add_env() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); cmb.tex |= 1; CC_PRIMLOD(); cmb.tex_ccolor = cmb.ccolor; - CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TEXTURE_RGB, 0, + GFX_CMBX_B, 0); SETSHADE_PRIM(); CC_ENV(); } @@ -6602,16 +6602,16 @@ static void cc_prim_sub_env_mul_enva_add_env() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); cmb.tex |= 1; CC_ENVA(); cmb.tex_ccolor = cmb.ccolor; - CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TEXTURE_RGB, 0, + GFX_CMBX_B, 0); SETSHADE_PRIM(); CC_ENV(); } @@ -6710,10 +6710,10 @@ static void cc_prim_sub_shade_mul__t0_inter_t1_using_shadea__add_shade() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TEXTURE_RGB, 0, + GFX_CMBX_B, 0); } else { @@ -6918,15 +6918,15 @@ static void cc__t0_sub_env_mul_shade__sub_prim_mul_shade_add_prim() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); CC_PRIM(); } else @@ -7017,16 +7017,16 @@ static void cc__env_sub_shade_mul_t0_add_shade__mul_prim() { if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex |= 1; cmb.tex_ccolor = rdp.prim_color; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } else @@ -7056,10 +7056,10 @@ static void cc_env_sub_shade_mul__t0_inter_t1_using_shadea__add_shade() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TEXTURE_RGB, 0, + GFX_CMBX_B, 0); } else { @@ -7100,18 +7100,18 @@ static void cc__t0_mul_shade_mul_shadea__add__t1_mul_one_sub_shadea() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITALPHA, 1, - GR_CMBX_ZERO, 0); + GFX_CMBX_ITALPHA, 1, + GFX_CMBX_ZERO, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); MULSHADE_SHADEA(); cmb.tex |= 3; - CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_TEXTURE_RGB, 0); + CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_TEXTURE_RGB, 0); } else { @@ -7155,10 +7155,10 @@ static void cc_shade_sub_env_mul__t0_mul_t1__add__t0_mul_t1() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TEXTURE_RGB, 0, - GR_CMBX_TEXTURE_RGB, 0); + CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TEXTURE_RGB, 0, + GFX_CMBX_TEXTURE_RGB, 0); CC_ENV(); T0_MUL_T1(); } @@ -7286,18 +7286,18 @@ static void cc__t0_add_prim_mul_shade__mul_shade_add_env() cc_shade_sub_env_mul_prim_add_t0(); return; } - T1CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T1CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; CC_ENV(); cmb.tex |= 1; @@ -7310,14 +7310,14 @@ static void cc__t0_add_prim_mul_shade__mul_shade() cc_shade_sub_env_mul_prim_add_t0(); return; } - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; } @@ -7428,18 +7428,18 @@ static void cc__t0_inter_t1_using_prim__inter_env_using_enva() } T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 3; - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_B, 0); cmb.ccolor = rdp.env_color; } @@ -7453,17 +7453,17 @@ static void cc__t0_inter_t1_using_shade__inter_env_using_enva() } T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_B, 0); cmb.ccolor = rdp.env_color; } @@ -7474,17 +7474,17 @@ static void cc_t0_inter_t1_using_shade() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); } else { @@ -7503,17 +7503,17 @@ static void cc_t1_inter_t0_using_shade() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); } else { @@ -7530,10 +7530,10 @@ static void cc_t1_inter_t0_using_shadea() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); } else { @@ -7616,10 +7616,10 @@ static void cc_t0_inter_shade_using_t0a() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TEXTURE_ALPHA, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TEXTURE_ALPHA, 0, + GFX_CMBX_B, 0); USE_T0(); A_USE_T0(); } @@ -7676,15 +7676,15 @@ static void cc__env_inter_t0_using_shadea__mul_shade() return; } T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); } //Added by Gonetz @@ -7718,12 +7718,12 @@ static void cc_prim_inter__t0_mul_t1_add_env__using_shadea() { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 3; } @@ -7746,16 +7746,16 @@ static void cc_env_inter__prim_inter_shade_using_t0__using_shadea() cc_shade_sub_prim_mul_t0_add_prim(); return; } - T0CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + T0CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_B, 0); CC_ENV(); } @@ -7766,16 +7766,16 @@ static void cc_shade_inter__prim_inter_shade_using_t0__using_shadea() cc_shade_sub_prim_mul_t0_add_prim(); return; } - T0CCMBEXT(GR_CMBX_ITRGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + T0CCMBEXT(GFX_CMBX_ITRGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_B, 0); } // ** (A-B)*C+D*E ** @@ -7798,15 +7798,15 @@ static void cc_t0_sub_env_mul_prim_mul_shade_add_prim_mul_shade() //Aded by Gone if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.env_color; cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } else @@ -7832,18 +7832,18 @@ static void cc__t1_sub_prim_mul_t0_add_env__mul_shade() //Aded by Gonetz { T1CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_NEGATIVE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 3; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_ENV(); } else @@ -8031,14 +8031,14 @@ static void cc__one_sub_shade_mul_t0_add_shade__mul_prim() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ONE_MINUS_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ONE_MINUS_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } else @@ -8056,14 +8056,14 @@ static void cc__one_sub_shade_mul_t0_add_shade__mul_env() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ONE_MINUS_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ONE_MINUS_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_COLOR, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_COLOR, 0, + GFX_CMBX_ZERO, 0); CC_ENV(); } else @@ -8142,10 +8142,10 @@ static void cc__t0_inter_t1_using_shadea__mul_shade() { if (cmb.combine_ext) { - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); } else { @@ -8179,10 +8179,10 @@ static void cc_t0_inter_prim_using_prima() { if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; CCMB(GR_COMBINE_FUNCTION_SCALE_OTHER, @@ -8266,9 +8266,9 @@ static void cc__env_inter_one_using_t0__mul_shade() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ONE_MINUS_X, + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ONE_MINUS_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color & 0xFFFFFF00; cmb.tex |= 1; } @@ -8290,10 +8290,10 @@ static void cc_env_inter_one_using__one_sub_t0_mul_primlod() if (cmb.combine_ext) { // (noise-t0)*primlod+0, (1-env)*cmb+env - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rand() & 0xFFFFFF00; cmb.tex |= 1; percent = (float)(lod_frac) / 255.0f; @@ -8341,14 +8341,14 @@ static void cc__prim_inter_t0_using_env__mul_shade() { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CCOLOR, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CCOLOR, 0, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.env_color & 0xFFFFFF00; cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); uint32_t onesubenv = ~rdp.env_color; CC_C1MULC2(rdp.prim_color, onesubenv); } @@ -8371,29 +8371,29 @@ static void cc__one_inter_prim_using_t1__mul_shade() { if (g_settings->hacks(CSettings::hack_BAR) && rdp.cur_tile == 1) { - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_ZERO, 1); + GFX_CMBX_ZERO, 1); cmb.tex |= 1; } else { - T1CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + T1CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, 0, - GR_CMBX_ZERO, 1); - T0CCMBEXT(GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); + GFX_CMBX_ZERO, 1); + T0CCMBEXT(GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_OTHER_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); cmb.tex |= 2; } cmb.tex_ccolor = rdp.prim_color | 0xFF; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); } else { @@ -8423,16 +8423,16 @@ static void cc_prim_sub__prim_sub_t0_mul_prima__mul_shade() // (prim-t0)*prim_a+0, (prim-cmb)*shade+0 if (cmb.combine_ext) { - T0CCMBEXT(GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, + T0CCMBEXT(GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_X, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = rdp.prim_color; cmb.tex |= 1; - CCMBEXT(GR_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_CONSTANT_COLOR, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); CC_PRIM(); } else @@ -8527,9 +8527,9 @@ static void cc__env_inter_prim_using__t0_sub_shade_mul_primlod_add_env() if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = rdp.env_color; percent = (float)lod_frac / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; @@ -8621,14 +8621,14 @@ static void cc__t0_mul_shade__inter_env_using_enva() else if (cmb.combine_ext) { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITRGB, 0, - GR_CMBX_B, 0); + GFX_CMBX_TMU_CCOLOR, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITRGB, 0, + GFX_CMBX_B, 0); cmb.tex |= 1; - CCMBEXT(GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + CCMBEXT(GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_X, + GFX_CMBX_ITRGB, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); MULSHADE_1MENVA(); CC_COLMULBYTE(rdp.env_color, (rdp.env_color & 0xFF)); cmb.tex_ccolor = cmb.ccolor; @@ -8664,13 +8664,13 @@ static void cc__t0_mul_shade__inter_one_using_shadea() { T0CCMBEXT(GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_ZERO, GFX_CMBX_LOCAL_TEXTURE_RGB, GFX_FUNC_MODE_X, - GR_CMBX_ITRGB, 0, - GR_CMBX_ZERO, 0); + GFX_CMBX_ITRGB, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; - CCMBEXT(GR_CMBX_ZERO, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ONE_MINUS_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_B, 0); + CCMBEXT(GFX_CMBX_ZERO, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_RGB, GFX_FUNC_MODE_ONE_MINUS_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_B, 0); } else { @@ -8964,14 +8964,14 @@ static void ac_t0_mul_t1_add_t1() GR_COMBINE_OTHER_TEXTURE); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0, - GR_CMBX_B, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; } else @@ -9028,14 +9028,14 @@ static void ac__t1_sub_one_mul_primlod_add_t0__mul_prim() { if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (0xFF); percent = (float)lod_frac / 255.0f; } @@ -9065,14 +9065,14 @@ static void ac__t0_sub_t1_mul_enva_add_t0__mul_prim() CA_PRIM(); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.env_color & 0xFF); cmb.tex |= 3; } @@ -9091,10 +9091,10 @@ static void ac__t0_sub_one_mul_enva_add_t0__mul_prim() CA_PRIM(); if (cmb.combine_ext) { - T0ACMBEXT(GR_CMBX_ITALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_ITALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); SETSHADE_A(0xFF); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.env_color & 0xFF); cmb.tex |= 1; @@ -9114,14 +9114,14 @@ static void ac__t0_sub_t1_mul_primlod_add_t0__mul_prim() CA_PRIM(); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex |= 3; percent = (float)lod_frac / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; @@ -9141,14 +9141,14 @@ static void ac__t1_sub_prim_mul_primlod_add_t0__mul_prim() CA_PRIM(); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex |= 3; cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.prim_color & 0xFF); percent = (float)lod_frac / 255.0f; @@ -9169,14 +9169,14 @@ static void ac__t1_sub_t0_mul_enva_add_t1__mul_prim() CA_PRIM(); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_B, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.env_color & 0xFF); } @@ -9196,14 +9196,14 @@ static void ac__t1_sub_t0_mul_primlod__mul_env_add_prim() CA_PRIM(); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_ZERO, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (uint32_t)((float)(rdp.env_color & 0xFF)*(float)rdp.prim_lodfrac / 255.0f); } else @@ -9221,20 +9221,20 @@ static void ac__t0_sub_one_mul_enva_add_t1__mul_prim() { if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_B, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.env_color & 0xFF); cmb.tex |= 3; - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); CA_ENV(); SETSHADE_A_PRIM(); } @@ -9361,14 +9361,14 @@ static void ac__t1_sub_one_mul_primlod_add_t0__mul_env() { if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (0xFF); percent = (float)lod_frac / 255.0f; } @@ -9425,10 +9425,10 @@ static void ac__t0_mul_primlod_add_t0__mul_shade() GR_COMBINE_OTHER_TEXTURE); if (cmb.combine_ext) { - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex |= 1; percent = (float)lod_frac / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; @@ -9457,14 +9457,14 @@ static void ac__t0_sub_t1__mul_shade() GR_COMBINE_OTHER_TEXTURE); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex |= 3; } else @@ -9481,14 +9481,14 @@ static void ac__t1_mul_t1_add_t1__mul_shade() GR_COMBINE_OTHER_TEXTURE); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex |= 2; } else @@ -9510,14 +9510,14 @@ static void ac__t1_sub_one_mul_primlod_add_t0__mul_shade() { if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (0xFF); percent = (float)lod_frac / 255.0f; } @@ -9546,14 +9546,14 @@ static void ac__t1_sub_shade_mul_primlod_add_t0__mul_shade() CA_PRIM(); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex |= 3; percent = (float)lod_frac / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; @@ -9600,10 +9600,10 @@ static void ac__prim_sub_one_mul_primlod_add_t0__mul_env() { if (cmb.combine_ext) { - T0ACMBEXT(GR_CMBX_ITALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_ITALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); SETSHADE_A_PRIM(); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (0xFF); percent = (float)lod_frac / 255.0f; @@ -9666,10 +9666,10 @@ static void ac_t0_mul_prim_add_t0() { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_B, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_B, 0); CA_PRIM(); A_USE_T0(); } @@ -9690,10 +9690,10 @@ static void ac__t0_inter_t1_using_t1a__mul_prim_add__t0_inter_t1_using_t1a() { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_B, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_B, 0); CA_PRIM(); } else @@ -9711,10 +9711,10 @@ static void ac__t1_inter_t0_using_t0a__mul_prim_add__t1_inter_t0_using_t0a() { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_B, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_B, 0); CA_PRIM(); } else @@ -9774,10 +9774,10 @@ static void ac_t0_mul_primlod_add_t0() GR_COMBINE_OTHER_TEXTURE); if (cmb.combine_ext) { - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex |= 1; percent = (float)lod_frac / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; @@ -9916,17 +9916,17 @@ static void ac__t0_mul_primlod_add_shade__mul_shade() { if (cmb.combine_ext) { - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex |= 1; percent = (float)lod_frac / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); } else { @@ -9942,21 +9942,21 @@ static void ac__t1_mul_primlod_add_shade__mul_shade() { if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex |= 2; percent = (float)lod_frac / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); } else { @@ -9974,20 +9974,20 @@ static void ac__t0_sub_t1_mul_prim_add_shade__mul_shade() { if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_ZERO, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 3; cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.prim_color & 0xFF); - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); } else { @@ -10005,20 +10005,20 @@ static void ac__t1_sub_t0_mul_prim_add_shade__mul_shade() { if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_ZERO, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 3; cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.prim_color & 0xFF); - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); } else { @@ -10093,16 +10093,16 @@ static void ac__t0_add_prim_mul_shade__mul_shade() // (shade-0)*prim+t0, (cmb-0)*shade+0 if (cmb.combine_ext) { - T0ACMBEXT(GR_CMBX_ITALPHA, GFX_FUNC_MODE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_B, 0); + T0ACMBEXT(GFX_CMBX_ITALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_B, 0); cmb.tex |= 1; cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.prim_color & 0xFF); - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); } else { @@ -10223,16 +10223,16 @@ static void ac_t0_sub_prim_mul_shade() { if (cmb.combine_ext) { - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.prim_color & 0xFF); - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); } else { ACMB(GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL, @@ -10248,16 +10248,16 @@ static void ac_t0_sub_prim_mul_shade_mul_env() { if (cmb.combine_ext) { - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.prim_color & 0xFF); - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_ZERO, 0); CA_ENV(); } else { @@ -10275,16 +10275,16 @@ static void ac_t0_sub_shade_mul_prim() { if (cmb.combine_ext) { - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_ZERO, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.prim_color & 0xFF); - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); } else { ACMB(GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL, @@ -10300,10 +10300,10 @@ static void ac__t0_mul_t1__sub_prim_mul_shade() //Aded by Gonetz { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); CA_PRIM(); } else @@ -10321,19 +10321,19 @@ static void ac__one_sub_t1_mul_t0_add_shade__sub_prim_mul_shade() //Aded by Gon // (1-t1)*t0+shade, (cmb-prim)*shade+0 if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_ONE_MINUS_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0, - GR_CMBX_B, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_ONE_MINUS_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0, + GFX_CMBX_B, 0); cmb.tex |= 3; - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); CA_PRIM(); } else @@ -10350,10 +10350,10 @@ static void ac__t1_mul_primlod_add_t0__sub_prim_mul_shade() { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); CA_PRIM(); } else @@ -10370,10 +10370,10 @@ static void ac__t1_mul_primlod_add_t0__sub_env_mul_prim() //Aded by Gonetz { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); CA_ENV(); SETSHADE_A_PRIM(); } @@ -10392,10 +10392,10 @@ static void ac__t1_mul_prima_add_t0__sub_env_mul_shade() //Aded by Gonetz { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); CA_ENV(); } else @@ -10484,10 +10484,10 @@ static void ac_prim_sub_shade_mul_prim() //Aded by Gonetz { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_ZERO, 0); CA_PRIM(); } else @@ -10533,10 +10533,10 @@ static void ac_one_plus_env_mul_prim_mul_shade() { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_ZERO, GFX_FUNC_MODE_ONE_MINUS_X, - GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_ZERO, GFX_FUNC_MODE_ONE_MINUS_X, + GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); MULSHADE_A_PRIM(); CA_ENV(); } @@ -10549,10 +10549,10 @@ static void ac__t0_mul_t1__sub_env_mul_prim_add__t0_mul_t1() //Aded by Gonetz { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_TEXTURE_ALPHA, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_TEXTURE_ALPHA, 0); CA_ENV(); SETSHADE_A_PRIM(); } @@ -10571,16 +10571,16 @@ static void ac__t0_sub_prim_mul_shade_add_shade__mul_env() //Aded by Gonetz { if (cmb.combine_ext) { - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ITALPHA, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ITALPHA, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.prim_color & 0xFF); cmb.tex |= 1; - ACMBEXT(GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_ZERO, 0); CA_ENV(); } else @@ -10610,14 +10610,14 @@ static void ac_t0_sub_one_mul_enva_add_t1() //Aded by Gonetz { if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_B, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.env_color & 0xFF); cmb.tex |= 3; ACMB(GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL, @@ -10636,21 +10636,21 @@ static void ac_t1_sub_one_mul_enva_add_t0() //Aded by Gonetz { if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_B, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_B, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.env_color & 0xFF); SETSHADE_A(0xFF); cmb.tex |= 3; - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); } else { @@ -10670,14 +10670,14 @@ static void ac_t1_sub_one_mul_primlod_add_t0() //Aded by Gonetz GR_COMBINE_OTHER_TEXTURE); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (0xFF); percent = (float)lod_frac / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; @@ -10701,20 +10701,20 @@ static void ac_t1_sub_prim_mul_shade_add_prim() //Aded by Gonetz { if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_B, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_B, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.prim_color & 0xFF); cmb.tex |= 2; - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); } else { @@ -10748,15 +10748,15 @@ static void ac_t0_sub_env_mul_shadea_add_env() //Aded by Gonetz ac_t0_mul_shade(); return; } - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); cmb.tex |= 1; - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_B, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_B, 0); CA_ENV(); } @@ -10923,14 +10923,14 @@ static void ac_one_sub_t1_add_t0_mul_env() { if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_B, 1); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_B, 1); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.env_color & 0xFF); cmb.tex |= 3; ACMB(GR_COMBINE_FUNCTION_SCALE_OTHER, @@ -10998,16 +10998,16 @@ static void ac_shade_sub_t0_mul_primlod_add_prim() { if (cmb.combine_ext) { - T0ACMBEXT(GR_CMBX_ITALPHA, GFX_FUNC_MODE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_TMU_CALPHA, 0, - GR_CMBX_ZERO, 0); + T0ACMBEXT(GFX_CMBX_ITALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_TMU_CALPHA, 0, + GFX_CMBX_ZERO, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (lod_frac & 0xFF); cmb.tex |= 1; - ACMBEXT(GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_TEXTURE_ALPHA, 0); + ACMBEXT(GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_TEXTURE_ALPHA, 0); CA_PRIM(); } else @@ -11100,10 +11100,10 @@ static void ac_t0_inter_t1_using_shadea() { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); } else { @@ -11266,14 +11266,14 @@ static void ac__env_sub_one_mul_t1_add_t0__mul_prim() CA_PRIM(); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0, - GR_CMBX_ZERO, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ZERO, 1, - GR_CMBX_ZERO, 0); + T1ACMBEXT(GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0, + GFX_CMBX_ZERO, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ZERO, 1, + GFX_CMBX_ZERO, 0); SETSHADE_A(0xFF); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (rdp.env_color & 0xFF); cmb.tex |= 3; @@ -11300,10 +11300,10 @@ static void ac__t1_mul_enva_add_t0__sub_prim_mul_shade() { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ZERO, 0); CA_PRIM(); } else @@ -11353,10 +11353,10 @@ static void ac__t0_inter_t1_using_shadea__mul_prim() { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_ZERO, 0); A_T0_INTER_T1_USING_SHADEA(); } else @@ -11375,10 +11375,10 @@ static void ac__t0_inter_t1_using_shadea__mul_env() { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_ITALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_ZERO, 0); A_T0_INTER_T1_USING_SHADEA(); } else @@ -11396,10 +11396,10 @@ static void ac__t0_inter_t1_using_primlod__sub_env_mul_shade_add_shade() { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_ITALPHA, 0, - GR_CMBX_ALOCAL, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_ITALPHA, 0, + GFX_CMBX_ALOCAL, 0); CA_ENV(); A_T0_INTER_T1_USING_FACTOR(lod_frac); } @@ -11445,10 +11445,10 @@ static void ac__t0_inter_t1_using_primlod__mul_env_add__t0_inter_t1_using_primlo { if (cmb.combine_ext) { - ACMBEXT(GR_CMBX_ZERO, GFX_FUNC_MODE_ZERO, - GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_B, 0); + ACMBEXT(GFX_CMBX_ZERO, GFX_FUNC_MODE_ZERO, + GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_B, 0); CA_ENV(); } else @@ -11472,14 +11472,14 @@ static void ac__t1_sub_one_mul_enva_add_t0__mul_prim() CA_PRIM(); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (0xFF); cmb.tex |= 3; cmb.dc0_detailmax = cmb.dc1_detailmax = (float)(rdp.env_color & 0xFF) / 255.0f; @@ -11498,17 +11498,17 @@ static void ac__one_inter_t0_using_prim__mul_env() { if (cmb.combine_ext) { - T0ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_B, 0); + T0ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_B, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | (0xFF); cmb.tex |= 1; cmb.dc0_detailmax = cmb.dc1_detailmax = (float)(rdp.prim_color & 0xFF) / 255.0f; - ACMBEXT(GR_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_CONSTANT_ALPHA, 0, - GR_CMBX_ZERO, 0); + ACMBEXT(GFX_CMBX_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_CONSTANT_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_CONSTANT_ALPHA, 0, + GFX_CMBX_ZERO, 0); CA_ENV(); } else @@ -11526,14 +11526,14 @@ static void ac__t1_sub_one_mul_enva_add_t0__mul_shade() CA_PRIM(); if (cmb.combine_ext) { - T1ACMBEXT(GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, - GR_CMBX_ZERO, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); - T0ACMBEXT(GR_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, - GR_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, - GR_CMBX_DETAIL_FACTOR, 0, - GR_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T1ACMBEXT(GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, GFX_FUNC_MODE_ZERO, + GFX_CMBX_ZERO, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); + T0ACMBEXT(GFX_CMBX_OTHER_TEXTURE_ALPHA, GFX_FUNC_MODE_X, + GFX_CMBX_TMU_CALPHA, GFX_FUNC_MODE_NEGATIVE_X, + GFX_CMBX_DETAIL_FACTOR, 0, + GFX_CMBX_LOCAL_TEXTURE_ALPHA, 0); cmb.tex_ccolor = (cmb.tex_ccolor & 0xFFFFFF00) | 0xFF; percent = (rdp.env_color & 0xFF) / 255.0f; cmb.dc0_detailmax = cmb.dc1_detailmax = percent; @@ -15671,11 +15671,11 @@ void Combine() if (cmb.tex_cmb_ext_use & TEX_COMBINE_EXT_COLOR) { if (cmb.t0c_ext_a == GFX_CMBX_LOCAL_TEXTURE_RGB) - cmb.t0c_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA; + cmb.t0c_ext_a = GFX_CMBX_LOCAL_TEXTURE_ALPHA; if (cmb.t0c_ext_b == GFX_CMBX_LOCAL_TEXTURE_RGB) - cmb.t0c_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + cmb.t0c_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; if (cmb.t0c_ext_c == GFX_CMBX_LOCAL_TEXTURE_RGB) - cmb.t0c_ext_c = GR_CMBX_LOCAL_TEXTURE_ALPHA; + cmb.t0c_ext_c = GFX_CMBX_LOCAL_TEXTURE_ALPHA; } else cmb.tmu0_func = GR_COMBINE_FUNCTION_LOCAL_ALPHA; @@ -15686,11 +15686,11 @@ void Combine() if (cmb.tex_cmb_ext_use & TEX_COMBINE_EXT_COLOR) { if (cmb.t1c_ext_a == GFX_CMBX_LOCAL_TEXTURE_RGB) - cmb.t1c_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA; + cmb.t1c_ext_a = GFX_CMBX_LOCAL_TEXTURE_ALPHA; if (cmb.t1c_ext_b == GFX_CMBX_LOCAL_TEXTURE_RGB) - cmb.t1c_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + cmb.t1c_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; if (cmb.t1c_ext_c == GFX_CMBX_LOCAL_TEXTURE_RGB) - cmb.t1c_ext_c = GR_CMBX_LOCAL_TEXTURE_ALPHA; + cmb.t1c_ext_c = GFX_CMBX_LOCAL_TEXTURE_ALPHA; } else cmb.tmu1_func = GR_COMBINE_FUNCTION_LOCAL_ALPHA; @@ -15914,45 +15914,45 @@ void ColorCombinerToExtension() switch (cmb.c_loc) { case GR_COMBINE_LOCAL_ITERATED: - ext_local = GR_CMBX_ITRGB; - ext_local_a = GR_CMBX_ITALPHA; + ext_local = GFX_CMBX_ITRGB; + ext_local_a = GFX_CMBX_ITALPHA; break; case GR_COMBINE_LOCAL_CONSTANT: - ext_local = GR_CMBX_CONSTANT_COLOR; - ext_local_a = GR_CMBX_CONSTANT_ALPHA; + ext_local = GFX_CMBX_CONSTANT_COLOR; + ext_local_a = GFX_CMBX_CONSTANT_ALPHA; break; default: WriteTrace(TraceRDP, TraceWarning, "Invalid combiner locality %u.", cmb.c_loc); - ext_local = GR_CMBX_ZERO; - ext_local_a = GR_CMBX_ZERO; + ext_local = GFX_CMBX_ZERO; + ext_local_a = GFX_CMBX_ZERO; }; switch (cmb.c_oth) { case GR_COMBINE_OTHER_ITERATED: - ext_other = GR_CMBX_ITRGB; - ext_other_a = GR_CMBX_ITALPHA; + ext_other = GFX_CMBX_ITRGB; + ext_other_a = GFX_CMBX_ITALPHA; break; case GR_COMBINE_OTHER_TEXTURE: - ext_other = GR_CMBX_TEXTURE_RGB; - ext_other_a = GR_CMBX_TEXTURE_ALPHA; + ext_other = GFX_CMBX_TEXTURE_RGB; + ext_other_a = GFX_CMBX_TEXTURE_ALPHA; break; case GR_COMBINE_OTHER_CONSTANT: - ext_other = GR_CMBX_CONSTANT_COLOR; - ext_other_a = GR_CMBX_CONSTANT_ALPHA; + ext_other = GFX_CMBX_CONSTANT_COLOR; + ext_other_a = GFX_CMBX_CONSTANT_ALPHA; break; default: WriteTrace(TraceRDP, TraceWarning, "Invalid combiner flag %u.", cmb.c_oth); - ext_other = GR_CMBX_ZERO; - ext_other_a = GR_CMBX_ZERO; + ext_other = GFX_CMBX_ZERO; + ext_other_a = GFX_CMBX_ZERO; }; switch (cmb.c_fac) { case GR_COMBINE_FACTOR_ZERO: - cmb.c_ext_c = GR_CMBX_ZERO; + cmb.c_ext_c = GFX_CMBX_ZERO; cmb.c_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_ONE: - cmb.c_ext_c = GR_CMBX_ZERO; + cmb.c_ext_c = GFX_CMBX_ZERO; cmb.c_ext_c_invert = 1; break; case GR_COMBINE_FACTOR_LOCAL: @@ -15968,11 +15968,11 @@ void ColorCombinerToExtension() cmb.c_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_TEXTURE_RGB: - cmb.c_ext_c = GR_CMBX_TEXTURE_RGB; + cmb.c_ext_c = GFX_CMBX_TEXTURE_RGB; cmb.c_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_TEXTURE_ALPHA: - cmb.c_ext_c = GR_CMBX_TEXTURE_ALPHA; + cmb.c_ext_c = GFX_CMBX_TEXTURE_ALPHA; cmb.c_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_ONE_MINUS_LOCAL: @@ -15988,52 +15988,52 @@ void ColorCombinerToExtension() cmb.c_ext_c_invert = 1; break; case GR_COMBINE_FACTOR_ONE_MINUS_TEXTURE_ALPHA: - cmb.c_ext_c = GR_CMBX_TEXTURE_ALPHA; + cmb.c_ext_c = GFX_CMBX_TEXTURE_ALPHA; cmb.c_ext_c_invert = 1; break; default: - cmb.c_ext_c = GR_CMBX_ZERO; + cmb.c_ext_c = GFX_CMBX_ZERO; cmb.c_ext_c_invert = 0; } switch (cmb.c_fnc) { case GR_COMBINE_FUNCTION_ZERO: - cmb.c_ext_a = GR_CMBX_ZERO; + cmb.c_ext_a = GFX_CMBX_ZERO; cmb.c_ext_a_mode = GFX_FUNC_MODE_X; - cmb.c_ext_b = GR_CMBX_ZERO; + cmb.c_ext_b = GFX_CMBX_ZERO; cmb.c_ext_b_mode = GFX_FUNC_MODE_X; - cmb.c_ext_c = GR_CMBX_ZERO; + cmb.c_ext_c = GFX_CMBX_ZERO; cmb.c_ext_c_invert = 0; - cmb.c_ext_d = GR_CMBX_ZERO; + cmb.c_ext_d = GFX_CMBX_ZERO; cmb.c_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_LOCAL: cmb.c_ext_a = ext_local; cmb.c_ext_a_mode = GFX_FUNC_MODE_X; - cmb.c_ext_b = GR_CMBX_ZERO; + cmb.c_ext_b = GFX_CMBX_ZERO; cmb.c_ext_b_mode = GFX_FUNC_MODE_X; - cmb.c_ext_c = GR_CMBX_ZERO; + cmb.c_ext_c = GFX_CMBX_ZERO; cmb.c_ext_c_invert = 1; - cmb.c_ext_d = GR_CMBX_ZERO; + cmb.c_ext_d = GFX_CMBX_ZERO; cmb.c_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_LOCAL_ALPHA: cmb.c_ext_a = ext_local_a; cmb.c_ext_a_mode = GFX_FUNC_MODE_X; - cmb.c_ext_b = GR_CMBX_ZERO; + cmb.c_ext_b = GFX_CMBX_ZERO; cmb.c_ext_b_mode = GFX_FUNC_MODE_X; - cmb.c_ext_c = GR_CMBX_ZERO; + cmb.c_ext_c = GFX_CMBX_ZERO; cmb.c_ext_c_invert = 1; - cmb.c_ext_d = GR_CMBX_ZERO; + cmb.c_ext_d = GFX_CMBX_ZERO; cmb.c_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER: cmb.c_ext_a = ext_other; cmb.c_ext_a_mode = GFX_FUNC_MODE_X; - cmb.c_ext_b = GR_CMBX_ZERO; + cmb.c_ext_b = GFX_CMBX_ZERO; cmb.c_ext_b_mode = GFX_FUNC_MODE_ZERO; - cmb.c_ext_d = GR_CMBX_ZERO; + cmb.c_ext_d = GFX_CMBX_ZERO; cmb.c_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL: @@ -16041,7 +16041,7 @@ void ColorCombinerToExtension() cmb.c_ext_a_mode = GFX_FUNC_MODE_X; cmb.c_ext_b = ext_local; cmb.c_ext_b_mode = GFX_FUNC_MODE_ZERO; - cmb.c_ext_d = GR_CMBX_B; + cmb.c_ext_d = GFX_CMBX_B; cmb.c_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL_ALPHA: @@ -16049,7 +16049,7 @@ void ColorCombinerToExtension() cmb.c_ext_a_mode = GFX_FUNC_MODE_X; cmb.c_ext_b = ext_local_a; cmb.c_ext_b_mode = GFX_FUNC_MODE_ZERO; - cmb.c_ext_d = GR_CMBX_B; + cmb.c_ext_d = GFX_CMBX_B; cmb.c_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL: @@ -16057,7 +16057,7 @@ void ColorCombinerToExtension() cmb.c_ext_a_mode = GFX_FUNC_MODE_X; cmb.c_ext_b = ext_local; cmb.c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - cmb.c_ext_d = GR_CMBX_ZERO; + cmb.c_ext_d = GFX_CMBX_ZERO; cmb.c_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL: @@ -16065,7 +16065,7 @@ void ColorCombinerToExtension() cmb.c_ext_a_mode = GFX_FUNC_MODE_X; cmb.c_ext_b = ext_local; cmb.c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - cmb.c_ext_d = GR_CMBX_B; + cmb.c_ext_d = GFX_CMBX_B; cmb.c_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL_ALPHA: @@ -16073,24 +16073,24 @@ void ColorCombinerToExtension() cmb.c_ext_a_mode = GFX_FUNC_MODE_X; cmb.c_ext_b = ext_local; cmb.c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - cmb.c_ext_d = GR_CMBX_ALOCAL; + cmb.c_ext_d = GFX_CMBX_ALOCAL; cmb.c_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL: - cmb.c_ext_a = GR_CMBX_ZERO; + cmb.c_ext_a = GFX_CMBX_ZERO; cmb.c_ext_a_mode = GFX_FUNC_MODE_ZERO; cmb.c_ext_b = ext_local; cmb.c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - cmb.c_ext_d = GR_CMBX_B; + cmb.c_ext_d = GFX_CMBX_B; cmb.c_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA: default: - cmb.c_ext_a = GR_CMBX_ZERO; + cmb.c_ext_a = GFX_CMBX_ZERO; cmb.c_ext_a_mode = GFX_FUNC_MODE_ZERO; cmb.c_ext_b = ext_local; cmb.c_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - cmb.c_ext_d = GR_CMBX_ALOCAL; + cmb.c_ext_d = GFX_CMBX_ALOCAL; cmb.c_ext_d_invert = 0; break; } @@ -16102,36 +16102,36 @@ void AlphaCombinerToExtension() switch (cmb.a_loc) { case GR_COMBINE_LOCAL_ITERATED: - ext_local = GR_CMBX_ITALPHA; + ext_local = GFX_CMBX_ITALPHA; break; case GR_COMBINE_LOCAL_CONSTANT: - ext_local = GR_CMBX_CONSTANT_ALPHA; + ext_local = GFX_CMBX_CONSTANT_ALPHA; break; default: - ext_local = GR_CMBX_ZERO; + ext_local = GFX_CMBX_ZERO; }; switch (cmb.a_oth) { case GR_COMBINE_OTHER_ITERATED: - ext_other = GR_CMBX_ITALPHA; + ext_other = GFX_CMBX_ITALPHA; break; case GR_COMBINE_OTHER_TEXTURE: - ext_other = GR_CMBX_TEXTURE_ALPHA; + ext_other = GFX_CMBX_TEXTURE_ALPHA; break; case GR_COMBINE_OTHER_CONSTANT: - ext_other = GR_CMBX_CONSTANT_ALPHA; + ext_other = GFX_CMBX_CONSTANT_ALPHA; break; default: - ext_other = GR_CMBX_ZERO; + ext_other = GFX_CMBX_ZERO; }; switch (cmb.a_fac) { case GR_COMBINE_FACTOR_ZERO: - cmb.a_ext_c = GR_CMBX_ZERO; + cmb.a_ext_c = GFX_CMBX_ZERO; cmb.a_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_ONE: - cmb.a_ext_c = GR_CMBX_ZERO; + cmb.a_ext_c = GFX_CMBX_ZERO; cmb.a_ext_c_invert = 1; break; case GR_COMBINE_FACTOR_LOCAL: @@ -16144,7 +16144,7 @@ void AlphaCombinerToExtension() cmb.a_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_TEXTURE_ALPHA: - cmb.a_ext_c = GR_CMBX_TEXTURE_ALPHA; + cmb.a_ext_c = GFX_CMBX_TEXTURE_ALPHA; cmb.a_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_ONE_MINUS_LOCAL: @@ -16157,43 +16157,43 @@ void AlphaCombinerToExtension() cmb.a_ext_c_invert = 1; break; case GR_COMBINE_FACTOR_ONE_MINUS_TEXTURE_ALPHA: - cmb.a_ext_c = GR_CMBX_TEXTURE_ALPHA; + cmb.a_ext_c = GFX_CMBX_TEXTURE_ALPHA; cmb.a_ext_c_invert = 1; break; default: - cmb.a_ext_c = GR_CMBX_ZERO; + cmb.a_ext_c = GFX_CMBX_ZERO; cmb.a_ext_c_invert = 0; } switch (cmb.a_fnc) { case GR_COMBINE_FUNCTION_ZERO: - cmb.a_ext_a = GR_CMBX_ZERO; + cmb.a_ext_a = GFX_CMBX_ZERO; cmb.a_ext_a_mode = GFX_FUNC_MODE_X; - cmb.a_ext_b = GR_CMBX_ZERO; + cmb.a_ext_b = GFX_CMBX_ZERO; cmb.a_ext_b_mode = GFX_FUNC_MODE_X; - cmb.a_ext_c = GR_CMBX_ZERO; + cmb.a_ext_c = GFX_CMBX_ZERO; cmb.a_ext_c_invert = 0; - cmb.a_ext_d = GR_CMBX_ZERO; + cmb.a_ext_d = GFX_CMBX_ZERO; cmb.a_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_LOCAL: case GR_COMBINE_FUNCTION_LOCAL_ALPHA: - cmb.a_ext_a = GR_CMBX_ZERO; + cmb.a_ext_a = GFX_CMBX_ZERO; cmb.a_ext_a_mode = GFX_FUNC_MODE_ZERO; cmb.a_ext_b = ext_local; cmb.a_ext_b_mode = GFX_FUNC_MODE_X; - cmb.a_ext_c = GR_CMBX_ZERO; + cmb.a_ext_c = GFX_CMBX_ZERO; cmb.a_ext_c_invert = 1; - cmb.a_ext_d = GR_CMBX_ZERO; + cmb.a_ext_d = GFX_CMBX_ZERO; cmb.a_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER: cmb.a_ext_a = ext_other; cmb.a_ext_a_mode = GFX_FUNC_MODE_X; - cmb.a_ext_b = GR_CMBX_ZERO; + cmb.a_ext_b = GFX_CMBX_ZERO; cmb.a_ext_b_mode = GFX_FUNC_MODE_ZERO; - cmb.a_ext_d = GR_CMBX_ZERO; + cmb.a_ext_d = GFX_CMBX_ZERO; cmb.a_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL: @@ -16202,7 +16202,7 @@ void AlphaCombinerToExtension() cmb.a_ext_a_mode = GFX_FUNC_MODE_X; cmb.a_ext_b = ext_local; cmb.a_ext_b_mode = GFX_FUNC_MODE_ZERO; - cmb.a_ext_d = GR_CMBX_B; + cmb.a_ext_d = GFX_CMBX_B; cmb.a_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL: @@ -16210,7 +16210,7 @@ void AlphaCombinerToExtension() cmb.a_ext_a_mode = GFX_FUNC_MODE_X; cmb.a_ext_b = ext_local; cmb.a_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - cmb.a_ext_d = GR_CMBX_ZERO; + cmb.a_ext_d = GFX_CMBX_ZERO; cmb.a_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL: @@ -16219,16 +16219,16 @@ void AlphaCombinerToExtension() cmb.a_ext_a_mode = GFX_FUNC_MODE_X; cmb.a_ext_b = ext_local; cmb.a_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - cmb.a_ext_d = GR_CMBX_B; + cmb.a_ext_d = GFX_CMBX_B; cmb.a_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL: case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA: - cmb.a_ext_a = GR_CMBX_ZERO; + cmb.a_ext_a = GFX_CMBX_ZERO; cmb.a_ext_a_mode = GFX_FUNC_MODE_ZERO; cmb.a_ext_b = ext_local; cmb.a_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - cmb.a_ext_d = GR_CMBX_B; + cmb.a_ext_d = GFX_CMBX_B; cmb.a_ext_d_invert = 0; break; } @@ -16255,7 +16255,7 @@ void TexColorCombinerToExtension(GrChipID_t tmu) switch (tmu_fac) { case GR_COMBINE_FACTOR_ZERO: - tc_ext_c = GR_CMBX_ZERO; + tc_ext_c = GFX_CMBX_ZERO; tc_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_LOCAL: @@ -16263,19 +16263,19 @@ void TexColorCombinerToExtension(GrChipID_t tmu) tc_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_LOCAL_ALPHA: - tc_ext_c = GR_CMBX_LOCAL_TEXTURE_ALPHA; + tc_ext_c = GFX_CMBX_LOCAL_TEXTURE_ALPHA; tc_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_OTHER_ALPHA: - tc_ext_c = GR_CMBX_OTHER_TEXTURE_ALPHA; + tc_ext_c = GFX_CMBX_OTHER_TEXTURE_ALPHA; tc_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_DETAIL_FACTOR: - tc_ext_c = GR_CMBX_DETAIL_FACTOR; + tc_ext_c = GFX_CMBX_DETAIL_FACTOR; tc_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_ONE: - tc_ext_c = GR_CMBX_ZERO; + tc_ext_c = GFX_CMBX_ZERO; tc_ext_c_invert = 1; break; case GR_COMBINE_FACTOR_ONE_MINUS_LOCAL: @@ -16283,20 +16283,20 @@ void TexColorCombinerToExtension(GrChipID_t tmu) tc_ext_c_invert = 1; break; case GR_COMBINE_FACTOR_ONE_MINUS_LOCAL_ALPHA: - tc_ext_c = GR_CMBX_LOCAL_TEXTURE_ALPHA; + tc_ext_c = GFX_CMBX_LOCAL_TEXTURE_ALPHA; tc_ext_c_invert = 1; break; case GR_COMBINE_FACTOR_ONE_MINUS_OTHER_ALPHA: - tc_ext_c = GR_CMBX_OTHER_TEXTURE_ALPHA; + tc_ext_c = GFX_CMBX_OTHER_TEXTURE_ALPHA; tc_ext_c_invert = 1; break; case GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR: - tc_ext_c = GR_CMBX_DETAIL_FACTOR; + tc_ext_c = GFX_CMBX_DETAIL_FACTOR; tc_ext_c_invert = 1; break; default: WriteTrace(TraceRDP, TraceWarning, "Invalid combiner TMU factor %u.", tmu_fac); - tc_ext_c = GR_CMBX_ZERO; + tc_ext_c = GFX_CMBX_ZERO; tc_ext_c_invert = 0; break; } @@ -16308,9 +16308,9 @@ void TexColorCombinerToExtension(GrChipID_t tmu) tc_ext_a_mode = GFX_FUNC_MODE_ZERO; tc_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB; tc_ext_b_mode = GFX_FUNC_MODE_ZERO; - tc_ext_c = GR_CMBX_ZERO; + tc_ext_c = GFX_CMBX_ZERO; tc_ext_c_invert = 0; - tc_ext_d = GR_CMBX_ZERO; + tc_ext_d = GFX_CMBX_ZERO; tc_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_LOCAL: @@ -16318,67 +16318,67 @@ void TexColorCombinerToExtension(GrChipID_t tmu) tc_ext_a_mode = GFX_FUNC_MODE_X; tc_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB; tc_ext_b_mode = GFX_FUNC_MODE_ZERO; - tc_ext_c = GR_CMBX_ZERO; + tc_ext_c = GFX_CMBX_ZERO; tc_ext_c_invert = 1; - tc_ext_d = GR_CMBX_ZERO; + tc_ext_d = GFX_CMBX_ZERO; tc_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_LOCAL_ALPHA: - tc_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA; + tc_ext_a = GFX_CMBX_LOCAL_TEXTURE_ALPHA; tc_ext_a_mode = GFX_FUNC_MODE_X; tc_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB; tc_ext_b_mode = GFX_FUNC_MODE_ZERO; - tc_ext_c = GR_CMBX_ZERO; + tc_ext_c = GFX_CMBX_ZERO; tc_ext_c_invert = 1; - tc_ext_d = GR_CMBX_ZERO; + tc_ext_d = GFX_CMBX_ZERO; tc_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER: - tc_ext_a = GR_CMBX_OTHER_TEXTURE_RGB; + tc_ext_a = GFX_CMBX_OTHER_TEXTURE_RGB; tc_ext_a_mode = GFX_FUNC_MODE_X; tc_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB; tc_ext_b_mode = GFX_FUNC_MODE_ZERO; - tc_ext_d = GR_CMBX_ZERO; + tc_ext_d = GFX_CMBX_ZERO; tc_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL: - tc_ext_a = GR_CMBX_OTHER_TEXTURE_RGB; + tc_ext_a = GFX_CMBX_OTHER_TEXTURE_RGB; tc_ext_a_mode = GFX_FUNC_MODE_X; tc_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB; tc_ext_b_mode = GFX_FUNC_MODE_ZERO; - tc_ext_d = GR_CMBX_B; + tc_ext_d = GFX_CMBX_B; tc_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL_ALPHA: - tc_ext_a = GR_CMBX_OTHER_TEXTURE_RGB; + tc_ext_a = GFX_CMBX_OTHER_TEXTURE_RGB; tc_ext_a_mode = GFX_FUNC_MODE_X; - tc_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + tc_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; tc_ext_b_mode = GFX_FUNC_MODE_ZERO; - tc_ext_d = GR_CMBX_B; + tc_ext_d = GFX_CMBX_B; tc_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL: - tc_ext_a = GR_CMBX_OTHER_TEXTURE_RGB; + tc_ext_a = GFX_CMBX_OTHER_TEXTURE_RGB; tc_ext_a_mode = GFX_FUNC_MODE_X; tc_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB; tc_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - tc_ext_d = GR_CMBX_ZERO; + tc_ext_d = GFX_CMBX_ZERO; tc_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL: - tc_ext_a = GR_CMBX_OTHER_TEXTURE_RGB; + tc_ext_a = GFX_CMBX_OTHER_TEXTURE_RGB; tc_ext_a_mode = GFX_FUNC_MODE_X; tc_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB; tc_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - tc_ext_d = GR_CMBX_B; + tc_ext_d = GFX_CMBX_B; tc_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL_ALPHA: - tc_ext_a = GR_CMBX_OTHER_TEXTURE_RGB; + tc_ext_a = GFX_CMBX_OTHER_TEXTURE_RGB; tc_ext_a_mode = GFX_FUNC_MODE_X; tc_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB; tc_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - tc_ext_d = GR_CMBX_LOCAL_TEXTURE_ALPHA; + tc_ext_d = GFX_CMBX_LOCAL_TEXTURE_ALPHA; tc_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL: @@ -16386,7 +16386,7 @@ void TexColorCombinerToExtension(GrChipID_t tmu) tc_ext_a_mode = GFX_FUNC_MODE_ZERO; tc_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB; tc_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - tc_ext_d = GR_CMBX_B; + tc_ext_d = GFX_CMBX_B; tc_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA: @@ -16394,7 +16394,7 @@ void TexColorCombinerToExtension(GrChipID_t tmu) tc_ext_a_mode = GFX_FUNC_MODE_ZERO; tc_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB; tc_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - tc_ext_d = GR_CMBX_LOCAL_TEXTURE_ALPHA; + tc_ext_d = GFX_CMBX_LOCAL_TEXTURE_ALPHA; tc_ext_d_invert = 0; break; default: @@ -16403,9 +16403,9 @@ void TexColorCombinerToExtension(GrChipID_t tmu) tc_ext_a_mode = GFX_FUNC_MODE_ZERO; tc_ext_b = GFX_CMBX_LOCAL_TEXTURE_RGB; tc_ext_b_mode = GFX_FUNC_MODE_ZERO; - tc_ext_c = GR_CMBX_ZERO; + tc_ext_c = GFX_CMBX_ZERO; tc_ext_c_invert = 0; - tc_ext_d = GR_CMBX_ZERO; + tc_ext_d = GFX_CMBX_ZERO; tc_ext_d_invert = 0; break; } @@ -16455,42 +16455,42 @@ void TexAlphaCombinerToExtension(GrChipID_t tmu) switch (tmu_a_fac) { case GR_COMBINE_FACTOR_ZERO: - ta_ext_c = GR_CMBX_ZERO; + ta_ext_c = GFX_CMBX_ZERO; ta_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_LOCAL: case GR_COMBINE_FACTOR_LOCAL_ALPHA: - ta_ext_c = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_c = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_OTHER_ALPHA: - ta_ext_c = GR_CMBX_OTHER_TEXTURE_ALPHA; + ta_ext_c = GFX_CMBX_OTHER_TEXTURE_ALPHA; ta_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_DETAIL_FACTOR: - ta_ext_c = GR_CMBX_DETAIL_FACTOR; + ta_ext_c = GFX_CMBX_DETAIL_FACTOR; ta_ext_c_invert = 0; break; case GR_COMBINE_FACTOR_ONE: - ta_ext_c = GR_CMBX_ZERO; + ta_ext_c = GFX_CMBX_ZERO; ta_ext_c_invert = 1; break; case GR_COMBINE_FACTOR_ONE_MINUS_LOCAL: case GR_COMBINE_FACTOR_ONE_MINUS_LOCAL_ALPHA: - ta_ext_c = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_c = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_c_invert = 1; break; case GR_COMBINE_FACTOR_ONE_MINUS_OTHER_ALPHA: - ta_ext_c = GR_CMBX_OTHER_TEXTURE_ALPHA; + ta_ext_c = GFX_CMBX_OTHER_TEXTURE_ALPHA; ta_ext_c_invert = 1; break; case GR_COMBINE_FACTOR_ONE_MINUS_DETAIL_FACTOR: - ta_ext_c = GR_CMBX_DETAIL_FACTOR; + ta_ext_c = GFX_CMBX_DETAIL_FACTOR; ta_ext_c_invert = 1; break; default: WriteTrace(TraceRDP, TraceWarning, "Invalid combiner alpha factor %u.", tmu_a_fac); - ta_ext_c = GR_CMBX_ZERO; + ta_ext_c = GFX_CMBX_ZERO; ta_ext_c_invert = 0; break; } @@ -16498,78 +16498,78 @@ void TexAlphaCombinerToExtension(GrChipID_t tmu) switch (tmu_a_func) { case GR_COMBINE_FUNCTION_ZERO: - ta_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_a = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_a_mode = GFX_FUNC_MODE_ZERO; - ta_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_b_mode = GFX_FUNC_MODE_ZERO; - ta_ext_c = GR_CMBX_ZERO; + ta_ext_c = GFX_CMBX_ZERO; ta_ext_c_invert = 0; - ta_ext_d = GR_CMBX_ZERO; + ta_ext_d = GFX_CMBX_ZERO; ta_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_LOCAL: case GR_COMBINE_FUNCTION_LOCAL_ALPHA: - ta_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_a = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_a_mode = GFX_FUNC_MODE_X; - ta_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_b_mode = GFX_FUNC_MODE_ZERO; - ta_ext_c = GR_CMBX_ZERO; + ta_ext_c = GFX_CMBX_ZERO; ta_ext_c_invert = 1; - ta_ext_d = GR_CMBX_ZERO; + ta_ext_d = GFX_CMBX_ZERO; ta_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER: - ta_ext_a = GR_CMBX_OTHER_TEXTURE_ALPHA; + ta_ext_a = GFX_CMBX_OTHER_TEXTURE_ALPHA; ta_ext_a_mode = GFX_FUNC_MODE_X; - ta_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_b_mode = GFX_FUNC_MODE_ZERO; - ta_ext_d = GR_CMBX_ZERO; + ta_ext_d = GFX_CMBX_ZERO; ta_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL: case GR_COMBINE_FUNCTION_SCALE_OTHER_ADD_LOCAL_ALPHA: - ta_ext_a = GR_CMBX_OTHER_TEXTURE_ALPHA; + ta_ext_a = GFX_CMBX_OTHER_TEXTURE_ALPHA; ta_ext_a_mode = GFX_FUNC_MODE_X; - ta_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_b_mode = GFX_FUNC_MODE_ZERO; - ta_ext_d = GR_CMBX_B; + ta_ext_d = GFX_CMBX_B; ta_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL: - ta_ext_a = GR_CMBX_OTHER_TEXTURE_ALPHA; + ta_ext_a = GFX_CMBX_OTHER_TEXTURE_ALPHA; ta_ext_a_mode = GFX_FUNC_MODE_X; - ta_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - ta_ext_d = GR_CMBX_ZERO; + ta_ext_d = GFX_CMBX_ZERO; ta_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL: case GR_COMBINE_FUNCTION_SCALE_OTHER_MINUS_LOCAL_ADD_LOCAL_ALPHA: - ta_ext_a = GR_CMBX_OTHER_TEXTURE_ALPHA; + ta_ext_a = GFX_CMBX_OTHER_TEXTURE_ALPHA; ta_ext_a_mode = GFX_FUNC_MODE_X; - ta_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - ta_ext_d = GR_CMBX_B; + ta_ext_d = GFX_CMBX_B; ta_ext_d_invert = 0; break; case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL: case GR_COMBINE_FUNCTION_SCALE_MINUS_LOCAL_ADD_LOCAL_ALPHA: - ta_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_a = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_a_mode = GFX_FUNC_MODE_ZERO; - ta_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_b_mode = GFX_FUNC_MODE_NEGATIVE_X; - ta_ext_d = GR_CMBX_B; + ta_ext_d = GFX_CMBX_B; ta_ext_d_invert = 0; break; default: WriteTrace(TraceRDP, TraceWarning, "Invalid combiner alpha coverage function %u.", tmu_a_func); - ta_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_a = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_a_mode = GFX_FUNC_MODE_ZERO; - ta_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + ta_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; ta_ext_b_mode = GFX_FUNC_MODE_ZERO; - ta_ext_c = GR_CMBX_ZERO; + ta_ext_c = GFX_CMBX_ZERO; ta_ext_c_invert = 0; - ta_ext_d = GR_CMBX_ZERO; + ta_ext_d = GFX_CMBX_ZERO; ta_ext_d_invert = 0; break; } diff --git a/Source/Project64-video/Renderer/OGLEScombiner.cpp b/Source/Project64-video/Renderer/OGLEScombiner.cpp index 1877db7f8..3f2f69d18 100644 --- a/Source/Project64-video/Renderer/OGLEScombiner.cpp +++ b/Source/Project64-video/Renderer/OGLEScombiner.cpp @@ -1742,25 +1742,25 @@ void gfxColorCombineExt(gfxCCUColor_t a, gfxCombineMode_t a_mode, gfxCCUColor_t switch (a) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_color_combiner, "vec4 cs_a = vec4(0.0); \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_color_combiner, "vec4 cs_a = vec4(ctexture1.a); \n"); break; - case GR_CMBX_CONSTANT_ALPHA: + case GFX_CMBX_CONSTANT_ALPHA: strcat(fragment_shader_color_combiner, "vec4 cs_a = vec4(constant_color.a); \n"); break; - case GR_CMBX_CONSTANT_COLOR: + case GFX_CMBX_CONSTANT_COLOR: strcat(fragment_shader_color_combiner, "vec4 cs_a = constant_color; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: strcat(fragment_shader_color_combiner, "vec4 cs_a = vec4(vFrontColor.a); \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: strcat(fragment_shader_color_combiner, "vec4 cs_a = vFrontColor; \n"); break; - case GR_CMBX_TEXTURE_RGB: + case GFX_CMBX_TEXTURE_RGB: strcat(fragment_shader_color_combiner, "vec4 cs_a = ctexture1; \n"); break; default: @@ -1789,25 +1789,25 @@ void gfxColorCombineExt(gfxCCUColor_t a, gfxCombineMode_t a_mode, gfxCCUColor_t switch (b) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_color_combiner, "vec4 cs_b = vec4(0.0); \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_color_combiner, "vec4 cs_b = vec4(ctexture1.a); \n"); break; - case GR_CMBX_CONSTANT_ALPHA: + case GFX_CMBX_CONSTANT_ALPHA: strcat(fragment_shader_color_combiner, "vec4 cs_b = vec4(constant_color.a); \n"); break; - case GR_CMBX_CONSTANT_COLOR: + case GFX_CMBX_CONSTANT_COLOR: strcat(fragment_shader_color_combiner, "vec4 cs_b = constant_color; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: strcat(fragment_shader_color_combiner, "vec4 cs_b = vec4(vFrontColor.a); \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: strcat(fragment_shader_color_combiner, "vec4 cs_b = vFrontColor; \n"); break; - case GR_CMBX_TEXTURE_RGB: + case GFX_CMBX_TEXTURE_RGB: strcat(fragment_shader_color_combiner, "vec4 cs_b = ctexture1; \n"); break; default: @@ -1836,34 +1836,34 @@ void gfxColorCombineExt(gfxCCUColor_t a, gfxCombineMode_t a_mode, gfxCCUColor_t switch (c) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(0.0); \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(ctexture1.a); \n"); break; - case GR_CMBX_ALOCAL: + case GFX_CMBX_ALOCAL: strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(c_b.a); \n"); break; - case GR_CMBX_AOTHER: + case GFX_CMBX_AOTHER: strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(c_a.a); \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: strcat(fragment_shader_color_combiner, "vec4 c_c = cs_b; \n"); break; - case GR_CMBX_CONSTANT_ALPHA: + case GFX_CMBX_CONSTANT_ALPHA: strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(constant_color.a); \n"); break; - case GR_CMBX_CONSTANT_COLOR: + case GFX_CMBX_CONSTANT_COLOR: strcat(fragment_shader_color_combiner, "vec4 c_c = constant_color; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(vFrontColor.a); \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: strcat(fragment_shader_color_combiner, "vec4 c_c = vFrontColor; \n"); break; - case GR_CMBX_TEXTURE_RGB: + case GFX_CMBX_TEXTURE_RGB: strcat(fragment_shader_color_combiner, "vec4 c_c = ctexture1; \n"); break; default: @@ -1876,19 +1876,19 @@ void gfxColorCombineExt(gfxCCUColor_t a, gfxCombineMode_t a_mode, gfxCCUColor_t switch (d) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_color_combiner, "vec4 c_d = vec4(0.0); \n"); break; - case GR_CMBX_ALOCAL: + case GFX_CMBX_ALOCAL: strcat(fragment_shader_color_combiner, "vec4 c_d = vec4(c_b.a); \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: strcat(fragment_shader_color_combiner, "vec4 c_d = cs_b; \n"); break; - case GR_CMBX_TEXTURE_RGB: + case GFX_CMBX_TEXTURE_RGB: strcat(fragment_shader_color_combiner, "vec4 c_d = ctexture1; \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: strcat(fragment_shader_color_combiner, "vec4 c_d = vFrontColor; \n"); break; default: @@ -1919,16 +1919,16 @@ void gfxAlphaCombineExt(gfxACUColor_t a, gfxCombineMode_t a_mode, gfxACUColor_t switch (a) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_alpha_combiner, "float as_a = 0.0; \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_alpha_combiner, "float as_a = ctexture1.a; \n"); break; - case GR_CMBX_CONSTANT_ALPHA: + case GFX_CMBX_CONSTANT_ALPHA: strcat(fragment_shader_alpha_combiner, "float as_a = constant_color.a; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: strcat(fragment_shader_alpha_combiner, "float as_a = vFrontColor.a; \n"); break; default: @@ -1957,16 +1957,16 @@ void gfxAlphaCombineExt(gfxACUColor_t a, gfxCombineMode_t a_mode, gfxACUColor_t switch (b) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_alpha_combiner, "float as_b = 0.0; \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_alpha_combiner, "float as_b = ctexture1.a; \n"); break; - case GR_CMBX_CONSTANT_ALPHA: + case GFX_CMBX_CONSTANT_ALPHA: strcat(fragment_shader_alpha_combiner, "float as_b = constant_color.a; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: strcat(fragment_shader_alpha_combiner, "float as_b = vFrontColor.a; \n"); break; default: @@ -1995,25 +1995,25 @@ void gfxAlphaCombineExt(gfxACUColor_t a, gfxCombineMode_t a_mode, gfxACUColor_t switch (c) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_alpha_combiner, "float a_c = 0.0; \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_alpha_combiner, "float a_c = ctexture1.a; \n"); break; - case GR_CMBX_ALOCAL: + case GFX_CMBX_ALOCAL: strcat(fragment_shader_alpha_combiner, "float a_c = as_b; \n"); break; - case GR_CMBX_AOTHER: + case GFX_CMBX_AOTHER: strcat(fragment_shader_alpha_combiner, "float a_c = as_a; \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: strcat(fragment_shader_alpha_combiner, "float a_c = as_b; \n"); break; - case GR_CMBX_CONSTANT_ALPHA: + case GFX_CMBX_CONSTANT_ALPHA: strcat(fragment_shader_alpha_combiner, "float a_c = constant_color.a; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: strcat(fragment_shader_alpha_combiner, "float a_c = vFrontColor.a; \n"); break; default: @@ -2026,16 +2026,16 @@ void gfxAlphaCombineExt(gfxACUColor_t a, gfxCombineMode_t a_mode, gfxACUColor_t switch (d) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_alpha_combiner, "float a_d = 0.0; \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_alpha_combiner, "float a_d = ctexture1.a; \n"); break; - case GR_CMBX_ALOCAL: + case GFX_CMBX_ALOCAL: strcat(fragment_shader_alpha_combiner, "float a_d = as_b; \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: strcat(fragment_shader_alpha_combiner, "float a_d = as_b; \n"); break; default: @@ -2083,25 +2083,25 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ switch (a) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_a = vec4(0.0); \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(vFrontColor.a); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_a = vec4(vFrontColor.a); \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vFrontColor; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_a = vFrontColor; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(readtex0.a); \n"); else @@ -2113,25 +2113,25 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ else strcat(fragment_shader_texture1, "vec4 ctex1s_a = readtex1; \n"); break; - case GR_CMBX_OTHER_TEXTURE_ALPHA: + case GFX_CMBX_OTHER_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_a = vec4(ctexture0.a); \n"); break; - case GR_CMBX_OTHER_TEXTURE_RGB: + case GFX_CMBX_OTHER_TEXTURE_RGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_a = ctexture0; \n"); break; - case GR_CMBX_TMU_CCOLOR: + case GFX_CMBX_TMU_CCOLOR: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = ccolor0; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_a = ccolor1; \n"); break; - case GR_CMBX_TMU_CALPHA: + case GFX_CMBX_TMU_CALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(ccolor0.a); \n"); else @@ -2181,25 +2181,25 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ switch (b) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_b = vec4(0.0); \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(vFrontColor.a); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_b = vec4(vFrontColor.a); \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vFrontColor; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_b = vFrontColor; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(readtex0.a); \n"); else @@ -2211,25 +2211,25 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ else strcat(fragment_shader_texture1, "vec4 ctex1s_b = readtex1; \n"); break; - case GR_CMBX_OTHER_TEXTURE_ALPHA: + case GFX_CMBX_OTHER_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_b = vec4(ctexture0.a); \n"); break; - case GR_CMBX_OTHER_TEXTURE_RGB: + case GFX_CMBX_OTHER_TEXTURE_RGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_b = ctexture0; \n"); break; - case GR_CMBX_TMU_CALPHA: + case GFX_CMBX_TMU_CALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(ccolor0.a); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_b = vec4(ccolor1.a); \n"); break; - case GR_CMBX_TMU_CCOLOR: + case GFX_CMBX_TMU_CCOLOR: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = ccolor0; \n"); else @@ -2279,37 +2279,37 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ switch (c) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = vec4(0.0); \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = ctex0s_b; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = ctex1s_b; \n"); break; - case GR_CMBX_DETAIL_FACTOR: + case GFX_CMBX_DETAIL_FACTOR: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(lambda); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = vec4(lambda); \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vFrontColor; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = vFrontColor; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(vFrontColor.a); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = vec4(vFrontColor.a); \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(readtex0.a); \n"); else @@ -2321,25 +2321,25 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ else strcat(fragment_shader_texture1, "vec4 ctex1_c = readtex1; \n"); break; - case GR_CMBX_OTHER_TEXTURE_ALPHA: + case GFX_CMBX_OTHER_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = vec4(ctexture0.a); \n"); break; - case GR_CMBX_OTHER_TEXTURE_RGB: + case GFX_CMBX_OTHER_TEXTURE_RGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = ctexture0; \n"); break; - case GR_CMBX_TMU_CALPHA: + case GFX_CMBX_TMU_CALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(ccolor0.a); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = vec4(ccolor1.a); \n"); break; - case GR_CMBX_TMU_CCOLOR: + case GFX_CMBX_TMU_CCOLOR: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = ccolor0; \n"); else @@ -2363,25 +2363,25 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ switch (d) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_d = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_d = vec4(0.0); \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_d = ctex0s_b; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_d = ctex1s_b; \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_d = vFrontColor; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_d = vFrontColor; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_d = vec4(readtex0.a); \n"); else @@ -2438,25 +2438,25 @@ void gfxTexAlphaCombineExt(GrChipID_t tmu, gfxTACUColor_t a, gfxCombineMode_t a_ switch (a) { - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_a.a = vFrontColor.a; \n"); else strcat(fragment_shader_texture1, "ctex1s_a.a = vFrontColor.a; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_a.a = readtex0.a; \n"); else strcat(fragment_shader_texture1, "ctex1s_a.a = readtex1.a; \n"); break; - case GR_CMBX_OTHER_TEXTURE_ALPHA: + case GFX_CMBX_OTHER_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_a.a = 0.0; \n"); else strcat(fragment_shader_texture1, "ctex1s_a.a = ctexture0.a; \n"); break; - case GR_CMBX_TMU_CALPHA: + case GFX_CMBX_TMU_CALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_a.a = ccolor0.a; \n"); else @@ -2506,25 +2506,25 @@ void gfxTexAlphaCombineExt(GrChipID_t tmu, gfxTACUColor_t a, gfxCombineMode_t a_ switch (b) { - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_b.a = vFrontColor.a; \n"); else strcat(fragment_shader_texture1, "ctex1s_b.a = vFrontColor.a; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_b.a = readtex0.a; \n"); else strcat(fragment_shader_texture1, "ctex1s_b.a = readtex1.a; \n"); break; - case GR_CMBX_OTHER_TEXTURE_ALPHA: + case GFX_CMBX_OTHER_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_b.a = 0.0; \n"); else strcat(fragment_shader_texture1, "ctex1s_b.a = ctexture0.a; \n"); break; - case GR_CMBX_TMU_CALPHA: + case GFX_CMBX_TMU_CALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_b.a = ccolor0.a; \n"); else @@ -2574,43 +2574,43 @@ void gfxTexAlphaCombineExt(GrChipID_t tmu, gfxTACUColor_t a, gfxCombineMode_t a_ switch (c) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = 0.0; \n"); else strcat(fragment_shader_texture1, "ctex1_c.a = 0.0; \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = ctex0s_b.a; \n"); else strcat(fragment_shader_texture1, "ctex1_c.a = ctex1s_b.a; \n"); break; - case GR_CMBX_DETAIL_FACTOR: + case GFX_CMBX_DETAIL_FACTOR: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = lambda; \n"); else strcat(fragment_shader_texture1, "ctex1_c.a = lambda; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = vFrontColor.a; \n"); else strcat(fragment_shader_texture1, "ctex1_c.a = vFrontColor.a; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = readtex0.a; \n"); else strcat(fragment_shader_texture1, "ctex1_c.a = readtex1.a; \n"); break; - case GR_CMBX_OTHER_TEXTURE_ALPHA: + case GFX_CMBX_OTHER_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = 0.0; \n"); else strcat(fragment_shader_texture1, "ctex1_c.a = ctexture0.a; \n"); break; - case GR_CMBX_TMU_CALPHA: + case GFX_CMBX_TMU_CALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = ccolor0.a; \n"); else @@ -2634,31 +2634,31 @@ void gfxTexAlphaCombineExt(GrChipID_t tmu, gfxTACUColor_t a, gfxCombineMode_t a_ switch (d) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_d.a = 0.0; \n"); else strcat(fragment_shader_texture1, "ctex1_d.a = 0.0; \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_d.a = ctex0s_b.a; \n"); else strcat(fragment_shader_texture1, "ctex1_d.a = ctex1s_b.a; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_d.a = vFrontColor.a; \n"); else strcat(fragment_shader_texture1, "ctex1_d.a = vFrontColor.a; \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_d.a = vFrontColor.a; \n"); else strcat(fragment_shader_texture1, "ctex1_d.a = vFrontColor.a; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_d.a = readtex0.a; \n"); else diff --git a/Source/Project64-video/Renderer/OGLcombiner.cpp b/Source/Project64-video/Renderer/OGLcombiner.cpp index a63c89d4b..7087a3006 100644 --- a/Source/Project64-video/Renderer/OGLcombiner.cpp +++ b/Source/Project64-video/Renderer/OGLcombiner.cpp @@ -1705,25 +1705,25 @@ void gfxColorCombineExt(gfxCCUColor_t a, gfxCombineMode_t a_mode, gfxCCUColor_t switch (a) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_color_combiner, "vec4 cs_a = vec4(0.0); \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_color_combiner, "vec4 cs_a = vec4(ctexture1.a); \n"); break; - case GR_CMBX_CONSTANT_ALPHA: + case GFX_CMBX_CONSTANT_ALPHA: strcat(fragment_shader_color_combiner, "vec4 cs_a = vec4(constant_color.a); \n"); break; - case GR_CMBX_CONSTANT_COLOR: + case GFX_CMBX_CONSTANT_COLOR: strcat(fragment_shader_color_combiner, "vec4 cs_a = constant_color; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: strcat(fragment_shader_color_combiner, "vec4 cs_a = vec4(gl_Color.a); \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: strcat(fragment_shader_color_combiner, "vec4 cs_a = gl_Color; \n"); break; - case GR_CMBX_TEXTURE_RGB: + case GFX_CMBX_TEXTURE_RGB: strcat(fragment_shader_color_combiner, "vec4 cs_a = ctexture1; \n"); break; default: @@ -1752,25 +1752,25 @@ void gfxColorCombineExt(gfxCCUColor_t a, gfxCombineMode_t a_mode, gfxCCUColor_t switch (b) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_color_combiner, "vec4 cs_b = vec4(0.0); \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_color_combiner, "vec4 cs_b = vec4(ctexture1.a); \n"); break; - case GR_CMBX_CONSTANT_ALPHA: + case GFX_CMBX_CONSTANT_ALPHA: strcat(fragment_shader_color_combiner, "vec4 cs_b = vec4(constant_color.a); \n"); break; - case GR_CMBX_CONSTANT_COLOR: + case GFX_CMBX_CONSTANT_COLOR: strcat(fragment_shader_color_combiner, "vec4 cs_b = constant_color; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: strcat(fragment_shader_color_combiner, "vec4 cs_b = vec4(gl_Color.a); \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: strcat(fragment_shader_color_combiner, "vec4 cs_b = gl_Color; \n"); break; - case GR_CMBX_TEXTURE_RGB: + case GFX_CMBX_TEXTURE_RGB: strcat(fragment_shader_color_combiner, "vec4 cs_b = ctexture1; \n"); break; default: @@ -1799,34 +1799,34 @@ void gfxColorCombineExt(gfxCCUColor_t a, gfxCombineMode_t a_mode, gfxCCUColor_t switch (c) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(0.0); \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(ctexture1.a); \n"); break; - case GR_CMBX_ALOCAL: + case GFX_CMBX_ALOCAL: strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(c_b.a); \n"); break; - case GR_CMBX_AOTHER: + case GFX_CMBX_AOTHER: strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(c_a.a); \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: strcat(fragment_shader_color_combiner, "vec4 c_c = cs_b; \n"); break; - case GR_CMBX_CONSTANT_ALPHA: + case GFX_CMBX_CONSTANT_ALPHA: strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(constant_color.a); \n"); break; - case GR_CMBX_CONSTANT_COLOR: + case GFX_CMBX_CONSTANT_COLOR: strcat(fragment_shader_color_combiner, "vec4 c_c = constant_color; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(gl_Color.a); \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: strcat(fragment_shader_color_combiner, "vec4 c_c = gl_Color; \n"); break; - case GR_CMBX_TEXTURE_RGB: + case GFX_CMBX_TEXTURE_RGB: strcat(fragment_shader_color_combiner, "vec4 c_c = ctexture1; \n"); break; default: @@ -1839,19 +1839,19 @@ void gfxColorCombineExt(gfxCCUColor_t a, gfxCombineMode_t a_mode, gfxCCUColor_t switch (d) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_color_combiner, "vec4 c_d = vec4(0.0); \n"); break; - case GR_CMBX_ALOCAL: + case GFX_CMBX_ALOCAL: strcat(fragment_shader_color_combiner, "vec4 c_d = vec4(c_b.a); \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: strcat(fragment_shader_color_combiner, "vec4 c_d = cs_b; \n"); break; - case GR_CMBX_TEXTURE_RGB: + case GFX_CMBX_TEXTURE_RGB: strcat(fragment_shader_color_combiner, "vec4 c_d = ctexture1; \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: strcat(fragment_shader_color_combiner, "vec4 c_d = gl_Color; \n"); break; default: @@ -1882,16 +1882,16 @@ void gfxAlphaCombineExt(gfxACUColor_t a, gfxCombineMode_t a_mode, gfxACUColor_t switch (a) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_alpha_combiner, "float as_a = 0.0; \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_alpha_combiner, "float as_a = ctexture1.a; \n"); break; - case GR_CMBX_CONSTANT_ALPHA: + case GFX_CMBX_CONSTANT_ALPHA: strcat(fragment_shader_alpha_combiner, "float as_a = constant_color.a; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: strcat(fragment_shader_alpha_combiner, "float as_a = gl_Color.a; \n"); break; default: @@ -1920,16 +1920,16 @@ void gfxAlphaCombineExt(gfxACUColor_t a, gfxCombineMode_t a_mode, gfxACUColor_t switch (b) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_alpha_combiner, "float as_b = 0.0; \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_alpha_combiner, "float as_b = ctexture1.a; \n"); break; - case GR_CMBX_CONSTANT_ALPHA: + case GFX_CMBX_CONSTANT_ALPHA: strcat(fragment_shader_alpha_combiner, "float as_b = constant_color.a; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: strcat(fragment_shader_alpha_combiner, "float as_b = gl_Color.a; \n"); break; default: @@ -1958,25 +1958,25 @@ void gfxAlphaCombineExt(gfxACUColor_t a, gfxCombineMode_t a_mode, gfxACUColor_t switch (c) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_alpha_combiner, "float a_c = 0.0; \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_alpha_combiner, "float a_c = ctexture1.a; \n"); break; - case GR_CMBX_ALOCAL: + case GFX_CMBX_ALOCAL: strcat(fragment_shader_alpha_combiner, "float a_c = as_b; \n"); break; - case GR_CMBX_AOTHER: + case GFX_CMBX_AOTHER: strcat(fragment_shader_alpha_combiner, "float a_c = as_a; \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: strcat(fragment_shader_alpha_combiner, "float a_c = as_b; \n"); break; - case GR_CMBX_CONSTANT_ALPHA: + case GFX_CMBX_CONSTANT_ALPHA: strcat(fragment_shader_alpha_combiner, "float a_c = constant_color.a; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: strcat(fragment_shader_alpha_combiner, "float a_c = gl_Color.a; \n"); break; default: @@ -1989,16 +1989,16 @@ void gfxAlphaCombineExt(gfxACUColor_t a, gfxCombineMode_t a_mode, gfxACUColor_t switch (d) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: strcat(fragment_shader_alpha_combiner, "float a_d = 0.0; \n"); break; - case GR_CMBX_TEXTURE_ALPHA: + case GFX_CMBX_TEXTURE_ALPHA: strcat(fragment_shader_alpha_combiner, "float a_d = ctexture1.a; \n"); break; - case GR_CMBX_ALOCAL: + case GFX_CMBX_ALOCAL: strcat(fragment_shader_alpha_combiner, "float a_d = as_b; \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: strcat(fragment_shader_alpha_combiner, "float a_d = as_b; \n"); break; default: @@ -2046,25 +2046,25 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ switch (a) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_a = vec4(0.0); \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(gl_Color.a); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_a = vec4(gl_Color.a); \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = gl_Color; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_a = gl_Color; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(readtex0.a); \n"); else @@ -2076,25 +2076,25 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ else strcat(fragment_shader_texture1, "vec4 ctex1s_a = readtex1; \n"); break; - case GR_CMBX_OTHER_TEXTURE_ALPHA: + case GFX_CMBX_OTHER_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_a = vec4(ctexture0.a); \n"); break; - case GR_CMBX_OTHER_TEXTURE_RGB: + case GFX_CMBX_OTHER_TEXTURE_RGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_a = ctexture0; \n"); break; - case GR_CMBX_TMU_CCOLOR: + case GFX_CMBX_TMU_CCOLOR: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = ccolor0; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_a = ccolor1; \n"); break; - case GR_CMBX_TMU_CALPHA: + case GFX_CMBX_TMU_CALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(ccolor0.a); \n"); else @@ -2144,25 +2144,25 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ switch (b) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_b = vec4(0.0); \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(gl_Color.a); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_b = vec4(gl_Color.a); \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = gl_Color; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_b = gl_Color; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(readtex0.a); \n"); else @@ -2174,25 +2174,25 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ else strcat(fragment_shader_texture1, "vec4 ctex1s_b = readtex1; \n"); break; - case GR_CMBX_OTHER_TEXTURE_ALPHA: + case GFX_CMBX_OTHER_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_b = vec4(ctexture0.a); \n"); break; - case GR_CMBX_OTHER_TEXTURE_RGB: + case GFX_CMBX_OTHER_TEXTURE_RGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_b = ctexture0; \n"); break; - case GR_CMBX_TMU_CALPHA: + case GFX_CMBX_TMU_CALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(ccolor0.a); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1s_b = vec4(ccolor1.a); \n"); break; - case GR_CMBX_TMU_CCOLOR: + case GFX_CMBX_TMU_CCOLOR: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0s_b = ccolor0; \n"); else @@ -2242,37 +2242,37 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ switch (c) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = vec4(0.0); \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = ctex0s_b; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = ctex1s_b; \n"); break; - case GR_CMBX_DETAIL_FACTOR: + case GFX_CMBX_DETAIL_FACTOR: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(lambda); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = vec4(lambda); \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = gl_Color; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = gl_Color; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(gl_Color.a); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = vec4(gl_Color.a); \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(readtex0.a); \n"); else @@ -2284,25 +2284,25 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ else strcat(fragment_shader_texture1, "vec4 ctex1_c = readtex1; \n"); break; - case GR_CMBX_OTHER_TEXTURE_ALPHA: + case GFX_CMBX_OTHER_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = vec4(ctexture0.a); \n"); break; - case GR_CMBX_OTHER_TEXTURE_RGB: + case GFX_CMBX_OTHER_TEXTURE_RGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = ctexture0; \n"); break; - case GR_CMBX_TMU_CALPHA: + case GFX_CMBX_TMU_CALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(ccolor0.a); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_c = vec4(ccolor1.a); \n"); break; - case GR_CMBX_TMU_CCOLOR: + case GFX_CMBX_TMU_CCOLOR: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_c = ccolor0; \n"); else @@ -2326,25 +2326,25 @@ void gfxTexColorCombineExt(GrChipID_t tmu, gfxTCCUColor_t a, gfxCombineMode_t a_ switch (d) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_d = vec4(0.0); \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_d = vec4(0.0); \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_d = ctex0s_b; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_d = ctex1s_b; \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_d = gl_Color; \n"); else strcat(fragment_shader_texture1, "vec4 ctex1_d = gl_Color; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "vec4 ctex0_d = vec4(readtex0.a); \n"); else @@ -2401,25 +2401,25 @@ void gfxTexAlphaCombineExt(GrChipID_t tmu, gfxTACUColor_t a, gfxCombineMode_t a_ switch (a) { - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_a.a = gl_Color.a; \n"); else strcat(fragment_shader_texture1, "ctex1s_a.a = gl_Color.a; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_a.a = readtex0.a; \n"); else strcat(fragment_shader_texture1, "ctex1s_a.a = readtex1.a; \n"); break; - case GR_CMBX_OTHER_TEXTURE_ALPHA: + case GFX_CMBX_OTHER_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_a.a = 0.0; \n"); else strcat(fragment_shader_texture1, "ctex1s_a.a = ctexture0.a; \n"); break; - case GR_CMBX_TMU_CALPHA: + case GFX_CMBX_TMU_CALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_a.a = ccolor0.a; \n"); else @@ -2469,25 +2469,25 @@ void gfxTexAlphaCombineExt(GrChipID_t tmu, gfxTACUColor_t a, gfxCombineMode_t a_ switch (b) { - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_b.a = gl_Color.a; \n"); else strcat(fragment_shader_texture1, "ctex1s_b.a = gl_Color.a; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_b.a = readtex0.a; \n"); else strcat(fragment_shader_texture1, "ctex1s_b.a = readtex1.a; \n"); break; - case GR_CMBX_OTHER_TEXTURE_ALPHA: + case GFX_CMBX_OTHER_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_b.a = 0.0; \n"); else strcat(fragment_shader_texture1, "ctex1s_b.a = ctexture0.a; \n"); break; - case GR_CMBX_TMU_CALPHA: + case GFX_CMBX_TMU_CALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0s_b.a = ccolor0.a; \n"); else @@ -2537,43 +2537,43 @@ void gfxTexAlphaCombineExt(GrChipID_t tmu, gfxTACUColor_t a, gfxCombineMode_t a_ switch (c) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = 0.0; \n"); else strcat(fragment_shader_texture1, "ctex1_c.a = 0.0; \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = ctex0s_b.a; \n"); else strcat(fragment_shader_texture1, "ctex1_c.a = ctex1s_b.a; \n"); break; - case GR_CMBX_DETAIL_FACTOR: + case GFX_CMBX_DETAIL_FACTOR: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = lambda; \n"); else strcat(fragment_shader_texture1, "ctex1_c.a = lambda; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = gl_Color.a; \n"); else strcat(fragment_shader_texture1, "ctex1_c.a = gl_Color.a; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = readtex0.a; \n"); else strcat(fragment_shader_texture1, "ctex1_c.a = readtex1.a; \n"); break; - case GR_CMBX_OTHER_TEXTURE_ALPHA: + case GFX_CMBX_OTHER_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = 0.0; \n"); else strcat(fragment_shader_texture1, "ctex1_c.a = ctexture0.a; \n"); break; - case GR_CMBX_TMU_CALPHA: + case GFX_CMBX_TMU_CALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_c.a = ccolor0.a; \n"); else @@ -2597,31 +2597,31 @@ void gfxTexAlphaCombineExt(GrChipID_t tmu, gfxTACUColor_t a, gfxCombineMode_t a_ switch (d) { - case GR_CMBX_ZERO: + case GFX_CMBX_ZERO: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_d.a = 0.0; \n"); else strcat(fragment_shader_texture1, "ctex1_d.a = 0.0; \n"); break; - case GR_CMBX_B: + case GFX_CMBX_B: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_d.a = ctex0s_b.a; \n"); else strcat(fragment_shader_texture1, "ctex1_d.a = ctex1s_b.a; \n"); break; - case GR_CMBX_ITALPHA: + case GFX_CMBX_ITALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_d.a = gl_Color.a; \n"); else strcat(fragment_shader_texture1, "ctex1_d.a = gl_Color.a; \n"); break; - case GR_CMBX_ITRGB: + case GFX_CMBX_ITRGB: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_d.a = gl_Color.a; \n"); else strcat(fragment_shader_texture1, "ctex1_d.a = gl_Color.a; \n"); break; - case GR_CMBX_LOCAL_TEXTURE_ALPHA: + case GFX_CMBX_LOCAL_TEXTURE_ALPHA: if (num_tex == 0) strcat(fragment_shader_texture0, "ctex0_d.a = readtex0.a; \n"); else diff --git a/Source/Project64-video/TexCache.cpp b/Source/Project64-video/TexCache.cpp index ad22816a9..d7657450e 100644 --- a/Source/Project64-video/TexCache.cpp +++ b/Source/Project64-video/TexCache.cpp @@ -553,21 +553,21 @@ void TexCache() cmb.tmu0_fac = cmb.tmu0_a_fac = GR_COMBINE_FACTOR_ONE; if (cmb.tex_cmb_ext_use) { - cmb.t0c_ext_a = GR_CMBX_OTHER_TEXTURE_RGB; + cmb.t0c_ext_a = GFX_CMBX_OTHER_TEXTURE_RGB; cmb.t0c_ext_a_mode = GFX_FUNC_MODE_X; 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 = GFX_CMBX_ZERO; cmb.t0c_ext_c_invert = 1; - cmb.t0c_ext_d = GR_CMBX_ZERO; + cmb.t0c_ext_d = GFX_CMBX_ZERO; cmb.t0c_ext_d_invert = 0; - cmb.t0a_ext_a = GR_CMBX_OTHER_TEXTURE_ALPHA; + cmb.t0a_ext_a = GFX_CMBX_OTHER_TEXTURE_ALPHA; cmb.t0a_ext_a_mode = GFX_FUNC_MODE_X; - cmb.t0a_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + cmb.t0a_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; cmb.t0a_ext_b_mode = GFX_FUNC_MODE_ZERO; - cmb.t0a_ext_c = GR_CMBX_ZERO; + cmb.t0a_ext_c = GFX_CMBX_ZERO; cmb.t0a_ext_c_invert = 1; - cmb.t0a_ext_d = GR_CMBX_ZERO; + cmb.t0a_ext_d = GFX_CMBX_ZERO; cmb.t0a_ext_d_invert = 0; } } @@ -580,17 +580,17 @@ void TexCache() cmb.t0c_ext_a_mode = GFX_FUNC_MODE_ZERO; 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 = GFX_CMBX_ZERO; cmb.t0c_ext_c_invert = 0; - cmb.t0c_ext_d = GR_CMBX_ZERO; + cmb.t0c_ext_d = GFX_CMBX_ZERO; cmb.t0c_ext_d_invert = 0; - cmb.t0a_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA; + cmb.t0a_ext_a = GFX_CMBX_LOCAL_TEXTURE_ALPHA; cmb.t0a_ext_a_mode = GFX_FUNC_MODE_ZERO; - cmb.t0a_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + cmb.t0a_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; cmb.t0a_ext_b_mode = GFX_FUNC_MODE_ZERO; - cmb.t0a_ext_c = GR_CMBX_ZERO; + cmb.t0a_ext_c = GFX_CMBX_ZERO; cmb.t0a_ext_c_invert = 0; - cmb.t0a_ext_d = GR_CMBX_ZERO; + cmb.t0a_ext_d = GFX_CMBX_ZERO; cmb.t0a_ext_d_invert = 0; } } @@ -599,21 +599,21 @@ void TexCache() cmb.tmu1_fac = cmb.tmu1_a_fac = GR_COMBINE_FACTOR_ONE; if (cmb.tex_cmb_ext_use) { - cmb.t1c_ext_a = GR_CMBX_OTHER_TEXTURE_RGB; + cmb.t1c_ext_a = GFX_CMBX_OTHER_TEXTURE_RGB; cmb.t1c_ext_a_mode = GFX_FUNC_MODE_X; 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 = GFX_CMBX_ZERO; cmb.t1c_ext_c_invert = 1; - cmb.t1c_ext_d = GR_CMBX_ZERO; + cmb.t1c_ext_d = GFX_CMBX_ZERO; cmb.t1c_ext_d_invert = 0; - cmb.t1a_ext_a = GR_CMBX_OTHER_TEXTURE_ALPHA; + cmb.t1a_ext_a = GFX_CMBX_OTHER_TEXTURE_ALPHA; cmb.t1a_ext_a_mode = GFX_FUNC_MODE_X; - cmb.t1a_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + cmb.t1a_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; cmb.t1a_ext_b_mode = GFX_FUNC_MODE_ZERO; - cmb.t1a_ext_c = GR_CMBX_ZERO; + cmb.t1a_ext_c = GFX_CMBX_ZERO; cmb.t1a_ext_c_invert = 1; - cmb.t1a_ext_d = GR_CMBX_ZERO; + cmb.t1a_ext_d = GFX_CMBX_ZERO; cmb.t1a_ext_d_invert = 0; } } @@ -626,17 +626,17 @@ void TexCache() cmb.t1c_ext_a_mode = GFX_FUNC_MODE_ZERO; 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 = GFX_CMBX_ZERO; cmb.t1c_ext_c_invert = 0; - cmb.t1c_ext_d = GR_CMBX_ZERO; + cmb.t1c_ext_d = GFX_CMBX_ZERO; cmb.t1c_ext_d_invert = 0; - cmb.t1a_ext_a = GR_CMBX_LOCAL_TEXTURE_ALPHA; + cmb.t1a_ext_a = GFX_CMBX_LOCAL_TEXTURE_ALPHA; cmb.t1a_ext_a_mode = GFX_FUNC_MODE_ZERO; - cmb.t1a_ext_b = GR_CMBX_LOCAL_TEXTURE_ALPHA; + cmb.t1a_ext_b = GFX_CMBX_LOCAL_TEXTURE_ALPHA; cmb.t1a_ext_b_mode = GFX_FUNC_MODE_ZERO; - cmb.t1a_ext_c = GR_CMBX_ZERO; + cmb.t1a_ext_c = GFX_CMBX_ZERO; cmb.t1a_ext_c_invert = 0; - cmb.t1a_ext_d = GR_CMBX_ZERO; + cmb.t1a_ext_d = GFX_CMBX_ZERO; cmb.t1a_ext_d_invert = 0; } }