1
0
Fork 0
Commit Graph

22746 Commits (22b4a77e376bb2b88f09d306f35e014f4710c99d)

Author SHA1 Message Date
Peter Nelson 9eb28def57 Codechange: Return reference from GetNextParameterPointer.
GetNextParameterPointer can no longer return nullptr, and the callers do not check for nullptr, so return a reference instead.
2024-09-14 15:31:05 +01:00
translators 59b18560d4 Update: Translations from eints
english (us): 4 changes by 2TallTyler
dutch: 4 changes by Afoklala
2024-09-14 04:44:59 +00:00
translators 45a5868bb8 Update: Translations from eints
chinese (simplified): 4 changes by WenSimEHRP
korean: 4 changes by telk5093
italian: 9 changes by dominiccoletti
catalan: 4 changes by J0anJosep
2024-09-13 04:44:38 +00:00
Peter Nelson ad5da0c924
Codechange: Use `__VA_OPT__(,)` instead of `, ##` (#12921)
`__VA_OPT__` is a C++20 standard, `##` is, apparently, a GNU extension.

MSVC needs /Zc:preprocessor adding for whatever reason.
2024-09-12 07:06:15 +01:00
Peter Nelson 7f5a3eaf83
Codefix: Avoid type-casting function pointer with incorrect type. (#12929)
Make `AutolengthProc` take `int` instead of `void *`, avoiding pointer parameters.
2024-09-12 06:49:45 +01:00
Peter Nelson 9631c68ce6
Codefix: Implement explicit ByteReader::PeekDWord() instead of type-punning pointer. (#12928) 2024-09-12 06:49:20 +01:00
Peter Nelson 6deee5e5e2
Fix: Train curve detection did not take shortened parts into account. (#12910)
Only the number of parts between curves was counted, which with shortened parts would be higher than full length parts and fail to limit as expected.
2024-09-12 06:47:54 +01:00
translators bed2a060ce Update: Translations from eints
english (au): 4 changes by krysclarke
greek: 4 changes by gh658804
russian: 4 changes by Ln-Wolf
finnish: 4 changes by hpiirai
polish: 4 changes by pAter-exe
2024-09-12 04:46:09 +00:00
Peter Nelson 2d51659ed2
Fix d8c36536: \u200B is not allowed in translations. (#12935) 2024-09-10 14:25:36 +01:00
Jonathan G Rennison e477706bf5
Codechange: Add AssignBit function to assign the value of a single bit (#12934)
* Codechange: Add AssignBit function to assign the value of a single bit

* Codechange: Replace various uses of SB with AssignBit

* Codechange: Replace various uses of SB with a constant with SetBit
2024-09-10 08:36:58 -04:00
Tyler Trahan 27efa57b7b
Change: Standardize filter button strings (#12847) 2024-09-10 08:33:06 -04:00
Jonathan G Rennison d0b3e0c47e
Fix: Crash in GetGameStringPtr when there are no GS strings (#12933) 2024-09-10 13:20:38 +01:00
translators d8c36536be Update: Translations from eints
danish: 20 changes by bscargo
2024-09-10 04:44:28 +00:00
Jonathan G Rennison 81b684aa42 Codefix: StationUsesDefaultType always returned false for rail waypoints 2024-09-07 14:58:28 +01:00
Jonathan G Rennison cb2f4f319c Fix: Picker window 'used' filter for rail waypoints
The first two field of struct PickerItem were not populated.
These are required for set operations.
2024-09-07 14:58:28 +01:00
Peter Nelson 29ff3d7b90
Fix: DupSprite did not copy the control_flags field (#12906)
Co-authored-by: Jonathan G Rennison <j.g.rennison@gmail.com>
2024-09-07 14:57:44 +01:00
Jonathan G Rennison 5c243ee8f0
Fix: Road stop availability callback (#12931) 2024-09-07 14:57:04 +01:00
Jonathan G Rennison d5ff6b4156
Fix 8d62a8f0: Road stop variable 6B crashing for road stop preview in GUI (#12930) 2024-09-06 11:14:34 +01:00
translators 92cbf7ae43 Update: Translations from eints
french: 6 changes by glx22
2024-09-06 04:44:06 +00:00
translators c1f8569587 Update: Translations from eints
galician: 1 change by pvillaverde
vietnamese: 1 change by myquartz
french: 1 change by FiglidiGP
2024-09-05 04:44:59 +00:00
translators 1d907611d1 Update: Translations from eints
polish: 1 change by pAter-exe
2024-09-04 04:44:39 +00:00
translators 34c09b3596 Update: Translations from eints
bulgarian: 3 changes by Alexandar83
2024-09-03 04:44:13 +00:00
Rubidium f2a8e18792 Fix 208952f: incorrect truncation in string setting validation 2024-09-02 22:16:26 +02:00
translators b80f205967 Update: Translations from eints
italian: 4 changes by Boh132Boh
bulgarian: 505 changes by Alexandar83
2024-09-02 04:45:08 +00:00
translators ef7ad2606c Update: Translations from eints
bulgarian: 161 changes by Alexandar83
2024-09-01 04:45:11 +00:00
translators 2eb3e77207 Update: Translations from eints
chinese (simplified): 2 changes by WenSimEHRP
bulgarian: 116 changes by Alexandar83
2024-08-31 04:44:42 +00:00
translators bb770b7b56 Update: Translations from eints
norwegian (bokmal): 1 change by eriksorngard
2024-08-29 04:44:23 +00:00
translators 9eaa00cd89 Update: Translations from eints
czech: 1 change by JsSusenka
2024-08-26 04:45:38 +00:00
Peter Nelson cb23651f43 Codechange: Replace BmpBuffer with RandomAccessFile. 2024-08-24 22:11:04 +01:00
Peter Nelson 719763dfcb Codechange: Store start and end position in RandomAccessFile.
This allows callers to do more bounds checking.
2024-08-24 22:11:04 +01:00
Peter Nelson b5264a72ae
Codechange: [NewGRF] Use reference to unique_ptr instead of .get() (#12919)
This allows assignment to reference when creating a new spec instead of setting and refetching.
2024-08-24 22:10:39 +01:00
Jonathan G Rennison 4070cf9968 Codefix: LinkGraphOverlay::dirty was never initialised 2024-08-24 21:06:33 +02:00
translators 3be96c6816 Update: Translations from eints
english (us): 1 change by 2TallTyler
2024-08-24 04:43:57 +00:00
translators d3252315d3 Update: Translations from eints
bulgarian: 28 changes by DeyanVNikolov
spanish: 1 change by SeveralCircles
2024-08-23 04:43:15 +00:00
Peter Nelson 2327b7030d
Codechange: Use std::string to load ini file comments. (#12909)
This removes realloc/free and some funky old manual memory management.
2024-08-21 22:09:51 +01:00
Peter Nelson 4224d08e72 Codechange: Replace malloc/free with vector for TGP heightmap processing. 2024-08-20 22:15:30 +01:00
Peter Nelson c4a638dfe1 Codechange: Replace malloc/free with vector for screenshot buffers. 2024-08-20 22:15:30 +01:00
Peter Nelson 059462814e Codechange: Replace malloc/free with vector when loading heightmap data. 2024-08-20 22:15:30 +01:00
Peter Nelson 9a037fe5ae Codechange: Replace malloc/free with vector when padding sprites. 2024-08-20 22:15:30 +01:00
Peter Nelson 0f0f3d74ca
Codefix: Delete PersistentStorage when a town is deleted. (#12903) 2024-08-19 08:18:01 +01:00
translators e4c04e86c0 Update: Translations from eints
catalan: 1 change by J0anJosep
french: 1 change by ottdfevr
portuguese: 1 change by azulcosta
2024-08-18 04:42:47 +00:00
translators 4e11a9c49e Update: Translations from eints
korean: 2 changes by telk5093
dutch: 1 change by Afoklala
2024-08-17 04:43:01 +00:00
translators 73cb7cd7df Update: Translations from eints
swedish: 1 change by joeax910
chinese (traditional): 1 change by KogentaSan
chinese (simplified): 1 change by WenSimEHRP
2024-08-16 04:42:51 +00:00
translators f14c152c72 Update: Translations from eints
english (au): 1 change by krysclarke
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese (brazilian): 1 change by pasantoro
2024-08-15 04:43:54 +00:00
Peter Nelson ff972ec4ff
Codechange: Store custom station layouts in a map instead of nested vectors. (#12898)
The map key is the platforms and length combined. This simplifies allocation and searching for layouts.
2024-08-14 19:58:56 +01:00
Jonathan G Rennison 39465d7f5c
Codefix: Move saveload of road stop tile data (#12883)
So that road stop tile data is also saved/loaded for road waypoints
2024-08-13 19:49:53 +00:00
Peter Nelson 1ff35cb6f9 Codechange: Don't mark animated tiles dirty if frame is not changed.
If animation is continued but the animation frame has not changed then there is no need to mark the tile for refresh.

Loosely backport from JGRPP.
2024-08-13 20:04:44 +01:00
Peter Nelson 8754846901 Codechange: Allow adding to animated tile list without marking dirty.
This avoids redundant tile refreshes when the caller has already marked a tile dirty, or knows it does not need refreshing.

Loosely backported from JGRPP.
2024-08-13 20:04:44 +01:00
Peter Nelson 79369a886a Codechange: Don't mark tiles dirty when deleting from animated tile list.
The callers of DeleteAnimatedTile already know if the tile needs refreshing, so it is redundant for DeleteAnimatedTile to do so.

Loosely backported from JGRPP.
2024-08-13 20:04:44 +01:00
Jonathan G Rennison 88110e9b2e
Fix: Train unit ID allocation when moving engine to new train at train limit (#12887) 2024-08-13 14:53:10 -04:00
Ivan Pravdin 4cddb3a38d Fix 12860, 2bada59: Timetable does not show vehicles as early
Timetable does not show vehicles as early, only as on time.
Fix this by changing 'VehicleIsAboveLatenessThreshold()' to
accept number of ticks the vehicle is late. This allows to
use it with absolute value.

Codefix #12860: Update comments

Co-authored-by: Tyler Trahan <tyler@tylertrahan.com>
2024-08-13 20:16:57 +02:00
Kaiden Joy 7a698c7f1c Fix #12365: Company Window now displays proper inauguration year and period while in wallclock mode. 2024-08-13 20:13:51 +02:00
Jonathan G Rennison 55ca1c77be
Codefix: Remove dead code for WID_SIL_FILTER_ENTER_BTN in sign window (#12897) 2024-08-13 08:37:31 +01:00
translators bdd16ee97f Update: Translations from eints
bulgarian: 77 changes by Alexandar83
2024-08-13 04:43:19 +00:00
Peter Nelson 367e508984 Codefix: Resolve CodeQL warnings by converting to size_t. 2024-08-12 13:33:58 +01:00
Peter Nelson d0d5c5c400 Codechange: Pass BmpInfo and BmpData as references.
Avoids needing to check for nullptr.
2024-08-12 13:33:58 +01:00
Peter Nelson f829b1d74a Codechange: Replace BmpData palette and bitmap with vectors.
BmpInfo width and height members are now size_t to avoid multiplication warnings.

This avoids manual memory management and allows BmpData to clean up after itself.
2024-08-12 13:33:58 +01:00
translators 0633b94e8f Update: Translations from eints
bulgarian: 76 changes by Alexandar83
2024-08-12 04:43:14 +00:00
translators 574ec4ede4 Update: Translations from eints
chinese (simplified): 33 changes by WenSimEHRP
bulgarian: 195 changes by Alexandar83
2024-08-11 04:43:19 +00:00
translators 0c4dcd562c Update: Translations from eints
vietnamese: 28 changes by KhoiCanDev
bulgarian: 63 changes by Alexandar83
romanian: 10 changes by The-Bober
ukrainian: 147 changes by Quantom2
2024-08-10 04:45:34 +00:00
translators c69e236f9c Update: Translations from eints
bulgarian: 10 changes by Alexandar83
2024-08-09 04:43:18 +00:00
Jonathan G Rennison daa4981922 Fix 77f27e08: Crash due to incorrect use of AirportSpec::GetIndex 2024-08-08 23:05:33 +02:00
translators cfeab64aaf Update: Translations from eints
bulgarian: 131 changes by Alexandar83
romanian: 43 changes by The-Bober
2024-08-08 04:44:03 +00:00
Jonathan G Rennison e1b9a3e2e7 Fix: Excessively fast ships on aqueducts fail to move at correct speed 2024-08-07 20:59:44 +02:00
translators 19cf605765 Update: Translations from eints
chinese (traditional): 1 change by KogentaSan
bulgarian: 329 changes by Alexandar83
romanian: 24 changes by The-Bober
2024-08-07 04:43:44 +00:00
translators 0c7faa4730 Update: Translations from eints
vietnamese: 7 changes by KhoiCanDev
bulgarian: 58 changes by Alexandar83
2024-08-06 04:43:59 +00:00
translators 4c06769ff2 Update: Translations from eints
bulgarian: 127 changes by Alexandar83
2024-08-05 04:42:47 +00:00
translators 6430b5a0ac Update: Translations from eints
chinese (simplified): 31 changes by WenSimEHRP
hungarian: 24 changes by PstasDev
bulgarian: 15 changes by Alexandar83
2024-08-04 04:43:59 +00:00
Peter Nelson a03ddb3ccb Add: [NewGRF] Station property 1E, extended station tile flags.
Properties 11, 14 and 15 to set pylons/nowires/blocked intrinsically only support 8 station tiles.

Add new property to define all three flags for each station tile layout.
2024-08-03 14:57:34 +01:00
Peter Nelson 6e553410d3 Feature: [NewGRF] Allow fixed layout up to 256 tiles per NewGRF rail station.
Allow using up to 256 tile layouts in property 0E or callback 24, which defines the layout to be saved into the map.

This was originally limited to 8, because station graphics above 8 referred to other station types but that was changed in 2007.

1) More efficient than using callback 14, as that needs to be checked every time a station tile is rendered.
2) The layout does not get changed when the station is changed (this may or may not be desirable!)

Using more than 256 layouts still requires callback 14.
2024-08-03 14:57:34 +01:00
Peter Nelson d08636c841 Codechange: Store station layout tiles as std::span.
Using std::span provides both the start and end of the list, which allows validating that the requested layout is in range.
2024-08-03 14:57:34 +01:00
Peter Nelson 70a2ed062d Codechange: Rename CBID_STATION_SPRITE_LAYOUT and CBID_STATION_TILE_LAYOUT.
These callbacks both select rail station tile layouts, the difference is one happens when drawing, the other happens when building. Change the names to make this clearer.
2024-08-03 14:57:34 +01:00
translators ba46128bdd Update: Translations from eints
chinese (traditional): 45 changes by KogentaSan
hungarian: 3 changes by PstasDev
bulgarian: 193 changes by Alexandar83
2024-08-03 04:42:16 +00:00
translators 57afa6002a Update: Translations from eints
chinese (traditional): 15 changes by KogentaSan, 1 change by Bowen951209
bulgarian: 87 changes by Alexandar83
2024-08-02 04:43:42 +00:00
translators 8ba4f8c872 Update: Translations from eints
chinese (traditional): 49 changes by KogentaSan
chinese (simplified): 45 changes by WenSimEHRP
bulgarian: 50 changes by Alexandar83
2024-08-01 04:42:33 +00:00
translators ae2f76e066 Update: Translations from eints
bulgarian: 78 changes by Alexandar83
2024-07-31 04:40:41 +00:00
translators 89fc7e9af6 Update: Translations from eints
chinese (traditional): 8 changes by KogentaSan
bulgarian: 76 changes by Alexandar83
2024-07-30 06:36:33 +00:00
Peter Nelson 3176de3f1d
Codefix: cargo_(dis)allowed for default refit masks are cargo classes, not CargoTypes. (#12884)
Use an alias for CargoClasses to avoid ambiguity.
2024-07-29 20:58:53 +01:00
Patric Stout bec37ee704
Fix: remove the invalid UTF-8 character (U+200B) from the traditional chinese translation (#12882)
Eints should be fixed to not allow this character in the first place,
but this unblocks building the source again.
2024-07-29 09:23:05 +02:00
translators 39688a4ccf Update: Translations from eints
welsh: 55 changes by Ansbaradigeidfran
2024-07-29 04:42:38 +00:00
translators 22e525dafe Update: Translations from eints
chinese (traditional): 140 changes by KogentaSan
2024-07-27 04:42:11 +00:00
Michael Lutz ddf6f33a8a
Change: Path signals now show green on junction-less tracks by default (#12857) 2024-07-26 23:51:49 +02:00
translators 9965cd9151 Update: Translations from eints
chinese (traditional): 46 changes by KogentaSan
2024-07-26 04:44:30 +00:00
translators 44b748a766 Update: Translations from eints
hungarian: 33 changes by peti2000
2024-07-25 04:44:39 +00:00
translators 1a6655bd1b Update: Translations from eints
chinese (traditional): 28 changes by KogentaSan
2024-07-24 04:42:02 +00:00
translators f4e5f1b34d Update: Translations from eints
chinese (traditional): 35 changes by KogentaSan
2024-07-23 04:42:05 +00:00
David Seifert db36e61807
Codefix: Compilation with GCC 15 due to missing CRTP usage (#12876) 2024-07-22 20:42:23 +02:00
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
2024-07-22 04:43:29 +00:00
Ivan Pravdin da00a62d59
Fix #12856, e17c82e: Updating network settings does not invalidate data (#12858) 2024-07-21 16:59:48 -04:00
Peter Nelson 4ee45db51b
Change: [UI] Use scaled sprite sizes and correct matrix padding for content list. (#12875) 2024-07-21 14:01:29 +01:00
Peter Nelson 8b644f6ee6
Codechange: Use GetVisibleRangeIterators to draw script settings. (#12871) 2024-07-21 13:40:54 +01:00
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.
2024-07-21 10:07:50 +01:00
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.
2024-07-21 10:07:50 +01:00
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.
2024-07-21 08:18:09 +01:00
translators 31e2f5a8a0 Update: Translations from eints
swedish: 3 changes by sereneavatar
chinese (traditional): 22 changes by KogentaSan
2024-07-21 04:42:17 +00:00
Peter Nelson 333e8e590e
Codefix: Don't assume 9 is the widest digit (#12870)
Use `SetDParamMaxDigit()` instead of `SetDParam()` with a large number.
2024-07-19 19:00:21 +01:00
translators 97479eb953 Update: Translations from eints
chinese (traditional): 97 changes by KogentaSan
2024-07-19 04:43:26 +00:00
translators 8ed854be58 Update: Translations from eints
chinese (traditional): 28 changes by KogentaSan
2024-07-18 04:43:42 +00:00
Peter Nelson cd739c2c33
Codechange: Replace dropdown's magic 2 with appropriate WidgetDimension. (#12869) 2024-07-17 22:20:38 +01:00
Peter Nelson 7fb3d1a197 Codechange: Use range-for to iterate airport specs to find first available. 2024-07-17 20:57:33 +01:00