diff options
author | celestar <celestar@openttd.org> | 2006-04-03 10:50:54 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2006-04-03 10:50:54 +0000 |
commit | 89c145b14e8fda25c3533d1d876c10323792c97e (patch) | |
tree | 9f385964513f7c7e72c5652e0333bc322b79055d /water_map.h | |
parent | b4d9a37acc0d9c2c3a2e622152742ae3c8fc54cf (diff) | |
download | openttd-89c145b14e8fda25c3533d1d876c10323792c97e.tar.xz |
(svn r4252) -Codechange: Make more use of map accessors. water_cmd is now map access free
Diffstat (limited to 'water_map.h')
-rw-r--r-- | water_map.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/water_map.h b/water_map.h index 9d63b0b5e..b0c04cc59 100644 --- a/water_map.h +++ b/water_map.h @@ -68,6 +68,12 @@ static inline DiagDirection GetLockDirection(TileIndex t) return (DiagDirection)GB(_m[t].m5, 0, 2); } +static inline byte GetSection(TileIndex t) +{ + assert(GetWaterTileType(t) == WATER_LOCK || GetWaterTileType(t) == WATER_DEPOT); + return GB(_m[t].m5, 0, 4); +} + static inline void MakeWater(TileIndex t) { |