Peter Nelson and GitHub
c9cf141813
Codechange: make Track a scoped enum and TrackBits an EnumBitSet ( #15684 )
...
Helper methods to convert Track to TrackBits are removed as they are no longer necessary.
2026-06-08 23:05:51 +01:00
Cyprian Klimaszewski and GitHub
549f357a19
Codechange: Make Foundation a scoped enum. ( #15676 )
2026-06-06 18:51:53 +01:00
Peter Nelson and Peter Nelson
0e951f3528
Codechange: make TransparencyOption a scoped enum
2026-05-31 18:59:51 +01:00
Peter Nelson and GitHub
28cd6a3d33
Codechange: make TrackStatus a struct instead of opaque uint32_t ( #15653 )
2026-05-31 18:09:26 +01:00
Peter Nelson and Peter Nelson
d6783335ca
Codechange: make Direction a scoped enum
2026-05-31 13:11:53 +01:00
Peter Nelson and Peter Nelson
f010c21f1a
Codechange: make DiagDirection a scoped enum
2026-05-31 13:11:53 +01:00
Peter Nelson and GitHub
89201f80fb
Codechange: use InclinedSlope() when drawing catenary ( #15645 )
...
Bit-shifted `Corner` is also a `Slope`, so use existing function instead of a lookup table.
2026-05-30 18:39:27 +01:00
Peter Nelson and Peter Nelson
81bdc44d1a
Codechange: use EnumIndexArray for Direction and DiagDirection indexed arrays
2026-05-30 07:39:21 +01:00
Peter Nelson and Peter Nelson
c74431e734
Codechange: make Axis a scoped enum
2026-05-27 07:49:39 +01:00
Peter Nelson and GitHub
46ee856057
Fix: pylons and no-wires flags were ignored for waypoint tiles ( #15619 )
2026-05-26 21:57:43 +01:00
Peter Nelson and GitHub
2fcb7f2b02
Codechange: use existing helpers to convert to/from Axis ( #15629 )
2026-05-26 19:59:52 +01:00
Peter Nelson and GitHub
3177583cdd
Codechange: make TileSource a scoped enum ( #15613 )
2026-05-19 19:02:21 +01:00
Peter Nelson and Peter Nelson
77403627a8
Codechange: make VehicleType a scoped enum
2026-04-26 07:00:13 +01:00
Peter Nelson and Peter Nelson
8568f1f7bc
Codechange: rename and make RailSpriteType a scoped enum
...
RailTypeSpriteGroup is now renamed to RailSpriteType
2026-04-16 21:01:17 +01:00
Peter Nelson and GitHub
a5a60c8615
Codechange: make RoadTramType a scoped enum, and use EnumBitSet ( #15477 )
2026-04-13 18:15:41 +01:00
Rubidium and rubidium42
55870b4331
Codechange: add missing @param and @return
2026-02-16 04:29:58 +01:00
Cyprian Klimaszewski and rubidium42
97f3e5b70f
Codechange: Make TileType enum an enum class.
2026-01-24 08:34:05 +01:00
Jonathan G Rennison and GitHub
fed2149846
Fix: disable_elrails handling with engines that use both RAIL and ELRL ( #15045 )
2026-01-05 21:23:05 +01:00
Rito12 and rubidium42
859b56a066
Doc: Correct file descriptions to match coding style and doxygen.
2025-12-15 17:31:00 +01:00
Cyprian Klimaszewski and GitHub
99f04f27de
Doc: Update information for receiving a copy of GPL. ( #14869 )
2025-12-07 11:25:08 +00:00
Peter Nelson and Peter Nelson
0f5a4290df
Codechange: Use enum class for RailTileType
2025-11-17 20:46:05 +00:00
Peter Nelson and GitHub
42c9f84d74
Fix 3ac1a2f1e4: Game crash due to invalid vehicle type information. ( #14628 )
...
Use std::variant instead of union for vehicle info.
RailVehicleInfo is now non-POD so using in a union causes undefined behaviour.
2025-09-24 22:44:41 +01:00
Michael Lutz
3ac1a2f1e4
Codechange: Store the rail type of rail engines as a RailTypes bitmask.
2025-09-14 17:11:26 +02:00
Peter Nelson and GitHub
921d83c324
Codechange: Unify structures with sprite sub-tile bounds and simplify bounding boxes. ( #14424 )
...
Lots of different structs contain variations on sub-tile bounds with different naming. Unify into a single struct that can be inherited and passed directly to AddSortableSpriteToDraw.
At the same time, offsets now work more logically: sub-tile bounds now specify the bounding box, and an offset can be applied to the sprite.
2025-07-22 00:02:00 +01:00
Peter Nelson and GitHub
ce83f583bc
Codechange: Use EnumBitSet for VehicleRailFlags. ( #14280 )
2025-05-19 18:56:45 +01:00
Peter Nelson and Peter Nelson
2feba80fd7
Codechange: Codestyle fixes for elrail code.
2025-05-07 20:34:33 +01:00
Peter Nelson and Peter Nelson
4a8dd494ee
Codechange: Don't abbreviate TileLocationGroup type name.
2025-05-07 20:34:33 +01:00
Peter Nelson and Peter Nelson
1ac9f24f38
Codechange: Use (Diag)Directions when drawing catenary.
2025-05-07 17:31:29 +01:00
Peter Nelson and GitHub
936d78fefc
Codefix: Avoid uppercase characters in variable names. ( #13985 )
2025-04-10 07:19:27 +01:00
Peter Nelson and Peter Nelson
47d078c033
Codechange: Use EnumBitSet for RailTypes.
2025-03-25 20:15:48 +00:00
Jonathan G Rennison and rubidium42
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
Patric Stout and GitHub
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Michael Lutz
8b9f59d320
Codechange: Use references for non-optional in/out values of slope functions
2024-03-08 18:08:55 +01:00
frosch and frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
2024-02-02 22:29:28 +01:00
PeterN and GitHub
acd7d3c913
Codechange: Rename *Railtype* to *RailType* for consistency. ( #11287 )
2023-09-11 08:55:12 +00:00
Rubidium and rubidium42
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
2023-07-19 19:30:14 +02:00
Rubidium and rubidium42
e8af8daa68
Codechange: pass "ground vehicle" to GetTileSlopeZ since for tunnel/bridges there are two states
...
Previously it checked the position in non-driving direction to "guess" whether
a ground vehicle was using the function, so on tunnels/bridges it could either
return the Z of the (virtual) ground compared to the Z of the path the vehicle
would take.
2023-04-09 19:00:26 +02:00
Rubidium and rubidium42
755e41de9f
Codechange: make rounding code clearer
...
-O1 already optimizes it to the original hand optimized magic code
2023-01-26 23:47:55 +01:00
PeterN and GitHub
1b1aa682a6
Fix: Don't assume engclass 2 should be elrail. ( #10315 )
...
When disabling/enabling elrail, there is an assumption that `engclass` of 2
means the engine will run on elrail. While this holds for default engines,
NewGRFs can do other things.
To resolve this we store the intended railtype so that toggling elrail will
restore to the correct type.
2023-01-06 00:44:57 +00:00
PeterN and GitHub
dde15a403c
Fix #10257 : Incorrect wire position on sloped bridge heads. ( #10258 )
2022-12-19 20:16:26 +00:00
glx22 and Loïc Guilloux
49b66ea504
Codechange: Remove FOR_EACH_SET_TRACK
2021-07-09 21:36:09 +02:00
rubidium42 and rubidium42
08308d808c
Codechange: use separate pre and post callbacks for int settings
2021-05-29 10:07:30 +02:00
Jonathan G Rennison and Michael Lutz
c0b722ec46
Codechange: Add fast path to catenary drawing in MaskWireBits
...
MaskWireBits always returns its input unchanged if the input
has only 0 or 1 track bits set.
Having only 0 or 1 track bits sets (i.e. non junction tiles)
is by far the most common case.
Examining the state of neighbouring tiles and the subsequent
masking logic is relatively expensive and can be omitted in this case.
2021-03-10 23:28:10 +01:00
Charles Pigott and GitHub
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
glx and Niels Martin Hansen
d8a1be48cd
Codechange: Replace vehicle related FOR_ALL with range-based for loops
2019-12-21 20:13:03 +01:00
glx and Niels Martin Hansen
1f6b3a37f9
Codechange: Replace FOR_ALL_ENGINES with range-based for loops
2019-12-21 20:13:03 +01:00
glx and Niels Martin Hansen
3a14cea068
Codechange: Replace FOR_ALL_COMPANIES with range-based for loops
2019-12-21 20:13:03 +01:00
S. D. Cloudt and Charles Pigott
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Henry Wilson and Michael Lutz
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
peter1138
6d0f8ec7b9
(svn r27812) -Fix: Road tunnel/bridge heads have no trackbits wrt catenary drawing
...
Road tunnels and bridges do not have any rail, so do not treat them
as if they had when drawing a catenary. (cirdan)
2017-03-20 17:57:24 +00:00