(svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
-Codechange: introduced a hierachy of blitters to avoid a lot of code duplication Note: this allows much easier adding other types of video-drivers, like OpenGL
This commit is contained in:
@@ -5,27 +5,20 @@
|
||||
#ifndef BLITTER_32BPP_SIMPLE_HPP
|
||||
#define BLITTER_32BPP_SIMPLE_HPP
|
||||
|
||||
#include "blitter.hpp"
|
||||
#include "32bpp_base.hpp"
|
||||
#include "factory.hpp"
|
||||
|
||||
class Blitter_32bppSimple : public Blitter {
|
||||
class Blitter_32bppSimple : public Blitter_32bppBase {
|
||||
public:
|
||||
/* virtual */ uint8 GetScreenDepth() { return 32; }
|
||||
|
||||
/* 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 *GetRenderer() { return "32bpp"; }
|
||||
};
|
||||
|
||||
class FBlitter_32bppSimple: public BlitterFactory<FBlitter_32bppSimple> {
|
||||
public:
|
||||
/* virtual */ const char *GetName() { return "32bpp-simple"; }
|
||||
|
||||
/* virtual */ const char *GetDescription() { return "32bpp Simple Blitter (no palette animation)"; }
|
||||
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSimple(); }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user