(svn r7607) -Codechange: remove direct map accesses for snow/desert on tunnels and bridges.

This commit is contained in:
rubidium
2006-12-29 09:10:44 +00:00
parent 9cb975f7f0
commit 0d459f909c
3 changed files with 40 additions and 6 deletions

View File

@@ -81,6 +81,19 @@ static inline TransportType GetBridgeTransportType(TileIndex t)
}
static inline bool HasBridgeSnowOrDesert(TileIndex t)
{
assert(IsBridgeTile(t));
return HASBIT(_m[t].m4, 7);
}
static inline void SetBridgeSnowOrDesert(TileIndex t, bool snow_or_desert)
{
assert(IsBridgeTile(t));
SB(_m[t].m4, 7, 1, snow_or_desert);
}
/**
* Finds the end of a bridge in the specified direction starting at a middle tile
*/