From: guidoni AT sbox DOT tu-graz DOT ac DOT at (Guido Pinkas) Newsgroups: comp.os.msdos.djgpp,rec.games.programmer Subject: Re: How to program compiled sprites? Followup-To: comp.os.msdos.djgpp,rec.games.programmer Date: 22 Jan 1997 11:59:47 GMT Organization: Graz University of Technology, Austria Lines: 36 Message-ID: <5c4vfj$6uc@fstgal00.tu-graz.ac.at> References: <32e54b6d DOT 501326 AT news DOT prestel DOT co DOT uk> NNTP-Posting-Host: freeway.tu-graz.ac.at To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp 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 :)