(svn r20252) -Codechange: deduplicate logic for setting a suitable (initial) palette for NewGRFs

This commit is contained in:
rubidium
2010-07-31 09:36:09 +00:00
parent eacf65598f
commit 6c22efc840
3 changed files with 16 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ static void Load_NGRF_common(GRFConfig *&grfconfig)
while (SlIterateArray() != -1) {
GRFConfig *c = new GRFConfig();
SlObject(c, _grfconfig_desc);
if (CheckSavegameVersion(101)) c->windows_paletted = (_use_palette == PAL_WINDOWS);
if (CheckSavegameVersion(101)) c->SetSuitablePalette();
AppendToGRFConfigList(&grfconfig, c);
}
}