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

@@ -26,6 +26,7 @@
#include "void_map.h"
#include "town.h"
#include "newgrf.h"
#include "newgrf_house.h"
#include "core/random_func.hpp"
#include "core/backup_type.hpp"
#include "progress.h"
@@ -311,6 +312,7 @@ void GenerateWorld(GenWorldMode mode, uint size_x, uint size_y, bool reset_setti
/* Load the right landscape stuff, and the NewGRFs! */
GfxLoadSprites();
InitializeBuildingCounts();
LoadStringWidthTable();
/* Re-init the windowing system */