summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-08-13 16:29:42 +0200
committeraap <aap@papnet.eu>2020-08-13 16:29:42 +0200
commitf0503edf62ff0263ae3e55b3a7916e03b2152b7a (patch)
treef4195159e6a3062cc623f9b17165624aba3fc048
parentRegister start button for real (diff)
downloadre3-f0503edf62ff0263ae3e55b3a7916e03b2152b7a.tar
re3-f0503edf62ff0263ae3e55b3a7916e03b2152b7a.tar.gz
re3-f0503edf62ff0263ae3e55b3a7916e03b2152b7a.tar.bz2
re3-f0503edf62ff0263ae3e55b3a7916e03b2152b7a.tar.lz
re3-f0503edf62ff0263ae3e55b3a7916e03b2152b7a.tar.xz
re3-f0503edf62ff0263ae3e55b3a7916e03b2152b7a.tar.zst
re3-f0503edf62ff0263ae3e55b3a7916e03b2152b7a.zip
-rw-r--r--src/render/Renderer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 717021a7..7ae29a2f 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -836,8 +836,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;
@@ -875,8 +880,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