mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-21 13:39:09 +00:00
(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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user