diff --git a/r_main.c b/r_main.c index 3637b419..87fc4ed9 100644 --- a/r_main.c +++ b/r_main.c @@ -2064,8 +2064,9 @@ qboolean R_Init() sw_notransbrushes = gEngfuncs.Cvar_Get( "sw_notransbrushes", "0", FCVAR_ARCHIVE, "do not apply transparency to water/glasses (faster)"); sw_noalphabrushes = gEngfuncs.Cvar_Get( "sw_noalphabrushes", "0", FCVAR_ARCHIVE, "do not draw brush holes (faster)"); r_traceglow = gEngfuncs.Cvar_Get( "r_traceglow", "1", FCVAR_ARCHIVE, "cull flares behind models" ); - +#ifndef DISABLE_TEXFILTER sw_texfilt = gEngfuncs.Cvar_Get ("sw_texfilt", "0", 0, "texture dither"); +#endif //r_lefthand = ri.Cvar_Get( "hand", "0", FCVAR_USERINFO | FCVAR_ARCHIVE ); // r_speeds = ri.Cvar_Get ("r_speeds", "0", 0); r_decals = gEngfuncs.pfnGetCvarPointer( "r_decals", 0 ); diff --git a/r_scan.c b/r_scan.c index 77d151ed..fa5855c3 100644 --- a/r_scan.c +++ b/r_scan.c @@ -564,7 +564,6 @@ void NonTurbulent8 (espan_t *pspan) #if !id386 - int kernel[2][2][2] = { { @@ -577,7 +576,11 @@ int kernel[2][2][2] = {0,16384} } }; - +#ifndef DISABLE_TEXFILTER +#define SW_TEXFILT (sw_texfilt->value == 1.0f) +#else +#define SW_TEXFILT 0 +#endif /* ============= D_DrawSpans16 @@ -700,7 +703,7 @@ void D_DrawSpans16 (espan_t *pspan) // Drawing phrase - if (sw_texfilt->value == 0.0f) + if (!SW_TEXFILT) { do { @@ -709,7 +712,7 @@ void D_DrawSpans16 (espan_t *pspan) t += tstep; } while (--spancount > 0); } - else if (sw_texfilt->value == 1.0f) + else { do { @@ -871,7 +874,7 @@ void D_AlphaSpans16 (espan_t *pspan) // Drawing phrase - if (sw_texfilt->value == 0.0f) + if (!SW_TEXFILT) { do { @@ -893,7 +896,7 @@ void D_AlphaSpans16 (espan_t *pspan) t += tstep; } while (--spancount > 0); } - else if (sw_texfilt->value == 1.0f) + else { do { @@ -1067,7 +1070,7 @@ void D_BlendSpans16 (espan_t *pspan, int alpha) // Drawing phrase - if (sw_texfilt->value == 0.0f) + if (!SW_TEXFILT) { do { @@ -1089,7 +1092,7 @@ void D_BlendSpans16 (espan_t *pspan, int alpha) t += tstep; } while (--spancount > 0); } - else if (sw_texfilt->value == 1.0f) + else { do { @@ -1263,7 +1266,7 @@ void D_AddSpans16 (espan_t *pspan) // Drawing phrase - if (sw_texfilt->value == 0.0f) + if (!SW_TEXFILT) { do { @@ -1284,7 +1287,7 @@ void D_AddSpans16 (espan_t *pspan) t += tstep; } while (--spancount > 0); } - else if (sw_texfilt->value == 1.0f) + else { do {