Codechange: make TrackStatus a struct instead of opaque uint32_t (#15653)

This commit is contained in:
Peter Nelson
2026-05-31 18:09:26 +01:00
committed by GitHub
parent a687f02e87
commit 28cd6a3d33
26 changed files with 70 additions and 117 deletions
+2 -2
View File
@@ -79,7 +79,7 @@ void SetRailStationPlatformReservation(TileIndex start, DiagDirection dir, bool
*/
bool TryReserveRailTrack(TileIndex tile, Track t, bool trigger_stations)
{
assert(HasTrack(TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, RoadTramType::Invalid)), t));
assert(HasTrack(TrackdirBitsToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, RoadTramType::Invalid).trackdirs), t));
if (_settings_client.gui.show_track_reservation) {
/* show the reserved rail if needed */
@@ -143,7 +143,7 @@ bool TryReserveRailTrack(TileIndex tile, Track t, bool trigger_stations)
*/
void UnreserveRailTrack(TileIndex tile, Track t)
{
assert(HasTrack(TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, RoadTramType::Invalid)), t));
assert(HasTrack(TrackdirBitsToTrackBits(GetTileTrackStatus(tile, TRANSPORT_RAIL, RoadTramType::Invalid).trackdirs), t));
if (_settings_client.gui.show_track_reservation) {
if (IsBridgeTile(tile)) {