spritelist.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef spritelist_H_INCLUDED
  2. #define spritelist_H_INCLUDED
  3. /* Sprite list functions. */
  4. typedef struct SpriteList_ SpriteList;
  5. /* Amount of potential sprites that a SpriteList can contain at creation. */
  6. #define SPRITELIST_NSPRITES_DEFAULT 10000
  7. SpriteList * spritelist_alloc();
  8. SpriteList * spritelist_initall(SpriteList * self, int maxsprites);
  9. SpriteList * spritelist_init(SpriteList * self);
  10. SpriteList * spritelist_done(SpriteList * self);
  11. SpriteList * spritelist_new();
  12. SpriteList * spritelist_free(SpriteList * self);
  13. Sprite * spritelist_sprite(SpriteList * self, int index);
  14. Sprite * spritelist_sprite_(SpriteList * self, int index, Sprite * sprite);
  15. Sprite * spritelist_new_sprite(SpriteList * self);
  16. int spritelist_new_sprite_id(SpriteList * self);
  17. Sprite * spritelist_loadlayer_ulpcss_vpath(
  18. SpriteList * self, int index, int layerindex, char * vpath);
  19. int spritelist_get_unused_sprite_id(SpriteList * self);
  20. int spritelist_load_sprite_layer_with_builtin_layout
  21. (SpriteList * me, int isprite, int ilayer, char * vpath, int layout);
  22. int spritelist_load_sprite_layer_with_layout
  23. (SpriteList * me, int isprite, int ilayer, char * vpath, SpriteLayout * layout);
  24. int spritelist_tint_sprite_layer
  25. (SpriteList * me, int isprite, int ilayer, Color color);
  26. int spritelist_delete_sprite(SpriteList * self, int index);
  27. #endif