equal
deleted
inserted
replaced
53 static inline bool IsValidWaypointID(WaypointID index) |
53 static inline bool IsValidWaypointID(WaypointID index) |
54 { |
54 { |
55 return index < GetWaypointPoolSize() && IsValidWaypoint(GetWaypoint(index)); |
55 return index < GetWaypointPoolSize() && IsValidWaypoint(GetWaypoint(index)); |
56 } |
56 } |
57 |
57 |
|
58 void DestroyWaypoint(Waypoint *wp); |
|
59 |
|
60 static inline void DeleteWaypoint(Waypoint *wp) |
|
61 { |
|
62 DestroyWaypoint(wp); |
|
63 wp->xy = 0; |
|
64 } |
|
65 |
58 #define FOR_ALL_WAYPOINTS_FROM(wp, start) for (wp = GetWaypoint(start); wp != NULL; wp = (wp->index + 1 < GetWaypointPoolSize()) ? GetWaypoint(wp->index + 1) : NULL) if (IsValidWaypoint(wp)) |
66 #define FOR_ALL_WAYPOINTS_FROM(wp, start) for (wp = GetWaypoint(start); wp != NULL; wp = (wp->index + 1 < GetWaypointPoolSize()) ? GetWaypoint(wp->index + 1) : NULL) if (IsValidWaypoint(wp)) |
59 #define FOR_ALL_WAYPOINTS(wp) FOR_ALL_WAYPOINTS_FROM(wp, 0) |
67 #define FOR_ALL_WAYPOINTS(wp) FOR_ALL_WAYPOINTS_FROM(wp, 0) |
60 |
68 |
61 |
69 |
62 /** |
70 /** |