mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-30 19:08:00 +00:00
21 lines
365 B
C
21 lines
365 B
C
/* $Id$ */
|
|
|
|
#include "town.h"
|
|
|
|
static inline int GetHouseType(TileIndex t)
|
|
{
|
|
assert(IsTileType(t, MP_HOUSE));
|
|
return _m[t].m4;
|
|
}
|
|
|
|
static inline uint GetTownIndex(TileIndex t)
|
|
{
|
|
assert(IsTileType(t, MP_HOUSE) || IsTileType(t, MP_STREET)); // XXX incomplete
|
|
return _m[t].m2;
|
|
}
|
|
|
|
static inline Town* GetTownByTile(TileIndex t)
|
|
{
|
|
return GetTown(GetTownIndex(t));
|
|
}
|