X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=shape.h;h=9f7371d678f3c2d3b460b8d2907f77e2af61999d;hp=01a5708bb0b1bfa33c17c263e2735630172e762c;hb=2b5dd5bc0eb1739dd744de6f565d0f3a7ae02c95;hpb=46dacbe75dac20a1c6e1b61a2eb99ca25fc971ec diff --git a/shape.h b/shape.h index 01a5708..9f7371d 100644 --- a/shape.h +++ b/shape.h @@ -6,12 +6,13 @@ 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