settings.h
author tron
Sat, 30 Jul 2005 09:29:20 +0000
changeset 2238 33361a216301
parent 2186 db48cf29b983
child 2307 484c654dc875
permissions -rw-r--r--
(svn r2758) Add the AB() macro to add a value to a bit range and use it in a few places, also make use of GB and SB nearby
2186
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 1739
diff changeset
     1
/* $Id$ */
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 1739
diff changeset
     2
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     3
#ifndef SETTINGS_H
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     4
#define SETTINGS_H
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     5
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     6
enum SettingDescType {
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     7
	SDT_INTX, // must be 0
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     8
	SDT_ONEOFMANY,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     9
	SDT_MANYOFMANY,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    10
	SDT_BOOLX,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    11
	SDT_STRING,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    12
	SDT_STRINGBUF,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    13
	SDT_INTLIST,
759
a445474d7c21 (svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents: 705
diff changeset
    14
	SDT_STRINGQUOT, // string with quotation marks around it
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    15
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    16
	SDT_INT8 = 0 << 4,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    17
	SDT_UINT8 = 1 << 4,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    18
	SDT_INT16 = 2 << 4,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    19
	SDT_UINT16 = 3 << 4,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    20
	SDT_INT32 = 4 << 4,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    21
	SDT_UINT32 = 5 << 4,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    22
	SDT_CALLBX = 6 << 4,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    23
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    24
	SDT_UINT = SDT_UINT32,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    25
	SDT_INT = SDT_INT32,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    26
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    27
	SDT_NOSAVE = 1 << 8,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    28
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    29
	SDT_CALLB = SDT_INTX | SDT_CALLBX,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    30
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    31
	SDT_BOOL = SDT_BOOLX | SDT_UINT8,
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    32
};
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    33
705
71cf9f0d7e7f (svn r1157) Enhanced the config file (openttd.cfg) to use another section type. "List sections" as opposed to "variable sections" contain a list of values, separated by a new line. This is now used for the [newgrf] group. You have to edit each line in this section from e.g. "0 = firstset.grf" to only "firstset.grf".
dominik
parents: 543
diff changeset
    34
typedef enum {
71cf9f0d7e7f (svn r1157) Enhanced the config file (openttd.cfg) to use another section type. "List sections" as opposed to "variable sections" contain a list of values, separated by a new line. This is now used for the [newgrf] group. You have to edit each line in this section from e.g. "0 = firstset.grf" to only "firstset.grf".
dominik
parents: 543
diff changeset
    35
	IGT_VARIABLES = 0, // values of the form "landscape = hilly"
71cf9f0d7e7f (svn r1157) Enhanced the config file (openttd.cfg) to use another section type. "List sections" as opposed to "variable sections" contain a list of values, separated by a new line. This is now used for the [newgrf] group. You have to edit each line in this section from e.g. "0 = firstset.grf" to only "firstset.grf".
dominik
parents: 543
diff changeset
    36
	IGT_LIST = 1,      // a list of values, seperated by \n and terminated by the next group block
71cf9f0d7e7f (svn r1157) Enhanced the config file (openttd.cfg) to use another section type. "List sections" as opposed to "variable sections" contain a list of values, separated by a new line. This is now used for the [newgrf] group. You have to edit each line in this section from e.g. "0 = firstset.grf" to only "firstset.grf".
dominik
parents: 543
diff changeset
    37
} IniGroupType;
71cf9f0d7e7f (svn r1157) Enhanced the config file (openttd.cfg) to use another section type. "List sections" as opposed to "variable sections" contain a list of values, separated by a new line. This is now used for the [newgrf] group. You have to edit each line in this section from e.g. "0 = firstset.grf" to only "firstset.grf".
dominik
parents: 543
diff changeset
    38
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    39
typedef struct SettingDesc {
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    40
	const char *name;
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    41
	int flags;
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    42
	const void *def;
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    43
	void *ptr;
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    44
	const void *b;
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    45
} SettingDesc;
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    46
1739
4c8fb3905cbd (svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents: 759
diff changeset
    47
void IConsoleSetPatchSetting(const char *name, const char *value);
4c8fb3905cbd (svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents: 759
diff changeset
    48
void IConsoleGetPatchSetting(const char *name);
4c8fb3905cbd (svn r2243) -Fix: Rework of console. Use 'help command|variable' to get help about it. You can assign variables with =, ++, --, or just new value. Console parser is now lenient towards typed spaces, and more robust in general (at least readable). Removed the 'set' command, instead implemented all such variables as 'variables'.
Darkvater
parents: 759
diff changeset
    49
543
946badd71033 (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    50
#endif /* SETTINGS_H */