2006-03-24 13:00:24 +01:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
#include "town.h"
|
|
|
|
|
2006-03-30 17:06:49 +02:00
|
|
|
static inline int GetHouseType(TileIndex t)
|
|
|
|
{
|
|
|
|
assert(IsTileType(t, MP_HOUSE));
|
|
|
|
return _m[t].m4;
|
|
|
|
}
|
2006-03-24 13:00:24 +01:00
|
|
|
|
|
|
|
static inline uint GetTownIndex(TileIndex t)
|
|
|
|
{
|
2006-03-30 11:29:01 +02:00
|
|
|
assert(IsTileType(t, MP_HOUSE) || IsTileType(t, MP_STREET)); // XXX incomplete
|
2006-03-24 13:00:24 +01:00
|
|
|
return _m[t].m2;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline Town* GetTownByTile(TileIndex t)
|
|
|
|
{
|
|
|
|
return GetTown(GetTownIndex(t));
|
|
|
|
}
|