(svn r5101) Add a function to convert an axis and a flag for north/south into a DiagDirection. Use it for bridge ramps and ship depots

This commit is contained in:
tron
2006-06-04 16:04:15 +00:00
parent f1be69c47b
commit 3cb526d0d9
5 changed files with 23 additions and 19 deletions

View File

@@ -63,6 +63,11 @@ static inline Axis GetShipDepotAxis(TileIndex t)
return (Axis)GB(_m[t].m5, 1, 1);
}
static inline DiagDirection GetShipDepotDirection(TileIndex t)
{
return XYNSToDiagDir(GetShipDepotAxis(t), GB(_m[t].m5, 0, 1));
}
static inline DiagDirection GetLockDirection(TileIndex t)
{
return (DiagDirection)GB(_m[t].m5, 0, 2);