mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 12:06:41 +00:00
Codechange: make TrackStatus a struct instead of opaque uint32_t (#15653)
This commit is contained in:
@@ -1853,11 +1853,11 @@ static void TileLoop_TunnelBridge(TileIndex tile)
|
||||
static TrackStatus GetTileTrackStatus_TunnelBridge(TileIndex tile, TransportType mode, RoadTramType sub_mode, DiagDirection side)
|
||||
{
|
||||
TransportType transport_type = GetTunnelBridgeTransportType(tile);
|
||||
if (transport_type != mode || (transport_type == TRANSPORT_ROAD && !HasTileRoadType(tile, (RoadTramType)sub_mode))) return 0;
|
||||
if (transport_type != mode || (transport_type == TRANSPORT_ROAD && !HasTileRoadType(tile, (RoadTramType)sub_mode))) return {};
|
||||
|
||||
DiagDirection dir = GetTunnelBridgeDirection(tile);
|
||||
if (side != DiagDirection::Invalid && side != ReverseDiagDir(dir)) return 0;
|
||||
return CombineTrackStatus(TrackBitsToTrackdirBits(DiagDirToDiagTrackBits(dir)), TRACKDIR_BIT_NONE);
|
||||
if (side != DiagDirection::Invalid && side != ReverseDiagDir(dir)) return {};
|
||||
return {TrackBitsToTrackdirBits(DiagDirToDiagTrackBits(dir)), TRACKDIR_BIT_NONE};
|
||||
}
|
||||
|
||||
/** @copydoc ChangeTileOwnerProc */
|
||||
|
||||
Reference in New Issue
Block a user