From: Shawn Hargreaves 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: References: <6llq0f$363$1 AT nnrp1 DOT dejanews DOT com> <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 Precedence: bulk (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