[Video] Rename grAlphaTestFunction to gfxAlphaTestFunction
This commit is contained in:
parent
3279b07699
commit
37791d019a
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue