|
@@ -66,13 +66,13 @@ bool FillGRFDetails(GRFConfig *config, b
|
|
|
}
|
|
|
|
|
|
/* Find and load the Action 8 information */
|
|
|
LoadNewGRFFile(config, CONFIG_SLOT, GLS_FILESCAN);
|
|
|
|
|
|
/* Skip if the grfid is 0 (not read) or 0xFFFFFFFF (ttdp system grf) */
|
|
|
if (config->grfid == 0 || config->grfid == 0xFFFFFFFF) return false;
|
|
|
if (config->grfid == 0 || config->grfid == 0xFFFFFFFF || config->IsOpenTTDBaseGRF()) return false;
|
|
|
|
|
|
if (is_static) {
|
|
|
/* Perform a 'safety scan' for static GRFs */
|
|
|
LoadNewGRFFile(config, 62, GLS_SAFETYSCAN);
|
|
|
|
|
|
/* GCF_UNSAFE is set if GLS_SAFETYSCAN finds unsafe actions */
|
|
@@ -519,12 +519,24 @@ char *GRFBuildParamList(char *dst, const
|
|
|
if (i > 0) dst = strecpy(dst, " ", last);
|
|
|
dst += snprintf(dst, last - dst, "%d", c->param[i]);
|
|
|
}
|
|
|
return dst;
|
|
|
}
|
|
|
|
|
|
/** Base GRF ID for OpenTTD's base graphics GRFs. */
|
|
|
static const uint32 OPENTTD_GRAPHICS_BASE_GRF_ID = BSWAP32(0xFF4F5400);
|
|
|
|
|
|
/**
|
|
|
* Checks whether this GRF is a OpenTTD base graphic GRF.
|
|
|
* @return true if and only if it is a base GRF.
|
|
|
*/
|
|
|
bool GRFConfig::IsOpenTTDBaseGRF() const
|
|
|
{
|
|
|
return (this->grfid & 0x00FFFFFF) == OPENTTD_GRAPHICS_BASE_GRF_ID;
|
|
|
}
|
|
|
|
|
|
|
|
|
static const SaveLoad _grfconfig_desc[] = {
|
|
|
SLE_STR(GRFConfig, filename, SLE_STR, 0x40),
|
|
|
SLE_VAR(GRFConfig, grfid, SLE_UINT32),
|
|
|
SLE_ARR(GRFConfig, md5sum, SLE_UINT8, 16),
|
|
|
SLE_ARR(GRFConfig, param, SLE_UINT32, 0x80),
|