mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Fix lighting parity between resolutions for sprites and FOFs
This commit is contained in:
parent
7a369a5650
commit
69a58d8369
2 changed files with 5 additions and 5 deletions
|
@ -198,7 +198,7 @@ static void R_DrawWallSplats(void)
|
|||
// draw the columns
|
||||
for (dc_x = x1; dc_x <= x2; dc_x++, spryscale += rw_scalestep)
|
||||
{
|
||||
pindex = spryscale>>LIGHTSCALESHIFT;
|
||||
pindex = FixedMul(spryscale, FixedDiv(640, vid.width))>>LIGHTSCALESHIFT;
|
||||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE - 1;
|
||||
dc_colormap = walllights[pindex];
|
||||
|
@ -942,7 +942,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
else
|
||||
xwalllights = scalelight[lightnum];
|
||||
|
||||
pindex = spryscale>>LIGHTSCALESHIFT;
|
||||
pindex = FixedMul(spryscale, FixedDiv(640, vid.width))>>LIGHTSCALESHIFT;
|
||||
|
||||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE-1;
|
||||
|
@ -1030,7 +1030,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
}
|
||||
|
||||
// calculate lighting
|
||||
pindex = spryscale>>LIGHTSCALESHIFT;
|
||||
pindex = FixedMul(spryscale, FixedDiv(640, vid.width))>>LIGHTSCALESHIFT;
|
||||
|
||||
if (pindex >= MAXLIGHTSCALE)
|
||||
pindex = MAXLIGHTSCALE - 1;
|
||||
|
|
|
@ -1013,7 +1013,7 @@ static void R_SplitSprite(vissprite_t *sprite, mobj_t *thing)
|
|||
if (!((thing->frame & (FF_FULLBRIGHT|FF_TRANSMASK) || thing->flags2 & MF2_SHADOW)
|
||||
&& (!newsprite->extra_colormap || !newsprite->extra_colormap->fog)))
|
||||
{
|
||||
lindex = sprite->xscale>>(LIGHTSCALESHIFT);
|
||||
lindex = FixedMul(sprite->xscale, FixedDiv(640, vid.width))>>(LIGHTSCALESHIFT);
|
||||
|
||||
if (lindex >= MAXLIGHTSCALE)
|
||||
lindex = MAXLIGHTSCALE-1;
|
||||
|
@ -1329,7 +1329,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
|||
else
|
||||
{
|
||||
// diminished light
|
||||
lindex = xscale>>(LIGHTSCALESHIFT);
|
||||
lindex = FixedMul(xscale, FixedDiv(640, vid.width))>>(LIGHTSCALESHIFT);
|
||||
|
||||
if (lindex >= MAXLIGHTSCALE)
|
||||
lindex = MAXLIGHTSCALE-1;
|
||||
|
|
Loading…
Reference in a new issue