(svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile
This commit is contained in:
14
station_map.h
Normal file
14
station_map.h
Normal 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));
|
||||
}
|
||||
Reference in New Issue
Block a user