(svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile

This commit is contained in:
tron
2006-03-24 12:00:24 +00:00
parent bb27e9abb3
commit 88d27219b4
4 changed files with 27 additions and 10 deletions

14
town_map.h Normal file
View 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));
}