OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
GRFFile Struct Reference

Dynamic data of a loaded NewGRF. More...

`#include <newgrf.h>`

Inheritance diagram for GRFFile:

## Public Member Functions
| GRFFile (const struct GRFConfig *config)
| Constructor for GRFFile.
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.
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
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
GRFLabel * | label
| 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 LanguageMap * | language_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 | ( | const struct GRFConfig * | config | ) |

Constructor for GRFFile.

Parameters

  config | GRFConfig to copy name, grfid and parameters from.

Definition at line 8169 of file newgrf.cpp.

References GRFConfig::filename, GRFIdentifier::grfid, GRFConfig::ident, INVALID_RAILTYPE, lengthof, MemCpyT(), GRFConfig::num_params, GRFConfig::param, param_end, price_base_multipliers, RAILTYPE_ELECTRIC, RAILTYPE_MAGLEV, RAILTYPE_MONO, RAILTYPE_RAIL, stredup(), traininfo_vehicle_pitch, and traininfo_vehicle_width.

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

- src/newgrf.h
- src/newgrf.cpp