delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/10/16:03:19

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: [Allegro] RLE sprites and background
Date: Wed, 10 Jun 1998 19:48:46 +0100
Organization: None
Message-ID: <UguCyDAOUtf1EwFz@talula.demon.co.uk>
References: <6llq0f$363$1 AT nnrp1 DOT dejanews DOT com>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 22
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

(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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019