summaryrefslogtreecommitdiff
path: root/src/rail.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-03-25 12:10:13 +0000
committerpeter1138 <peter1138@openttd.org>2008-03-25 12:10:13 +0000
commit6184676ec76e0512f51e98ec06d6f3b152411025 (patch)
tree392b944dd605681e9d28644848a5e1dc2b253c6e /src/rail.h
parent237524f960f0ec9b5dab54ce4f1706107a711c47 (diff)
downloadopenttd-6184676ec76e0512f51e98ec06d6f3b152411025.tar.xz
(svn r12410) -Codechange: abstract out the test for catenary on electric rails
Diffstat (limited to 'src/rail.h')
-rw-r--r--src/rail.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/rail.h b/src/rail.h
index eb31bb4ab..53b3a1337 100644
--- a/src/rail.h
+++ b/src/rail.h
@@ -183,6 +183,17 @@ void DrawDefaultWaypointSprite(int x, int y, RailType railtype);
void *EnsureNoTrainOnTrackProc(Vehicle *v, void *data);
int TicksToLeaveDepot(const Vehicle *v);
+
+/**
+ * Test if a rail type has catenary
+ * @param rt Rail type to test
+ */
+static inline bool HasCatenary(RailType rt)
+{
+ return rt == RAILTYPE_ELECTRIC;
+}
+
+
/**
* Draws overhead wires and pylons for electric railways.
* @param ti The TileInfo struct of the tile being drawn