OpenTTD Source 20250426-master-gbb1d561369
newgrf.cpp File Reference

Base of all NewGRF support. More...

#include "stdafx.h"
#include "core/backup_type.hpp"
#include "core/container_func.hpp"
#include "debug.h"
#include "fileio_func.h"
#include "engine_func.h"
#include "engine_base.h"
#include "bridge.h"
#include "town.h"
#include "newgrf_engine.h"
#include "newgrf_text.h"
#include "spritecache.h"
#include "currency.h"
#include "landscape.h"
#include "newgrf_badge.h"
#include "newgrf_cargo.h"
#include "newgrf_sound.h"
#include "newgrf_station.h"
#include "industrytype.h"
#include "newgrf_canal.h"
#include "newgrf_townname.h"
#include "newgrf_industries.h"
#include "newgrf_airporttiles.h"
#include "newgrf_airport.h"
#include "newgrf_object.h"
#include "network/core/config.h"
#include "smallmap_gui.h"
#include "genworld.h"
#include "error_func.h"
#include "vehicle_base.h"
#include "road.h"
#include "newgrf_roadstop.h"
#include "newgrf/newgrf_bytereader.h"
#include "newgrf/newgrf_internal_vehicle.h"
#include "newgrf/newgrf_internal.h"
#include "newgrf/newgrf_stringmapping.h"
#include "table/strings.h"
#include "safeguards.h"

Go to the source code of this file.

Data Structures

struct  InvokeGrfActionHandler
 Helper class to invoke a GrfActionHandler. More...
 

Functions

std::span< const GRFFileGetAllGRFFiles ()
 
void GrfMsgI (int severity, const std::string &msg)
 Debug() function dedicated to newGRF debugging messages Function is essentially the same as Debug(grf, severity, ...) with the addition of file:line information when parsing grf files.
 
GRFFileGetFileByGRFID (uint32_t grfid)
 Obtain a NewGRF file by its grfID.
 
static GRFFileGetFileByFilename (const std::string &filename)
 Obtain a NewGRF file by its filename.
 
static void ClearTemporaryNewGRFData (GRFFile *gf)
 Reset all NewGRFData that was used only while processing data.
 
GRFErrorDisableGrf (StringID message, GRFConfig *config)
 Disable a GRF.
 
void DisableStaticNewGRFInfluencingNonStaticNewGRFs (GRFConfig &c)
 Disable a static NewGRF when it is influencing another (non-static) NewGRF as this could cause desyncs.
 
void SetNewGRFOverride (uint32_t source_grfid, uint32_t target_grfid)
 Set the override for a NewGRF.
 
GRFFileGetCurrentGRFOverride ()
 Get overridden GRF for current GRF if present.
 
EngineGetNewEngine (const GRFFile *file, VehicleType type, uint16_t internal_id, bool static_access)
 Returns the engine associated to a certain internal_id, resp.
 
EngineID GetNewEngineID (const GRFFile *file, VehicleType type, uint16_t internal_id)
 Return the ID of a new engine.
 
CargoTypes TranslateRefitMask (uint32_t refit_mask)
 Translate the refit mask.
 
void ConvertTTDBasePrice (uint32_t base_pointer, const char *error_location, Price *index)
 Converts TTD(P) Base Price pointers into the enum used by OTTD See http://wiki.ttdpatch.net/tiki-index.php?page=BaseCosts.
 
void GRFUnsafe (ByteReader &)
 Set the current NewGRF as unsafe for static use.
 
static void ResetNewGRF ()
 Reset and clear all NewGRFs.
 
static void ResetNewGRFErrors ()
 Clear all NewGRF errors.
 
void ResetCallbacks (bool final)
 
void ResetGRM ()
 
void ResetNewGRFData ()
 Reset all NewGRF loaded data.
 
void ResetPersistentNewGRFData ()
 Reset NewGRF data which is stored persistently in savegames.
 
std::span< const CargoLabelGetCargoTranslationTable (const GRFFile &grffile)
 Get the cargo translation table to use for the given GRF file.
 
static void BuildCargoTranslationMap ()
 Construct the Cargo Mapping.
 
static void InitNewGRFFile (const GRFConfig &config)
 Prepare loading a NewGRF file with its config.
 
