blob: b50cbadaf4c520ee0e82d33768b7989a1079bd6a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/******************************************************************************
* Copyright (C) 2015 Alejandro Colomar Andrés *
******************************************************************************/
/******************************************************************************
******* include guard ********************************************************
******************************************************************************/
#ifndef MSW_SAVE_H
#define MSW_SAVE_H
/******************************************************************************
******* headers **************************************************************
******************************************************************************/
#include <stdbool.h>
#include <stdio.h>
/******************************************************************************
******* macros ***************************************************************
******************************************************************************/
#define ENV_HOME "HOME"
#define USER_GAME_DIR ".mine-sweeper/"
#define USER_SAVED_DIR ".mine-sweeper/saved/"
#define SAVED_NAME_DEFAULT "saved"
#define FILE_EXTENSION ".mine"
/******************************************************************************
******* variables ************************************************************
******************************************************************************/
extern char home_path [FILENAME_MAX];
extern char user_game_path [FILENAME_MAX];
extern char saved_path [FILENAME_MAX];
extern char saved_name [FILENAME_MAX];
/******************************************************************************
******* functions ************************************************************
******************************************************************************/
void save_init (void);
void save_clr (void);
int load_game_file (void);
void save_game_file (char *filepath);
/******************************************************************************
******* include guard ********************************************************
******************************************************************************/
# endif /* save.h */
/******************************************************************************
******* end of file **********************************************************
******************************************************************************/
|