tron@2186: /* $Id$ */ tron@2186: celestar@2232: /** @file rail.h */ celestar@2232: matthijs@1942: #ifndef RAIL_H matthijs@1942: #define RAIL_H matthijs@1942: tron@3147: #include "direction.h" matthijs@1942: #include "tile.h" matthijs@1942: tron@4041: typedef enum RailTypes { tron@4041: RAILTYPE_RAIL = 0, tron@4041: RAILTYPE_ELECTRIC = 1, tron@4041: RAILTYPE_MONO = 2, tron@4041: RAILTYPE_MAGLEV = 3, tron@4041: RAILTYPE_END, rubidium@4344: INVALID_RAILTYPE = 0xFF tron@4041: } RailType; tron@4041: tron@4041: typedef byte RailTypeMask; tron@4041: tron@4041: tron@4041: /** These are used to specify a single track. tron@4041: * Can be translated to a trackbit with TrackToTrackbit */ tron@4041: typedef enum Track { tron@4041: TRACK_X = 0, tron@4041: TRACK_Y = 1, tron@4041: TRACK_UPPER = 2, tron@4041: TRACK_LOWER = 3, tron@4041: TRACK_LEFT = 4, tron@4041: TRACK_RIGHT = 5, tron@4041: TRACK_END, tron@4041: INVALID_TRACK = 0xFF tron@4041: } Track; tron@4041: tron@4041: tron@4158: /** Convert an Axis to the corresponding Track tron@4158: * AXIS_X -> TRACK_X tron@4158: * AXIS_Y -> TRACK_Y tron@4158: * Uses the fact that they share the same internal encoding tron@4158: */ tron@4158: static inline Track AxisToTrack(Axis a) tron@4158: { tron@4158: return (Track)a; tron@4158: } tron@4158: tron@4158: tron@4041: /** Bitfield corresponding to Track */ tron@4041: typedef enum TrackBits { rubidium@4344: TRACK_BIT_NONE = 0U, rubidium@4344: TRACK_BIT_X = 1U << TRACK_X, rubidium@4344: TRACK_BIT_Y = 1U << TRACK_Y, rubidium@4344: TRACK_BIT_UPPER = 1U << TRACK_UPPER, rubidium@4344: TRACK_BIT_LOWER = 1U << TRACK_LOWER, rubidium@4344: TRACK_BIT_LEFT = 1U << TRACK_LEFT, rubidium@4344: TRACK_BIT_RIGHT = 1U << TRACK_RIGHT, rubidium@4344: TRACK_BIT_CROSS = TRACK_BIT_X | TRACK_BIT_Y, rubidium@4344: TRACK_BIT_HORZ = TRACK_BIT_UPPER | TRACK_BIT_LOWER, rubidium@4344: TRACK_BIT_VERT = TRACK_BIT_LEFT | TRACK_BIT_RIGHT, rubidium@4344: TRACK_BIT_3WAY_NE = TRACK_BIT_X | TRACK_BIT_UPPER | TRACK_BIT_RIGHT, rubidium@4344: TRACK_BIT_3WAY_SE = TRACK_BIT_Y | TRACK_BIT_LOWER | TRACK_BIT_RIGHT, rubidium@4344: TRACK_BIT_3WAY_SW = TRACK_BIT_X | TRACK_BIT_LOWER | TRACK_BIT_LEFT, rubidium@4344: TRACK_BIT_3WAY_NW = TRACK_BIT_Y | TRACK_BIT_UPPER | TRACK_BIT_LEFT, rubidium@4344: TRACK_BIT_ALL = TRACK_BIT_CROSS | TRACK_BIT_HORZ | TRACK_BIT_VERT, rubidium@4344: TRACK_BIT_MASK = 0x3FU tron@4041: } TrackBits; tron@4041: tron@4041: tron@4158: /** tron@4158: * Maps a Track to the corresponding TrackBits value tron@4158: */ tron@4158: static inline TrackBits TrackToTrackBits(Track track) tron@4158: { tron@4158: return (TrackBits)(1 << track); tron@4158: } tron@4158: tron@4158: tron@4158: static inline TrackBits AxisToTrackBits(Axis a) tron@4158: { tron@4158: return TrackToTrackBits(AxisToTrack(a)); tron@4158: } tron@4158: tron@4158: celestar@2232: /** These are a combination of tracks and directions. Values are 0-5 in one rubidium@4549: * direction (corresponding to the Track enum) and 8-13 in the other direction. */ matthijs@1944: typedef enum Trackdirs { rubidium@4344: TRACKDIR_X_NE = 0, rubidium@4344: TRACKDIR_Y_SE = 1, rubidium@4344: TRACKDIR_UPPER_E = 2, rubidium@4344: TRACKDIR_LOWER_E = 3, rubidium@4344: TRACKDIR_LEFT_S = 4, rubidium@4344: TRACKDIR_RIGHT_S = 5, matthijs@1948: /* Note the two missing values here. This enables trackdir -> track matthijs@1948: * conversion by doing (trackdir & 7) */ rubidium@4344: TRACKDIR_X_SW = 8, rubidium@4344: TRACKDIR_Y_NW = 9, tron@2548: TRACKDIR_UPPER_W = 10, tron@2548: TRACKDIR_LOWER_W = 11, tron@2548: TRACKDIR_LEFT_N = 12, tron@2548: TRACKDIR_RIGHT_N = 13, tron@2548: TRACKDIR_END, tron@2548: INVALID_TRACKDIR = 0xFF, matthijs@1942: } Trackdir; matthijs@1942: celestar@2232: /** These are a combination of tracks and directions. Values are 0-5 in one rubidium@4549: * direction (corresponding to the Track enum) and 8-13 in the other direction. */ matthijs@1944: typedef enum TrackdirBits { rubidium@4344: TRACKDIR_BIT_NONE = 0x0000, rubidium@4344: TRACKDIR_BIT_X_NE = 0x0001, rubidium@4344: TRACKDIR_BIT_Y_SE = 0x0002, rubidium@4344: TRACKDIR_BIT_UPPER_E = 0x0004, rubidium@4344: TRACKDIR_BIT_LOWER_E = 0x0008, rubidium@4344: TRACKDIR_BIT_LEFT_S = 0x0010, rubidium@4344: TRACKDIR_BIT_RIGHT_S = 0x0020, matthijs@1942: /* Again, note the two missing values here. This enables trackdir -> track conversion by doing (trackdir & 0xFF) */ tron@3102: TRACKDIR_BIT_X_SW = 0x0100, tron@3102: TRACKDIR_BIT_Y_NW = 0x0200, tron@2548: TRACKDIR_BIT_UPPER_W = 0x0400, tron@2548: TRACKDIR_BIT_LOWER_W = 0x0800, tron@2548: TRACKDIR_BIT_LEFT_N = 0x1000, tron@2548: TRACKDIR_BIT_RIGHT_N = 0x2000, rubidium@4434: TRACKDIR_BIT_MASK = 0x3F3F, tron@2548: INVALID_TRACKDIR_BIT = 0xFFFF, matthijs@1942: } TrackdirBits; matthijs@1942: celestar@2233: /** This struct contains all the info that is needed to draw and construct tracks. celestar@2233: */ celestar@2233: typedef struct RailtypeInfo { celestar@2274: /** Struct containing the main sprites. @note not all sprites are listed, but only celestar@2274: * the ones used directly in the code */ celestar@2233: struct { celestar@2233: SpriteID track_y; ///< single piece of rail in Y direction, with ground celestar@2233: SpriteID track_ns; ///< two pieces of rail in North and South corner (East-West direction) celestar@2233: SpriteID ground; ///< ground sprite for a 3-way switch celestar@2233: SpriteID single_y; ///< single piece of rail in Y direction, without ground celestar@2233: SpriteID single_x; ///< single piece of rail in X direction celestar@2233: SpriteID single_n; ///< single piece of rail in the northern corner celestar@2233: SpriteID single_s; ///< single piece of rail in the southern corner celestar@2233: SpriteID single_e; ///< single piece of rail in the eastern corner celestar@2233: SpriteID single_w; ///< single piece of rail in the western corner tron@2511: SpriteID crossing; ///< level crossing, rail in X direction tron@2511: SpriteID tunnel; ///< tunnel sprites base celestar@2233: } base_sprites; celestar@2233: celestar@2274: /** struct containing the sprites for the rail GUI. @note only sprites referred to celestar@2274: * directly in the code are listed */ celestar@2274: struct { celestar@2274: SpriteID build_ns_rail; ///< button for building single rail in N-S direction celestar@2274: SpriteID build_x_rail; ///< button for building single rail in X direction celestar@2274: SpriteID build_ew_rail; ///< button for building single rail in E-W direction celestar@2274: SpriteID build_y_rail; ///< button for building single rail in Y direction celestar@2274: SpriteID auto_rail; ///< button for the autorail construction celestar@2274: SpriteID build_depot; ///< button for building depots celestar@2274: SpriteID build_tunnel; ///< button for building a tunnel celestar@2274: SpriteID convert_rail; ///< button for converting rail celestar@2274: } gui_sprites; celestar@2274: celestar@2274: struct { tron@2514: CursorID rail_ns; tron@2514: CursorID rail_swne; tron@2514: CursorID rail_ew; tron@2514: CursorID rail_nwse; tron@2514: CursorID autorail; tron@2514: CursorID depot; tron@2514: CursorID tunnel; tron@2514: CursorID convert; tron@2514: } cursor; tron@2514: tron@2514: struct { celestar@2274: StringID toolbar_caption; celestar@2274: } strings; celestar@2274: celestar@2233: /** sprite number difference between a piece of track on a snowy ground and the corresponding one on normal ground */ celestar@2233: SpriteID snow_offset; celestar@2233: celestar@3355: /** bitmask to the OTHER railtypes on which an engine of THIS railtype generates power */ celestar@3355: RailTypeMask powered_railtypes; celestar@3355: celestar@3355: /** bitmask to the OTHER railtypes on which an engine of THIS railtype can physically travel */ celestar@3355: RailTypeMask compatible_railtypes; celestar@2254: celestar@2254: /** celestar@2254: * Offset between the current railtype and normal rail. This means that:

