45 enum GrfLoadingStage {
58 GMB_DESERT_TREES_FIELDS = 0,
59 GMB_DESERT_PAVED_ROADS = 1,
60 GMB_FIELD_BOUNDING_BOX = 2,
62 GMB_AMBIENT_SOUND_CALLBACK = 4,
63 GMB_CATENARY_ON_3RD_TRACK = 5,
64 GMB_SECOND_ROCKY_TILE_SET = 6,
94 static const uint32 INVALID_GRFID = 0xFFFFFFFF;
139 PriceMultipliers price_base_multipliers;
149 assert(this->param_end <=
lengthof(this->param));
150 return (number < this->param_end) ? this->param[number] : 0;
177 return HasBit(_misc_grf_features, bit);
186 void LoadNewGRF(uint load_index, uint file_index, uint num_baseset);
191 void CDECL
grfmsg(
int severity,
const char *str, ...) WARN_FORMAT(2, 3);
struct LanguageMap * language_map
Mappings related to the languages.
Subdirectory
The different kinds of subdirectories OpenTTD uses.
void ResetPersistentNewGRFData()
Reset NewGRF data which is stored persistently in savegames.
Simple vector class that allows allocating an item without the need to copy this->data needlessly...
CanalFeature
List of different canal 'features'.
uint32 grf_features
Bitset of GrfSpecFeature the grf uses.
GRFLoadedFeatures _loaded_newgrf_features
Indicates which are the newgrf features currently loaded ingame.
StringID MapGRFStringID(uint32 grfid, StringID str)
Used when setting an object's property to map to the GRF's strings while taking in consideration the ...
Allow incrementing of ObjectClassID variables.
Functions related to bit mathematics.
uint8 flags
Flags controlling display.
Helper types related to the allocation of memory.
GRFLabel * label
Pointer to the first label. This is a linked list, not an array.
uint32 GetParam(uint number) const
Get GRF Parameter with range checking.
No shore sprites were replaced.
Types for Standard In/Out file operations.
Fake town GrfSpecFeature for NewGRF debugging (parent scope)
ShoreReplacement shore
It which way shore sprites were replaced.
uint param_end
one more than the highest set parameter
int traininfo_vehicle_pitch
Vertical offset for draing train images in depot GUI and vehicle details.
Shore sprites were replaced by Action5.
Information about GRF, used in the game and (part of it) in savegames.
SmallVector< RailTypeLabel, 4 > railtype_list
Railtype translation table.
Mapping of language data between a NewGRF and OpenTTD.
End of the fake features.
uint traininfo_vehicle_width
Width (in pixels) of a 8/8 train vehicle in depot GUI and vehicle details.
Defines the data structure for constructing industry.
#define lengthof(x)
Return the length of an fixed size array.
Base class that provides memory initialization on dynamically created objects.
uint32 StringID
Numeric value that represents a string, independent of the selected language.
bool has_newhouses
Set if there are any newhouses loaded.
Shore sprites were replaced by ActionA (using grass tiles for the corner-shores). ...
Maximal number of cargo types in a game.
uint8 callback_mask
Bitmask of canal callbacks that have to be called.
void ShowNewGRFError()
Show the first NewGRF error we can find.
void CDECL bool GetGlobalVariable(byte param, uint32 *value, const GRFFile *grffile)
Reads a variable common to VarAction2 and Action7/9/D.
void LoadNewGRFFile(struct GRFConfig *config, uint file_index, GrfLoadingStage stage, Subdirectory subdir)
Load a particular NewGRF.
Canal properties local to the NewGRF.
SmallVector< CargoLabel, 4 > cargo_list
Cargo translation table (local ID -> label)
bool has_newindustries
Set if there are any newindustries loaded.
void CDECL grfmsg(int severity, const char *str,...)
DEBUG() function dedicated to newGRF debugging messages Function is essentially the same as DEBUG(grf...
Only corner-shores were loaded by Action5 (openttd(w/d).grf only).
bool has_2CC
Set if any vehicle is loaded which uses 2cc (two company colours).
Defines the data structure of each individual tile of an airport.
byte GetGRFContainerVersion()
Get the container version of the currently opened GRF file.
Types/functions related to cargoes.
uint64 used_liveries
Bitmask of LiveryScheme used by the defined engines.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
byte _misc_grf_features
Miscellaneous GRF features, set by Action 0x0D, parameter 0x9E.
Defines the data structure of each individual tile of an industry.
void ReloadNewGRFData()
Reload all NewGRF files during a running game.
Defines the data structure for an airport.
Use 32 pixels per train vehicle in depot gui and vehicle details. Never set in the global variable;...
#define DECLARE_POSTFIX_INCREMENT(type)
Some enums need to have allowed incrementing (i.e.
void ResetNewGRFData()
Reset all NewGRF loaded data TODO.
static bool HasGrfMiscBit(GrfMiscBit bit)
Check for grf miscellaneous bits.
void LoadNewGRF(uint load_index, uint file_index, uint num_baseset)
Load all the NewGRFs.
Dynamic data of a loaded NewGRF.
The different types of rail.