(svn r3904) Move GetBridgePiece() and GetBridgeType() to bridge_map.h and make the only place which still extracted that info diretly use the wrapper

This commit is contained in:
tron
2006-03-16 10:00:50 +00:00
parent a3c45635a7
commit 483c8f7018
2 changed files with 22 additions and 20 deletions

View File

@@ -21,6 +21,27 @@ static inline bool IsBridgeMiddle(TileIndex t)
}
/**
* Determines which piece of a bridge is contained in the current tile
* @param tile The tile to analyze
* @return the piece
*/
static inline uint GetBridgePiece(TileIndex tile)
{
return GB(_m[tile].m2, 0, 4);
}
/**
* Determines the type of bridge on a tile
* @param tile The tile to analyze
* @return The bridge type
*/
static inline uint GetBridgeType(TileIndex tile)
{
return GB(_m[tile].m2, 4, 4);
}
/**
* Get the direction pointing onto the bridge