Mail Archives: djgpp/1997/01/23/11:51:23
Luke Steele (luke AT metalworks DOT prestel DOT co DOT uk) wrote:
: Hi,
: I recently obtained the Allegro, the graphics programming library for
: DJGPP. One of the test programs that comes with it demonstrates
: certain methods of sprite putting, including one called compiled
: sprites. How does this work? According to the documentation, the
: routine performs a number of immediate 'mov's, but I am unable to see
: how this could make things faster. Surely, the time for an immediate
: 'mov' is 1 cycle, as is the time for each mov in a 'rep movsd'? What
: is it that I'm not getting?
The difference is,that when you put a normal sprite,you have to check
every Pixel,if its transparent (i.e. its color is 0).
In a compiled sprite,you only put visible Pixels without checking.
thats the speedup. so if you are only using fully opaque sprites,you
better use the 'rep movsd' solution,because you can't do clipping with
compiled sprites. The only advantage I see in compiled sprites is if you
want to put a cockpit bitmap,after having drawn you 3D-View or something...
:
: Thanks in advance for any explanations!
:
No problem... hope it helped.
:
: --
: Luke Steele
: luke AT metalworks DOT prestel DOT co DOT uk
CU,Guido.
--------------
My E-Mail is: guidoni AT sbox DOT tu-graz DOT ac DOT at
Feel free to mail me,if you have sourcecode,interesting links or
too much cash :)
- Raw text -