From 6132fcea4439d418dffde7908a5bbb128d170dba Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 5 Feb 2006 11:54:25 +0000 Subject: (svn r3554) Add accessors for the field type and fences of clear tiles --- clear.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'clear.h') diff --git a/clear.h b/clear.h index 4eb1c5f80..856fb6e7b 100644 --- a/clear.h +++ b/clear.h @@ -33,4 +33,14 @@ static inline void SetClearGroundDensity(TileIndex t, ClearGround type, uint den _m[t].m5 = 0 << 5 | type << 2 | density; } +static inline uint GetFieldType(TileIndex t) { return GB(_m[t].m3, 0, 4); } +static inline void SetFieldType(TileIndex t, uint f) { SB(_m[t].m3, 0, 4, f); } + +/* Is used by tree tiles, too */ +static inline uint GetFenceSE(TileIndex t) { return GB(_m[t].m4, 2, 3); } +static inline void SetFenceSE(TileIndex t, uint h) { SB(_m[t].m4, 2, 3, h); } + +static inline uint GetFenceSW(TileIndex t) { return GB(_m[t].m4, 5, 3); } +static inline void SetFenceSW(TileIndex t, uint h) { SB(_m[t].m4, 5, 3, h); } + #endif -- cgit v1.2.3-70-g09d2