(svn r7354) -Codechange: Remove grffile->flags and use grfconfig->flags exclusively. Update action 7/9 now that we know if GRFs are disabled.

This commit is contained in:
peter1138
2006-12-04 13:45:20 +00:00
parent f029259767
commit 301d392b2c
4 changed files with 53 additions and 24 deletions

View File

@@ -248,6 +248,19 @@ const GRFConfig *FindGRFConfig(uint32 grfid, uint8 *md5sum)
}
/* Retrieve a NewGRF from the current config by its grfid */
const GRFConfig *GetGRFConfig(uint32 grfid)
{
GRFConfig *c;
for (c = _grfconfig; c != NULL; c = c->next) {
if (c->grfid == grfid) return c;
}
return NULL;
}
static const SaveLoad _grfconfig_desc[] = {
SLE_STR(GRFConfig, filename, SLE_STR, 0x40),
SLE_VAR(GRFConfig, grfid, SLE_UINT32),