forked from mirror/OpenTTD
(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
This commit is contained in:
@@ -102,6 +102,16 @@ void Blitter_8bppOptimized::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Z
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_8bppOptimized::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_8bppOptimized::Encode(SpriteLoader::Sprite *sprite, Blitter::AllocatorProc *allocator)
|
||||
{
|
||||
Sprite *dest_sprite;
|
||||
|
Reference in New Issue
Block a user