comparison 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
comparison
equal deleted inserted replaced
231:2637519e2bd7 232:527894c2ad39
163 } while(0) 163 } while(0)
164 extern int rdman_paint_changed(redraw_man_t *rdman, paint_t *paint); 164 extern int rdman_paint_changed(redraw_man_t *rdman, paint_t *paint);
165 165
166 extern shape_t *find_shape_at_pos(redraw_man_t *rdman, 166 extern shape_t *find_shape_at_pos(redraw_man_t *rdman,
167 co_aix x, co_aix y, int *in_stroke); 167 co_aix x, co_aix y, int *in_stroke);
168 extern int mb_obj_pos_is_in(redraw_man_t *rdman, mb_obj_t *obj,
169 co_aix x, co_aix y, int *in_stroke);
170 extern int mb_objs_is_overlay(redraw_man_t *rdman,
171 mb_obj_t *obj1, mb_obj_t *obj2);
168 #define rdman_get_ob_factory(rdman) (&(rdman)->ob_factory) 172 #define rdman_get_ob_factory(rdman) (&(rdman)->ob_factory)
169 #define rdman_get_redraw_subject(rdman) ((rdman)->redraw) 173 #define rdman_get_redraw_subject(rdman) ((rdman)->redraw)
170 #define rdman_get_root(rdman) ((rdman)->root_coord) 174 #define rdman_get_root(rdman) ((rdman)->root_coord)
171 175
172 /*! \brief Load sprite dymanicly from the shared object module. 176 /*! \brief Load sprite dymanicly from the shared object module.
180 /*! \brief Set the search path of dymanic object loading. 184 /*! \brief Set the search path of dymanic object loading.
181 * 185 *
182 */ 186 */
183 void sprite_set_search_path(char *path); 187 void sprite_set_search_path(char *path);
184 188
189
185 #endif /* __REDRAW_MAN_H_ */ 190 #endif /* __REDRAW_MAN_H_ */