settings.h
author matthijs
Wed, 22 Mar 2006 22:26:16 +0000
branch0.4.5
changeset 9958 bed516c67d61
parent 2307 63e18261a7e7
child 2972 f9fcee7f3815
permissions -rw-r--r--
(svn r4041) [Debian] Change next version number to 0.4.6 instead of 0.4.5.1.
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 1739
diff changeset
     1
/* $Id$ */
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 1739
diff changeset
     2
543
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     3
#ifndef SETTINGS_H
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     4
#define SETTINGS_H
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     5
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     6
enum SettingDescType {
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     7
	SDT_INTX, // must be 0
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     8
	SDT_ONEOFMANY,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
     9
	SDT_MANYOFMANY,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    10
	SDT_BOOLX,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    11
	SDT_STRING,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    12
	SDT_STRINGBUF,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    13
	SDT_INTLIST,
759
6d087784a08a (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
2307
63e18261a7e7 (svn r2831) Fix some potential and real buffer overflows
tron
parents: 2186
diff changeset
    15
	SDT_CHAR,
543
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    16
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    17
	SDT_INT8 = 0 << 4,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    18
	SDT_UINT8 = 1 << 4,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    19
	SDT_INT16 = 2 << 4,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    20
	SDT_UINT16 = 3 << 4,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    21
	SDT_INT32 = 4 << 4,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    22
	SDT_UINT32 = 5 << 4,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    23
	SDT_CALLBX = 6 << 4,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    24
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    25
	SDT_UINT = SDT_UINT32,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    26
	SDT_INT = SDT_INT32,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    27
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    28
	SDT_NOSAVE = 1 << 8,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    29
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    30
	SDT_CALLB = SDT_INTX | SDT_CALLBX,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    31
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    32
	SDT_BOOL = SDT_BOOLX | SDT_UINT8,
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    33
};
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    34
705
e213445d82ec (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
typedef enum {
e213445d82ec (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_VARIABLES = 0, // values of the form "landscape = hilly"
e213445d82ec (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
	IGT_LIST = 1,      // a list of values, seperated by \n and terminated by the next group block
e213445d82ec (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
} IniGroupType;
e213445d82ec (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
    39
543
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    40
typedef struct SettingDesc {
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    41
	const char *name;
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    42
	int flags;
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    43
	const void *def;
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    44
	void *ptr;
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    45
	const void *b;
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    46
} SettingDesc;
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    47
1739
4f3082735fbc (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 IConsoleSetPatchSetting(const char *name, const char *value);
4f3082735fbc (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
void IConsoleGetPatchSetting(const char *name);
4f3082735fbc (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
    50
543
e3b43338096b (svn r942) -Merged branch/network back into the trunk
truelight
parents:
diff changeset
    51
#endif /* SETTINGS_H */