diff options
author | peter1138 <peter1138@openttd.org> | 2006-12-04 13:45:20 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-12-04 13:45:20 +0000 |
commit | 11474c26d7ebf2973081f15d7f8a4c445262f0bc (patch) | |
tree | b8c788a987990973eb3b41e9f37fdff8d9a0a257 /newgrf_config.c | |
parent | 05559bcdcd30d907eb43cbffa8744de195cb2ca3 (diff) | |
download | openttd-11474c26d7ebf2973081f15d7f8a4c445262f0bc.tar.xz |
(svn r7354) -Codechange: Remove grffile->flags and use grfconfig->flags exclusively. Update action 7/9 now that we know if GRFs are disabled.
Diffstat (limited to 'newgrf_config.c')
-rw-r--r-- | newgrf_config.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/newgrf_config.c b/newgrf_config.c index 8beb9945a..db8440c0a 100644 --- a/newgrf_config.c +++ b/newgrf_config.c @@ -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), |