Peter Nelson
9cf47e69d6
Fix bb8a0c7641
: Skip control codes when sorting strings. ( #13035 )
...
Now that SkipGarbage doesn't skip all multi-byte utf-8 characters, string control codes are not skipped either. This gave unintended sorting when NewGRF names start with colour codes.
Make SkipGarbage UTF-8 aware so that it is able to skip some unicode ranges as well.
2024-10-27 15:49:09 +00:00
translators
233ee16c44
Update: Translations from eints
...
bulgarian: 18 changes by Alexandar83
2024-10-27 04:47:27 +00:00
Peter Nelson
bb8a0c7641
Fix: SkipGarbage() skipped all multi-byte utf-8 characters. ( #13032 )
...
`char` is signed so `str[0] < '0'` applies to all characters higher than 127.
2024-10-26 21:01:33 +01:00
Peter Nelson
1191efa581
Fix #12914 : Fix use of invalidated pointer in viewport drawer. ( #12918 )
...
Use index of last child instead of pointer to update next_child element.
In case there is no child sprite yet, the most recent parent sprite's first_child is updated instead.
2024-10-26 15:24:41 +01:00
Peter Nelson
4f9c10d35f
Codechange: Simplify storage of WaterTileType in map. ( #13030 )
2024-10-26 10:17:44 +01:00
Peter Nelson
e50c1774fc
Codechange: Remove some unnecessary local variables.
2024-10-25 19:01:39 +01:00
Peter Nelson
c39554a210
Codechange: Simplify selection between pathfinder functions.
2024-10-25 19:01:39 +01:00
Peter Nelson
1403a55e5d
Codechange: Use uppercase naming for YAPF cost constant.
2024-10-25 19:01:39 +01:00
Peter Nelson
a171939ec3
Codechange: Remove m_
prefix from pathfinders.
2024-10-25 19:01:39 +01:00
Peter Nelson
a496e9397c
Codechange: Prefer member-initialization.
2024-10-25 19:01:39 +01:00
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