summaryrefslogtreecommitdiff
path: root/src/newgrf_config.h
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2007-01-13 17:42:50 +0000
committerDarkvater <darkvater@openttd.org>2007-01-13 17:42:50 +0000
commit66c5cde9816ae913051c9bb516798cac5aee28e9 (patch)
tree19f7c89441139abe8f37d5f10fbf1953686d9da5 /src/newgrf_config.h
parent3f168daee13cd537bf2e07e18e0f03ff654ee0d0 (diff)
downloadopenttd-66c5cde9816ae913051c9bb516798cac5aee28e9.tar.xz
(svn r8106) -Feature/Fix: Add the ability to load savegames when you don't have the exact GRF files in your list. GRF files that are found based on GRFID (but not on matching md5sum) are used instead of disabling them. This does not affect MP games, there you still need an exact match.
-GRF Window colour-codes changed a bit: Static is now grey, and compatible GRF (found locally only based on GRFID) are shown in orange. Compatible GRF's also have an orange status/warning text saying they're not the original the game was saved with. -Loaded games with something amiss regarding GRF's will show an appropiate warning message.
Diffstat (limited to 'src/newgrf_config.h')
-rw-r--r--src/newgrf_config.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/newgrf_config.h b/src/newgrf_config.h
index 7cc90d41f..0864a63a2 100644
--- a/src/newgrf_config.h
+++ b/src/newgrf_config.h
@@ -4,15 +4,16 @@
#define NEWGRF_CONFIG_H
/* GRF config bit flags */
-enum {
- GCF_DISABLED,
- GCF_NOT_FOUND,
- GCF_ACTIVATED,
- GCF_SYSTEM,
- GCF_UNSAFE,
- GCF_STATIC,
+typedef enum {
+ GCF_DISABLED, ///< GRF file is disabled
+ GCF_NOT_FOUND, ///< GRF file was not found in the local cache
+ GCF_ACTIVATED, ///< GRF file is active
+ GCF_SYSTEM, ///< GRF file is an openttd-internal system grf
+ GCF_UNSAFE, ///< GRF file is unsafe for static usage
+ GCF_STATIC, ///< GRF file is used statically (can be used in any MP game)
+ GCF_COMPATIBLE,///< GRF file does not exactly match the requested GRF (different MD5SUM), but grfid matches)
GCF_COPY, ///< The data is copied from a grf in _all_grfs
-};
+} GCF_Flags;
typedef struct GRFConfig {
char *filename;
@@ -48,7 +49,7 @@ void AppendStaticGRFConfigs(GRFConfig **dst);
void ClearGRFConfig(GRFConfig **config);
void ClearGRFConfigList(GRFConfig **config);
void ResetGRFConfig(bool defaults);
-bool IsGoodGRFConfigList(void);
+GCF_Flags IsGoodGRFConfigList(void);
bool FillGRFDetails(GRFConfig *config, bool is_static);
char *GRFBuildParamList(char *dst, const GRFConfig *c, const char *last);