diff options
author | Michael Lutz <michi@icosahedron.de> | 2020-05-17 23:32:06 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2020-05-21 20:02:34 +0200 |
commit | a49fdb7ebbb8d8ce96bcd7bd779b18bcd86d0643 (patch) | |
tree | fc6776836040a068e6c1710288cee853ba28b565 /src/table | |
parent | 715aa67a9c13444ee76e717bfa656472f5fb2ac3 (diff) | |
download | openttd-a49fdb7ebbb8d8ce96bcd7bd779b18bcd86d0643.tar.xz |
Codechange: Store base set related texts in std::strings.
Diffstat (limited to 'src/table')
-rw-r--r-- | src/table/misc_settings.ini | 7 | ||||
-rw-r--r-- | src/table/settings.h.preamble | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/table/misc_settings.ini b/src/table/misc_settings.ini index c9441459f..c97663605 100644 --- a/src/table/misc_settings.ini +++ b/src/table/misc_settings.ini @@ -17,6 +17,7 @@ SDTG_LIST = SDTG_LIST($name, $type, $length, $flags, $guiflags, $var, $def, SDTG_MMANY = SDTG_MMANY($name, $type, $flags, $guiflags, $var, $def, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat), SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $guiflags, $var, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat), SDTG_STR = SDTG_STR($name, $type, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat), +SDTG_SSTR = SDTG_SSTR($name, $type, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat), SDTG_BOOL = SDTG_BOOL($name, $flags, $guiflags, $var, $def, $str, $strhelp, $strval, $proc, $from, $to, $cat), SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat), SDTG_END = SDTG_END() @@ -58,21 +59,21 @@ max = 2 full = _support8bppmodes cat = SC_BASIC -[SDTG_STR] +[SDTG_SSTR] name = ""graphicsset"" type = SLE_STRQ var = BaseGraphics::ini_set def = nullptr cat = SC_BASIC -[SDTG_STR] +[SDTG_SSTR] name = ""soundsset"" type = SLE_STRQ var = BaseSounds::ini_set def = nullptr cat = SC_BASIC -[SDTG_STR] +[SDTG_SSTR] name = ""musicset"" type = SLE_STRQ var = BaseMusic::ini_set diff --git a/src/table/settings.h.preamble b/src/table/settings.h.preamble index 2be8239a6..ddb9d2abf 100644 --- a/src/table/settings.h.preamble +++ b/src/table/settings.h.preamble @@ -74,6 +74,9 @@ static size_t ConvertLandscape(const char *value); #define SDTG_STR(name, type, flags, guiflags, var, def, str, strhelp, strval, proc, from, to, cat)\ SDTG_GENERAL(name, SDT_STRING, SL_STR, type, flags, guiflags, var, sizeof(var), def, 0, 0, 0, nullptr, str, strhelp, strval, proc, from, to, cat) +#define SDTG_SSTR(name, type, flags, guiflags, var, def, str, strhelp, strval, proc, from, to, cat)\ + SDTG_GENERAL(name, SDT_STDSTRING, SL_STDSTR, type, flags, guiflags, var, sizeof(var), def, 0, 0, 0, nullptr, str, strhelp, strval, proc, from, to, cat) + #define SDTG_OMANY(name, type, flags, guiflags, var, def, max, full, str, strhelp, strval, proc, from, to, cat)\ SDTG_GENERAL(name, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, max, 0, full, str, strhelp, strval, proc, from, to, cat) |