Merge branch 'texture-scaling-3d-floors' of https://github.com/eevee/zdoom

This commit is contained in:
Christoph Oelckers 2015-06-07 09:09:55 +02:00
commit 2b59a35e84

View file

@ -557,8 +557,25 @@ void R_RenderFakeWall(drawseg_t *ds, int x1, int x2, F3DFloor *rover)
MaskedSWall = (fixed_t *)(openings + ds->swall) - ds->x1;
// find positioning
xscale = FixedMul(rw_pic->xScale, sidedef->GetTextureXScale(side_t::mid));
yscale = FixedMul(rw_pic->yScale, sidedef->GetTextureYScale(side_t::mid));
side_t *scaledside;
side_t::ETexpart scaledpart;
if (rover->flags & FF_UPPERTEXTURE)
{
scaledside = curline->sidedef;
scaledpart = side_t::top;
}
else if (rover->flags & FF_LOWERTEXTURE)
{
scaledside = curline->sidedef;
scaledpart = side_t::bottom;
}
else
{
scaledside = rover->master->sidedef[0];
scaledpart = side_t::mid;
}
xscale = FixedMul(rw_pic->xScale, scaledside->GetTextureXScale(scaledpart));
yscale = FixedMul(rw_pic->yScale, scaledside->GetTextureYScale(scaledpart));
// encapsulate the lifetime of rowoffset
fixed_t rowoffset = curline->sidedef->GetTextureYOffset(side_t::mid) + rover->master->sidedef[0]->GetTextureYOffset(side_t::mid);
dc_texturemid = rover->model->GetPlaneTexZ(sector_t::ceiling);