-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathConfig.h
81 lines (74 loc) · 2.26 KB
/
Config.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#pragma once
#include <optional>
#include <string>
#include "common.h"
constexpr auto KEYMOD_NONE = 0;
constexpr bool DEFAULT_FULLSCREEN_MODE = false;
constexpr int DEFAULT_RESOLUTION_WIDTH = 800;
constexpr int DEFAULT_RESOLUTION_HEIGHT = 600;
constexpr int DEFAULT_SIZE = 70;
constexpr int DEFAULT_SIZE_Z = 4;
class Config {
public:
enum trackingmode : uint8_t {
TRACKING_NONE,
TRACKING_CENTER,
TRACKING_FOCUS,
TRACKING_INVALID
};
bool closeOnEsc = true;
int defaultScreenWidth{ DEFAULT_RESOLUTION_WIDTH };
int defaultScreenHeight{ DEFAULT_RESOLUTION_HEIGHT };
bool Fullscreen{ DEFAULT_FULLSCREEN_MODE };
Crd3D defaultSegmentSize{
.x = DEFAULT_SIZE,
.y = DEFAULT_SIZE,
.z = DEFAULT_SIZE_Z
};
bool show_all_creatures = false;
int automatic_reload_time = 50;
int automatic_reload_step = 50;
bool debug_mode = false;
bool transparentScreenshots = false;
int lift_segment = 0;
int animation_step = 196;
bool verbose_logging = false;
trackingmode track_mode = TRACKING_FOCUS;
bool invert_mouse_z = false;
bool follow_DFcursor = true;
bool show_creature_names = false;
bool show_creature_moods = false;
bool show_creature_jobs = false;
uint8_t show_creature_professions;
bool names_use_nick = true;
bool names_use_species = true;
bool show_osd = false;
bool cache_images = false;
bool show_stockpiles = true;
bool show_zones = true;
bool show_intro = false;
ALLEGRO_COLOR fogcol = al_map_rgba(128, 158, 177, 30);
bool fogenable = true;
ALLEGRO_COLOR backcol = al_map_rgb(128, 158, 177);
Crd3D viewOffset{ 0,0,0 };
int bitmapHolds = 4096;
bool saveImageCache = false;
int fontsize = 10;
std::filesystem::path font = std::filesystem::path{ "DejaVuSans.ttf" };
bool useDfColors = false;
dfColors colors;
bool opengl = false;
bool directX = false;
bool software = false;
bool dayNightCycle = false;
int imageCacheSize = 4096;
bool fog_of_war = true;
bool extrude_tiles = true;
bool pixelperfect_zoom = false;
};
struct action_name_mapper {
std::string name;
void (*func)(uint32_t);
};
bool loadConfigFile();
std::optional<std::string> trim_line(std::string line);