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