Mercurial > MadButterfly
diff include/mb_redraw_man.h @ 232:527894c2ad39
Add functions for collision test.
- mb_obj_pos_is_in() test if two coords and their descendants are overlaid.
- mb_objs_is_overlay() test if a point is covered by another mb_obj_t.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 21 Dec 2008 23:30:00 +0800 |
parents | 2637519e2bd7 |
children | 65cabbdd5284 |
line wrap: on
line diff
--- a/include/mb_redraw_man.h Thu Dec 18 22:37:15 2008 +0800 +++ b/include/mb_redraw_man.h Sun Dec 21 23:30:00 2008 +0800 @@ -165,6 +165,10 @@ extern shape_t *find_shape_at_pos(redraw_man_t *rdman, co_aix x, co_aix y, int *in_stroke); +extern int mb_obj_pos_is_in(redraw_man_t *rdman, mb_obj_t *obj, + co_aix x, co_aix y, int *in_stroke); +extern int mb_objs_is_overlay(redraw_man_t *rdman, + mb_obj_t *obj1, mb_obj_t *obj2); #define rdman_get_ob_factory(rdman) (&(rdman)->ob_factory) #define rdman_get_redraw_subject(rdman) ((rdman)->redraw) #define rdman_get_root(rdman) ((rdman)->root_coord) @@ -182,4 +186,5 @@ */ void sprite_set_search_path(char *path); + #endif /* __REDRAW_MAN_H_ */