mirror of
https://git.coom.tech/drummyfish/raycastlib.git
synced 2024-12-23 01:26:19 +01:00
Make C again
This commit is contained in:
parent
5fbebe3af7
commit
1f6237c95e
1 changed files with 5 additions and 5 deletions
10
raycastlib.h
10
raycastlib.h
|
@ -1202,12 +1202,12 @@ void moveCameraWithCollision(Camera *camera, Vector2D planeOffset,
|
|||
{\
|
||||
Unit height = floorHeightFunc(s1,s2);\
|
||||
if (height > bottomLimit)\
|
||||
dir##Collides = true;\
|
||||
dir##Collides = 0;\
|
||||
else if (ceilingHeightFunc != 0)\
|
||||
{\
|
||||
height = ceilingHeightFunc(s1,s2);\
|
||||
if (height < topLimit)\
|
||||
dir##Collides = true;\
|
||||
dir##Collides = 0;\
|
||||
}\
|
||||
}\
|
||||
else\
|
||||
|
@ -1230,10 +1230,10 @@ void moveCameraWithCollision(Camera *camera, Vector2D planeOffset,
|
|||
}\
|
||||
}
|
||||
|
||||
int8_t xCollides = false;
|
||||
int8_t xCollides = 0;
|
||||
collCheckOrtho(x,y,xSquareNew,ySquare,1)
|
||||
|
||||
int8_t yCollides = false;
|
||||
int8_t yCollides = 0;
|
||||
collCheckOrtho(y,x,xSquare,ySquareNew,0)
|
||||
|
||||
#define collHandle(dir)\
|
||||
|
@ -1246,7 +1246,7 @@ void moveCameraWithCollision(Camera *camera, Vector2D planeOffset,
|
|||
{
|
||||
if (xSquare != xSquareNew && ySquare != ySquareNew) // corner?
|
||||
{
|
||||
int8_t xyCollides = false;
|
||||
int8_t xyCollides = 0;
|
||||
collCheck(xy,xSquareNew,ySquareNew)
|
||||
|
||||
if (xyCollides)
|
||||
|
|
Loading…
Reference in a new issue