static CargoLabel GetActiveCargoLabel (const std::initializer_list< CargoLabel > &labels)
 Find first cargo label that exists and is active from a list of cargo labels.
 
static CargoLabel GetActiveCargoLabel (const std::variant< CargoLabel, MixedCargoType > &label)
 Get active cargo label from either a cargo label or climate-dependent mixed cargo type.
 
static void CalculateRefitMasks ()
 Precalculate refit masks from cargo classes for all vehicles.
 
static void FinaliseCanals ()
 Set to use the correct action0 properties for each canal feature.
 
static void FinaliseEngineArray ()
 Check for invalid engines.
 
void FinaliseCargoArray ()
 Check for invalid cargoes.
 
static bool IsHouseSpecValid (HouseSpec &hs, const HouseSpec *next1, const HouseSpec *next2, const HouseSpec *next3, const std::string &filename)
 Check if a given housespec is valid and disable it if it's not.
 
static void EnsureEarlyHouse (HouseZones bitmask)
 Make sure there is at least one house available in the year 0 for the given climate / housezone combination.
 
static void FinaliseHouseArray ()
 Add all new houses to the house array.
 
static void FinaliseIndustriesArray ()
 Add all new industries to the industry array.
 
static void FinaliseObjectsArray ()
 Add all new objects to the object array.
 
static void FinaliseAirportsArray ()
 Add all new airports to the airport array.
 
static void DecodeSpecialSprite (ReusableBuffer< uint8_t > &allocator, uint num, GrfLoadingStage stage)
 
static void LoadNewGRFFileFromFile (GRFConfig &config, GrfLoadingStage stage, SpriteFile &file)
 Load a particular NewGRF from a SpriteFile.
 
void LoadNewGRFFile (GRFConfig &config, GrfLoadingStage stage, Subdirectory subdir, bool temporary)
 Load a particular NewGRF.
 
static void ActivateOldShore ()
 Relocates the old shore sprites at new positions.
 
static void ActivateOldTramDepot ()
 Replocate the old tram depot sprites to the new position, if no new ones were loaded.
 
static void FinalisePriceBaseMultipliers ()
 Decide whether price base multipliers of grfs shall apply globally or only to the grf specifying them.
 
template<typename T >
void AddBadgeToSpecs (T &specs, GrfSpecFeature feature, Badge &badge)
 
static void FinaliseBadges ()
 Finish up applying badges to things.
 
void InitGRFTownGeneratorNames ()
 Allocate memory for the NewGRF town names.
 
static void AfterLoadGRFs ()
 Finish loading NewGRFs and execute needed post-processing.
 
void LoadNewGRF (SpriteID load_index, uint num_baseset)
 Load all the NewGRFs.
 

Variables

static std::vector< GRFFile_grf_files
 List of all loaded GRF files.
 
GrfMiscBits _misc_grf_features {}
 Miscellaneous GRF features, set by Action 0x0D, parameter 0x9E.
 
GRFLoadedFeatures _loaded_newgrf_features
 Indicates which are the newgrf features currently loaded ingame.
 
GrfProcessingState _cur_gps
 
ReferenceThroughBaseContainer< std::vector< GRFTempEngineData > > _gted
 Temporary engine data used during NewGRF loading.
 
static std::map< uint32_t, uint32_t > _grf_id_overrides
 

Detailed Description

Base of all NewGRF support.

Definition in file newgrf.cpp.

Function Documentation

◆ ActivateOldShore()

static void ActivateOldShore ( )
static

Relocates the old shore sprites at new positions.

  1. If shore sprites are neither loaded by Action5 nor ActionA, the extra sprites from openttd(w/d).grf are used. (SHORE_REPLACE_ONLY_NEW)
  2. If a newgrf replaces some shore sprites by ActionA. The (maybe also replaced) grass tiles are used for corner shores. (SHORE_REPLACE_ACTION_A)
  3. If a newgrf replaces shore sprites by Action5 any shore replacement by ActionA has no effect. (SHORE_REPLACE_ACTION_5)

Definition at line 1416 of file newgrf.cpp.

References _loaded_newgrf_features, GRFLoadedFeatures::shore, SHORE_REPLACE_ACTION_5, SHORE_REPLACE_ACTION_A, SHORE_REPLACE_NONE, and SPR_SHORE_BASE.

Referenced by AfterLoadGRFs().

◆ ActivateOldTramDepot()

