(svn r1776) -Add: Dynamic stations. You can now have up to 64k of stations

This commit is contained in:
truelight
2005-02-03 17:22:35 +00:00
parent f1d4a85f59
commit 1938a73c90
6 changed files with 72 additions and 39 deletions

View File

@@ -84,7 +84,7 @@ static void GlobalSortStationList(void)
*i = 0;
/* Create array for sorting */
_station_sort = realloc(_station_sort, _stations_size * sizeof(_station_sort[0]));
_station_sort = realloc(_station_sort, GetStationPoolSize() * sizeof(_station_sort[0]));
if (_station_sort == NULL)
error("Could not allocate memory for the station-sorting-list");
@@ -318,7 +318,7 @@ static void DrawStationViewWindow(Window *w)
byte *b;
station_id = (byte)w->window_number;
station_id = (uint16)w->window_number;
st = GetStation(w->window_number);