mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Codechange: Add callback to IntSettingDesc to support more default values
This commit is contained in:
parent
e8d25d68b9
commit
a4071b78d7
@ -164,6 +164,12 @@ struct IntSettingDesc : SettingDesc {
|
||||
* @param The new value for the setting.
|
||||
*/
|
||||
typedef void PostChangeCallback(int32_t value);
|
||||
/**
|
||||
* A callback to set the correct default value, in case it can be measured in time
|
||||
* units or expressed as a percentage.
|
||||
* @param value The prospective new value for the setting.
|
||||
*/
|
||||
typedef void GetDefaultValueCallback(int32_t &value);
|
||||
|
||||
template <
|
||||
typename Tdef,
|
||||
@ -178,11 +184,13 @@ struct IntSettingDesc : SettingDesc {
|
||||
IntSettingDesc(const SaveLoad &save, SettingFlag flags, bool startup, Tdef def,
|
||||
Tmin min, Tmax max, Tinterval interval, StringID str, StringID str_help, StringID str_val,
|
||||
SettingCategory cat, PreChangeCheck pre_check, PostChangeCallback post_callback,
|
||||
GetTitleCallback get_title_cb, GetHelpCallback get_help_cb, SetValueDParamsCallback set_value_dparams_cb) :
|
||||
GetTitleCallback get_title_cb, GetHelpCallback get_help_cb, SetValueDParamsCallback set_value_dparams_cb,
|
||||
GetDefaultValueCallback get_def_cb) :
|
||||
SettingDesc(save, flags, startup),
|
||||
str(str), str_help(str_help), str_val(str_val), cat(cat), pre_check(pre_check),
|
||||
post_callback(post_callback),
|
||||
get_title_cb(get_title_cb), get_help_cb(get_help_cb), set_value_dparams_cb(set_value_dparams_cb) {
|
||||
get_title_cb(get_title_cb), get_help_cb(get_help_cb), set_value_dparams_cb(set_value_dparams_cb),
|
||||
get_def_cb(get_def_cb) {
|
||||
if constexpr (std::is_base_of_v<StrongTypedefBase, Tdef>) {
|
||||
this->def = def.base();
|
||||
} else {
|
||||
@ -221,6 +229,7 @@ struct IntSettingDesc : SettingDesc {
|
||||
GetTitleCallback *get_title_cb;
|
||||
GetHelpCallback *get_help_cb;
|
||||
SetValueDParamsCallback *set_value_dparams_cb;
|
||||
GetDefaultValueCallback *get_def_cb; ///< Callback to set the correct default value
|
||||
|
||||
StringID GetTitle() const;
|
||||
StringID GetHelp() const;
|
||||
@ -254,9 +263,10 @@ struct BoolSettingDesc : IntSettingDesc {
|
||||
BoolSettingDesc(const SaveLoad &save, SettingFlag flags, bool startup, bool def,
|
||||
StringID str, StringID str_help, StringID str_val, SettingCategory cat,
|
||||
PreChangeCheck pre_check, PostChangeCallback post_callback,
|
||||
GetTitleCallback get_title_cb, GetHelpCallback get_help_cb, SetValueDParamsCallback set_value_dparams_cb) :
|
||||
GetTitleCallback get_title_cb, GetHelpCallback get_help_cb, SetValueDParamsCallback set_value_dparams_cb,
|
||||
GetDefaultValueCallback get_def_cb) :
|
||||
IntSettingDesc(save, flags, startup, def ? 1 : 0, 0, 1, 0, str, str_help, str_val, cat,
|
||||
pre_check, post_callback, get_title_cb, get_help_cb, set_value_dparams_cb) {}
|
||||
pre_check, post_callback, get_title_cb, get_help_cb, set_value_dparams_cb, get_def_cb) {}
|
||||
|
||||
static std::optional<bool> ParseSingleValue(const char *str);
|
||||
|
||||
@ -273,9 +283,9 @@ struct OneOfManySettingDesc : IntSettingDesc {
|
||||
int32_t max, StringID str, StringID str_help, StringID str_val, SettingCategory cat,
|
||||
PreChangeCheck pre_check, PostChangeCallback post_callback,
|
||||
GetTitleCallback get_title_cb, GetHelpCallback get_help_cb, SetValueDParamsCallback set_value_dparams_cb,
|
||||
std::initializer_list<const char *> many, OnConvert *many_cnvt) :
|
||||
GetDefaultValueCallback get_def_cb, std::initializer_list<const char *> many, OnConvert *many_cnvt) :
|
||||
IntSettingDesc(save, flags, startup, def, 0, max, 0, str, str_help, str_val, cat,
|
||||
pre_check, post_callback, get_title_cb, get_help_cb, set_value_dparams_cb), many_cnvt(many_cnvt)
|
||||
pre_check, post_callback, get_title_cb, get_help_cb, set_value_dparams_cb, get_def_cb), many_cnvt(many_cnvt)
|
||||
{
|
||||
for (auto one : many) this->many.push_back(one);
|
||||
}
|
||||
@ -296,9 +306,9 @@ struct ManyOfManySettingDesc : OneOfManySettingDesc {
|
||||
int32_t def, StringID str, StringID str_help, StringID str_val, SettingCategory cat,
|
||||
PreChangeCheck pre_check, PostChangeCallback post_callback,
|
||||
GetTitleCallback get_title_cb, GetHelpCallback get_help_cb, SetValueDParamsCallback set_value_dparams_cb,
|
||||
std::initializer_list<const char *> many, OnConvert *many_cnvt) :
|
||||
GetDefaultValueCallback get_def_cb, std::initializer_list<const char *> many, OnConvert *many_cnvt) :
|
||||
OneOfManySettingDesc(save, flags, startup, def, (1 << many.size()) - 1, str, str_help,
|
||||
str_val, cat, pre_check, post_callback, get_title_cb, get_help_cb, set_value_dparams_cb, many, many_cnvt) {}
|
||||
str_val, cat, pre_check, post_callback, get_title_cb, get_help_cb, set_value_dparams_cb, get_def_cb, many, many_cnvt) {}
|
||||
|
||||
size_t ParseValue(const char *str) const override;
|
||||
std::string FormatValue(const void *object) const override;
|
||||
|
@ -58,11 +58,11 @@ static StringID SettingHelpWallclock(const IntSettingDesc &sd);
|
||||
|
||||
/* Macros for various objects to go in the configuration file.
|
||||
* This section is for global variables */
|
||||
#define SDTG_VAR(name, type, flags, var, def, min, max, interval, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup)\
|
||||
NSD(Int, SLEG_GENERAL(name, SL_VAR, var, type, 1, from, to, extra), flags, startup, def, min, max, interval, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook)
|
||||
#define SDTG_VAR(name, type, flags, var, def, min, max, interval, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup)\
|
||||
NSD(Int, SLEG_GENERAL(name, SL_VAR, var, type, 1, from, to, extra), flags, startup, def, min, max, interval, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook)
|
||||
|
||||
#define SDTG_BOOL(name, flags, var, def, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup)\
|
||||
NSD(Bool, SLEG_GENERAL(name, SL_VAR, var, SLE_BOOL, 1, from, to, extra), flags, startup, def, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook)
|
||||
#define SDTG_BOOL(name, flags, var, def, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup)\
|
||||
NSD(Bool, SLEG_GENERAL(name, SL_VAR, var, SLE_BOOL, 1, from, to, extra), flags, startup, def, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook)
|
||||
|
||||
#define SDTG_LIST(name, type, flags, var, def, length, from, to, cat, extra, startup)\
|
||||
NSD(List, SLEG_GENERAL(name, SL_ARR, var, type, length, from, to, extra),flags, startup, def)
|
||||
@ -70,22 +70,22 @@ static StringID SettingHelpWallclock(const IntSettingDesc &sd);
|
||||
#define SDTG_SSTR(name, type, flags, var, def, max_length, pre_check, post_callback, from, to, cat, extra, startup)\
|
||||
NSD(String, SLEG_GENERAL(name, SL_STDSTR, var, type, sizeof(var), from, to, extra), flags, startup, def, max_length, pre_check, post_callback)
|
||||
|
||||
#define SDTG_OMANY(name, type, flags, var, def, max, full, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup)\
|
||||
NSD(OneOfMany, SLEG_GENERAL(name, SL_VAR, var, type, 1, from, to, extra), flags, startup, def, max, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, full, nullptr)
|
||||
#define SDTG_OMANY(name, type, flags, var, def, max, full, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup)\
|
||||
NSD(OneOfMany, SLEG_GENERAL(name, SL_VAR, var, type, 1, from, to, extra), flags, startup, def, max, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, full, nullptr)
|
||||
|
||||
#define SDTG_MMANY(name, type, flags, var, def, full, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup)\
|
||||
NSD(ManyOfMany, SLEG_GENERAL(name, SL_VAR, var, type, 1, from, to, extra), flags, startup, def, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, full, nullptr)
|
||||
#define SDTG_MMANY(name, type, flags, var, def, full, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup)\
|
||||
NSD(ManyOfMany, SLEG_GENERAL(name, SL_VAR, var, type, 1, from, to, extra), flags, startup, def, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, full, nullptr)
|
||||
|
||||
/* Macros for various objects to go in the configuration file.
|
||||
* This section is for structures where their various members are saved */
|
||||
#define SDT_VAR(base, var, type, flags, def, min, max, interval, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup)\
|
||||
NSD(Int, SLE_GENERAL(SL_VAR, base, var, type, 1, from, to, extra), flags, startup, def, min, max, interval, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook)
|
||||
#define SDT_VAR(base, var, type, flags, def, min, max, interval, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup)\
|
||||
NSD(Int, SLE_GENERAL(SL_VAR, base, var, type, 1, from, to, extra), flags, startup, def, min, max, interval, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook)
|
||||
|
||||
#define SDT_VAR_NAME(base, var, type, flags, def, min, max, interval, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup, name)\
|
||||
NSD(Int, SLE_GENERAL_NAME(SL_VAR, name, base, var, type, 1, from, to, extra), flags, startup, def, min, max, interval, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook)
|
||||
#define SDT_VAR_NAME(base, var, type, flags, def, min, max, interval, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup, name)\
|
||||
NSD(Int, SLE_GENERAL_NAME(SL_VAR, name, base, var, type, 1, from, to, extra), flags, startup, def, min, max, interval, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook)
|
||||
|
||||
#define SDT_BOOL(base, var, flags, def, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup)\
|
||||
NSD(Bool, SLE_GENERAL(SL_VAR, base, var, SLE_BOOL, 1, from, to, extra), flags, startup, def, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook)
|
||||
#define SDT_BOOL(base, var, flags, def, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup)\
|
||||
NSD(Bool, SLE_GENERAL(SL_VAR, base, var, SLE_BOOL, 1, from, to, extra), flags, startup, def, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook)
|
||||
|
||||
#define SDT_LIST(base, var, type, flags, def, from, to, cat, extra, startup)\
|
||||
NSD(List, SLE_GENERAL(SL_ARR, base, var, type, lengthof(((base*)8)->var), from, to, extra), flags, startup, def)
|
||||
@ -93,18 +93,18 @@ static StringID SettingHelpWallclock(const IntSettingDesc &sd);
|
||||
#define SDT_SSTR(base, var, type, flags, def, pre_check, post_callback, from, to, cat, extra, startup)\
|
||||
NSD(String, SLE_GENERAL(SL_STDSTR, base, var, type, sizeof(((base*)8)->var), from, to, extra), flags, startup, def, 0, pre_check, post_callback)
|
||||
|
||||
#define SDT_OMANY(base, var, type, flags, def, max, full, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, load, cat, extra, startup)\
|
||||
NSD(OneOfMany, SLE_GENERAL(SL_VAR, base, var, type, 1, from, to, extra), flags, startup, def, max, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, full, load)
|
||||
#define SDT_OMANY(base, var, type, flags, def, max, full, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, load, cat, extra, startup)\
|
||||
NSD(OneOfMany, SLE_GENERAL(SL_VAR, base, var, type, 1, from, to, extra), flags, startup, def, max, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, full, load)
|
||||
|
||||
#define SDT_MMANY(base, var, type, flags, def, full, str, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, strhelp, strval, from, to, cat, extra, startup)\
|
||||
NSD(ManyOfMany, SLE_GENERAL(SL_VAR, base, var, type, 1, from, to, extra), flags, startup, def, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, full, nullptr)
|
||||
#define SDT_MMANY(base, var, type, flags, def, full, str, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, strhelp, strval, from, to, cat, extra, startup)\
|
||||
NSD(ManyOfMany, SLE_GENERAL(SL_VAR, base, var, type, 1, from, to, extra), flags, startup, def, str, strhelp, strval, cat, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, full, nullptr)
|
||||
|
||||
|
||||
#define SDTC_VAR(var, type, flags, def, min, max, interval, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup)\
|
||||
SDTG_VAR(#var, type, flags, _settings_client.var, def, min, max, interval, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup)
|
||||
#define SDTC_VAR(var, type, flags, def, min, max, interval, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup)\
|
||||
SDTG_VAR(#var, type, flags, _settings_client.var, def, min, max, interval, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup)
|
||||
|
||||
#define SDTC_BOOL(var, flags, def, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup)\
|
||||
SDTG_BOOL(#var, flags, _settings_client.var, def, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup)
|
||||
#define SDTC_BOOL(var, flags, def, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup)\
|
||||
SDTG_BOOL(#var, flags, _settings_client.var, def, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup)
|
||||
|
||||
#define SDTC_LIST(var, type, flags, def, from, to, cat, extra, startup)\
|
||||
SDTG_LIST(#var, type, flags, _settings_client.var, def, lengthof(_settings_client.var), from, to, cat, extra, startup)
|
||||
@ -112,5 +112,5 @@ static StringID SettingHelpWallclock(const IntSettingDesc &sd);
|
||||
#define SDTC_SSTR(var, type, flags, def, max_length, pre_check, post_callback, from, to, cat, extra, startup)\
|
||||
SDTG_SSTR(#var, type, flags, _settings_client.var, def, max_length, pre_check, post_callback, from, to, cat, extra, startup)\
|
||||
|
||||
#define SDTC_OMANY(var, type, flags, def, max, full, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup)\
|
||||
SDTG_OMANY(#var, type, flags, _settings_client.var, def, max, full, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, from, to, cat, extra, startup)
|
||||
#define SDTC_OMANY(var, type, flags, def, max, full, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup)\
|
||||
SDTG_OMANY(#var, type, flags, _settings_client.var, def, max, full, str, strhelp, strval, pre_check, post_callback, get_title_hook, get_help_hook, set_value_dparams_hook, get_def_hook, from, to, cat, extra, startup)
|
||||
|
@ -17,8 +17,8 @@ static const SettingVariant _company_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(CompanySettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(CompanySettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(CompanySettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(CompanySettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for CompanySettings.$var exceeds storage size");
|
||||
@ -34,6 +34,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -11,7 +11,7 @@ static const SettingVariant _currency_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_VAR = SDT_VAR (CurrencySpec, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR (CurrencySpec, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_SSTR = SDT_SSTR(CurrencySpec, $var, $type, $flags, $def, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
@ -28,6 +28,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -20,9 +20,9 @@ static const SettingVariant _difficulty_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR (GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@ -39,6 +39,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -16,8 +16,8 @@ static const SettingVariant _economy_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR (GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
||||
@ -33,6 +33,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -26,12 +26,12 @@ static const SettingVariant _game_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@ -49,6 +49,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -25,9 +25,9 @@ static const SettingVariant _gui_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTC_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@ -44,6 +44,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -12,7 +12,7 @@ static const SettingVariant _linkgraph_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
||||
@ -28,6 +28,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -21,8 +21,8 @@ static const SettingVariant _locale_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_SSTR = SDT_SSTR(GameSettings, $var, $type, $flags, $def, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
@ -40,6 +40,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -25,11 +25,11 @@ static const SettingVariant _misc_settings_table[] = {
|
||||
};
|
||||
[templates]
|
||||
SDTG_LIST = SDTG_LIST($name, $type, $flags, $var, $def, $length, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_MMANY = SDTG_MMANY($name, $type, $flags, $var, $def, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_MMANY = SDTG_MMANY($name, $type, $flags, $var, $def, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_SSTR = SDTG_SSTR($name, $type, $flags, $var, $def, 0, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@ -46,6 +46,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -12,9 +12,9 @@ static const SettingVariant _multimedia_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_LIST = SDTC_LIST( $var, $type, $flags, $def, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTC_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@ -30,6 +30,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -14,8 +14,8 @@ static const SettingVariant _network_private_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_SSTR = SDTC_SSTR( $var, $type, $flags, $def, $length, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
@ -32,6 +32,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -16,9 +16,9 @@ static const SettingVariant _network_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTC_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@ -35,6 +35,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -13,7 +13,7 @@ static const SettingVariant _news_display_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTC_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@ -29,6 +29,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -31,12 +31,12 @@ static const SettingVariant _old_gameopt_settings_table[] = {
|
||||
};
|
||||
[templates]
|
||||
SDTG_LIST = SDTG_LIST($name, $type, $flags, $var, $def, $length, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_NULL = SDT_NULL( $length, $from, $to),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_NULL = SDT_NULL( $length, $from, $to),
|
||||
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $var, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@ -56,6 +56,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -14,8 +14,8 @@ static const SettingVariant _pathfinding_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
||||
@ -31,6 +31,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -13,9 +13,9 @@ static const SettingVariant _script_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_OMANY = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
||||
@ -32,6 +32,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -17,8 +17,8 @@ static const SettingVariant _win32_settings_table[] = {
|
||||
};
|
||||
#endif /* _WIN32 */
|
||||
[templates]
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_BOOL = SDTG_BOOL($name, $flags, $var, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDTG_VAR = SDTG_VAR($name, $type, $flags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDTG_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
|
||||
@ -34,6 +34,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -13,8 +13,8 @@ static const SettingVariant _window_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(WindowDesc, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(WindowDesc, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(WindowDesc, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(WindowDesc, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for WindowDesc.$var exceeds storage size");
|
||||
@ -30,6 +30,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
@ -18,9 +18,9 @@ static const SettingVariant _world_settings_table[] = {
|
||||
[post-amble]
|
||||
};
|
||||
[templates]
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_BOOL = SDT_BOOL(GameSettings, $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
SDT_OMANY = SDT_OMANY(GameSettings, $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $load, $cat, $extra, $startup),
|
||||
SDT_VAR = SDT_VAR(GameSettings, $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $from, $to, $cat, $extra, $startup),
|
||||
|
||||
[validation]
|
||||
SDT_OMANY = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
|
||||
@ -37,6 +37,7 @@ post_cb = nullptr
|
||||
str_cb = nullptr
|
||||
help_cb = nullptr
|
||||
val_cb = nullptr
|
||||
def_cb = nullptr
|
||||
load = nullptr
|
||||
from = SL_MIN_VERSION
|
||||
to = SL_MAX_VERSION
|
||||
|
Loading…
Reference in New Issue
Block a user