(svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile

This commit is contained in:
tron
2006-03-24 08:55:08 +00:00
parent 8ce4bdfad9
commit f6285a659c
11 changed files with 74 additions and 46 deletions

14
station_map.h Normal file
View File

@@ -0,0 +1,14 @@
/* $Id$ */
#include "station.h"
static inline StationID GetStationIndex(TileIndex t)
{
return (StationID)_m[t].m2;
}
static inline Station* GetStationByTile(TileIndex t)
{
return GetStation(GetStationIndex(t));
}