# railtypes.h

Go to the documentation of this file.

    00001 /* $Id: railtypes.h 22652 2011-07-10 20:25:59Z rubidium $ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * 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.
    00006  * 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.
    00007  * 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/>.
    00008  */
    00009
    00015 #ifndef RAILTYPES_H
    00016 #define RAILTYPES_H
    00017
    00021 static const RailtypeInfo _original_railtypes[] = {
    00023   { // Main Sprites
    00024     { SPR_RAIL_TRACK_Y, SPR_RAIL_TRACK_N_S, SPR_RAIL_TRACK_BASE, SPR_RAIL_SINGLE_X, SPR_RAIL_SINGLE_Y,
    00025       SPR_RAIL_SINGLE_NORTH, SPR_RAIL_SINGLE_SOUTH, SPR_RAIL_SINGLE_EAST, SPR_RAIL_SINGLE_WEST,
    00026       SPR_TRACKS_FOR_SLOPES_RAIL_BASE,
    00027       SPR_CROSSING_OFF_X_RAIL,
    00028       SPR_TUNNEL_ENTRY_REAR_RAIL
    00029     },
    00030
    00031     /* GUI sprites */
    00032     { 0x4E3, 0x4E4, 0x4E5, 0x4E6,
    00033       SPR_IMG_AUTORAIL,
    00034       SPR_IMG_DEPOT_RAIL,
    00035       SPR_IMG_TUNNEL_RAIL,
    00036       SPR_IMG_CONVERT_RAIL
    00037     },
    00038
    00039     {
    00040       SPR_CURSOR_NS_TRACK,
    00041       SPR_CURSOR_SWNE_TRACK,
    00042       SPR_CURSOR_EW_TRACK,
    00043       SPR_CURSOR_NWSE_TRACK,
    00044       SPR_CURSOR_AUTORAIL,
    00045       SPR_CURSOR_RAIL_DEPOT,
    00046       SPR_CURSOR_TUNNEL_RAIL,
    00047       SPR_CURSOR_CONVERT_RAIL
    00048     },
    00049
    00050     /* strings */
    00051     {
    00052       STR_RAIL_TOOLBAR_RAILROAD_CONSTRUCTION_CAPTION,
    00053       STR_RAIL_MENU_RAILROAD_CONSTRUCTION,
    00054       STR_BUY_VEHICLE_TRAIN_RAIL_CAPTION,
    00055       STR_REPLACE_RAIL_VEHICLES,
    00056       STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE,
    00057     },
    00058
    00059     /* Offset of snow tiles */
    00060     SPR_RAIL_SNOW_OFFSET,
    00061
    00062     /* Powered railtypes */
    00063     RAILTYPES_RAIL | RAILTYPES_ELECTRIC,
    00064
    00065     /* Compatible railtypes */
    00066     RAILTYPES_RAIL | RAILTYPES_ELECTRIC,
    00067
    00068     /* bridge offset */
    00069     0,
    00070
    00071     /* fallback_railtype */
    00072     0,
    00073
    00074     /* curve speed advantage (multiplier) */
    00075     0,
    00076
    00077     /* flags */
    00078     RTFB_NONE,
    00079
    00080     /* cost multiplier */
    00081     8,
    00082
    00083     /* acceleration type */
    00084     0,
    00085
    00086     /* max speed */
    00087     0,
    00088
    00089     /* rail type label */
    00090     'RAIL',
    00091
    00092     /* map colour */
    00093     0x0A,
    00094
    00095     /* introduction date */
    00096     INVALID_DATE,
    00097
    00098     /* railtypes required for this to be introduced */
    00099     RAILTYPES_NONE,
    00100
    00101     /* introduction rail types */
    00102     RAILTYPES_RAIL,
    00103
    00104     /* sort order */
    00105     0 << 4 | 7,
    00106
    00107     { NULL },
    00108     { NULL },
    00109   },
    00110
    00112   { // Main Sprites
    00113     { SPR_RAIL_TRACK_Y, SPR_RAIL_TRACK_N_S, SPR_RAIL_TRACK_BASE, SPR_RAIL_SINGLE_X, SPR_RAIL_SINGLE_Y,
    00114       SPR_RAIL_SINGLE_NORTH, SPR_RAIL_SINGLE_SOUTH, SPR_RAIL_SINGLE_EAST, SPR_RAIL_SINGLE_WEST,
    00115       SPR_TRACKS_FOR_SLOPES_RAIL_BASE,
    00116       SPR_CROSSING_OFF_X_RAIL,
    00117       SPR_TUNNEL_ENTRY_REAR_RAIL
    00118     },
    00119
    00120     /* GUI sprites */
    00121     {
    00122       SPR_BUILD_NS_ELRAIL,
    00123       SPR_BUILD_X_ELRAIL,
    00124       SPR_BUILD_EW_ELRAIL,
    00125       SPR_BUILD_Y_ELRAIL,
    00126       SPR_IMG_AUTOELRAIL,
    00127       SPR_IMG_DEPOT_ELRAIL,
    00128       SPR_BUILD_TUNNEL_ELRAIL,
    00129       SPR_IMG_CONVERT_ELRAIL
    00130     },
    00131
    00132     {
    00133       SPR_CURSOR_NS_ELRAIL,
    00134       SPR_CURSOR_SWNE_ELRAIL,
    00135       SPR_CURSOR_EW_ELRAIL,
    00136       SPR_CURSOR_NWSE_ELRAIL,
    00137       SPR_CURSOR_AUTOELRAIL,
    00138       SPR_CURSOR_ELRAIL_DEPOT,
    00139       SPR_CURSOR_TUNNEL_ELRAIL,
    00140       SPR_CURSOR_CONVERT_ELRAIL
    00141     },
    00142
    00143     /* strings */
    00144     {
    00145       STR_RAIL_TOOLBAR_ELRAIL_CONSTRUCTION_CAPTION,
    00146       STR_RAIL_MENU_ELRAIL_CONSTRUCTION,
    00147       STR_BUY_VEHICLE_TRAIN_ELRAIL_CAPTION,
    00148       STR_REPLACE_ELRAIL_VEHICLES,
    00149       STR_ENGINE_PREVIEW_RAILROAD_LOCOMOTIVE,
    00150     },
    00151
    00152     /* Offset of snow tiles */
    00153     SPR_RAIL_SNOW_OFFSET,
    00154
    00155     /* Powered railtypes */
    00156     RAILTYPES_ELECTRIC,
    00157
    00158     /* Compatible railtypes */
    00159     RAILTYPES_ELECTRIC | RAILTYPES_RAIL,
    00160
    00161     /* bridge offset */
    00162     0,
    00163
    00164     /* fallback_railtype */
    00165     0,
    00166
    00167     /* curve speed advantage (multiplier) */
    00168     0,
    00169
    00170     /* flags */
    00171     RTFB_CATENARY,
    00172
    00173     /* cost multiplier */
    00174     12,
    00175
    00176     /* acceleration type */
    00177     0,
    00178
    00179     /* max speed */
    00180     0,
    00181
    00182     /* rail type label */
    00183     'ELRL',
    00184
    00185     /* map colour */
    00186     0x0A,
    00187
    00188     /* introduction date */
    00189     INVALID_DATE,
    00190
    00191     /* railtypes required for this to be introduced */
    00192     RAILTYPES_NONE,
    00193
    00194     /* introduction rail types */
    00195     RAILTYPES_ELECTRIC,
    00196
    00197     /* sort order */
    00198     1 << 4 | 7,
    00199
    00200     { NULL },
    00201     { NULL },
    00202   },
    00203
    00205   { // Main Sprites
    00206     { SPR_MONO_TRACK_Y, SPR_MONO_TRACK_N_S, SPR_MONO_TRACK_BASE, SPR_MONO_SINGLE_X, SPR_MONO_SINGLE_Y,
    00207       SPR_MONO_SINGLE_NORTH, SPR_MONO_SINGLE_SOUTH, SPR_MONO_SINGLE_EAST, SPR_MONO_SINGLE_WEST,
    00208       SPR_TRACKS_FOR_SLOPES_MONO_BASE,
    00209       SPR_CROSSING_OFF_X_MONO,
    00210       SPR_TUNNEL_ENTRY_REAR_MONO
    00211     },
    00212
    00213     /* GUI sprites */
    00214     { 0x4E7, 0x4E8, 0x4E9, 0x4EA,
    00215       SPR_IMG_AUTOMONO,
    00216       SPR_IMG_DEPOT_MONO,
    00217       SPR_IMG_TUNNEL_MONO,
    00218       SPR_IMG_CONVERT_MONO
    00219     },
    00220
    00221     {
    00222       SPR_CURSOR_NS_MONO,
    00223       SPR_CURSOR_SWNE_MONO,
    00224       SPR_CURSOR_EW_MONO,
    00225       SPR_CURSOR_NWSE_MONO,
    00226       SPR_CURSOR_AUTOMONO,
    00227       SPR_CURSOR_MONO_DEPOT,
    00228       SPR_CURSOR_TUNNEL_MONO,
    00229       SPR_CURSOR_CONVERT_MONO
    00230     },
    00231
    00232     /* strings */
    00233     {
    00234       STR_RAIL_TOOLBAR_MONORAIL_CONSTRUCTION_CAPTION,
    00235       STR_RAIL_MENU_MONORAIL_CONSTRUCTION,
    00236       STR_BUY_VEHICLE_TRAIN_MONORAIL_CAPTION,
    00237       STR_REPLACE_MONORAIL_VEHICLES,
    00238       STR_ENGINE_PREVIEW_MONORAIL_LOCOMOTIVE,
    00239     },
    00240
    00241     /* Offset of snow tiles */
    00242     SPR_MONO_SNOW_OFFSET,
    00243
    00244     /* Powered railtypes */
    00245     RAILTYPES_MONO,
    00246
    00247     /* Compatible Railtypes */
    00248     RAILTYPES_MONO,
    00249
    00250     /* bridge offset */
    00251     16,
    00252
    00253     /* fallback_railtype */
    00254     1,
    00255
    00256     /* curve speed advantage (multiplier) */
    00257     1,
    00258
    00259     /* flags */
    00260     RTFB_NONE,
    00261
    00262     /* cost multiplier */
    00263     16,
    00264
    00265     /* acceleration type */
    00266     1,
    00267
    00268     /* max speed */
    00269     0,
    00270
    00271     /* rail type label */
    00272     'MONO',
    00273
    00274     /* map colour */
    00275     0x0A,
    00276
    00277     /* introduction date */
    00278     INVALID_DATE,
    00279
    00280     /* railtypes required for this to be introduced */
    00281     RAILTYPES_NONE,
    00282
    00283     /* introduction rail types */
    00284     RAILTYPES_MONO,
    00285
    00286     /* sort order */
    00287     2 << 4 | 7,
    00288
    00289     { NULL },
    00290     { NULL },
    00291   },
    00292
    00294   { // Main sprites
    00295     { SPR_MGLV_TRACK_Y, SPR_MGLV_TRACK_N_S, SPR_MGLV_TRACK_BASE, SPR_MGLV_SINGLE_X, SPR_MGLV_SINGLE_Y,
    00296       SPR_MGLV_SINGLE_NORTH, SPR_MGLV_SINGLE_SOUTH, SPR_MGLV_SINGLE_EAST, SPR_MGLV_SINGLE_WEST,
    00297       SPR_TRACKS_FOR_SLOPES_MAGLEV_BASE,
    00298       SPR_CROSSING_OFF_X_MAGLEV,
    00299       SPR_TUNNEL_ENTRY_REAR_MAGLEV
    00300     },
    00301
    00302     /* GUI sprites */
    00303     { 0x4EB, 0x4EC, 0x4EE, 0x4ED,
    00304       SPR_IMG_AUTOMAGLEV,
    00305       SPR_IMG_DEPOT_MAGLEV,
    00306       SPR_IMG_TUNNEL_MAGLEV,
    00307       SPR_IMG_CONVERT_MAGLEV
    00308     },
    00309
    00310     {
    00311       SPR_CURSOR_NS_MAGLEV,
    00312       SPR_CURSOR_SWNE_MAGLEV,
    00313       SPR_CURSOR_EW_MAGLEV,
    00314       SPR_CURSOR_NWSE_MAGLEV,
    00315       SPR_CURSOR_AUTOMAGLEV,
    00316       SPR_CURSOR_MAGLEV_DEPOT,
    00317       SPR_CURSOR_TUNNEL_MAGLEV,
    00318       SPR_CURSOR_CONVERT_MAGLEV
    00319     },
    00320
    00321     /* strings */
    00322     {
    00323       STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION,
    00324       STR_RAIL_MENU_MAGLEV_CONSTRUCTION,
    00325       STR_BUY_VEHICLE_TRAIN_MAGLEV_CAPTION,
    00326       STR_REPLACE_MAGLEV_VEHICLES,
    00327       STR_ENGINE_PREVIEW_MAGLEV_LOCOMOTIVE,
    00328     },
    00329
    00330     /* Offset of snow tiles */
    00331     SPR_MGLV_SNOW_OFFSET,
    00332
    00333     /* Powered railtypes */
    00334     RAILTYPES_MAGLEV,
    00335
    00336     /* Compatible Railtypes */
    00337     RAILTYPES_MAGLEV,
    00338
    00339     /* bridge offset */
    00340     24,
    00341
    00342     /* fallback_railtype */
    00343     2,
    00344
    00345     /* curve speed advantage (multiplier) */
    00346     2,
    00347
    00348     /* flags */
    00349     RTFB_NONE,
    00350
    00351     /* cost multiplier */
    00352     24,
    00353
    00354     /* acceleration type */
    00355     2,
    00356
    00357     /* max speed */
    00358     0,
    00359
    00360     /* rail type label */
    00361     'MGLV',
    00362
    00363     /* map colour */
    00364     0x0A,
    00365
    00366     /* introduction date */
    00367     INVALID_DATE,
    00368
    00369     /* railtypes required for this to be introduced */
    00370     RAILTYPES_NONE,
    00371
    00372     /* introduction rail types */
    00373     RAILTYPES_MAGLEV,
    00374
    00375     /* sort order */
    00376     3 << 4 | 7,
    00377
    00378     { NULL },
    00379     { NULL },
    00380   },
    00381 };
    00382
    00383 #endif /* RAILTYPES_H */