-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.h
57 lines (38 loc) · 944 Bytes
/
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
//
// Created by Avihoo on 28/06/2020.
//
#ifndef TETRIS_SETTINGS_H
#define TETRIS_SETTINGS_H
/*Version Info*/
#define SETTINGS_VERSION sizeof(settings)
/*Rendering Settings*/
#define DEFAULT_BLOCK_SIZE 30
#define MAX_BLOCK_SIZE 35
#define MIN_BLOCK_SIZE 15
/*Keyboard Input Settings*/
#define DEFAULT_MOVEMENT_KEYBOARD_COOLDOWN 85
#define DEFAULT_ROTATION_KEYBOARD_COOLDOWN -1
#define DEFAULT_DROP_KEYBOARD_COOLDOWN -1
#define MAX_COOLDOWN 200
#define MIN_COOLDOWN 20
#define DEFAULT_VOLUME 4
#define MAX_VOLUME 8
#define MIN_VOLUME 0
#define SETTINGS_FILE_NAME "settings.cfg"
void defaultSettings();
void initSettings();
void saveSettings();
typedef struct settings
{
unsigned int version;
/*Display*/
unsigned int blockSize;
/*Input*/
int movementKeyboardCooldown;
int rotationKeyboardCooldown;
int dropKeyboardCooldown;
/*Sound*/
int soundVolume;
} settings;
settings currentSettings;
#endif //TETRIS_SETTINGS_H