JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
oops, have to check all 9 buckets.
[vor.git] / shape.h
1 #ifndef VOR_SHAPE_H
2 #define VOR_SHAPE_H
3
4 #include <SDL/SDL.h>
5 #include <stdint.h>
6
7 struct shape {
8         int w, h;
9         int mw; // mask width (number of uint32's)
10         uint32_t *mask;
11         uint32_t area;
12 };
13
14 void get_shape(SDL_Surface *img, struct shape *s);
15 int collide(int xdiff, int ydiff, struct shape *r, struct shape *s);
16 int pixel_collide(unsigned int xoff, unsigned int yoff, struct shape *r);
17
18 #endif // VOR_SHAPE_H