From bfd09004fe040c16b679637f0c2b0f6354438d9b Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 3 May 2011 20:30:26 +0000 Subject: (svn r22417) -Add: an advanced setting to specify the default palette to use for NewGRFs without action 14 palette information; this makes the default choice independent from the used base graphics and '-i' option. --- src/gfxinit.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/gfxinit.cpp') diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index 4270a102e..404f0a94f 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -181,11 +181,14 @@ static void LoadSpriteTables() /* We know the palette of the base set, so if the base NewGRF is not * setting one, use the palette of the base set and not the global - * one which might be the wrong palette for this base NewGRF. */ - PaletteType old_palette_type = _use_palette; - _use_palette = used_set->palette; + * one which might be the wrong palette for this base NewGRF. + * The value set here might be overridden via action14 later. */ + switch (_use_palette) { + case PAL_DOS: master->palette |= GRFP_GRF_DOS; break; + case PAL_WINDOWS: master->palette |= GRFP_GRF_WINDOWS; break; + default: break; + } FillGRFDetails(master, false); - _use_palette = old_palette_type; ClrBit(master->flags, GCF_INIT_ONLY); master->next = top; @@ -263,8 +266,6 @@ static const char * const _graphics_file_names[] = { "base", "logos", "arctic", template /* static */ const char * const *BaseSet::file_names = _graphics_file_names; -extern void UpdateNewGRFConfigPalette(); - /** * Determine the palette that has to be used. * - forced palette via command line -> leave it that way @@ -289,8 +290,6 @@ extern void UpdateNewGRFConfigPalette(); default: NOT_REACHED(); } - - UpdateNewGRFConfigPalette(); } template -- cgit v1.2.3-54-g00ecf