celestar@2254: * 1) All the sprites in a railset MUST be in the same order. This order celestar@2254: * is determined by normal rail. Check sprites 1005 and following for this order

celestar@2254: * 2) The position where the railtype is loaded must always be the same, otherwise celestar@2254: * the offset will fail.

celestar@2254: * @note: Something more flexible might be desirable in the future. celestar@2254: */ celestar@2254: SpriteID total_offset; celestar@2536: celestar@2536: /** tron@4077: * Bridge offset tron@4077: */ celestar@2536: SpriteID bridge_offset; peter1138@3503: peter1138@3503: /** peter1138@3503: * Offset to add to ground sprite when drawing custom waypoints / stations peter1138@3503: */ peter1138@3503: byte custom_ground_offset; celestar@2233: } RailtypeInfo; celestar@2233: celestar@3890: extern RailtypeInfo _railtypes[RAILTYPE_END]; celestar@2233: hackykid@2008: // these are the maximums used for updating signal blocks, and checking if a depot is in a pbs block hackykid@2008: enum { hackykid@2008: NUM_SSD_ENTRY = 256, // max amount of blocks rubidium@4344: NUM_SSD_STACK = 32, // max amount of blocks to check recursively hackykid@2008: }; matthijs@1942: matthijs@1948: /** matthijs@1948: * Maps a Trackdir to the corresponding TrackdirBits value matthijs@1948: */ matthijs@1948: static inline TrackdirBits TrackdirToTrackdirBits(Trackdir trackdir) { return (TrackdirBits)(1 << trackdir); } matthijs@1948: celestar@2232: /** matthijs@1942: * These functions check the validity of Tracks and Trackdirs. assert against matthijs@1942: * them when convenient. matthijs@1942: */ matthijs@1942: static inline bool IsValidTrack(Track track) { return track < TRACK_END; } matthijs@1948: static inline bool IsValidTrackdir(Trackdir trackdir) { return (TrackdirToTrackdirBits(trackdir) & TRACKDIR_BIT_MASK) != 0; } matthijs@1942: celestar@2232: /** matthijs@1942: * Functions to map tracks to the corresponding bits in the signal matthijs@1942: * presence/status bytes in the map. You should not use these directly, but matthijs@1942: * wrapper functions below instead. XXX: Which are these? matthijs@1942: */ matthijs@1942: matthijs@1942: /** matthijs@1942: * Maps a trackdir to the bit that stores its status in the map arrays, in the matthijs@1942: * direction along with the trackdir. matthijs@1942: */ matthijs@1947: extern const byte _signal_along_trackdir[TRACKDIR_END]; matthijs@1942: static inline byte SignalAlongTrackdir(Trackdir trackdir) {return _signal_along_trackdir[trackdir];} matthijs@1942: matthijs@1942: /** matthijs@1942: * Maps a trackdir to the bit that stores its status in the map arrays, in the matthijs@1942: * direction against the trackdir. matthijs@1942: */ matthijs@1948: static inline byte SignalAgainstTrackdir(Trackdir trackdir) { matthijs@1948: extern const byte _signal_against_trackdir[TRACKDIR_END]; matthijs@1948: return _signal_against_trackdir[trackdir]; matthijs@1948: } matthijs@1942: matthijs@1942: /** matthijs@1942: * Maps a Track to the bits that store the status of the two signals that can matthijs@1942: * be present on the given track. matthijs@1942: */ matthijs@1948: static inline byte SignalOnTrack(Track track) { matthijs@1948: extern const byte _signal_on_track[TRACK_END]; matthijs@1948: return _signal_on_track[track]; matthijs@1948: } matthijs@1942: matthijs@1942: matthijs@1942: /* matthijs@1942: * Functions describing logical relations between Tracks, TrackBits, Trackdirs matthijs@1942: * TrackdirBits, Direction and DiagDirections. matthijs@1942: * matthijs@1942: * TODO: Add #unndefs or something similar to remove the arrays used below matthijs@1942: * from the global scope and expose direct uses of them. matthijs@1942: */ matthijs@1942: matthijs@1942: /** matthijs@1944: * Maps a trackdir to the reverse trackdir. matthijs@1944: */ matthijs@1948: static inline Trackdir ReverseTrackdir(Trackdir trackdir) { tron@3500: return (Trackdir)(trackdir ^ 8); matthijs@1948: } matthijs@1944: matthijs@2782: /** matthijs@2782: * Returns the Track that a given Trackdir represents matthijs@2782: */ matthijs@1944: static inline Track TrackdirToTrack(Trackdir trackdir) { return (Track)(trackdir & 0x7); } matthijs@1944: matthijs@2782: /** matthijs@2782: * Returns a Trackdir for the given Track. Since every Track corresponds to matthijs@1944: * two Trackdirs, we choose the one which points between NE and S. matthijs@1944: * Note that the actual implementation is quite futile, but this might change matthijs@1944: * in the future. matthijs@1944: */ matthijs@1944: static inline Trackdir TrackToTrackdir(Track track) { return (Trackdir)track; } matthijs@1944: matthijs@2782: /** matthijs@2782: * Returns a TrackdirBit mask that contains the two TrackdirBits that matthijs@1944: * correspond with the given Track (one for each direction). matthijs@1944: */ tron@4077: static inline TrackdirBits TrackToTrackdirBits(Track track) tron@4077: { tron@4077: Trackdir td = TrackToTrackdir(track); tron@4077: return (TrackdirBits)(TrackdirToTrackdirBits(td) | TrackdirToTrackdirBits(ReverseTrackdir(td))); tron@4077: } matthijs@1944: matthijs@1944: /** matthijs@2782: * Discards all directional information from the given TrackdirBits. Any matthijs@2782: * Track which is present in either direction will be present in the result. matthijs@2782: */ tron@4077: static inline TrackBits TrackdirBitsToTrackBits(TrackdirBits bits) tron@4077: { matthijs@4281: return (TrackBits)((bits | (bits >> 8)) & TRACK_BIT_MASK); tron@4077: } matthijs@2782: matthijs@2782: /** matthijs@1942: * Maps a trackdir to the trackdir that you will end up on if you go straight matthijs@1942: * ahead. This will be the same trackdir for diagonal trackdirs, but a matthijs@1942: * different (alternating) one for straight trackdirs matthijs@1942: */ tron@4077: static inline Trackdir NextTrackdir(Trackdir trackdir) tron@4077: { matthijs@1948: extern const Trackdir _next_trackdir[TRACKDIR_END]; matthijs@1948: return _next_trackdir[trackdir]; matthijs@1948: } matthijs@1942: matthijs@1942: /** matthijs@1942: * Maps a track to all tracks that make 90 deg turns with it. matthijs@1942: */ tron@4077: static inline TrackBits TrackCrossesTracks(Track track) tron@4077: { matthijs@1948: extern const TrackBits _track_crosses_tracks[TRACK_END]; matthijs@1948: return _track_crosses_tracks[track]; matthijs@1948: } matthijs@1942: matthijs@1942: /** matthijs@1942: * Maps a trackdir to the (4-way) direction the tile is exited when following matthijs@1942: * that trackdir. matthijs@1942: */ tron@4077: static inline DiagDirection TrackdirToExitdir(Trackdir trackdir) tron@4077: { matthijs@1948: extern const DiagDirection _trackdir_to_exitdir[TRACKDIR_END]; matthijs@1948: return _trackdir_to_exitdir[trackdir]; matthijs@1948: } matthijs@1942: matthijs@1942: /** matthijs@1942: * Maps a track and an (4-way) dir to the trackdir that represents the track matthijs@1942: * with the exit in the given direction. matthijs@1942: */ tron@4077: static inline Trackdir TrackExitdirToTrackdir(Track track, DiagDirection diagdir) tron@4077: { matthijs@1948: extern const Trackdir _track_exitdir_to_trackdir[TRACK_END][DIAGDIR_END]; matthijs@1948: return _track_exitdir_to_trackdir[track][diagdir]; matthijs@1948: } matthijs@1942: matthijs@1942: /** hackykid@2008: * Maps a track and an (4-way) dir to the trackdir that represents the track hackykid@2008: * with the exit in the given direction. hackykid@2008: */ tron@4077: static inline Trackdir TrackEnterdirToTrackdir(Track track, DiagDirection diagdir) tron@4077: { hackykid@2008: extern const Trackdir _track_enterdir_to_trackdir[TRACK_END][DIAGDIR_END]; hackykid@2008: return _track_enterdir_to_trackdir[track][diagdir]; hackykid@2008: } hackykid@2008: hackykid@2008: /** matthijs@1942: * Maps a track and a full (8-way) direction to the trackdir that represents matthijs@1942: * the track running in the given direction. matthijs@1942: */ tron@4077: static inline Trackdir TrackDirectionToTrackdir(Track track, Direction dir) tron@4077: { matthijs@1948: extern const Trackdir _track_direction_to_trackdir[TRACK_END][DIR_END]; matthijs@1948: return _track_direction_to_trackdir[track][dir]; matthijs@1948: } matthijs@1942: matthijs@1942: /** matthijs@1942: * Maps a (4-way) direction to the diagonal trackdir that runs in that matthijs@1942: * direction. matthijs@1942: */ tron@4077: static inline Trackdir DiagdirToDiagTrackdir(DiagDirection diagdir) tron@4077: { matthijs@1948: extern const Trackdir _dir_to_diag_trackdir[DIAGDIR_END]; matthijs@1948: return _dir_to_diag_trackdir[diagdir]; matthijs@1948: } matthijs@1942: matthijs@2782: extern const TrackdirBits _exitdir_reaches_trackdirs[DIAGDIR_END]; matthijs@2782: matthijs@2782: /** matthijs@2782: * Returns all trackdirs that can be reached when entering a tile from a given matthijs@2782: * (diagonal) direction. This will obviously include 90 degree turns, since no matthijs@2782: * information is available about the exact angle of entering */ matthijs@2782: static inline TrackdirBits DiagdirReachesTrackdirs(DiagDirection diagdir) { return _exitdir_reaches_trackdirs[diagdir]; } matthijs@2782: matthijs@2782: /** matthijs@2782: * Returns all tracks that can be reached when entering a tile from a given matthijs@2782: * (diagonal) direction. This will obviously include 90 degree turns, since no matthijs@2782: * information is available about the exact angle of entering */ matthijs@2782: static inline TrackBits DiagdirReachesTracks(DiagDirection diagdir) { return TrackdirBitsToTrackBits(DiagdirReachesTrackdirs(diagdir)); } matthijs@2782: matthijs@1942: /** matthijs@1942: * Maps a trackdir to the trackdirs that can be reached from it (ie, when matthijs@2782: * entering the next tile. This will include 90 degree turns! matthijs@1942: */ matthijs@2782: static inline TrackdirBits TrackdirReachesTrackdirs(Trackdir trackdir) { return _exitdir_reaches_trackdirs[TrackdirToExitdir(trackdir)]; } matthijs@1942: /* Note that there is no direct table for this function (there used to be), matthijs@1942: * but it uses two simpeler tables to achieve the result */ matthijs@2782: matthijs@1942: matthijs@1942: /** matthijs@1942: * Maps a trackdir to all trackdirs that make 90 deg turns with it. matthijs@1942: */ matthijs@1948: static inline TrackdirBits TrackdirCrossesTrackdirs(Trackdir trackdir) { matthijs@1948: extern const TrackdirBits _track_crosses_trackdirs[TRACKDIR_END]; matthijs@1948: return _track_crosses_trackdirs[TrackdirToTrack(trackdir)]; matthijs@1948: } matthijs@1942: hackykid@2008: matthijs@1942: /* Checks if a given Track is diagonal */ tron@3102: static inline bool IsDiagonalTrack(Track track) { return (track == TRACK_X) || (track == TRACK_Y); } matthijs@1942: matthijs@1942: /* Checks if a given Trackdir is diagonal. */ matthijs@1942: static inline bool IsDiagonalTrackdir(Trackdir trackdir) { return IsDiagonalTrack(TrackdirToTrack(trackdir)); } matthijs@1942: matthijs@1967: matthijs@1967: /** celestar@2233: * Returns a pointer to the Railtype information for a given railtype celestar@2233: * @param railtype the rail type which the information is requested for celestar@2233: * @return The pointer to the RailtypeInfo celestar@2233: */ ludde@2236: static inline const RailtypeInfo *GetRailTypeInfo(RailType railtype) celestar@2233: { celestar@2233: assert(railtype < RAILTYPE_END); ludde@2236: return &_railtypes[railtype]; celestar@2233: } celestar@2233: celestar@2233: /** matthijs@2006: * Checks if an engine of the given RailType can drive on a tile with a given matthijs@2006: * RailType. This would normally just be an equality check, but for electric matthijs@2006: * rails (which also support non-electric engines). matthijs@2006: * @return Whether the engine can drive on this tile. matthijs@2006: * @param enginetype The RailType of the engine we are considering. matthijs@2006: * @param tiletype The RailType of the tile we are considering. matthijs@2006: */ matthijs@2006: static inline bool IsCompatibleRail(RailType enginetype, RailType tiletype) matthijs@2006: { celestar@2233: return HASBIT(GetRailTypeInfo(enginetype)->compatible_railtypes, tiletype); matthijs@2006: } matthijs@2006: celestar@3355: static inline bool HasPowerOnRail(RailType enginetype, RailType tiletype) celestar@3355: { celestar@3355: return HASBIT(GetRailTypeInfo(enginetype)->powered_railtypes, tiletype); celestar@3355: } celestar@3355: matthijs@2782: /** matthijs@2782: * Checks if the given tracks overlap, ie form a crossing. Basically this matthijs@2782: * means when there is more than one track on the tile, exept when there are matthijs@2782: * two parallel tracks. matthijs@2782: * @param bits The tracks present. matthijs@2782: * @return Whether the tracks present overlap in any way. matthijs@2782: */ matthijs@2782: static inline bool TracksOverlap(TrackBits bits) matthijs@2782: { tron@4077: /* With no, or only one track, there is no overlap */ tron@4077: if (bits == 0 || KILL_FIRST_BIT(bits) == 0) return false; tron@4077: /* We know that there are at least two tracks present. When there are more tron@4077: * than 2 tracks, they will surely overlap. When there are two, they will tron@4077: * always overlap unless they are lower & upper or right & left. */ tron@3258: return bits != TRACK_BIT_HORZ && bits != TRACK_BIT_VERT; matthijs@2782: } matthijs@2782: tron@2520: void DrawTrainDepotSprite(int x, int y, int image, RailType railtype); tron@2520: void DrawDefaultWaypointSprite(int x, int y, RailType railtype); celestar@3355: celestar@3355: /** celestar@3355: * Draws overhead wires and pylons for electric railways. celestar@3355: * @param ti The TileInfo struct of the tile being drawn celestar@3355: * @see DrawCatenaryRailway celestar@3355: */ celestar@3355: void DrawCatenary(const TileInfo *ti); celestar@3355: tron@3636: uint GetRailFoundation(Slope tileh, TrackBits bits); celestar@5599: void DrawTile_Track(TileInfo *ti); celestar@5598: uint32 GetTileTrackStatus_Track(TileIndex tile, TransportType mode); celestar@5632: void DrawSignals(TileIndex tile, TrackBits rails); KUDr@5116: KUDr@5116: int32 SettingsDisableElrail(int32 p1); ///< _patches.disable_elrail callback KUDr@5116: celestar@2536: #endif /* RAIL_H */