7 typedef struct sprite Sprite;
9 #define SPRITE(x) ((Sprite *) (x))
33 #define COLLIDES(sprite) ((sprite)->flags & COLLIDE)
35 Sprite *free_sprites[N_TYPES]; // lists of free sprites, by type.
37 void do_collision(Sprite *a, Sprite *b);
38 void collisions(void);
40 void init_sprites(void);
41 void reset_sprites(void);
42 void add_sprite(Sprite *s);
43 void move_sprite(Sprite *s, float ticks);
44 void move_sprites(float ticks);
46 Sprite *collides(Sprite *s);
47 Sprite * pixel_collides(float x, float y);
48 void load_sprite(Sprite *sprite, char *filename);
50 float sprite_mass(Sprite *s);
51 void bounce(Sprite *a, Sprite *b);
92 insert_sprite(Sprite **head, Sprite *s)
99 static inline Sprite *
100 remove_sprite(Sprite **head)
109 draw_sprite(Sprite *s)
112 if(s->flags & DRAW) {
113 dest.x = s->x; dest.y = s->y;
114 SDL_BlitSurface(s->image, NULL, surf_screen, &dest);
118 #endif // VOR_SPRITE_H