Mail Archives: djgpp/1998/06/10/16:03:19
(noname) writes:
>I have a question about RLE sprites. I know that you can blit a RLE sprite
>to a BITMAP and that skips the zero background, but is it there a nice trick
>that can efficiently put a color _behind_ an RLE sprite?
There's no current way to do that, but it would be a fairly simple
modification to the RLE drawing code. Of course this would require
special RLE-character functions for all the possible color depths, which
is a fair amount of extra code...
For drawing characters you would probably also want to replace all non-
zero pixels with the text color, rather than just displaying them
unchanged. That means there isn't really any point storing the pixel
values in the sprite, so you could make a meta-RLE format, that just
encodes runs of solid or zero pixels (negative values for a zero run,
positive ones for a solid run), which would probably be only a fraction
the size of a normal RLE sprite, let alone an entire bitmap object...
--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
"Miracles are nothing if you've got the wrong intentions" - Mike Keneally
- Raw text -