Atrinik Client  4.0
settings.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Atrinik, a Multiplayer Online Role Playing Game *
3  * *
4  * Copyright (C) 2009-2014 Alex Tokar and Atrinik Development Team *
5  * *
6  * Fork from Crossfire (Multiplayer game for X-windows). *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the Free Software *
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
21  * *
22  * The author can be reached at admin@atrinik.org *
23  ************************************************************************/
24 
30 #ifndef SETTINGS_H
31 #define SETTINGS_H
32 
37 enum {
48 };
49 
58 enum {
73 };
74 
78 enum {
103 
108 };
109 
113 enum {
126 };
127 
131 enum {
138 };
139 
143 enum {
152 };
153 
160 enum {
175 
178 };
179 
181 typedef struct setting_range {
183  int64_t min;
184 
186  int64_t max;
187 
189  int64_t advance;
190 } setting_range;
191 
196 typedef struct setting_select {
198  char **options;
199 
201  size_t options_len;
203 
207 typedef struct setting_struct {
209  char *name;
210 
212  char *desc;
213 
215  uint8_t type;
216 
218  uint8_t internal;
219 
222 
224  union {
226  char *str;
227 
229  int64_t i;
230  } val;
232 
236 typedef struct setting_category {
238  char *name;
239 
242 
244  size_t settings_num;
246 
248 #define SETTING_SELECT(_setting) ((setting_select *) (_setting)->custom_attrset)
249 
250 #define SETTING_RANGE(_setting) ((setting_range *) (_setting)->custom_attrset)
251 
255 enum {
262 };
263 
264 #endif
struct setting_category setting_category
int64_t min
Definition: settings.h:183
union setting_struct::@30 val
uint8_t type
Definition: settings.h:215
char * str
Definition: settings.h:226
void * custom_attrset
Definition: settings.h:221
char * desc
Definition: settings.h:212
struct setting_struct setting_struct
setting_struct ** settings
Definition: settings.h:241
int64_t i
Definition: settings.h:229
int64_t advance
Definition: settings.h:189
struct setting_range setting_range
char * name
Definition: settings.h:209
char ** options
Definition: settings.h:198
struct setting_select setting_select
size_t settings_num
Definition: settings.h:244
int64_t max
Definition: settings.h:186
size_t options_len
Definition: settings.h:201