equal
deleted
inserted
replaced
968 * @param ti information about the tile (slopes, height etc) |
968 * @param ti information about the tile (slopes, height etc) |
969 * @param tram the roadbits for the tram |
969 * @param tram the roadbits for the tram |
970 */ |
970 */ |
971 void DrawTramCatenary(TileInfo *ti, RoadBits tram) |
971 void DrawTramCatenary(TileInfo *ti, RoadBits tram) |
972 { |
972 { |
|
973 /* Do not draw catenary if it is invisible */ |
|
974 if (IsInvisibilitySet(TO_CATENARY)) return; |
|
975 |
973 /* Don't draw the catenary under a low bridge */ |
976 /* Don't draw the catenary under a low bridge */ |
974 if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_CATENARY)) { |
977 if (MayHaveBridgeAbove(ti->tile) && IsBridgeAbove(ti->tile) && !IsTransparencySet(TO_CATENARY)) { |
975 uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile)); |
978 uint height = GetBridgeHeight(GetNorthernBridgeEnd(ti->tile)); |
976 |
979 |
977 if (height <= GetTileMaxZ(ti->tile) + TILE_HEIGHT) return; |
980 if (height <= GetTileMaxZ(ti->tile) + TILE_HEIGHT) return; |
1151 } else { |
1154 } else { |
1152 dts = &_road_depot[GetRoadDepotDirection(ti->tile)]; |
1155 dts = &_road_depot[GetRoadDepotDirection(ti->tile)]; |
1153 } |
1156 } |
1154 |
1157 |
1155 DrawGroundSprite(dts->ground.sprite, PAL_NONE); |
1158 DrawGroundSprite(dts->ground.sprite, PAL_NONE); |
|
1159 |
|
1160 /* End now if buildings are invisible */ |
|
1161 if (IsInvisibilitySet(TO_BUILDINGS)) break; |
1156 |
1162 |
1157 for (dtss = dts->seq; dtss->image.sprite != 0; dtss++) { |
1163 for (dtss = dts->seq; dtss->image.sprite != 0; dtss++) { |
1158 SpriteID image = dtss->image.sprite; |
1164 SpriteID image = dtss->image.sprite; |
1159 SpriteID pal; |
1165 SpriteID pal; |
1160 |
1166 |