diff options
author | frosch <frosch@openttd.org> | 2010-08-09 07:10:42 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-08-09 07:10:42 +0000 |
commit | 48c5091a7c39739e48d06ec365af4f7c713dd25a (patch) | |
tree | fae43b0772a1cf96b2684adcedc42f8f4d19e34e /src/rail_cmd.cpp | |
parent | 67c21f7e01b7f83c77e934c4fe0771324853d2ab (diff) | |
download | openttd-48c5091a7c39739e48d06ec365af4f7c713dd25a.tar.xz |
(svn r20420) -Codechange: Add TileContext enum instead of using a bool.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 4f61dfd65..779700c3d 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1809,7 +1809,7 @@ static void DrawTrackDetails(const TileInfo *ti, const RailtypeInfo *rti) { /* Base sprite for track fences. * Note: Halftile slopes only have fences on the upper part. */ - SpriteID base_image = GetCustomRailSprite(rti, ti->tile, RTSG_FENCES, IsHalftileSlope(ti->tileh)); + SpriteID base_image = GetCustomRailSprite(rti, ti->tile, RTSG_FENCES, IsHalftileSlope(ti->tileh) ? TC_UPPER_HALFTILE : TC_NORMAL); if (base_image == 0) base_image = SPR_TRACK_FENCE_FLAT_X; switch (GetRailGroundType(ti->tile)) { @@ -1968,8 +1968,8 @@ static void DrawTrackBitsOverlay(TileInfo *ti, TrackBits track, const RailtypeIn if (IsValidCorner(halftile_corner)) { DrawFoundation(ti, HalftileFoundation(halftile_corner)); - overlay = GetCustomRailSprite(rti, ti->tile, RTSG_OVERLAY, true); - ground = GetCustomRailSprite(rti, ti->tile, RTSG_GROUND, true); + overlay = GetCustomRailSprite(rti, ti->tile, RTSG_OVERLAY, TC_UPPER_HALFTILE); + ground = GetCustomRailSprite(rti, ti->tile, RTSG_GROUND, TC_UPPER_HALFTILE); /* Draw higher halftile-overlay: Use the sloped sprites with three corners raised. They probably best fit the lightning. */ Slope fake_slope = SlopeWithThreeCornersRaised(OppositeCorner(halftile_corner)); |