diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/collision.c | 6 | ||||
-rw-r--r-- | src/collision.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/collision.c b/src/collision.c index 45462e5..7e77b0a 100644 --- a/src/collision.c +++ b/src/collision.c @@ -39,7 +39,8 @@ db_pt_in_rect(int x, int y, SDL_Rect *rect) } void -db_closest_pt_on_rect(int x, int y, SDL_Rect *rect, int *close_x, int *close_y) +db_closest_pt_on_rect(int x, int y, SDL_Rect *rect, + double *close_x, double *close_y) { *close_x = x; if (x < rect->x) { @@ -56,7 +57,8 @@ db_closest_pt_on_rect(int x, int y, SDL_Rect *rect, int *close_x, int *close_y) } int -db_col_cir_rect(int x, int y, int r, SDL_Rect *rect, int *col_x, int *col_y) +db_col_cir_rect(int x, int y, int r, SDL_Rect *rect, + double *col_x, double *col_y) { db_closest_pt_on_rect(x, y, rect, col_x, col_y); return (r * r) >= diff --git a/src/collision.h b/src/collision.h index 02d93e3..ee04a8e 100644 --- a/src/collision.h +++ b/src/collision.h @@ -24,9 +24,9 @@ int db_pt_in_rect(int x, int y, SDL_Rect *rect) __attribute__((__pure__)); void db_closest_pt_on_rect(int x, int y, SDL_Rect *rect, - int *close_x, int *close_y); + double *close_x, double *close_y); int db_col_cir_rect(int x, int y, int r, SDL_Rect *rect, - int *col_x, int *col_y); + double *col_x, double *col_y); int db_col_cir_cir(double x1, double y1, double r1, double x2, double y2, double r2) __attribute__((__const__)); int db_col_pt_cir_cir(double x1, double y1, double r1, |