--- a/station.h Sat Aug 26 18:27:15 2006 +0000
+++ b/station.h Sat Aug 26 19:14:02 2006 +0000
@@ -184,6 +184,14 @@
return index < GetStationPoolSize() && IsValidStation(GetStation(index));
}
+void DestroyStation(Station *st);
+
+static inline void DeleteStation(Station *st)
+{
+ DestroyStation(st);
+ st->xy = 0;
+}
+
#define FOR_ALL_STATIONS_FROM(st, start) for (st = GetStation(start); st != NULL; st = (st->index + 1 < GetStationPoolSize()) ? GetStation(st->index + 1) : NULL) if (IsValidStation(st))
#define FOR_ALL_STATIONS(st) FOR_ALL_STATIONS_FROM(st, 0)
@@ -216,6 +224,14 @@
return rs->used;
}
+void DestroyRoadStop(RoadStop* rs);
+
+static inline void DeleteRoadStop(RoadStop *rs)
+{
+ DestroyRoadStop(rs);
+ rs->used = false;
+}
+
#define FOR_ALL_ROADSTOPS_FROM(rs, start) for (rs = GetRoadStop(start); rs != NULL; rs = (rs->index + 1 < GetRoadStopPoolSize()) ? GetRoadStop(rs->index + 1) : NULL) if (IsValidRoadStop(rs))
#define FOR_ALL_ROADSTOPS(rs) FOR_ALL_ROADSTOPS_FROM(rs, 0)