diff options
author | rubidium <rubidium@openttd.org> | 2009-07-24 11:47:12 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-24 11:47:12 +0000 |
commit | cf38a5bee6628f4be58a1bd7774658cf86807d5c (patch) | |
tree | 2c2890dd002ff6aee0e4fc1905796b623a040153 /src/yapf | |
parent | 2c6b5237f68b1ce444f35eef6e31e7c0ff49d7cc (diff) | |
download | openttd-cf38a5bee6628f4be58a1bd7774658cf86807d5c.tar.xz |
(svn r16939) -Codechange: s/RailwayStation/RailStation/ to unify the way it's written.
Diffstat (limited to 'src/yapf')
-rw-r--r-- | src/yapf/follow_track.hpp | 2 | ||||
-rw-r--r-- | src/yapf/yapf_costrail.hpp | 2 | ||||
-rw-r--r-- | src/yapf/yapf_destrail.hpp | 2 | ||||
-rw-r--r-- | src/yapf/yapf_rail.cpp | 12 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/yapf/follow_track.hpp b/src/yapf/follow_track.hpp index 42646afea..5d0a1e83b 100644 --- a/src/yapf/follow_track.hpp +++ b/src/yapf/follow_track.hpp @@ -191,7 +191,7 @@ protected: m_new_tile = TILE_ADD(m_old_tile, diff); /* special handling for stations */ - if (IsRailTT() && IsRailwayStationTile(m_new_tile)) { + if (IsRailTT() && IsRailStationTile(m_new_tile)) { m_is_station = true; } else if (IsRoadTT() && IsRoadStopTile(m_new_tile)) { m_is_station = true; diff --git a/src/yapf/yapf_costrail.hpp b/src/yapf/yapf_costrail.hpp index 1731f7fdf..cda82f1d7 100644 --- a/src/yapf/yapf_costrail.hpp +++ b/src/yapf/yapf_costrail.hpp @@ -163,7 +163,7 @@ public: { if (n.m_num_signals_passed >= m_sig_look_ahead_costs.Size() / 2) return 0; - if (IsRailwayStationTile(tile) && IsAnyStationTileReserved(tile, trackdir, skipped)) { + if (IsRailStationTile(tile) && IsAnyStationTileReserved(tile, trackdir, skipped)) { return Yapf().PfGetSettings().rail_pbs_station_penalty * (skipped + 1); } else if (TrackOverlapsTracks(GetReservedTrackbits(tile), TrackdirToTrack(trackdir))) { int cost = Yapf().PfGetSettings().rail_pbs_cross_penalty; diff --git a/src/yapf/yapf_destrail.hpp b/src/yapf/yapf_destrail.hpp index 650b43b49..928f10065 100644 --- a/src/yapf/yapf_destrail.hpp +++ b/src/yapf/yapf_destrail.hpp @@ -160,7 +160,7 @@ public: { bool bDest; if (m_dest_station_id != INVALID_STATION) { - bDest = IsRailwayStationTile(tile) + bDest = IsRailStationTile(tile) && (GetStationIndex(tile) == m_dest_station_id) && (GetRailStationTrack(tile) == TrackdirToTrack(td)); } else { diff --git a/src/yapf/yapf_rail.cpp b/src/yapf/yapf_rail.cpp index e6df394ea..89ffa8cbf 100644 --- a/src/yapf/yapf_rail.cpp +++ b/src/yapf/yapf_rail.cpp @@ -63,14 +63,14 @@ private: } /** Reserve a railway platform. Tile contains the failed tile on abort. */ - bool ReserveRailwayStationPlatform(TileIndex &tile, DiagDirection dir) + bool ReserveRailStationPlatform(TileIndex &tile, DiagDirection dir) { TileIndex start = tile; TileIndexDiff diff = TileOffsByDiagDir(dir); do { if (HasStationReservation(tile)) return false; - SetRailwayStationReservation(tile, true); + SetRailStationReservation(tile, true); MarkTileDirtyByTile(tile); tile = TILE_ADD(tile, diff); } while (IsCompatibleTrainStationTile(tile, start)); @@ -81,8 +81,8 @@ private: /** Try to reserve a single track/platform. */ bool ReserveSingleTrack(TileIndex tile, Trackdir td) { - if (IsRailwayStationTile(tile)) { - if (!ReserveRailwayStationPlatform(tile, TrackdirToExitdir(ReverseTrackdir(td)))) { + if (IsRailStationTile(tile)) { + if (!ReserveRailStationPlatform(tile, TrackdirToExitdir(ReverseTrackdir(td)))) { /* Platform could not be reserved, undo. */ m_res_fail_tile = tile; m_res_fail_td = td; @@ -102,11 +102,11 @@ private: /** Unreserve a single track/platform. Stops when the previous failer is reached. */ bool UnreserveSingleTrack(TileIndex tile, Trackdir td) { - if (IsRailwayStationTile(tile)) { + if (IsRailStationTile(tile)) { TileIndex start = tile; TileIndexDiff diff = TileOffsByDiagDir(TrackdirToExitdir(ReverseTrackdir(td))); while ((tile != m_res_fail_tile || td != m_res_fail_td) && IsCompatibleTrainStationTile(tile, start)) { - SetRailwayStationReservation(tile, false); + SetRailStationReservation(tile, false); tile = TILE_ADD(tile, diff); } } else if (tile != m_res_fail_tile || td != m_res_fail_td) { |