Codechange: Use EnumBitSet for SettingFlags. (#13429)

This commit is contained in:
Peter Nelson
2025-02-01 15:46:51 +00:00
committed by GitHub
parent 1d25c526b4
commit c4c5028862
27 changed files with 414 additions and 415 deletions

View File

@@ -13,16 +13,16 @@ 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, $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, $range_cb, $from, $to, $cat, $extra, $startup),
SDT_BOOL = SDT_BOOL(GameSettings, $var, SettingFlags({$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, SettingFlags({$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, SettingFlags({$flags}), $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $def_cb, $range_cb, $from, $to, $cat, $extra, $startup),
[validation]
SDT_OMANY = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
SDT_VAR = static_assert($max <= MAX_$type, "Maximum value for GameSettings.$var exceeds storage size");
[defaults]
flags = SF_NONE
flags =
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
@@ -46,7 +46,7 @@ startup = false
var = script.script_max_opcode_till_suspend
type = SLE_UINT32
from = SLV_107
flags = SF_NEWGAME_ONLY
flags = SettingFlag::NewgameOnly
def = 10000
min = 500
max = 250000
@@ -60,7 +60,7 @@ cat = SC_EXPERT
var = script.script_max_memory_megabytes
type = SLE_UINT32
from = SLV_SCRIPT_MEMLIMIT
flags = SF_NEWGAME_ONLY
flags = SettingFlag::NewgameOnly
def = 1024
min = 8
max = 8192