Patric Stout
d02b1547f6
Remove: setting "no_http_content_downloads" ( #12058 )
...
As we now use HTTPS, it is very likely this will work on most systems.
For systems that do have HTTPS blocked, it will fail instantly,
and it will fallback to TCP anyway. That makes this setting no longer
very useful.
8 months ago
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
8 months ago
Patric Stout
7acf78964f
Remove: "generation_seed" from config, as it was a write-only value ( #11927 )
8 months ago
frosch
17dfc1a49a
Codechange: Replace SF_GUI_NEGATIVE_IS_SPECIAL with a settings value callback.
8 months ago
frosch
9e9a8ca7f6
Codechange: Add callbacks to IntSettingDesc to support dynamic strings for title, help and values.
8 months ago
frosch
022b9e92d2
Codechange: Move settings string formatting into IntSettingDesc members.
8 months ago
Patric Stout
75f21065c9
Codechange: refactor DecodeHexText to a generic purpose ConvertHexToBytes ( #11866 )
...
DecodeHexText() does more than just decoding hex. ConvertHexToBytes()
now only does pure hex decoding. This required a bit of refactoring
for the code using DecodeHexText().
8 months ago
Rubidium
2d77cf9c80
Codechange: replace StrStartsWith/StrEndsWith with starts_with and ends_with
8 months ago
Peter Nelson
54d45a6047
Codechange: Don't keep autosave_interval in std::chrono::minutes.
...
This variable is saved as a setting which requires the variable type to be known, but std::chrono::minutes may vary depending on system type.
Instead, keep as uint32_t and convert to std::chrono::minutes only when setting the timer.
10 months ago
Peter Nelson
1071acb483
Codechange: Redundant use of char * and c_str(). ( #11454 )
11 months ago
Rubidium
c6411168d8
Cleanup: missing spaces before continuation * in some comments
11 months ago
frosch
de3f29d7b2
Add: store base graphics parameters in openttd.cfg.
11 months ago
frosch
0b7ecf6102
Codechange: use the shortname as unique id to identify the base graphics in openttd.cfg.
11 months ago
frosch
97df27e41f
Codechange: Store base graphics settings in a separate section in openttd.cfg.
11 months ago
Peter Nelson
69e20e79ab
Codechange: Add const versions of GetItem/GetGroup, and sprinkle liberally.
...
Non-const version of GetItem is not needed.
11 months ago
Peter Nelson
233aac567b
Codechange: Use std::list instead of C-linked list for ini files.
...
This removes self-management of memory with new/delete and allows simpler iteration.
11 months ago
Peter Nelson
8bd06807e4
Codechange: Pass initializer list instead of null-terminated list of group types.
11 months ago
Peter Nelson
1fecbeff76
Codechange: Remove create parameter from IniLoadFile::GetGroup.
...
GetGroup now only returns nullptr if the group does not exist.
Use GetOrCreateGroup to create a group.
This avoids creating groups while reading ini files.
11 months ago
Peter Nelson
c47a0e1578
Codechange: Correct scope of IniItem for for-loop.
11 months ago
Peter Nelson
6ce7195ef1
Codechange: Split GetGroup into GetGroup/GetOrCreateGroup.
...
This follows the pattern used for GetItem/GetOrCreateItem, and allows use
of references where we know the group must exist.
11 months ago
Peter Nelson
54b1a067eb
Codechange: Test for nullptr instead of treating pointer as boolean.
11 months ago
Peter Nelson
d3c5ae2648
Codechange: Add CreateGroup/CreateItem methods for ini files.
...
This abstracts the internals a bit.
11 months ago
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
1 year ago
Patric Stout
37e2f99c09
Change: store crash logs in JSON format ( #11232 )
1 year ago
Tyler Trahan
701a61c9af
Codechange: Delete date_type.h
1 year ago
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
1 year ago
MasonGulu
0be27778af
Add: alternative setting for right-click close window option to exclude pinned windows ( #10204 )
1 year ago
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
1 year ago
Patric Stout
4f4810dc28
Fix: store autosave settings under the new names
1 year ago
Patric Stout
790c1b1b02
Codechange: refactor setting conversions and make sure it only happens once
...
By forcing it only happens once, the first time you upgrade to
a newer client, means you are free to jump between older and newer
versions after that. As they will not resync, the newer setting
can take on any of the (newer) values, without breaking the old
client. And when going to an old client and back, it doesn't
change it back to the converted value anymore.
1 year ago
Patric Stout
ece50d5a1d
Codechange: use BoolSettingDesc to parse settings in conversion code
1 year ago
Jonathan G Rennison
864d3c9c16
Fix: CMD_CHANGE_SETTING did not reject SF_NO_NETWORK_SYNC settings ( #11009 )
1 year ago
PeterN
64d6ad50f9
Codechange: Split GetItem with GetOrCreateItem. ( #10952 )
...
`IniGroup::GetItem()` returns nullptr if the item does not exist, but does not if the create parameter is set to true. Resolve CodeQL warnings with `GetOrCreateItem()` which returns a reference to the item instead.
1 year ago
Rubidium
4fdde00e25
Codechange: use std::string to create the GRF parameter list
1 year ago
Rubidium
f4b0ac2bd4
Codechange: use std::string for formatting settings
1 year ago
Peter Nelson
6b87fe6540
Codechange: Use std::array for GRF(File|Config) parameters.
...
This simplifies comparison, copying and assignment operations.
1 year ago
Rubidium
acec34a0fe
Cleanup: remove MD5SumToString in lieu of FormatArrayAsHex
1 year ago
Rubidium
d9a04ba446
Codechange: make the MD5 hash/digest/checksum variables a std::array
1 year ago
Rubidium
9f2fc860ad
Codechange: use std::optional<std::string> for changing the script over char *
1 year ago
Rubidium
0fd9eb0faa
Codechange: use std::string for script info/library finding
1 year ago
Rubidium
a312a6c1b2
Codechange: make md5sumToString std::string compatible
1 year ago
Patric Stout
c6c3d0e6fa
Fix: no_http_content_downloads and use_relay_service as private settings ( #10762 )
...
Basically, we don't need to know those values when people send in
crash reports.
1 year ago
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar ( #10753 )
1 year ago
Peter Nelson
00bf42353a
Codechange: Place gamelog into its own class, along with internal data.
...
Data is now stored in vectors to avoid manual memory management and
passing lengths around.
1 year ago
Charles Pigott
80bd5ad727
Codechange: Use std::strto* variants everywhere ( #10720 )
1 year ago
Charles Pigott
b282664242
Codechange: Replace all usages of alloca/AllocaM with more modern/less discouraged alternatives
1 year ago
Tyler Trahan
646a7e625b
Change: Use seconds for Linkgraph update settings ( #10610 )
1 year ago
Rubidium
4e65ec1dc4
Codechange: do not declare functions in blocks
2 years ago
Jonathan G Rennison
7c3c92f8b8
Fix #10155 : SyncCompanySettings sending old instead of new setting values ( #10158 )
2 years ago
Jonathan G Rennison
3b3c9c1c3a
Fix #10129 : Use after free in GRFLoadConfig invalid GRF error path ( #10130 )
2 years ago