summaryrefslogtreecommitdiff
path: root/station.h
diff options
context:
space:
mode:
Diffstat (limited to 'station.h')
-rw-r--r--station.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/station.h b/station.h
index 7b72ab29d..45f88fa9c 100644
--- a/station.h
+++ b/station.h
@@ -320,6 +320,11 @@ static inline bool IsBuoyTile(TileIndex tile)
return IsTileType(tile, MP_STATION) && _m[tile].m5 == 0x52;
}
+static inline bool TileBelongsToRailStation(const Station *st, TileIndex tile)
+{
+ return IsTileType(tile, MP_STATION) && _m[tile].m2 == st->index && _m[tile].m5 < 8;
+}
+
/* Get's the direction the station exit points towards. Ie, returns 0 for a
* station with the exit NE. */
static inline byte GetRoadStationDir(TileIndex tile)