diff options
author | rubidium <rubidium@openttd.org> | 2007-07-26 16:51:10 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-07-26 16:51:10 +0000 |
commit | d624f66c794109a22787685a3aa53d6cf35a02ba (patch) | |
tree | 4b6a986aa841f12efff161e45aacd1a023cff71d /src/station_cmd.cpp | |
parent | 5bd241eb5b151dd9a5ebda0a93aff8740713ce62 (diff) | |
download | openttd-d624f66c794109a22787685a3aa53d6cf35a02ba.tar.xz |
(svn r10698) -Codechange [FS#1082]: simplify the code related to foundations. Primarily removal of (duplicated|magic) code and introduction of few helper functions to ease foundation determination. Patch by frosch.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 0e07583b1..ea8698647 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2071,7 +2071,7 @@ static void DrawTile_Station(TileInfo *ti) // don't show foundation for docks if (ti->tileh != SLOPE_FLAT && !IsDock(ti->tile)) - DrawFoundation(ti, ti->tileh); + DrawFoundation(ti, FOUNDATION_LEVELED); if (IsCustomStationSpecIndex(ti->tile)) { // look for customization @@ -2176,9 +2176,9 @@ static uint GetSlopeZ_Station(TileIndex tile, uint x, uint y) return GetTileMaxZ(tile); } -static Slope GetSlopeTileh_Station(TileIndex tile, Slope tileh) +static Foundation GetFoundation_Station(TileIndex tile, Slope tileh) { - return SLOPE_FLAT; + return FlatteningFoundation(tileh); } static void GetAcceptedCargo_Station(TileIndex tile, AcceptedCargo ac) @@ -2921,7 +2921,7 @@ extern const TileTypeProcs _tile_type_station_procs = { ChangeTileOwner_Station, /* change_tile_owner_clear */ NULL, /* get_produced_cargo_proc */ VehicleEnter_Station, /* vehicle_enter_tile_proc */ - GetSlopeTileh_Station, /* get_slope_tileh_proc */ + GetFoundation_Station, /* get_foundation_proc */ }; static const SaveLoad _roadstop_desc[] = { |