diff options
| author | Arnold <[email protected]> | 2023-05-28 12:56:19 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-28 12:56:19 -0400 |
| commit | ad60e242e2d432b436de79ffeb76637e62b057d8 (patch) | |
| tree | db7e76c4e12c21c85de45e2e948419c5d2d8851c /src/wall.c | |
| parent | fed9c87269db74d70cd5262804873bc875543abe (diff) | |
| download | TOJam2023-ad60e242e2d432b436de79ffeb76637e62b057d8.tar.gz TOJam2023-ad60e242e2d432b436de79ffeb76637e62b057d8.zip | |
implement random enemy spawning
Diffstat (limited to 'src/wall.c')
| -rw-r--r-- | src/wall.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -38,3 +38,18 @@ new_wall( .height = height }); } + +bool +coords_inside_wall( + float x, + float y +) +{ + c_foreach(i, cvec_collision_2d_world_item, collision_wall_world) { + if (x >= i.ref->x && x <= i.ref->x + i.ref->width && + y >= i.ref->y && y <= i.ref->y + i.ref->height) { + return true; + } + } + return false; +} |
