From: Bussi Andrea Newsgroups: comp.os.msdos.djgpp Subject: Re: How to program compiled sprites? Date: Thu, 23 Jan 1997 16:22:04 +0100 Organization: University Of Alessandria, Italy Lines: 22 Message-ID: <32E7821C.67B5@cicladi.unial.it> References: <32e54b6d DOT 501326 AT news DOT prestel DOT co DOT uk> NNTP-Posting-Host: aldebaran.unial.it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Luke Steele wrote: > 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? This is true when you do a blit block transfer, but when you use a sprite, you want to skip some trasparent pixel, and you're used to give 'em 0 value, test each pixel and draw it if not zero, skip otherwise. So you haven't a single 'mov' every pixel, but you have also a test. You can reduce the tests with the RLE metod, or cut them with a compiled sprite. > Thanks in advance for any explanations! I hope this help (my English is not so good...) Bussi Andrea bta AT cicladi DOT unial DOT it