[video[ rename grFogMode to gfxFogMode

This commit is contained in:
zilmar 2017-05-24 08:42:55 +10:00
parent 37791d019a
commit 86c6377b5d
7 changed files with 22 additions and 23 deletions

View File

@ -1566,8 +1566,7 @@ void gfxAlphaTestFunction(GrCmpFnc_t function)
// fog
FX_ENTRY void FX_CALL
grFogMode(GrFogMode_t mode)
void gfxFogMode(GrFogMode_t mode)
{
WriteTrace(TraceGlitch, TraceDebug, "mode: %d", mode);
switch (mode)
@ -1587,7 +1586,7 @@ grFogMode(GrFogMode_t mode)
g_fog_enabled = 2;
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grFogMode : unknown mode : %x", mode);
WriteTrace(TraceGlitch, TraceWarning, "gfxFogMode : unknown mode : %x", mode);
}
need_to_compile = 1;
}

View File

@ -1509,8 +1509,7 @@ void gfxAlphaTestFunction(GrCmpFnc_t function)
// fog
FX_ENTRY void FX_CALL
grFogMode(GrFogMode_t mode)
void gfxFogMode(GrFogMode_t mode)
{
WriteTrace(TraceGlitch, TraceDebug, "mode: %d", mode);
switch (mode)
@ -1534,7 +1533,7 @@ grFogMode(GrFogMode_t mode)
}
need_to_compile = 1;
grDisplayGLError("grFogMode");
grDisplayGLError("gfxFogMode");
}
FX_ENTRY float FX_CALL

View File

@ -30,6 +30,7 @@ void gfxTexCombine(GrChipID_t tmu, GrCombineFunction_t rgb_function, GrCombineFa
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);
void gfxFogMode(GrFogMode_t mode);
extern uint32_t nbTextureUnits;
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;

View File

@ -343,7 +343,7 @@ static GrTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
grDepthBufferFunction(GR_CMP_ALWAYS);
grDepthMask(FXFALSE);
grCullMode(GR_CULL_DISABLE);
grFogMode(GR_FOG_DISABLE);
gfxFogMode(GR_FOG_DISABLE);
GrTextureFormat_t buf_format = (rdp.tbuff_tex) ? rdp.tbuff_tex->info.format : GFX_TEXFMT_RGB_565;
GrCombineFunction_t color_source = GR_COMBINE_FUNCTION_LOCAL;
if (!force_rgb && rdp.black_ci_index > 0 && rdp.black_ci_index <= rdp.copy_ci_index)
@ -433,7 +433,7 @@ int CloseTextureBuffer(int draw)
rdp.update |= UPDATE_ZBUF_ENABLED | UPDATE_COMBINE | UPDATE_TEXTURE | UPDATE_ALPHA_COMPARE;
if (g_settings->fog() && (rdp.flags & FOG_ENABLED))
{
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
}
WriteTrace(TraceRDP, TraceDebug, "CloseTextureBuffer draw, OK");
rdp.tbuff_tex = 0;
@ -497,7 +497,7 @@ int CopyTextureBuffer(COLOR_IMAGE & fb_from, COLOR_IMAGE & fb_to)
rdp.update |= UPDATE_ZBUF_ENABLED | UPDATE_COMBINE | UPDATE_TEXTURE | UPDATE_ALPHA_COMPARE;
rdp.update |= UPDATE_VIEWPORT | UPDATE_SCISSOR;
if (g_settings->fog() && (rdp.flags & FOG_ENABLED))
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
WriteTrace(TraceRDP, TraceDebug, "CopyTextureBuffer draw, OK");
rdp.tbuff_tex = 0;
rdp.cur_image = 0;
@ -549,7 +549,7 @@ int CopyDepthBuffer()
rdp.update |= UPDATE_ZBUF_ENABLED | UPDATE_COMBINE | UPDATE_TEXTURE | UPDATE_ALPHA_COMPARE;
if (g_settings->fog() && (rdp.flags & FOG_ENABLED))
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
WriteTrace(TraceRDP, TraceDebug, "CopyDepthBuffer draw, OK");
rdp.tbuff_tex = 0;
return TRUE;
@ -624,7 +624,7 @@ int SwapTextureBuffer()
rdp.update |= UPDATE_ZBUF_ENABLED | UPDATE_COMBINE | UPDATE_TEXTURE | UPDATE_ALPHA_COMPARE;
if (g_settings->fog() && (rdp.flags & FOG_ENABLED))
{
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
}
WriteTrace(TraceRDP, TraceDebug, "SwapTextureBuffer draw, OK");
return TRUE;

