config.h 943 B

123456789101112131415161718192021222324252627282930
  1. #ifndef config_h
  2. #define config_h
  3. #include "cengine.h"
  4. #include "casset.h"
  5. #include "data/dict.h"
  6. typedef struct {
  7. dict* entries;
  8. } config;
  9. config* cfg_load_file(const char* filename);
  10. void cfg_save_file(config* c, const char* filename);
  11. void config_delete(config* c);
  12. char* config_string(config* c, char* key);
  13. int config_int(config* c, char* key);
  14. float config_float(config* c, char* key);
  15. bool config_bool(config* c, char* key);
  16. void config_set_string(config* c, char* key, char* val);
  17. void config_set_int(config* c, char* key, int val);
  18. void config_set_float(config* c, char* key, float val);
  19. void config_set_bool(config* c, char* key, bool val);
  20. asset_hndl option_graphics_asset(config* c, char* key, asset_hndl high, asset_hndl medium, asset_hndl low);
  21. int option_graphics_int(config* c, char* key, int high, int medium, int low);
  22. float option_graphics_float(config* c, char* key, float high, float medium, float low);
  23. #endif