1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/raycastlib.git synced 2024-12-26 01:56:19 +01:00

Fix floor rendering

This commit is contained in:
Miloslav Číž 2018-09-18 17:52:22 +02:00
parent 259fe1826a
commit f5dee2c0ab

View file

@ -1205,7 +1205,10 @@ void _columnFunctionSimple(RCL_HitResult *hits, uint16_t hitCount, uint16_t x,
coordHelper = -1 * wallStart;
coordHelper = coordHelper >= 0 ? coordHelper : 0;
wallEnd = RCL_clamp(wallStart + wallHeightScreen,0,_RCL_camResYLimit);
wallEnd = RCL_clamp(wallStart + wallHeightScreen,0,
_RCL_camera.resolution.y);
// ^ intentionally allow outside screen
wallStart = RCL_clamp(wallStart,0,_RCL_camResYLimit);
}
}
@ -1306,7 +1309,9 @@ RCL_Unit coordStep = 1;
p.position.y = y;
RCL_PIXEL_FUNCTION(&p);
++y;
p.depth -= _RCL_horizontalDepthStep;
if (p.depth < 0) // just in case