static void ActivateOldTramDepot ( )
static

Replocate the old tram depot sprites to the new position, if no new ones were loaded.

Definition at line 1453 of file newgrf.cpp.

References _loaded_newgrf_features, GRFLoadedFeatures::tram, and TRAMWAY_REPLACE_DEPOT_WITH_TRACK.

Referenced by AfterLoadGRFs().

◆ AddBadgeToSpecs()

template<typename T >
void AddBadgeToSpecs ( T &  specs,
GrfSpecFeature  feature,
Badge badge 
)

Definition at line 1582 of file newgrf.cpp.

◆ AfterLoadGRFs()

◆ BuildCargoTranslationMap()

static void BuildCargoTranslationMap ( )
static

Construct the Cargo Mapping.

Note
This is the reverse of a cargo translation table

Definition at line 528 of file newgrf.cpp.

References GRFFile::cargo_map, find_index(), GetCargoTranslationTable(), GrfProcessingState::grffile, and CargoSpec::Iterate().

Referenced by LoadNewGRF().

◆ CalculateRefitMasks()

◆ ClearTemporaryNewGRFData()

static void ClearTemporaryNewGRFData ( GRFFile gf)
static

Reset all NewGRFData that was used only while processing data.

Definition at line 122 of file newgrf.cpp.

References GRFFile::labels.

Referenced by DisableGrf(), and LoadNewGRF().

◆ ConvertTTDBasePrice()

void ConvertTTDBasePrice ( uint32_t  base_pointer,
const char *  error_location,
Price index 
)

Converts TTD(P) Base Price pointers into the enum used by OTTD See http://wiki.ttdpatch.net/tiki-index.php?page=BaseCosts.

Parameters
base_pointerTTD(P) Base Price Pointer
error_locationFunction name for grf error messages
[out]indexIf base_pointer is valid, index is assigned to the matching price; else it is left unchanged

< Position of first base price

< Size of each base price record

Definition at line 326 of file newgrf.cpp.

Referenced by RailVehicleChangeInfo(), and RoadVehicleChangeInfo().

◆ DecodeSpecialSprite()

static void DecodeSpecialSprite ( ReusableBuffer< uint8_t > &  allocator,
uint  num,
GrfLoadingStage  stage 
)
static

Definition at line 1241 of file newgrf.cpp.

◆ DisableGrf()

◆ DisableStaticNewGRFInfluencingNonStaticNewGRFs()

void DisableStaticNewGRFInfluencingNonStaticNewGRFs ( GRFConfig c)

Disable a static NewGRF when it is influencing another (non-static) NewGRF as this could cause desyncs.

We could just tell the NewGRF querying that the file doesn't exist, but that might give unwanted results. Disabling the NewGRF gives the best result as no NewGRF author can complain about that.

Parameters
cThe NewGRF to disable.

Definition at line 163 of file newgrf.cpp.

References GRFError::data, DisableGrf(), GRFConfig::GetName(), and GrfProcessingState::grfconfig.

Referenced by ParamSet().

◆ EnsureEarlyHouse()

static void EnsureEarlyHouse ( HouseZones  bitmask)
static

Make sure there is at least one house available in the year 0 for the given climate / housezone combination.

Parameters
bitmaskThe climate and housezone to check for. Exactly one climate bit and one housezone bit should be set.

Definition at line 994 of file newgrf.cpp.

References TimerGameConst< struct Calendar >::MAX_YEAR, TimerGameConst< struct Calendar >::MIN_YEAR, and HouseSpec::Specs().

Referenced by FinaliseHouseArray().

◆ FinaliseAirportsArray()

static void FinaliseAirportsArray ( )
static

Add all new airports to the airport array.

Airport properties can be set at any time in the GRF file, so we can only add a airport spec to the airport array after the file has finished loading.

Definition at line 1177 of file newgrf.cpp.

References _grf_files.

Referenced by AfterLoadGRFs().

◆ FinaliseBadges()

◆ FinaliseCanals()

static void FinaliseCanals ( )
static

Set to use the correct action0 properties for each canal feature.

Definition at line 834 of file newgrf.cpp.

References _water_feature.

Referenced by AfterLoadGRFs().

◆ FinaliseCargoArray()

void FinaliseCargoArray ( )

Check for invalid cargoes.

Definition at line 918 of file newgrf.cpp.

