OpenTTD Source 20250312-master-gcdcc6b491d
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 69 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 76 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 74 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 73 of file vehicle_base.h.

◆ position_consist_length

uint32_t NewGRFCache::position_consist_length = 0

Cache for NewGRF var 40.

Definition at line 71 of file vehicle_base.h.

◆ position_in_vehicle

uint32_t NewGRFCache::position_in_vehicle = 0

Cache for NewGRF var 4D.

Definition at line 75 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 72 of file vehicle_base.h.


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