Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-06-15 | Codechange: mark chunks that are not stored as CH_READONLY | Patric Stout | |
This makes it easier to spot chunks that have a save_proc that is a nullptr, but also prevents confusion, where it looks like the CH_ type of a chunk has influence on how it is being read. It is not, it is only used for saving. | |||
2021-06-15 | Change: rework several CH_RIFF chunks to use CH_ARRAY instead | Patric Stout | |
This adds two byte extra to those chunks, and might feel a bit silly at first. But in later changes we will prefix CH_ARRAY with a table header, and then this change shines. Without this, we could still add headers to these chunks, but any external reader wouldn't know if the CH_RIFF has them or not. This way is much more practical, as they are now more like any other chunk. | |||
2021-06-15 | Cleanup: remove some unneeded c_str() calls | Rubidium | |
2021-06-14 | Codechange: ability to store structs and list of structs in savegames | Patric Stout | |
The commits following this will use this new functionality. Currently, a few places do this manually. This has as drawback that the Save() and Load() code need to be in sync, and that any change can result in (old) savegames no longer loading. In general, it is annoying code to maintain. By putting everything in a description table, and use that for both Save() and Load(), it becomes easier to see what is going on, and hopefully less likely for people to make mistakes. | |||
2021-06-13 | Codechange: replace IConsolePrintF with IConsolePrint and fmt formatting | rubidium42 | |
Also make some strings more consistent with the rest of the console strings. | |||
2021-06-13 | Change: unify the style of console error messages and convert to fmt | rubidium42 | |
Always start with a capital, do not add "ERROR: " in front of it. | |||
2021-06-13 | Codechange: convert printf DEBUG statements to fmt Debug statements | rubidium42 | |
2021-06-13 | Codechange: make the name of SettingDesc a std::string | rubidium42 | |
2021-06-13 | Codechange: use StrStartsWith/StrEndsWith when finding settings | rubidium42 | |
2021-06-07 | Codechange: make [Save|Load]Settings() behave more like other Save/Load code ↵ | Patric Stout | |
(#9335) Prepare the full description and send it to SlObject. This does require some code to be able to read to a SLE_VAR_NULL, like strings etc, as there is no way to know their length beforehand. | |||
2021-06-06 | Codechange: merge guiflags and flags in settings .ini files | Patric Stout | |
It was rather confusing which one was for what, especially as some SaveLoad flags were settings-only. Clean up this mess a bit by having only Setting flags. | |||
2021-06-06 | Codechange: move SLF_NO_NETWORK_SYNC into settings | Patric Stout | |
It is a settings-only flag, so don't pollute SaveLoad code with it. | |||
2021-06-06 | Codechange: move SLF_NOT_IN_SAVE into settings | Patric Stout | |
It is a settings-only flag, so don't pollute SaveLoad code with it. | |||
2021-06-06 | Codechange: remove the unused SLF_HEX flag | Patric Stout | |
2021-06-06 | Codechange: Remove FOR_ALL_CHUNK_HANDLERS | glx22 | |
Co-Authored-By: Patric Stout <truebrain@openttd.org> | |||
2021-06-03 | Codechange: rename SettingGuiFlag to SettingFlag (#9332) | Patric Stout | |
It is a lovely organicly grown enum, where it started off with GUI-only flags, and after that a few flags got added that can be considered GUI-only (the GUI disables/enables based on them), to only have flags added that has nothing to do with the GUI. So be less confusing, and rename them to what they do. Additionally, I took this opportunity to rename 0ISDISABLED to reflect what it really does. | |||
2021-05-31 | Codechange: C++-ify lists for SaveLoad (#9323) | Patric Stout | |
Basically, this changes "SaveLoad *" to either: 1) "SaveLoadTable" if a list of SaveLoads was meant 2) "SaveLoad &" if a single entry was meant As added bonus, this removes SL_END / SLE_END / SLEG_END. This also adds core/span.hpp, a "std::span"-lite. | |||
2021-05-30 | Codechange: add a wrapper function to find all settings based on prefix (#9312) | Patric Stout | |
2021-05-30 | Codechange: use setting name instead of index for HandleOldDiffCustom() (#9311) | Patric Stout | |
2021-05-29 | Codechange: use setting name instead of index for CmdChange(Company)Setting ↵ | Patric Stout | |
(#9306) This is mostly done as there are now constraints on settings.ini you might not expected. For example, conditional settings always have to come last, as otherwise they would influence the index. | |||
2021-05-29 | Codechange: Rename window related DeleteXXX to match new behaviour | glx22 | |
2021-05-29 | Codechange: [Network] Use std::string in CommandPacket | rubidium42 | |
2021-05-29 | Codechange: move from C-string to std::string for DoCommand | rubidium42 | |
2021-05-29 | Codechange: rename str_validate to StrMakeValid(InPlace) (#9304) | Patric Stout | |
This to be more explicit the function changes the value, and not returns yes/no. | |||
2021-05-29 | Codechange: use separate pre and post callbacks for int settings | rubidium42 | |
2021-05-29 | Codechange: use separate pre and post callbacks for string settings | rubidium42 | |
2021-05-29 | Codechange: split Write_ValidateSetting to get separate functions for making ↵ | rubidium42 | |
ints valid and writing ints | |||
2021-05-29 | Codechange: split Write_ValidateSetting to get separate functions for making ↵ | rubidium42 | |
strings valid and writing strings | |||
2021-05-27 | Codechange: add helper functions to read an int setting value | rubidium42 | |
2021-05-27 | Codechange: remove SettingDescType in lieu of the actual classes | rubidium42 | |
2021-05-27 | Codechange: let OneOfMany and ManyOfMany be their own classes as well | rubidium42 | |
2021-05-27 | Codechange: make BoolSettingDesc its own sub class | rubidium42 | |
2021-05-27 | Cleanup: remove unneeded temporary variables and casts | rubidium42 | |
2021-05-27 | Codechange: move bits of SettingDesc down to the appropriate sub classes | rubidium42 | |
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-27 | Codechange: make parsing of IniItems overridable functions of SettingDesc | rubidium42 | |
2021-05-27 | Codechange: make Write_ValidateSetting a function of StringSettingDesc | rubidium42 | |
2021-05-27 | Codechange: make Write_ValidateSetting a function of IntSettingDesc | rubidium42 | |
2021-05-27 | Cleanup: use (config) formatting for console settings functions | rubidium42 | |
2021-05-27 | Codechange: make formatting of values into strings a method of SettingDesc | rubidium42 | |
2021-05-27 | Codechange: make SettingDesc an instance in the setting table to allow for ↵ | rubidium42 | |
sub classes | |||
2021-05-27 | Codechange: do not use SettingDescBase directly when not needed | rubidium42 | |
2021-05-27 | Codechange: use initializer_lists for the settings tables | rubidium42 | |
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 | Codechange: let SettingDesc extend SettingDescBase | rubidium42 | |
2021-05-27 | Codechange: just pass the SettingDesc to SetSettingValue and remove ↵ | rubidium42 | |
distinction between (non)company | |||
2021-05-13 | Codechange: clean up C-string support from settings | rubidium42 | |
2021-05-13 | Codechange: move script settings to std::string | rubidium42 | |
2021-05-13 | Codechange: move passwords in settings to std::string | rubidium42 | |
2021-05-13 | Change: further support for std::string in settings | rubidium42 | |
2021-05-06 | Codechange: add SetDParamStr that accepts std::string& | rubidium42 | |
2021-05-05 | Change: [Network] Update server's NetworkServerGameInfo only when needed | rubidium42 | |
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. |