OpenTTD Source 20241224-master-gf74b0cf984
|
Dynamic data of a loaded NewGRF. More...
#include <newgrf.h>
Public Member Functions | |
GRFFile (const struct GRFConfig *config) | |
Constructor for GRFFile. | |
uint32_t | GetParam (uint number) const |
Get GRF Parameter with range checking. | |
Public Member Functions inherited from ZeroedMemoryAllocator | |
void * | operator new (size_t size) |
Memory allocator for a single class instance. | |
void * | operator new[] (size_t size) |
Memory allocator for an array of class instances. | |
void | operator delete (void *ptr) |
Memory release for a single class instance. | |
void | operator delete[] (void *ptr) |
Memory release for an array of class instances. | |
Data Fields | |
std::string | filename |
uint32_t | grfid |
uint8_t | grf_version |
uint | sound_offset |
uint16_t | num_sounds |
std::vector< std::unique_ptr< struct StationSpec > > | stations |
std::vector< std::unique_ptr< struct HouseSpec > > | housespec |
std::vector< std::unique_ptr< struct IndustrySpec > > | industryspec |
std::vector< std::unique_ptr< struct IndustryTileSpec > > | indtspec |
std::vector< std::unique_ptr< struct ObjectSpec > > | objectspec |
std::vector< std::unique_ptr< struct AirportSpec > > | airportspec |
std::vector< std::unique_ptr< struct AirportTileSpec > > | airtspec |
std::vector< std::unique_ptr< struct RoadStopSpec > > | roadstops |
std::vector< uint32_t > | param |
std::vector< GRFLabel > | labels |
List of labels. | |
std::vector< CargoLabel > | cargo_list |
Cargo translation table (local ID -> label) | |
std::array< uint8_t, NUM_CARGO > | cargo_map {} |
Inverse cargo translation table (CargoID -> local ID) | |
std::vector< RailTypeLabel > | railtype_list |
Railtype translation table. | |
std::array< RailType, RAILTYPE_END > | railtype_map {} |
std::vector< RoadTypeLabel > | roadtype_list |
Roadtype translation table (road) | |
std::array< RoadType, ROADTYPE_END > | roadtype_map {} |
std::vector< RoadTypeLabel > | tramtype_list |
Roadtype translation table (tram) | |
std::array< RoadType, ROADTYPE_END > | tramtype_map {} |
CanalProperties | canal_local_properties [CF_END] |
Canal properties as set by this NewGRF. | |
std::unordered_map< uint8_t, LanguageMap > | language_map |
Mappings related to the languages. | |
int | traininfo_vehicle_pitch |
Vertical offset for drawing train images in depot GUI and vehicle details. | |
uint | traininfo_vehicle_width |
Width (in pixels) of a 8/8 train vehicle in depot GUI and vehicle details. | |
uint32_t | grf_features |
Bitset of GrfSpecFeature the grf uses. | |
PriceMultipliers | price_base_multipliers |
Price base multipliers as set by the grf. | |
GRFFile::GRFFile | ( | const struct GRFConfig * | config | ) |
Constructor for GRFFile.
config | GRFConfig to copy name, grfid and parameters from. |
Definition at line 8977 of file newgrf.cpp.
References GRFConfig::filename, GRFIdentifier::grfid, GRFConfig::ident, INVALID_RAILTYPE, INVALID_ROADTYPE, GRFConfig::param, price_base_multipliers, RAILTYPE_ELECTRIC, RAILTYPE_MAGLEV, RAILTYPE_MONO, RAILTYPE_RAIL, ROADTYPE_ROAD, ROADTYPE_TRAM, traininfo_vehicle_pitch, and traininfo_vehicle_width.
|
inline |
Get GRF Parameter with range checking.
Definition at line 154 of file newgrf.h.
Referenced by ParamSet().
std::vector<std::unique_ptr<struct AirportSpec> > GRFFile::airportspec |
std::vector<std::unique_ptr<struct AirportTileSpec> > GRFFile::airtspec |
CanalProperties GRFFile::canal_local_properties[CF_END] |
Canal properties as set by this NewGRF.
Definition at line 141 of file newgrf.h.
Referenced by CanalChangeInfo(), and FinaliseCanals().
std::vector<CargoLabel> GRFFile::cargo_list |
Cargo translation table (local ID -> label)
Definition at line 129 of file newgrf.h.
Referenced by CalculateRefitMasks(), GetCargoTranslation(), GetCargoTranslationTable(), and GlobalVarChangeInfo().
std::array<uint8_t, NUM_CARGO> GRFFile::cargo_map {} |
Inverse cargo translation table (CargoID -> local ID)
Definition at line 130 of file newgrf.h.
Referenced by BuildCargoTranslationMap(), CalculateRefitMasks(), GetAllCargoSuffixes(), GetCargoSuffix(), GetRefitCostFactor(), VehicleScopeResolver::GetVariable(), GenericScopeResolver::GetVariable(), and IndustryTemporarilyRefusesCargo().
uint32_t GRFFile::grf_features |
Bitset of GrfSpecFeature the grf uses.
Definition at line 148 of file newgrf.h.
Referenced by FinalisePriceBaseMultipliers().
std::vector<std::unique_ptr<struct HouseSpec> > GRFFile::housespec |
std::vector<std::unique_ptr<struct IndustryTileSpec> > GRFFile::indtspec |
std::vector<std::unique_ptr<struct IndustrySpec> > GRFFile::industryspec |
std::vector<GRFLabel> GRFFile::labels |
List of labels.
Definition at line 127 of file newgrf.h.
Referenced by ClearTemporaryNewGRFData(), and DefineGotoLabel().
std::unordered_map<uint8_t, LanguageMap> GRFFile::language_map |
Mappings related to the languages.
Definition at line 143 of file newgrf.h.
Referenced by LanguageMap::GetLanguageMap(), and GlobalVarChangeInfo().
std::vector<std::unique_ptr<struct ObjectSpec> > GRFFile::objectspec |
PriceMultipliers GRFFile::price_base_multipliers |
Price base multipliers as set by the grf.
Definition at line 149 of file newgrf.h.
Referenced by FinalisePriceBaseMultipliers(), GetPrice(), GlobalVarChangeInfo(), and GRFFile().
std::vector<RailTypeLabel> GRFFile::railtype_list |
Railtype translation table.
Definition at line 132 of file newgrf.h.
Referenced by GetRailTypeTranslation(), GetReverseRailTypeTranslation(), GlobalVarChangeInfo(), and RailVehicleChangeInfo().
std::array<RailType, RAILTYPE_END> GRFFile::railtype_map {} |
std::vector<std::unique_ptr<struct RoadStopSpec> > GRFFile::roadstops |
std::vector<RoadTypeLabel> GRFFile::roadtype_list |
Roadtype translation table (road)
Definition at line 135 of file newgrf.h.
Referenced by AfterLoadGRFs(), GetReverseRoadTypeTranslation(), GetRoadTypeTranslation(), and GlobalVarChangeInfo().
std::array<RoadType, ROADTYPE_END> GRFFile::roadtype_map {} |
std::vector<std::unique_ptr<struct StationSpec> > GRFFile::stations |
int GRFFile::traininfo_vehicle_pitch |
Vertical offset for drawing train images in depot GUI and vehicle details.
Definition at line 145 of file newgrf.h.
Referenced by DrawTrainDetails(), Train::GetDisplayImageWidth(), GetGlobalVariable(), GRFFile(), and ParamSet().
uint GRFFile::traininfo_vehicle_width |
Width (in pixels) of a 8/8 train vehicle in depot GUI and vehicle details.
Definition at line 146 of file newgrf.h.
Referenced by Train::GetDisplayImageWidth(), GetGlobalVariable(), GRFFile(), and ParamSet().
std::vector<RoadTypeLabel> GRFFile::tramtype_list |
Roadtype translation table (tram)
Definition at line 138 of file newgrf.h.
Referenced by AfterLoadGRFs(), GetReverseRoadTypeTranslation(), GetRoadTypeTranslation(), and GlobalVarChangeInfo().
std::array<RoadType, ROADTYPE_END> GRFFile::tramtype_map {} |