diff options
author | frosch <frosch@openttd.org> | 2008-01-25 15:47:58 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-01-25 15:47:58 +0000 |
commit | 6f6708e8448f891bc03c87c630a0c8f9cf47d332 (patch) | |
tree | f904e7af79be7c749721bcae930333e27ad88830 /src/elrail.cpp | |
parent | d11aeb118c7a0b5f6c1900dfcdcfd97ea2333097 (diff) | |
download | openttd-6f6708e8448f891bc03c87c630a0c8f9cf47d332.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.cpp | 8 |
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)); } } } |