#define PROGRESS_FILE_HEADER_SIZE 7 struct progress_data_level_wip { uint16_t index; uint8_t paths[121]; uint8_t dropp[32]; }; #define PROGRESS_INSTRUCTIONS_COUNT 6 struct progress_data { uint8_t header[PROGRESS_FILE_HEADER_SIZE]; uint8_t align_unused; uint16_t level_count_unused; uint16_t level_stuck_0; uint16_t level_stuck_1; uint16_t level_stuck_2; uint16_t level_instructions[PROGRESS_INSTRUCTIONS_COUNT]; struct progress_data_level_wip level_wip; }; #define PROGRESS_FILE_SIZE (sizeof(struct progress_data)) extern struct progress_data progress; enum progress_level_status { LOCKED, AVAILABLE, FINISHED, WIP }; uint8_t progress_level_get(uint16_t level_index); uint8_t progress_levels_done(uint16_t level_first, uint16_t level_last); void progress_level_done(uint16_t level_index); void progress_level_tried(uint16_t level_index); void progress_level_load(void); void progress_level_save(void); void progress_load(void); void progress_save(void);