OpenTTD

newgrf_config.h
Go to the documentation of this file.
1 /* $Id: newgrf_config.h 27732 2017-01-14 18:30:26Z frosch $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
9
12 #ifndef NEWGRF_CONFIG_H
13 #define NEWGRF_CONFIG_H
14
15 #include "strings_type.h"
16 #include "core/alloc_type.hpp"
17 #include "core/smallmap_type.hpp"
18 #include "misc/countedptr.hpp"
19 #include "fileio_type.h"
20 #include "textfile_type.h"
21
23 enum GCF_Flags {
24 GCF_SYSTEM,
25 GCF_UNSAFE,
26 GCF_STATIC,
27 GCF_COMPATIBLE,
28 GCF_COPY,
29 GCF_INIT_ONLY,
30 GCF_RESERVED,
31 GCF_INVALID,
32 };
33
35 enum GRFStatus {
36 GCS_UNKNOWN,
37 GCS_DISABLED,
38 GCS_NOT_FOUND,
39 GCS_INITIALISED,
40 GCS_ACTIVATED,
41 };
42
44 enum GRFBugs {
45 GBUG_VEH_LENGTH,
46 GBUG_VEH_REFIT,
47 GBUG_VEH_POWERED_WAGON,
48 GBUG_UNKNOWN_CB_RESULT,
49 GBUG_VEH_CAPACITY,
50 };
51
53 enum GRFListCompatibility {
54 GLC_ALL_GOOD,
55 GLC_COMPATIBLE,
56 GLC_NOT_FOUND,
57 };
58
60 enum GRFPalette {
61 GRFP_USE_BIT = 0,
62 GRFP_GRF_OFFSET = 2,
63 GRFP_GRF_SIZE = 2,
64 GRFP_BLT_OFFSET = 4,
65 GRFP_BLT_SIZE = 1,
66
67 GRFP_USE_DOS = 0x0,
68 GRFP_USE_WINDOWS = 0x1,
69 GRFP_USE_MASK = 0x1,
70
71 GRFP_GRF_UNSET = 0x0 << GRFP_GRF_OFFSET,
72 GRFP_GRF_DOS = 0x1 << GRFP_GRF_OFFSET,
73 GRFP_GRF_WINDOWS = 0x2 << GRFP_GRF_OFFSET,
74 GRFP_GRF_ANY = GRFP_GRF_DOS | GRFP_GRF_WINDOWS,
75 GRFP_GRF_MASK = GRFP_GRF_ANY,
76
77 GRFP_BLT_UNSET = 0x0 << GRFP_BLT_OFFSET,
78 GRFP_BLT_32BPP = 0x1 << GRFP_BLT_OFFSET,
79 GRFP_BLT_MASK = GRFP_BLT_32BPP,
80 };
81
82
84 struct GRFIdentifier {
85 uint32 grfid;
86 uint8 md5sum[16];
87
94 inline bool HasGrfIdentifier(uint32 grfid, const uint8 *md5sum) const
95 {
96 if (this->grfid != grfid) return false;
97 if (md5sum == NULL) return true;
98 return memcmp(md5sum, this->md5sum, sizeof(this->md5sum)) == 0;
99 }
100 };
101
103 struct GRFError : ZeroedMemoryAllocator {
104 GRFError(StringID severity, StringID message = 0);
105 GRFError(const GRFError &error);
106 ~GRFError();
107
108 char *custom_message;
109 char *data;
110 StringID message;
111 StringID severity;
112 uint32 param_value[2];
113 };
114
116 enum GRFParameterType {
117 PTYPE_UINT_ENUM,
118 PTYPE_BOOL,
119 PTYPE_END,
120 };
121
123 struct GRFParameterInfo {
124 GRFParameterInfo(uint nr);
125 GRFParameterInfo(GRFParameterInfo &info);
126 ~GRFParameterInfo();
127 struct GRFText *name;
128 struct GRFText *desc;
129 GRFParameterType type;
130 uint32 min_value;
131 uint32 max_value;
132 uint32 def_value;
133 byte param_nr;
134 byte first_bit;
135 byte num_bit;
136 SmallMap<uint32, struct GRFText *, 8> value_names;
137 bool complete_labels;
138
139 uint32 GetValue(struct GRFConfig *config) const;
140 void SetValue(struct GRFConfig *config, uint32 value);
141 void Finalize();
142 };
143
145 struct GRFTextWrapper : public SimpleCountedObject {
146 struct GRFText *text;
147
148 GRFTextWrapper();
149 ~GRFTextWrapper();
150 };
151
153 struct GRFConfig : ZeroedMemoryAllocator {
154 GRFConfig(const char *filename = NULL);
155 GRFConfig(const GRFConfig &config);
156 ~GRFConfig();
157
158 GRFIdentifier ident;
159 uint8 original_md5sum[16];
160 char *filename;
161 GRFTextWrapper *name;
162 GRFTextWrapper *info;
163 GRFTextWrapper *url;
164 GRFError *error;
165
166 uint32 version;
167 uint32 min_loadable_version;
168 uint8 flags;
169 GRFStatus status;
170 uint32 grf_bugs;
171 uint32 param[0x80];
172 uint8 num_params;
173 uint8 num_valid_params;
174 uint8 palette;
175 SmallVector<GRFParameterInfo *, 4> param_info;
176 bool has_param_defaults;
177
178 struct GRFConfig *next;
179
180 void CopyParams(const GRFConfig &src);
181
182 const char *GetTextfile(TextfileType type) const;
183 const char *GetName() const;
184 const char *GetDescription() const;
185 const char *GetURL() const;
186
187 void SetParameterDefaults();
188 void SetSuitablePalette();
189 void FinalizeParameterInfo();
190 };
191
193 enum FindGRFConfigMode {
194 FGCM_EXACT,
195 FGCM_COMPATIBLE,
196 FGCM_NEWEST,
197 FGCM_NEWEST_VALID,
198 FGCM_ANY,
199 };
200
201 extern GRFConfig *_all_grfs;
202 extern GRFConfig *_grfconfig;
203 extern GRFConfig *_grfconfig_newgame;
204 extern GRFConfig *_grfconfig_static;
205 extern uint _missing_extra_graphics;
206
208 struct NewGRFScanCallback {
210 virtual ~NewGRFScanCallback() {}
212 virtual void OnNewGRFsScanned() = 0;
213 };
214
215 size_t GRFGetSizeOfDataSection(FILE *f);
216
217 void ScanNewGRFFiles(NewGRFScanCallback *callback);
218 const GRFConfig *FindGRFConfig(uint32 grfid, FindGRFConfigMode mode, const uint8 *md5sum = NULL, uint32 desired_version = 0);
219 GRFConfig *GetGRFConfig(uint32 grfid, uint32 mask = 0xFFFFFFFF);
220 GRFConfig **CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src, bool init_only);
221 void AppendStaticGRFConfigs(GRFConfig **dst);
222 void AppendToGRFConfigList(GRFConfig **dst, GRFConfig *el);
223 void ClearGRFConfigList(GRFConfig **config);
224 void ResetGRFConfig(bool defaults);
225 GRFListCompatibility IsGoodGRFConfigList(GRFConfig *grfconfig);
226 bool FillGRFDetails(GRFConfig *config, bool is_static, Subdirectory subdir = NEWGRF_DIR);
227 char *GRFBuildParamList(char *dst, const GRFConfig *c, const char *last);
228
229 /* In newgrf_gui.cpp */
230 void ShowNewGRFSettings(bool editable, bool show_params, bool exec_changes, GRFConfig **config);
231
232 #ifdef ENABLE_NETWORK
233
234 #define UNKNOWN_GRF_NAME_PLACEHOLDER "<Unknown>"
235 GRFTextWrapper *FindUnknownGRFName(uint32 grfid, uint8 *md5sum, bool create);
236 #endif /* ENABLE_NETWORK */
237
238 void UpdateNewGRFScanStatus(uint num, const char *name);
239 bool UpdateNewGRFConfigPalette(int32 p1 = 0);
240
241 #endif /* NEWGRF_CONFIG_H */
GRFBuildParamList
char * GRFBuildParamList(char *dst, const GRFConfig *c, const char *last)
Build a string containing space separated parameter values, and terminate.
Definition: newgrf_config.cpp:902
CopyGRFConfigList
GRFConfig ** CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src, bool init_only)
Copy a GRF Config list.
Definition: newgrf_config.cpp:462
PTYPE_UINT_ENUM
The parameter allows a range of numbers, each of which can have a special name.
Definition: newgrf_config.h:117
Subdirectory
Subdirectory
The different kinds of subdirectories OpenTTD uses.
Definition: fileio_type.h:110
countedptr.hpp
CCountedPtr - smart pointer implementation.
GCF_INIT_ONLY
GRF file is processed up to GLS_INIT.
Definition: newgrf_config.h:29
GLC_ALL_GOOD
All GRF needed by game are present.
Definition: newgrf_config.h:54
GRFConfig::SetParameterDefaults
void SetParameterDefaults()
Set the default value for all parameters as specified by action14.
Definition: newgrf_config.cpp:151
GLC_COMPATIBLE
Compatible (eg. the same ID, but different checksum) GRF found in at least one case.
Definition: newgrf_config.h:55
GBUG_VEH_CAPACITY
Capacity of vehicle changes when not refitting or arranging.
Definition: newgrf_config.h:49
GRFParameterInfo::type
GRFParameterType type
The type of this parameter.
Definition: newgrf_config.h:129
GRFPalette
GRFPalette
Information that can/has to be stored about a GRF&#39;s palette.
Definition: newgrf_config.h:60
_grfconfig
GRFConfig * _grfconfig
First item in list of current GRF set up.
Definition: newgrf_config.cpp:192
GRFP_BLT_32BPP
The NewGRF prefers a 32 bpp blitter.
Definition: newgrf_config.h:78
GCS_INITIALISED
GRF file has been initialised.
Definition: newgrf_config.h:39
GRFParameterInfo::def_value
uint32 def_value
Default value of this parameter.
Definition: newgrf_config.h:132
SmallMap< uint32, struct GRFText *, 8 >
GRFConfig::status
GRFStatus status
NOSAVE: GRFStatus, enum.
Definition: newgrf_config.h:169
GRFTextWrapper::text
struct GRFText * text
The actual text.
Definition: newgrf_config.h:146
FindGRFConfig
const GRFConfig * FindGRFConfig(uint32 grfid, FindGRFConfigMode mode, const uint8 *md5sum=NULL, uint32 desired_version=0)
Find a NewGRF in the scanned list.
Definition: newgrf_config.cpp:809
GCF_STATIC
GRF file is used statically (can be used in any MP game)
Definition: newgrf_config.h:26
GRFConfig::num_valid_params
uint8 num_valid_params
NOSAVE: Number of valid parameters (action 0x14)
Definition: newgrf_config.h:173
GRFError::custom_message
char * custom_message
Custom message (if present)
Definition: newgrf_config.h:108
GRFConfig::error
GRFError * error
NOSAVE: Error/Warning during GRF loading (Action 0x0B)
Definition: newgrf_config.h:164
GRFP_GRF_UNSET
The NewGRF provided no information.
Definition: newgrf_config.h:71
GRFParameterInfo::param_nr
byte param_nr
GRF parameter to store content in.
Definition: newgrf_config.h:133
AppendStaticGRFConfigs
void AppendStaticGRFConfigs(GRFConfig **dst)
Appends the static GRFs to a list of GRFs.
Definition: newgrf_config.cpp:514
_grfconfig_static
GRFConfig * _grfconfig_static
First item in list of static GRF set up.
Definition: newgrf_config.cpp:194
GRFError::severity
StringID severity
Info / Warning / Error / Fatal.
Definition: newgrf_config.h:111
SmallVector< GRFParameterInfo *, 4 >
GCS_NOT_FOUND
GRF file was not found in the local cache.
Definition: newgrf_config.h:38
alloc_type.hpp
Helper types related to the allocation of memory.
GRFConfig::ident
GRFIdentifier ident
grfid and md5sum to uniquely identify newgrfs
Definition: newgrf_config.h:158
ScanNewGRFFiles
void ScanNewGRFFiles(NewGRFScanCallback *callback)
Scan for all NewGRFs.
Definition: newgrf_config.cpp:783
GRFGetSizeOfDataSection
size_t GRFGetSizeOfDataSection(FILE *f)
Get the data section size of a GRF.
Definition: newgrf_config.cpp:343
GRFIdentifier
Basic data to distinguish a GRF.
Definition: newgrf_config.h:84
GCS_DISABLED
GRF file is disabled.
Definition: newgrf_config.h:37
GRFConfig::param_info
SmallVector< GRFParameterInfo *, 4 > param_info
NOSAVE: extra information about the parameters.
Definition: newgrf_config.h:175
GRFParameterType
GRFParameterType
The possible types of a newgrf parameter.
Definition: newgrf_config.h:116
GRFConfig::next
struct GRFConfig * next
NOSAVE: Next item in the linked list.
Definition: newgrf_config.h:178
_all_grfs
GRFConfig * _all_grfs
First item in list of all scanned NewGRFs.
Definition: newgrf_config.cpp:191
smallmap_type.hpp
Simple mapping class targeted for small sets of data.
fileio_type.h
Types for Standard In/Out file operations.
GRFP_GRF_OFFSET
The offset of the GRFP_GRF data.
Definition: newgrf_config.h:62
GRFParameterInfo::desc
struct GRFText * desc
The description of this parameter.
Definition: newgrf_config.h:128
GetGRFConfig
GRFConfig * GetGRFConfig(uint32 grfid, uint32 mask=0xFFFFFFFF)
Retrieve a NewGRF from the current config by its grfid.
Definition: newgrf_config.cpp:889
GRFConfig::grf_bugs
uint32 grf_bugs
NOSAVE: bugs in this GRF in this run,.
Definition: newgrf_config.h:170
GRFConfig::num_params
uint8 num_params
Number of used parameters.
Definition: newgrf_config.h:172
GRFP_GRF_ANY
The NewGRF says any palette can be used.
Definition: newgrf_config.h:74
GCF_SYSTEM
GRF file is an openttd-internal system grf.
Definition: newgrf_config.h:24
GRFP_BLT_SIZE
The size of the GRFP_BLT data.
Definition: newgrf_config.h:65
GRFConfig
Information about GRF, used in the game and (part of it) in savegames.
Definition: newgrf_config.h:153
GRFP_USE_MASK
Bitmask to get only the use palette use states.
Definition: newgrf_config.h:69
GRFConfig::has_param_defaults
bool has_param_defaults
NOSAVE: did this newgrf specify any defaults for it&#39;s parameters.
Definition: newgrf_config.h:176
GRFConfig::GetDescription
const char * GetDescription() const
Get the grf info.
Definition: newgrf_config.cpp:136
GRFConfig::CopyParams
void CopyParams(const GRFConfig &src)
Copy the parameter information from the src config.
Definition: newgrf_config.cpp:114
GRFParameterInfo::num_bit
byte num_bit
Number of bits to use for this parameter.
Definition: newgrf_config.h:135
GRFParameterInfo::value_names
SmallMap< uint32, struct GRFText *, 8 > value_names
Names for each value.
Definition: newgrf_config.h:136
GRFP_USE_WINDOWS
The palette state is set to use the Windows palette.
Definition: newgrf_config.h:68
GCF_COPY
The data is copied from a grf in _all_grfs.
Definition: newgrf_config.h:28
GRFError
Information about why GRF had problems during initialisation.
Definition: newgrf_config.h:103
GRFParameterInfo::max_value
uint32 max_value
The maximal value of this parameter.
Definition: newgrf_config.h:131
GCF_Flags
GCF_Flags
GRF config bit flags.
Definition: newgrf_config.h:23
GRFConfig::flags
uint8 flags
NOSAVE: GCF_Flags, bitset.
Definition: newgrf_config.h:168
GCF_INVALID
GRF is unusable with this version of OpenTTD.
Definition: newgrf_config.h:31
GRFBugs
GRFBugs
Encountered GRF bugs.
Definition: newgrf_config.h:44
GRFP_BLT_UNSET
The NewGRF provided no information or doesn&#39;t care about a 32 bpp blitter.
Definition: newgrf_config.h:77
ClearGRFConfigList
void ClearGRFConfigList(GRFConfig **config)
Clear a GRF Config list, freeing all nodes.
Definition: newgrf_config.cpp:444
FGCM_NEWEST_VALID
Find newest Grf, ignoring Grfs with GCF_INVALID set.
Definition: newgrf_config.h:197
_grfconfig_newgame
GRFConfig * _grfconfig_newgame
First item in list of default GRF set up.
Definition: newgrf_config.cpp:193
AppendToGRFConfigList
void AppendToGRFConfigList(GRFConfig **dst, GRFConfig *el)
Appends an element to a list of GRFs.
Definition: newgrf_config.cpp:528
GBUG_UNKNOWN_CB_RESULT
A callback returned an unknown/invalid result.
Definition: newgrf_config.h:48
TextfileType
TextfileType
Additional text files accompanying Tar archives.
Definition: textfile_type.h:16
GRFError::message
StringID message
Default message.
Definition: newgrf_config.h:110
GRFTextWrapper
Reference counted wrapper around a GRFText pointer.
Definition: newgrf_config.h:145
SimpleCountedObject
Simple counted object.
Definition: countedptr.hpp:206
GRFConfig::FinalizeParameterInfo
void FinalizeParameterInfo()
Finalize Action 14 info after file scan is finished.
Definition: newgrf_config.cpp:183
GRFText
Element of the linked list.
Definition: newgrf_text.cpp:66
ZeroedMemoryAllocator
Base class that provides memory initialization on dynamically created objects.
Definition: alloc_type.hpp:150
StringID
uint32 StringID
Numeric value that represents a string, independent of the selected language.
Definition: strings_type.h:18
GRFIdentifier::HasGrfIdentifier
bool HasGrfIdentifier(uint32 grfid, const uint8 *md5sum) const
Does the identification match the provided values?
Definition: newgrf_config.h:94
GRFP_BLT_OFFSET
The offset of the GRFP_BLT data.
Definition: newgrf_config.h:64
NEWGRF_DIR
Subdirectory for all NewGRFs.
Definition: fileio_type.h:119
GCS_UNKNOWN
The status of this grf file is unknown.
Definition: newgrf_config.h:36
GBUG_VEH_REFIT
Articulated vehicles carry different cargoes resp. are differently refittable than specified in purch...
Definition: newgrf_config.h:46
ResetGRFConfig
void ResetGRFConfig(bool defaults)
Reset the current GRF Config to either blank or newgame settings.
Definition: newgrf_config.cpp:539
GRFConfig::version
uint32 version
NOSAVE: Version a NewGRF can set so only the newest NewGRF is shown.
Definition: newgrf_config.h:166
GRFP_USE_DOS
The palette state is set to use the DOS palette.
Definition: newgrf_config.h:67
GRFConfig::url
GRFTextWrapper * url
NOSAVE: URL belonging to this GRF.
Definition: newgrf_config.h:163
GCF_RESERVED
GRF file passed GLS_RESERVE stage.
Definition: newgrf_config.h:30
GRFP_GRF_WINDOWS
The NewGRF says the Windows palette can be used.
Definition: newgrf_config.h:73
NewGRFScanCallback
Callback for NewGRF scanning.
Definition: newgrf_config.h:208
GRFConfig::GetURL
const char * GetURL() const
Get the grf url.
Definition: newgrf_config.cpp:145
GRFParameterInfo::first_bit
byte first_bit
First bit to use in the GRF parameter.
Definition: newgrf_config.h:134
UpdateNewGRFScanStatus
void UpdateNewGRFScanStatus(uint num, const char *name)
Update the NewGRF scan status.
Definition: newgrf_gui.cpp:2279
ShowNewGRFSettings
void ShowNewGRFSettings(bool editable, bool show_params, bool exec_changes, GRFConfig **config)
Setup the NewGRF gui.
Definition: newgrf_gui.cpp:2005
GRFParameterInfo
Information about one grf parameter.
Definition: newgrf_config.h:123
GRFListCompatibility
GRFListCompatibility
Status of post-gameload GRF compatibility check.
Definition: newgrf_config.h:53
GRFConfig::palette
uint8 palette
GRFPalette, bitset.
Definition: newgrf_config.h:174
GRFParameterInfo::complete_labels
bool complete_labels
True if all values have a label.
Definition: newgrf_config.h:137
GLC_NOT_FOUND
At least one GRF couldn&#39;t be found (higher priority than GLC_COMPATIBLE)
Definition: newgrf_config.h:56
GCF_UNSAFE
GRF file is unsafe for static usage.
Definition: newgrf_config.h:25
GBUG_VEH_POWERED_WAGON
Powered wagon changed poweredness state when not inside a depot.
Definition: newgrf_config.h:47
error
void CDECL error(const char *s,...)
Error handling for fatal non-user errors.
Definition: openttd.cpp:110
FindUnknownGRFName
GRFTextWrapper * FindUnknownGRFName(uint32 grfid, uint8 *md5sum, bool create)
Finds the name of a NewGRF in the list of names for unknown GRFs.
Definition: newgrf_config.cpp:854
FGCM_NEWEST
Find newest Grf.
Definition: newgrf_config.h:196
GRFConfig::filename
char * filename
Filename - either with or without full path.
Definition: newgrf_config.h:160
GRFP_BLT_MASK
Bitmask to only get the blitter information.
Definition: newgrf_config.h:79
FindGRFConfigMode
FindGRFConfigMode
Method to find GRFs using FindGRFConfig.
Definition: newgrf_config.h:193
GRFConfig::SetSuitablePalette
void SetSuitablePalette()
Set the palette of this GRFConfig to something suitable.
Definition: newgrf_config.cpp:169
GRFConfig::name
GRFTextWrapper * name
NOSAVE: GRF name (Action 0x08)
Definition: newgrf_config.h:161
GRFP_GRF_DOS
The NewGRF says the DOS palette can be used.
Definition: newgrf_config.h:72
GRFStatus
GRFStatus
Status of GRF.
Definition: newgrf_config.h:35
GRFConfig::min_loadable_version
uint32 min_loadable_version
NOSAVE: Minimum compatible version a NewGRF can define.
Definition: newgrf_config.h:167
_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:195
strings_type.h
Types related to strings.
PTYPE_BOOL
The parameter is either 0 or 1.
Definition: newgrf_config.h:118
GRFParameterInfo::min_value
uint32 min_value
The minimal value this parameter can have.
Definition: newgrf_config.h:130
GRFConfig::GetName
const char * GetName() const
Get the name of this grf.
Definition: newgrf_config.cpp:126
GRFIdentifier::grfid
uint32 grfid
GRF ID (defined by Action 0x08)
Definition: newgrf_config.h:85
GRFError::data
char * data
Additional data for message and custom_message.
Definition: newgrf_config.h:109
GRFParameterInfo::name
struct GRFText * name
The name of this parameter.
Definition: newgrf_config.h:127
GRFP_GRF_SIZE
The size of the GRFP_GRF data.
Definition: newgrf_config.h:63
GCS_ACTIVATED
GRF file has been activated.
Definition: newgrf_config.h:40
IsGoodGRFConfigList
GRFListCompatibility IsGoodGRFConfigList(GRFConfig *grfconfig)
Check if all GRFs in the GRF config from a savegame can be loaded.
Definition: newgrf_config.cpp:557
GCF_COMPATIBLE
GRF file does not exactly match the requested GRF (different MD5SUM), but grfid matches) ...
Definition: newgrf_config.h:27
GRFP_GRF_MASK
Bitmask to get only the NewGRF supplied information.
Definition: newgrf_config.h:75
GRFP_USE_BIT
The bit used for storing the palette to use.
Definition: newgrf_config.h:61
GBUG_VEH_LENGTH
Length of rail vehicle changes when not inside a depot.
Definition: newgrf_config.h:45
GRFIdentifier::md5sum
uint8 md5sum[16]
MD5 checksum of file to distinguish files with the same GRF ID (eg. newer version of GRF) ...
Definition: newgrf_config.h:86
GetTextfile
const char * GetTextfile(TextfileType type, Subdirectory dir, const char *filename)
Search a textfile file next to the given content.
Definition: textfile_gui.cpp:386
FGCM_EXACT
Only find Grfs matching md5sum.
Definition: newgrf_config.h:194
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:412
NewGRFScanCallback::~NewGRFScanCallback
virtual ~NewGRFScanCallback()
Make sure the right destructor gets called.
Definition: newgrf_config.h:210
textfile_type.h
Types related to textfiles.
FGCM_COMPATIBLE
Find best compatible Grf wrt. desired_version.
Definition: newgrf_config.h:195
FGCM_ANY
Use first found.
Definition: newgrf_config.h:198
UpdateNewGRFConfigPalette
bool UpdateNewGRFConfigPalette(int32 p1=0)
Update the palettes of the graphics from the config file.
Definition: newgrf_config.cpp:330
PTYPE_END
Invalid parameter type.
Definition: newgrf_config.h:119
GRFConfig::info
GRFTextWrapper * info
NOSAVE: GRF info (author, copyright, ...) (Action 0x08)
Definition: newgrf_config.h:162