(svn r3889) Change a part of the bridge drawing code to make it more comprehensible and add the needed accessors

This commit is contained in:
tron
2006-03-15 17:27:15 +00:00
parent dcf6c85bf2
commit f262ae6c8b
3 changed files with 32 additions and 23 deletions

View File

@@ -28,6 +28,23 @@ static inline DiagDirection GetBridgeRampDirection(TileIndex t)
}
static inline bool IsClearUnderBridge(TileIndex t)
{
return GB(_m[t].m5, 3, 3) == 0;
}
static inline bool IsTransportUnderBridge(TileIndex t)
{
return HASBIT(_m[t].m5, 5);
}
static inline TransportType GetTransportTypeUnderBridge(TileIndex t)
{
return (TransportType)GB(_m[t].m5, 3, 2);
}
/**
* Starting at one bridge end finds the other bridge end
*/