Mail Archives: djgpp/1998/06/12/05:01:36
(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 -