diff options
author | smatz <smatz@openttd.org> | 2009-06-25 15:54:06 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-06-25 15:54:06 +0000 |
commit | 38477f2b36b6d3ce3123eb379dbbdc29fb0f5251 (patch) | |
tree | 6a46f03ad7aae756c846320b9ab15065790b933f /src | |
parent | fa1ad0fd3c4bb20af746d5ee7588afcb0e5f8375 (diff) | |
download | openttd-38477f2b36b6d3ce3123eb379dbbdc29fb0f5251.tar.xz |
(svn r16655) -Codechange: use IsRailwayStationTile() more
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf_station.cpp | 2 | ||||
-rw-r--r-- | src/station.cpp | 2 | ||||
-rw-r--r-- | src/station_cmd.cpp | 2 | ||||
-rw-r--r-- | src/train_cmd.cpp | 3 |
4 files changed, 4 insertions, 5 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 7bb69341e..89331f26b 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -747,7 +747,7 @@ void DeallocateSpecFromStation(Station *st, byte specindex) /* Check all tiles over the station to check if the specindex is still in use */ BEGIN_TILE_LOOP(tile, st->trainst_w, st->trainst_h, st->train_tile) { - if (IsTileType(tile, MP_STATION) && GetStationIndex(tile) == st->index && IsRailwayStation(tile) && GetCustomStationSpecIndex(tile) == specindex) { + if (IsRailwayStationTile(tile) && GetStationIndex(tile) == st->index && GetCustomStationSpecIndex(tile) == specindex) { return; } } END_TILE_LOOP(tile, st->trainst_w, st->trainst_h, st->train_tile) diff --git a/src/station.cpp b/src/station.cpp index b9e9d2a98..c4ed84200 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -188,7 +188,7 @@ void Station::MarkTilesDirty(bool cargo_change) const bool Station::TileBelongsToRailStation(TileIndex tile) const { - return IsTileType(tile, MP_STATION) && GetStationIndex(tile) == index && IsRailwayStation(tile); + return IsRailwayStationTile(tile) && GetStationIndex(tile) = this->index; } /** Obtain the length of a platform diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 3054d3d76..efe0889fb 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1171,7 +1171,7 @@ CommandCost CmdRemoveFromRailroadStation(TileIndex tile, DoCommandFlag flags, ui /* Do the action for every tile into the area */ BEGIN_TILE_LOOP(tile2, size_x, size_y, tile) { /* Make sure the specified tile is a railroad station */ - if (!IsTileType(tile2, MP_STATION) || !IsRailwayStation(tile2)) { + if (!IsRailwayStationTile(tile2)) { continue; } diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index ac518eb2b..c6a1e9fed 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2574,8 +2574,7 @@ static bool NtpCallbFindStation(TileIndex tile, TrainTrackFollowerData *ttfd, Tr /* did we reach the final station? */ if ((ttfd->station_index == INVALID_STATION && tile == ttfd->dest_coords) || ( - IsTileType(tile, MP_STATION) && - IsRailwayStation(tile) && + IsRailwayStationTile(tile) && GetStationIndex(tile) == ttfd->station_index )) { /* We do not check for dest_coords if we have a station_index, |