-
Notifications
You must be signed in to change notification settings - Fork 6
/
UserConfig.h
53 lines (40 loc) · 1.05 KB
/
UserConfig.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
#pragma once
#include "common.h"
int get_config_int(const ALLEGRO_CONFIG *config, const char *section, const char *key, int default_value = 0);
ALLEGRO_COLOR color_html(char const *string);
void color_html_to_rgba(char const *string,
float *red, float *green, float *blue, float *alpha);
class UserConfig
{
ALLEGRO_CONFIG * default_config;
public:
void save_values(void);
void retrieve_values(void);
bool load_file(void);
bool save_file(void);
UserConfig(void);
~UserConfig(void);
//screen resolution
unsigned int res_x;
unsigned int res_y;
//map location
unsigned int map_x;
unsigned int map_y;
unsigned int map_width;
unsigned int map_height;
int map_shift;
//last used map file
string map_path;
bool map_autoload;
int minimap_size;
bool showgrid;
//ao lighting
bool use_ao;
double tile_distance;
unsigned int ray_distance;
//system stuff
ALLEGRO_FONT *font;
//misc
bool debugmode;
};
extern UserConfig user_config;