mirror of
https://git.coom.tech/drummyfish/raycastlib.git
synced 2024-12-23 01:26:19 +01:00
Fix raycast tiny
This commit is contained in:
parent
54ee5502be
commit
284135bcae
1 changed files with 6 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue