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:
16
src/newgrf.h
16
src/newgrf.h
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user