(svn r3554) Add accessors for the field type and fences of clear tiles

This commit is contained in:
tron
2006-02-05 11:54:25 +00:00
parent 02c4e63fac
commit 6132fcea44
3 changed files with 40 additions and 31 deletions

10
clear.h
View File

@@ -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