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 | d4dc5e07752762ee4d6a425a533786b26257a438 (patch) | |
tree | f904e7af79be7c749721bcae930333e27ad88830 /src/viewport.cpp | |
parent | d13311e710c2ed0b1af134c778a5d6157c34ea20 (diff) | |
download | openttd-d4dc5e07752762ee4d6a425a533786b26257a438.tar.xz |
(svn r11983) -Codechange: Add some helper functions for slopes and use them.
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r-- | src/viewport.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp index 6106299b5..03207e1fa 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -909,7 +909,7 @@ static void DrawAutorailSelection(const TileInfo *ti, uint autorail_type) int offset; FoundationPart foundation_part = FOUNDATION_PART_NORMAL; - Slope autorail_tileh = (Slope)(ti->tileh & ~SLOPE_HALFTILE_MASK); + Slope autorail_tileh = RemoveHalftileSlope(ti->tileh); if (IsHalftileSlope(ti->tileh)) { static const uint _lower_rail[4] = { 5U, 2U, 4U, 3U }; Corner halftile_corner = GetHalftileSlopeCorner(ti->tileh); @@ -958,7 +958,7 @@ static void DrawTileSelection(const TileInfo *ti) FoundationPart foundation_part = FOUNDATION_PART_NORMAL; if (ti->tileh & SLOPE_N) { z += TILE_HEIGHT; - if ((ti->tileh & ~SLOPE_HALFTILE_MASK) == SLOPE_STEEP_N) z += TILE_HEIGHT; + if (RemoveHalftileSlope(ti->tileh) == SLOPE_STEEP_N) z += TILE_HEIGHT; } if (IsHalftileSlope(ti->tileh)) { Corner halftile_corner = GetHalftileSlopeCorner(ti->tileh); |