JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
bump version to 0.5.8
[vor.git] / sprite.h
index 75d7730..d67b655 100644 (file)
--- a/sprite.h
+++ b/sprite.h
@@ -26,13 +26,14 @@ struct sprite {
        uint32_t area;
 };
 
+// flags
 #define MOVE 1
 #define DRAW 2
 #define COLLIDE 4
 
 #define COLLIDES(sprite) ((sprite)->flags & COLLIDE)
 
-Sprite *free_sprites[N_TYPES];  // lists of free sprites, by type.
+extern Sprite *free_sprites[N_TYPES];  // lists of free sprites, by type.
 
 void do_collision(Sprite *a, Sprite *b);
 void collisions(void);
@@ -43,10 +44,10 @@ void add_sprite(Sprite *s);
 void move_sprite(Sprite *s);
 void move_sprites(void);
 
-Sprite *collides(Sprite *s);
-int pixel_collides(float x, float y);
+Sprite * pixel_collides(float x, float y);
 void load_sprite(Sprite *sprite, char *filename);
 
+float sprite_mass(Sprite *s);
 void bounce(Sprite *a, Sprite *b);
 
 
@@ -83,6 +84,7 @@ struct rock {
        uint32_t area;
        // ROCK extras
        int type;
+       int life;
 };