1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/raycastlib.git synced 2024-12-23 01:26:19 +01:00
This commit is contained in:
Miloslav Číž 2018-09-21 16:36:58 +02:00
parent ccdb07aadf
commit 0b35850a2f

View file

@ -1405,10 +1405,9 @@ void RCL_renderSimple(RCL_Camera cam, RCL_ArrayFunction floorHeightFunc,
_RCL_horizontalDepthStep = HORIZON_DEPTH / cam.resolution.y;
constraints.maxHits =
_RCL_rollFunction == 0 ?
1 : // no door => 1 hit is enough
3; // for correctly rendering rolling doors we'll need 3 hits (NOT 2)
_RCL_rollFunction == 0 ?
1 : // no door => 1 hit is enough
3; // for correctly rendering rolling doors we'll need 3 hits (NOT 2)
#if RCL_COMPUTE_FLOOR_TEXCOORDS == 1
uint16_t halfResY = cam.resolution.y / 2;
@ -1417,8 +1416,12 @@ void RCL_renderSimple(RCL_Camera cam, RCL_ArrayFunction floorHeightFunc,
this will contain precomputed
distance to the camera */
RCL_Unit camHeightScreenSize =
(((cam.height >> 6) << 6) * // prevent weird floor movement with rounding
cam.resolution.y) / RCL_UNITS_PER_SQUARE;
#ifdef RCL_RAYCAST_TINY
(cam.height
#else
(((cam.height >> 6) << 6) // prevent weird floor movement with rounding
#endif
* cam.resolution.y) / RCL_UNITS_PER_SQUARE;
for (uint16_t i = 0; i < halfResY; ++i) // precompute the distances
floorPixelDistances[i] =