# railtypes.h

Go to the documentation of this file.

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