AirlineTycoon icon indicating copy to clipboard operation
AirlineTycoon copied to clipboard

Maximum amount of planes, cities, etc

Open WizzardMaker opened this issue 6 years ago • 6 comments

A lot of people requested on multiple occasions, whether it was possible to change the limit on the amount of entries in the given .csv files. Well now we can 😃 It should only need some changing of the MAX_* values in the Defines.h and everything is hunky dory.

WizzardMaker avatar Oct 02 '19 22:10 WizzardMaker

That's correct, I already built a custom executable for someone who requested it and it worked fine.

The question is, what should be the new max? 😉

CrossVR avatar Oct 03 '19 09:10 CrossVR

I would look at what int is being used and then just slap a the corresponding max value onto it 🙂

WizzardMaker avatar Oct 03 '19 09:10 WizzardMaker

These definitions are probably used in array declarations, so using INT_MAX will result in multi-gig allocations. 😏

CrossVR avatar Oct 03 '19 10:10 CrossVR

Yeah, they resize the arrays according to the MAX_ limits. But those resizes often happen right before reading the files, so maybe we can just use the file length (in lines) to set the maximum, as it won't fill the array anywhere else

WizzardMaker avatar Oct 03 '19 11:10 WizzardMaker

That's true for MAX_PLANES, but not for MAX_CITIES which is used in loop conditions and array declarations across the codebase

CrossVR avatar Oct 03 '19 12:10 CrossVR

I think MAX_CITIES is an exception for removing the limit, it works fine if we raise the limit just a bit. Nobody would want to add more than 200 cities

WizzardMaker avatar Oct 03 '19 18:10 WizzardMaker