Fix 03cc0d6: Mark level crossings dirty when removing road from them, not from bridge...
[openttd-github.git] / src / table / railtypes.h
blob95285de5f0424b6794f99c6d53805f99d8c11ae2
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 railtypes.h
10 * All the railtype-specific information is stored here.
13 #ifndef RAILTYPES_H
14 #define RAILTYPES_H
16 /**
17 * Global Railtype definition
19 static const RailtypeInfo _original_railtypes[] = {
20 /** Railway */
21 { // Main Sprites
22 { SPR_RAIL_TRACK_Y, SPR_RAIL_TRACK_N_S, SPR_RAIL_TRACK_BASE, SPR_RAIL_SINGLE_X, SPR_RAIL_SINGLE_Y,
23 SPR_RAIL_SINGLE_NORTH, SPR_RAIL_SINGLE_SOUTH, SPR_RAIL_SINGLE_EAST, SPR_RAIL_SINGLE_WEST,
24 SPR_TRACKS_FOR_SLOPES_RAIL_BASE,
25 SPR_CROSSING_OFF_X_RAIL,
26 SPR_TUNNEL_ENTRY_REAR_RAIL
29 /* GUI sprites */
30 { 0x4E3, 0x4E4, 0x4E5, 0x4E6,
31 SPR_IMG_AUTORAIL,
32 SPR_IMG_DEPOT_RAIL,
33 SPR_IMG_TUNNEL_RAIL,
34 SPR_IMG_CONVERT_RAIL,
39 SPR_CURSOR_NS_TRACK,
40 SPR_CURSOR_SWNE_TRACK,
41 SPR_CURSOR_EW_TRACK,
42 SPR_CURSOR_NWSE_TRACK,
43 SPR_CURSOR_AUTORAIL,
44 SPR_CURSOR_RAIL_DEPOT,
45 SPR_CURSOR_TUNNEL_RAIL,
46 SPR_CURSOR_CONVERT_RAIL
49 /* strings */
51 STR_RAIL_NAME_RAILROAD,
52 STR_RAIL_TOOLBAR_RAILROAD_CONSTRUCTION_CAPTION,
53 STR_RAIL_MENU_RAILROAD_CONSTRUCTION,
54 STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION,
55 STR_REPLACE_RAIL_VEHICLES,
56 STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE,
59 /* Offset of snow tiles */
60 SPR_RAIL_SNOW_OFFSET,
62 /* Powered railtypes */
63 RAILTYPES_RAIL | RAILTYPES_ELECTRIC,
65 /* Compatible railtypes */
66 RAILTYPES_RAIL | RAILTYPES_ELECTRIC,
68 /* bridge offset */
71 /* fallback_railtype */
74 /* curve speed advantage (multiplier) */
77 /* flags */
78 RTFB_NONE,
80 /* cost multiplier */
83 /* maintenance cost multiplier */
86 /* acceleration type */
89 /* max speed */
92 /* rail type label */
93 'RAIL',
95 /* alternate labels */
96 RailTypeLabelList(),
98 /* map colour */
99 0x0A,
101 /* introduction date */
102 INVALID_DATE,
104 /* railtypes required for this to be introduced */
105 RAILTYPES_NONE,
107 /* introduction rail types */
108 RAILTYPES_RAIL,
110 /* sort order */
111 0 << 4 | 7,
113 { nullptr },
114 { nullptr },
117 /** Electrified railway */
118 { // Main Sprites
119 { SPR_RAIL_TRACK_Y, SPR_RAIL_TRACK_N_S, SPR_RAIL_TRACK_BASE, SPR_RAIL_SINGLE_X, SPR_RAIL_SINGLE_Y,
120 SPR_RAIL_SINGLE_NORTH, SPR_RAIL_SINGLE_SOUTH, SPR_RAIL_SINGLE_EAST, SPR_RAIL_SINGLE_WEST,
121 SPR_TRACKS_FOR_SLOPES_RAIL_BASE,
122 SPR_CROSSING_OFF_X_RAIL,
123 SPR_TUNNEL_ENTRY_REAR_RAIL
126 /* GUI sprites */
128 SPR_BUILD_NS_ELRAIL,
129 SPR_BUILD_X_ELRAIL,
130 SPR_BUILD_EW_ELRAIL,
131 SPR_BUILD_Y_ELRAIL,
132 SPR_IMG_AUTOELRAIL,
133 SPR_IMG_DEPOT_ELRAIL,
134 SPR_BUILD_TUNNEL_ELRAIL,
135 SPR_IMG_CONVERT_ELRAIL,
140 SPR_CURSOR_NS_ELRAIL,
141 SPR_CURSOR_SWNE_ELRAIL,
142 SPR_CURSOR_EW_ELRAIL,
143 SPR_CURSOR_NWSE_ELRAIL,
144 SPR_CURSOR_AUTOELRAIL,
145 SPR_CURSOR_ELRAIL_DEPOT,
146 SPR_CURSOR_TUNNEL_ELRAIL,
147 SPR_CURSOR_CONVERT_ELRAIL
150 /* strings */
152 STR_RAIL_NAME_ELRAIL,
153 STR_RAIL_TOOLBAR_ELRAIL_CONSTRUCTION_CAPTION,
154 STR_RAIL_MENU_ELRAIL_CONSTRUCTION,
155 STR_BUY_VEHICLE_TRAIN_ELRAIL_CAPTION,
156 STR_REPLACE_ELRAIL_VEHICLES,
157 STR_ENGINE_PREVIEW_ELRAIL_LOCOMOTIVE,
160 /* Offset of snow tiles */
161 SPR_RAIL_SNOW_OFFSET,
163 /* Powered railtypes */
164 RAILTYPES_ELECTRIC,
166 /* Compatible railtypes */
167 RAILTYPES_ELECTRIC | RAILTYPES_RAIL,
169 /* bridge offset */
172 /* fallback_railtype */
175 /* curve speed advantage (multiplier) */
178 /* flags */
179 RTFB_CATENARY,
181 /* cost multiplier */
184 /* maintenance cost multiplier */
187 /* acceleration type */
190 /* max speed */
193 /* rail type label */
194 'ELRL',
196 /* alternate labels */
197 RailTypeLabelList(),
199 /* map colour */
200 0x0A,
202 /* introduction date */
203 INVALID_DATE,
205 /* railtypes required for this to be introduced */
206 RAILTYPES_NONE,
208 /* introduction rail types */
209 RAILTYPES_ELECTRIC,
211 /* sort order */
212 1 << 4 | 7,
214 { nullptr },
215 { nullptr },
218 /** Monorail */
219 { // Main Sprites
220 { SPR_MONO_TRACK_Y, SPR_MONO_TRACK_N_S, SPR_MONO_TRACK_BASE, SPR_MONO_SINGLE_X, SPR_MONO_SINGLE_Y,
221 SPR_MONO_SINGLE_NORTH, SPR_MONO_SINGLE_SOUTH, SPR_MONO_SINGLE_EAST, SPR_MONO_SINGLE_WEST,
222 SPR_TRACKS_FOR_SLOPES_MONO_BASE,
223 SPR_CROSSING_OFF_X_MONO,
224 SPR_TUNNEL_ENTRY_REAR_MONO
227 /* GUI sprites */
228 { 0x4E7, 0x4E8, 0x4E9, 0x4EA,
229 SPR_IMG_AUTOMONO,
230 SPR_IMG_DEPOT_MONO,
231 SPR_IMG_TUNNEL_MONO,
232 SPR_IMG_CONVERT_MONO,
237 SPR_CURSOR_NS_MONO,
238 SPR_CURSOR_SWNE_MONO,
239 SPR_CURSOR_EW_MONO,
240 SPR_CURSOR_NWSE_MONO,
241 SPR_CURSOR_AUTOMONO,
242 SPR_CURSOR_MONO_DEPOT,
243 SPR_CURSOR_TUNNEL_MONO,
244 SPR_CURSOR_CONVERT_MONO
247 /* strings */
249 STR_RAIL_NAME_MONORAIL,
250 STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION,
251 STR_RAIL_MENU_MONORAIL_CONSTRUCTION,
252 STR_BUY_VEHICLE_TRAIN_MONORAIL_CAPTION,
253 STR_REPLACE_MONORAIL_VEHICLES,
254 STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE,
257 /* Offset of snow tiles */
258 SPR_MONO_SNOW_OFFSET,
260 /* Powered railtypes */
261 RAILTYPES_MONO,
263 /* Compatible Railtypes */
264 RAILTYPES_MONO,
266 /* bridge offset */
269 /* fallback_railtype */
272 /* curve speed advantage (multiplier) */
275 /* flags */
276 RTFB_NONE,
278 /* cost multiplier */
281 /* maintenance cost multiplier */
284 /* acceleration type */
287 /* max speed */
290 /* rail type label */
291 'MONO',
293 /* alternate labels */
294 RailTypeLabelList(),
296 /* map colour */
297 0x0A,
299 /* introduction date */
300 INVALID_DATE,
302 /* railtypes required for this to be introduced */
303 RAILTYPES_NONE,
305 /* introduction rail types */
306 RAILTYPES_MONO,
308 /* sort order */
309 2 << 4 | 7,
311 { nullptr },
312 { nullptr },
315 /** Maglev */
316 { // Main sprites
317 { SPR_MGLV_TRACK_Y, SPR_MGLV_TRACK_N_S, SPR_MGLV_TRACK_BASE, SPR_MGLV_SINGLE_X, SPR_MGLV_SINGLE_Y,
318 SPR_MGLV_SINGLE_NORTH, SPR_MGLV_SINGLE_SOUTH, SPR_MGLV_SINGLE_EAST, SPR_MGLV_SINGLE_WEST,
319 SPR_TRACKS_FOR_SLOPES_MAGLEV_BASE,
320 SPR_CROSSING_OFF_X_MAGLEV,
321 SPR_TUNNEL_ENTRY_REAR_MAGLEV
324 /* GUI sprites */
325 { 0x4EB, 0x4EC, 0x4EE, 0x4ED,
326 SPR_IMG_AUTOMAGLEV,
327 SPR_IMG_DEPOT_MAGLEV,
328 SPR_IMG_TUNNEL_MAGLEV,
329 SPR_IMG_CONVERT_MAGLEV,
334 SPR_CURSOR_NS_MAGLEV,
335 SPR_CURSOR_SWNE_MAGLEV,
336 SPR_CURSOR_EW_MAGLEV,
337 SPR_CURSOR_NWSE_MAGLEV,
338 SPR_CURSOR_AUTOMAGLEV,
339 SPR_CURSOR_MAGLEV_DEPOT,
340 SPR_CURSOR_TUNNEL_MAGLEV,
341 SPR_CURSOR_CONVERT_MAGLEV
344 /* strings */
346 STR_RAIL_NAME_MAGLEV,
347 STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION,
348 STR_RAIL_MENU_MAGLEV_CONSTRUCTION,
349 STR_BUY_VEHICLE_TRAIN_MAGLEV_CAPTION,
350 STR_REPLACE_MAGLEV_VEHICLES,
351 STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE,
354 /* Offset of snow tiles */
355 SPR_MGLV_SNOW_OFFSET,
357 /* Powered railtypes */
358 RAILTYPES_MAGLEV,
360 /* Compatible Railtypes */
361 RAILTYPES_MAGLEV,
363 /* bridge offset */
366 /* fallback_railtype */
369 /* curve speed advantage (multiplier) */
372 /* flags */
373 RTFB_NONE,
375 /* cost multiplier */
378 /* maintenance cost multiplier */
381 /* acceleration type */
384 /* max speed */
387 /* rail type label */
388 'MGLV',
390 /* alternate labels */
391 RailTypeLabelList(),
393 /* map colour */
394 0x0A,
396 /* introduction date */
397 INVALID_DATE,
399 /* railtypes required for this to be introduced */
400 RAILTYPES_NONE,
402 /* introduction rail types */
403 RAILTYPES_MAGLEV,
405 /* sort order */
406 3 << 4 | 7,
408 { nullptr },
409 { nullptr },
413 #endif /* RAILTYPES_H */