waypoint.h
changeset 2668 54d9f9d4dca3
parent 2625 66b3d632dcd2
child 2670 34970983ef08
equal deleted inserted replaced
2667:78b3c154afa4 2668:54d9f9d4dca3
    49 }
    49 }
    50 
    50 
    51 #define FOR_ALL_WAYPOINTS_FROM(wp, start) for (wp = GetWaypoint(start); wp != NULL; wp = (wp->index + 1 < GetWaypointPoolSize()) ? GetWaypoint(wp->index + 1) : NULL)
    51 #define FOR_ALL_WAYPOINTS_FROM(wp, start) for (wp = GetWaypoint(start); wp != NULL; wp = (wp->index + 1 < GetWaypointPoolSize()) ? GetWaypoint(wp->index + 1) : NULL)
    52 #define FOR_ALL_WAYPOINTS(wp) FOR_ALL_WAYPOINTS_FROM(wp, 0)
    52 #define FOR_ALL_WAYPOINTS(wp) FOR_ALL_WAYPOINTS_FROM(wp, 0)
    53 
    53 
    54 static inline bool IsRailWaypoint(byte m5)
    54 static inline bool IsRailWaypoint(TileIndex tile)
    55 {
    55 {
    56 	return (m5 & 0xFC) == 0xC4;
    56 	return (_m[tile].m5 & 0xFC) == 0xC4;
    57 }
    57 }
    58 
    58 
    59 int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove);
    59 int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove);
    60 Station *ComposeWaypointStation(TileIndex tile);
    60 Station *ComposeWaypointStation(TileIndex tile);
    61 Waypoint *GetWaypointByTile(TileIndex tile);
    61 Waypoint *GetWaypointByTile(TileIndex tile);