forked from adamjimenez/ChaosGroove
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.hpp
41 lines (34 loc) · 1.14 KB
/
config.hpp
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
// Config (.Hpp)
// -----------
#ifndef __Config_hpp__
#define __Config_hpp__
#define MAX_CONFIG_FILES 16
#define CONFIG_DISPLAY 0
#define CONFIG_TEMP 1
#define CONFIG_OPTIONS 2
#define CONFIG_WIZARDS 3
#define CONFIG_MENUS 4
#define CONFIG_WIZARD_NAMES 5
#define CONFIG_SOUNDS 6
#define CONFIG_SCROLLY 7
#define CONFIG_TITLE_MUSIC 8
struct config_t
{
char name[512];
char *data;
int length;
};
extern struct config_t config[MAX_CONFIG_FILES];
bool set_config_file_new(int cfg, char *name, bool log_error);
bool write_config_file(int cfg);
void find_random_line_from_text_config(int cfg, char *text);
int GetConfigInt(int cfg, char *name, char *var, int def);
float GetConfigFloat(int cfg, char *name, char *var, float def);
bool GetConfigString(int cfg, char *name, char *var, char *text, long size);
int GetConfigYes(int cfg, char *name, char *var, int def);
void SetConfigData(int cfg, char *data, int len);
bool change_config_text(int cfg, char *name, char *var, char *text);
void free_all_config_data(void);
void strip_underscores_from_text(char *text);
void capitalize_text(char *text);
#endif