Changeset - r28333:19d577fdcc29
[Not reviewed]
master
0 1 0
Peter Nelson - 11 months ago 2023-12-25 20:08:13
peter1138@openttd.org
Change: Scale sprites to requested highest resolution level. (#11600)

Sprites from graphics sets which only provide high resolution sprites are now scaled up from scaled down versions.
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/spritecache.cpp
Show inline comments
 
@@ -397,6 +397,12 @@ static bool ResizeSprites(SpriteLoader::
 
		if (!HasBit(sprite_avail, zoom)) ResizeSpriteOut(sprite, zoom);
 
	}
 

	
 
	/* Upscale to desired sprite_min_zoom if provided sprite only had zoomed in versions. */
 
	if (first_avail < _settings_client.gui.sprite_zoom_min) {
 
		if (_settings_client.gui.sprite_zoom_min >= ZOOM_LVL_OUT_4X) ResizeSpriteIn(sprite, ZOOM_LVL_OUT_4X, ZOOM_LVL_OUT_2X);
 
		if (_settings_client.gui.sprite_zoom_min >= ZOOM_LVL_OUT_2X) ResizeSpriteIn(sprite, ZOOM_LVL_OUT_2X, ZOOM_LVL_NORMAL);
 
	}
 

	
 
	return  true;
 
}
 

	
0 comments (0 inline, 0 general)