diff options
author | alberth <alberth@openttd.org> | 2010-07-09 12:14:02 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-07-09 12:14:02 +0000 |
commit | 82fc340a0a608eb1edf8c079b4585cf0880733df (patch) | |
tree | e197cefb0566f9017e59dbe5c802b9f2301776aa /src/slope_type.h | |
parent | 72bfda4634fa599479c7fcd8026642362c58ef58 (diff) | |
download | openttd-82fc340a0a608eb1edf8c079b4585cf0880733df.tar.xz |
(svn r20097) -Codechange: Share constant bitset of safe level crossing slopes.
Diffstat (limited to 'src/slope_type.h')
-rw-r--r-- | src/slope_type.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/slope_type.h b/src/slope_type.h index 0098eedf6..5eb7a7a20 100644 --- a/src/slope_type.h +++ b/src/slope_type.h @@ -79,6 +79,11 @@ enum Slope { }; DECLARE_ENUM_AS_BIT_SET(Slope) +#define M(x) (1 << (x)) +/** Constant bitset with safe slopes for building a level crossing. */ +static const uint32 VALID_LEVEL_CROSSING_SLOPES = M(SLOPE_SEN) | M(SLOPE_ENW) | M(SLOPE_NWS) | M(SLOPE_NS) | M(SLOPE_WSE) | M(SLOPE_EW) | M(SLOPE_FLAT); +#undef M + /** * Enumeration for Foundations. |