diff options
author | tron <tron@openttd.org> | 2006-02-05 11:54:25 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-02-05 11:54:25 +0000 |
commit | 6132fcea4439d418dffde7908a5bbb128d170dba (patch) | |
tree | c7a09d7266b5f144783c8a0eda92f86dcaa8610b /clear.h | |
parent | 02c4e63fac1dd9e017d5d308527054bcd66f6f06 (diff) | |
download | openttd-6132fcea4439d418dffde7908a5bbb128d170dba.tar.xz |
(svn r3554) Add accessors for the field type and fences of clear tiles
Diffstat (limited to 'clear.h')
-rw-r--r-- | clear.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |