-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.h
More file actions
35 lines (31 loc) · 729 Bytes
/
Copy pathconfig.h
File metadata and controls
35 lines (31 loc) · 729 Bytes
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
#pragma once
#include <string>
namespace cfg {
struct KeyBindings {
char left = '\0';
char right = '\0';
char down = '\0';
char rotate = '\0';
char rotate_ccw = '\0';
char rotate_180 = '\0';
char hard_drop = '\0';
char hold = '\0';
char pause = '\0';
char restart = '\0';
char quit = '\0';
};
struct Config {
std::string high_score_path = ".tetriz_high_score";
int start_level = 1;
bool hide_ghost = false;
bool hide_fps = false;
bool sound = false;
bool visual_feedback = false;
int input_das_ms = 170;
int input_arr_ms = 35;
int rotation_repeat_ms = 120;
KeyBindings keys;
};
Config load_file(const std::string& path);
void apply_env_overrides(Config* config);
} // namespace cfg