[Video] rename grFogColorValue to gfxFogColorValue

This commit is contained in:
zilmar 2017-05-24 17:33:55 +10:00
parent 0646ec5d74
commit 28e6369b78
4 changed files with 7 additions and 16 deletions

View File

@ -1594,18 +1594,11 @@ void gfxFogMode(GrFogMode_t mode)
void gfxFogGenerateLinear(float nearZ, float farZ) void gfxFogGenerateLinear(float nearZ, float farZ)
{ {
WriteTrace(TraceGlitch, TraceDebug, "nearZ: %f farZ: %f", nearZ, farZ); WriteTrace(TraceGlitch, TraceDebug, "nearZ: %f farZ: %f", nearZ, farZ);
/*
glFogi(GL_FOG_MODE, GL_LINEAR);
glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);
glFogf(GL_FOG_START, nearZ / 255.0f);
glFogf(GL_FOG_END, farZ / 255.0f);
*/
fogStart = nearZ / 255.0f; fogStart = nearZ / 255.0f;
fogEnd = farZ / 255.0f; fogEnd = farZ / 255.0f;
} }
FX_ENTRY void FX_CALL void gfxFogColorValue(GrColor_t fogcolor)
grFogColorValue(GrColor_t fogcolor)
{ {
WriteTrace(TraceGlitch, TraceDebug, "fogcolor: %x", fogcolor); WriteTrace(TraceGlitch, TraceDebug, "fogcolor: %x", fogcolor);
@ -1624,10 +1617,8 @@ grFogColorValue(GrColor_t fogcolor)
fogColor[3] = (fogcolor & 0xFF) / 255.0f; fogColor[3] = (fogcolor & 0xFF) / 255.0f;
break; break;
default: default:
WriteTrace(TraceGlitch, TraceWarning, "grFogColorValue: unknown color format : %x", lfb_color_fmt); WriteTrace(TraceGlitch, TraceWarning, "gfxFogColorValue: unknown color format : %x", lfb_color_fmt);
} }
//glFogfv(GL_FOG_COLOR, color);
} }
// chroma // chroma

View File

@ -1547,8 +1547,7 @@ void gfxFogGenerateLinear(float nearZ, float farZ)
grDisplayGLError("gfxFogGenerateLinear"); grDisplayGLError("gfxFogGenerateLinear");
} }
FX_ENTRY void FX_CALL void gfxFogColorValue(GrColor_t fogcolor)
grFogColorValue(GrColor_t fogcolor)
{ {
float color[4]; float color[4];
WriteTrace(TraceGlitch, TraceDebug, "fogcolor: %x", fogcolor); WriteTrace(TraceGlitch, TraceDebug, "fogcolor: %x", fogcolor);

View File

@ -32,6 +32,7 @@ void gfxAlphaTestReferenceValue(gfxAlpha_t value);
void gfxAlphaTestFunction(GrCmpFnc_t function); void gfxAlphaTestFunction(GrCmpFnc_t function);
void gfxFogMode(GrFogMode_t mode); void gfxFogMode(GrFogMode_t mode);
void gfxFogGenerateLinear(float nearZ, float farZ); void gfxFogGenerateLinear(float nearZ, float farZ);
void gfxFogColorValue(GrColor_t fogcolor);
extern uint32_t nbTextureUnits; extern uint32_t nbTextureUnits;
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y; extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;

View File

@ -1886,7 +1886,7 @@ void update()
rdp_blender_setting &bl = *(rdp_blender_setting*)(&(blender)); rdp_blender_setting &bl = *(rdp_blender_setting*)(&(blender));
if ((rdp.fog_multiplier > 0) && (bl.c1_m1a == 3 || bl.c1_m2a == 3 || bl.c2_m1a == 3 || bl.c2_m2a == 3)) if ((rdp.fog_multiplier > 0) && (bl.c1_m1a == 3 || bl.c1_m2a == 3 || bl.c2_m1a == 3 || bl.c2_m2a == 3))
{ {
grFogColorValue(rdp.fog_color); gfxFogColorValue(rdp.fog_color);
gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT); gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
rdp.fog_mode = CRDP::fog_enabled; rdp.fog_mode = CRDP::fog_enabled;
WriteTrace(TraceRDP, TraceDebug, "fog enabled "); WriteTrace(TraceRDP, TraceDebug, "fog enabled ");
@ -1900,14 +1900,14 @@ void update()
} }
else if (blender == 0xc410 || blender == 0xc411 || blender == 0xf500) else if (blender == 0xc410 || blender == 0xc411 || blender == 0xf500)
{ {
grFogColorValue(rdp.fog_color); gfxFogColorValue(rdp.fog_color);
gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT); gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
rdp.fog_mode = CRDP::fog_blend; rdp.fog_mode = CRDP::fog_blend;
WriteTrace(TraceRDP, TraceDebug, "fog blend "); WriteTrace(TraceRDP, TraceDebug, "fog blend ");
} }
else if (blender == 0x04d1) else if (blender == 0x04d1)
{ {
grFogColorValue(rdp.fog_color); gfxFogColorValue(rdp.fog_color);
gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT); gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
rdp.fog_mode = CRDP::fog_blend_inverse; rdp.fog_mode = CRDP::fog_blend_inverse;
WriteTrace(TraceRDP, TraceDebug, "fog blend "); WriteTrace(TraceRDP, TraceDebug, "fog blend ");