diff --git a/Source/Project64-video/Combine.h b/Source/Project64-video/Combine.h index 5e27ac362..1c7af1cfd 100644 --- a/Source/Project64-video/Combine.h +++ b/Source/Project64-video/Combine.h @@ -46,7 +46,7 @@ typedef struct { uint32_t ccolor; // constant color to set at the end, color and alpha uint32_t c_fnc, c_fac, c_loc, c_oth; // gfxColorCombine flags - uint32_t a_fnc, a_fac, a_loc, a_oth; // grAlphaCombine flags + uint32_t a_fnc, a_fac, a_loc, a_oth; // gfxAlphaCombine flags uint32_t tex, tmu0_func, tmu0_fac, tmu0_invert, tmu1_func, tmu1_fac, tmu1_invert; uint32_t tmu0_a_func, tmu0_a_fac, tmu0_a_invert, tmu1_a_func, tmu1_a_fac, tmu1_a_invert; int dc0_lodbias, dc1_lodbias; diff --git a/Source/Project64-video/FBtoScreen.cpp b/Source/Project64-video/FBtoScreen.cpp index dc5b94793..61b156ab2 100644 --- a/Source/Project64-video/FBtoScreen.cpp +++ b/Source/Project64-video/FBtoScreen.cpp @@ -70,7 +70,7 @@ static int SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaque) GR_COMBINE_OTHER_TEXTURE, // GR_COMBINE_OTHER_CONSTANT, FXFALSE); - grAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER, + gfxAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_ONE, GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_TEXTURE, @@ -490,7 +490,7 @@ static void DrawHiresDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info) GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_NONE, FXFALSE); - grAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER, + gfxAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_ONE, GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_TEXTURE, diff --git a/Source/Project64-video/Renderer/OGLEScombiner.cpp b/Source/Project64-video/Renderer/OGLEScombiner.cpp index 7dc8e2e1e..3d09ad77b 100644 --- a/Source/Project64-video/Renderer/OGLEScombiner.cpp +++ b/Source/Project64-video/Renderer/OGLEScombiner.cpp @@ -989,12 +989,7 @@ void writeGLSLAlphaFactor(int factor, int local, int need_local, int other, int } } -FX_ENTRY void FX_CALL -grAlphaCombine( - GrCombineFunction_t function, GrCombineFactor_t factor, - GrCombineLocal_t local, GrCombineOther_t other, - FxBool invert -) +void gfxAlphaCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert) { WriteTrace(TraceGlitch, TraceDebug, "function: %d factor: %d local: %d other: %d invert: %d", function, factor, local, other, invert); static int last_function = 0; @@ -1012,7 +1007,7 @@ grAlphaCombine( last_local = local; last_other = other; - if (invert) WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombine : inverted result"); + if (invert) WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombine : inverted result"); alpha_combiner_key = function | (factor << 4) | (local << 8) | (other << 10); chroma_other_alpha = other; @@ -1078,7 +1073,7 @@ grAlphaCombine( strcat(fragment_shader_alpha_combiner, "gl_FragColor.a = alpha_factor * (-alpha_local) + alpha_local; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombine : unknown function : %x", function); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombine : unknown function : %x", function); } //compile_shader(); diff --git a/Source/Project64-video/Renderer/OGLcombiner.cpp b/Source/Project64-video/Renderer/OGLcombiner.cpp index 60c53681d..8b42637b7 100644 --- a/Source/Project64-video/Renderer/OGLcombiner.cpp +++ b/Source/Project64-video/Renderer/OGLcombiner.cpp @@ -926,12 +926,7 @@ void writeGLSLAlphaFactor(int factor, int local, int need_local, int other, int } } -FX_ENTRY void FX_CALL -grAlphaCombine( - GrCombineFunction_t function, GrCombineFactor_t factor, - GrCombineLocal_t local, GrCombineOther_t other, - FxBool invert -) +void gfxAlphaCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert) { WriteTrace(TraceGlitch, TraceDebug, "function: %d factor: %d local: %d other: %d invert: %d", function, factor, local, other, invert); static int last_function = 0; diff --git a/Source/Project64-video/Renderer/Renderer.h b/Source/Project64-video/Renderer/Renderer.h index f4f99ac19..f7c643550 100644 --- a/Source/Project64-video/Renderer/Renderer.h +++ b/Source/Project64-video/Renderer/Renderer.h @@ -25,6 +25,7 @@ FxU32 gfxTexMaxAddress(GrChipID_t tmu); FxU32 gfxTexTextureMemRequired(FxU32 evenOdd, GrTexInfo *info); void gfxConstantColorValue(GrColor_t value); void gfxColorCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert); +void gfxAlphaCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert); 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/TexBuffer.cpp b/Source/Project64-video/TexBuffer.cpp index dee164119..a3a4e38c4 100644 --- a/Source/Project64-video/TexBuffer.cpp +++ b/Source/Project64-video/TexBuffer.cpp @@ -329,7 +329,7 @@ static GrTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE) GR_COMBINE_OTHER_TEXTURE, // GR_COMBINE_OTHER_CONSTANT, FXFALSE); - grAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER, + gfxAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_ONE, GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_TEXTURE, diff --git a/Source/Project64-video/TexCache.cpp b/Source/Project64-video/TexCache.cpp index 853bc5e41..6b2793fd7 100644 --- a/Source/Project64-video/TexCache.cpp +++ b/Source/Project64-video/TexCache.cpp @@ -683,7 +683,7 @@ void TexCache() else { gfxColorCombine(cmb.c_fnc, cmb.c_fac, cmb.c_loc, cmb.c_oth, FXFALSE); - grAlphaCombine(cmb.a_fnc, cmb.a_fac, cmb.a_loc, cmb.a_oth, FXFALSE); + gfxAlphaCombine(cmb.a_fnc, cmb.a_fac, cmb.a_loc, cmb.a_oth, FXFALSE); } gfxConstantColorValue(cmb.ccolor); grAlphaBlendFunction(cmb.abf1, cmb.abf2, GR_BLEND_ZERO, GR_BLEND_ZERO); diff --git a/Source/Project64-video/Util.cpp b/Source/Project64-video/Util.cpp index 580741f10..799611a71 100644 --- a/Source/Project64-video/Util.cpp +++ b/Source/Project64-video/Util.cpp @@ -1957,7 +1957,7 @@ void set_message_combiner() GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_TEXTURE, FXFALSE); - grAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER, + gfxAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_ONE, GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_TEXTURE, diff --git a/Source/Project64-video/rdp.cpp b/Source/Project64-video/rdp.cpp index fdd607b27..63222b975 100644 --- a/Source/Project64-video/rdp.cpp +++ b/Source/Project64-video/rdp.cpp @@ -2508,7 +2508,7 @@ void rdp_fillrect() GR_COMBINE_OTHER_NONE, FXFALSE); - grAlphaCombine(GR_COMBINE_FUNCTION_LOCAL, + gfxAlphaCombine(GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE, GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_NONE, @@ -2540,7 +2540,7 @@ void rdp_fillrect() } if ((rdp.othermode_l & 0x4000) && ((rdp.othermode_l >> 16) == 0x0550)) //special blender mode for Bomberman64 { - grAlphaCombine(GR_COMBINE_FUNCTION_LOCAL, + gfxAlphaCombine(GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE, GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_NONE, @@ -3138,7 +3138,7 @@ void SetWireframeCol() GR_COMBINE_LOCAL_ITERATED, GR_COMBINE_OTHER_NONE, FXFALSE); - grAlphaCombine(GR_COMBINE_FUNCTION_LOCAL, + gfxAlphaCombine(GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE, GR_COMBINE_LOCAL_ITERATED, GR_COMBINE_OTHER_NONE, @@ -3166,7 +3166,7 @@ void SetWireframeCol() GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_NONE, FXFALSE); - grAlphaCombine(GR_COMBINE_FUNCTION_LOCAL, + gfxAlphaCombine(GR_COMBINE_FUNCTION_LOCAL, GR_COMBINE_FACTOR_NONE, GR_COMBINE_LOCAL_CONSTANT, GR_COMBINE_OTHER_NONE, diff --git a/Source/Project64-video/ucode06.cpp b/Source/Project64-video/ucode06.cpp index f3f4ac233..82f2dc5fa 100644 --- a/Source/Project64-video/ucode06.cpp +++ b/Source/Project64-video/ucode06.cpp @@ -77,7 +77,7 @@ float set_sprite_combine_mode() GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_TEXTURE, FXFALSE); - grAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER, + gfxAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_ONE, GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_TEXTURE, @@ -163,7 +163,7 @@ void DrawHiresDepthImage(const DRAWIMAGE & d) GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_TEXTURE, FXFALSE); - grAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER, + gfxAlphaCombine(GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_ONE, GR_COMBINE_LOCAL_NONE, GR_COMBINE_OTHER_TEXTURE,