mirror of
https://git.coom.tech/drummyfish/raycastlib.git
synced 2024-11-21 20:29:59 +01:00
Format
This commit is contained in:
parent
ccdb07aadf
commit
0b35850a2f
1 changed files with 9 additions and 6 deletions
15
raycastlib.h
15
raycastlib.h
|
@ -1405,10 +1405,9 @@ void RCL_renderSimple(RCL_Camera cam, RCL_ArrayFunction floorHeightFunc,
|
||||||
_RCL_horizontalDepthStep = HORIZON_DEPTH / cam.resolution.y;
|
_RCL_horizontalDepthStep = HORIZON_DEPTH / cam.resolution.y;
|
||||||
|
|
||||||
constraints.maxHits =
|
constraints.maxHits =
|
||||||
|
_RCL_rollFunction == 0 ?
|
||||||
_RCL_rollFunction == 0 ?
|
1 : // no door => 1 hit is enough
|
||||||
1 : // no door => 1 hit is enough
|
3; // for correctly rendering rolling doors we'll need 3 hits (NOT 2)
|
||||||
3; // for correctly rendering rolling doors we'll need 3 hits (NOT 2)
|
|
||||||
|
|
||||||
#if RCL_COMPUTE_FLOOR_TEXCOORDS == 1
|
#if RCL_COMPUTE_FLOOR_TEXCOORDS == 1
|
||||||
uint16_t halfResY = cam.resolution.y / 2;
|
uint16_t halfResY = cam.resolution.y / 2;
|
||||||
|
@ -1417,8 +1416,12 @@ void RCL_renderSimple(RCL_Camera cam, RCL_ArrayFunction floorHeightFunc,
|
||||||
this will contain precomputed
|
this will contain precomputed
|
||||||
distance to the camera */
|
distance to the camera */
|
||||||
RCL_Unit camHeightScreenSize =
|
RCL_Unit camHeightScreenSize =
|
||||||
(((cam.height >> 6) << 6) * // prevent weird floor movement with rounding
|
#ifdef RCL_RAYCAST_TINY
|
||||||
cam.resolution.y) / RCL_UNITS_PER_SQUARE;
|
(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
|
for (uint16_t i = 0; i < halfResY; ++i) // precompute the distances
|
||||||
floorPixelDistances[i] =
|
floorPixelDistances[i] =
|
||||||
|
|
Loading…
Reference in a new issue