# railtypes.h

Go to the documentation of this file.

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