OpenTTD: src/table/railtypes.h Source File

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

railtypes.h
Go to the documentation of this file.
1 /* $Id: railtypes.h 24368 2012-07-02 15:55:13Z frosch $ */
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
15 #ifndef RAILTYPES_H
16 #define RAILTYPES_H
17
21 static const RailtypeInfo _original_railtypes[] = {
23 { // Main Sprites
24 { SPR_RAIL_TRACK_Y, SPR_RAIL_TRACK_N_S, SPR_RAIL_TRACK_BASE, SPR_RAIL_SINGLE_X, SPR_RAIL_SINGLE_Y,
25 SPR_RAIL_SINGLE_NORTH, SPR_RAIL_SINGLE_SOUTH, SPR_RAIL_SINGLE_EAST, SPR_RAIL_SINGLE_WEST,
26 SPR_TRACKS_FOR_SLOPES_RAIL_BASE,
27 SPR_CROSSING_OFF_X_RAIL,
28 SPR_TUNNEL_ENTRY_REAR_RAIL
29 },
30
31 /* GUI sprites */
32 { 0x4E3, 0x4E4, 0x4E5, 0x4E6,
33 SPR_IMG_AUTORAIL,
34 SPR_IMG_DEPOT_RAIL,
35 SPR_IMG_TUNNEL_RAIL,
36 SPR_IMG_CONVERT_RAIL,
37 {}
38 },
39
40 {
41 SPR_CURSOR_NS_TRACK,
42 SPR_CURSOR_SWNE_TRACK,
43 SPR_CURSOR_EW_TRACK,
44 SPR_CURSOR_NWSE_TRACK,
45 SPR_CURSOR_AUTORAIL,
46 SPR_CURSOR_RAIL_DEPOT,
47 SPR_CURSOR_TUNNEL_RAIL,
48 SPR_CURSOR_CONVERT_RAIL
49 },
50
51 /* strings */
52 {
53 STR_RAIL_NAME_RAILROAD,
54 STR_RAIL_TOOLBAR_RAILROAD_CONSTRUCTION_CAPTION,
55 STR_RAIL_MENU_RAILROAD_CONSTRUCTION,
56 STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION,
57 STR_REPLACE_RAIL_VEHICLES,
58 STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE,
59 },
60
61 /* Offset of snow tiles */
62 SPR_RAIL_SNOW_OFFSET,
63
64 /* Powered railtypes */
65 RAILTYPES_RAIL | RAILTYPES_ELECTRIC,
66
67 /* Compatible railtypes */
68 RAILTYPES_RAIL | RAILTYPES_ELECTRIC,
69
70 /* bridge offset */
71 0,
72
73 /* fallback_railtype */
74 0,
75
76 /* curve speed advantage (multiplier) */
77 0,
78
79 /* flags */
80 RTFB_NONE,
81
82 /* cost multiplier */
83 8,
84
85 /* maintenance cost multiplier */
86 8,
87
88 /* acceleration type */
89 0,
90
91 /* max speed */
92 0,
93
94 /* rail type label */
95 'RAIL',
96
97 /* alternate labels */
98 RailTypeLabelList(),
99
100 /* map colour */
101 0x0A,
102
103 /* introduction date */
104 INVALID_DATE,
105
106 /* railtypes required for this to be introduced */
107 RAILTYPES_NONE,
108
109 /* introduction rail types */
110 RAILTYPES_RAIL,
111
112 /* sort order */
113 0 << 4 | 7,
114
115 { NULL },
116 { NULL },
117 },
118
120 { // Main Sprites
121 { SPR_RAIL_TRACK_Y, SPR_RAIL_TRACK_N_S, SPR_RAIL_TRACK_BASE, SPR_RAIL_SINGLE_X, SPR_RAIL_SINGLE_Y,
122 SPR_RAIL_SINGLE_NORTH, SPR_RAIL_SINGLE_SOUTH, SPR_RAIL_SINGLE_EAST, SPR_RAIL_SINGLE_WEST,
123 SPR_TRACKS_FOR_SLOPES_RAIL_BASE,
124 SPR_CROSSING_OFF_X_RAIL,
125 SPR_TUNNEL_ENTRY_REAR_RAIL
126 },
127
128 /* GUI sprites */
129 {
130 SPR_BUILD_NS_ELRAIL,
131 SPR_BUILD_X_ELRAIL,
132 SPR_BUILD_EW_ELRAIL,
133 SPR_BUILD_Y_ELRAIL,
134 SPR_IMG_AUTOELRAIL,
135 SPR_IMG_DEPOT_ELRAIL,
136 SPR_BUILD_TUNNEL_ELRAIL,
137 SPR_IMG_CONVERT_ELRAIL,
138 {}
139 },
140
141 {
142 SPR_CURSOR_NS_ELRAIL,
143 SPR_CURSOR_SWNE_ELRAIL,
144 SPR_CURSOR_EW_ELRAIL,
145 SPR_CURSOR_NWSE_ELRAIL,
146 SPR_CURSOR_AUTOELRAIL,
147 SPR_CURSOR_ELRAIL_DEPOT,
148 SPR_CURSOR_TUNNEL_ELRAIL,
149 SPR_CURSOR_CONVERT_ELRAIL
150 },
151
152 /* strings */
153 {
154 STR_RAIL_NAME_ELRAIL,
155 STR_RAIL_TOOLBAR_ELRAIL_CONSTRUCTION_CAPTION,
156 STR_RAIL_MENU_ELRAIL_CONSTRUCTION,
157 STR_BUY_VEHICLE_TRAIN_ELRAIL_CAPTION,
158 STR_REPLACE_ELRAIL_VEHICLES,
159 STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE,
160 },
161
162 /* Offset of snow tiles */
163 SPR_RAIL_SNOW_OFFSET,
164
165 /* Powered railtypes */
166 RAILTYPES_ELECTRIC,
167
168 /* Compatible railtypes */
169 RAILTYPES_ELECTRIC | RAILTYPES_RAIL,
170
171 /* bridge offset */
172 0,
173
174 /* fallback_railtype */
175 0,
176
177 /* curve speed advantage (multiplier) */
178 0,
179
180 /* flags */
181 RTFB_CATENARY,
182
183 /* cost multiplier */
184 12,
185
186 /* maintenance cost multiplier */
187 12,
188
189 /* acceleration type */
190 0,
191
192 /* max speed */
193 0,
194
195 /* rail type label */
196 'ELRL',
197
198 /* alternate labels */
199 RailTypeLabelList(),
200
201 /* map colour */
202 0x0A,
203
204 /* introduction date */
205 INVALID_DATE,
206
207 /* railtypes required for this to be introduced */
208 RAILTYPES_NONE,
209
210 /* introduction rail types */
211 RAILTYPES_ELECTRIC,
212
213 /* sort order */
214 1 << 4 | 7,
215
216 { NULL },
217 { NULL },
218 },
219
221 { // Main Sprites
222 { SPR_MONO_TRACK_Y, SPR_MONO_TRACK_N_S, SPR_MONO_TRACK_BASE, SPR_MONO_SINGLE_X, SPR_MONO_SINGLE_Y,
223 SPR_MONO_SINGLE_NORTH, SPR_MONO_SINGLE_SOUTH, SPR_MONO_SINGLE_EAST, SPR_MONO_SINGLE_WEST,
224 SPR_TRACKS_FOR_SLOPES_MONO_BASE,
225 SPR_CROSSING_OFF_X_MONO,
226 SPR_TUNNEL_ENTRY_REAR_MONO
227 },
228
229 /* GUI sprites */
230 { 0x4E7, 0x4E8, 0x4E9, 0x4EA,
231 SPR_IMG_AUTOMONO,
232 SPR_IMG_DEPOT_MONO,
233 SPR_IMG_TUNNEL_MONO,
234 SPR_IMG_CONVERT_MONO,
235 {}
236 },
237
238 {
239 SPR_CURSOR_NS_MONO,
240 SPR_CURSOR_SWNE_MONO,
241 SPR_CURSOR_EW_MONO,
242 SPR_CURSOR_NWSE_MONO,
243 SPR_CURSOR_AUTOMONO,
244 SPR_CURSOR_MONO_DEPOT,
245 SPR_CURSOR_TUNNEL_MONO,
246 SPR_CURSOR_CONVERT_MONO
247 },
248
249 /* strings */
250 {
251 STR_RAIL_NAME_MONORAIL,
252 STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION,
253 STR_RAIL_MENU_MONORAIL_CONSTRUCTION,
254 STR_BUY_VEHICLE_TRAIN_MONORAIL_CAPTION,
255 STR_REPLACE_MONORAIL_VEHICLES,
256 STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE,
257 },
258
259 /* Offset of snow tiles */
260 SPR_MONO_SNOW_OFFSET,
261
262 /* Powered railtypes */
263 RAILTYPES_MONO,
264
265 /* Compatible Railtypes */
266 RAILTYPES_MONO,
267
268 /* bridge offset */
269 16,
270
271 /* fallback_railtype */
272 1,
273
274 /* curve speed advantage (multiplier) */
275 1,
276
277 /* flags */
278 RTFB_NONE,
279
280 /* cost multiplier */
281 16,
282
283 /* maintenance cost multiplier */
284 16,
285
286 /* acceleration type */
287 1,
288
289 /* max speed */
290 0,
291
292 /* rail type label */
293 'MONO',
294
295 /* alternate labels */
296 RailTypeLabelList(),
297
298 /* map colour */
299 0x0A,
300
301 /* introduction date */
302 INVALID_DATE,
303
304 /* railtypes required for this to be introduced */
305 RAILTYPES_NONE,
306
307 /* introduction rail types */
308 RAILTYPES_MONO,
309
310 /* sort order */
311 2 << 4 | 7,
312
313 { NULL },
314 { NULL },
315 },
316
318 { // Main sprites
319 { SPR_MGLV_TRACK_Y, SPR_MGLV_TRACK_N_S, SPR_MGLV_TRACK_BASE, SPR_MGLV_SINGLE_X, SPR_MGLV_SINGLE_Y,
320 SPR_MGLV_SINGLE_NORTH, SPR_MGLV_SINGLE_SOUTH, SPR_MGLV_SINGLE_EAST, SPR_MGLV_SINGLE_WEST,
321 SPR_TRACKS_FOR_SLOPES_MAGLEV_BASE,
322 SPR_CROSSING_OFF_X_MAGLEV,
323 SPR_TUNNEL_ENTRY_REAR_MAGLEV
324 },
325
326 /* GUI sprites */
327 { 0x4EB, 0x4EC, 0x4EE, 0x4ED,
328 SPR_IMG_AUTOMAGLEV,
329 SPR_IMG_DEPOT_MAGLEV,
330 SPR_IMG_TUNNEL_MAGLEV,
331 SPR_IMG_CONVERT_MAGLEV,
332 {}
333 },
334
335 {
336 SPR_CURSOR_NS_MAGLEV,
337 SPR_CURSOR_SWNE_MAGLEV,
338 SPR_CURSOR_EW_MAGLEV,
339 SPR_CURSOR_NWSE_MAGLEV,
340 SPR_CURSOR_AUTOMAGLEV,
341 SPR_CURSOR_MAGLEV_DEPOT,
342 SPR_CURSOR_TUNNEL_MAGLEV,
343 SPR_CURSOR_CONVERT_MAGLEV
344 },
345
346 /* strings */
347 {
348 STR_RAIL_NAME_MAGLEV,
349 STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION,
350 STR_RAIL_MENU_MAGLEV_CONSTRUCTION,
351 STR_BUY_VEHICLE_TRAIN_MAGLEV_CAPTION,
352 STR_REPLACE_MAGLEV_VEHICLES,
353 STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE,
354 },
355
356 /* Offset of snow tiles */
357 SPR_MGLV_SNOW_OFFSET,
358
359 /* Powered railtypes */
360 RAILTYPES_MAGLEV,
361
362 /* Compatible Railtypes */
363 RAILTYPES_MAGLEV,
364
365 /* bridge offset */
366 24,
367
368 /* fallback_railtype */
369 2,
370
371 /* curve speed advantage (multiplier) */
372 2,
373
374 /* flags */
375 RTFB_NONE,
376
377 /* cost multiplier */
378 24,
379
380 /* maintenance cost multiplier */
381 24,
382
383 /* acceleration type */
384 2,
385
386 /* max speed */
387 0,
388
389 /* rail type label */
390 'MGLV',
391
392 /* alternate labels */
393 RailTypeLabelList(),
394
395 /* map colour */
396 0x0A,
397
398 /* introduction date */
399 INVALID_DATE,
400
401 /* railtypes required for this to be introduced */
402 RAILTYPES_NONE,
403
404 /* introduction rail types */
405 RAILTYPES_MAGLEV,
406
407 /* sort order */
408 3 << 4 | 7,
409
410 { NULL },
411 { NULL },
412 },
413 };
414
415 #endif /* RAILTYPES_H */