Referenced by AfterLoadGRFs().

◆ FinaliseEngineArray()

◆ FinaliseHouseArray()

static void FinaliseHouseArray ( )
static

Add all new houses to the house array.

House properties can be set at any time in the GRF file, so we can only add a house spec to the house array after the file has finished loading. We also need to check the dates, due to the TTDPatch behaviour described below that we need to emulate.

Definition at line 1019 of file newgrf.cpp.

References _grf_files, _settings_game, HouseSpec::accepts_cargo, HouseSpec::accepts_cargo_label, HouseSpec::building_flags, HouseSpec::cargo_acceptance, EnsureEarlyHouse(), GameSettings::game_creation, HouseSpec::Get(), HZ_SUBARTC_ABOVE, HZ_ZON1, HZ_ZON5, IsHouseSpecValid(), IsValidCargoType(), GameCreationSettings::landscape, lengthof, NUM_HOUSES, HouseOverrideManager::SetEntitySpec(), HouseSpec::Specs(), and to_underlying().

Referenced by AfterLoadGRFs().

◆ FinaliseIndustriesArray()

static void FinaliseIndustriesArray ( )
static

Add all new industries to the industry array.

Industry properties can be set at any time in the GRF file, so we can only add a industry spec to the industry array after the file has finished loading.

Definition at line 1101 of file newgrf.cpp.

References _grf_files, GetActiveCargoLabel(), IsValidCargoType(), MapNewGRFIndustryType(), and IndustryOverrideManager::SetEntitySpec().

Referenced by AfterLoadGRFs().

◆ FinaliseObjectsArray()

static void FinaliseObjectsArray ( )
static

Add all new objects to the object array.

Object properties can be set at any time in the GRF file, so we can only add an object spec to the object array after the file has finished loading.

Definition at line 1155 of file newgrf.cpp.

References _grf_files, ObjectSpec::BindToClasses(), and ObjectOverrideManager::SetEntitySpec().

Referenced by AfterLoadGRFs().

◆ FinalisePriceBaseMultipliers()

static void FinalisePriceBaseMultipliers ( )
static

Decide whether price base multipliers of grfs shall apply globally or only to the grf specifying them.

Features, to which '_grf_id_overrides' applies. Currently vehicle features only.

Definition at line 1468 of file newgrf.cpp.

References _grf_files, Debug, PriceBaseSpec::fallback_price, PriceBaseSpec::grf_feature, GRFFile::grf_features, HasBit(), GRFFile::price_base_multipliers, and SetPriceBaseMultiplier().

Referenced by AfterLoadGRFs().

◆ GetActiveCargoLabel() [1/2]

static CargoLabel GetActiveCargoLabel ( const std::initializer_list< CargoLabel > &  labels)
static

Find first cargo label that exists and is active from a list of cargo labels.

Parameters
labelsList of cargo labels.
Returns
First cargo label in list that exists, or CT_INVALID if none exist.

Definition at line 603 of file newgrf.cpp.

References CT_INVALID.

Referenced by CalculateRefitMasks(), FinaliseIndustriesArray(), and GetActiveCargoLabel().

◆ GetActiveCargoLabel() [2/2]

static CargoLabel GetActiveCargoLabel ( const std::variant< CargoLabel, MixedCargoType > &  label)
static

Get active cargo label from either a cargo label or climate-dependent mixed cargo type.

Parameters
labelCargo label or climate-dependent mixed cargo type.
Returns
Active cargo label, or CT_INVALID if cargo label is not active.

Definition at line 617 of file newgrf.cpp.

References GetActiveCargoLabel(), MCT_GRAIN_WHEAT_MAIZE, MCT_LIVESTOCK_FRUIT, and MCT_VALUABLES_GOLD_DIAMONDS.

◆ GetAllGRFFiles()

std::span< const GRFFile > GetAllGRFFiles ( )

Definition at line 63 of file newgrf.cpp.

◆ GetCargoTranslationTable()

std::span< const CargoLabel > GetCargoTranslationTable ( const GRFFile grffile)

Get the cargo translation table to use for the given GRF file.

Parameters
grffileGRF file.
Returns
Readonly cargo translation table to use.

Definition at line 512 of file newgrf.cpp.

References GRFFile::cargo_list, GetClimateDependentCargoTranslationTable(), and GetClimateIndependentCargoTranslationTable().

