1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/raycastlib.git synced 2024-11-23 20:49:57 +01:00

Fix raycast tiny

This commit is contained in:
Miloslav Číž 2018-09-13 16:13:59 +02:00
parent 54ee5502be
commit 284135bcae

View file

@ -448,9 +448,9 @@ uint16_t sqrtInt(Unit value)
Unit a = value;
#ifdef RAYCAST_TINY
Unit b = 1u << 14;
uint32_t b = 1u << 14;
#else
Unit b = 1u << 30;
uint32_t b = 1u << 30;
#endif
while (b > a)
@ -740,7 +740,11 @@ Unit _floorCeilFunction(int16_t x, int16_t y)
Unit c = _ceilFunction(x,y);
#ifndef RAYCAST_TINY
return ((f & 0x0000ffff) << 16) | (c & 0x0000ffff);
#else
return ((f & 0x00ff) << 8) | (c & 0x00ff);
#endif
}
Unit adjustDistance(Unit distance, Camera *camera, Ray *ray)