Commit Graph

23 Commits

Author SHA1 Message Date
Patric Stout e58046c947 Codechange: move all settings.ini files to table/settings 2021-05-29 11:27:00 +02:00
rubidium42 08308d808c Codechange: use separate pre and post callbacks for int settings 2021-05-29 10:07:30 +02:00
rubidium42 3bb6ce8827 Codechange: use initializer_lists for the settings tables
Not using vectors as those require copying from the initializer list and that
makes unique_ptrs to the actual SettingDesc objects later impossible.
2021-05-27 18:49:43 +02:00
rubidium42 ac99a38175 Cleanup: remove and/or fix some confusing comments
The comments for SettingDescType; it is a byte, so not 4 bytes and since it is not a flag there are about 250 other possibilities left instead of 9.
SettingGuiFlag is uint16 so has 2 bytes allocated.
SettingDescGlobVarList and related comments imply that global vars cannot be used elsewhere, but they are used for settings just fine. Even then the type is not used anywhere else but the definition of the table.
2021-05-27 18:49:43 +02:00
Patric Stout 74aa934441 Codechange: validate that "max" value of settings fit in their storage
This is an easy mistake to make, so protect us against making such
mistakes, by validating it doesn't happen.
2021-03-01 23:17:47 +01:00
Patric Stout 7996fadb91 Change: [Win32] Remove force_full_redraw and display_hz settings
These were special settings only for the win32-drivers, and
introduced in the very first version we track.

Time kinda had caught up with those variables, so it is time to
say farewell.

force_full_redraw was most likely a debug functionality "in case
our dirty-rect fails". This should no longer be needed.

display_hz was cute, as it had a max of 120. That is kinda
out-dated information, but I also doubt anyone was really using
this.
2021-02-20 17:08:44 +01:00
Michael Lutz 00c66e7096 Codechange: Allow early-load settings that are not misc settings. 2021-02-17 21:01:21 +01:00
Michael Lutz 7845434270 Codechange: Don't use cpp_offsetof in the save/load code.
Many of the member variables that are used in save/load are inside types
that are not standard layout types. Using pointer arithmetics to determine
addresses of members inside types that are not standard layout is generally
undefined behaviour. If we'd use C++17, it is conditionally supported, which means
each compiler may or may not support it. And even then using it for individual
array elements is syntactically not supported the the standard offsetof function.

Unfortunately, the trickery employed for saving linkgraph settings causes quite some
clutter in the settings ini files.
2021-02-13 20:08:53 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Charles Pigott 644f4c3547 Codechange: Set size of SettingGuiFlag & SettingDescType enums, and use them properly 2019-04-29 17:40:22 +01:00
peter1138 c0836bccef Codechange: NULL -> nullptr in settings files. 2019-04-11 13:00:55 +01:00
Peter Nelson 9de12521ec Codechange: Convert saveload numbers to enum values.
(This was mostly achieved with a few in-place regexes)
2019-02-02 21:39:06 +00:00
glx c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 2018-12-27 18:09:16 +01:00
frosch 631e8b45fd (svn r26522) -Add: A config-file-only setting to disable usage of 8bpp video modes.
-Remove: [win32] fullscreen_bpp setting, which is replaced by above setting.
-Change: Disable usage of 8bpp blitters and video modes by default. Many modern OS and hardware cause issues with those.
2014-04-27 12:15:14 +00:00
frosch 69a62452be (svn r24671) -Feature [FS#5355]: Add basic/advanced/expert filters to adv. settings GUI. (Eagle_rainbow) 2012-11-08 10:04:00 +00:00
alberth 1d58838a97 (svn r24234) -Add: Add help-string infrastructure to the ini files 2012-05-12 10:09:00 +00:00
alberth 9fe65f93fe (svn r22210) -Add: Add a variable for the value strings in the settings tables. 2011-03-06 15:51:44 +00:00
alberth bbde7766d2 (svn r22207) -Add: Add the copyright message to the new ini files. 2011-03-06 09:54:20 +00:00
rubidium b8d3c42de2 (svn r22199) -Cleanup-ish: replace the shortcut macros for (gui)flags with their more clearly named (longer) constant names 2011-03-05 11:34:31 +00:00
rubidium 2636a4809b (svn r22197) -Cleanup: remove the distinction between conditional and non-conditional settings; with default from and to savegame versions all can be conditional. They previously were as well; the non-conditional ones were macros of the conditionals with to/from saveload versions hardcoded 2011-03-05 10:47:49 +00:00
rubidium cb3fa759f3 (svn r22196) -Codechange: use default values for the from and to of savegame versions as well 2011-03-05 10:20:49 +00:00
rubidium 8b9f99ec44 (svn r22194) -Codechange: use the defaults feature of settingsgen to remove the need to state the "default" value for all items 2011-03-05 10:12:03 +00:00
alberth 74d756799c (svn r22172) -Add: Add ini files containing the table/settings data. 2011-03-03 21:04:17 +00:00