(svn r10245) -Codechange: added GetName also to all Blitters, instead of only the Factory

This commit is contained in:
truelight 2007-06-21 13:56:59 +00:00
parent 2f0500a438
commit c755fa43d0
7 changed files with 17 additions and 0 deletions

View File

@ -32,6 +32,8 @@ public:
/* virtual */ int BufferSize(int width, int height);
/* virtual */ void PaletteAnimate(uint start, uint count);
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
/* virtual */ const char *GetName() { return "32bpp-anim"; }
};
class FBlitter_32bppAnim: public BlitterFactory<FBlitter_32bppAnim> {

View File

@ -13,6 +13,8 @@ public:
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ void DrawColorMappingRect(void *dst, int width, int height, int pal);
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
/* virtual */ const char *GetName() { return "32bpp-simple"; }
};
class FBlitter_32bppSimple: public BlitterFactory<FBlitter_32bppSimple> {

View File

@ -12,6 +12,8 @@ class Blitter_8bppDebug : public Blitter_8bppBase {
public:
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
/* virtual */ const char *GetName() { return "8bpp-debug"; }
};
class FBlitter_8bppDebug: public BlitterFactory<FBlitter_8bppDebug> {

View File

@ -12,6 +12,8 @@ class Blitter_8bppOptimized : public Blitter_8bppBase {
public:
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
/* virtual */ const char *GetName() { return "8bpp-optimized"; }
};
class FBlitter_8bppOptimized: public BlitterFactory<FBlitter_8bppOptimized> {

View File

@ -12,6 +12,8 @@ class Blitter_8bppSimple : public Blitter_8bppBase {
public:
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator);
/* virtual */ const char *GetName() { return "8bpp-simple"; }
};
class FBlitter_8bppSimple: public BlitterFactory<FBlitter_8bppSimple> {

View File

@ -179,6 +179,11 @@ public:
*/
virtual Blitter::PaletteAnimation UsePaletteAnimation() = 0;
/**
* Get the naem of the blitter, the same as the Factory-instance returns.
*/
virtual const char *GetName() = 0;
virtual ~Blitter() { }
};

View File

@ -26,6 +26,8 @@ public:
/* virtual */ int BufferSize(int width, int height) { return 0; };
/* virtual */ void PaletteAnimate(uint start, uint count) { };
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation() { return Blitter::PALETTE_ANIMATION_NONE; };
/* virtual */ const char *GetName() { return "null"; }
};
class FBlitter_Null: public BlitterFactory<FBlitter_Null> {