- floatified texture scale values.

This commit is contained in:
Christoph Oelckers 2016-03-26 13:37:44 +01:00
commit 0c39bdd04c
11 changed files with 74 additions and 71 deletions

View file

@ -957,7 +957,7 @@ static void R_DrawSky (visplane_t *pl)
rw_pic = frontskytex;
rw_offset = 0;
frontyScale = rw_pic->yScale;
frontyScale = FLOAT2FIXED(rw_pic->Scale.Y);
dc_texturemid = MulScale16 (skymid, frontyScale);
if (1 << frontskytex->HeightBits == frontskytex->GetHeight())
@ -1003,6 +1003,7 @@ static void R_DrawSkyStriped (visplane_t *pl)
yl = 0;
yh = (short)MulScale32 ((frontskytex->GetHeight() << FRACBITS) - topfrac, frontyScale);
dc_texturemid = topfrac - iscale * (1-centery);
fixed_t yScale = FLOAT2FIXED(rw_pic->Scale.Y);
while (yl < viewheight)
{
@ -1015,7 +1016,7 @@ static void R_DrawSkyStriped (visplane_t *pl)
{
lastskycol[x] = 0xffffffff;
}
wallscan (pl->left, pl->right, top, bot, swall, lwall, rw_pic->yScale,
wallscan (pl->left, pl->right, top, bot, swall, lwall, yScale,
backskytex == NULL ? R_GetOneSkyColumn : R_GetTwoSkyColumns);
yl = yh;
yh += drawheight;
@ -1136,8 +1137,8 @@ void R_DrawSinglePlane (visplane_t *pl, fixed_t alpha, bool additive, bool maske
masked = false;
}
R_SetupSpanBits(tex);
pl->xscale = MulScale16 (pl->xscale, tex->xScale);
pl->yscale = MulScale16 (pl->yscale, tex->yScale);
pl->xscale = fixed_t(pl->xscale * tex->Scale.X);
pl->yscale = fixed_t(pl->yscale * tex->Scale.Y);
ds_source = tex->GetPixels ();
basecolormap = pl->colormap;
@ -1476,7 +1477,8 @@ void R_DrawSkyPlane (visplane_t *pl)
// allow old sky textures to be used.
skyflip = l->args[2] ? 0u : ~0u;
frontcyl = MAX(frontskytex->GetWidth(), frontskytex->xScale >> (16 - 10));
int frontxscale = int(frontskytex->Scale.X * 1024);
frontcyl = MAX(frontskytex->GetWidth(), frontxscale);
if (skystretch)
{
skymid = Scale(skymid, frontskytex->GetScaledHeight(), SKYSTRETCH_HEIGHT);