View File

@ -1887,7 +1887,7 @@ void update()
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);
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
rdp.fog_mode = CRDP::fog_enabled;
WriteTrace(TraceRDP, TraceDebug, "fog enabled ");
}
@ -1895,20 +1895,20 @@ void update()
{
WriteTrace(TraceRDP, TraceDebug, "fog disabled in blender");
rdp.fog_mode = CRDP::fog_disabled;
grFogMode(GR_FOG_DISABLE);
gfxFogMode(GR_FOG_DISABLE);
}
}
else if (blender == 0xc410 || blender == 0xc411 || blender == 0xf500)
{
grFogColorValue(rdp.fog_color);
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
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);
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
rdp.fog_mode = CRDP::fog_blend_inverse;
WriteTrace(TraceRDP, TraceDebug, "fog blend ");
}
@ -1916,7 +1916,7 @@ void update()
{
WriteTrace(TraceRDP, TraceDebug, "fog disabled");
rdp.fog_mode = CRDP::fog_disabled;
grFogMode(GR_FOG_DISABLE);
gfxFogMode(GR_FOG_DISABLE);
}
}
@ -1985,5 +1985,5 @@ void set_message_combiner()
voodoo.tex_min_addr[GR_TMU0] + offset_font,
GR_MIPMAPLEVELMASK_BOTH,
&fontTex);
grFogMode(GR_FOG_DISABLE);
gfxFogMode(GR_FOG_DISABLE);
}

View File

@ -1570,7 +1570,7 @@ void rdp_texrect()
{
vptr[i].f = fog;
}
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
}
ConvertCoordsConvert(vptr, n_vertices);
@ -2471,7 +2471,7 @@ void rdp_fillrect()
WriteTrace(TraceRDP, TraceDebug, " - %d, %d, %d, %d", s_ul_x, s_ul_y, s_lr_x, s_lr_y);
grFogMode(GR_FOG_DISABLE);
gfxFogMode(GR_FOG_DISABLE);
const float Z = (rdp.cycle_mode == 3) ? 0.0f : set_sprite_combine_mode();
@ -2520,7 +2520,7 @@ void rdp_fillrect()
grStippleMode(GR_STIPPLE_DISABLE);
grCullMode(GR_CULL_DISABLE);
grFogMode(GR_FOG_DISABLE);
gfxFogMode(GR_FOG_DISABLE);
grDepthBufferFunction(GR_CMP_ALWAYS);
grDepthMask(FXFALSE);

View File

@ -67,7 +67,7 @@ float set_sprite_combine_mode()
}
grCullMode(GR_CULL_DISABLE);
grFogMode(GR_FOG_DISABLE);
gfxFogMode(GR_FOG_DISABLE);
rdp.update |= UPDATE_CULL_MODE | UPDATE_FOG_ENABLED;
if (rdp.cycle_mode == 2)
@ -917,7 +917,7 @@ static void uc6_draw_polygons(VERTEX v[4])
if (g_settings->fog() && (rdp.flags & FOG_ENABLED))
{
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
}
}
@ -1626,7 +1626,7 @@ void uc6_sprite2d()
if (g_settings->fog() && (rdp.flags & FOG_ENABLED))
{
grFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
gfxFogMode(GR_FOG_WITH_TABLE_ON_FOGCOORD_EXT);
}
}
a = rdp.pc[rdp.pc_i] & BMASK;