# railtypes.h

Go to the documentation of this file.

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