/* ** col.c - Collisions ** ** 2014 - Frank Villaro-Dixon */ #include #include #include "game.h" #include "obs.h" int has_collision(struct s_game *g, struct s_obstacle o) { int face = get_face_from_cursor(g); if(face != o.face) return 0; if(o.distance <= CURSOR_DIST && o.distance + o.thick >= CURSOR_DIST) { return 1; } return 0; }