diff options
author | celestar <celestar@openttd.org> | 2006-04-12 09:12:33 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2006-04-12 09:12:33 +0000 |
commit | 5ae9a03a1f1afcb417a7805b5ccda9a56b47c5d1 (patch) | |
tree | f6d8110857bac96dc34a7a8e67ab9016f83d910d /rail_map.h | |
parent | e79c36bf8c91fb53d092b7d4b94b5ed591b44710 (diff) | |
download | openttd-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.h | 10 |
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, |