Go to the source code of this file.
Data Structures | |
struct | SortableSpriteStruct |
Defines | |
#define | PCP_NOT_ON_TRACK 0xFF |
#define | NUM_IGNORE_GROUPS 3 |
#define | IGNORE_NONE 0xFF |
Enumerations | |
enum | TLG { XEVEN_YEVEN = 0, XEVEN_YODD = 1, XODD_YEVEN = 2, XODD_YODD = 3, TLG_END } |
Tile Location group. More... | |
enum | TileSource { TS_HOME = 0, TS_NEIGHBOUR = 1, TS_END } |
When determining the pylon configuration on the edge, two tiles are taken into account: the tile being drawn itself (the home tile, the one in ti->tile), and the neighbouring tile. | |
enum | { NUM_TRACKS_AT_PCP = 6 } |
enum | { ELRAIL_ELEVATION = 10, ELRAIL_ELEVRAISE = ELRAIL_ELEVATION + TILE_HEIGHT } |
enum | CatenarySprite { WIRE_X_FLAT_SW, WIRE_X_FLAT_NE, WIRE_X_FLAT_BOTH, WIRE_X_UP_SW, WIRE_X_UP_NE, WIRE_X_UP_BOTH, WIRE_X_DOWN_SW, WIRE_X_DOWN_NE, WIRE_X_DOWN_BOTH, WIRE_Y_FLAT_SE, WIRE_Y_FLAT_NW, WIRE_Y_FLAT_BOTH, WIRE_Y_UP_SE, WIRE_Y_UP_NW, WIRE_Y_UP_BOTH, WIRE_Y_DOWN_SE, WIRE_Y_DOWN_NW, WIRE_Y_DOWN_BOTH, WIRE_NS_W_BOTH, WIRE_NS_E_BOTH, WIRE_NS_W_N, WIRE_NS_E_N, WIRE_NS_W_S, WIRE_NS_E_S, WIRE_EW_N_BOTH, WIRE_EW_S_BOTH, WIRE_EW_N_W, WIRE_EW_S_W, WIRE_EW_N_E, WIRE_EW_S_E, INVALID_CATENARY = 0xFF } |
Refers to a certain element of the catenary. More... | |
Variables | |
static byte | AllowedPPPonPCP [DIAGDIR_END] |
Which PPPs are possible at all on a given PCP. | |
static byte | OwnedPPPonPCP [DIAGDIR_END] |
Which of the PPPs are inside the tile. | |
static const DiagDirection | PCPpositions [TRACK_END][2] |
Maps a track bit onto two PCP positions. | |
static byte | PreferredPPPofTrackAtPCP [TRACK_END][DIAGDIR_END] |
Preferred points of each trackbit. | |
static byte | IgnoredPCP [NUM_IGNORE_GROUPS][TLG_END][DIAGDIR_END] |
In case we have a staight line, we place pylon only every two tiles, so there are certain tiles which we ignore. | |
static byte | DisallowedPPPofTrackAtPCP [TRACK_END][DIAGDIR_END] |
Which pylons can definately NOT be built. | |
static const Track | TracksAtPCP [DIAGDIR_END][NUM_TRACKS_AT_PCP] |
static const TileSource | TrackSourceTile [DIAGDIR_END][NUM_TRACKS_AT_PCP] |
static const Direction | PPPorder [DIAGDIR_END][TLG_END][DIR_END] |
static const int8 | x_pcp_offsets [DIAGDIR_END] = {0, 8, 16, 8} |
static const int8 | y_pcp_offsets [DIAGDIR_END] = {8, 16, 8, 0} |
static const int8 | x_ppp_offsets [DIR_END] = {-2, -4, -2, 0, 2, 4, 2, 0} |
static const int8 | y_ppp_offsets [DIR_END] = {-2, 0, 2, 4, 2, 0, -2, -4} |
static const SpriteID | pylon_sprites [] |
static const SortableSpriteStruct | CatenarySpriteData [] |
static const SortableSpriteStruct | CatenarySpriteData_Depot [] |
static const SortableSpriteStruct | CatenarySpriteData_Tunnel [] |
static const CatenarySprite | Wires [5][TRACK_END][4] |
Definition in file elrail_data.h.
anonymous enum |
ELRAIL_ELEVATION | Distance between wire and rail. |
ELRAIL_ELEVRAISE |
Wires that a draw one level higher than the north corner.
|
Definition at line 259 of file elrail_data.h.
enum CatenarySprite |
Refers to a certain element of the catenary.
Identifiers for Wires:
Definition at line 353 of file elrail_data.h.
enum TLG |
Tile Location group.
This defines whether the X and or Y coordinate of a tile is even
Definition at line 10 of file elrail_data.h.
byte AllowedPPPonPCP[DIAGDIR_END] [static] |
Initial value:
{ 1 << DIR_N | 1 << DIR_E | 1 << DIR_SE | 1 << DIR_S | 1 << DIR_W | 1 << DIR_NW, 1 << DIR_N | 1 << DIR_NE | 1 << DIR_E | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W, 1 << DIR_N | 1 << DIR_E | 1 << DIR_SE | 1 << DIR_S | 1 << DIR_W | 1 << DIR_NW, 1 << DIR_N | 1 << DIR_NE | 1 << DIR_E | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W, }
Definition at line 33 of file elrail_data.h.
Referenced by DrawCatenaryRailway().
const SortableSpriteStruct CatenarySpriteData_Depot[] [static] |
Initial value:
{ { SPR_WIRE_DEPOT_NE, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, { SPR_WIRE_DEPOT_SE, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, { SPR_WIRE_DEPOT_SW, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, { SPR_WIRE_DEPOT_NW, 7, 0, 1, 15, 1, ELRAIL_ELEVATION } }
Definition at line 327 of file elrail_data.h.
const SortableSpriteStruct CatenarySpriteData_Tunnel[] [static] |
Initial value:
{ { SPR_WIRE_TUNNEL_NE, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, { SPR_WIRE_TUNNEL_SE, 7, 0, 1, 15, 1, ELRAIL_ELEVATION }, { SPR_WIRE_TUNNEL_SW, 0, 7, 15, 1, 1, ELRAIL_ELEVATION }, { SPR_WIRE_TUNNEL_NW, 7, 0, 1, 15, 1, ELRAIL_ELEVATION } }
Definition at line 334 of file elrail_data.h.
byte DisallowedPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] [static] |
Initial value:
{ {1 << DIR_SW | 1 << DIR_NE, 0, 1 << DIR_SW | 1 << DIR_NE, 0 }, {0, 1 << DIR_NW | 1 << DIR_SE, 0, 1 << DIR_NW | 1 << DIR_SE}, {1 << DIR_W | 1 << DIR_E, 0, 0, 1 << DIR_W | 1 << DIR_E }, {0, 1 << DIR_W | 1 << DIR_E, 1 << DIR_W | 1 << DIR_E, 0 }, {0, 0, 1 << DIR_S | 1 << DIR_N, 1 << DIR_N | 1 << DIR_S }, {1 << DIR_S | 1 << DIR_N, 1 << DIR_S | 1 << DIR_N, 0, 0, }, }
Definition at line 181 of file elrail_data.h.
Referenced by DrawCatenaryRailway().
byte IgnoredPCP[NUM_IGNORE_GROUPS][TLG_END][DIAGDIR_END] [static] |
In case we have a staight line, we place pylon only every two tiles, so there are certain tiles which we ignore.
A straight line is found if we have exactly two PPPs.
Definition at line 106 of file elrail_data.h.
Referenced by DrawCatenaryRailway().
byte OwnedPPPonPCP[DIAGDIR_END] [static] |
Initial value:
{ 1 << DIR_SE | 1 << DIR_S | 1 << DIR_SW | 1 << DIR_W, 1 << DIR_N | 1 << DIR_SW | 1 << DIR_W | 1 << DIR_NW, 1 << DIR_N | 1 << DIR_NE | 1 << DIR_E | 1 << DIR_NW, 1 << DIR_NE | 1 << DIR_E | 1 << DIR_SE | 1 << DIR_S }
For the two PPPs on the tile border the following system is used: if you rotate the PCP so that it is in the north, the eastern PPP belongs to the tile.
Definition at line 43 of file elrail_data.h.
Referenced by DrawCatenaryRailway().
const DiagDirection PCPpositions[TRACK_END][2] [static] |
Initial value:
{ {DIAGDIR_NE, DIAGDIR_SW}, {DIAGDIR_SE, DIAGDIR_NW}, {DIAGDIR_NW, DIAGDIR_NE}, {DIAGDIR_SE, DIAGDIR_SW}, {DIAGDIR_SW, DIAGDIR_NW}, {DIAGDIR_NE, DIAGDIR_SE}, }
Definition at line 51 of file elrail_data.h.
Referenced by DrawCatenaryRailway().
const Direction PPPorder[DIAGDIR_END][TLG_END][DIR_END] [static] |
Initial value:
{ { {DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_N, DIR_E, DIR_S, DIR_W}, {DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_S, DIR_W, DIR_N, DIR_E}, {DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_S, DIR_W, DIR_N, DIR_E}, {DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_N, DIR_E, DIR_S, DIR_W}, }, { {DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_S, DIR_E, DIR_N, DIR_W}, {DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_N, DIR_W, DIR_S, DIR_E}, {DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_N, DIR_W, DIR_S, DIR_E}, {DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_S, DIR_E, DIR_N, DIR_W}, }, { {DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_S, DIR_W, DIR_N, DIR_E}, {DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_N, DIR_E, DIR_S, DIR_W}, {DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_N, DIR_E, DIR_S, DIR_W}, {DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_S, DIR_W, DIR_N, DIR_E}, }, { {DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_N, DIR_W, DIR_S, DIR_E}, {DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_S, DIR_E, DIR_N, DIR_W}, {DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_S, DIR_E, DIR_N, DIR_W}, {DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_N, DIR_W, DIR_S, DIR_E}, } }
Definition at line 208 of file elrail_data.h.
byte PreferredPPPofTrackAtPCP[TRACK_END][DIAGDIR_END] [static] |
Preferred points of each trackbit.
Those are the ones perpendicular to the track, plus the point in extension of the track (to mark end-of-track). PCPs which are not on either end of the track are fully preferred.
Definition at line 65 of file elrail_data.h.
Referenced by DrawCatenaryRailway().
const SpriteID pylon_sprites[] [static] |
Initial value:
{ SPR_PYLON_EW_N, SPR_PYLON_Y_NE, SPR_PYLON_NS_E, SPR_PYLON_X_SE, SPR_PYLON_EW_S, SPR_PYLON_Y_SW, SPR_PYLON_NS_W, SPR_PYLON_X_NW }
Definition at line 238 of file elrail_data.h.
const Track TracksAtPCP[DIAGDIR_END][NUM_TRACKS_AT_PCP] [static] |
Initial value:
{ {TRACK_X, TRACK_X, TRACK_UPPER, TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT}, {TRACK_Y, TRACK_Y, TRACK_UPPER, TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT}, {TRACK_X, TRACK_X, TRACK_UPPER, TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT}, {TRACK_Y, TRACK_Y, TRACK_UPPER, TRACK_LOWER, TRACK_LEFT, TRACK_RIGHT}, }
Definition at line 191 of file elrail_data.h.
const TileSource TrackSourceTile[DIAGDIR_END][NUM_TRACKS_AT_PCP] [static] |
Initial value:
{ {TS_HOME, TS_NEIGHBOUR, TS_HOME , TS_NEIGHBOUR, TS_NEIGHBOUR, TS_HOME }, {TS_HOME, TS_NEIGHBOUR, TS_NEIGHBOUR, TS_HOME , TS_NEIGHBOUR, TS_HOME }, {TS_HOME, TS_NEIGHBOUR, TS_NEIGHBOUR, TS_HOME , TS_HOME , TS_NEIGHBOUR}, {TS_HOME, TS_NEIGHBOUR, TS_HOME , TS_NEIGHBOUR, TS_HOME , TS_NEIGHBOUR}, }
Definition at line 200 of file elrail_data.h.