1
0
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:
truelight
2007-06-13 10:31:40 +00:00
parent 97b74fe4f2
commit e7221d1fa9
18 changed files with 389 additions and 7 deletions

View File

@@ -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;