mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -04:00
Apply brightmaps to translucent and translated columns
This commit is contained in:
commit
ff86d91bc2
21
src/r_draw.c
21
src/r_draw.c
@ -229,8 +229,9 @@ void R_DrawTLColumn (void)
|
|||||||
|
|
||||||
{
|
{
|
||||||
register const byte *source = dc_source;
|
register const byte *source = dc_source;
|
||||||
register const lighttable_t *colormap = dc_colormap[0];
|
register lighttable_t *const *colormap = dc_colormap;
|
||||||
register int heightmask = dc_texheight-1;
|
register int heightmask = dc_texheight-1;
|
||||||
|
register const byte *brightmap = dc_brightmap;
|
||||||
if (dc_texheight & heightmask) // not a power of 2 -- killough
|
if (dc_texheight & heightmask) // not a power of 2 -- killough
|
||||||
{
|
{
|
||||||
heightmask++;
|
heightmask++;
|
||||||
@ -249,7 +250,9 @@ void R_DrawTLColumn (void)
|
|||||||
|
|
||||||
// heightmask is the Tutti-Frutti fix -- killough
|
// heightmask is the Tutti-Frutti fix -- killough
|
||||||
|
|
||||||
*dest = tranmap[(*dest<<8)+colormap[source[frac>>FRACBITS]]]; // phares
|
// [crispy] brightmaps
|
||||||
|
byte src = source[frac>>FRACBITS];
|
||||||
|
*dest = tranmap[(*dest<<8)+colormap[brightmap[src]][src]]; // phares
|
||||||
dest += linesize; // killough 11/98
|
dest += linesize; // killough 11/98
|
||||||
if ((frac += fracstep) >= heightmask)
|
if ((frac += fracstep) >= heightmask)
|
||||||
frac -= heightmask;
|
frac -= heightmask;
|
||||||
@ -260,15 +263,19 @@ void R_DrawTLColumn (void)
|
|||||||
{
|
{
|
||||||
while ((count-=2)>=0) // texture height is a power of 2 -- killough
|
while ((count-=2)>=0) // texture height is a power of 2 -- killough
|
||||||
{
|
{
|
||||||
*dest = tranmap[(*dest<<8)+colormap[source[(frac>>FRACBITS) & heightmask]]]; // phares
|
byte src = source[(frac>>FRACBITS) & heightmask];
|
||||||
|
*dest = tranmap[(*dest<<8)+colormap[brightmap[src]][src]]; // phares
|
||||||
dest += linesize; // killough 11/98
|
dest += linesize; // killough 11/98
|
||||||
frac += fracstep;
|
frac += fracstep;
|
||||||
*dest = tranmap[(*dest<<8)+colormap[source[(frac>>FRACBITS) & heightmask]]]; // phares
|
*dest = tranmap[(*dest<<8)+colormap[brightmap[src]][src]]; // phares
|
||||||
dest += linesize; // killough 11/98
|
dest += linesize; // killough 11/98
|
||||||
frac += fracstep;
|
frac += fracstep;
|
||||||
}
|
}
|
||||||
if (count & 1)
|
if (count & 1)
|
||||||
*dest = tranmap[(*dest<<8)+colormap[source[(frac>>FRACBITS) & heightmask]]]; // phares
|
{
|
||||||
|
byte src = source[(frac>>FRACBITS) & heightmask];
|
||||||
|
*dest = tranmap[(*dest<<8)+colormap[brightmap[src]][src]]; // phares
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -654,7 +661,9 @@ void R_DrawTranslatedColumn (void)
|
|||||||
// Thus the "green" ramp of the player 0 sprite
|
// Thus the "green" ramp of the player 0 sprite
|
||||||
// is mapped to gray, red, black/indigo.
|
// is mapped to gray, red, black/indigo.
|
||||||
|
|
||||||
*dest = dc_colormap[0][dc_translation[dc_source[frac>>FRACBITS]]];
|
// [crispy] brightmaps
|
||||||
|
byte src = dc_source[frac>>FRACBITS];
|
||||||
|
*dest = dc_colormap[dc_brightmap[src]][dc_translation[src]];
|
||||||
dest += linesize; // killough 11/98
|
dest += linesize; // killough 11/98
|
||||||
|
|
||||||
frac += fracstep;
|
frac += fracstep;
|
||||||
|
@ -162,7 +162,10 @@ void R_RenderMaskedSegRange(drawseg_t *ds, int x1, int x2)
|
|||||||
if (index >= MAXLIGHTSCALE )
|
if (index >= MAXLIGHTSCALE )
|
||||||
index = MAXLIGHTSCALE-1;
|
index = MAXLIGHTSCALE-1;
|
||||||
|
|
||||||
dc_colormap[0] = dc_colormap[1] = walllights[index];
|
// [crispy] brightmaps for two sided mid-textures
|
||||||
|
dc_brightmap = texturebrightmap[texnum];
|
||||||
|
dc_colormap[0] = walllights[index];
|
||||||
|
dc_colormap[1] = STRICTMODE(brightmaps) ? fullcolormap : dc_colormap[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
// killough 3/2/98:
|
// killough 3/2/98:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user