diff options
author | tron <tron@openttd.org> | 2006-06-28 06:10:20 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-28 06:10:20 +0000 |
commit | 473efb372ef55ab47d800b895ffb0fe8ee87c041 (patch) | |
tree | 437dbb31ed36170ab24cef5c5a7bd68ca3c1c4dd /rail_cmd.c | |
parent | 7e1974084396c4e7bab80e31101119730b8387fd (diff) | |
download | openttd-473efb372ef55ab47d800b895ffb0fe8ee87c041.tar.xz |
(svn r5396) - Remove two fixed parameters
- Simplify an expresssion: c ? f(x) : f(y) -> f(c ? x : y)
Diffstat (limited to 'rail_cmd.c')
-rw-r--r-- | rail_cmd.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index ea3e989f1..7935efc85 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -1205,7 +1205,7 @@ static void DrawSpecialBuilding( * @param snow Draw as snow * @param flat Always draw foundation */ -static void DrawTrackBits(TileInfo* ti, TrackBits track, bool flat) +static void DrawTrackBits(TileInfo* ti, TrackBits track) { const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile)); PalSpriteID image; @@ -1233,13 +1233,7 @@ static void DrawTrackBits(TileInfo* ti, TrackBits track, bool flat) (image++, true); if (ti->tileh != SLOPE_FLAT) { - int foundation; - - if (flat) { - foundation = ti->tileh; - } else { - foundation = GetRailFoundation(ti->tileh, track); - } + uint foundation = GetRailFoundation(ti->tileh, track); if (foundation != 0) DrawFoundation(ti, foundation); @@ -1313,7 +1307,7 @@ static void DrawTile_Track(TileInfo *ti) if (GetRailTileType(ti->tile) != RAIL_TILE_DEPOT_WAYPOINT) { TrackBits rails = GetTrackBits(ti->tile); - DrawTrackBits(ti, rails, false); + DrawTrackBits(ti, rails); if (_display_opt & DO_FULL_DETAIL) DrawTrackDetails(ti); |