7 typedef struct sprite Sprite;
9 #define SPRITE(x) ((Sprite *) (x))
28 Sprite *free_sprites[N_TYPES]; // lists of free sprites, by type.
30 void do_collision(Sprite *a, Sprite *b);
31 void collisions(void);
33 void init_sprites(void);
34 void reset_sprites(void);
35 void add_sprite(Sprite *s);
36 void move_sprite(Sprite *s);
37 void move_sprites(void);
39 Sprite *collides(Sprite *s);
40 int pixel_collides(float x, float y);
41 void load_sprite(Sprite *sprite, char *filename);
43 void bounce(Sprite *a, Sprite *b);
82 insert_sprite(Sprite **head, Sprite *s)
89 static inline Sprite *
90 remove_sprite(Sprite **head)
99 draw_sprite(Sprite *s)
102 if(s->type < 0) return;
103 dest.x = s->x; dest.y = s->y;
104 SDL_BlitSurface(s->image, NULL, surf_screen, &dest);
107 #endif // VOR_SPRITE_H