-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.h
62 lines (52 loc) · 2.15 KB
/
settings.h
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
58
59
60
61
62
/********************************************************************************/
/* */
/* Terminal Bomber */
/* Text based minesweeper style game */
/* v 0.3 date 19/6/2010 */
/* */
/* Copyright 2008, 2009, 2010 Lev Meirovitch */
/* <[email protected]> */
/* */
/* This file is part of Terminal Bomber. */
/* */
/* Terminal Bomber is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* Terminal Bomber is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with Terminal Bomber. If not, see <http://www.gnu.org/licenses/>. */
/* */
/********************************************************************************/
#ifndef _SETTINGS_H
#define _SETTINGS_H
/* setting status */
#define SETTING_ON 1
#define SETTING_OFF 0
/* setting checks */
#define OPEN_FLAGGED (SETTING_ON == settings.open_flagged)
#define CHEAT_MODE (SETTING_ON == settings.cheat_mode)
#define USE_COLORS (SETTING_ON == settings.colors_on)
/* setting defaults */
#define OPEN_FLAGGED_DEFAULT SETTING_OFF
#define CHEAT_MODE_DEFAULT SETTING_OFF
#define USE_COLORS_DEFAULT SETTING_ON
/* settings structure */
typedef struct {
unsigned char open_flagged; /* allow opening of flagged square */
unsigned char cheat_mode; /* allow cheating by subtracting time for uncovered bombs */
unsigned char colors_on; /* use colored display mode */
} settings_data;
extern settings_data settings; /* global variable to hold application settings */
/* functions for managing settings file */
int load_settings();
int save_settings();
/* settings screen functions */
void sttings_screen();
void paint_sttings(WINDOW *cur_win);
#endif /* _SETTINGS_H */