diff options
author | tron <tron@openttd.org> | 2006-03-22 08:48:50 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-22 08:48:50 +0000 |
commit | 9428ab372f45fd8072a9996533f369241b79014b (patch) | |
tree | b0c8be05e2dd14ba1d565d5c647cd7ec4e38dfb9 /clear_map.h | |
parent | 3b16ae365b34ee821b4dc4381c284a227f4dec3e (diff) | |
download | openttd-9428ab372f45fd8072a9996533f369241b79014b.tar.xz |
(svn r4007) Add a function to make a farm field tile
Diffstat (limited to 'clear_map.h')
-rw-r--r-- | clear_map.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/clear_map.h b/clear_map.h index 69941f209..b383e3639 100644 --- a/clear_map.h +++ b/clear_map.h @@ -52,7 +52,18 @@ static inline void MakeClear(TileIndex t, ClearGround g, uint density) _m[t].m2 = 0; _m[t].m3 = 0; _m[t].m4 = 0 << 5 | 0 << 2; - _m[t].m5 = 0 << 5 | g << 2 | density; + SetClearGroundDensity(t, g, density); +} + + +static inline void MakeField(TileIndex t, uint field_type) +{ + SetTileType(t, MP_CLEAR); + SetTileOwner(t, OWNER_NONE); + _m[t].m2 = 0; + _m[t].m3 = field_type; + _m[t].m4 = 0 << 5 | 0 << 2; + SetClearGroundDensity(t, CL_FIELDS, 3); } #endif |