From 0b35850a2fe716e504b4b7a0216bc630b762f5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Fri, 21 Sep 2018 16:36:58 +0200 Subject: [PATCH] Format --- raycastlib.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/raycastlib.h b/raycastlib.h index a5444a3..51afd31 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -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] =