File diff r18261:0aa61ca7490f → r18262:3bc00eb1e3da
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -1141,13 +1141,13 @@ static void DrawTile_TunnelBridge(TileIn
 

	
 
		if (transport_type == TRANSPORT_ROAD) {
 
			RoadTypes rts = GetRoadTypes(ti->tile);
 

	
 
			if (HasBit(rts, ROADTYPE_TRAM)) {
 
				uint offset = tunnelbridge_direction;
 
				uint z = ti->z;
 
				int z = ti->z;
 
				if (ti->tileh != SLOPE_FLAT) {
 
					offset = (offset + 1) & 1;
 
					z += TILE_HEIGHT;
 
				} else {
 
					offset += 2;
 
				}
 
@@ -1275,13 +1275,13 @@ void DrawBridgeMiddle(const TileInfo *ti
 

	
 
	if (axis != AXIS_X) psid += 4;
 

	
 
	int x = ti->x;
 
	int y = ti->y;
 
	uint bridge_z = GetBridgePixelHeight(rampsouth);
 
	uint z = bridge_z - BRIDGE_Z_START;
 
	int z = bridge_z - BRIDGE_Z_START;
 

	
 
	/* Add a bounding box that separates the bridge from things below it. */
 
	AddSortableSpriteToDraw(SPR_EMPTY_BOUNDING_BOX, PAL_NONE, x, y, 16, 16, 1, bridge_z - TILE_HEIGHT + BB_Z_SEPARATOR);
 

	
 
	/* Draw Trambits as SpriteCombine */
 
	if (transport_type == TRANSPORT_ROAD || transport_type == TRANSPORT_RAIL) StartSpriteCombine();
 
@@ -1454,13 +1454,13 @@ static void TileLoop_TunnelBridge(TileIn
 
	bool snow_or_desert = HasTunnelBridgeSnowOrDesert(tile);
 
	switch (_settings_game.game_creation.landscape) {
 
		case LT_ARCTIC: {
 
			/* As long as we do not have a snow density, we want to use the density
 
			 * from the entry endge. For tunnels this is the lowest point for bridges the highest point.
 
			 * (Independent of foundations) */
 
			uint z = IsBridge(tile) ? GetTileMaxZ(tile) : GetTileZ(tile);
 
			int z = IsBridge(tile) ? GetTileMaxZ(tile) : GetTileZ(tile);
 
			if (snow_or_desert != (z > GetSnowLine())) {
 
				SetTunnelBridgeSnowOrDesert(tile, !snow_or_desert);
 
				MarkTileDirtyByTile(tile);
 
			}
 
			break;
 
		}