summaryrefslogtreecommitdiff
path: root/ttd.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-02-02 17:30:29 +0000
committertruelight <truelight@openttd.org>2005-02-02 17:30:29 +0000
commit83a889d6787dbb5899c8eec663634d36fb1c8108 (patch)
treef37dce29ebc098007022941531aab37cff480e31 /ttd.c
parentab3ed5c43121cc8adefc0c6bbcf9ef0d1203d3ff (diff)
downloadopenttd-83a889d6787dbb5899c8eec663634d36fb1c8108.tar.xz
(svn r1771) -Add: Industries are now dynamic (up to 64k industries). Generating
1kx1k maps should now be much faster, and give more than just oil-stuff ;)
Diffstat (limited to 'ttd.c')
-rw-r--r--ttd.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/ttd.c b/ttd.c
index d95db53be..62509d763 100644
--- a/ttd.c
+++ b/ttd.c
@@ -495,34 +495,27 @@ static void ParseResolution(int res[2], char *s)
static void InitializeDynamicVariables(void)
{
/* Dynamic stuff needs to be initialized somewhere... */
- _stations_size = lengthof(_stations);
- _station_sort = NULL;
-
+ _stations_size = lengthof(_stations);
_roadstops_size = lengthof(_roadstops);
+ _vehicles_size = lengthof(_vehicles);
+ _sign_size = lengthof(_sign_list);
+ _orders_size = lengthof(_orders);
- _vehicles_size = lengthof(_vehicles);
- _vehicle_sort = NULL;
-
- _town_sort = NULL;
-
- _industries_size = lengthof(_industries);
+ _station_sort = NULL;
+ _vehicle_sort = NULL;
+ _town_sort = NULL;
_industry_sort = NULL;
-
- _sign_size = lengthof(_sign_list);
- _orders_size = lengthof(_orders);
}
static void UnInitializeDynamicVariables(void)
{
/* Dynamic stuff needs to be free'd somewhere... */
CleanPool(&_town_pool);
+ CleanPool(&_industry_pool);
free(_station_sort);
-
free(_vehicle_sort);
-
free(_town_sort);
-
free(_industry_sort);
}