diff options
author | tron <tron@openttd.org> | 2006-06-04 16:04:15 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-04 16:04:15 +0000 |
commit | fa740023567157cf18d4dd06880307e7b08b7c77 (patch) | |
tree | 7fafd1f3b5f9dd18acaf05ec2212fd5099f44243 /water_map.h | |
parent | 479317b1eb85ba94491e2fd6d330f38fb25e02ea (diff) | |
download | openttd-fa740023567157cf18d4dd06880307e7b08b7c77.tar.xz |
(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
Diffstat (limited to 'water_map.h')
-rw-r--r-- | water_map.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/water_map.h b/water_map.h index ff8ec21a4..7a232ff74 100644 --- a/water_map.h +++ b/water_map.h @@ -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); |