AirlineTycoon
AirlineTycoon copied to clipboard
Maximum amount of planes, cities, etc
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.
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? 😉
I would look at what int is being used and then just slap a the corresponding max value onto it 🙂
These definitions are probably used in array declarations, so using INT_MAX will result in multi-gig allocations. 😏
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
That's true for MAX_PLANES, but not for MAX_CITIES which is used in loop conditions and array declarations across the codebase
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