summaryrefslogtreecommitdiff
path: root/rail.h
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2005-06-17 17:11:05 +0000
committermatthijs <matthijs@openttd.org>2005-06-17 17:11:05 +0000
commitd90840f7f881a9071a2dc7dbeb2f47772310d69a (patch)
tree56a92b31750c18868de08322a3bb9aee27660ba9 /rail.h
parent7e9e233b37667cce7af6749111655c44b53776e6 (diff)
downloadopenttd-d90840f7f881a9071a2dc7dbeb2f47772310d69a.tar.xz
(svn r2456) * Prettyfied npf.c using enums and wrappers from rail.h.
* Moved GetTileRailType() from npf.c to rail.[ch].
Diffstat (limited to 'rail.h')
-rw-r--r--rail.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/rail.h b/rail.h
index 93e3ed982..5edfa16e5 100644
--- a/rail.h
+++ b/rail.h
@@ -434,4 +434,13 @@ static inline bool HasSemaphores(TileIndex tile, Track track)
return (_map3_hi[tile] & SIG_SEMAPHORE_MASK);
}
+/**
+ * Return the rail type of tile, or INVALID_RAILTYPE if this is no rail tile.
+ * Note that there is no check if the given trackdir is actually present on
+ * the tile!
+ * The given trackdir is used when there are (could be) multiple rail types on
+ * one tile.
+ */
+RailType GetTileRailType(TileIndex tile, byte trackdir);
+
#endif // RAIL_H