OpenTTD
slope_type.h
Go to the documentation of this file.
1 /* $Id: slope_type.h 23595 2011-12-19 17:48:04Z rubidium $ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8  */
9 
16 #ifndef SLOPE_TYPE_H
17 #define SLOPE_TYPE_H
18 
19 #include "core/enum_type.hpp"
20 
24 enum Corner {
25  CORNER_W = 0,
26  CORNER_S = 1,
27  CORNER_E = 2,
28  CORNER_N = 3,
29  CORNER_END,
30  CORNER_INVALID = 0xFF
31 };
32 
33 
50 enum Slope {
51  SLOPE_FLAT = 0x00,
52  SLOPE_W = 0x01,
53  SLOPE_S = 0x02,
54  SLOPE_E = 0x04,
55  SLOPE_N = 0x08,
56  SLOPE_STEEP = 0x10,
72 
73  SLOPE_HALFTILE = 0x20,
75  SLOPE_HALFTILE_W = SLOPE_HALFTILE | (CORNER_W << 6),
76  SLOPE_HALFTILE_S = SLOPE_HALFTILE | (CORNER_S << 6),
77  SLOPE_HALFTILE_E = SLOPE_HALFTILE | (CORNER_E << 6),
78  SLOPE_HALFTILE_N = SLOPE_HALFTILE | (CORNER_N << 6),
79 };
81 
82 
86 #define M(x) (1 << (x))
87 
89 #undef M
90 
91 
95 enum Foundation {
101 
102  /* Halftile foundations */
108 
109  /* Special anti-zig-zag foundations for single horizontal/vertical track */
114 
116 };
117 
118 #endif /* SLOPE_TYPE_H */