mirror of https://github.com/OpenTTD/OpenTTD
(svn r9078) -Codechange: coding style.
parent
2e1bda2c1a
commit
8dc695edea
|
@ -125,9 +125,8 @@ static void AdjustTileh(TileIndex tile, Slope *tileh)
|
|||
{
|
||||
if (IsTileType(tile, MP_TUNNELBRIDGE)) {
|
||||
if (IsTunnel(tile)) {
|
||||
*tileh = SLOPE_STEEP; /* XXX - Hack to make tunnel entrances to always have a pylon */
|
||||
} else {
|
||||
if (*tileh != SLOPE_FLAT) {
|
||||
*tileh = SLOPE_STEEP; // XXX - Hack to make tunnel entrances to always have a pylon
|
||||
} else if (*tileh != SLOPE_FLAT) {
|
||||
*tileh = SLOPE_FLAT;
|
||||
} else {
|
||||
switch (GetBridgeRampDirection(tile)) {
|
||||
|
@ -140,7 +139,6 @@ static void AdjustTileh(TileIndex tile, Slope *tileh)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Draws wires and, if required, pylons on a given tile
|
||||
* @param ti The Tileinfo to draw the tile for
|
||||
|
@ -187,7 +185,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
|||
if (IsTunnelTile(neighbour) && i != GetTunnelDirection(neighbour)) trackconfig[TS_NEIGHBOUR] = TRACK_BIT_NONE;
|
||||
isflat[TS_NEIGHBOUR] = ((trackconfig[TS_NEIGHBOUR] & (TRACK_BIT_HORZ | TRACK_BIT_VERT)) != 0);
|
||||
|
||||
PPPpreferred[i] = 0xFF; /* We start with preferring everything (end-of-line in any direction) */
|
||||
PPPpreferred[i] = 0xFF; // We start with preferring everything (end-of-line in any direction)
|
||||
PPPallowed[i] = AllowedPPPonPCP[i];
|
||||
|
||||
/* We cycle through all the existing tracks at a PCP and see what
|
||||
|
@ -206,7 +204,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
|||
/* track found, if track is in the neighbour tile, adjust the number
|
||||
* of the PCP for preferred/allowed determination*/
|
||||
DiagDirection PCPpos = (TrackSourceTile[i][k] == TS_HOME) ? i : ReverseDiagDir(i);
|
||||
SETBIT(PCPstatus, i); /* This PCP is in use */
|
||||
SETBIT(PCPstatus, i); // This PCP is in use
|
||||
|
||||
PPPpreferred[i] &= PreferredPPPofTrackAtPCP[TracksAtPCP[i][k]][PCPpos];
|
||||
PPPallowed[i] &= ~DisallowedPPPofTrackAtPCP[TracksAtPCP[i][k]][PCPpos];
|
||||
|
@ -227,11 +225,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
|||
}
|
||||
|
||||
if (foundation != 0) {
|
||||
if (foundation < 15) {
|
||||
tileh[TS_NEIGHBOUR] = SLOPE_FLAT;
|
||||
} else {
|
||||
tileh[TS_NEIGHBOUR] = _inclined_tileh[foundation - 15];
|
||||
}
|
||||
tileh[TS_NEIGHBOUR] = foundation < 15 ? SLOPE_FLAT : _inclined_tileh[foundation - 15];
|
||||
}
|
||||
|
||||
AdjustTileh(neighbour, &tileh[TS_NEIGHBOUR]);
|
||||
|
@ -255,7 +249,9 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
|||
uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
|
||||
|
||||
if ((height <= TilePixelHeight(ti->tile) + TILE_HEIGHT) &&
|
||||
(i == PCPpositions[bridgetrack][0] || i == PCPpositions[bridgetrack][1])) SETBIT(OverridePCP, i);
|
||||
(i == PCPpositions[bridgetrack][0] || i == PCPpositions[bridgetrack][1])) {
|
||||
SETBIT(OverridePCP, i);
|
||||
}
|
||||
}
|
||||
|
||||
if (PPPallowed[i] != 0 && HASBIT(PCPstatus, i) && !HASBIT(OverridePCP, i)) {
|
||||
|
|
Loading…
Reference in New Issue