mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-21 11:31:41 +00:00
- use wrapping fixed point conversion for SW rendering coordinates.
This commit is contained in:
parent
6847a9a5c1
commit
139d1a7eb6
2 changed files with 3 additions and 3 deletions
|
@ -501,7 +501,7 @@ namespace swrenderer
|
|||
double rowoffset = lineseg->sidedef->GetTextureYOffset(side_t::mid) + rover->master->sidedef[0]->GetTextureYOffset(side_t::mid);
|
||||
double planez = rover->model->GetPlaneTexZ(sector_t::ceiling);
|
||||
|
||||
fixed_t xoffset = FLOAT2FIXED(lineseg->sidedef->GetTextureXOffset(side_t::mid) + rover->master->sidedef[0]->GetTextureXOffset(side_t::mid));
|
||||
fixed_t xoffset = xs_Fix<16>::ToFix(lineseg->sidedef->GetTextureXOffset(side_t::mid) + rover->master->sidedef[0]->GetTextureXOffset(side_t::mid));
|
||||
if (rowoffset < 0)
|
||||
{
|
||||
rowoffset += pic->GetHeight();
|
||||
|
@ -633,7 +633,7 @@ namespace swrenderer
|
|||
|
||||
fixed_t ProjectedWallTexcoords::GetXOffset(seg_t* lineseg, FSoftwareTexture* tex, side_t::ETexpart texpart)
|
||||
{
|
||||
fixed_t TextureOffsetU = FLOAT2FIXED(lineseg->sidedef->GetTextureXOffset(texpart));
|
||||
fixed_t TextureOffsetU = xs_Fix<16>::ToFix(lineseg->sidedef->GetTextureXOffset(texpart));
|
||||
double xscale = GetXScale(lineseg->sidedef, tex, texpart);
|
||||
|
||||
fixed_t xoffset;
|
||||
|
|
|
@ -186,7 +186,7 @@ namespace swrenderer
|
|||
// to allow sky rotation as well as careful positioning.
|
||||
// However, the offset is scaled very small, so that it
|
||||
// allows a long-period of sky rotation.
|
||||
skyangle += FLOAT2FIXED(s->GetTextureXOffset(pos));
|
||||
skyangle += xs_Fix<16>::ToFix(s->GetTextureXOffset(pos));
|
||||
|
||||
// Vertical offset allows careful sky positioning.
|
||||
skymid = s->GetTextureYOffset(pos) - 28.0;
|
||||
|
|
Loading…
Reference in a new issue