www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/12/05:01:36

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: Thu, 11 Jun 1998 20:50:32 +0100
Organization: None
Message-ID: <WuAiRIAIUDg1EwcN@talula.demon.co.uk>
References: <6llq0f$363$1 AT nnrp1 DOT dejanews DOT com>
<UguCyDAOUtf1EwFz AT talula DOT demon DOT co DOT uk> <6loldq$c2b$1 AT nnrp1 DOT dejanews DOT com>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 24
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

(noname) writes:
>I took a look at the RLE code and I couldn't really figure out how to do
>something like that.  I'm mostly a C++ programmer so assembly is just wierd
>and wonderful (and very opaque) for me.

You could always just write the routine in C. The _x_draw_rle_sprite()
function, from modex.c, would be a good starting point to see how to do
this.

>Ok, would it then be more sensible to write a color depth independant routine
>using lots of hline calls?  Do you think it would be too slow? 

That would be a good place to start. It would certainly be faster to do
the writes directly from the RLE function (there would would be no need
to check for things like XOR drawing modes, and you would only need to
do a bank switch check once per scanline rather than once per line
segment, plus it would avoid the function call overhead), but I doubt
that these things will make too huge a difference in the grand scale of
things.


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