diff options
author | celestar <celestar@openttd.org> | 2006-04-03 10:28:16 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2006-04-03 10:28:16 +0000 |
commit | 7d3827cf3599dfa495816c8f98ad165c9f43b35f (patch) | |
tree | a5004b0cf3b35caa3b90655e873a852b58088bdd /water_map.h | |
parent | cc87f682b9cd9c25ee58cec1b63792e4ef786aa9 (diff) | |
download | openttd-7d3827cf3599dfa495816c8f98ad165c9f43b35f.tar.xz |
(svn r4250) -Codechange: Further use of map accessors for water tiles
Diffstat (limited to 'water_map.h')
-rw-r--r-- | water_map.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/water_map.h b/water_map.h index b83d590dc..d5dcdd5f1 100644 --- a/water_map.h +++ b/water_map.h @@ -38,6 +38,11 @@ static inline bool IsWater(TileIndex t) return GetWaterTileType(t) == WATER_CLEAR; } +static inline bool IsCoast(TileIndex t) +{ + return GetWaterTileType(t) == WATER_COAST; +} + static inline bool IsClearWaterTile(TileIndex t) { return IsTileType(t, MP_WATER) && IsWater(t) && GetTileSlope(t, NULL) == 0; @@ -53,6 +58,11 @@ static inline TileIndex IsShipDepot(TileIndex t) return IS_INT_INSIDE(_m[t].m5, DEPOT_NORTH, DEPOT_END); } +static inline Axis GetShipDepotAxis(TileIndex t) +{ + return (Axis)GB(_m[t].m5, 1, 1); +} + static inline DiagDirection GetLockDirection(TileIndex t) { return (DiagDirection)GB(_m[t].m5, 0, 2); |