Blitter: Null blitter always requires no zoom levels
This commit is contained in:
@@ -18,6 +18,7 @@ public:
|
|||||||
Blitter_Null()
|
Blitter_Null()
|
||||||
{
|
{
|
||||||
this->SetScreenDepth(0);
|
this->SetScreenDepth(0);
|
||||||
|
this->SetNoSpriteDataRequired(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override {};
|
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override {};
|
||||||
|
@@ -605,6 +605,7 @@ static void *ReadSprite(const SpriteCache *sc, SpriteID id, SpriteType sprite_ty
|
|||||||
} else {
|
} else {
|
||||||
zoom_levels = UINT8_MAX;
|
zoom_levels = UINT8_MAX;
|
||||||
}
|
}
|
||||||
|
if (encoder->NoSpriteDataRequired()) zoom_levels = 0;
|
||||||
|
|
||||||
SpriteFile &file = *sc->file;
|
SpriteFile &file = *sc->file;
|
||||||
size_t file_pos = sc->file_pos;
|
size_t file_pos = sc->file_pos;
|
||||||
|
@@ -84,6 +84,7 @@ public:
|
|||||||
class SpriteEncoder {
|
class SpriteEncoder {
|
||||||
bool supports_missing_zoom_levels = false;
|
bool supports_missing_zoom_levels = false;
|
||||||
bool supports_32bpp = false;
|
bool supports_32bpp = false;
|
||||||
|
bool no_data_required = false;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
inline void SetSupportsMissingZoomLevels(bool supported)
|
inline void SetSupportsMissingZoomLevels(bool supported)
|
||||||
@@ -96,6 +97,11 @@ protected:
|
|||||||
this->supports_32bpp = supported;
|
this->supports_32bpp = supported;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void SetNoSpriteDataRequired(bool not_required)
|
||||||
|
{
|
||||||
|
this->no_data_required = not_required;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual ~SpriteEncoder() = default;
|
virtual ~SpriteEncoder() = default;
|
||||||
@@ -105,6 +111,11 @@ public:
|
|||||||
return this->supports_missing_zoom_levels;
|
return this->supports_missing_zoom_levels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool NoSpriteDataRequired() const
|
||||||
|
{
|
||||||
|
return this->no_data_required;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Can the sprite encoder make use of RGBA sprites?
|
* Can the sprite encoder make use of RGBA sprites?
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user