summaryrefslogtreecommitdiff
path: root/settings.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-12-04 08:30:04 +0000
committerpeter1138 <peter1138@openttd.org>2006-12-04 08:30:04 +0000
commitbd66cc57569a034b02674fa8aaa5dbe521e73a36 (patch)
treefb2a8cf881b385cb52b110880f86128061ea020c /settings.c
parentdc8992a677b8b7b56b8ad55d7da690b77105bb83 (diff)
downloadopenttd-bd66cc57569a034b02674fa8aaa5dbe521e73a36.tar.xz
(svn r7348) -Feature: Initial support for saving NewGRF settings with savegames. Back up your savegames...
Diffstat (limited to 'settings.c')
-rw-r--r--settings.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/settings.c b/settings.c
index 8fc10ef9c..39fa1e03c 100644
--- a/settings.c
+++ b/settings.c
@@ -36,6 +36,7 @@
#include "npf.h"
#include "yapf/yapf.h"
#include "newgrf.h"
+#include "newgrf_config.h"
#include "genworld.h"
#include "date.h"
#include "rail.h"
@@ -1504,6 +1505,7 @@ const char *GRFProcessParams(const IniItem *item, uint index)
/* Loading newgrf stuff from configuration file */
c = calloc(1, sizeof(*c));
c->filename = strdup(item->name);
+ FillGRFDetails(c);
if (*item->value != '\0') {
c->num_params = parse_intlist(item->value, (int*)c->param, lengthof(c->param));
@@ -1513,12 +1515,12 @@ const char *GRFProcessParams(const IniItem *item, uint index)
}
}
- if (_first_grfconfig == NULL) {
- _first_grfconfig = c;
+ if (_grfconfig_newgame == NULL) {
+ _grfconfig_newgame = c;
} else {
GRFConfig *c2;
/* Attach the label to the end of the list */
- for (c2 = _first_grfconfig; c2->next != NULL; c2 = c2->next);
+ for (c2 = _grfconfig_newgame; c2->next != NULL; c2 = c2->next);
c2->next = c;
}