(svn r16939) -Codechange: s/RailwayStation/RailStation/ to unify the way it's written.
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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 {
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user