(svn r2408) Introduce SetTileOwner() and use it

This commit is contained in:
tron
2005-06-04 12:13:24 +00:00
parent 0c4ecbe9ec
commit 74541c1dcc
11 changed files with 37 additions and 29 deletions

10
tile.h
View File

@@ -88,6 +88,16 @@ static inline Owner GetTileOwner(TileIndex tile)
return _map_owner[tile];
}
static inline void SetTileOwner(TileIndex tile, Owner owner)
{
assert(tile < MapSize());
assert(!IsTileType(tile, MP_HOUSE));
assert(!IsTileType(tile, MP_VOID));
assert(!IsTileType(tile, MP_INDUSTRY));
_map_owner[tile] = owner;
}
static inline bool IsTileOwner(TileIndex tile, Owner owner)
{
return GetTileOwner(tile) == owner;