|
|
|
@ -189,7 +189,7 @@ void DrawCatenaryOnTunnel(const TileInfo *ti)
|
|
|
|
|
sss->image, PAL_NONE, ti->x + sss->x_offset, ti->y + sss->y_offset,
|
|
|
|
|
BB_data[2] - sss->x_offset, BB_data[3] - sss->y_offset, BB_Z_SEPARATOR - sss->z_offset + 1,
|
|
|
|
|
GetTileZ(ti->tile) + sss->z_offset,
|
|
|
|
|
IsTransparencySet(TO_BUILDINGS),
|
|
|
|
|
IsTransparencySet(TO_CATENARY),
|
|
|
|
|
BB_data[0] - sss->x_offset, BB_data[1] - sss->y_offset, BB_Z_SEPARATOR - sss->z_offset
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
@ -336,7 +336,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
|
|
|
|
|
|
|
|
|
AddSortableSpriteToDraw(pylon_sprites[temp], PAL_NONE, x, y, 1, 1, BB_HEIGHT_UNDER_BRIDGE,
|
|
|
|
|
GetPCPElevation(ti->tile, i),
|
|
|
|
|
IsTransparencySet(TO_BUILDINGS), -1, -1);
|
|
|
|
|
IsTransparencySet(TO_CATENARY), -1, -1);
|
|
|
|
|
break; /* We already have drawn a pylon, bail out */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -344,7 +344,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Don't draw a wire under a low bridge */
|
|
|
|
|
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_BUILDINGS)) {
|
|
|
|
|
if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_CATENARY)) {
|
|
|
|
|
uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile));
|
|
|
|
|
|
|
|
|
|
if (height <= GetTileMaxZ(ti->tile) + TILE_HEIGHT) return;
|
|
|
|
@ -371,7 +371,7 @@ static void DrawCatenaryRailway(const TileInfo *ti)
|
|
|
|
|
*/
|
|
|
|
|
AddSortableSpriteToDraw(sss->image, PAL_NONE, ti->x + sss->x_offset, ti->y + sss->y_offset,
|
|
|
|
|
sss->x_size, sss->y_size, sss->z_size, GetSlopeZ(ti->x + sss->x_offset, ti->y + sss->y_offset) + sss->z_offset,
|
|
|
|
|
IsTransparencySet(TO_BUILDINGS));
|
|
|
|
|
IsTransparencySet(TO_CATENARY));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -404,7 +404,7 @@ static void DrawCatenaryOnBridge(const TileInfo *ti)
|
|
|
|
|
|
|
|
|
|
AddSortableSpriteToDraw(sss->image, PAL_NONE, ti->x + sss->x_offset, ti->y + sss->y_offset,
|
|
|
|
|
sss->x_size, sss->y_size, sss->z_size, height + sss->z_offset,
|
|
|
|
|
IsTransparencySet(TO_BUILDINGS)
|
|
|
|
|
IsTransparencySet(TO_CATENARY)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/* Finished with wires, draw pylons */
|
|
|
|
@ -415,7 +415,7 @@ static void DrawCatenaryOnBridge(const TileInfo *ti)
|
|
|
|
|
if (HasBit(tlg, (axis == AXIS_X ? 0 : 1))) PPPpos = ReverseDir(PPPpos);
|
|
|
|
|
uint x = ti->x + x_pcp_offsets[PCPpos] + x_ppp_offsets[PPPpos];
|
|
|
|
|
uint y = ti->y + y_pcp_offsets[PCPpos] + y_ppp_offsets[PPPpos];
|
|
|
|
|
AddSortableSpriteToDraw(pylon_sprites[PPPpos], PAL_NONE, x, y, 1, 1, BB_HEIGHT_UNDER_BRIDGE, height, IsTransparencySet(TO_BUILDINGS), -1, -1);
|
|
|
|
|
AddSortableSpriteToDraw(pylon_sprites[PPPpos], PAL_NONE, x, y, 1, 1, BB_HEIGHT_UNDER_BRIDGE, height, IsTransparencySet(TO_CATENARY), -1, -1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* need a pylon on the southern end of the bridge */
|
|
|
|
@ -425,7 +425,7 @@ static void DrawCatenaryOnBridge(const TileInfo *ti)
|
|
|
|
|
if (HasBit(tlg, (axis == AXIS_X ? 0 : 1))) PPPpos = ReverseDir(PPPpos);
|
|
|
|
|
uint x = ti->x + x_pcp_offsets[PCPpos] + x_ppp_offsets[PPPpos];
|
|
|
|
|
uint y = ti->y + y_pcp_offsets[PCPpos] + y_ppp_offsets[PPPpos];
|
|
|
|
|
AddSortableSpriteToDraw(pylon_sprites[PPPpos], PAL_NONE, x, y, 1, 1, BB_HEIGHT_UNDER_BRIDGE, height, IsTransparencySet(TO_BUILDINGS), -1, -1);
|
|
|
|
|
AddSortableSpriteToDraw(pylon_sprites[PPPpos], PAL_NONE, x, y, 1, 1, BB_HEIGHT_UNDER_BRIDGE, height, IsTransparencySet(TO_CATENARY), -1, -1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -451,7 +451,7 @@ void DrawCatenary(const TileInfo *ti)
|
|
|
|
|
sss->image, PAL_NONE, ti->x + sss->x_offset, ti->y + sss->y_offset,
|
|
|
|
|
sss->x_size, sss->y_size, sss->z_size,
|
|
|
|
|
GetTileMaxZ(ti->tile) + sss->z_offset,
|
|
|
|
|
IsTransparencySet(TO_BUILDINGS)
|
|
|
|
|
IsTransparencySet(TO_CATENARY)
|
|
|
|
|
);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|