From d4dc5e07752762ee4d6a425a533786b26257a438 Mon Sep 17 00:00:00 2001 From: frosch Date: Fri, 25 Jan 2008 15:47:58 +0000 Subject: (svn r11983) -Codechange: Add some helper functions for slopes and use them. --- src/elrail.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/elrail.cpp') diff --git a/src/elrail.cpp b/src/elrail.cpp index 600909c4c..fcd8a3df6 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -130,13 +130,7 @@ static void AdjustTileh(TileIndex tile, Slope *tileh) } else if (*tileh != SLOPE_FLAT) { *tileh = SLOPE_FLAT; } else { - switch (GetTunnelBridgeDirection(tile)) { - case DIAGDIR_NE: *tileh = SLOPE_NE; break; - case DIAGDIR_SE: *tileh = SLOPE_SE; break; - case DIAGDIR_SW: *tileh = SLOPE_SW; break; - case DIAGDIR_NW: *tileh = SLOPE_NW; break; - default: NOT_REACHED(); - } + *tileh = InclinedSlope(GetTunnelBridgeDirection(tile)); } } } -- cgit v1.2.3-70-g09d2