mostly cosmetic fixes to fuzz column drawing functions (#2084)

This commit is contained in:
Fabian Greffrath 2024-12-09 10:15:07 +01:00 committed by GitHub
parent 2dbf92db08
commit 7cd76828c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -526,7 +526,7 @@ static void DrawFuzzColumnBlocky(void)
}
}
#define FUZZDARK 6 * 256
#define FUZZDARK (6 * 256)
#define FUZZPAL 256
static const int fuzzdark[FUZZTABLE] =
@ -625,21 +625,6 @@ static void DrawFuzzColumnRefraction(void)
static void DrawFuzzColumnShadow(void)
{
boolean cutoff = false;
// Adjust borders. Low...
if (!dc_yl)
{
dc_yl = 1;
}
// .. and high.
if (dc_yh == viewheight - 1)
{
dc_yh = viewheight - 2;
cutoff = true;
}
int count = dc_yh - dc_yl;
// Zero length.
@ -664,17 +649,7 @@ static void DrawFuzzColumnShadow(void)
*dest = fullcolormap[8 * 256 + *dest];
dest += linesize; // killough 11/98
++fuzzpos;
// Clamp table lookup index.
fuzzpos &= (fuzzpos - FUZZTABLE) >> (8 * sizeof(fuzzpos) - 1); // killough 1/99
} while (--count);
if (cutoff)
{
*dest = fullcolormap[8 * 256 + *dest];
}
}
fuzzmode_t fuzzmode;
@ -683,7 +658,7 @@ void (*R_DrawFuzzColumn)(void) = DrawFuzzColumnOriginal;
void R_SetFuzzColumnMode(void)
{
fuzzmode_t mode =
strictmode || (netgame && !solonet) ? FUZZ_BLOCKY : fuzzmode;
(strictmode || (netgame && !solonet)) ? FUZZ_BLOCKY : fuzzmode;
switch (mode)
{