Commit Graph

30040 Commits

Author SHA1 Message Date
Peter Nelson
a6f412c615 Codechange: Add this-> to YAPF. 2024-10-25 19:01:39 +01:00
Peter Nelson
5b73654f94 Codechange: Add includes to YAPF .hpp files. 2024-10-25 19:01:39 +01:00
Peter Nelson
009e57ee03 Codechange: Use member initializer list. 2024-10-25 19:01:39 +01:00
Rubidium
ea6aa4653a Codechange: replace magic numbers with enumeration 2024-10-25 18:37:11 +02:00
Rubidium
4a4c77ff04 Codechange: use functions described in documentation, instead of related other functions 2024-10-25 18:37:11 +02:00
Jonathan G Rennison
8ed983b3cd Codechange: Re-order load update for SLV_139
It is no longer required to be performed before the first phase
of vehicle updates
2024-10-25 17:05:59 +02:00
Jonathan G Rennison
f19829d029 Fix #12831: Delay vehicle cache init to after map upgrades in load
Split AfterLoadVehicles into two functions.
Vehicle cache init and other functionality requiring an upgraded and
valid map is now performed later in the load process.
2024-10-25 17:05:59 +02:00
Rubidium
dfb74e25f7 Codechange: remove parameter which value can always be deduced 2024-10-24 22:02:50 +02:00
SamuXarick
d5a13fb9f4
Codechange: Use TileOffsByAxis(...) in more places (#13026) 2024-10-24 15:58:15 -04:00
Rubidium
c9819f8957 Codechange: split GetRoadDir as bays have DiagDir and drive throughs have Axis 2024-10-24 20:40:32 +02:00
Da-W1nn3r
d6aa09f96a Fix #12973: Don't exclude high score after using sandbox 2024-10-24 08:38:16 +02:00
Rubidium
ce641af6a9 Codechange: use StationGfx over RoadStopDir + optional offset for drive through stop 2024-10-23 18:19:32 +02:00
Rubidium
38c9eb76a0 Codechange: add and use TileOffsByAxis(...) over TileOffsByDir(DiagDirToAxis(...)) 2024-10-23 18:19:17 +02:00
Peter Nelson
7a71df2952
Codechange: Use fmt::format to convert value to binary string representation. (#13016)
Avoids manually iterating bits into an array.
2024-10-22 13:59:08 +01:00
translators
51ffb2a1a3 Update: Translations from eints
arabic (egypt): 3 changes by Alaadel
2024-10-22 04:47:27 +00:00
Peter Nelson
01807fa753 Change: Use Markdown for changelog.
Includes minor changes to how version changes are limited for display.
2024-10-22 00:34:16 +01:00
Peter Nelson
e98407973f Fix #12993: Replace known-bugs text with markdown version.
This allows a little bit better formatting/display in game.

(No attempt to check if these are still valid known-bugs...)
2024-10-22 00:34:16 +01:00
Peter Nelson
e3bfe2b668
Fix: Don't invalidate water regions on the other side of the map. (#13012)
When invalidating water regions with a tile at the very edge of the map, the region on the opposite side of the map would also be invalidated.
2024-10-22 00:33:29 +01:00
Peter Nelson
3eb7901ad9
Codechange: Use template parameter of SetBitIterator instead of casting later. (#13015)
This removes some manual casting.
2024-10-21 17:54:54 +01:00
Jonathan G Rennison
6ca9ddcffa Codefix: [Win32] String handling in OTTDStringCompare, Win32StringContains
Avoid truncation if CompareStringEx is missing
Fix handling of zero length inputs
2024-10-21 17:34:30 +02:00
Jonathan G Rennison
d7a2efd623 Codefix: [Win32] Truncated stack trace symbols were not null-terminated
SymGetSymFromAddr64/IMAGEHLP_SYMBOL64 do not null-terminate
symbols with lengths >= the name buffer size
2024-10-21 17:34:03 +02:00
Rubidium
18e8a34081 Codechange: replace "magic" trick with simpler straight forward code 2024-10-20 15:49:32 +02:00
Rubidium
392bcf5c9a Codechange: simplify ToTileIndexDiff by just calling TileDiffXY 2024-10-20 15:49:32 +02:00
Rubidium
1998e94ae7 Codechange: create the TileIndexDiff of the whole translation we want to execute 2024-10-20 15:49:32 +02:00
Rubidium
a6b7593a52 Codechange: use TileDiffXY(0, 0) over magic 0 2024-10-20 15:49:32 +02:00
Rubidium
3b0fcf442f Codefix: use actual type instead of int for TileIndexDiff 2024-10-20 15:49:32 +02:00
Jonathan G Rennison
3105f6391c
Fix #13002: Crash due to use of dangling types in picker GUI used/saved lists (#13008) 2024-10-20 09:37:17 +01:00
translators
582f37dc15 Update: Translations from eints
luxembourgish: 84 changes by phreeze83
2024-10-20 04:46:58 +00:00
Rubidium
4a359a4aed Fix 8ca417b: drying of (edge) tiles should consider MP_VOID tiles 2024-10-19 23:32:34 +02:00
Peter Nelson
147ac56f11
Fix: ScriptTile::PlantTreeRectangle does not check that the end tile is in bounds. (#13004)
If the starting tile is near the edge of the map, the width and height could overflow the map boundary.

In some cases this might result in a different area being planted than expected.
2024-10-19 20:52:02 +01:00
Rubidium
9d2e07b1f6 Codechange: simplify terraform recursion logic 2024-10-19 15:40:36 +02:00
Rubidium
8ca417baa9 Codefix: do not wrap-around the map when flooding tiles 2024-10-19 09:00:21 +02:00
translators
5e8da0479a Update: Translations from eints
luxembourgish: 23 changes by phreeze83
2024-10-19 04:45:07 +00:00
Jonathan G Rennison
ffcc594ea3 Codefix: Incorrect documentation comments in StringBuilder 2024-10-18 22:29:28 +02:00
Rubidium
b074a4d3ce Codefix: remove duplicate typedef 2024-10-18 16:43:17 +02:00
translators
35d37d4768 Update: Translations from eints
norwegian (nynorsk): 2 changes by Abaksle
luxembourgish: 33 changes by phreeze83
2024-10-18 04:47:11 +00:00
Peter Nelson
2fda7d8297
Codechange: Simplify Station::train_station iteration when marking tiles dirty. (#13003) 2024-10-17 23:01:04 +01:00
translators
ae4a723889 Update: Translations from eints
norwegian (nynorsk): 8 changes by Abaksle
2024-10-17 04:47:13 +00:00
Peter Nelson
bacd3e83c6 Codechange: Use ScriptObjectRef to handle Event reference counting.
This removes manual reference counting.
2024-10-16 21:52:00 +01:00
Peter Nelson
8360fab18a Codechange: Remove CCountedPtr.
This was originally generic and used by YAPF, but now it is used only by script objects.

CCountedPtr provided much more (untested) functionality than used.

ScriptObjectRef already exists for script objects and does the same thing, so use this instead.
2024-10-16 21:52:00 +01:00
Koen Bussemaker
d8029b1d84 Fix: CHashTableT's Clear function doesn't set number of items back to zero 2024-10-16 22:36:26 +02:00
Peter Nelson
d5b57a56f4
Codechange: Use std::unique_ptr for link graph schedule handlers. (#12988)
This removes manual memory management.
2024-10-15 02:11:06 +01:00
Rubidium
4a6ac52d8c Cleanup: remove some unused #defines 2024-10-14 21:37:00 +02:00
translators
c2d58bb88f Update: Translations from eints
vietnamese: 43 changes by KhoiCanDev
italian: 4 changes by Boh132Boh
2024-10-14 04:46:49 +00:00
glx22
45aef2c0b9 Change: [CI] Temporarily force ubuntu-24.04 runner for linux workflow
While ubuntu-latest is transitioning from ubuntu-22.04 to ubuntu-24.04, the one we actually run on is random.
But our workflow can work only with 22.04 (using clang15) or 24.04 (using clang) so just force 24.04 for now.
2024-10-14 00:53:47 +02:00
glx22
1a1cd2d495 Cleanup: [CI] Remove 'os' input for windows workflow 2024-10-14 00:53:47 +02:00
glx22
99e8534d76 Change: [CI] Use xxx-latest runners for all workflows 2024-10-14 00:53:47 +02:00
translators
79c8eac2ee Update: Translations from eints
vietnamese: 106 changes by KhoiCanDev
polish: 1 change by translators
2024-10-13 04:46:13 +00:00
translators
c813b2b42d Update: Translations from eints
swedish: 19 changes by joeax910
french: 6 changes by ottdfevr
2024-10-10 04:45:29 +00:00
Peter Nelson
446db2c826
Codechange: Remove redundant NewsStringData data. (#12983)
Since SetDParamStr() always owns a copy of the string, there is no need to make another copy of it to keep it around while the news item exists.

This also fixes a leak in `CmdIndustrySetProduction` as the allocated data wasn't passed to AddIndustryNewsItem.
2024-10-08 19:48:55 +01:00