diff options
author | truelight <truelight@openttd.org> | 2007-06-17 20:30:28 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-06-17 20:30:28 +0000 |
commit | 79cd3f5db0deeb4017c75198f3b530c3a2bf0ee3 (patch) | |
tree | e0105857aa1562ca3ca15a5e7df7e49bfc939456 /src/blitter/8bpp_optimized.hpp | |
parent | 8c3e9d111f55531f67e8dc132c678d70632f56d9 (diff) | |
download | openttd-79cd3f5db0deeb4017c75198f3b530c3a2bf0ee3.tar.xz |
(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
Diffstat (limited to 'src/blitter/8bpp_optimized.hpp')
-rw-r--r-- | src/blitter/8bpp_optimized.hpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/blitter/8bpp_optimized.hpp b/src/blitter/8bpp_optimized.hpp index 0c9cb2dee..bbade0080 100644 --- a/src/blitter/8bpp_optimized.hpp +++ b/src/blitter/8bpp_optimized.hpp @@ -5,27 +5,19 @@ #ifndef BLITTER_8BPP_OPTIMIZED_HPP #define BLITTER_8BPP_OPTIMIZED_HPP -#include "blitter.hpp" +#include "8bpp_base.hpp" +#include "factory.hpp" -class Blitter_8bppOptimized : public Blitter { +class Blitter_8bppOptimized : 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_8bppOptimized: public BlitterFactory<FBlitter_8bppOptimized> { public: /* virtual */ const char *GetName() { return "8bpp-optimized"; } - /* virtual */ const char *GetDescription() { return "8bpp Optimized Blitter (compression + all-ZoomLevel cache)"; } - /* virtual */ Blitter *CreateInstance() { return new Blitter_8bppOptimized(); } }; |