OpenTTD Source: NewGRFCache Struct Reference

OpenTTD Source 15.3

Public Member Functions | Data Fields
NewGRFCache Struct Reference

Cached often queried (NewGRF) values. More...

`#include <vehicle_base.h>`

## Public Member Functions
auto | operator<=> (const NewGRFCache &) const =default

## Data Fields
uint32_t | position_consist_length = 0
| Cache for NewGRF var 40.
uint32_t | position_same_id_length = 0
| Cache for NewGRF var 41.
uint32_t | consist_cargo_information = 0
| Cache for NewGRF var 42. (Note: The cargotype is untranslated in the cache because the accessing GRF is yet unknown.)
uint32_t | company_information = 0
| Cache for NewGRF var 43.
uint32_t | position_in_vehicle = 0
| Cache for NewGRF var 4D.
uint8_t | cache_valid = 0
| Bitset that indicates which cache values are valid.

## Detailed Description

Cached often queried (NewGRF) values.

Definition at line 55 of file vehicle_base.h.

## Field Documentation

## ◆ cache_valid

uint8_t NewGRFCache::cache_valid = 0

Bitset that indicates which cache values are valid.

Definition at line 62 of file vehicle_base.h.

Referenced by FillNewGRFVehicleCache(), and Vehicle::InvalidateNewGRFCache().

## ◆ company_information

uint32_t NewGRFCache::company_information = 0

Cache for NewGRF var 43.

Definition at line 60 of file vehicle_base.h.

## ◆ consist_cargo_information

uint32_t NewGRFCache::consist_cargo_information = 0

Cache for NewGRF var 42. (Note: The cargotype is untranslated in the cache because the accessing GRF is yet unknown.)

Definition at line 59 of file vehicle_base.h.

## ◆ position_consist_length

uint32_t NewGRFCache::position_consist_length = 0

Cache for NewGRF var 40.

Definition at line 57 of file vehicle_base.h.

## ◆ position_in_vehicle

uint32_t NewGRFCache::position_in_vehicle = 0

Cache for NewGRF var 4D.

Definition at line 61 of file vehicle_base.h.

## ◆ position_same_id_length

uint32_t NewGRFCache::position_same_id_length = 0

Cache for NewGRF var 41.

Definition at line 58 of file vehicle_base.h.

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

- src/vehicle_base.h