OpenTTD
Public Member Functions | Data Fields
GRFFile Struct Reference

Dynamic data of a loaded NewGRF. More...

#include <newgrf.h>

Inheritance diagram for GRFFile:
ZeroedMemoryAllocator

Public Member Functions

 GRFFile (const struct GRFConfig *config)
 Constructor for GRFFile. More...
 
uint32 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. More...
 
void * operator new[] (size_t size)
 Memory allocator for an array of class instances. More...
 
void operator delete (void *ptr)
 Memory release for a single class instance. More...
 
void operator delete[] (void *ptr)
 Memory release for an array of class instances. More...
 

Data Fields

char * filename
 
uint32 grfid
 
byte grf_version
 
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
 
uint32 param [0x80]
 
uint param_end
 one more than the highest set parameter
 
GRFLabellabel
 Pointer to the first label. This is a linked list, not an array.
 
SmallVector< CargoLabel, 4 > cargo_list
 Cargo translation table (local ID -> label)
 
uint8 cargo_map [NUM_CARGO]
 Inverse cargo translation table (CargoID -> local ID)
 
SmallVector< RailTypeLabel, 4 > railtype_list
 Railtype translation table.
 
RailTypeByte railtype_map [RAILTYPE_END]
 
CanalProperties canal_local_properties [CF_END]
 Canal properties as set by this NewGRF.
 
struct LanguageMaplanguage_map
 Mappings related to the languages.
 
int traininfo_vehicle_pitch
 Vertical offset for draing 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 grf_features
 Bitset of GrfSpecFeature the grf uses.
 
PriceMultipliers price_base_multipliers
 Price base multipliers as set by the grf.
 

Detailed Description

Dynamic data of a loaded NewGRF.

Definition at line 104 of file newgrf.h.

Constructor & Destructor Documentation

◆ GRFFile()

GRFFile::GRFFile ( const struct GRFConfig config)

Constructor for GRFFile.

Parameters
configGRFConfig to copy name, grfid and parameters from.

Definition at line 8221 of file newgrf.cpp.

References GRFConfig::filename, GRFIdentifier::grfid, GRFConfig::ident, and stredup().


The documentation for this struct was generated from the following files: