ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan_Config.h
Revision: 993
Committed: Sun Apr 6 17:06:02 2014 UTC (11 years, 6 months ago) by alloc
Content type: text/x-chdr
File size: 703 byte(s)
Log Message:
Daodan:
- Fix #74
- Fix #75
- Fix #72

File Contents

# Content
1 #ifndef DAODAN_CONFIG_H
2 #define DAODAN_CONFIG_H
3
4 #include "stdint.h"
5
6 typedef enum {
7 C_BOOL,
8 C_INT,
9 C_STRING,
10 EXT_BOOL
11 } OptionType_t;
12
13 typedef union {
14 int intBoolVal;
15 uint8_t* extBoolVal;
16 char* stringVal;
17 } OptionValue_t;
18
19 typedef struct {
20 char* name;
21 char* description;
22 OptionType_t type;
23 OptionValue_t defaultValue;
24 OptionValue_t value;
25 } ConfigOption_t;
26
27 typedef struct {
28 char* name;
29 char* description;
30 ConfigOption_t options[50];
31 } ConfigSection_t;
32
33
34 void DDrConfig(int argc, char* argv[]);
35
36 ConfigOption_t* DDrConfig_GetOptOfType(const char* fullOptName, OptionType_t type);
37 const char* DDrConfig_GetOptionTypeName(OptionType_t type);
38
39 #endif