rename intersect_(f)rect to overlap_(f)rect and add simplified functions with the old names

This commit is contained in:
2024-09-20 13:39:37 -03:00
parent 5cc36ab46c
commit 999cb78358
3 changed files with 35 additions and 10 deletions

View File

@ -130,9 +130,9 @@ bool world_find_intersect_frect(struct world *world, t_frect rect, t_frect *inte
if (intersection == NULL) {
t_frect temp;
is_intersecting = intersect_frect(&rect, &tile_frect, &temp);
is_intersecting = overlap_frect(&rect, &tile_frect, &temp);
} else {
is_intersecting = intersect_frect(&rect, &tile_frect, intersection);
is_intersecting = overlap_frect(&rect, &tile_frect, intersection);
}
if (is_intersecting)
@ -155,9 +155,9 @@ bool world_find_intersect_rect(struct world *world, t_rect rect, t_rect *interse
if (intersection == NULL) {
t_rect temp;
is_intersecting = intersect_rect(&rect, tile_rect, &temp);
is_intersecting = overlap_rect(&rect, tile_rect, &temp);
} else {
is_intersecting = intersect_rect(&rect, tile_rect, intersection);
is_intersecting = overlap_rect(&rect, tile_rect, intersection);
}
if (is_intersecting)