From 28e6369b78a59b73d234e921c50e15ba98230dc1 Mon Sep 17 00:00:00 2001 From: zilmar Date: Wed, 24 May 2017 17:33:55 +1000 Subject: [PATCH] [Video] rename grFogColorValue to gfxFogColorValue --- Source/Project64-video/Renderer/OGLEScombiner.cpp | 13 ++----------- Source/Project64-video/Renderer/OGLcombiner.cpp | 3 +-- Source/Project64-video/Renderer/Renderer.h | 1 + Source/Project64-video/Util.cpp | 6 +++--- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/Source/Project64-video/Renderer/OGLEScombiner.cpp b/Source/Project64-video/Renderer/OGLEScombiner.cpp index eaf61cef3..cd7a51cb1 100644 --- a/Source/Project64-video/Renderer/OGLEScombiner.cpp +++ b/Source/Project64-video/Renderer/OGLEScombiner.cpp @@ -1594,18 +1594,11 @@ void gfxFogMode(GrFogMode_t mode) void gfxFogGenerateLinear(float nearZ, float 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; fogEnd = farZ / 255.0f; } -FX_ENTRY void FX_CALL -grFogColorValue(GrColor_t fogcolor) +void gfxFogColorValue(GrColor_t fogcolor) { WriteTrace(TraceGlitch, TraceDebug, "fogcolor: %x", fogcolor); @@ -1624,10 +1617,8 @@ grFogColorValue(GrColor_t fogcolor) fogColor[3] = (fogcolor & 0xFF) / 255.0f; break; 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 diff --git a/Source/Project64-video/Renderer/OGLcombiner.cpp b/Source/Project64-video/Renderer/OGLcombiner.cpp index 2f8edaecc..e95bc5513 100644 --- a/Source/Project64-video/Renderer/OGLcombiner.cpp +++ b/Source/Project64-video/Renderer/OGLcombiner.cpp @@ -1547,8 +1547,7 @@ void gfxFogGenerateLinear(float nearZ, float farZ) grDisplayGLError("gfxFogGenerateLinear"); } -FX_ENTRY void FX_CALL -grFogColorValue(GrColor_t fogcolor) +void gfxFogColorValue(GrColor_t fogcolor) { float color[4]; WriteTrace(TraceGlitch, TraceDebug, "fogcolor: %x", fogcolor); diff --git a/Source/Project64-video/Renderer/Renderer.h b/Source/Project64-video/Renderer/Renderer.h index fd73d158c..fcadd79c3 100644 --- a/Source/Project64-video/Renderer/Renderer.h +++ b/Source/Project64-video/Renderer/Renderer.h @@ -32,6 +32,7 @@ void gfxAlphaTestReferenceValue(gfxAlpha_t value); void gfxAlphaTestFunction(GrCmpFnc_t function); void gfxFogMode(GrFogMode_t mode); void gfxFogGenerateLinear(float nearZ, float farZ); +void gfxFogColorValue(GrColor_t fogcolor); 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 c00cae716..fffb73983 100644 --- a/Source/Project64-video/Util.cpp +++ b/Source/Project64-video/Util.cpp @@ -1886,7 +1886,7 @@ void update() 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)) { - grFogColorValue(rdp.fog_color); + gfxFogColorValue(rdp.fog_color); gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT); rdp.fog_mode = CRDP::fog_enabled; WriteTrace(TraceRDP, TraceDebug, "fog enabled "); @@ -1900,14 +1900,14 @@ void update() } else if (blender == 0xc410 || blender == 0xc411 || blender == 0xf500) { - grFogColorValue(rdp.fog_color); + gfxFogColorValue(rdp.fog_color); gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT); rdp.fog_mode = CRDP::fog_blend; WriteTrace(TraceRDP, TraceDebug, "fog blend "); } else if (blender == 0x04d1) { - grFogColorValue(rdp.fog_color); + gfxFogColorValue(rdp.fog_color); gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT); rdp.fog_mode = CRDP::fog_blend_inverse; WriteTrace(TraceRDP, TraceDebug, "fog blend ");