diff options
author | celestar <celestar@openttd.org> | 2006-04-12 08:28:03 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2006-04-12 08:28:03 +0000 |
commit | 62ded2f58d264835f01245798ece631033351d80 (patch) | |
tree | e8c2d2e726c1585d8c76948b78e492631a8be2c6 | |
parent | 5ba4345b8786fceb97cbc7381609948e2e18a9c1 (diff) | |
download | openttd-62ded2f58d264835f01245798ece631033351d80.tar.xz |
(svn r4376) -Codechange Renamed GetSignalState to GetSignalStateByTrackdir
-rw-r--r-- | npf.c | 2 | ||||
-rw-r--r-- | rail.h | 2 | ||||
-rw-r--r-- | rail_cmd.c | 4 |
3 files changed, 4 insertions, 4 deletions
@@ -342,7 +342,7 @@ static int32 NPFRailPathCost(AyStar* as, AyStarNode* current, OpenListNode* pare /* Check for signals */ if (IsTileType(tile, MP_RAILWAY) && HasSignalOnTrackdir(tile, trackdir)) { /* Ordinary track with signals */ - if (GetSignalState(tile, trackdir) == SIGNAL_STATE_RED) { + if (GetSignalStateByTrackdir(tile, trackdir) == SIGNAL_STATE_RED) { /* Signal facing us is red */ if (!NPFGetFlag(current, NPF_FLAG_SEEN_SIGNAL)) { /* Penalize the first signal we @@ -414,7 +414,7 @@ static inline bool HasSignalOnTrackdir(TileIndex tile, Trackdir trackdir) * Along meaning if you are currently driving on the given trackdir, this is * the signal that is facing us (for which we stop when it's red). */ -static inline SignalState GetSignalState(TileIndex tile, Trackdir trackdir) +static inline SignalState GetSignalStateByTrackdir(TileIndex tile, Trackdir trackdir) { assert(IsValidTrackdir(trackdir)); assert(HasSignalOnTrack(tile, TrackdirToTrack(trackdir))); diff --git a/rail_cmd.c b/rail_cmd.c index 577f82b6b..ba6e4d16b 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -1504,7 +1504,7 @@ static bool SetSignalsEnumProc(TileIndex tile, SetSignalsData *ssd, int track, u if (HasSignalOnTrackdir(tile, track) && _m[tile].m4 & 2) { // this is an exit signal that points out from the segment ssd->presignal_exits++; - if (GetSignalState(tile, track) != SIGNAL_STATE_RED) + if (GetSignalStateByTrackdir(tile, track) != SIGNAL_STATE_RED) ssd->presignal_exits_free++; } @@ -1653,7 +1653,7 @@ static void ChangeSignalStates(SetSignalsData *ssd) // subtract for dual combo signals so they don't count themselves if (_m[tile].m4 & 2 && HasSignalOnTrackdir(tile, ssd->bit[i])) { ex--; - if (GetSignalState(tile, ssd->bit[i]) != SIGNAL_STATE_RED) exfree--; + if (GetSignalStateByTrackdir(tile, ssd->bit[i]) != SIGNAL_STATE_RED) exfree--; } // if we have exits and none are free, make red. |