diff options
author | tron <tron@openttd.org> | 2006-02-24 19:56:24 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-02-24 19:56:24 +0000 |
commit | f6d48379d81925b45ea897cb2b05f65ac58e8a70 (patch) | |
tree | 37affcfcf1a07542085a0de7a63ee252119bb0fb /landscape.c | |
parent | f369dcef51e0cac4eacc4dcf9ec645ebfe5c5fd3 (diff) | |
download | openttd-f6d48379d81925b45ea897cb2b05f65ac58e8a70.tar.xz |
(svn r3665) Add a function to turn a tile into a clear tile
Diffstat (limited to 'landscape.c')
-rw-r--r-- | landscape.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/landscape.c b/landscape.c index b96c98491..8c01aa524 100644 --- a/landscape.c +++ b/landscape.c @@ -239,12 +239,7 @@ void DrawFoundation(TileInfo *ti, uint f) void DoClearSquare(TileIndex tile) { - SetTileType(tile, MP_CLEAR); - SetTileOwner(tile, OWNER_NONE); - _m[tile].m2 = 0; - _m[tile].m3 = 0; - _m[tile].m4 = 0; - SetClearGroundDensity(tile, CL_GRASS, _generating_world ? 3 : 0); + MakeClear(tile, CL_GRASS, _generating_world ? 3 : 0); MarkTileDirtyByTile(tile); } @@ -438,12 +433,7 @@ void InitializeLandscape(void) map_size = MapSize(); for (i = 0; i < map_size; i++) { - _m[i].type_height = MP_CLEAR << 4; - _m[i].m1 = OWNER_NONE; - _m[i].m2 = 0; - _m[i].m3 = 0; - _m[i].m4 = 0; - _m[i].m5 = 3; + MakeClear(i, CL_GRASS, 3); _m[i].extra = 0; } |