diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-08-16 13:46:20 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-08-16 13:46:20 +0200 |
commit | 7669b97ac64bd77dc0932210f81e4a0def9bfb1b (patch) | |
tree | 51c7580701ea00abc769e68d14a83a25b8ebd0cf /src/render/Renderer.cpp | |
parent | submodule (diff) | |
parent | Merge branch 'master' into miami (diff) | |
download | re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.gz re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.bz2 re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.lz re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.xz re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.tar.zst re3-7669b97ac64bd77dc0932210f81e4a0def9bfb1b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/render/Renderer.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 03ef1064..66c12dd9 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -908,8 +908,13 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL a2 = i; } } +#ifdef FIX_BUGS + y = Floor(miny); + yend = Floor(maxy); +#else y = miny; yend = maxy; +#endif // Go left in poly to find first edge b b2 = a2; @@ -947,8 +952,8 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL while(y <= yend && y < NUMSECTORS_Y){ // scan one x-line if(y >= 0 && xstart < NUMSECTORS_X) - for(x = xstart; x <= xend; x++) - if(x >= 0 && x != NUMSECTORS_X) + for(x = xstart; x <= xend && x != NUMSECTORS_X; x++) + if(x >= 0) scanfunc(CWorld::GetSector(x, y)->m_lists); // advance one scan line |