saved_struct.h 470 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <stdint.h>
  3. #include <stdbool.h>
  4. #include <stddef.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. bool saved_struct_load(const char* path, void* data, size_t size, uint8_t magic, uint8_t version);
  9. bool saved_struct_save(const char* path, void* data, size_t size, uint8_t magic, uint8_t version);
  10. bool saved_struct_get_payload_size(
  11. const char* path,
  12. uint8_t magic,
  13. uint8_t version,
  14. size_t* payload_size);
  15. #ifdef __cplusplus
  16. }
  17. #endif