Only apply sprite_zoom_min setting when suitable zoom levels are available

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

See: https://github.com/OpenTTD/OpenTTD/issues/9804
This commit is contained in:
Jonathan G Rennison
2022-08-14 10:45:06 +01:00
parent 27316f70ec
commit 309f1b47d2
7 changed files with 49 additions and 36 deletions

View File

@@ -23,8 +23,12 @@ struct Sprite {
};
enum SpriteCacheCtrlFlags {
SCCF_WARNED = 0, ///< True iff the user has been warned about incorrect use of this sprite.
SCCF_HAS_NON_PALETTE = 1, ///< True iff there is at least one non-paletter sprite present (such that 32bpp mode can be used).
SCCF_WARNED = 0, ///< True iff the user has been warned about incorrect use of this sprite.
SCCF_HAS_NON_PALETTE = 1, ///< True iff there is at least one non-paletter sprite present (such that 32bpp mode can be used).
SCCF_ALLOW_ZOOM_MIN_1X_PAL = 2, ///< Allow use of sprite min zoom setting at 1x in palette mode.
SCCF_ALLOW_ZOOM_MIN_1X_32BPP = 3, ///< Allow use of sprite min zoom setting at 1x in 32bpp mode.
SCCF_ALLOW_ZOOM_MIN_2X_PAL = 4, ///< Allow use of sprite min zoom setting at 2x in palette mode.
SCCF_ALLOW_ZOOM_MIN_2X_32BPP = 5, ///< Allow use of sprite min zoom setting at 2x in 32bpp mode.
};
extern uint _sprite_cache_size;