X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=shape.h;h=9f7371d678f3c2d3b460b8d2907f77e2af61999d;hp=a76951dbecc0c9152778099102896b3644a5682d;hb=cd7fb220b16a73c15ff9dff7a5627bf78478875f;hpb=2bea0659b8edff14f1554d2540780f54ccdc21c9 diff --git a/shape.h b/shape.h index a76951d..9f7371d 100644 --- a/shape.h +++ b/shape.h @@ -1,11 +1,18 @@ +#ifndef VOR_SHAPE_H +#define VOR_SHAPE_H + #include #include struct shape { int w, h; - int mw; + int mw; // mask width (number of uint32's) uint32_t *mask; + uint32_t area; }; void get_shape(SDL_Surface *img, struct shape *s); int collide(int xdiff, int ydiff, struct shape *r, struct shape *s); +int pixel_collide(unsigned int xoff, unsigned int yoff, struct shape *r); + +#endif // VOR_SHAPE_H