Fix #9804: Only apply sprite_zoom_min setting when sprites available (#9988)

Only discard sprite zoom levels when a suitable higher zoom level is
defined in the same colour mode

This is to avoid placeholder or empty sprites being used, causing
visual artefacts
This commit is contained in:
Jonathan G Rennison
2022-09-21 11:37:11 +01:00
committed by GitHub
parent 20f7ff8ac0
commit 5e413c9dcd
5 changed files with 69 additions and 13 deletions

View File

@@ -72,9 +72,10 @@ public:
* @param file_pos The position within the file the image begins.
* @param sprite_type The type of sprite we're trying to load.
* @param load_32bpp True if 32bpp sprites should be loaded, false for a 8bpp sprite.
* @param control_flags Control flags, see SpriteCacheCtrlFlags.
* @return Bit mask of the zoom levels successfully loaded or 0 if no sprite could be loaded.
*/
virtual uint8 LoadSprite(SpriteLoader::Sprite *sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp) = 0;
virtual uint8 LoadSprite(SpriteLoader::Sprite *sprite, SpriteFile &file, size_t file_pos, SpriteType sprite_type, bool load_32bpp, byte control_flags) = 0;
virtual ~SpriteLoader() { }
};