Add: INR currency (#8136)
[openttd-github.git] / src / table / elrail_data.h
blob12132848b8282a75231217ab88e5ad1e89246093
1 /*
2 * This file is part of OpenTTD.
3 * 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.
4 * 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.
5 * 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/>.
6 */
8 /**
9 * @file elrail_data.h Stores all the data for overhead wire and pylon drawing.
10 * @see elrail.c
13 #ifndef ELRAIL_DATA_H
14 #define ELRAIL_DATA_H
16 /**
17 * Tile Location group.
18 * This defines whether the X and or Y coordinate of a tile is even
20 enum TLG {
21 XEVEN_YEVEN = 0,
22 XEVEN_YODD = 1,
23 XODD_YEVEN = 2,
24 XODD_YODD = 3,
25 TLG_END
28 /**
29 * When determining the pylon configuration on the edge, two tiles are taken
30 * into account: the tile being drawn itself (the home tile, the one in
31 * ti->tile), and the neighbouring tile
33 enum TileSource {
34 TS_HOME = 0,
35 TS_NEIGHBOUR = 1,
37 TS_END
40 static const uint NUM_TRACKS_AT_PCP = 6;
42 /** Which PPPs are possible at all on a given PCP */
43 static const byte AllowedPPPonPCP[DIAGDIR_END] = {
44 1 << DIR_N | 1 << DIR_E | 1 << DIR_SE | 1 << DIR_S | 1 << DIR_W | 1 << DIR_NW,
45 1 << DIR_N | 1 << DIR_NE | 1 << DIR_E | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W,
46 1 << DIR_N | 1 << DIR_E | 1 << DIR_SE | 1 << DIR_S | 1 << DIR_W | 1 << DIR_NW,
47 1 << DIR_N | 1 << DIR_NE | 1 << DIR_E | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W,
50 /**
51 * Which of the PPPs are inside the tile. For the two PPPs on the tile border
52 * the following system is used: if you rotate the PCP so that it is in the
53 * north, the eastern PPP belongs to the tile.
55 static const byte OwnedPPPonPCP[DIAGDIR_END] = {
56 1 << DIR_SE | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W,
57 1 << DIR_N | 1 << DIR_SW | 1 << DIR_W | 1 << DIR_NW,
58 1 << DIR_N | 1 << DIR_NE | 1 << DIR_E | 1 << DIR_NW,
59 1 << DIR_NE | 1 << DIR_E | 1 << DIR_SE | 1 << DIR_S
62 /** Maps a track bit onto two PCP positions */
63 static const DiagDirection PCPpositions[TRACK_END][2] = {
64 {DIAGDIR_NE, DIAGDIR_SW}, // X
65 {DIAGDIR_SE, DIAGDIR_NW}, // Y
66 {DIAGDIR_NW, DIAGDIR_NE}, // UPPER
67 {DIAGDIR_SE, DIAGDIR_SW}, // LOWER
68 {DIAGDIR_SW, DIAGDIR_NW}, // LEFT
69 {DIAGDIR_NE, DIAGDIR_SE}, // RIGHT
72 #define PCP_NOT_ON_TRACK 0xFF
73 /**
74 * Preferred points of each trackbit. Those are the ones perpendicular to the
75 * track, plus the point in extension of the track (to mark end-of-track). PCPs
76 * which are not on either end of the track are fully preferred.
77 * @see PCPpositions
79 static const byte PreferredPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = {
80 { // X
81 1 << DIR_NE | 1 << DIR_SE | 1 << DIR_NW, // NE
82 PCP_NOT_ON_TRACK, // SE
83 1 << DIR_SE | 1 << DIR_SW | 1 << DIR_NW, // SW
84 PCP_NOT_ON_TRACK // NE
85 }, { // Y
86 PCP_NOT_ON_TRACK,
87 1 << DIR_NE | 1 << DIR_SE | 1 << DIR_SW,
88 PCP_NOT_ON_TRACK,
89 1 << DIR_SW | 1 << DIR_NW | 1 << DIR_NE
90 }, { // UPPER
91 1 << DIR_E | 1 << DIR_N | 1 << DIR_S,
92 PCP_NOT_ON_TRACK,
93 PCP_NOT_ON_TRACK,
94 1 << DIR_W | 1 << DIR_N | 1 << DIR_S
95 }, { // LOWER
96 PCP_NOT_ON_TRACK,
97 1 << DIR_E | 1 << DIR_N | 1 << DIR_S,
98 1 << DIR_W | 1 << DIR_N | 1 << DIR_S,
99 PCP_NOT_ON_TRACK
100 }, { // LEFT
101 PCP_NOT_ON_TRACK,
102 PCP_NOT_ON_TRACK,
103 1 << DIR_S | 1 << DIR_E | 1 << DIR_W,
104 1 << DIR_N | 1 << DIR_E | 1 << DIR_W
105 }, { // RIGHT
106 1 << DIR_N | 1 << DIR_E | 1 << DIR_W,
107 1 << DIR_S | 1 << DIR_E | 1 << DIR_W,
108 PCP_NOT_ON_TRACK,
109 PCP_NOT_ON_TRACK
112 #undef PCP_NOT_ON_TRACK
115 #define NUM_IGNORE_GROUPS 3
116 #define IGNORE_NONE 0xFF
118 * In case we have a straight line, we place pylon only every two tiles,
119 * so there are certain tiles which we ignore. A straight line is found if
120 * we have exactly two PPPs.
122 static const byte IgnoredPCP[NUM_IGNORE_GROUPS][TLG_END][DIAGDIR_END] = {
123 { // Ignore group 1, X and Y tracks
124 { // X even, Y even
125 IGNORE_NONE,
126 1 << DIR_NE | 1 << DIR_SW,
127 1 << DIR_NW | 1 << DIR_SE,
128 IGNORE_NONE
129 }, { // X even, Y odd
130 IGNORE_NONE,
131 IGNORE_NONE,
132 1 << DIR_NW | 1 << DIR_SE,
133 1 << DIR_NE | 1 << DIR_SW
134 }, { // X odd, Y even
135 1 << DIR_NW | 1 << DIR_SE,
136 1 << DIR_NE | 1 << DIR_SW,
137 IGNORE_NONE,
138 IGNORE_NONE
139 }, { // X odd, Y odd
140 1 << DIR_NW | 1 << DIR_SE,
141 IGNORE_NONE,
142 IGNORE_NONE,
143 1 << DIR_NE | 1 << DIR_SW
146 { // Ignore group 2, LEFT and RIGHT tracks
148 1 << DIR_E | 1 << DIR_W,
149 IGNORE_NONE,
150 IGNORE_NONE,
151 1 << DIR_E | 1 << DIR_W
152 }, {
153 IGNORE_NONE,
154 1 << DIR_E | 1 << DIR_W,
155 1 << DIR_E | 1 << DIR_W,
156 IGNORE_NONE
157 }, {
158 IGNORE_NONE,
159 1 << DIR_E | 1 << DIR_W,
160 1 << DIR_E | 1 << DIR_W,
161 IGNORE_NONE
162 }, {
163 1 << DIR_E | 1 << DIR_W,
164 IGNORE_NONE,
165 IGNORE_NONE,
166 1 << DIR_E | 1 << DIR_W
169 { // Ignore group 3, UPPER and LOWER tracks
171 1 << DIR_N | 1 << DIR_S,
172 1 << DIR_N | 1 << DIR_S,
173 IGNORE_NONE,
174 IGNORE_NONE
175 }, {
176 IGNORE_NONE,
177 IGNORE_NONE,
178 1 << DIR_N | 1 << DIR_S,
179 1 << DIR_N | 1 << DIR_S
180 }, {
181 IGNORE_NONE,
182 IGNORE_NONE,
183 1 << DIR_N | 1 << DIR_S ,
184 1 << DIR_N | 1 << DIR_S
185 }, {
186 1 << DIR_N | 1 << DIR_S,
187 1 << DIR_N | 1 << DIR_S,
188 IGNORE_NONE,
189 IGNORE_NONE
194 #undef NO_IGNORE
196 /** Which pylons can definitely NOT be built */
197 static const byte DisallowedPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] = {
198 {1 << DIR_SW | 1 << DIR_NE, 0, 1 << DIR_SW | 1 << DIR_NE, 0 }, // X
199 {0, 1 << DIR_NW | 1 << DIR_SE, 0, 1 << DIR_NW | 1 << DIR_SE}, // Y
200 {1 << DIR_W | 1 << DIR_E, 0, 0, 1 << DIR_W | 1 << DIR_E }, // UPPER
201 {0, 1 << DIR_W | 1 << DIR_E, 1 << DIR_W | 1 << DIR_E, 0 }, // LOWER
202 {0, 0, 1 << DIR_S | 1 << DIR_N, 1 << DIR_N | 1 << DIR_S }, // LEFT
203 {1 << DIR_S | 1 << DIR_N, 1 << DIR_S | 1 << DIR_N, 0, 0, }, // RIGHT
206 /* This array stores which track bits can meet at a tile edge */
207 static const Track TracksAtPCP[DIAGDIR_END][NUM_TRACKS_AT_PCP] = {
208 {TRACK_X, TRACK_X, TRACK_UPPER, TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT},
209 {TRACK_Y, TRACK_Y, TRACK_UPPER, TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT},
210 {TRACK_X, TRACK_X, TRACK_UPPER, TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT},
211 {TRACK_Y, TRACK_Y, TRACK_UPPER, TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT},
214 /* takes each of the 6 track bits from the array above and
215 * assigns it to the home tile or neighbour tile */
216 static const TileSource TrackSourceTile[DIAGDIR_END][NUM_TRACKS_AT_PCP] = {
217 {TS_HOME, TS_NEIGHBOUR, TS_HOME , TS_NEIGHBOUR, TS_NEIGHBOUR, TS_HOME },
218 {TS_HOME, TS_NEIGHBOUR, TS_NEIGHBOUR, TS_HOME , TS_NEIGHBOUR, TS_HOME },
219 {TS_HOME, TS_NEIGHBOUR, TS_NEIGHBOUR, TS_HOME , TS_HOME , TS_NEIGHBOUR},
220 {TS_HOME, TS_NEIGHBOUR, TS_HOME , TS_NEIGHBOUR, TS_HOME , TS_NEIGHBOUR},
223 /* Several PPPs maybe exist, here they are sorted in order of preference. */
224 static const Direction PPPorder[DIAGDIR_END][TLG_END][DIR_END] = { // X - Y
225 { // PCP 0
226 {DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_N, DIR_E, DIR_S, DIR_W}, // evn - evn
227 {DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_S, DIR_W, DIR_N, DIR_E}, // evn - odd
228 {DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_S, DIR_W, DIR_N, DIR_E}, // odd - evn
229 {DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_N, DIR_E, DIR_S, DIR_W}, // odd - odd
230 }, {// PCP 1
231 {DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_S, DIR_E, DIR_N, DIR_W}, // evn - evn
232 {DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_N, DIR_W, DIR_S, DIR_E}, // evn - odd
233 {DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_N, DIR_W, DIR_S, DIR_E}, // odd - evn
234 {DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_S, DIR_E, DIR_N, DIR_W}, // odd - odd
235 }, {// PCP 2
236 {DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_S, DIR_W, DIR_N, DIR_E}, // evn - evn
237 {DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_N, DIR_E, DIR_S, DIR_W}, // evn - odd
238 {DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_N, DIR_E, DIR_S, DIR_W}, // odd - evn
239 {DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_S, DIR_W, DIR_N, DIR_E}, // odd - odd
240 }, {// PCP 3
241 {DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_N, DIR_W, DIR_S, DIR_E}, // evn - evn
242 {DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_S, DIR_E, DIR_N, DIR_W}, // evn - odd
243 {DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_S, DIR_E, DIR_N, DIR_W}, // odd - evn
244 {DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_N, DIR_W, DIR_S, DIR_E}, // odd - odd
247 /* Geometric placement of the PCP relative to the tile origin */
248 static const int8 x_pcp_offsets[DIAGDIR_END] = {0, 8, 16, 8};
249 static const int8 y_pcp_offsets[DIAGDIR_END] = {8, 16, 8, 0};
250 /* Geometric placement of the PPP relative to the PCP*/
251 static const int8 x_ppp_offsets[DIR_END] = {-2, -4, -2, 0, 2, 4, 2, 0};
252 static const int8 y_ppp_offsets[DIR_END] = {-2, 0, 2, 4, 2, 0, -2, -4};
255 * Offset for pylon sprites from the base pylon sprite.
257 enum PylonSpriteOffset {
258 PSO_Y_NE,
259 PSO_Y_SW,
260 PSO_X_NW,
261 PSO_X_SE,
262 PSO_EW_N,
263 PSO_EW_S,
264 PSO_NS_W,
265 PSO_NS_E,
268 /* The type of pylon to draw at each PPP */
269 static const uint8 pylon_sprites[] = {
270 PSO_EW_N,
271 PSO_Y_NE,
272 PSO_NS_E,
273 PSO_X_SE,
274 PSO_EW_S,
275 PSO_Y_SW,
276 PSO_NS_W,
277 PSO_X_NW,
281 * Offset for wire sprites from the base wire sprite.
283 enum WireSpriteOffset {
284 WSO_X_SHORT,
285 WSO_Y_SHORT,
286 WSO_EW_SHORT,
287 WSO_NS_SHORT,
288 WSO_X_SHORT_DOWN,
289 WSO_Y_SHORT_UP,
290 WSO_X_SHORT_UP,
291 WSO_Y_SHORT_DOWN,
293 WSO_X_SW,
294 WSO_Y_SE,
295 WSO_EW_E,
296 WSO_NS_S,
297 WSO_X_SW_DOWN,
298 WSO_Y_SE_UP,
299 WSO_X_SW_UP,
300 WSO_Y_SE_DOWN,
302 WSO_X_NE,
303 WSO_Y_NW,
304 WSO_EW_W,
305 WSO_NS_N,
306 WSO_X_NE_DOWN,
307 WSO_Y_NW_UP,
308 WSO_X_NE_UP,
309 WSO_Y_NW_DOWN,
311 WSO_ENTRANCE_SW,
312 WSO_ENTRANCE_NW,
313 WSO_ENTRANCE_NE,
314 WSO_ENTRANCE_SE,
317 struct SortableSpriteStruct {
318 uint8 image_offset;
319 int8 x_offset;
320 int8 y_offset;
321 int8 x_size;
322 int8 y_size;
323 int8 z_size;
324 int8 z_offset;
327 /** Distance between wire and rail */
328 static const uint ELRAIL_ELEVATION = 10;
329 /** Wires that a draw one level higher than the north corner. */
330 static const uint ELRAIL_ELEVRAISE = ELRAIL_ELEVATION + TILE_HEIGHT;
332 static const SortableSpriteStruct RailCatenarySpriteData[] = {
333 /* X direction
334 * Flat tiles:
335 * Wires */
336 { WSO_X_SW, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! 0: Wire in X direction, pylon on the SW end only
337 { WSO_X_NE, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! 1: Wire in X direction, pylon on the NE end
338 { WSO_X_SHORT, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! 2: Wire in X direction, pylon on both ends
340 /* "up" tiles
341 * Wires */
342 { WSO_X_SW_UP, 0, 7, 15, 8, 1, ELRAIL_ELEVRAISE }, //! 3: Wire in X pitch up, pylon on the SW end only
343 { WSO_X_NE_UP, 0, 7, 15, 8, 1, ELRAIL_ELEVRAISE }, //! 4: Wire in X pitch up, pylon on the NE end
344 { WSO_X_SHORT_UP, 0, 7, 15, 8, 1, ELRAIL_ELEVRAISE }, //! 5: Wire in X pitch up, pylon on both ends
346 /* "down" tiles
347 * Wires */
348 { WSO_X_SW_DOWN, 0, 7, 15, 8, 1, ELRAIL_ELEVATION }, //! 6: Wire in X pitch down, pylon on the SW end
349 { WSO_X_NE_DOWN, 0, 7, 15, 8, 1, ELRAIL_ELEVATION }, //! 7: Wire in X pitch down, pylon on the NE end
350 { WSO_X_SHORT_DOWN, 0, 7, 15, 8, 1, ELRAIL_ELEVATION }, //! 8: Wire in X pitch down, pylon on both ends
353 /* Y direction
354 * Flat tiles:
355 * Wires */
356 { WSO_Y_SE, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //! 9: Wire in Y direction, pylon on the SE end only
357 { WSO_Y_NW, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //!10: Wire in Y direction, pylon on the NW end
358 { WSO_Y_SHORT, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //!11: Wire in Y direction, pylon on both ends
360 /* "up" tiles
361 * Wires */
362 { WSO_Y_SE_UP, 7, 0, 8, 15, 1, ELRAIL_ELEVRAISE }, //!12: Wire in Y pitch up, pylon on the SE end only
363 { WSO_Y_NW_UP, 7, 0, 8, 15, 1, ELRAIL_ELEVRAISE }, //!13: Wire in Y pitch up, pylon on the NW end
364 { WSO_Y_SHORT_UP, 7, 0, 8, 15, 1, ELRAIL_ELEVRAISE }, //!14: Wire in Y pitch up, pylon on both ends
366 /* "down" tiles
367 * Wires */
368 { WSO_Y_SE_DOWN, 7, 0, 8, 15, 1, ELRAIL_ELEVATION }, //!15: Wire in Y pitch down, pylon on the SE end
369 { WSO_Y_NW_DOWN, 7, 0, 8, 15, 1, ELRAIL_ELEVATION }, //!16: Wire in Y pitch down, pylon on the NW end
370 { WSO_Y_SHORT_DOWN, 7, 0, 8, 15, 1, ELRAIL_ELEVATION }, //!17: Wire in Y pitch down, pylon on both ends
372 /* NS Direction */
373 { WSO_NS_SHORT, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!18: LEFT trackbit wire, pylon on both ends
374 { WSO_NS_SHORT, 0, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!19: RIGHT trackbit wire, pylon on both ends
376 { WSO_NS_N, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!20: LEFT trackbit wire, pylon on N end
377 { WSO_NS_N, 0, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!21: RIGHT trackbit wire, pylon on N end
379 { WSO_NS_S, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!22: LEFT trackbit wire, pylon on S end
380 { WSO_NS_S, 0, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!23: RIGHT trackbit wire, pylon on S end
382 /* EW Direction */
383 { WSO_EW_SHORT, 7, 0, 1, 1, 1, ELRAIL_ELEVATION }, //!24: UPPER trackbit wire, pylon on both ends
384 { WSO_EW_SHORT, 15, 8, 3, 3, 1, ELRAIL_ELEVATION }, //!25: LOWER trackbit wire, pylon on both ends
386 { WSO_EW_W, 7, 0, 1, 1, 1, ELRAIL_ELEVATION }, //!28: UPPER trackbit wire, pylon on both ends
387 { WSO_EW_W, 15, 8, 3, 3, 1, ELRAIL_ELEVATION }, //!29: LOWER trackbit wire, pylon on both ends
389 { WSO_EW_E, 7, 0, 1, 1, 1, ELRAIL_ELEVATION }, //!32: UPPER trackbit wire, pylon on both ends
390 { WSO_EW_E, 15, 8, 3, 3, 1, ELRAIL_ELEVATION } //!33: LOWER trackbit wire, pylon on both ends
393 static const SortableSpriteStruct RailCatenarySpriteData_Depot[] = {
394 { WSO_ENTRANCE_NE, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for NE depot exit
395 { WSO_ENTRANCE_SE, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //! Wire for SE depot exit
396 { WSO_ENTRANCE_SW, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for SW depot exit
397 { WSO_ENTRANCE_NW, 7, 0, 1, 15, 1, ELRAIL_ELEVATION } //! Wire for NW depot exit
400 static const SortableSpriteStruct RailCatenarySpriteData_Tunnel[] = {
401 { WSO_ENTRANCE_SW, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for NE tunnel (SW facing exit)
402 { WSO_ENTRANCE_NW, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, //! Wire for SE tunnel (NW facing exit)
403 { WSO_ENTRANCE_NE, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, //! Wire for SW tunnel (NE facing exit)
404 { WSO_ENTRANCE_SE, 7, 0, 1, 15, 1, ELRAIL_ELEVATION } //! Wire for NW tunnel (SE facing exit)
409 * Refers to a certain element of the catenary.
410 * Identifiers for Wires:
411 * <ol><li>Direction of the wire</li>
412 * <li>Slope of the tile for diagonals, placement inside the track for horiz/vertical pieces</li>
413 * <li>Place where a pylon should be</li></ol>
414 * Identifiers for Pylons:
415 * <ol><li>Direction of the wire</li>
416 * <li>Slope of the tile</li>
417 * <li>Position of the Pylon relative to the track</li>
418 * <li>Position of the Pylon inside the tile</li></ol>
420 enum RailCatenarySprite {
421 WIRE_X_FLAT_SW,
422 WIRE_X_FLAT_NE,
423 WIRE_X_FLAT_BOTH,
425 WIRE_X_UP_SW,
426 WIRE_X_UP_NE,
427 WIRE_X_UP_BOTH,
429 WIRE_X_DOWN_SW,
430 WIRE_X_DOWN_NE,
431 WIRE_X_DOWN_BOTH,
433 WIRE_Y_FLAT_SE,
434 WIRE_Y_FLAT_NW,
435 WIRE_Y_FLAT_BOTH,
437 WIRE_Y_UP_SE,
438 WIRE_Y_UP_NW,
439 WIRE_Y_UP_BOTH,
441 WIRE_Y_DOWN_SE,
442 WIRE_Y_DOWN_NW,
443 WIRE_Y_DOWN_BOTH,
445 WIRE_NS_W_BOTH,
446 WIRE_NS_E_BOTH,
448 WIRE_NS_W_N,
449 WIRE_NS_E_N,
451 WIRE_NS_W_S,
452 WIRE_NS_E_S,
454 WIRE_EW_N_BOTH,
455 WIRE_EW_S_BOTH,
457 WIRE_EW_N_W,
458 WIRE_EW_S_W,
460 WIRE_EW_N_E,
461 WIRE_EW_S_E,
463 INVALID_CATENARY = 0xFF
466 /* Selects a Wire (with white and grey ends) depending on whether:
467 * a) none (should never happen)
468 * b) the first
469 * c) the second
470 * d) both
471 * PCP exists.*/
472 static const RailCatenarySprite Wires[5][TRACK_END][4] = {
473 { // Tileh == 0
474 {INVALID_CATENARY, WIRE_X_FLAT_NE, WIRE_X_FLAT_SW, WIRE_X_FLAT_BOTH},
475 {INVALID_CATENARY, WIRE_Y_FLAT_SE, WIRE_Y_FLAT_NW, WIRE_Y_FLAT_BOTH},
476 {INVALID_CATENARY, WIRE_EW_N_W, WIRE_EW_N_E, WIRE_EW_N_BOTH},
477 {INVALID_CATENARY, WIRE_EW_S_E, WIRE_EW_S_W, WIRE_EW_S_BOTH},
478 {INVALID_CATENARY, WIRE_NS_W_S, WIRE_NS_W_N, WIRE_NS_W_BOTH},
479 {INVALID_CATENARY, WIRE_NS_E_N, WIRE_NS_E_S, WIRE_NS_E_BOTH},
480 }, { // Tileh == 3
481 {INVALID_CATENARY, WIRE_X_UP_NE, WIRE_X_UP_SW, WIRE_X_UP_BOTH},
482 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
483 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
484 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
485 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
486 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
487 }, { // Tileh == 6
488 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
489 {INVALID_CATENARY, WIRE_Y_UP_SE, WIRE_Y_UP_NW, WIRE_Y_UP_BOTH},
490 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
491 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
492 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
493 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
494 }, { // Tileh == 9
495 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
496 {INVALID_CATENARY, WIRE_Y_DOWN_SE, WIRE_Y_DOWN_NW, WIRE_Y_DOWN_BOTH},
497 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
498 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
499 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
500 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
501 }, { // Tileh == 12
502 {INVALID_CATENARY, WIRE_X_DOWN_NE, WIRE_X_DOWN_SW, WIRE_X_DOWN_BOTH},
503 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
504 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
505 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
506 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
507 {INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
511 #endif /* ELRAIL_DATA_H */