(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
parent
9c96bcb997
commit
a7d8ad0004
@ -0,0 +1,7 @@
|
||||
/* $Id */
|
||||
|
||||
KNOWN BUGS / PROBLEMS:
|
||||
|
||||
Normal and elrail depots look the same. Use 'X' (transparent buildings)
|
||||
to distinguish between them
|
||||
Missing curors / icons for construction (currently using the conventional ones)
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 62 KiB |
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
Binary file not shown.
After Width: | Height: | Size: 61 KiB |
@ -0,0 +1,352 @@
|
||||
/* $Id$ */
|
||||
/** @file elrail.c
|
||||
* This file deals with displaying wires and pylons for electric railway systems.
|
||||
<h2>Basics</h2>
|
||||
|
||||
<h3>Tile Types</h3>
|
||||
|
||||
We have two different types of tiles in the drawing code:
|
||||
Normal Railway Tiles (NRTs) which can have more than one track on it, and
|
||||
Special Railways tiles (SRTs) which have only one track (like crossings, depots
|
||||
stations, etc).
|
||||
|
||||
<h3>Location Categories</h3>
|
||||
|
||||
All tiles are categorized into three location groups (TLG):
|
||||
Group 0: Tiles with both an even X coordinate and an even Y coordinate
|
||||
Group 1: Tiles with an even X and an odd Y coordinate
|
||||
Group 2: Tiles with an odd X and an even Y coordinate
|
||||
Group 3: Tiles with both an odd X and Y coordnate.
|
||||
|
||||
<h3>Pylon Points</h3>
|
||||
<h4>Control Points</h4>
|
||||
A Pylon Control Point (PCP) is a position where a wire (or rather two)
|
||||
is mounted onto a pylon.
|
||||
Each NRT does contain 4 PCPs which are mapped to a byte
|
||||
variable and are represented by the DiagDirection enum:
|
||||
|
||||
A wire that ends on the PCP has a dark ending, otherwise the end is bright.<p>
|
||||
|
||||
Now on each edge there are two PCPs: One from each adjacent tile. Both PCPs are merged
|
||||
using an OR matrix (i. e. if one tile needs a PCP at the postion in question, both
|
||||
tiles get it).
|
||||
|
||||
<h4>Position Points</h4>
|
||||
A Pylon Position Point (PPP) is a position where a pylon is located on the ground.
|
||||
Each PCP owns 8 in (45 degree steps) PPPs that are located around it. PPPs are numbered
|
||||
0 to 7 with 0 starting north and numbering in clockwise direction. Each track bit has PPPs
|
||||
that are impossible (because the pylon would be situated on the track), preferred (because
|
||||
the pylon would be rectangular to the track). PPPs are represented by the Direction enum.
|
||||
|
||||
<img src="../../elrail_tile.png">
|
||||
<img src="../../elrail_track.png">
|
||||
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "tile.h"
|
||||
#include "viewport.h"
|
||||
#include "functions.h" /* We should REALLY get rid of this goddamn file, as it is butt-ugly */
|
||||
#include "variables.h" /* ... same here */
|
||||
#include "rail.h"
|
||||
#include "debug.h"
|
||||
#include "tunnel_map.h"
|
||||
#include "road_map.h"
|
||||
#include "bridge_map.h"
|
||||
#include "bridge.h"
|
||||
#include "rail_map.h"
|
||||
#include "table/sprites.h"
|
||||
#include "table/elrail_data.h"
|
||||
|
||||
static inline TLG GetTLG(TileIndex t)
|
||||
{
|
||||
return (HASBIT(TileX(t), 0) << 1) + HASBIT(TileY(t), 0);
|
||||
}
|
||||
|
||||
/** Finds which Rail Bits are present on a given tile. For bridge tiles,
|
||||
* returns track bits under the bridge
|
||||
*/
|
||||
static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
|
||||
{
|
||||
switch (GetTileType(t)) {
|
||||
case MP_RAILWAY:
|
||||
if (GetRailType(t) != RAILTYPE_ELECTRIC) return 0;
|
||||
switch (GetRailTileType(t)) {
|
||||
case RAIL_TYPE_NORMAL: case RAIL_TYPE_SIGNALS:
|
||||
return GetTrackBits(t);
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case MP_TUNNELBRIDGE:
|
||||
if (IsTunnel(t)) {
|
||||
if (GetRailType(t) != RAILTYPE_ELECTRIC) return 0;
|
||||
if (override != NULL) *override = 1 << GetTunnelDirection(t);
|
||||
return (_m[t].m5 & 1) ? TRACK_BIT_Y : TRACK_BIT_X;
|
||||
} else {
|
||||
if (GetRailType(t) != RAILTYPE_ELECTRIC) return 0;
|
||||
if (
|
||||
IsBridgeMiddle(t) &&
|
||||
IsTransportUnderBridge(t) &&
|
||||
GetTransportTypeUnderBridge(t) == TRANSPORT_RAIL) {
|
||||
return GetRailBitsUnderBridge(t);
|
||||
} else {
|
||||
if (override != NULL && DistanceMax(t, GetOtherBridgeEnd(t)) > 1) *override = 1 << GetBridgeRampDirection(t);
|
||||
|
||||
return GetBridgeAxis(t) == AXIS_X ? TRACK_BIT_X : TRACK_BIT_Y;
|
||||
}
|
||||
}
|
||||
case MP_STREET:
|
||||
if ((_m[t].m4 & 0xF) != RAILTYPE_ELECTRIC) return 0;
|
||||
return GetCrossingRailBits(t);
|
||||
case MP_STATION:
|
||||
if (GetRailType(t) != RAILTYPE_ELECTRIC) return 0;
|
||||
return _m[t].m5 & 1 ? TRACK_BIT_Y : TRACK_BIT_X;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/** Draws wires and, if required, pylons on a given tile
|
||||
* @param ti The Tileinfo to draw the tile for
|
||||
* @todo Currently, each pylon is drawn twice (once for each neighbouring tiles use OwnedPPPonPCP for this)
|
||||
*/
|
||||
static void DrawCatenaryRailway(const TileInfo *ti)
|
||||
{
|
||||
/* Pylons are placed on a tile edge, so we need to take into account
|
||||
the track configuration of 2 adjacent tiles. trackconfig[0] stores the
|
||||
current tile (home tile) while [1] holds the neighbour */
|
||||
TrackBits trackconfig[TS_END];
|
||||
bool isflat[TS_END];
|
||||
/* Note that ti->tileh has already been adjusted for Foundations */
|
||||
uint tileh[TS_END] = {ti->tileh, 0};
|
||||
|
||||
TLG tlg = GetTLG(ti->tile);
|
||||
byte PCPstatus = 0;
|
||||
byte OverridePCP = 0;
|
||||
byte PPPpreferred[DIAGDIR_END] = {0xFF, 0xFF, 0xFF, 0xFF};
|
||||
byte PPPallowed[DIAGDIR_END] = {AllowedPPPonPCP[0], AllowedPPPonPCP[1], AllowedPPPonPCP[2], AllowedPPPonPCP[3]};
|
||||
byte PPPbuffer[DIAGDIR_END];
|
||||
DiagDirection i;
|
||||
Track t;
|
||||
|
||||
/* Find which rail bits are present, and select the override points.
|
||||
We don't draw a pylon:
|
||||
1) INSIDE a tunnel (we wouldn't see it anyway)
|
||||
2) on the "far" end of a bridge head (the one that connects to bridge middle),
|
||||
because that one is drawn on the bridge. Exception is for length 0 bridges
|
||||
which have no middle tiles */
|
||||
trackconfig[TS_HOME] = GetRailTrackBitsUniversal(ti->tile, &OverridePCP);
|
||||
/* If a track bit is present that is not in the main direction, the track is level */
|
||||
isflat[TS_HOME] = trackconfig[TS_HOME] & (TRACK_BIT_UPPER | TRACK_BIT_LOWER | TRACK_BIT_LEFT | TRACK_BIT_RIGHT);
|
||||
|
||||
if (IsTunnelTile(ti->tile)) tileh[TS_HOME] = 0;
|
||||
if (IsBridgeTile(ti->tile) && IsBridgeRamp(ti->tile)) {
|
||||
if (tileh[TS_HOME] != 0) {
|
||||
tileh[TS_HOME] = 0;
|
||||
} else {
|
||||
switch (GetBridgeRampDirection(ti->tile)) {
|
||||
case DIAGDIR_NE: tileh[TS_HOME] = 12; break;
|
||||
case DIAGDIR_SE: tileh[TS_HOME] = 6; break;
|
||||
case DIAGDIR_SW: tileh[TS_HOME] = 3; break;
|
||||
case DIAGDIR_NW: tileh[TS_HOME] = 9; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = DIAGDIR_NE; i < DIAGDIR_END; i++) {
|
||||
extern const TileIndexDiffC _tileoffs_by_dir[];
|
||||
TileIndex neighbour = ti->tile + TileOffsByDir(i);
|
||||
uint foundation = 0;
|
||||
int k;
|
||||
|
||||
/* Here's one of the main headaches. GetTileSlope does not correct for possibly
|
||||
existing foundataions, so we do have to do that manually later on.*/
|
||||
tileh[TS_NEIGHBOUR] = GetTileSlope(neighbour, NULL);
|
||||
trackconfig[TS_NEIGHBOUR] = GetRailTrackBitsUniversal(neighbour, NULL);
|
||||
isflat[TS_NEIGHBOUR] = trackconfig[TS_NEIGHBOUR] & (TRACK_BIT_UPPER | TRACK_BIT_LOWER | TRACK_BIT_LEFT | TRACK_BIT_RIGHT);
|
||||
|
||||
/* We cycle through all the existing tracks at a PCP and see what
|
||||
PPPs we want to have, or may not have at all */
|
||||
for (k = 0; k < TRACKS_AT_PCP; k++) {
|
||||
/* Next to us, we have a bridge head, don't worry about that one, if it shows away from us */
|
||||
if (
|
||||
trackorigin[i][k] == TS_NEIGHBOUR &&
|
||||
IsBridgeTile(neighbour) && IsBridgeRamp(neighbour) &&
|
||||
GetBridgeRampDirection(neighbour) == ReverseDiagDir(i)
|
||||
) continue;
|
||||
|
||||
if (HASBIT(trackconfig[trackorigin[i][k]], PPPtracks[i][k])) {
|
||||
DiagDirection PCPpos = (trackorigin[i][k] == 0) ? i : ReverseDiagDir(i);
|
||||
PCPstatus |= 1 << i; /* This PCP is in use */
|
||||
PPPpreferred[i] &= PreferredPPPofTrackBitAtPCP[PPPtracks[i][k]][PCPpos];
|
||||
PPPallowed[i] &= ~DisallowedPPPofTrackBitAtPCP[PPPtracks[i][k]][PCPpos];
|
||||
}
|
||||
}
|
||||
|
||||
/* Deactivate all PPPs if PCP is not used */
|
||||
PPPpreferred[i] *= HASBIT(PCPstatus, i);
|
||||
PPPallowed[i] *= HASBIT(PCPstatus, i);
|
||||
|
||||
/* Station on a non-flat tile means foundation. add one height level and adjust tileh */
|
||||
if (IsTileType(neighbour, MP_STATION) && tileh[TS_NEIGHBOUR] != 0) tileh[TS_NEIGHBOUR] = 0;
|
||||
|
||||
/* Read the foundataions if they are present, and adjust the tileh */
|
||||
if (IsTileType(neighbour, MP_RAILWAY)) foundation = GetRailFoundation(tileh[TS_NEIGHBOUR], trackconfig[TS_NEIGHBOUR]);
|
||||
if (IsBridgeTile(neighbour) && IsBridgeRamp(neighbour)) foundation = GetBridgeFoundation(tileh[TS_NEIGHBOUR], GetBridgeAxis(neighbour));
|
||||
if (foundation != 0) {
|
||||
if (foundation < 15) {
|
||||
tileh[TS_NEIGHBOUR] = 0;
|
||||
} else {
|
||||
tileh[TS_NEIGHBOUR] = _inclined_tileh[foundation - 15];
|
||||
}
|
||||
}
|
||||
|
||||
/* Convert the real tileh into a pseudo-tileh for the track */
|
||||
if (IsTunnelTile(neighbour)) tileh[TS_NEIGHBOUR] = 0;
|
||||
if (IsBridgeTile(neighbour) && IsBridgeRamp(neighbour)) {
|
||||
if (tileh[TS_NEIGHBOUR] != 0) {
|
||||
tileh[TS_NEIGHBOUR] = 0;
|
||||
} else {
|
||||
switch (GetBridgeRampDirection(neighbour)) {
|
||||
case DIAGDIR_NE: tileh[TS_NEIGHBOUR] = 12; break;
|
||||
case DIAGDIR_SE: tileh[TS_NEIGHBOUR] = 6; break;
|
||||
case DIAGDIR_SW: tileh[TS_NEIGHBOUR] = 3; break;
|
||||
case DIAGDIR_NW: tileh[TS_NEIGHBOUR] = 9; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If we have a straight (and level) track, we want a pylon only every 2 tiles
|
||||
Delete the PCP if this is the case. */
|
||||
/* Level means that the slope is the same, or the track is flat */
|
||||
if (tileh[TS_HOME] == tileh[TS_NEIGHBOUR] || (isflat[TS_HOME] && isflat[TS_NEIGHBOUR])) {
|
||||
for (k = 0; k < NUM_IGNORE_GROUPS; k++)
|
||||
if (PPPpreferred[i] == IgnoredPCP[k][tlg][i]) PCPstatus &= ~(1 << i);
|
||||
}
|
||||
|
||||
/* Now decide where we draw our tiles. First try the preferred PPPs, but they may not exist.
|
||||
In that case, we try the any of the allowed ones. if they don't exist either, don't draw
|
||||
anything */
|
||||
if (PPPpreferred[i] != 0) {
|
||||
/* Some of the preferred PPPs (the ones in direct extension of the track bit)
|
||||
have been used as an "end of line" marker. As these are not ALLOWED, this operation
|
||||
cancles them out */
|
||||
PPPbuffer[i] = PPPpreferred[i] & PPPallowed[i];
|
||||
/* We haven't any buffer yet, so try something else. Fixes 90° curves */
|
||||
if (PPPbuffer[i] == 0) PPPbuffer[i] = PPPallowed[i];
|
||||
} else {
|
||||
PPPbuffer[i] = PPPallowed[i];
|
||||
}
|
||||
|
||||
if (PPPbuffer[i] != 0 && HASBIT(PCPstatus, i) && !HASBIT(OverridePCP, i)) {
|
||||
for (k = 0; k < DIR_END; k++) {
|
||||
byte temp = PPPorder[i][GetTLG(ti->tile)][k];
|
||||
if (HASBIT(PPPbuffer[i], temp)) {
|
||||
uint x = ti->x + x_pcp_offsets[i] + x_ppp_offsets[temp];
|
||||
uint y = ti->y + y_pcp_offsets[i] + y_ppp_offsets[temp];
|
||||
|
||||
/* Don't build the pylon if it would be outside the tile */
|
||||
if (!HASBIT(OwnedPPPonPCP[i], temp)) {
|
||||
/* We have a neighour that will draw it, bail out */
|
||||
if (trackconfig[TS_NEIGHBOUR] != 0) break;
|
||||
continue; /* No neighbour, go looking for a better position */
|
||||
}
|
||||
|
||||
AddSortableSpriteToDraw(pylons_normal[temp], x, y, 1, 1, 10,
|
||||
GetSlopeZ(ti->x + x_pcp_offsets[i], ti->y + y_pcp_offsets[i]));
|
||||
break; /* We already have drawn a pylon, bail out */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Drawing of pylons is finished, now draw the wires */
|
||||
for (t = 0; t < TRACK_END; t++) {
|
||||
if (HASBIT(trackconfig[TS_HOME], t)) {
|
||||
|
||||
byte PCPconfig = HASBIT(PCPstatus, PCPpositions[t][0]) +
|
||||
(HASBIT(PCPstatus, PCPpositions[t][1]) << 1);
|
||||
|
||||
const SortableSpriteStruct *sss;
|
||||
int tileh_selector = !(tileh[TS_HOME] % 3) * tileh[TS_HOME] / 3; /* tileh for the slopes, 0 otherwise */
|
||||
|
||||
if ( /* We are not drawing a wire under a low bridge */
|
||||
IsBridgeTile(ti->tile) &&
|
||||
IsBridgeMiddle(ti->tile) &&
|
||||
!(_display_opt & DO_TRANS_BUILDINGS) &&
|
||||
GetBridgeHeight(t) <= TilePixelHeight(t)
|
||||
) return;
|
||||
|
||||
assert(PCPconfig != 0); /* We have a pylon on neither end of the wire, that doesn't work (since we have no sprites for that) */
|
||||
assert(!IsSteepTileh(tileh[TS_HOME]));
|
||||
sss = &CatenarySpriteData[Wires[tileh_selector][t][PCPconfig]];
|
||||
|
||||
AddSortableSpriteToDraw( sss->image, ti->x + sss->x_offset, ti->y + sss->y_offset,
|
||||
sss->x_size, sss->y_size, sss->z_size, GetSlopeZ(ti->x + min(sss->x_offset, 15), ti->y + min(sss->y_offset, 15)) + sss->z_offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void DrawCatenaryOnBridge(const TileInfo *ti)
|
||||
{
|
||||
TileIndex start = GetOtherBridgeEnd(GetSouthernBridgeEnd(ti->tile));
|
||||
uint length = GetBridgeLength(GetSouthernBridgeEnd(ti->tile), GetOtherBridgeEnd(GetSouthernBridgeEnd(ti->tile)));
|
||||
uint num = DistanceMax(ti->tile, start);
|
||||
const SortableSpriteStruct *sss;
|
||||
Axis axis = GetBridgeAxis(ti->tile);
|
||||
TLG tlg = GetTLG(ti->tile);
|
||||
|
||||
CatenarySprite offset = axis == AXIS_X ? 0 : WIRE_Y_FLAT_BOTH - WIRE_X_FLAT_BOTH;
|
||||
|
||||
if ((length % 2) && num == length) {
|
||||
sss = &CatenarySpriteData[WIRE_X_FLAT_BOTH + offset];
|
||||
} else {
|
||||
sss = &CatenarySpriteData[WIRE_X_FLAT_SW + (num % 2) + offset];
|
||||
}
|
||||
|
||||
if (num % 2) {
|
||||
if (axis == AXIS_X) {
|
||||
AddSortableSpriteToDraw( pylons_bridge[0 + HASBIT(tlg, 0)], ti->x, ti->y + 4 + 8 * HASBIT(tlg, 0), 1, 1, 10, GetBridgeHeight(ti->tile) + 8);
|
||||
} else {
|
||||
AddSortableSpriteToDraw( pylons_bridge[2 + HASBIT(tlg, 1)], ti->x + 4 + 8 * HASBIT(tlg, 1), ti->y, 1, 1, 10, GetBridgeHeight(ti->tile) + 8);
|
||||
}
|
||||
}
|
||||
|
||||
if (DistanceMax(ti->tile, start) == length) { /* need a pylon here (the southern end) */
|
||||
if (axis == AXIS_X) {
|
||||
AddSortableSpriteToDraw( pylons_bridge[0 + HASBIT(tlg, 0)], ti->x + 16, ti->y + 4 + 8 * HASBIT(tlg, 0), 1, 1, 10, GetBridgeHeight(ti->tile) + 8);
|
||||
} else {
|
||||
AddSortableSpriteToDraw( pylons_bridge[2 + HASBIT(tlg, 1)], ti->x + 4 + 8 * HASBIT(tlg, 1), ti->y + 16, 1, 1, 10, GetBridgeHeight(ti->tile) + 8);
|
||||
}
|
||||
}
|
||||
|
||||
AddSortableSpriteToDraw( sss->image, ti->x + sss->x_offset, ti->y + sss->y_offset,
|
||||
sss->x_size, sss->y_size, sss->z_size, GetBridgeHeight(ti->tile) + sss->z_offset + 8);
|
||||
}
|
||||
|
||||
void DrawCatenary(const TileInfo *ti)
|
||||
{
|
||||
switch (GetTileType(ti->tile)) {
|
||||
case MP_RAILWAY:
|
||||
if (GetRailTileType(ti->tile) == RAIL_TYPE_DEPOT_WAYPOINT && GetRailTileSubtype(ti->tile) == RAIL_SUBTYPE_DEPOT) {
|
||||
const SortableSpriteStruct *sss = &CatenarySpriteData[WIRE_DEPOT_SW + ReverseDiagDir(GetRailDepotDirection(ti->tile))];
|
||||
AddSortableSpriteToDraw( sss->image, ti->x + sss->x_offset, ti->y + sss->y_offset,
|
||||
sss->x_size, sss->y_size, sss->z_size, GetSlopeZ(ti->x, ti->y) + sss->z_offset);
|
||||
return;
|
||||
}
|
||||
/* Fall through */
|
||||
case MP_TUNNELBRIDGE:
|
||||
if (IsBridgeTile(ti->tile) && IsBridgeMiddle(ti->tile) && GetRailTypeOnBridge(ti->tile) == RAILTYPE_ELECTRIC) DrawCatenaryOnBridge(ti);
|
||||
/* Fall further */
|
||||
case MP_STREET: case MP_STATION:
|
||||
DrawCatenaryRailway(ti);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,362 @@
|
||||
/* $Id */
|
||||
/** @file elrail_data.h Stores all the data for overhead wire and pylon drawing. @see elrail.c */
|
||||
|
||||
#ifndef ELRAIL_DATA_H
|
||||
#define ELRAIL_DATA_H
|
||||
|
||||
/** Tile Location group. This defines whether the X and or Y coordinate of a tile is even */
|
||||
typedef enum TLG {
|
||||
XEVEN_YEVEN = 0,
|
||||
XEVEN_YODD = 1,
|
||||
XODD_YEVEN = 2,
|
||||
XODD_YODD = 3,
|
||||
TLG_END
|
||||
} TLG;
|
||||
|
||||
/** 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
|
||||
*/
|
||||
typedef enum {
|
||||
TS_HOME = 0,
|
||||
TS_NEIGHBOUR = 1,
|
||||
|
||||
TS_END
|
||||
} TileSource;
|
||||
|
||||
enum {
|
||||
TRACKS_AT_PCP = 6
|
||||
};
|
||||
|
||||
/** Which PPPs are possible at all on a given PCP */
|
||||
static byte AllowedPPPonPCP[DIAGDIR_END] = {
|
||||
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,
|
||||
};
|
||||
|
||||
/** Which of the PPPs are inside the tile. 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. */
|
||||
static byte OwnedPPPonPCP[DIAGDIR_END] = {
|
||||
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
|
||||
};
|
||||
|
||||
/** 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).*/
|
||||
static byte PreferredPPPofTrackBitAtPCP[TRACK_END][DIAGDIR_END] = {
|
||||
{1 << DIR_NE | 1 << DIR_SE | 1 << DIR_NW, 0xFF, 1 << DIR_SE | 1 << DIR_SW | 1 << DIR_NW, 0xFF }, /* X */
|
||||
{0xFF, 1 << DIR_NE | 1 << DIR_SE | 1 << DIR_SW, 0xFF, 1 << DIR_SW | 1 << DIR_NW | 1 << DIR_NE }, /* Y */
|
||||
{1 << DIR_E | 1 << DIR_N | 1 << DIR_S, 0xFF, 0xFF, 1 << DIR_W | 1 << DIR_N | 1 << DIR_S}, /* UPPER */
|
||||
{0xFF, 1 << DIR_E | 1 << DIR_N | 1 << DIR_S, 1 << DIR_W | 1 << DIR_N | 1 << DIR_S, 0xFF}, /* LOWER */
|
||||
{0xFF, 0xFF, 1 << DIR_S | 1 << DIR_E | 1 << DIR_W, 1 << DIR_N | 1 << DIR_E | 1 << DIR_W}, /* LEFT */
|
||||
{1 << DIR_N | 1 << DIR_E | 1 << DIR_W, 1 << DIR_S | 1 << DIR_E | 1 << DIR_W, 0xFF, 0xFF}, /* RIGHT */
|
||||
};
|
||||
|
||||
#define NUM_IGNORE_GROUPS 3
|
||||
/** 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 preferred points.*/
|
||||
static byte IgnoredPCP[NUM_IGNORE_GROUPS][TLG_END][DIAGDIR_END] = {
|
||||
{
|
||||
{1 << DIR_N | 1 << DIR_S , 1 << DIR_NE | 1 << DIR_SW, 1 << DIR_NW | 1 << DIR_SE, 1 << DIR_W | 1 << DIR_E},
|
||||
{0xFF , 1 << DIR_E | 1 << DIR_W, 1 << DIR_NW | 1 << DIR_SE, 1 << DIR_NE | 1 << DIR_SW},
|
||||
{1 << DIR_NW | 1 << DIR_SE, 1 << DIR_NE | 1 << DIR_SW, 1 << DIR_N | 1 << DIR_S , 0xFF},
|
||||
{1 << DIR_NW | 1 << DIR_SE, 0xFF , 0xFF, 1 << DIR_NE | 1 << DIR_SW}
|
||||
},
|
||||
{
|
||||
{1 << DIR_E | 1 << DIR_W, 1 << DIR_N | 1 << DIR_S, 0xFF, 1 << DIR_E | 1 << DIR_W},
|
||||
{0xFF, 0xFF, 1 << DIR_N | 1 << DIR_S, 1 << DIR_N | 1 << DIR_S},
|
||||
{0xFF, 1 << DIR_E | 1 << DIR_W, 1 << DIR_E | 1 << DIR_W, 1 << DIR_N | 1 << DIR_S},
|
||||
{1 << DIR_N | 1 << DIR_S, 1 << DIR_N | 1 << DIR_S, 0xFF, 1 << DIR_E | 1 << DIR_W}
|
||||
},
|
||||
{
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{0xFF, 0xFF, 1 << DIR_E | 1 << DIR_W, 0xFF},
|
||||
{0xFF, 0xFF, 0xFF, 0xFF},
|
||||
{1 << DIR_E | 1 << DIR_W, 0xFF, 0xFF, 0xFF}
|
||||
}
|
||||
};
|
||||
|
||||
/** Which pylons can definately NOT be built */
|
||||
static byte DisallowedPPPofTrackBitAtPCP[TRACK_END][DIAGDIR_END] = {
|
||||
{1 << DIR_SW | 1 << DIR_NE, 0, 1 << DIR_SW | 1 << DIR_NE, 0 }, /* X */
|
||||
{0, 1 << DIR_NW | 1 << DIR_SE, 0, 1 << DIR_NW | 1 << DIR_SE}, /* Y */
|
||||
{1 << DIR_W | 1 << DIR_E, 0, 0, 1 << DIR_W | 1 << DIR_E }, /* UPPER */
|
||||
{0, 1 << DIR_W | 1 << DIR_E, 1 << DIR_W | 1 << DIR_E, 0 }, /* LOWER */
|
||||
{0, 0, 1 << DIR_S | 1 << DIR_N, 1 << DIR_N | 1 << DIR_S }, /* LEFT */
|
||||
{1 << DIR_S | 1 << DIR_N, 1 << DIR_S | 1 << DIR_N, 0, 0, }, /* RIGHT */
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
SpriteID image;
|
||||
int8 x_offset;
|
||||
int8 y_offset;
|
||||
int8 x_size;
|
||||
int8 y_size;
|
||||
int8 z_size;
|
||||
int8 z_offset;
|
||||
} SortableSpriteStruct;
|
||||
|
||||
enum {
|
||||
/** Distance between wire and rail */
|
||||
ELRAIL_ELEVATION = 8,
|
||||
/** Corrects an off-by-one error in some places (tileh 12 and 9) (TODO -- find source of error) */
|
||||
ELRAIL_ELEV_CORR = ELRAIL_ELEVATION + 1,
|
||||
/** Wires that a draw one level higher than the north corner. */
|
||||
ELRAIL_ELEVRAISE = ELRAIL_ELEVATION + TILE_HEIGHT
|
||||
};
|
||||
|
||||
static const SortableSpriteStruct CatenarySpriteData[] = {
|
||||
/* X direction */
|
||||
/* Flat tiles: */
|
||||
/* Wires */
|
||||
{ SPR_WIRE_X_SW, 0, 8, 16, 1, 1, ELRAIL_ELEVATION }, //! 0: Wire in X direction, pylon on the SW end only
|
||||
{ SPR_WIRE_X_NE, 0, 8, 16, 1, 1, ELRAIL_ELEVATION }, //! 1: Wire in X direction, pylon on the NE end
|
||||
{ SPR_WIRE_X_SHORT, 0, 8, 16, 1, 1, ELRAIL_ELEVATION }, //! 2: Wire in X direction, pylon on both ends
|
||||
|
||||
/* "up" tiles */
|
||||
/* Wires */
|
||||
{ SPR_WIRE_X_SW_UP, 0, 8, 16, 8, 1, ELRAIL_ELEVRAISE }, //! 3: Wire in X pitch up, pylon on the SW end only
|
||||
{ SPR_WIRE_X_NE_UP, 0, 8, 16, 8, 1, ELRAIL_ELEVRAISE }, //! 4: Wire in X pitch up, pylon on the NE end
|
||||
{ SPR_WIRE_X_SHORT_UP, 0, 8, 16, 8, 1, ELRAIL_ELEVRAISE }, //! 5: Wire in X pitch up, pylon on both ends
|
||||
|
||||
/* "down" tiles */
|
||||
/* Wires */
|
||||
{ SPR_WIRE_X_SW_DOWN, 0, 8, 16, 8, 1, ELRAIL_ELEV_CORR }, //! 6: Wire in X pitch down, pylon on the SW end
|
||||
{ SPR_WIRE_X_NE_DOWN, 0, 8, 16, 8, 1, ELRAIL_ELEV_CORR }, //! 7: Wire in X pitch down, pylon on the NE end
|
||||
{ SPR_WIRE_X_SHORT_DOWN, 0, 8, 16, 8, 1, ELRAIL_ELEV_CORR }, //! 8: Wire in X pitch down, pylon on both ends
|
||||
|
||||
|
||||
/* Y direction */
|
||||
/* Flat tiles: */
|
||||
/* Wires */
|
||||
{ SPR_WIRE_Y_SE, 8, 0, 1, 16, 1, ELRAIL_ELEVATION }, //! 9: Wire in Y direction, pylon on the SE end only
|
||||
{ SPR_WIRE_Y_NW, 8, 0, 1, 16, 1, ELRAIL_ELEVATION }, //!10: Wire in Y direction, pylon on the NW end
|
||||
{ SPR_WIRE_Y_SHORT, 8, 0, 1, 16, 1, ELRAIL_ELEVATION }, //!11: Wire in Y direction, pylon on both ends
|
||||
|
||||
/* "up" tiles */
|
||||
/* Wires */
|
||||
{ SPR_WIRE_Y_SE_UP, 8, 0, 8, 16, 1, ELRAIL_ELEVRAISE }, //!12: Wire in Y pitch up, pylon on the SE end only
|
||||
{ SPR_WIRE_Y_NW_UP, 8, 0, 8, 16, 1, ELRAIL_ELEVRAISE }, //!13: Wire in Y pitch up, pylon on the NW end
|
||||
{ SPR_WIRE_Y_SHORT_UP, 8, 0, 8, 16, 1, ELRAIL_ELEVRAISE }, //!14: Wire in Y pitch up, pylon on both ends
|
||||
|
||||
/* "down" tiles */
|
||||
/* Wires */
|
||||
{ SPR_WIRE_Y_SE_DOWN, 8, 0, 8, 16, 1, ELRAIL_ELEV_CORR }, //!15: Wire in Y pitch down, pylon on the SE end
|
||||
{ SPR_WIRE_Y_NW_DOWN, 8, 0, 8, 16, 1, ELRAIL_ELEV_CORR }, //!16: Wire in Y pitch down, pylon on the NW end
|
||||
{ SPR_WIRE_Y_SHORT_DOWN, 8, 0, 8, 16, 1, ELRAIL_ELEV_CORR }, //!17: Wire in Y pitch down, pylon on both ends
|
||||
|
||||
/* NS Direction */
|
||||
{ SPR_WIRE_NS_SHORT, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!18: LEFT trackbit wire, pylon on both ends
|
||||
{ SPR_WIRE_NS_SHORT, 0, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!19: RIGHT trackbit wire, pylon on both ends
|
||||
|
||||
{ SPR_WIRE_NS_N, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!20: LEFT trackbit wire, pylon on N end
|
||||
{ SPR_WIRE_NS_N, 0, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!21: RIGHT trackbit wire, pylon on N end
|
||||
|
||||
{ SPR_WIRE_NS_S, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!22: LEFT trackbit wire, pylon on S end
|
||||
{ SPR_WIRE_NS_S, 0, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!23: RIGHT trackbit wire, pylon on S end
|
||||
|
||||
/* EW Direction */
|
||||
{ SPR_WIRE_EW_SHORT, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!24: UPPER trackbit wire, pylon on both ends
|
||||
{ SPR_WIRE_EW_SHORT, 16, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!25: LOWER trackbit wire, pylon on both ends
|
||||
|
||||
{ SPR_WIRE_EW_W, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!28: UPPER trackbit wire, pylon on both ends
|
||||
{ SPR_WIRE_EW_W, 16, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!29: LOWER trackbit wire, pylon on both ends
|
||||
|
||||
{ SPR_WIRE_EW_E, 8, 0, 8, 8, 1, ELRAIL_ELEVATION }, //!32: UPPER trackbit wire, pylon on both ends
|
||||
{ SPR_WIRE_EW_E, 16, 8, 8, 8, 1, ELRAIL_ELEVATION }, //!33: LOWER trackbit wire, pylon on both ends
|
||||
|
||||
/* Depots */
|
||||
{ SPR_WIRE_DEPOT_SW, 0, 8, 8, 1, 1, ELRAIL_ELEVATION }, //!36: Wire for SW depot exit
|
||||
{ SPR_WIRE_DEPOT_NW, 8, 0, 1, 8, 1, ELRAIL_ELEVATION }, //!37: Wire for NW depot exit
|
||||
{ SPR_WIRE_DEPOT_NE, 0, 8, 8, 1, 1, ELRAIL_ELEVATION }, //!38: Wire for NE depot exit
|
||||
{ SPR_WIRE_DEPOT_SE, 8, 0, 1, 8, 1, ELRAIL_ELEVATION }, //!39: Wire for SE depot exit
|
||||
};
|
||||
|
||||
/** Refers to a certain element of the catenary.
|
||||
* Identifiers for Wires:
|
||||
* <ol><li>Direction of the wire</li>
|
||||
* <li>Slope of the tile for diagonals, placement inside the track for horiz/vertical pieces</li>
|
||||
* <li>Place where a pylon shoule be</li></ol>
|
||||
* Identifiers for Pylons:
|
||||
* <ol><li>Direction of the wire</li>
|
||||
* <li>Slope of the tile</li>
|
||||
* <li>Position of the Pylon relative to the track</li>
|
||||
* <li>Position of the Pylon inside the tile</li></ol>
|
||||
*/
|
||||
typedef enum {
|
||||
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,
|
||||
|
||||
WIRE_DEPOT_SW,
|
||||
WIRE_DEPOT_NW,
|
||||
WIRE_DEPOT_NE,
|
||||
WIRE_DEPOT_SE,
|
||||
|
||||
INVALID_CATENARY = 0xFF
|
||||
} CatenarySprite;
|
||||
|
||||
/* This array stores which track bits can meet at a tile edge */
|
||||
static const Track PPPtracks[DIAGDIR_END][TRACKS_AT_PCP] = {
|
||||
{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},
|
||||
};
|
||||
|
||||
/* takes each of the 8 track bits from the array above and
|
||||
assigns it to the home tile or neighbour tile */
|
||||
static const TileSource trackorigin[DIAGDIR_END][TRACKS_AT_PCP] = {
|
||||
{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},
|
||||
};
|
||||
|
||||
/* Several PPPs maybe exist, here they are sorted in order of preference. */
|
||||
static const Direction PPPorder[DIAGDIR_END][TLG_END][DIR_END] = { /* X - Y */
|
||||
{ /* PCP 0 */
|
||||
{DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_N, DIR_E, DIR_S, DIR_W}, /* evn - evn */
|
||||
{DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_S, DIR_W, DIR_N, DIR_E}, /* evn - odd */
|
||||
{DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_S, DIR_W, DIR_N, DIR_E}, /* odd - evn */
|
||||
{DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_N, DIR_E, DIR_S, DIR_W}, /* odd - odd */
|
||||
}, {/* PCP 1 */
|
||||
{DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_S, DIR_E, DIR_N, DIR_W}, /* evn - evn */
|
||||
{DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_N, DIR_W, DIR_S, DIR_E}, /* evn - odd */
|
||||
{DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_N, DIR_W, DIR_S, DIR_E}, /* odd - evn */
|
||||
{DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_S, DIR_E, DIR_N, DIR_W}, /* odd - odd */
|
||||
}, {/* PCP 2 */
|
||||
{DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_S, DIR_W, DIR_N, DIR_E}, /* evn - evn */
|
||||
{DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_N, DIR_E, DIR_S, DIR_W}, /* evn - odd */
|
||||
{DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_N, DIR_E, DIR_S, DIR_W}, /* odd - evn */
|
||||
{DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_S, DIR_W, DIR_N, DIR_E}, /* odd - odd */
|
||||
}, {/* PCP 3 */
|
||||
{DIR_NE, DIR_NW, DIR_SE, DIR_SW, DIR_N, DIR_W, DIR_S, DIR_E}, /* evn - evn */
|
||||
{DIR_NE, DIR_SE, DIR_SW, DIR_NW, DIR_S, DIR_E, DIR_N, DIR_W}, /* evn - odd */
|
||||
{DIR_SW, DIR_NW, DIR_NE, DIR_SE, DIR_S, DIR_E, DIR_N, DIR_W}, /* odd - evn */
|
||||
{DIR_SW, DIR_SE, DIR_NE, DIR_NW, DIR_N, DIR_W, DIR_S, DIR_E}, /* odd - odd */
|
||||
}
|
||||
};
|
||||
/* Geometric placement of the PCP relative to the tile origin */
|
||||
static const char x_pcp_offsets[DIAGDIR_END] = {0, 8, 15, 8};
|
||||
static const char y_pcp_offsets[DIAGDIR_END] = {8, 15, 8, 0};
|
||||
/* Geometric placement of the PPP relative to the PCP*/
|
||||
static const char x_ppp_offsets[DIR_END] = {-3, -4, -3, 0, +3, +4, +3, 0};
|
||||
static const char y_ppp_offsets[DIR_END] = {-3, 0, +3, +4, +3, 0, -3, -4};
|
||||
/* The type of pylon to draw at each PPP */
|
||||
static const SpriteID pylons_normal[] = {
|
||||
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
|
||||
};
|
||||
|
||||
static const SpriteID pylons_bridge[] = {
|
||||
SPR_PYLON_X_NW,
|
||||
SPR_PYLON_X_SE,
|
||||
SPR_PYLON_Y_NE,
|
||||
SPR_PYLON_Y_SW
|
||||
};
|
||||
|
||||
/* Maps a track bit onto two PCP positions */
|
||||
static const byte PCPpositions[TRACK_END][2] = {
|
||||
{0, 2}, /* X */
|
||||
{1, 3}, /* Y */
|
||||
{3, 0}, /* UPPER */
|
||||
{1, 2}, /* LOWER */
|
||||
{2, 3}, /* LEFT */
|
||||
{0, 1}, /* RIGHT */
|
||||
};
|
||||
|
||||
/* Selects a Wire (with white and grey ends) depending on whether:
|
||||
a) none (should never happen)
|
||||
b) the first
|
||||
c) the second
|
||||
d) both
|
||||
PCP exists.*/
|
||||
static const CatenarySprite Wires[5][TRACK_END][4] = {
|
||||
{ /* Tileh == 0 */
|
||||
{INVALID_CATENARY, WIRE_X_FLAT_NE, WIRE_X_FLAT_SW, WIRE_X_FLAT_BOTH},
|
||||
{INVALID_CATENARY, WIRE_Y_FLAT_SE, WIRE_Y_FLAT_NW, WIRE_Y_FLAT_BOTH},
|
||||
{INVALID_CATENARY, WIRE_EW_N_W, WIRE_EW_N_E, WIRE_EW_N_BOTH},
|
||||
{INVALID_CATENARY, WIRE_EW_S_E, WIRE_EW_S_W, WIRE_EW_S_BOTH},
|
||||
{INVALID_CATENARY, WIRE_NS_W_S, WIRE_NS_W_N, WIRE_NS_W_BOTH},
|
||||
{INVALID_CATENARY, WIRE_NS_E_N, WIRE_NS_E_S, WIRE_NS_E_BOTH},
|
||||
}, { /* Tileh == 3 */
|
||||
{INVALID_CATENARY, WIRE_X_UP_NE, WIRE_X_UP_SW, WIRE_X_UP_BOTH},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
}, { /* Tileh == 6 */
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, WIRE_Y_UP_SE, WIRE_Y_UP_NW, WIRE_Y_UP_BOTH},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
}, { /* Tileh == 9 */
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, WIRE_Y_DOWN_SE, WIRE_Y_DOWN_NW, WIRE_Y_DOWN_BOTH},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
}, { /* Tileh == 12 */
|
||||
{INVALID_CATENARY, WIRE_X_DOWN_NE, WIRE_X_DOWN_SW, WIRE_X_DOWN_BOTH},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
{INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY, INVALID_CATENARY},
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* ELRAIL_DATA_H */
|
||||
|
Loading…
Reference in New Issue