Codechange: Allocate houses dynamically instead of from a fixed array.

This uses vectors for HouseSpecs and global/town building counts.
This commit is contained in:
Peter Nelson
2024-03-12 17:28:44 +00:00
committed by Michael Lutz
parent 8746be8bf2
commit 3e83dcedfd
9 changed files with 87 additions and 46 deletions

View File

@@ -19,8 +19,8 @@
template <typename T>
struct BuildingCounts {
T id_count[NUM_HOUSES];
T class_count[HOUSE_CLASS_MAX];
std::vector<T> id_count;
std::vector<T> class_count;
};
static const uint CUSTOM_TOWN_NUMBER_DIFFICULTY = 4; ///< value for custom town number in difficulty settings