summaryrefslogtreecommitdiff
path: root/waypoint.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-11-16 14:41:01 +0000
committertruelight <truelight@openttd.org>2005-11-16 14:41:01 +0000
commitcd1ad247231e98e83298943ac661af0990058cf9 (patch)
tree214102297a7345bf5d6cf0849e439481b6c5fb1a /waypoint.h
parenta56ffc6a0fe807ff59c4b48e1837257761f6cfab (diff)
downloadopenttd-cd1ad247231e98e83298943ac661af0990058cf9.tar.xz
(svn r3210) -Codechange: use IsRailWaypoint where possible (instead of magicnumbers)
-Codechange: IsRailWaypoint should take 'tile', not 'm5'
Diffstat (limited to 'waypoint.h')
-rw-r--r--waypoint.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/waypoint.h b/waypoint.h
index a2b1c28bd..a9c3432ea 100644
--- a/waypoint.h
+++ b/waypoint.h
@@ -51,9 +51,9 @@ static inline bool IsWaypointIndex(uint index)
#define FOR_ALL_WAYPOINTS_FROM(wp, start) for (wp = GetWaypoint(start); wp != NULL; wp = (wp->index + 1 < GetWaypointPoolSize()) ? GetWaypoint(wp->index + 1) : NULL)
#define FOR_ALL_WAYPOINTS(wp) FOR_ALL_WAYPOINTS_FROM(wp, 0)
-static inline bool IsRailWaypoint(byte m5)
+static inline bool IsRailWaypoint(TileIndex tile)
{
- return (m5 & 0xFC) == 0xC4;
+ return (_m[tile].m5 & 0xFC) == 0xC4;
}
int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove);