diff options
author | truelight <truelight@openttd.org> | 2005-02-02 17:30:29 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-02-02 17:30:29 +0000 |
commit | 83a889d6787dbb5899c8eec663634d36fb1c8108 (patch) | |
tree | f37dce29ebc098007022941531aab37cff480e31 /industry_gui.c | |
parent | ab3ed5c43121cc8adefc0c6bbcf9ef0d1203d3ff (diff) | |
download | openttd-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 'industry_gui.c')
-rw-r--r-- | industry_gui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/industry_gui.c b/industry_gui.c index c8774286a..11854c501 100644 --- a/industry_gui.c +++ b/industry_gui.c @@ -493,7 +493,7 @@ static byte _industry_sort_order; static int CDECL GeneralIndustrySorter(const void *a, const void *b) { char buf1[96]; - byte val; + uint16 val; Industry *i = GetIndustry(*(const uint16*)a); Industry *j = GetIndustry(*(const uint16*)b); int r = 0; @@ -557,7 +557,7 @@ static void MakeSortedIndustryList(void) int n = 0; /* Create array for sorting */ - _industry_sort = realloc(_industry_sort, _industries_size * sizeof(_industry_sort[0])); + _industry_sort = realloc(_industry_sort, GetIndustryPoolSize() * sizeof(_industry_sort[0])); if (_industry_sort == NULL) error("Could not allocate memory for the industry-sorting-list"); |