From e7221d1fa93229b8a56a84155bf20930c7b5d2aa Mon Sep 17 00:00:00 2001 From: truelight Date: Wed, 13 Jun 2007 10:31:40 +0000 Subject: (svn r10132) -Codechange: split out the last direct video-buffer read access to the blitter-layer -Add: added a new renderer and blitter to make room for some optimized bpp -Fix: fill the alpha channel in the grf-spriteloader --- src/blitter/8bpp_simple.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/blitter/8bpp_simple.cpp') diff --git a/src/blitter/8bpp_simple.cpp b/src/blitter/8bpp_simple.cpp index 010066f8a..47ebe8fc4 100644 --- a/src/blitter/8bpp_simple.cpp +++ b/src/blitter/8bpp_simple.cpp @@ -48,6 +48,16 @@ void Blitter_8bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoom } } +void Blitter_8bppSimple::DrawColorMappingRect(void *dst, int width, int height, int pal) +{ + const uint8 *ctab = GetNonSprite(pal) + 1; + + do { + for (int i = 0; i != width; i++) _screen.renderer->SetPixel(dst, i, 0, ctab[((uint8 *)dst)[i]]); + dst = _screen.renderer->MoveTo(dst, 0, 1); + } while (height--); +} + Sprite *Blitter_8bppSimple::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator) { Sprite *dest_sprite; -- cgit v1.2.3-54-g00ecf