From 89c145b14e8fda25c3533d1d876c10323792c97e Mon Sep 17 00:00:00 2001 From: celestar Date: Mon, 3 Apr 2006 10:50:54 +0000 Subject: (svn r4252) -Codechange: Make more use of map accessors. water_cmd is now map access free --- water_map.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'water_map.h') 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) { -- cgit v1.2.3-54-g00ecf