Codechange: Allow for using a sprite encoder that is not the currently active blitter when loading a sprite.
This commit is contained in:
@@ -25,7 +25,7 @@ enum BlitterMode {
|
||||
/**
|
||||
* How all blitters should look like. Extend this class to make your own.
|
||||
*/
|
||||
class Blitter {
|
||||
class Blitter : public SpriteEncoder {
|
||||
public:
|
||||
/** Parameters related to blitting. */
|
||||
struct BlitterParams {
|
||||
@@ -58,6 +58,11 @@ public:
|
||||
*/
|
||||
virtual uint8 GetScreenDepth() = 0;
|
||||
|
||||
bool Is32BppSupported() override
|
||||
{
|
||||
return this->GetScreenDepth() > 8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw an image to the screen, given an amount of params defined above.
|
||||
*/
|
||||
@@ -74,11 +79,6 @@ public:
|
||||
*/
|
||||
virtual void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) = 0;
|
||||
|
||||
/**
|
||||
* Convert a sprite from the loader to our own format.
|
||||
*/
|
||||
virtual Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator) = 0;
|
||||
|
||||
/**
|
||||
* Move the destination pointer the requested amount x and y, keeping in mind
|
||||
* any pitch and bpp of the renderer.
|
||||
|
Reference in New Issue
Block a user