Change: Use std::vector for NewGRF spec tables.

Pointer space is allocated only for the number of IDs used, instead of
the max number of IDs for each feature.
This commit is contained in:
Peter Nelson
2023-01-08 02:12:33 +00:00
committed by PeterN
parent 15e6fc4eeb
commit ef6b307465
2 changed files with 117 additions and 188 deletions

View File

@@ -112,14 +112,14 @@ struct GRFFile : ZeroedMemoryAllocator {
uint sound_offset;
uint16 num_sounds;
struct StationSpec **stations;
struct HouseSpec **housespec;
struct IndustrySpec **industryspec;
struct IndustryTileSpec **indtspec;
struct ObjectSpec **objectspec;
struct AirportSpec **airportspec;
struct AirportTileSpec **airtspec;
struct RoadStopSpec **roadstops;
std::vector<struct StationSpec *> stations;
std::vector<struct HouseSpec *> housespec;
std::vector<struct IndustrySpec *> industryspec;
std::vector<struct IndustryTileSpec *> indtspec;
std::vector<struct ObjectSpec *> objectspec;
std::vector<struct AirportSpec *> airportspec;
std::vector<struct AirportTileSpec *> airtspec;
std::vector<struct RoadStopSpec *> roadstops;
uint32 param[0x80];
uint param_end; ///< one more than the highest set parameter