summaryrefslogtreecommitdiff
path: root/rail_map.h
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-04-12 09:12:33 +0000
committercelestar <celestar@openttd.org>2006-04-12 09:12:33 +0000
commit5ae9a03a1f1afcb417a7805b5ccda9a56b47c5d1 (patch)
treef6d8110857bac96dc34a7a8e67ab9016f83d910d /rail_map.h
parente79c36bf8c91fb53d092b7d4b94b5ed591b44710 (diff)
downloadopenttd-5ae9a03a1f1afcb417a7805b5ccda9a56b47c5d1.tar.xz
(svn r4377) -Add and make use of a function that finds out whether a signal is an entry or and exit signal to a presignal block (as combos act as both)
Diffstat (limited to 'rail_map.h')
-rw-r--r--rail_map.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/rail_map.h b/rail_map.h
index 850a56c54..da72d0250 100644
--- a/rail_map.h
+++ b/rail_map.h
@@ -164,6 +164,16 @@ static inline void SetSignalType(TileIndex t, SignalType s)
SB(_m[t].m4, 0, 2, s);
}
+static inline bool IsPresignalEntry(TileIndex t)
+{
+ return GetSignalType(t) == SIGTYPE_ENTRY || GetSignalType(t) == SIGTYPE_COMBO;
+}
+
+static inline bool IsPresignalExit(TileIndex t)
+{
+ return GetSignalType(t) == SIGTYPE_EXIT || GetSignalType(t) == SIGTYPE_COMBO;
+}
+
typedef enum SignalVariant {
SIG_ELECTRIC = 0,