7 typedef struct sprite Sprite;
9 #define SPRITE(x) ((Sprite *) (x))
34 #define COLLIDES(sprite) ((sprite)->flags & COLLIDE)
36 Sprite *free_sprites[N_TYPES]; // lists of free sprites, by type.
38 void do_collision(Sprite *a, Sprite *b);
39 void collisions(void);
41 void init_sprites(void);
42 void reset_sprites(void);
43 void add_sprite(Sprite *s);
44 void move_sprite(Sprite *s, float ticks);
45 void move_sprites(float ticks);
47 Sprite *collides(Sprite *s);
48 Sprite * pixel_collides(float x, float y);
49 void load_sprite(Sprite *sprite, char *filename);
51 float sprite_mass(Sprite *s);
52 void bounce(Sprite *a, Sprite *b);
93 insert_sprite(Sprite **head, Sprite *s)
100 static inline Sprite *
101 remove_sprite(Sprite **head)
110 draw_sprite(Sprite *s)
113 if(s->flags & DRAW) {
114 dest.x = s->x; dest.y = s->y;
115 SDL_BlitSurface(s->image, NULL, surf_screen, &dest);
119 #endif // VOR_SPRITE_H