station.h
changeset 919 b0d6c7642f99
parent 915 013cb2d74800
child 1024 9b06b01490a4
--- a/station.h	Thu Jan 06 19:40:44 2005 +0000
+++ b/station.h	Thu Jan 06 22:31:58 2005 +0000
@@ -94,13 +94,21 @@
 void UpdateAllStationVirtCoord();
 
 VARDEF Station _stations[250];
+VARDEF uint _stations_size;
+
+VARDEF SortStruct *_station_sort;
+
+static inline Station *GetStation(uint index)
+{
+	assert(index < _stations_size);
+	return &_stations[index];
+}
+
+#define FOR_ALL_STATIONS(st) for(st = _stations; st != &_stations[_stations_size]; st++)
+
 VARDEF bool _station_sort_dirty[MAX_PLAYERS];
 VARDEF bool _global_station_sort_dirty;
 
-#define DEREF_STATION(i) (&_stations[i])
-#define FOR_ALL_STATIONS(st) for(st=_stations; st != endof(_stations); st++)
-
-
 void GetProductionAroundTiles(uint *produced, uint tile, int w, int h, int rad);
 void GetAcceptanceAroundTiles(uint *accepts, uint tile, int w, int h, int rad);
 uint GetStationPlatforms(Station *st, uint tile);