src/rail.h
changeset 9154 2c042b567165
parent 9111 48ce04029fe4
child 9493 030cfc495f31
equal deleted inserted replaced
9153:d1d16656129b 9154:2c042b567165
     9 #include "track_type.h"
     9 #include "track_type.h"
    10 #include "vehicle_type.h"
    10 #include "vehicle_type.h"
    11 #include "gfx_type.h"
    11 #include "gfx_type.h"
    12 #include "core/bitmath_func.hpp"
    12 #include "core/bitmath_func.hpp"
    13 #include "economy_func.h"
    13 #include "economy_func.h"
    14 #include "tile_cmd.h"
    14 #include "slope_type.h"
    15 
    15 
    16 enum RailTypeFlag {
    16 enum RailTypeFlag {
    17 	RTF_CATENARY = 0,  ///< Set if the rail type should have catenary drawn
    17 	RTF_CATENARY = 0,  ///< Set if the rail type should have catenary drawn
    18 };
    18 };
    19 
    19 
   196 void DrawTrainDepotSprite(int x, int y, int image, RailType railtype);
   196 void DrawTrainDepotSprite(int x, int y, int image, RailType railtype);
   197 void DrawDefaultWaypointSprite(int x, int y, RailType railtype);
   197 void DrawDefaultWaypointSprite(int x, int y, RailType railtype);
   198 void *EnsureNoTrainOnTrackProc(Vehicle *v, void *data);
   198 void *EnsureNoTrainOnTrackProc(Vehicle *v, void *data);
   199 int TicksToLeaveDepot(const Vehicle *v);
   199 int TicksToLeaveDepot(const Vehicle *v);
   200 
   200 
   201 
       
   202 /**
       
   203  * Test if a rail type has catenary
       
   204  * @param rt Rail type to test
       
   205  */
       
   206 static inline bool HasCatenary(RailType rt)
       
   207 {
       
   208 	return HasBit(GetRailTypeInfo(rt)->flags, RTF_CATENARY);
       
   209 }
       
   210 
       
   211 
       
   212 /**
       
   213  * Draws overhead wires and pylons for electric railways.
       
   214  * @param ti The TileInfo struct of the tile being drawn
       
   215  * @see DrawCatenaryRailway
       
   216  */
       
   217 void DrawCatenary(const TileInfo *ti);
       
   218 void DrawCatenaryOnTunnel(const TileInfo *ti);
       
   219 void DrawCatenaryOnBridge(const TileInfo *ti);
       
   220 
       
   221 Foundation GetRailFoundation(Slope tileh, TrackBits bits);
   201 Foundation GetRailFoundation(Slope tileh, TrackBits bits);
   222 
   202 
   223 int32 SettingsDisableElrail(int32 p1); ///< _patches.disable_elrail callback
       
   224 
   203 
   225 /**
   204 /**
   226  * Finds out if a Player has a certain railtype available
   205  * Finds out if a Player has a certain railtype available
   227  * @param p Player in question
   206  * @param p Player in question
   228  * @param railtype requested RailType
   207  * @param railtype requested RailType