summaryrefslogtreecommitdiff
path: root/src/elrail.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-01-25 15:47:58 +0000
committerfrosch <frosch@openttd.org>2008-01-25 15:47:58 +0000
commitd4dc5e07752762ee4d6a425a533786b26257a438 (patch)
treef904e7af79be7c749721bcae930333e27ad88830 /src/elrail.cpp
parentd13311e710c2ed0b1af134c778a5d6157c34ea20 (diff)
downloadopenttd-d4dc5e07752762ee4d6a425a533786b26257a438.tar.xz
(svn r11983) -Codechange: Add some helper functions for slopes and use them.
Diffstat (limited to 'src/elrail.cpp')
-rw-r--r--src/elrail.cpp8
1 files changed, 1 insertions, 7 deletions
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));
}
}
}