(svn r7607) -Codechange: remove direct map accesses for snow/desert on tunnels and bridges.
This commit is contained in:
12
tunnel_map.h
12
tunnel_map.h
@@ -35,6 +35,18 @@ static inline TransportType GetTunnelTransportType(TileIndex t)
|
||||
return (TransportType)GB(_m[t].m5, 2, 2);
|
||||
}
|
||||
|
||||
static inline bool HasTunnelSnowOrDesert(TileIndex t)
|
||||
{
|
||||
assert(IsTunnelTile(t));
|
||||
return HASBIT(_m[t].m4, 7);
|
||||
}
|
||||
|
||||
static inline void SetTunnelSnowOrDesert(TileIndex t, bool snow_or_desert)
|
||||
{
|
||||
assert(IsTunnelTile(t));
|
||||
SB(_m[t].m4, 7, 1, snow_or_desert);
|
||||
}
|
||||
|
||||
|
||||
TileIndex GetOtherTunnelEnd(TileIndex);
|
||||
bool IsTunnelInWay(TileIndex, uint z);
|
||||
|
||||
Reference in New Issue
Block a user