2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

66 rindas
1.3 KiB

  1. #ifndef IZ_CONFIG_H
  2. #define IZ_CONFIG_H
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include <minIni.h>
  6. #include "../common/IZ_common.h"
  7. typedef enum {
  8. IZ_CONFIG_TYPE_VOID,
  9. IZ_CONFIG_TYPE_STRING,
  10. IZ_CONFIG_TYPE_U8,
  11. IZ_CONFIG_TYPE_U16,
  12. IZ_CONFIG_TYPE_I32,
  13. } IZ_ConfigType;
  14. typedef struct {
  15. void* serialize;
  16. void* deserialize;
  17. } IZ_ConfigSerializerPair;
  18. typedef struct {
  19. IZ_ConfigType type;
  20. size_t dest_size;
  21. const char* section;
  22. const char* key;
  23. const char* cmdline_option;
  24. const void* default_value;
  25. void* validator;
  26. IZ_ConfigSerializerPair transformer;
  27. void* dest;
  28. } IZ_ConfigItem;
  29. void IZ_ConfigGetDefaultPath(const char*, size_t);
  30. const char* IZ_ConfigGetCommandlineOption(u8, const char*[], const char*);
  31. typedef enum {
  32. IZ_CONFIG_INITIALIZE_RESULT_ERROR = -1,
  33. IZ_CONFIG_INITIALIZE_RESULT_OK,
  34. IZ_CONFIG_INITIALIZE_RESULT_WARNING
  35. } IZ_ConfigInitializeResult;
  36. IZ_ConfigInitializeResult IZ_ConfigInitialize(IZ_ConfigItem[], const char*, u8, const char*[]);
  37. typedef i64 IZ_ConfigSaveResult;
  38. IZ_ConfigSaveResult IZ_ConfigSave(IZ_ConfigItem[], const char*);
  39. #define IZ_CONFIG_ITEM_NULL (IZ_ConfigItem) { \
  40. IZ_CONFIG_TYPE_VOID, \
  41. 0, \
  42. NULL, \
  43. NULL, \
  44. NULL, \
  45. NULL, \
  46. NULL, \
  47. { \
  48. .serialize = NULL, \
  49. .deserialize = NULL, \
  50. }, \
  51. NULL, \
  52. }
  53. #endif