From 0228bc744c3cb81accccb5940a2dcf4f1ed9ab4a Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 31 Jul 2017 17:46:36 +1000 Subject: [PATCH] [Video] Change GrAlphaBlendFnc_t to gfxAlphaBlendFnc_t --- Source/Project64-video/Combine.cpp | 50 +++++++++---------- Source/Project64-video/Combine.h | 2 +- Source/Project64-video/FBtoScreen.cpp | 24 ++++----- .../Renderer/OGLEScombiner.cpp | 26 +++++----- .../Project64-video/Renderer/OGLcombiner.cpp | 26 +++++----- Source/Project64-video/Renderer/Renderer.h | 2 +- Source/Project64-video/Renderer/types.h | 23 +++++++++ Source/Project64-video/TexBuffer.cpp | 8 +-- Source/Project64-video/TexCache.cpp | 4 +- Source/Project64-video/Util.cpp | 8 +-- Source/Project64-video/rdp.cpp | 18 +++---- Source/Project64-video/ucode06.cpp | 16 +++--- 12 files changed, 115 insertions(+), 92 deletions(-) diff --git a/Source/Project64-video/Combine.cpp b/Source/Project64-video/Combine.cpp index 3bb46c2b2..c8f7e18e4 100644 --- a/Source/Project64-video/Combine.cpp +++ b/Source/Project64-video/Combine.cpp @@ -15518,8 +15518,8 @@ void Combine() uint32_t cmb_mode_c = (rdp.cycle1 << 16) | (rdp.cycle2 & 0xFFFF); uint32_t cmb_mode_a = (rdp.cycle1 & 0x0FFF0000) | ((rdp.cycle2 >> 16) & 0x00000FFF); - cmb.abf1 = GR_BLEND_SRC_ALPHA; - cmb.abf2 = GR_BLEND_ONE_MINUS_SRC_ALPHA; + cmb.abf1 = GFX_BLEND_SRC_ALPHA; + cmb.abf2 = GFX_BLEND_ONE_MINUS_SRC_ALPHA; #ifdef FASTSEARCH // Fast, ordered search @@ -15732,13 +15732,13 @@ void CombineBlender() case 0x00c0: //ISS64 case 0xc302: - A_BLEND(GR_BLEND_ONE, GR_BLEND_ZERO); + A_BLEND(GFX_BLEND_ONE, GFX_BLEND_ZERO); break; //Space Invaders case 0x0448: case 0x055a: - A_BLEND(GR_BLEND_ONE, GR_BLEND_ONE); + A_BLEND(GFX_BLEND_ONE, GFX_BLEND_ONE); break; //Pokemon Stadium @@ -15746,11 +15746,11 @@ void CombineBlender() // LOT in Zelda: MM case 0xaf50: case 0x0f5a: //clr_in * 0 + clr_mem * 1 - A_BLEND(GR_BLEND_ZERO, GR_BLEND_ONE); + A_BLEND(GFX_BLEND_ZERO, GFX_BLEND_ONE); break; case 0x5f50: //clr_mem * 0 + clr_mem * (1-a) - A_BLEND(GR_BLEND_ZERO, GR_BLEND_ONE_MINUS_SRC_ALPHA); + A_BLEND(GFX_BLEND_ZERO, GFX_BLEND_ONE_MINUS_SRC_ALPHA); break; /* @@ -15771,12 +15771,12 @@ void CombineBlender() rdp.col[0] = rdp.col[0] * (1.0f-percent) + ((rdp.fog_color>>24) & 0xFF) / 255.0f * percent; rdp.col[1] = rdp.col[1] * (1.0f-percent) + ((rdp.fog_color>>16) & 0xFF) / 255.0f * percent; rdp.col[2] = rdp.col[2] * (1.0f-percent) + ((rdp.fog_color>>8) & 0xFF) / 255.0f * percent; - A_BLEND (GR_BLEND_SRC_ALPHA, GR_BLEND_ONE_MINUS_SRC_ALPHA); + A_BLEND (GFX_BLEND_SRC_ALPHA, GFX_BLEND_ONE_MINUS_SRC_ALPHA); } break; */ case 0xf550: //clr_fog * a_fog + clr_mem * (1-a) - A_BLEND(GR_BLEND_SRC_ALPHA, GR_BLEND_ONE_MINUS_SRC_ALPHA); + A_BLEND(GFX_BLEND_SRC_ALPHA, GFX_BLEND_ONE_MINUS_SRC_ALPHA); { uint32_t prim = rdp.prim_color; rdp.prim_color = rdp.fog_color; @@ -15788,7 +15788,7 @@ void CombineBlender() case 0x0150: //spiderman case 0x0d18: //clr_in * a_fog + clr_mem * (1-a) - A_BLEND(GR_BLEND_SRC_ALPHA, GR_BLEND_ONE_MINUS_SRC_ALPHA); + A_BLEND(GFX_BLEND_SRC_ALPHA, GFX_BLEND_ONE_MINUS_SRC_ALPHA); if (rdp.cycle_mode == 1 && rdp.cycle2 != 0x01ff1fff) { uint32_t prim = rdp.prim_color; @@ -15805,27 +15805,27 @@ void CombineBlender() ac_prim(); rdp.prim_color = prim; } - A_BLEND(GR_BLEND_SRC_ALPHA, GR_BLEND_ONE); + A_BLEND(GFX_BLEND_SRC_ALPHA, GFX_BLEND_ONE); break; case 0x5000: /* Vigilante 8 explosions */ - A_BLEND(GR_BLEND_ONE_MINUS_SRC_ALPHA, GR_BLEND_SRC_ALPHA); + A_BLEND(GFX_BLEND_ONE_MINUS_SRC_ALPHA, GFX_BLEND_SRC_ALPHA); break; case 0xFA00: // Bomberman second attack - A_BLEND(GR_BLEND_ONE, GR_BLEND_ZERO); + A_BLEND(GFX_BLEND_ONE, GFX_BLEND_ZERO); break; //Pokemon Stadium case 0x0F1A: if (rdp.cycle_mode == 0) - A_BLEND(GR_BLEND_ONE, GR_BLEND_ZERO); + A_BLEND(GFX_BLEND_ONE, GFX_BLEND_ZERO); else - A_BLEND(GR_BLEND_ZERO, GR_BLEND_ONE); + A_BLEND(GFX_BLEND_ZERO, GFX_BLEND_ONE); break; default: - A_BLEND(GR_BLEND_SRC_ALPHA, GR_BLEND_ONE_MINUS_SRC_ALPHA); + A_BLEND(GFX_BLEND_SRC_ALPHA, GFX_BLEND_ONE_MINUS_SRC_ALPHA); } } /* @@ -15846,15 +15846,15 @@ void CombineBlender() rdp.col[0] = rdp.col[0] * (1.0f-percent) + ((rdp.fog_color>>24) & 0xFF) / 255.0f * percent; rdp.col[1] = rdp.col[1] * (1.0f-percent) + ((rdp.fog_color>>16) & 0xFF) / 255.0f * percent; rdp.col[2] = rdp.col[2] * (1.0f-percent) + ((rdp.fog_color>>8) & 0xFF) / 255.0f * percent; - A_BLEND (GR_BLEND_ONE, GR_BLEND_ZERO); + A_BLEND (GFX_BLEND_ONE, GFX_BLEND_ZERO); } */ else if (blendmode == 0x0040) // Mia Soccer Lights - A_BLEND(GR_BLEND_SRC_ALPHA, GR_BLEND_ONE_MINUS_SRC_ALPHA); + A_BLEND(GFX_BLEND_SRC_ALPHA, GFX_BLEND_ONE_MINUS_SRC_ALPHA); else if (g_settings->hacks(CSettings::hack_Pilotwings) && (rdp.othermode_l & 0x80)) //CLR_ON_CVG without FORCE_BL - A_BLEND(GR_BLEND_ZERO, GR_BLEND_ONE); + A_BLEND(GFX_BLEND_ZERO, GFX_BLEND_ONE); else - A_BLEND(GR_BLEND_ONE, GR_BLEND_ZERO); + A_BLEND(GFX_BLEND_ONE, GFX_BLEND_ZERO); // ALPHA_CVG_SEL means full alpha // The reason it wasn't working before was because I wasn't handling rdp:setothermode @@ -15863,15 +15863,15 @@ void CombineBlender() { if (g_settings->hacks(CSettings::hack_PMario) && (blendmode == 0x5055)) { - A_BLEND(GR_BLEND_ZERO, GR_BLEND_ONE); + A_BLEND(GFX_BLEND_ZERO, GFX_BLEND_ONE); } else if (blendmode == 0x4055) // Mario Golf { - A_BLEND(GR_BLEND_ZERO, GR_BLEND_ONE); + A_BLEND(GFX_BLEND_ZERO, GFX_BLEND_ONE); } else { - A_BLEND(GR_BLEND_ONE, GR_BLEND_ZERO); + A_BLEND(GFX_BLEND_ONE, GFX_BLEND_ZERO); } } @@ -15881,18 +15881,18 @@ void CombineBlender() { if (rdp.othermode_l == 0xff5a6379) { - A_BLEND(GR_BLEND_ZERO, GR_BLEND_SRC_ALPHA); + A_BLEND(GFX_BLEND_ZERO, GFX_BLEND_SRC_ALPHA); } else if (rdp.othermode_l == 0x00504dd9) //players shadows. CVG_DST_WRAP { - A_BLEND(GR_BLEND_ZERO, GR_BLEND_ONE); + A_BLEND(GFX_BLEND_ZERO, GFX_BLEND_ONE); } } else if (g_settings->hacks(CSettings::hack_TGR)) { if (rdp.othermode_l == 0x0f0a0235) { - A_BLEND(GR_BLEND_SRC_ALPHA, GR_BLEND_ONE_MINUS_SRC_ALPHA); + A_BLEND(GFX_BLEND_SRC_ALPHA, GFX_BLEND_ONE_MINUS_SRC_ALPHA); } } //*/ diff --git a/Source/Project64-video/Combine.h b/Source/Project64-video/Combine.h index e3602210b..5bb9a2fc3 100644 --- a/Source/Project64-video/Combine.h +++ b/Source/Project64-video/Combine.h @@ -67,7 +67,7 @@ typedef struct uint8_t dc0_detailscale, dc1_detailscale; float dc0_detailmax, dc1_detailmax; float lodbias0, lodbias1; - uint32_t abf1, abf2; + gfxAlphaBlendFnc_t abf1, abf2; uint32_t mod_0, modcolor_0, modcolor1_0, modcolor2_0, modfactor_0; uint32_t mod_1, modcolor_1, modcolor1_1, modcolor2_1, modfactor_1; //combine extensions diff --git a/Source/Project64-video/FBtoScreen.cpp b/Source/Project64-video/FBtoScreen.cpp index a6d4cee6f..e6f80cd4a 100644 --- a/Source/Project64-video/FBtoScreen.cpp +++ b/Source/Project64-video/FBtoScreen.cpp @@ -66,17 +66,17 @@ static gfxChipID_t SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaqu if (opaque) { gfxAlphaTestFunction(GR_CMP_ALWAYS); - gfxAlphaBlendFunction(GR_BLEND_ONE, - GR_BLEND_ZERO, - GR_BLEND_ONE, - GR_BLEND_ZERO); + gfxAlphaBlendFunction(GFX_BLEND_ONE, + GFX_BLEND_ZERO, + GFX_BLEND_ONE, + GFX_BLEND_ZERO); } else { - gfxAlphaBlendFunction(GR_BLEND_SRC_ALPHA, - GR_BLEND_ONE_MINUS_SRC_ALPHA, - GR_BLEND_ONE, - GR_BLEND_ZERO); + gfxAlphaBlendFunction(GFX_BLEND_SRC_ALPHA, + GFX_BLEND_ONE_MINUS_SRC_ALPHA, + GFX_BLEND_ONE, + GFX_BLEND_ZERO); } gfxDepthBufferFunction(GR_CMP_ALWAYS); gfxCullMode(GR_CULL_DISABLE); @@ -477,10 +477,10 @@ static void DrawHiresDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info) GFX_COMBINE_LOCAL_NONE, GFX_COMBINE_OTHER_TEXTURE, FXFALSE); - gfxAlphaBlendFunction(GR_BLEND_SRC_ALPHA, - GR_BLEND_ONE_MINUS_SRC_ALPHA, - GR_BLEND_ONE, - GR_BLEND_ZERO); + gfxAlphaBlendFunction(GFX_BLEND_SRC_ALPHA, + GFX_BLEND_ONE_MINUS_SRC_ALPHA, + GFX_BLEND_ONE, + GFX_BLEND_ZERO); gfxDepthBufferFunction(GR_CMP_ALWAYS); gfxDepthMask(FXFALSE); gfxCullMode(GR_CULL_DISABLE); diff --git a/Source/Project64-video/Renderer/OGLEScombiner.cpp b/Source/Project64-video/Renderer/OGLEScombiner.cpp index fa2014b47..f005460c8 100644 --- a/Source/Project64-video/Renderer/OGLEScombiner.cpp +++ b/Source/Project64-video/Renderer/OGLEScombiner.cpp @@ -1464,23 +1464,23 @@ void gfxTexCombine(gfxChipID_t tmu, gfxCombineFunction_t rgb_function, gfxCombin need_to_compile = 1; } -void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df) +void gfxAlphaBlendFunction(gfxAlphaBlendFnc_t rgb_sf, gfxAlphaBlendFnc_t rgb_df, gfxAlphaBlendFnc_t alpha_sf, gfxAlphaBlendFnc_t alpha_df) { int sfactorRGB = 0, dfactorRGB = 0, sfactorAlpha = 0, dfactorAlpha = 0; WriteTrace(TraceGlitch, TraceDebug, "rgb_sf: %d rgb_df: %d alpha_sf: %d alpha_df: %d", rgb_sf, rgb_df, alpha_sf, alpha_df); switch (rgb_sf) { - case GR_BLEND_ZERO: + case GFX_BLEND_ZERO: sfactorRGB = GL_ZERO; break; - case GR_BLEND_SRC_ALPHA: + case GFX_BLEND_SRC_ALPHA: sfactorRGB = GL_SRC_ALPHA; break; - case GR_BLEND_ONE: + case GFX_BLEND_ONE: sfactorRGB = GL_ONE; break; - case GR_BLEND_ONE_MINUS_SRC_ALPHA: + case GFX_BLEND_ONE_MINUS_SRC_ALPHA: sfactorRGB = GL_ONE_MINUS_SRC_ALPHA; break; default: @@ -1489,16 +1489,16 @@ void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, G switch (rgb_df) { - case GR_BLEND_ZERO: + case GFX_BLEND_ZERO: dfactorRGB = GL_ZERO; break; - case GR_BLEND_SRC_ALPHA: + case GFX_BLEND_SRC_ALPHA: dfactorRGB = GL_SRC_ALPHA; break; - case GR_BLEND_ONE: + case GFX_BLEND_ONE: dfactorRGB = GL_ONE; break; - case GR_BLEND_ONE_MINUS_SRC_ALPHA: + case GFX_BLEND_ONE_MINUS_SRC_ALPHA: dfactorRGB = GL_ONE_MINUS_SRC_ALPHA; break; default: @@ -1507,10 +1507,10 @@ void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, G switch (alpha_sf) { - case GR_BLEND_ZERO: + case GFX_BLEND_ZERO: sfactorAlpha = GL_ZERO; break; - case GR_BLEND_ONE: + case GFX_BLEND_ONE: sfactorAlpha = GL_ONE; break; default: @@ -1519,10 +1519,10 @@ void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, G switch (alpha_df) { - case GR_BLEND_ZERO: + case GFX_BLEND_ZERO: dfactorAlpha = GL_ZERO; break; - case GR_BLEND_ONE: + case GFX_BLEND_ONE: dfactorAlpha = GL_ONE; break; default: diff --git a/Source/Project64-video/Renderer/OGLcombiner.cpp b/Source/Project64-video/Renderer/OGLcombiner.cpp index 92788002e..6a2bbe404 100644 --- a/Source/Project64-video/Renderer/OGLcombiner.cpp +++ b/Source/Project64-video/Renderer/OGLcombiner.cpp @@ -1401,23 +1401,23 @@ void gfxTexCombine(gfxChipID_t tmu, gfxCombineFunction_t rgb_function, gfxCombin need_to_compile = 1; } -void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df) +void gfxAlphaBlendFunction(gfxAlphaBlendFnc_t rgb_sf, gfxAlphaBlendFnc_t rgb_df, gfxAlphaBlendFnc_t alpha_sf, gfxAlphaBlendFnc_t alpha_df) { int sfactorRGB = 0, dfactorRGB = 0, sfactorAlpha = 0, dfactorAlpha = 0; WriteTrace(TraceGlitch, TraceDebug, "rgb_sf: %d rgb_df: %d alpha_sf: %d alpha_df: %d", rgb_sf, rgb_df, alpha_sf, alpha_df); switch (rgb_sf) { - case GR_BLEND_ZERO: + case GFX_BLEND_ZERO: sfactorRGB = GL_ZERO; break; - case GR_BLEND_SRC_ALPHA: + case GFX_BLEND_SRC_ALPHA: sfactorRGB = GL_SRC_ALPHA; break; - case GR_BLEND_ONE: + case GFX_BLEND_ONE: sfactorRGB = GL_ONE; break; - case GR_BLEND_ONE_MINUS_SRC_ALPHA: + case GFX_BLEND_ONE_MINUS_SRC_ALPHA: sfactorRGB = GL_ONE_MINUS_SRC_ALPHA; break; default: @@ -1426,16 +1426,16 @@ void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, G switch (rgb_df) { - case GR_BLEND_ZERO: + case GFX_BLEND_ZERO: dfactorRGB = GL_ZERO; break; - case GR_BLEND_SRC_ALPHA: + case GFX_BLEND_SRC_ALPHA: dfactorRGB = GL_SRC_ALPHA; break; - case GR_BLEND_ONE: + case GFX_BLEND_ONE: dfactorRGB = GL_ONE; break; - case GR_BLEND_ONE_MINUS_SRC_ALPHA: + case GFX_BLEND_ONE_MINUS_SRC_ALPHA: dfactorRGB = GL_ONE_MINUS_SRC_ALPHA; break; default: @@ -1444,10 +1444,10 @@ void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, G switch (alpha_sf) { - case GR_BLEND_ZERO: + case GFX_BLEND_ZERO: sfactorAlpha = GL_ZERO; break; - case GR_BLEND_ONE: + case GFX_BLEND_ONE: sfactorAlpha = GL_ONE; break; default: @@ -1456,10 +1456,10 @@ void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, G switch (alpha_df) { - case GR_BLEND_ZERO: + case GFX_BLEND_ZERO: dfactorAlpha = GL_ZERO; break; - case GR_BLEND_ONE: + case GFX_BLEND_ONE: dfactorAlpha = GL_ONE; break; default: diff --git a/Source/Project64-video/Renderer/Renderer.h b/Source/Project64-video/Renderer/Renderer.h index 040599386..e6a3a065c 100644 --- a/Source/Project64-video/Renderer/Renderer.h +++ b/Source/Project64-video/Renderer/Renderer.h @@ -26,7 +26,7 @@ void gfxConstantColorValue(gfxColor_t value); void gfxColorCombine(gfxCombineFunction_t function, gfxCombineFactor_t factor, gfxCombineLocal_t local, gfxCombineOther_t other, bool invert); void gfxAlphaCombine(gfxCombineFunction_t function, gfxCombineFactor_t factor, gfxCombineLocal_t local, gfxCombineOther_t other, bool invert); void gfxTexCombine(gfxChipID_t tmu, gfxCombineFunction_t rgb_function, gfxCombineFactor_t rgb_factor, gfxCombineFunction_t alpha_function, gfxCombineFactor_t alpha_factor, bool rgb_invert, bool alpha_invert); -void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df); +void gfxAlphaBlendFunction(gfxAlphaBlendFnc_t rgb_sf, gfxAlphaBlendFnc_t rgb_df, gfxAlphaBlendFnc_t alpha_sf, gfxAlphaBlendFnc_t alpha_df); void gfxAlphaTestReferenceValue(gfxAlpha_t value); void gfxAlphaTestFunction(GrCmpFnc_t function); void gfxFogMode(GrFogMode_t mode); diff --git a/Source/Project64-video/Renderer/types.h b/Source/Project64-video/Renderer/types.h index 446253457..9aabc9ded 100644 --- a/Source/Project64-video/Renderer/types.h +++ b/Source/Project64-video/Renderer/types.h @@ -162,6 +162,29 @@ enum gfxCombineOther_t GFX_COMBINE_OTHER_NONE = GFX_COMBINE_OTHER_CONSTANT, }; +enum gfxAlphaBlendFnc_t +{ + GFX_BLEND_ZERO = 0x0, + GFX_BLEND_SRC_ALPHA = 0x1, + GFX_BLEND_SRC_COLOR = 0x2, + GFX_BLEND_DST_COLOR = GFX_BLEND_SRC_COLOR, + GFX_BLEND_DST_ALPHA = 0x3, + GFX_BLEND_ONE = 0x4, + GFX_BLEND_ONE_MINUS_SRC_ALPHA = 0x5, + GFX_BLEND_ONE_MINUS_SRC_COLOR = 0x6, + GFX_BLEND_ONE_MINUS_DST_COLOR = GFX_BLEND_ONE_MINUS_SRC_COLOR, + GFX_BLEND_ONE_MINUS_DST_ALPHA = 0x7, + GFX_BLEND_RESERVED_8 = 0x8, + GFX_BLEND_RESERVED_9 = 0x9, + GFX_BLEND_RESERVED_A = 0xa, + GFX_BLEND_RESERVED_B = 0xb, + GFX_BLEND_RESERVED_C = 0xc, + GFX_BLEND_RESERVED_D = 0xd, + GFX_BLEND_RESERVED_E = 0xe, + GFX_BLEND_ALPHA_SATURATE = 0xf, + GFX_BLEND_PREFOG_COLOR = GFX_BLEND_ALPHA_SATURATE, +}; + enum GFX_CMBX { GFX_CMBX_ZERO = 0x00, diff --git a/Source/Project64-video/TexBuffer.cpp b/Source/Project64-video/TexBuffer.cpp index c7f90b8d1..040ecf163 100644 --- a/Source/Project64-video/TexBuffer.cpp +++ b/Source/Project64-video/TexBuffer.cpp @@ -335,10 +335,10 @@ static gfxTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE) GFX_COMBINE_OTHER_TEXTURE, FXFALSE); // gfxConstantColorValue (0xFFFFFFFF); - gfxAlphaBlendFunction(GR_BLEND_ONE, // use alpha compare, but not T0 alpha - GR_BLEND_ZERO, - GR_BLEND_ONE, - GR_BLEND_ZERO); + gfxAlphaBlendFunction(GFX_BLEND_ONE, // use alpha compare, but not T0 alpha + GFX_BLEND_ZERO, + GFX_BLEND_ONE, + GFX_BLEND_ZERO); gfxClipWindow(0, 0, g_scr_res_x, g_scr_res_y); gfxDepthBufferFunction(GR_CMP_ALWAYS); gfxDepthMask(FXFALSE); diff --git a/Source/Project64-video/TexCache.cpp b/Source/Project64-video/TexCache.cpp index 05d4ec06f..603b1de9c 100644 --- a/Source/Project64-video/TexCache.cpp +++ b/Source/Project64-video/TexCache.cpp @@ -679,7 +679,7 @@ void TexCache() gfxAlphaCombine(cmb.a_fnc, cmb.a_fac, cmb.a_loc, cmb.a_oth, FXFALSE); } gfxConstantColorValue(cmb.ccolor); - gfxAlphaBlendFunction(cmb.abf1, cmb.abf2, GR_BLEND_ZERO, GR_BLEND_ZERO); + gfxAlphaBlendFunction(cmb.abf1, cmb.abf2, GFX_BLEND_ZERO, GFX_BLEND_ZERO); if (!rdp.tex) //nothing more to do return; } @@ -1677,4 +1677,4 @@ void LoadTex(int id, gfxChipID_t tmu) gfxTexSource(tmu, tex_addr, GR_MIPMAPLEVELMASK_BOTH, t_info); } WriteTrace(TraceRDP, TraceDebug, " | | +- LoadTex end"); -} +} \ No newline at end of file diff --git a/Source/Project64-video/Util.cpp b/Source/Project64-video/Util.cpp index 4e3e15124..d1f7df71e 100644 --- a/Source/Project64-video/Util.cpp +++ b/Source/Project64-video/Util.cpp @@ -1962,10 +1962,10 @@ void set_message_combiner() GFX_COMBINE_LOCAL_NONE, GFX_COMBINE_OTHER_TEXTURE, FXFALSE); - gfxAlphaBlendFunction(GR_BLEND_ONE, - GR_BLEND_ZERO, - GR_BLEND_ZERO, - GR_BLEND_ZERO); + gfxAlphaBlendFunction(GFX_BLEND_ONE, + GFX_BLEND_ZERO, + GFX_BLEND_ZERO, + GFX_BLEND_ZERO); gfxAlphaTestFunction(GR_CMP_ALWAYS); gfxStippleMode(GR_STIPPLE_DISABLE); gfxTexFilterMode(GFX_TMU0, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR); diff --git a/Source/Project64-video/rdp.cpp b/Source/Project64-video/rdp.cpp index 908ccc6a2..784744b3a 100644 --- a/Source/Project64-video/rdp.cpp +++ b/Source/Project64-video/rdp.cpp @@ -2514,7 +2514,7 @@ void rdp_fillrect() GFX_COMBINE_OTHER_NONE, FXFALSE); - gfxAlphaBlendFunction(GR_BLEND_ONE, GR_BLEND_ZERO, GR_BLEND_ONE, GR_BLEND_ZERO); + gfxAlphaBlendFunction(GFX_BLEND_ONE, GFX_BLEND_ZERO, GFX_BLEND_ONE, GFX_BLEND_ZERO); gfxAlphaTestFunction(GR_CMP_ALWAYS); gfxStippleMode(GR_STIPPLE_DISABLE); @@ -3128,10 +3128,10 @@ void SetWireframeCol() GFX_COMBINE_LOCAL_ITERATED, GFX_COMBINE_OTHER_NONE, FXFALSE); - gfxAlphaBlendFunction(GR_BLEND_ONE, - GR_BLEND_ZERO, - GR_BLEND_ZERO, - GR_BLEND_ZERO); + gfxAlphaBlendFunction(GFX_BLEND_ONE, + GFX_BLEND_ZERO, + GFX_BLEND_ZERO, + GFX_BLEND_ZERO); gfxTexCombine(GFX_TMU0, GFX_COMBINE_FUNCTION_ZERO, GFX_COMBINE_FACTOR_NONE, @@ -3157,10 +3157,10 @@ void SetWireframeCol() GFX_COMBINE_OTHER_NONE, FXFALSE); gfxConstantColorValue(0xFF0000FF); - gfxAlphaBlendFunction(GR_BLEND_ONE, - GR_BLEND_ZERO, - GR_BLEND_ZERO, - GR_BLEND_ZERO); + gfxAlphaBlendFunction(GFX_BLEND_ONE, + GFX_BLEND_ZERO, + GFX_BLEND_ZERO, + GFX_BLEND_ZERO); gfxTexCombine(GFX_TMU0, GFX_COMBINE_FUNCTION_ZERO, GFX_COMBINE_FACTOR_NONE, diff --git a/Source/Project64-video/ucode06.cpp b/Source/Project64-video/ucode06.cpp index 9b3b93f27..23dd2ee78 100644 --- a/Source/Project64-video/ucode06.cpp +++ b/Source/Project64-video/ucode06.cpp @@ -82,10 +82,10 @@ float set_sprite_combine_mode() GFX_COMBINE_LOCAL_NONE, GFX_COMBINE_OTHER_TEXTURE, FXFALSE); - gfxAlphaBlendFunction(GR_BLEND_ONE, - GR_BLEND_ZERO, - GR_BLEND_ZERO, - GR_BLEND_ZERO); + gfxAlphaBlendFunction(GFX_BLEND_ONE, + GFX_BLEND_ZERO, + GFX_BLEND_ZERO, + GFX_BLEND_ZERO); if (rdp.othermode_l & 1) { gfxAlphaTestFunction(GR_CMP_GEQUAL); @@ -168,10 +168,10 @@ void DrawHiresDepthImage(const DRAWIMAGE & d) GFX_COMBINE_LOCAL_NONE, GFX_COMBINE_OTHER_TEXTURE, FXFALSE); - gfxAlphaBlendFunction(GR_BLEND_ONE, - GR_BLEND_ZERO, - GR_BLEND_ONE, - GR_BLEND_ZERO); + gfxAlphaBlendFunction(GFX_BLEND_ONE, + GFX_BLEND_ZERO, + GFX_BLEND_ONE, + GFX_BLEND_ZERO); gfxDepthBufferFunction(GR_CMP_ALWAYS); gfxDepthMask(FXFALSE);