jag

snake_c

public

Small snake game in C

Star0
Watch0
3ebca1b81488b26330105c47d4f51e98e6df60f9
2
ssh://git@git.jaglekon.de:30/jag/snake_c.git
source/settings_file/settings_file.hC36 lines620 B
1
#ifndef SETTINGS_FILE_H
2
#define SETTINGS_FILE_H
3
4
#include <stdio.h>
5
#include <stdint.h>
6
#include <stdlib.h>
7
#include <string.h>
8
9
#include <errno.h>
10
11
#define SET_LEN 10
12
13
#define SCORE_LEN 10
14
15
16
typedef struct {
17
  int64_t *settings;
18
  size_t length;
19
} setting_arr;
20
21
typedef struct score {
22
  char name[SCORE_LEN];
23
  uint16_t points;
24
} highscore;
25
26
27
uint8_t read_settings(char *settings_file, setting_arr set_arr);
28
29
uint8_t init_setting_arr(setting_arr *set_arr, size_t length);
30
31
void free_setting_arr(setting_arr set_arr);
32
33
34
uint8_t get_highscore(char *highscore_path, highscore *leader_board, size_t score_ammount);
35
36
#endif