mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-08 01:10:28 +00:00
40 lines
617 B
C
40 lines
617 B
C
|
#ifndef SETTINGS_H
|
||
|
#define SETTINGS_H
|
||
|
|
||
|
enum SettingDescType {
|
||
|
SDT_INTX, // must be 0
|
||
|
SDT_ONEOFMANY,
|
||
|
SDT_MANYOFMANY,
|
||
|
SDT_BOOLX,
|
||
|
SDT_STRING,
|
||
|
SDT_STRINGBUF,
|
||
|
SDT_INTLIST,
|
||
|
|
||
|
SDT_INT8 = 0 << 4,
|
||
|
SDT_UINT8 = 1 << 4,
|
||
|
SDT_INT16 = 2 << 4,
|
||
|
SDT_UINT16 = 3 << 4,
|
||
|
SDT_INT32 = 4 << 4,
|
||
|
SDT_UINT32 = 5 << 4,
|
||
|
SDT_CALLBX = 6 << 4,
|
||
|
|
||
|
SDT_UINT = SDT_UINT32,
|
||
|
SDT_INT = SDT_INT32,
|
||
|
|
||
|
SDT_NOSAVE = 1 << 8,
|
||
|
|
||
|
SDT_CALLB = SDT_INTX | SDT_CALLBX,
|
||
|
|
||
|
SDT_BOOL = SDT_BOOLX | SDT_UINT8,
|
||
|
};
|
||
|
|
||
|
typedef struct SettingDesc {
|
||
|
const char *name;
|
||
|
int flags;
|
||
|
const void *def;
|
||
|
void *ptr;
|
||
|
const void *b;
|
||
|
} SettingDesc;
|
||
|
|
||
|
#endif /* SETTINGS_H */
|