mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-27 16:39:09 +00:00
(svn r20305) -Change: reduce OpenTTD's install size by roughly 460 KiB by only providing the "extra" base graphics in one palette and doing the conversion upon loading; the conversion has existed for a while, but now the NewGRF can tell its palette using Action 14 thus it can enable the conversion for only that NewGRF.
This commit is contained in:
@@ -179,8 +179,15 @@ static void LoadSpriteTables()
|
||||
*/
|
||||
GRFConfig *top = _grfconfig;
|
||||
GRFConfig *master = new GRFConfig(used_set->files[GFT_EXTRA].filename);
|
||||
|
||||
/* 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;
|
||||
FillGRFDetails(master, false);
|
||||
master->palette = (used_set->palette == PAL_WINDOWS) ? GRFP_USE_WINDOWS : GRFP_USE_DOS;
|
||||
_use_palette = old_palette_type;
|
||||
|
||||
ClrBit(master->flags, GCF_INIT_ONLY);
|
||||
master->next = top;
|
||||
_grfconfig = master;
|
||||
|
Reference in New Issue
Block a user