2005-07-24 15:12:37 +01:00
|
|
|
/* $Id$ */
|
|
|
|
|
2005-07-29 20:35:23 +01:00
|
|
|
/** @file rail.h */
|
|
|
|
|
(svn r2448) General cleanup of rail related code, more to follow.
* Add: rail.[ch] for rail-related enums and wrapper functions.
* Codechange: Removed dozens of magic numbers with below enums.
* Codechange: Rewrote CheckTrackCombination().
* Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants.
* Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays.
* Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones).
* Add: enums Direction and DiagDirection
* Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch].
* Codechange: move RailType enum from tile.h to rail.h.
* Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack.
* Add: Wrapper functions to access rail tiles, using above enums
* Add: Wrapper functions to modify tracks, trackdirs, directions, etc.
* Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code)
* Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.).
* Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead.
* Codechange: [NPF] Removed some unused globals and code from npf.c.
2005-06-16 19:04:02 +01:00
|
|
|
#ifndef RAIL_H
|
|
|
|
#define RAIL_H
|
|
|
|
|
2007-12-18 20:10:21 +00:00
|
|
|
#include "rail_type.h"
|
|
|
|
#include "track_type.h"
|
2007-12-21 22:50:51 +00:00
|
|
|
#include "vehicle_type.h"
|
2007-12-21 19:21:21 +00:00
|
|
|
#include "core/bitmath_func.hpp"
|
2007-10-14 22:20:12 +01:00
|
|
|
#include "variables.h"
|
2007-12-21 21:50:46 +00:00
|
|
|
#include "economy_func.h"
|
(svn r2448) General cleanup of rail related code, more to follow.
* Add: rail.[ch] for rail-related enums and wrapper functions.
* Codechange: Removed dozens of magic numbers with below enums.
* Codechange: Rewrote CheckTrackCombination().
* Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants.
* Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays.
* Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones).
* Add: enums Direction and DiagDirection
* Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch].
* Codechange: move RailType enum from tile.h to rail.h.
* Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack.
* Add: Wrapper functions to access rail tiles, using above enums
* Add: Wrapper functions to modify tracks, trackdirs, directions, etc.
* Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code)
* Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.).
* Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead.
* Codechange: [NPF] Removed some unused globals and code from npf.c.
2005-06-16 19:04:02 +01:00
|
|
|
|
2005-07-29 22:36:02 +01:00
|
|
|
/** This struct contains all the info that is needed to draw and construct tracks.
|
|
|
|
*/
|
2007-03-07 12:11:48 +00:00
|
|
|
struct RailtypeInfo {
|
2005-08-03 12:08:13 +01:00
|
|
|
/** Struct containing the main sprites. @note not all sprites are listed, but only
|
|
|
|
* the ones used directly in the code */
|
2005-07-29 22:36:02 +01:00
|
|
|
struct {
|
|
|
|
SpriteID track_y; ///< single piece of rail in Y direction, with ground
|
|
|
|
SpriteID track_ns; ///< two pieces of rail in North and South corner (East-West direction)
|
|
|
|
SpriteID ground; ///< ground sprite for a 3-way switch
|
|
|
|
SpriteID single_y; ///< single piece of rail in Y direction, without ground
|
|
|
|
SpriteID single_x; ///< single piece of rail in X direction
|
|
|
|
SpriteID single_n; ///< single piece of rail in the northern corner
|
|
|
|
SpriteID single_s; ///< single piece of rail in the southern corner
|
|
|
|
SpriteID single_e; ///< single piece of rail in the eastern corner
|
|
|
|
SpriteID single_w; ///< single piece of rail in the western corner
|
2005-10-13 17:00:14 +01:00
|
|
|
SpriteID crossing; ///< level crossing, rail in X direction
|
|
|
|
SpriteID tunnel; ///< tunnel sprites base
|
2005-07-29 22:36:02 +01:00
|
|
|
} base_sprites;
|
|
|
|
|
2005-08-03 12:08:13 +01:00
|
|
|
/** struct containing the sprites for the rail GUI. @note only sprites referred to
|
|
|
|
* directly in the code are listed */
|
|
|
|
struct {
|
|
|
|
SpriteID build_ns_rail; ///< button for building single rail in N-S direction
|
|
|
|
SpriteID build_x_rail; ///< button for building single rail in X direction
|
|
|
|
SpriteID build_ew_rail; ///< button for building single rail in E-W direction
|
|
|
|
SpriteID build_y_rail; ///< button for building single rail in Y direction
|
|
|
|
SpriteID auto_rail; ///< button for the autorail construction
|
|
|
|
SpriteID build_depot; ///< button for building depots
|
|
|
|
SpriteID build_tunnel; ///< button for building a tunnel
|
|
|
|
SpriteID convert_rail; ///< button for converting rail
|
|
|
|
} gui_sprites;
|
|
|
|
|
2005-10-14 09:11:18 +01:00
|
|
|
struct {
|
2007-08-03 13:29:56 +01:00
|
|
|
CursorID rail_ns; ///< Cursor for building rail in N-S direction
|
|
|
|
CursorID rail_swne; ///< Cursor for building rail in X direction
|
|
|
|
CursorID rail_ew; ///< Cursor for building rail in E-W direction
|
|
|
|
CursorID rail_nwse; ///< Cursor for building rail in Y direction
|
|
|
|
CursorID autorail; ///< Cursor for autorail tool
|
|
|
|
CursorID depot; ///< Cursor for building a depot
|
|
|
|
CursorID tunnel; ///< Cursor for building a tunnel
|
|
|
|
CursorID convert; ///< Cursor for converting track
|
2005-10-14 09:11:18 +01:00
|
|
|
} cursor;
|
|
|
|
|
2005-08-03 12:08:13 +01:00
|
|
|
struct {
|
|
|
|
StringID toolbar_caption;
|
|
|
|
} strings;
|
|
|
|
|
2005-07-29 22:36:02 +01:00
|
|
|
/** sprite number difference between a piece of track on a snowy ground and the corresponding one on normal ground */
|
|
|
|
SpriteID snow_offset;
|
|
|
|
|
2006-03-29 17:30:26 +01:00
|
|
|
/** bitmask to the OTHER railtypes on which an engine of THIS railtype generates power */
|
|
|
|
RailTypeMask powered_railtypes;
|
|
|
|
|
|
|
|
/** bitmask to the OTHER railtypes on which an engine of THIS railtype can physically travel */
|
|
|
|
RailTypeMask compatible_railtypes;
|
2005-07-31 23:53:57 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Offset between the current railtype and normal rail. This means that:<p>
|
|
|
|
* 1) All the sprites in a railset MUST be in the same order. This order
|
|
|
|
* is determined by normal rail. Check sprites 1005 and following for this order<p>
|
|
|
|
* 2) The position where the railtype is loaded must always be the same, otherwise
|
2007-04-04 02:35:16 +01:00
|
|
|
* the offset will fail.
|
2005-07-31 23:53:57 +01:00
|
|
|
* @note: Something more flexible might be desirable in the future.
|
|
|
|
*/
|
|
|
|
SpriteID total_offset;
|
2005-10-19 09:34:37 +01:00
|
|
|
|
|
|
|
/**
|
2006-06-27 22:25:53 +01:00
|
|
|
* Bridge offset
|
|
|
|
*/
|
2005-10-19 09:34:37 +01:00
|
|
|
SpriteID bridge_offset;
|
2006-04-11 11:45:06 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Offset to add to ground sprite when drawing custom waypoints / stations
|
|
|
|
*/
|
|
|
|
byte custom_ground_offset;
|
2007-03-07 12:11:48 +00:00
|
|
|
};
|
2005-07-29 22:36:02 +01:00
|
|
|
|
|
|
|
|
2007-04-04 02:35:16 +01:00
|
|
|
/** these are the maximums used for updating signal blocks, and checking if a depot is in a pbs block */
|
2005-07-04 15:58:55 +01:00
|
|
|
enum {
|
2007-04-04 02:35:16 +01:00
|
|
|
NUM_SSD_ENTRY = 256, ///< max amount of blocks
|
|
|
|
NUM_SSD_STACK = 32, ///< max amount of blocks to check recursively
|
2005-07-04 15:58:55 +01:00
|
|
|
};
|
(svn r2448) General cleanup of rail related code, more to follow.
* Add: rail.[ch] for rail-related enums and wrapper functions.
* Codechange: Removed dozens of magic numbers with below enums.
* Codechange: Rewrote CheckTrackCombination().
* Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants.
* Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays.
* Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones).
* Add: enums Direction and DiagDirection
* Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch].
* Codechange: move RailType enum from tile.h to rail.h.
* Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack.
* Add: Wrapper functions to access rail tiles, using above enums
* Add: Wrapper functions to modify tracks, trackdirs, directions, etc.
* Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code)
* Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.).
* Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead.
* Codechange: [NPF] Removed some unused globals and code from npf.c.
2005-06-16 19:04:02 +01:00
|
|
|
|
2007-08-03 13:29:56 +01:00
|
|
|
/*
|
(svn r2448) General cleanup of rail related code, more to follow.
* Add: rail.[ch] for rail-related enums and wrapper functions.
* Codechange: Removed dozens of magic numbers with below enums.
* Codechange: Rewrote CheckTrackCombination().
* Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants.
* Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays.
* Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones).
* Add: enums Direction and DiagDirection
* Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch].
* Codechange: move RailType enum from tile.h to rail.h.
* Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack.
* Add: Wrapper functions to access rail tiles, using above enums
* Add: Wrapper functions to modify tracks, trackdirs, directions, etc.
* Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code)
* Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.).
* Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead.
* Codechange: [NPF] Removed some unused globals and code from npf.c.
2005-06-16 19:04:02 +01:00
|
|
|
* Functions to map tracks to the corresponding bits in the signal
|
|
|
|
* presence/status bytes in the map. You should not use these directly, but
|
|
|
|
* wrapper functions below instead. XXX: Which are these?
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Maps a trackdir to the bit that stores its status in the map arrays, in the
|
|
|
|
* direction along with the trackdir.
|
|
|
|
*/
|
2007-02-26 22:32:21 +00:00
|
|
|
static inline byte SignalAlongTrackdir(Trackdir trackdir)
|
|
|
|
{
|
|
|
|
extern const byte _signal_along_trackdir[TRACKDIR_END];
|
|
|
|
return _signal_along_trackdir[trackdir];
|
|
|
|
}
|
(svn r2448) General cleanup of rail related code, more to follow.
* Add: rail.[ch] for rail-related enums and wrapper functions.
* Codechange: Removed dozens of magic numbers with below enums.
* Codechange: Rewrote CheckTrackCombination().
* Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants.
* Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays.
* Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones).
* Add: enums Direction and DiagDirection
* Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch].
* Codechange: move RailType enum from tile.h to rail.h.
* Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack.
* Add: Wrapper functions to access rail tiles, using above enums
* Add: Wrapper functions to modify tracks, trackdirs, directions, etc.
* Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code)
* Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.).
* Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead.
* Codechange: [NPF] Removed some unused globals and code from npf.c.
2005-06-16 19:04:02 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Maps a trackdir to the bit that stores its status in the map arrays, in the
|
|
|
|
* direction against the trackdir.
|
|
|
|
*/
|
2007-02-26 22:32:21 +00:00
|
|
|
static inline byte SignalAgainstTrackdir(Trackdir trackdir)
|
|
|
|
{
|
2005-06-17 12:30:50 +01:00
|
|
|
extern const byte _signal_against_trackdir[TRACKDIR_END];
|
|
|
|
return _signal_against_trackdir[trackdir];
|
|
|
|
}
|
(svn r2448) General cleanup of rail related code, more to follow.
* Add: rail.[ch] for rail-related enums and wrapper functions.
* Codechange: Removed dozens of magic numbers with below enums.
* Codechange: Rewrote CheckTrackCombination().
* Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants.
* Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays.
* Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones).
* Add: enums Direction and DiagDirection
* Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch].
* Codechange: move RailType enum from tile.h to rail.h.
* Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack.
* Add: Wrapper functions to access rail tiles, using above enums
* Add: Wrapper functions to modify tracks, trackdirs, directions, etc.
* Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code)
* Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.).
* Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead.
* Codechange: [NPF] Removed some unused globals and code from npf.c.
2005-06-16 19:04:02 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Maps a Track to the bits that store the status of the two signals that can
|
|
|
|
* be present on the given track.
|
|
|
|
*/
|
2007-02-26 22:32:21 +00:00
|
|
|
static inline byte SignalOnTrack(Track track)
|
|
|
|
{
|
2005-06-17 12:30:50 +01:00
|
|
|
extern const byte _signal_on_track[TRACK_END];
|
|
|
|
return _signal_on_track[track];
|
|
|
|
}
|
(svn r2448) General cleanup of rail related code, more to follow.
* Add: rail.[ch] for rail-related enums and wrapper functions.
* Codechange: Removed dozens of magic numbers with below enums.
* Codechange: Rewrote CheckTrackCombination().
* Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants.
* Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays.
* Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones).
* Add: enums Direction and DiagDirection
* Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch].
* Codechange: move RailType enum from tile.h to rail.h.
* Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack.
* Add: Wrapper functions to access rail tiles, using above enums
* Add: Wrapper functions to modify tracks, trackdirs, directions, etc.
* Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code)
* Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.).
* Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead.
* Codechange: [NPF] Removed some unused globals and code from npf.c.
2005-06-16 19:04:02 +01:00
|
|
|
|
|
|
|
|
2005-06-22 23:38:18 +01:00
|
|
|
|
2005-07-29 22:36:02 +01:00
|
|
|
/**
|
|
|
|
* Returns a pointer to the Railtype information for a given railtype
|
|
|
|
* @param railtype the rail type which the information is requested for
|
|
|
|
* @return The pointer to the RailtypeInfo
|
|
|
|
*/
|
2005-07-29 23:13:04 +01:00
|
|
|
static inline const RailtypeInfo *GetRailTypeInfo(RailType railtype)
|
2005-07-29 22:36:02 +01:00
|
|
|
{
|
2007-02-26 22:32:21 +00:00
|
|
|
extern RailtypeInfo _railtypes[RAILTYPE_END];
|
2005-07-29 22:36:02 +01:00
|
|
|
assert(railtype < RAILTYPE_END);
|
2005-07-29 23:13:04 +01:00
|
|
|
return &_railtypes[railtype];
|
2005-07-29 22:36:02 +01:00
|
|
|
}
|
|
|
|
|
2005-07-03 14:02:54 +01:00
|
|
|
/**
|
|
|
|
* Checks if an engine of the given RailType can drive on a tile with a given
|
|
|
|
* RailType. This would normally just be an equality check, but for electric
|
|
|
|
* rails (which also support non-electric engines).
|
|
|
|
* @return Whether the engine can drive on this tile.
|
|
|
|
* @param enginetype The RailType of the engine we are considering.
|
|
|
|
* @param tiletype The RailType of the tile we are considering.
|
|
|
|
*/
|
|
|
|
static inline bool IsCompatibleRail(RailType enginetype, RailType tiletype)
|
|
|
|
{
|
2007-11-19 21:02:30 +00:00
|
|
|
return HasBit(GetRailTypeInfo(enginetype)->compatible_railtypes, tiletype);
|
2005-07-03 14:02:54 +01:00
|
|
|
}
|
|
|
|
|
2007-08-03 13:29:56 +01:00
|
|
|
/**
|
|
|
|
* Checks if an engine of the given RailType got power on a tile with a given
|
|
|
|
* RailType. This would normally just be an equality check, but for electric
|
|
|
|
* rails (which also support non-electric engines).
|
|
|
|
* @return Whether the engine got power on this tile.
|
|
|
|
* @param enginetype The RailType of the engine we are considering.
|
|
|
|
* @param tiletype The RailType of the tile we are considering.
|
|
|
|
*/
|
2006-03-29 17:30:26 +01:00
|
|
|
static inline bool HasPowerOnRail(RailType enginetype, RailType tiletype)
|
|
|
|
{
|
2007-11-19 21:02:30 +00:00
|
|
|
return HasBit(GetRailTypeInfo(enginetype)->powered_railtypes, tiletype);
|
2006-03-29 17:30:26 +01:00
|
|
|
}
|
|
|
|
|
2007-10-14 22:20:12 +01:00
|
|
|
|
|
|
|
extern int _railtype_cost_multiplier[RAILTYPE_END];
|
|
|
|
extern const int _default_railtype_cost_multiplier[RAILTYPE_END];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the cost of building the specified railtype.
|
|
|
|
* @param railtype The railtype being built.
|
|
|
|
* @return The cost multiplier.
|
|
|
|
*/
|
|
|
|
static inline Money RailBuildCost(RailType railtype)
|
|
|
|
{
|
|
|
|
assert(railtype < RAILTYPE_END);
|
|
|
|
return (_price.build_rail * _railtype_cost_multiplier[railtype]) >> 3;
|
|
|
|
}
|
|
|
|
|
2007-12-08 19:53:30 +00:00
|
|
|
/**
|
|
|
|
* Calculates the cost of rail conversion
|
|
|
|
* @param from The railtype we are converting from
|
|
|
|
* @param to The railtype we are converting to
|
|
|
|
* @return Cost per TrackBit
|
|
|
|
*/
|
|
|
|
static inline Money RailConvertCost(RailType from, RailType to)
|
|
|
|
{
|
|
|
|
/* rail -> el. rail
|
|
|
|
* calculate the price as 5 / 4 of (cost build el. rail) - (cost build rail)
|
|
|
|
* (the price of workers to get to place is that 1/4)
|
|
|
|
*/
|
|
|
|
if (HasPowerOnRail(from, to)) {
|
|
|
|
return ((RailBuildCost(to) - RailBuildCost(from)) * 5) >> 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* el. rail -> rail
|
|
|
|
* calculate the price as 1 / 4 of (cost build el. rail) - (cost build rail)
|
|
|
|
* (the price of workers is 1 / 4 + price of copper sold to a recycle center)
|
|
|
|
*/
|
|
|
|
if (HasPowerOnRail(to, from)) {
|
|
|
|
return (RailBuildCost(from) - RailBuildCost(to)) >> 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* make the price the same as remove + build new type */
|
|
|
|
return RailBuildCost(to) + _price.remove_rail;
|
|
|
|
}
|
|
|
|
|
2007-09-08 10:52:02 +01:00
|
|
|
void *UpdateTrainPowerProc(Vehicle *v, void *data);
|
2005-10-16 10:13:04 +01:00
|
|
|
void DrawTrainDepotSprite(int x, int y, int image, RailType railtype);
|
|
|
|
void DrawDefaultWaypointSprite(int x, int y, RailType railtype);
|
2006-03-29 17:30:26 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Draws overhead wires and pylons for electric railways.
|
|
|
|
* @param ti The TileInfo struct of the tile being drawn
|
|
|
|
* @see DrawCatenaryRailway
|
|
|
|
*/
|
|
|
|
void DrawCatenary(const TileInfo *ti);
|
2007-09-19 17:36:42 +01:00
|
|
|
void DrawCatenaryOnTunnel(const TileInfo *ti);
|
2006-03-29 17:30:26 +01:00
|
|
|
|
2007-07-26 17:51:10 +01:00
|
|
|
Foundation GetRailFoundation(Slope tileh, TrackBits bits);
|
2006-11-17 19:31:44 +00:00
|
|
|
|
|
|
|
int32 SettingsDisableElrail(int32 p1); ///< _patches.disable_elrail callback
|
|
|
|
|
2005-09-18 21:56:44 +01:00
|
|
|
#endif /* RAIL_H */
|