OpenTTD Source  20240917-master-g9ab0a47812
newgrf_config.h
Go to the documentation of this file.
1 /*
2  * This file is part of OpenTTD.
3  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6  */
7 
10 #ifndef NEWGRF_CONFIG_H
11 #define NEWGRF_CONFIG_H
12 
13 #include "strings_type.h"
14 #include "core/alloc_type.hpp"
15 #include "misc/countedptr.hpp"
16 #include "fileio_type.h"
17 #include "textfile_type.h"
18 #include "newgrf_text.h"
19 #include "3rdparty/md5/md5.h"
20 
22 enum GCF_Flags {
31 };
32 
34 enum GRFStatus {
40 };
41 
43 enum GRFBugs {
49 };
50 
56 };
57 
59 enum GRFPalette {
65 
66  GRFP_USE_DOS = 0x0,
68  GRFP_USE_MASK = 0x1,
69 
75 
79 };
80 
81 
83 struct GRFIdentifier {
84  uint32_t grfid;
85  MD5Hash md5sum;
86 
87  GRFIdentifier() = default;
88  GRFIdentifier(const GRFIdentifier &other) = default;
89  GRFIdentifier(GRFIdentifier &&other) = default;
90  GRFIdentifier(uint32_t grfid, const MD5Hash &md5sum) : grfid(grfid), md5sum(md5sum) {}
91 
92  GRFIdentifier& operator =(const GRFIdentifier &other) = default;
93 
100  inline bool HasGrfIdentifier(uint32_t grfid, const MD5Hash *md5sum) const
101  {
102  if (this->grfid != grfid) return false;
103  if (md5sum == nullptr) return true;
104  return *md5sum == this->md5sum;
105  }
106 };
107 
109 struct GRFError {
111 
112  std::string custom_message{};
113  std::string data{};
116  std::array<uint32_t, 2> param_value{};
117 };
118 
124 };
125 
128  GRFParameterInfo(uint nr);
132  uint32_t min_value;
133  uint32_t max_value;
134  uint32_t def_value;
135  uint8_t param_nr;
136  uint8_t first_bit;
137  uint8_t num_bit;
138  std::map<uint32_t, GRFTextList> value_names;
140 
141  uint32_t GetValue(struct GRFConfig *config) const;
142  void SetValue(struct GRFConfig *config, uint32_t value);
143  void Finalize();
144 };
145 
148  GRFConfig(const std::string &filename = std::string{});
149  GRFConfig(const GRFConfig &config);
150 
151  /* Remove the copy assignment, as the default implementation will not do the right thing. */
152  GRFConfig &operator=(GRFConfig &rhs) = delete;
153 
155  MD5Hash original_md5sum;
156  std::string filename;
160  std::optional<GRFError> error;
161 
162  uint32_t version;
164  uint8_t flags;
166  uint32_t grf_bugs;
167  std::array<uint32_t, 0x80> param;
168  uint8_t num_params;
170  uint8_t palette;
171  std::vector<std::optional<GRFParameterInfo>> param_info;
173 
174  struct GRFConfig *next;
175 
176  bool IsCompatible(uint32_t old_version) const;
177  void SetParams(const std::vector<uint32_t> &pars);
178  void CopyParams(const GRFConfig &src);
179 
180  std::optional<std::string> GetTextfile(TextfileType type) const;
181  const char *GetName() const;
182  const char *GetDescription() const;
183  const char *GetURL() const;
184 
185  void SetParameterDefaults();
186  void SetSuitablePalette();
187  void FinalizeParameterInfo();
188 };
189 
197 };
198 
199 extern GRFConfig *_all_grfs;
200 extern GRFConfig *_grfconfig;
203 extern uint _missing_extra_graphics;
204 
208  virtual ~NewGRFScanCallback() = default;
210  virtual void OnNewGRFsScanned() = 0;
211 };
212 
214 
215 void ScanNewGRFFiles(NewGRFScanCallback *callback);
216 const GRFConfig *FindGRFConfig(uint32_t grfid, FindGRFConfigMode mode, const MD5Hash *md5sum = nullptr, uint32_t desired_version = 0);
217 GRFConfig *GetGRFConfig(uint32_t grfid, uint32_t mask = 0xFFFFFFFF);
218 GRFConfig **CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src, bool init_only);
220 void AppendToGRFConfigList(GRFConfig **dst, GRFConfig *el);
221 void ClearGRFConfigList(GRFConfig **config);
222 void ResetGRFConfig(bool defaults);
224 bool FillGRFDetails(GRFConfig *config, bool is_static, Subdirectory subdir = NEWGRF_DIR);
225 std::string GRFBuildParamList(const GRFConfig *c);
226 
227 /* In newgrf_gui.cpp */
228 void ShowNewGRFSettings(bool editable, bool show_params, bool exec_changes, GRFConfig **config);
229 void OpenGRFParameterWindow(bool is_baseset, GRFConfig *c, bool editable);
230 
231 void UpdateNewGRFScanStatus(uint num, const char *name);
232 void UpdateNewGRFConfigPalette(int32_t new_value = 0);
233 
234 #endif /* NEWGRF_CONFIG_H */
ShowNewGRFSettings
void ShowNewGRFSettings(bool editable, bool show_params, bool exec_changes, GRFConfig **config)
Setup the NewGRF gui.
Definition: newgrf_gui.cpp:2020
GRFConfig::SetSuitablePalette
void SetSuitablePalette()
Set the palette of this GRFConfig to something suitable.
Definition: newgrf_config.cpp:141
GRFP_USE_MASK
@ GRFP_USE_MASK
Bitmask to get only the use palette use states.
Definition: newgrf_config.h:68
GRFConfig::info
GRFTextWrapper info
NOSAVE: GRF info (author, copyright, ...) (Action 0x08)
Definition: newgrf_config.h:158
GRFConfig::num_valid_params
uint8_t num_valid_params
NOSAVE: Number of valid parameters (action 0x14)
Definition: newgrf_config.h:169
GRFError::custom_message
std::string custom_message
Custom message (if present)
Definition: newgrf_config.h:112
GCS_ACTIVATED
@ GCS_ACTIVATED
GRF file has been activated.
Definition: newgrf_config.h:39
GBUG_VEH_REFIT
@ GBUG_VEH_REFIT
Articulated vehicles carry different cargoes resp. are differently refittable than specified in purch...
Definition: newgrf_config.h:45
GLC_COMPATIBLE
@ GLC_COMPATIBLE
Compatible (eg. the same ID, but different checksum) GRF found in at least one case.
Definition: newgrf_config.h:54
GRFStatus
GRFStatus
Status of GRF.
Definition: newgrf_config.h:34
GBUG_VEH_POWERED_WAGON
@ GBUG_VEH_POWERED_WAGON
Powered wagon changed poweredness state when not inside a depot.
Definition: newgrf_config.h:46
GetGRFConfig
GRFConfig * GetGRFConfig(uint32_t grfid, uint32_t mask=0xFFFFFFFF)
Retrieve a NewGRF from the current config by its grfid.
Definition: newgrf_config.cpp:712
GRFParameterInfo::GetValue
uint32_t GetValue(struct GRFConfig *config) const
Get the value of this user-changeable parameter from the given config.
Definition: newgrf_config.cpp:201
StringID
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Definition: strings_type.h:16
AppendStaticGRFConfigs
void AppendStaticGRFConfigs(GRFConfig **dst)
Appends the static GRFs to a list of GRFs.
Definition: newgrf_config.cpp:422
_missing_extra_graphics
uint _missing_extra_graphics
Number of sprites provided by the fallback extra GRF, i.e. missing in the baseset.
Definition: newgrf_config.cpp:167
GRFConfig::grf_bugs
uint32_t grf_bugs
NOSAVE: bugs in this GRF in this run,.
Definition: newgrf_config.h:166
GRFP_GRF_SIZE
@ GRFP_GRF_SIZE
The size of the GRFP_GRF data.
Definition: newgrf_config.h:62
GRFConfig::filename
std::string filename
Filename - either with or without full path.
Definition: newgrf_config.h:156
FGCM_COMPATIBLE
@ FGCM_COMPATIBLE
Find best compatible Grf wrt. desired_version.
Definition: newgrf_config.h:193
GRFError::severity
StringID severity
Info / Warning / Error / Fatal.
Definition: newgrf_config.h:115
GRFConfig::GRFConfig
GRFConfig(const std::string &filename=std::string{})
Create a new GRFConfig.
Definition: newgrf_config.cpp:37
GCS_NOT_FOUND
@ GCS_NOT_FOUND
GRF file was not found in the local cache.
Definition: newgrf_config.h:37
GRFConfig::ident
GRFIdentifier ident
grfid and md5sum to uniquely identify newgrfs
Definition: newgrf_config.h:154
GCF_COPY
@ GCF_COPY
The data is copied from a grf in _all_grfs.
Definition: newgrf_config.h:27
GCF_Flags
GCF_Flags
GRF config bit flags.
Definition: newgrf_config.h:22
GRFConfig::status
GRFStatus status
NOSAVE: GRFStatus, enum.
Definition: newgrf_config.h:165
GRFP_GRF_UNSET
@ GRFP_GRF_UNSET
The NewGRF provided no information.
Definition: newgrf_config.h:70
GRFP_USE_BIT
@ GRFP_USE_BIT
The bit used for storing the palette to use.
Definition: newgrf_config.h:60
GRFConfig::min_loadable_version
uint32_t min_loadable_version
NOSAVE: Minimum compatible version a NewGRF can define.
Definition: newgrf_config.h:163
ClearGRFConfigList
void ClearGRFConfigList(GRFConfig **config)
Clear a GRF Config list, freeing all nodes.
Definition: newgrf_config.cpp:352
GRFParameterInfo::type
GRFParameterType type
The type of this parameter.
Definition: newgrf_config.h:131
strings_type.h
GRFParameterInfo::min_value
uint32_t min_value
The minimal value this parameter can have.
Definition: newgrf_config.h:132
FindGRFConfig
const GRFConfig * FindGRFConfig(uint32_t grfid, FindGRFConfigMode mode, const MD5Hash *md5sum=nullptr, uint32_t desired_version=0)
Find a NewGRF in the scanned list.
Definition: newgrf_config.cpp:686
GRFP_BLT_UNSET
@ GRFP_BLT_UNSET
The NewGRF provided no information or doesn't care about a 32 bpp blitter.
Definition: newgrf_config.h:76
GRFBugs
GRFBugs
Encountered GRF bugs.
Definition: newgrf_config.h:43
GCF_COMPATIBLE
@ GCF_COMPATIBLE
GRF file does not exactly match the requested GRF (different MD5SUM), but grfid matches)
Definition: newgrf_config.h:26
alloc_type.hpp
_grfconfig_newgame
GRFConfig * _grfconfig_newgame
First item in list of default GRF set up.
Definition: newgrf_config.cpp:165
UpdateNewGRFScanStatus
void UpdateNewGRFScanStatus(uint num, const char *name)
Update the NewGRF scan status.
Definition: newgrf_gui.cpp:2286
GCF_INVALID
@ GCF_INVALID
GRF is unusable with this version of OpenTTD.
Definition: newgrf_config.h:30
GCF_INIT_ONLY
@ GCF_INIT_ONLY
GRF file is processed up to GLS_INIT.
Definition: newgrf_config.h:28
ResetGRFConfig
void ResetGRFConfig(bool defaults)
Reset the current GRF Config to either blank or newgame settings.
Definition: newgrf_config.cpp:447
GBUG_VEH_CAPACITY
@ GBUG_VEH_CAPACITY
Capacity of vehicle changes when not refitting or arranging.
Definition: newgrf_config.h:48
GRFConfig::GetTextfile
std::optional< std::string > GetTextfile(TextfileType type) const
Search a textfile file next to this NewGRF.
Definition: newgrf_config.cpp:740
FGCM_ANY
@ FGCM_ANY
Use first found.
Definition: newgrf_config.h:196
GRFP_GRF_OFFSET
@ GRFP_GRF_OFFSET
The offset of the GRFP_GRF data.
Definition: newgrf_config.h:61
textfile_type.h
GRFIdentifier
Basic data to distinguish a GRF.
Definition: newgrf_config.h:83
GRFP_GRF_DOS
@ GRFP_GRF_DOS
The NewGRF says the DOS palette can be used.
Definition: newgrf_config.h:71
GRFParameterInfo::SetValue
void SetValue(struct GRFConfig *config, uint32_t value)
Set the value of this user-changeable parameter in the given config.
Definition: newgrf_config.cpp:213
GRFConfig::version
uint32_t version
NOSAVE: Version a NewGRF can set so only the newest NewGRF is shown.
Definition: newgrf_config.h:162
GRFParameterInfo::value_names
std::map< uint32_t, GRFTextList > value_names
Names for each value.
Definition: newgrf_config.h:138
GRFP_BLT_SIZE
@ GRFP_BLT_SIZE
The size of the GRFP_BLT data.
Definition: newgrf_config.h:64
GRFParameterInfo::param_nr
uint8_t param_nr
GRF parameter to store content in.
Definition: newgrf_config.h:135
GCF_UNSAFE
@ GCF_UNSAFE
GRF file is unsafe for static usage.
Definition: newgrf_config.h:24
GCS_INITIALISED
@ GCS_INITIALISED
GRF file has been initialised.
Definition: newgrf_config.h:38
GRFConfig
Information about GRF, used in the game and (part of it) in savegames.
Definition: newgrf_config.h:147
_all_grfs
GRFConfig * _all_grfs
First item in list of all scanned NewGRFs.
Definition: newgrf_config.cpp:163
GRFError::GRFError
GRFError(StringID severity, StringID message=0)
Construct a new GRFError.
Definition: newgrf_config.cpp:174
GRFP_GRF_ANY
@ GRFP_GRF_ANY
The NewGRF says any palette can be used.
Definition: newgrf_config.h:73
GCF_SYSTEM
@ GCF_SYSTEM
GRF file is an openttd-internal system grf.
Definition: newgrf_config.h:23
GRFP_USE_DOS
@ GRFP_USE_DOS
The palette state is set to use the DOS palette.
Definition: newgrf_config.h:66
GRFConfig::SetParameterDefaults
void SetParameterDefaults()
Set the default value for all parameters as specified by action14.
Definition: newgrf_config.cpp:123
GRFP_USE_WINDOWS
@ GRFP_USE_WINDOWS
The palette state is set to use the Windows palette.
Definition: newgrf_config.h:67
GRFIdentifier::md5sum
MD5Hash md5sum
MD5 checksum of file to distinguish files with the same GRF ID (eg. newer version of GRF)
Definition: newgrf_config.h:85
NewGRFScanCallback::~NewGRFScanCallback
virtual ~NewGRFScanCallback()=default
Make sure the right destructor gets called.
ZeroedMemoryAllocator
Base class that provides memory initialization on dynamically created objects.
Definition: alloc_type.hpp:85
FindGRFConfigMode
FindGRFConfigMode
Method to find GRFs using FindGRFConfig.
Definition: newgrf_config.h:191
GRFParameterInfo
Information about one grf parameter.
Definition: newgrf_config.h:127
GRFConfig::error
std::optional< GRFError > error
NOSAVE: Error/Warning during GRF loading (Action 0x0B)
Definition: newgrf_config.h:160
GRFParameterInfo::first_bit
uint8_t first_bit
First bit to use in the GRF parameter.
Definition: newgrf_config.h:136
GRFP_BLT_32BPP
@ GRFP_BLT_32BPP
The NewGRF prefers a 32 bpp blitter.
Definition: newgrf_config.h:77
GRFConfig::has_param_defaults
bool has_param_defaults
NOSAVE: did this newgrf specify any defaults for it's parameters.
Definition: newgrf_config.h:172
FileHandle
Definition: fileio_type.h:158
GRFConfig::IsCompatible
bool IsCompatible(uint32_t old_version) const
Return whether this NewGRF can replace an older version of the same NewGRF.
Definition: newgrf_config.cpp:78
GRFTextList
std::vector< GRFText > GRFTextList
A GRF text with a list of translations.
Definition: newgrf_text_type.h:23
newgrf_text.h
GRFConfig::GetURL
const char * GetURL() const
Get the grf url.
Definition: newgrf_config.cpp:117
GRFP_GRF_MASK
@ GRFP_GRF_MASK
Bitmask to get only the NewGRF supplied information.
Definition: newgrf_config.h:74
ScanNewGRFFiles
void ScanNewGRFFiles(NewGRFScanCallback *callback)
Scan for all NewGRFs.
Definition: newgrf_config.cpp:668
GRFConfig::CopyParams
void CopyParams(const GRFConfig &src)
Copy the parameter information from the src config.
Definition: newgrf_config.cpp:87
NEWGRF_DIR
@ NEWGRF_DIR
Subdirectory for all NewGRFs.
Definition: fileio_type.h:124
GRFP_BLT_OFFSET
@ GRFP_BLT_OFFSET
The offset of the GRFP_BLT data.
Definition: newgrf_config.h:63
GRFConfig::palette
uint8_t palette
GRFPalette, bitset.
Definition: newgrf_config.h:170
GBUG_UNKNOWN_CB_RESULT
@ GBUG_UNKNOWN_CB_RESULT
A callback returned an unknown/invalid result.
Definition: newgrf_config.h:47
GRFConfig::param_info
std::vector< std::optional< GRFParameterInfo > > param_info
NOSAVE: extra information about the parameters.
Definition: newgrf_config.h:171
IsGoodGRFConfigList
GRFListCompatibility IsGoodGRFConfigList(GRFConfig *grfconfig)
Check if all GRFs in the GRF config from a savegame can be loaded.
Definition: newgrf_config.cpp:465
countedptr.hpp
GRFParameterType
GRFParameterType
The possible types of a newgrf parameter.
Definition: newgrf_config.h:120
GCS_UNKNOWN
@ GCS_UNKNOWN
The status of this grf file is unknown.
Definition: newgrf_config.h:35
GRFError::param_value
std::array< uint32_t, 2 > param_value
Values of GRF parameters to show for message and custom_message.
Definition: newgrf_config.h:116
GRFError
Information about why GRF had problems during initialisation.
Definition: newgrf_config.h:109
GCS_DISABLED
@ GCS_DISABLED
GRF file is disabled.
Definition: newgrf_config.h:36
GRFParameterInfo::Finalize
void Finalize()
Finalize Action 14 info after file scan is finished.
Definition: newgrf_config.cpp:228
GRFError::message
StringID message
Default message.
Definition: newgrf_config.h:114
GRFParameterInfo::max_value
uint32_t max_value
The maximal value of this parameter.
Definition: newgrf_config.h:133
GRFConfig::flags
uint8_t flags
NOSAVE: GCF_Flags, bitset.
Definition: newgrf_config.h:164
GRFP_GRF_WINDOWS
@ GRFP_GRF_WINDOWS
The NewGRF says the Windows palette can be used.
Definition: newgrf_config.h:72
GRFConfig::name
GRFTextWrapper name
NOSAVE: GRF name (Action 0x08)
Definition: newgrf_config.h:157
GRFConfig::param
std::array< uint32_t, 0x80 > param
GRF parameters.
Definition: newgrf_config.h:167
GRFParameterInfo::desc
GRFTextList desc
The description of this parameter.
Definition: newgrf_config.h:130
GCF_RESERVED
@ GCF_RESERVED
GRF file passed GLS_RESERVE stage.
Definition: newgrf_config.h:29
GRFConfig::GetDescription
const char * GetDescription() const
Get the grf info.
Definition: newgrf_config.cpp:108
GRFConfig::next
struct GRFConfig * next
NOSAVE: Next item in the linked list.
Definition: newgrf_config.h:174
GRFIdentifier::HasGrfIdentifier
bool HasGrfIdentifier(uint32_t grfid, const MD5Hash *md5sum) const
Does the identification match the provided values?
Definition: newgrf_config.h:100
FGCM_NEWEST
@ FGCM_NEWEST
Find newest Grf.
Definition: newgrf_config.h:194
FGCM_NEWEST_VALID
@ FGCM_NEWEST_VALID
Find newest Grf, ignoring Grfs with GCF_INVALID set.
Definition: newgrf_config.h:195
GRFParameterInfo::name
GRFTextList name
The name of this parameter.
Definition: newgrf_config.h:129
GRFParameterInfo::def_value
uint32_t def_value
Default value of this parameter.
Definition: newgrf_config.h:134
CopyGRFConfigList
GRFConfig ** CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src, bool init_only)
Copy a GRF Config list.
Definition: newgrf_config.cpp:370
NewGRFScanCallback::OnNewGRFsScanned
virtual void OnNewGRFsScanned()=0
Called whenever the NewGRF scan completed.
fileio_type.h
Subdirectory
Subdirectory
The different kinds of subdirectories OpenTTD uses.
Definition: fileio_type.h:115
GRFConfig::url
GRFTextWrapper url
NOSAVE: URL belonging to this GRF.
Definition: newgrf_config.h:159
PTYPE_END
@ PTYPE_END
Invalid parameter type.
Definition: newgrf_config.h:123
GRFGetSizeOfDataSection
size_t GRFGetSizeOfDataSection(FileHandle &f)
Get the data section size of a GRF.
Definition: newgrf_config.cpp:255
FillGRFDetails
bool FillGRFDetails(GRFConfig *config, bool is_static, Subdirectory subdir=NEWGRF_DIR)
Find the GRFID of a given grf, and calculate its md5sum.
Definition: newgrf_config.cpp:320
GRFParameterInfo::complete_labels
bool complete_labels
True if all values have a label.
Definition: newgrf_config.h:139
NewGRFScanCallback
Callback for NewGRF scanning.
Definition: newgrf_config.h:206
GRFIdentifier::grfid
uint32_t grfid
GRF ID (defined by Action 0x08)
Definition: newgrf_config.h:84
GRFConfig::num_params
uint8_t num_params
Number of used parameters.
Definition: newgrf_config.h:168
GRFConfig::FinalizeParameterInfo
void FinalizeParameterInfo()
Finalize Action 14 info after file scan is finished.
Definition: newgrf_config.cpp:155
PTYPE_BOOL
@ PTYPE_BOOL
The parameter is either 0 or 1.
Definition: newgrf_config.h:122
GRFConfig::original_md5sum
MD5Hash original_md5sum
MD5 checksum of original file if only a 'compatible' file was loaded.
Definition: newgrf_config.h:155
_grfconfig
GRFConfig * _grfconfig
First item in list of current GRF set up.
Definition: newgrf_config.cpp:164
GRFBuildParamList
std::string GRFBuildParamList(const GRFConfig *c)
Build a string containing space separated parameter values, and terminate.
Definition: newgrf_config.cpp:725
GRFParameterInfo::num_bit
uint8_t num_bit
Number of bits to use for this parameter.
Definition: newgrf_config.h:137
PTYPE_UINT_ENUM
@ PTYPE_UINT_ENUM
The parameter allows a range of numbers, each of which can have a special name.
Definition: newgrf_config.h:121
TextfileType
TextfileType
Additional text files accompanying Tar archives.
Definition: textfile_type.h:14
GRFPalette
GRFPalette
Information that can/has to be stored about a GRF's palette.
Definition: newgrf_config.h:59
FGCM_EXACT
@ FGCM_EXACT
Only find Grfs matching md5sum.
Definition: newgrf_config.h:192
GRFTextWrapper
std::shared_ptr< GRFTextList > GRFTextWrapper
Reference counted wrapper around a GRFText pointer.
Definition: newgrf_text_type.h:25
GRFParameterInfo::GRFParameterInfo
GRFParameterInfo(uint nr)
Create a new empty GRFParameterInfo object.
Definition: newgrf_config.cpp:182
GLC_ALL_GOOD
@ GLC_ALL_GOOD
All GRF needed by game are present.
Definition: newgrf_config.h:53
AppendToGRFConfigList
void AppendToGRFConfigList(GRFConfig **dst, GRFConfig *el)
Appends an element to a list of GRFs.
Definition: newgrf_config.cpp:436
_grfconfig_static
GRFConfig * _grfconfig_static
First item in list of static GRF set up.
Definition: newgrf_config.cpp:166
GBUG_VEH_LENGTH
@ GBUG_VEH_LENGTH
Length of rail vehicle changes when not inside a depot.
Definition: newgrf_config.h:44
GLC_NOT_FOUND
@ GLC_NOT_FOUND
At least one GRF couldn't be found (higher priority than GLC_COMPATIBLE)
Definition: newgrf_config.h:55
GRFListCompatibility
GRFListCompatibility
Status of post-gameload GRF compatibility check.
Definition: newgrf_config.h:52
GCF_STATIC
@ GCF_STATIC
GRF file is used statically (can be used in any MP game)
Definition: newgrf_config.h:25
UpdateNewGRFConfigPalette
void UpdateNewGRFConfigPalette(int32_t new_value=0)
Update the palettes of the graphics from the config file.
Definition: newgrf_config.cpp:243
GRFConfig::GetName
const char * GetName() const
Get the name of this grf.
Definition: newgrf_config.cpp:98
GRFError::data
std::string data
Additional data for message and custom_message.
Definition: newgrf_config.h:113
GRFP_BLT_MASK
@ GRFP_BLT_MASK
Bitmask to only get the blitter information.
Definition: newgrf_config.h:78