Mercurial > hg > openttd
changeset 3075:3373dd908bf5 draft
(svn r3664) Add a function to turn a tile into a void tile
author | tron <tron@openttd.org> |
---|---|
date | Fri, 24 Feb 2006 19:52:26 +0000 |
parents | 6813dad3cfd7 |
children | 12e175a0b8e7 |
files | landscape.c openttd.c void.h |
diffstat | 3 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/landscape.c +++ b/landscape.c @@ -14,6 +14,7 @@ #include "command.h" #include "vehicle.h" #include "variables.h" +#include "void.h" extern const TileTypeProcs _tile_type_clear_procs, @@ -447,10 +448,8 @@ } // create void tiles at the border - for (i = 0; i < MapMaxY(); ++i) - SetTileType(i * MapSizeX() + MapMaxX(), MP_VOID); - for (i = 0; i < MapSizeX(); ++i) - SetTileType(MapSizeX() * MapMaxY() + i, MP_VOID); + for (i = 0; i < MapMaxY(); ++i) MakeVoid(i * MapSizeX() + MapMaxX()); + for (i = 0; i < MapSizeX(); ++i) MakeVoid(MapSizeX() * MapMaxY() + i); } void ConvertGroundTilesIntoWaterTiles(void)
--- a/openttd.c +++ b/openttd.c @@ -9,6 +9,7 @@ #include "strings.h" #include "map.h" #include "tile.h" +#include "void.h" #define VARDEF #include "openttd.h" @@ -1059,10 +1060,8 @@ { uint i; - for (i = 0; i < MapMaxY(); ++i) - SetTileType(i * MapSizeX() + MapMaxX(), MP_VOID); - for (i = 0; i < MapSizeX(); ++i) - SetTileType(MapSizeX() * MapMaxY() + i, MP_VOID); + for (i = 0; i < MapMaxY(); ++i) MakeVoid(i * MapSizeX() + MapMaxX()); + for (i = 0; i < MapSizeX(); ++i) MakeVoid(MapSizeX() * MapMaxY() + i); } // since savegame version 6.0 each sign has an "owner", signs without owner (from old games are set to 255)