Commit Graph

29548 Commits (db36e61807955c896267d6585de0577efd30465d)
 

Author SHA1 Message Date
David Seifert db36e61807
Codefix: Compilation with GCC 15 due to missing CRTP usage (#12876) 2 months ago
translators b2faa14ab5 Update: Translations from eints
chinese (traditional): 57 changes by KogentaSan
galician: 1 change by pvillaverde
latvian: 17 changes by osprinkis
lithuanian: 8 changes by Br0l15
2 months ago
Ivan Pravdin da00a62d59
Fix #12856, e17c82e: Updating network settings does not invalidate data (#12858) 2 months ago
Peter Nelson 4ee45db51b
Change: [UI] Use scaled sprite sizes and correct matrix padding for content list. (#12875) 2 months ago
Peter Nelson 8b644f6ee6
Codechange: Use GetVisibleRangeIterators to draw script settings. (#12871) 2 months ago
Peter Nelson ba2b14b075 Change: [UI] Use proper matrix padding for server list test.
Text was only positioned correctly at 1x scale due to old pixel-based positioning method.
2 months ago
Peter Nelson d85f4b3ebf Change: [UI] Use interface scaled sizes for server list.
Avoid hardcoded values and use WidgetDimensions to set icon positions.

This fits better with non-power-of-2 interface scale.
2 months ago
Peter Nelson 4b6e3f86c2
Cleanup: Remove write-only flag_offset member from server list. (#12872)
A remnant of language flags, removed from the server list long ago.
2 months ago
translators 31e2f5a8a0 Update: Translations from eints
swedish: 3 changes by sereneavatar
chinese (traditional): 22 changes by KogentaSan
2 months ago
Peter Nelson 333e8e590e
Codefix: Don't assume 9 is the widest digit (#12870)
Use `SetDParamMaxDigit()` instead of `SetDParam()` with a large number.
2 months ago
translators 97479eb953 Update: Translations from eints
chinese (traditional): 97 changes by KogentaSan
2 months ago
translators 8ed854be58 Update: Translations from eints
chinese (traditional): 28 changes by KogentaSan
2 months ago
Peter Nelson cd739c2c33
Codechange: Replace dropdown's magic 2 with appropriate WidgetDimension. (#12869) 2 months ago
Peter Nelson 7fb3d1a197 Codechange: Use range-for to iterate airport specs to find first available. 2 months ago
Peter Nelson 2199543fbc Codechange: Use GetVisibleRangeIterators when drawing airport specs. 2 months ago
Peter Nelson b9c44b29be
Codechange: Pass AirportSpec instead of index to airport resolver object. (#12866)
This avoids retrieving AirportSpec again when it is already available.
2 months ago
Peter Nelson e69c065d6e
Codechange: Use find_if to find waypoint StationSpec when converting old savegames. (#12865)
This simplifies an indexed loop.
2 months ago
Joan Josep 891e53c72e
Codechange: move large switch case to separate function (#12863) 2 months ago
Loïc Guilloux d67963e616
Add: [Script] Include number of victims in ScriptEventVehicleCrashed (#12861) 2 months ago
translators eeed824329 Update: Translations from eints
norwegian (bokmal): 1 change by eriksorngard
chinese (simplified): 1 change by WenSimEHRP
german: 13 changes by Wuzzy2
2 months ago
translators 1fe11b7b57 Update: Translations from eints
chinese (simplified): 2 changes by WenSimEHRP
2 months ago
Jonathan G Rennison 65c666cb57
Codechange: Remove unused size field from struct SaveLoad (#12859) 2 months ago
translators 6006e832f2 Update: Translations from eints
finnish: 6 changes by hpiirai
2 months ago
translators 58e4643196 Update: Translations from eints
vietnamese: 4 changes by KhoiCanDev
3 months ago
Peter Nelson e2a796dbcd Codefix: Potential unterminated string returned from convert_to_fs.
Converting from UTF-8 to UTF-16 could have resulted in a buffer overflow if the buffer size was exactly the length of the converted string.

Pass string_view/span to convert_from/to_fs instead, and ensure the buffer is terminated. This replaces passing a pointer to the buffer and the buffer size as separate parameters, allowing the compiler to pass both in one parameter.

Removes use of `lengthof()`.
3 months ago
Peter Nelson b37954722b Codefix: Don't copy path string to itself.
When determining base paths on Windows the path is converted to UCS-16, and then copied into the same buffer.
3 months ago
Peter Nelson e22eb89b92 Codechange: Call BSWAP32() in the default_grf_overrides initializer.
This causes the BSWAP32 calls to happen only on first initialisation (BSWAP32 is not constexpr), instead of every time GRFs are reloaded.
3 months ago
Peter Nelson b090c8e9bd Codechange: Replace default overrides arrays with std::pair and use range-for.
This avoids indexed array access and use of lengthof.
3 months ago
Peter Nelson 70d63f87b8 Codechange: Re-order ResultSpriteGroup to reduce its size. 3 months ago
Peter Nelson db0ae42d45 Codechange: Set base type of spritegroup related enums.
This has a small impact on SpriteGroup object sizes.
3 months ago
Peter Nelson 55acc1b36d Codechange: Don't format strings passed to GrfMsg unless the message will be used.
This makes GrfMsg() behave more like Debug().
3 months ago
Peter Nelson ba0acb87eb Fix #12832: Sanitise strings from NewGRF before logging them in Debug output.
NewGRF strings may not be UTF-8 encoded, which causes issues on Windows.
3 months ago
Peter Nelson 93eb27d8df
Codechange: Use reference for always_accepted output parameter of AddAcceptedCargo. (#12854)
This parameter should always present (see tile_cmd.h:186), so use a reference to ensure it is.
3 months ago
Peter Nelson 60c3913a99
Codechange: Use range-for and std::size with _plural_forms. (#12852)
This removes indexed array access and use of `lengthof()` macro.
3 months ago
Peter Nelson b4bcb330c7
Codechange: Replace GetSavegameFormat's compression output pointer with std::pair return. (#12850)
This avoids using an unchecked pointer as an out-parameter.
3 months ago
Peter Nelson 100dd7b6d1
Codechange: Use find_if to get default writeable saveload format. (#12849)
* Codechange: Use find_if to get default writeable savegame format.

This removes the last of lastof, and so the lastof macro is removed.
3 months ago
Peter Nelson 56b0eac2e9
Codechange: Use std::span/std::string_view for strecpy. (#12848)
This avoids needing to manually pass the last character of the destination buffer, and allows use of standard library functions.
3 months ago
J0anJosep 86e32631d7 Doc: Amend landscape grid after #12572. 3 months ago
Peter Nelson aee04e7bc6
Codechange: Pass span to StrValid instead of first and last - 1. (#12846)
`std::span` is used instead of `std::string_view` as this is only used for fixed-length buffers.

This removes some callers of `lastof()`
3 months ago
translators 23bcd592a4 Update: Translations from eints
chinese (simplified): 27 changes by WenSimEHRP
italian: 9 changes by ciampix
esperanto: 7 changes by ciampix
3 months ago
Peter Nelson 6120165433
Fix #12839: Truncated help text dialog on Windows. (#12844)
Replace fixed-length buffer message conversion with std::string.
3 months ago
translators f59ab67672 Update: Translations from eints
english (us): 2 changes by 2TallTyler
dutch: 1 change by Afoklala
french: 2 changes by ottdfevr
3 months ago
translators 5395d5731e Update: Translations from eints
latvian: 3 changes by lexuslatvia
3 months ago
Peter Nelson 4976a0140e
Codefix: [UI] Incorrect initialisation order for rail/road toolbars. (#12843)
The toolbar state was set after the widget tree is created, during which toolbar state is needed.
3 months ago
Edmond Chui 2dc0a33eb7 Fix #12840, ff3be45: "Show industry names" blank panel not initialized properly 3 months ago
translators 794af62286 Update: Translations from eints
english (au): 1 change by krysclarke
swedish: 7 changes by joeax910
chinese (simplified): 2 changes by WenSimEHRP
korean: 1 change by telk5093
french: 2 changes by ottdfevr
3 months ago
translators cd4233bedc Update: Translations from eints
english (au): 1 change by krysclarke
chinese (simplified): 2 changes by WenSimEHRP
greek: 1 change by gh658804
russian: 2 changes by Ln-Wolf
finnish: 1 change by hpiirai
catalan: 2 changes by J0anJosep
portuguese: 1 change by azulcosta
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by pAter-exe
3 months ago
Loïc Guilloux 8ef3a3d463
Codefix: "maybe uninitialized" warnings for linux generic release build (#12838) 3 months ago
translators b27527ec0c Update: Translations from eints
chinese (simplified): 4 changes by WenSimEHRP
catalan: 2 changes by J0anJosep
3 months ago
dP f98b90ac2e
Codechange: Use constants for tree growth stages and tile update frequency (#12833) 3 months ago