(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile
This commit is contained in:
14
town_map.h
Normal file
14
town_map.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/* $Id$ */
|
||||
|
||||
#include "town.h"
|
||||
|
||||
|
||||
static inline uint GetTownIndex(TileIndex t)
|
||||
{
|
||||
return _m[t].m2;
|
||||
}
|
||||
|
||||
static inline Town* GetTownByTile(TileIndex t)
|
||||
{
|
||||
return GetTown(GetTownIndex(t));
|
||||
}
|
||||
Reference in New Issue
Block a user