store.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #ifndef STORE_H_INCLUDED
  2. #define STORE_H_INCLUDED
  3. #include "resor.h"
  4. #include "xresor.h"
  5. int store_kind(int index);
  6. Resor *store_load_bitmap(int index,const char *vpath);
  7. Resor *store_load_bitmap_flags(int index,const char *vpath,int flags);
  8. Resor *store_load_sample(int index,const char *vpath);
  9. Resor *store_load_audio_stream(int index,const char *vpath,size_t buffer_count,int samples);
  10. Resor *store_grab_font(int index,int bmp_index,int count,int ranges[]);
  11. Resor *store_grab_font_from_resor(int index,Resor *resor,int count,int ranges[]);
  12. Resor *store_load_bitmap_font(int index,const char *vpath);
  13. Resor *store_load_bitmap_font_flags(int index,const char *vpath,int f);
  14. Resor *store_load_ttf_font(int index,const char *vpath,int h,int f);
  15. Resor *store_load_ttf_font_stretch(int index,const char *vpath,int w,int h,int f);
  16. bool store_done();
  17. Resor *store_put(int index,Resor *value);
  18. bool store_drop(int index);
  19. Resor *store_get(int index);
  20. int store_max();
  21. bool store_index_ok(int index);
  22. bool store_init();
  23. ALLEGRO_FONT * store_get_font(int index);
  24. ALLEGRO_BITMAP * store_get_bitmap(int index);
  25. ALLEGRO_SAMPLE * store_get_sample(int index);
  26. ALLEGRO_AUDIO_STREAM * store_get_audio_stream(int index);
  27. bool store_get_bitmap_format(int index,int *value);
  28. bool store_get_bitmap_flags(int index,int *value);
  29. bool store_get_bitmap_height(int index,int *value);
  30. bool store_get_bitmap_width(int index,int *value);
  31. bool store_get_ustr_dimensions(int index,ALLEGRO_USTR *text,Rebox *value);
  32. bool store_get_ustr_width(int index,ALLEGRO_USTR *text,int *value);
  33. bool store_get_text_dimensions(int index,char *text,Rebox *value);
  34. bool store_get_text_width(int index,char *text,int *value);
  35. bool store_get_font_line_height(int index,int *value);
  36. bool store_get_font_descent(int index,int *value);
  37. bool store_get_font_ascent(int index,int *value);
  38. /* Loads "other" data and puts it in the storage. */
  39. Resor *
  40. store_load_other(int index, const char* vpath, ResorKind kind, ResorLoader* loader,
  41. ResorDestructor* destroy, void* extra);
  42. /* Loads a tile map and puts it in the storage. */
  43. Resor * store_load_tilemap(int index, const char * vpath);
  44. /* Returns a pointer to an "other" type of data from storage. Kind must match. */
  45. void * store_get_other(int index, unsigned kind);
  46. int store_get_unused_id(int minimum);
  47. #endif /* STORE_H_INCLUDED */