Referenced by BuildCargoTranslationMap().

◆ GetCurrentGRFOverride()

GRFFile * GetCurrentGRFOverride ( )

Get overridden GRF for current GRF if present.

Returns
Overridden GRFFile if present, or nullptr.

Definition at line 191 of file newgrf.cpp.

References GetFileByGRFID(), and GrfProcessingState::grffile.

Referenced by LoadTranslationTable().

◆ GetFileByFilename()

static GRFFile * GetFileByFilename ( const std::string &  filename)
static

Obtain a NewGRF file by its filename.

Parameters
filenameThe filename to obtain the file for.
Returns
The file.

Definition at line 114 of file newgrf.cpp.

References _grf_files.

Referenced by InitNewGRFFile(), and LoadNewGRFFile().

◆ GetFileByGRFID()

GRFFile * GetFileByGRFID ( uint32_t  grfid)

Obtain a NewGRF file by its grfID.

Parameters
grfidThe grfID to obtain the file for
Returns
The file.

Definition at line 102 of file newgrf.cpp.

References _grf_files.

Referenced by DisableGrf(), GetCurrentGRFOverride(), LanguageMap::GetLanguageMap(), GetNewEngine(), ImportGRFSound(), LoadNewGRF(), and ParamSet().

◆ GetNewEngine()

◆ GetNewEngineID()

EngineID GetNewEngineID ( const GRFFile file,
VehicleType  type,
uint16_t  internal_id 
)

Return the ID of a new engine.

Parameters
fileThe NewGRF file providing the engine.
typeThe Vehicle type.
internal_idNewGRF-internal ID of the engine.
Returns
The new EngineID.
Note
depending on the dynamic_engine setting and a possible override property the grfID may be unique or overwriting or partially re-defining properties of an existing engine.

Definition at line 290 of file newgrf.cpp.

References _settings_game, VehicleSettings::dynamic_engines, EngineOverrideManager::GetID(), and GameSettings::vehicle.

Referenced by FinaliseEngineArray(), and GetNextArticulatedPart().

◆ GrfMsgI()

void GrfMsgI ( int  severity,
const std::string &  msg 
)

Debug() function dedicated to newGRF debugging messages Function is essentially the same as Debug(grf, severity, ...) with the addition of file:line information when parsing grf files.

NOTE: for the above reason(s) GrfMsg() should ONLY be used for loading/parsing grf files, not for runtime debug messages as there is no file information available during that time.

Parameters
severitydebugging severity level, see debug.h
msgthe message

Definition at line 88 of file newgrf.cpp.

References Debug, GRFConfig::filename, GrfProcessingState::grfconfig, and GrfProcessingState::nfo_line.

◆ GRFUnsafe()

void GRFUnsafe ( ByteReader )

Set the current NewGRF as unsafe for static use.

Note
Used during safety scan on unsafe actions.

Definition at line 367 of file newgrf.cpp.

References GRFConfig::flags, GrfProcessingState::grfconfig, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set(), GrfProcessingState::skip_sprites, and Unsafe.

◆ InitGRFTownGeneratorNames()

void InitGRFTownGeneratorNames ( )
extern

Allocate memory for the NewGRF town names.

Definition at line 80 of file newgrf_townname.cpp.

References GRFTownName::styles.

Referenced by AfterLoadGRFs().

◆ InitNewGRFFile()

static void InitNewGRFFile ( const GRFConfig config)
static

Prepare loading a NewGRF file with its config.

Parameters
configThe NewGRF configuration struct with name, id, parameters and alike.

Definition at line 545 of file newgrf.cpp.

References _grf_files, GRFConfig::filename, GetFileByFilename(), and GrfProcessingState::grffile.

Referenced by LoadNewGRF().

◆ IsHouseSpecValid()

static bool IsHouseSpecValid ( HouseSpec hs,
const HouseSpec next1,
const HouseSpec next2,
const HouseSpec next3,
const std::string &  filename 
)
static

Check if a given housespec is valid and disable it if it's not.

The housespecs that follow it are used to check the validity of multitile houses.

Parameters
hsThe housespec to check.
next1The housespec that follows hs.
next2The housespec that follows next1.
next3The housespec that follows next2.
filenameThe filename of the newgrf this house was defined in.
Returns
Whether the given housespec is valid.

