diff --git a/Source/Project64-video/FBtoScreen.cpp b/Source/Project64-video/FBtoScreen.cpp index 77d1b8957..f0cc4fc05 100644 --- a/Source/Project64-video/FBtoScreen.cpp +++ b/Source/Project64-video/FBtoScreen.cpp @@ -77,7 +77,7 @@ static int SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaque) FXFALSE); if (opaque) { - grAlphaTestFunction(GR_CMP_ALWAYS); + gfxAlphaTestFunction(GR_CMP_ALWAYS); gfxAlphaBlendFunction(GR_BLEND_ONE, GR_BLEND_ZERO, GR_BLEND_ONE, diff --git a/Source/Project64-video/Renderer/OGLEScombiner.cpp b/Source/Project64-video/Renderer/OGLEScombiner.cpp index 21f1ee6f6..8d5478507 100644 --- a/Source/Project64-video/Renderer/OGLEScombiner.cpp +++ b/Source/Project64-video/Renderer/OGLEScombiner.cpp @@ -1536,11 +1536,10 @@ void gfxAlphaTestReferenceValue(gfxAlpha_t value) { WriteTrace(TraceGlitch, TraceDebug, "value: %d", value); g_alpha_ref = value; - grAlphaTestFunction(g_alpha_func); + gfxAlphaTestFunction(g_alpha_func); } -FX_ENTRY void FX_CALL -grAlphaTestFunction(GrCmpFnc_t function) +void gfxAlphaTestFunction(GrCmpFnc_t function) { WriteTrace(TraceGlitch, TraceDebug, "function: %d", function); g_alpha_func = function; @@ -1559,7 +1558,7 @@ grAlphaTestFunction(GrCmpFnc_t function) return; break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaTestFunction : unknown function : %x", function); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaTestFunction : unknown function : %x", function); } //glEnable(GL_ALPHA_TEST); g_alpha_test = true; diff --git a/Source/Project64-video/Renderer/OGLcombiner.cpp b/Source/Project64-video/Renderer/OGLcombiner.cpp index 74c65075e..b49e46746 100644 --- a/Source/Project64-video/Renderer/OGLcombiner.cpp +++ b/Source/Project64-video/Renderer/OGLcombiner.cpp @@ -1478,11 +1478,10 @@ void gfxAlphaTestReferenceValue(gfxAlpha_t value) { WriteTrace(TraceGlitch, TraceDebug, "value: %d", value); alpha_ref = value; - grAlphaTestFunction(alpha_func); + gfxAlphaTestFunction(alpha_func); } -FX_ENTRY void FX_CALL -grAlphaTestFunction(GrCmpFnc_t function) +void gfxAlphaTestFunction(GrCmpFnc_t function) { WriteTrace(TraceGlitch, TraceDebug, "function: %d", function); alpha_func = function; @@ -1497,7 +1496,7 @@ grAlphaTestFunction(GrCmpFnc_t function) case GR_CMP_ALWAYS: glAlphaFunc(GL_ALWAYS, alpha_ref / 255.0f); glDisable(GL_ALPHA_TEST); - grDisplayGLError("grAlphaTestFunction :: GR_CMP_ALWAYS"); + grDisplayGLError("gfxAlphaTestFunction :: GR_CMP_ALWAYS"); return; break; default: @@ -1505,7 +1504,7 @@ grAlphaTestFunction(GrCmpFnc_t function) } glEnable(GL_ALPHA_TEST); - grDisplayGLError("grAlphaTestFunction"); + grDisplayGLError("gfxAlphaTestFunction"); } // fog diff --git a/Source/Project64-video/Renderer/Renderer.h b/Source/Project64-video/Renderer/Renderer.h index d6ff5469f..311a33189 100644 --- a/Source/Project64-video/Renderer/Renderer.h +++ b/Source/Project64-video/Renderer/Renderer.h @@ -29,6 +29,7 @@ void gfxAlphaCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrC void gfxTexCombine(GrChipID_t tmu, GrCombineFunction_t rgb_function, GrCombineFactor_t rgb_factor, GrCombineFunction_t alpha_function, GrCombineFactor_t alpha_factor, FxBool rgb_invert, FxBool alpha_invert); void gfxAlphaBlendFunction(GrAlphaBlendFnc_t rgb_sf, GrAlphaBlendFnc_t rgb_df, GrAlphaBlendFnc_t alpha_sf, GrAlphaBlendFnc_t alpha_df); void gfxAlphaTestReferenceValue(gfxAlpha_t value); +void gfxAlphaTestFunction(GrCmpFnc_t function); extern uint32_t nbTextureUnits; extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y; diff --git a/Source/Project64-video/Util.cpp b/Source/Project64-video/Util.cpp index cc5d700b1..077265f2c 100644 --- a/Source/Project64-video/Util.cpp +++ b/Source/Project64-video/Util.cpp @@ -1799,7 +1799,7 @@ void update() if (rdp.acmp == 1 && !(rdp.othermode_l & 0x00002000) && (!(rdp.othermode_l & 0x00004000) || (rdp.blend_color & 0xFF))) { uint8_t reference = (uint8_t)(rdp.blend_color & 0xFF); - grAlphaTestFunction(reference ? GR_CMP_GEQUAL : GR_CMP_GREATER); + gfxAlphaTestFunction(reference ? GR_CMP_GEQUAL : GR_CMP_GREATER); gfxAlphaTestReferenceValue(reference); WriteTrace(TraceRDP, TraceDebug, " |- alpha compare: blend: %02lx", reference); } @@ -1809,13 +1809,13 @@ void update() { if ((rdp.othermode_l & 0x5000) != 0x5000) { - grAlphaTestFunction(GR_CMP_GEQUAL); + gfxAlphaTestFunction(GR_CMP_GEQUAL); gfxAlphaTestReferenceValue(0x20);//0xA0); WriteTrace(TraceRDP, TraceDebug, " |- alpha compare: 0x20"); } else { - grAlphaTestFunction(GR_CMP_GREATER); + gfxAlphaTestFunction(GR_CMP_GREATER); if (rdp.acmp == 3) { gfxAlphaTestReferenceValue((uint8_t)(rdp.blend_color & 0xFF)); @@ -1830,7 +1830,7 @@ void update() } else { - grAlphaTestFunction(GR_CMP_ALWAYS); + gfxAlphaTestFunction(GR_CMP_ALWAYS); WriteTrace(TraceRDP, TraceDebug, " |- alpha compare: none"); } } @@ -1966,7 +1966,7 @@ void set_message_combiner() GR_BLEND_ZERO, GR_BLEND_ZERO, GR_BLEND_ZERO); - grAlphaTestFunction(GR_CMP_ALWAYS); + gfxAlphaTestFunction(GR_CMP_ALWAYS); grStippleMode(GR_STIPPLE_DISABLE); grTexFilterMode(0, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR); gfxTexCombine(GR_TMU1, diff --git a/Source/Project64-video/rdp.cpp b/Source/Project64-video/rdp.cpp index 4d2d14ed1..434ba4481 100644 --- a/Source/Project64-video/rdp.cpp +++ b/Source/Project64-video/rdp.cpp @@ -2516,7 +2516,7 @@ void rdp_fillrect() gfxAlphaBlendFunction(GR_BLEND_ONE, GR_BLEND_ZERO, GR_BLEND_ONE, GR_BLEND_ZERO); - grAlphaTestFunction(GR_CMP_ALWAYS); + gfxAlphaTestFunction(GR_CMP_ALWAYS); grStippleMode(GR_STIPPLE_DISABLE); grCullMode(GR_CULL_DISABLE); @@ -3191,7 +3191,7 @@ void SetWireframeCol() break; } - grAlphaTestFunction(GR_CMP_ALWAYS); + gfxAlphaTestFunction(GR_CMP_ALWAYS); grCullMode(GR_CULL_DISABLE); rdp.update |= UPDATE_COMBINE | UPDATE_ALPHA_COMPARE; diff --git a/Source/Project64-video/ucode06.cpp b/Source/Project64-video/ucode06.cpp index ee03ff999..1d79e44b7 100644 --- a/Source/Project64-video/ucode06.cpp +++ b/Source/Project64-video/ucode06.cpp @@ -88,11 +88,11 @@ float set_sprite_combine_mode() GR_BLEND_ZERO); if (rdp.othermode_l & 1) { - grAlphaTestFunction(GR_CMP_GEQUAL); + gfxAlphaTestFunction(GR_CMP_GEQUAL); gfxAlphaTestReferenceValue(0x80); } else - grAlphaTestFunction(GR_CMP_ALWAYS); + gfxAlphaTestFunction(GR_CMP_ALWAYS); rdp.update |= UPDATE_ALPHA_COMPARE | UPDATE_COMBINE; } return Z;