(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:
truelight
2007-06-17 20:30:28 +00:00
parent 8c3e9d111f
commit 79cd3f5db0
39 changed files with 486 additions and 627 deletions

View File

@@ -5,27 +5,19 @@
#ifndef BLITTER_8BPP_DEBUG_HPP
#define BLITTER_8BPP_DEBUG_HPP
#include "blitter.hpp"
#include "8bpp_base.hpp"
#include "factory.hpp"
class Blitter_8bppDebug : public Blitter {
class Blitter_8bppDebug : public Blitter_8bppBase {
public:
/* virtual */ uint8 GetScreenDepth() { return 8; }
/* 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 "8bpp"; }
};
class FBlitter_8bppDebug: public BlitterFactory<FBlitter_8bppDebug> {
public:
/* virtual */ const char *GetName() { return "8bpp-debug"; }
/* virtual */ const char *GetDescription() { return "8bpp Debug Blitter (testing only)"; }
/* virtual */ Blitter *CreateInstance() { return new Blitter_8bppDebug(); }
};