Mercurial > MadButterfly
diff src/mb_types.h @ 28:604bc90d509d
Refactory
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Mon, 04 Aug 2008 20:08:37 +0800 |
parents | d50f33040de6 |
children | e06a4a667ce2 |
line wrap: on
line diff
--- a/src/mb_types.h Mon Aug 04 10:10:47 2008 +0800 +++ b/src/mb_types.h Mon Aug 04 20:08:37 2008 +0800 @@ -50,6 +50,10 @@ int *n_overlays, geo_t **overlays); #define geo_get_shape(g) ((g)->shape) #define geo_set_shape(g, sh) do {(g)->shape = sh;} while(0) +#define _geo_is_in(a, s, w) ((a) >= (s) && (a) < ((s) + (w))) +#define geo_pos_is_in(g, _x, _y) \ + (_geo_is_in(_x, (g)->cur_area.x, (g)->cur_area.w) && \ + _geo_is_in(_y, (g)->cur_area.y, (g)->cur_area.h)) /*! \brief A coordination system.