summaryrefslogtreecommitdiff
path: root/src/newgrf_config.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-10-17 12:12:52 +0000
committerfrosch <frosch@openttd.org>2010-10-17 12:12:52 +0000
commite805919fe9f8becadbc0e41dd018173a9c18a99f (patch)
tree9e23c445fcee51857db6b2887a6d73a012867c6d /src/newgrf_config.h
parent3972c790c2cba8c4c01ac6536e8675808f6e1c4d (diff)
downloadopenttd-e805919fe9f8becadbc0e41dd018173a9c18a99f.tar.xz
(svn r20958) -Add: the concept of min-loadable-version to NewGRFs when choosing compatbile NewGRFs. (planetmaker)
Diffstat (limited to 'src/newgrf_config.h')
-rw-r--r--src/newgrf_config.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/newgrf_config.h b/src/newgrf_config.h
index 085791282..7dfa06ac6 100644
--- a/src/newgrf_config.h
+++ b/src/newgrf_config.h
@@ -143,6 +143,7 @@ struct GRFConfig : ZeroedMemoryAllocator {
GRFError *error; ///< NOSAVE: Error/Warning during GRF loading (Action 0x0B)
uint32 version; ///< NOSAVE: Version a NewGRF can set so only the newest NewGRF is shown
+ uint32 min_loadable_version; ///< NOSAVE: Minimum compatible version a NewGRF can define
uint8 flags; ///< NOSAVE: GCF_Flags, bitset
GRFStatus status; ///< NOSAVE: GRFStatus, enum
uint32 grf_bugs; ///< NOSAVE: bugs in this GRF in this run, @see enum GRFBugs
@@ -167,7 +168,7 @@ struct GRFConfig : ZeroedMemoryAllocator {
/** Method to find GRFs using FindGRFConfig */
enum FindGRFConfigMode {
FGCM_EXACT, ///< Only find Grfs matching md5sum
- FGCM_COMPATIBLE, ///< Find best compatible
+ FGCM_COMPATIBLE, ///< Find best compatible Grf wrt. desired_version
FGCM_NEWEST, ///< Find newest Grf
FGCM_ANY, ///< Use first found
};
@@ -179,7 +180,7 @@ extern GRFConfig *_grfconfig_static; ///< First item in list of static GRF set
void ScanNewGRFFiles();
void CheckForMissingSprites();
-const GRFConfig *FindGRFConfig(uint32 grfid, FindGRFConfigMode mode, const uint8 *md5sum = NULL);
+const GRFConfig *FindGRFConfig(uint32 grfid, FindGRFConfigMode mode, const uint8 *md5sum = NULL, uint32 desired_version = 0);
GRFConfig *GetGRFConfig(uint32 grfid, uint32 mask = 0xFFFFFFFF);
GRFConfig **CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src, bool init_only);
void AppendStaticGRFConfigs(GRFConfig **dst);