Definition at line 948 of file newgrf.cpp.

References BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Any(), HouseSpec::building_availability, HouseSpec::building_flags, Debug, HouseSpec::enabled, HouseSpec::Get(), HouseSpec::grf_prop, HZ_CLIMALL, HZ_ZONALL, GRFFilePropsBase::local_id, and HouseSpec::population.

Referenced by FinaliseHouseArray().

◆ LoadNewGRF()

◆ LoadNewGRFFile()

void LoadNewGRFFile ( GRFConfig config,
GrfLoadingStage  stage,
Subdirectory  subdir,
bool  temporary 
)

Load a particular NewGRF.

Parameters
configThe configuration of the to be loaded NewGRF.
stageThe loading stage of the NewGRF.
subdirThe sub directory to find the NewGRF in.
temporaryThe NewGRF/sprite file is to be loaded temporarily and should be closed immediately, contrary to loading the SpriteFile and having it cached by the SpriteCache.

Definition at line 1380 of file newgrf.cpp.

References GRFConfig::filename, GRFConfig::flags, GCS_INITIALISED, GetFileByFilename(), GrfProcessingState::grffile, GRFP_USE_MASK, LoadNewGRFFileFromFile(), OpenCachedSpriteFile(), GRFConfig::palette, Reserved, GRFConfig::status, and BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test().

Referenced by FillGRFDetails(), and LoadNewGRF().

◆ LoadNewGRFFileFromFile()

static void LoadNewGRFFileFromFile ( GRFConfig config,
GrfLoadingStage  stage,
SpriteFile file 
)
static

◆ ResetCallbacks()

void ResetCallbacks ( bool  final)
extern

Definition at line 264 of file newgrf_act2.cpp.

◆ ResetGRM()

void ResetGRM ( )
extern

Definition at line 37 of file newgrf_actd.cpp.

◆ ResetNewGRF()

static void ResetNewGRF ( )
static

Reset and clear all NewGRFs.

Definition at line 376 of file newgrf.cpp.

References _grf_files, _grfconfig, GrfProcessingState::grfconfig, and GrfProcessingState::grffile.

Referenced by ResetNewGRFData().

◆ ResetNewGRFData()

◆ ResetNewGRFErrors()

static void ResetNewGRFErrors ( )
static

Clear all NewGRF errors.

Definition at line 389 of file newgrf.cpp.

References _grfconfig.

Referenced by ResetNewGRFData().

◆ ResetPersistentNewGRFData()

void ResetPersistentNewGRFData ( )

Reset NewGRF data which is stored persistently in savegames.

Definition at line 496 of file newgrf.cpp.

References OverrideManagerBase::ResetMapping(), and EngineOverrideManager::ResetToDefaultMapping().

◆ SetNewGRFOverride()

void SetNewGRFOverride ( uint32_t  source_grfid,
uint32_t  target_grfid 
)

Set the override for a NewGRF.

Parameters
source_grfidThe grfID which wants to override another NewGRF.
target_grfidThe grfID which is being overridden.

Definition at line 176 of file newgrf.cpp.

Referenced by LoadNewGRF().

◆ TranslateRefitMask()

CargoTypes TranslateRefitMask ( uint32_t  refit_mask)

Translate the refit mask.

refit_mask is uint32_t as it has not been mapped to CargoTypes.

Definition at line 309 of file newgrf.cpp.

References GetCargoTranslation(), GrfProcessingState::grffile, IsValidCargoType(), and SetBit().

Referenced by AircraftVehicleChangeInfo(), RailVehicleChangeInfo(), RoadVehicleChangeInfo(), ShipVehicleChangeInfo(), and StationChangeInfo().

Variable Documentation

◆ _cur_gps

Definition at line 74 of file newgrf.cpp.

◆ _grf_files

◆ _grf_id_overrides

std::map<uint32_t, uint32_t> _grf_id_overrides
static

Definition at line 169 of file newgrf.cpp.

◆ _gted

◆ _loaded_newgrf_features

◆ _misc_grf_features

GrfMiscBits _misc_grf_features {}

Miscellaneous GRF features, set by Action 0x0D, parameter 0x9E.

Definition at line 69 of file newgrf.cpp.

Referenced by GetGlobalVariable(), HasGrfMiscBit(), ParamSet(), and ResetNewGRFData().