[Video] Rename grAlphaCombine to gfxAlphaCombine
This commit is contained in:
parent
078c3e809a
commit
0df7507ff7
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue