src/newgrf_config.h
branchnoai
changeset 9629 66dde6412125
parent 9627 6a7c8ead2328
child 9722 ebf0ece7d8f6
equal deleted inserted replaced
9628:b5c2449616b5 9629:66dde6412125
    12 	GCF_SYSTEM,    ///< GRF file is an openttd-internal system grf
    12 	GCF_SYSTEM,    ///< GRF file is an openttd-internal system grf
    13 	GCF_UNSAFE,    ///< GRF file is unsafe for static usage
    13 	GCF_UNSAFE,    ///< GRF file is unsafe for static usage
    14 	GCF_STATIC,    ///< GRF file is used statically (can be used in any MP game)
    14 	GCF_STATIC,    ///< GRF file is used statically (can be used in any MP game)
    15 	GCF_COMPATIBLE,///< GRF file does not exactly match the requested GRF (different MD5SUM), but grfid matches)
    15 	GCF_COMPATIBLE,///< GRF file does not exactly match the requested GRF (different MD5SUM), but grfid matches)
    16 	GCF_COPY,      ///< The data is copied from a grf in _all_grfs
    16 	GCF_COPY,      ///< The data is copied from a grf in _all_grfs
       
    17 	GCF_INIT_ONLY, ///< GRF file is processed up to GLS_INIT
    17 };
    18 };
    18 
    19 
    19 enum GRFStatus {
    20 enum GRFStatus {
    20 	GCS_UNKNOWN,      ///< The status of this grf file is unknown
    21 	GCS_UNKNOWN,      ///< The status of this grf file is unknown
    21 	GCS_DISABLED,     ///< GRF file is disabled
    22 	GCS_DISABLED,     ///< GRF file is disabled
    44 	uint8 param_number[2];
    45 	uint8 param_number[2];
    45 };
    46 };
    46 
    47 
    47 struct GRFConfig : public GRFIdentifier {
    48 struct GRFConfig : public GRFIdentifier {
    48 	char *filename;
    49 	char *filename;
    49 	char *full_path;
       
    50 	char *name;
    50 	char *name;
    51 	char *info;
    51 	char *info;
    52 	GRFError *error;
    52 	GRFError *error;
    53 
    53 
    54 	uint8 flags;
    54 	uint8 flags;
    72 extern GRFConfig *_grfconfig_static;
    72 extern GRFConfig *_grfconfig_static;
    73 
    73 
    74 void ScanNewGRFFiles();
    74 void ScanNewGRFFiles();
    75 const GRFConfig *FindGRFConfig(uint32 grfid, const uint8 *md5sum = NULL);
    75 const GRFConfig *FindGRFConfig(uint32 grfid, const uint8 *md5sum = NULL);
    76 GRFConfig *GetGRFConfig(uint32 grfid);
    76 GRFConfig *GetGRFConfig(uint32 grfid);
    77 GRFConfig **CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src);
    77 GRFConfig **CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src, bool init_only);
    78 void AppendStaticGRFConfigs(GRFConfig **dst);
    78 void AppendStaticGRFConfigs(GRFConfig **dst);
    79 void AppendToGRFConfigList(GRFConfig **dst, GRFConfig *el);
    79 void AppendToGRFConfigList(GRFConfig **dst, GRFConfig *el);
    80 void ClearGRFConfig(GRFConfig **config);
    80 void ClearGRFConfig(GRFConfig **config);
    81 void ClearGRFConfigList(GRFConfig **config);
    81 void ClearGRFConfigList(GRFConfig **config);
    82 void ResetGRFConfig(bool defaults);
    82 void ResetGRFConfig(bool defaults);