summaryrefslogtreecommitdiff
path: root/src/settings.cpp
AgeCommit message (Collapse)Author
2021-05-27Codechange: remove SettingDescType in lieu of the actual classesrubidium42
2021-05-27Codechange: let OneOfMany and ManyOfMany be their own classes as wellrubidium42
2021-05-27Codechange: make BoolSettingDesc its own sub classrubidium42
2021-05-27Cleanup: remove unneeded temporary variables and castsrubidium42
2021-05-27Codechange: move bits of SettingDesc down to the appropriate sub classesrubidium42
And by doing so remove the hack where ints were put into pointers so "def" could either be an int or a string
2021-05-27Codechange: make parsing of IniItems overridable functions of SettingDescrubidium42
2021-05-27Codechange: make Write_ValidateSetting a function of StringSettingDescrubidium42
2021-05-27Codechange: make Write_ValidateSetting a function of IntSettingDescrubidium42
2021-05-27Cleanup: use (config) formatting for console settings functionsrubidium42
2021-05-27Codechange: make formatting of values into strings a method of SettingDescrubidium42
2021-05-27Codechange: make SettingDesc an instance in the setting table to allow for ↵rubidium42
sub classes
2021-05-27Codechange: do not use SettingDescBase directly when not neededrubidium42
2021-05-27Codechange: use initializer_lists for the settings tablesrubidium42
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-27Codechange: let SettingDesc extend SettingDescBaserubidium42
2021-05-27Codechange: just pass the SettingDesc to SetSettingValue and remove ↵rubidium42
distinction between (non)company
2021-05-13Codechange: clean up C-string support from settingsrubidium42
2021-05-13Codechange: move script settings to std::stringrubidium42
2021-05-13Codechange: move passwords in settings to std::stringrubidium42
2021-05-13Change: further support for std::string in settingsrubidium42
2021-05-06Codechange: add SetDParamStr that accepts std::string&rubidium42
2021-05-05Change: [Network] Update server's NetworkServerGameInfo only when neededrubidium42
Split the updating in a "static" version that only needs to be called when a new map is loaded or some settings are changed, and a "dynamic" version that updates everything that changes regularly such as the current game date or the number of spectators.
2021-04-30Fix: Recalculate padding and minimum sizes when GUI or Font zoom is changed.Peter Nelson
2021-04-27Fix: truncating strings in settings could leave invalid Utf8 charactersrubidium42
2021-04-27Codechange: writing and string validation to its own functionsrubidium42
2021-04-27Feature: allow non-ASCII currency separatorsrubidium42
2021-04-11Fix: Invalidate cached vehicle colourmaps when changing liveries setting. ↵PeterN
(#9006)
2021-03-26Feature: setting to indicate snow coverage for arctic climate (replaces snow ↵Patric Stout
line height) Setting the snow coverage (in % of the map) makes a lot more sense to the human, while still allowing the niche player to set (by finding the correct %) a snow line height they like. This makes for easier defaults, as it decoupled terrain height from amount of snow. Maps can never be 100% snow, as we do not have sprites for coastal tiles. Internally, this calculates the best snow line height to approach this coverage as close as possible.
2021-03-13Feature: allow setting maximum zoom level at which sprites are drawn (#8604)Matt Kimber
2021-02-17Codechange: Allow early-load settings that are not misc settings.Michael Lutz
2021-02-14Add: [OSX] Native font rendering without using FreeType.Michael Lutz
2020-12-27Codechange: Stringify config file paths.Michael Lutz
2020-12-13Add: save openttd.cfg immediately on changing a setting (#8358)Patric Stout
Formally it was only done on exit. This means that if it crashes changes in settings were not stored. This is often rather frustrating. Additionally, targets (like emscripten) where people are unlike to use "Exit Game", will never see their configuration stored. The drawback is that on every setting change there is some minor I/O of writing the ini file to disk again.
2020-12-06Fix: Compile warnings when asserts are disabledCharles Pigott
2020-05-21Codechange: Store base set related texts in std::strings.Michael Lutz
2020-05-21Codechange: Use std::string in INI file parsing.Michael Lutz
2020-02-06Feature: SLF_HEX to print hexadecimal numbers in the config fileJohannes E. Krause
2020-02-06Fix: Loading SDT_INTLIST similar to loading SDT_NUMXJohannes E. Krause
2020-02-06Fix: Saving SDT_INTLIST handle unsigned values properlyJohannes E. Krause
2019-12-21Codechange: Replace vehicle related FOR_ALL with range-based for loopsglx
2019-12-21Codechange: Replace station related FOR_ALL with range-based for loopsglx
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-09-29Fix: Some typos found using codespellJMcKiern
2019-05-14Add: [Win32] GDI engine for font glyph rendering as a replacement for ↵Michael Lutz
including FreeType. Building with FreeType is still possible and will take precedence over the GDI renderer, but the project files don't include FreeType anymore by default. Combining GDI rendering with ICU text layout is untested.
2019-05-14Codechange: Refactor the Freetype font cache into a generic part that does ↵Michael Lutz
not depend on Freetype and into one that does. This makes it easier to add other TrueType font rendering engines.
2019-04-25Feature: Add coverage area display for existing stations.peter1138
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-04-09Codechange: If something is a vector of strings, use a vector of strings ↵Michael Lutz
instead of an AutoFreeSmallVector.
2019-03-26Codechange: Replaced SmallVector::[Begin|End]() with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Append() with ↵Henry Wilson
std::vector::[push|emplace]_back()
2019-03-20Remove: ENABLE_NETWORK switchPatric Stout
This switch has been a pain for years. Often disabling broke compilation, as no developer compiles OpenTTD without, neither do any of our official binaries. Additionaly, it has grown so hugely in our codebase, that it clearly shows that the current solution was a poor one. 350+ instances of "#ifdef ENABLE_NETWORK" were in the code, of which only ~30 in the networking code itself. The rest were all around the code to do the right thing, from GUI to NewGRF. A more proper solution would be to stub all the functions, and make sure the rest of the code can simply assume network is available. This was also partially done, and most variables were correct if networking was disabled. Despite that, often the #ifdefs were still used. With the recent removal of DOS, there is also no platform anymore which we support where networking isn't working out-of-the-box. All in all, it is time to remove the ENABLE_NETWORK switch. No replacement is planned, but if you feel we really need this option, we welcome any Pull Request which implements this in a way that doesn't crawl through the code like this diff shows we used to.