From: e3222483 AT student DOT uq DOT edu DOT au (Diing-seng Toh) 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 12:49:07 GMT Organization: University of Queensland Lines: 52 Message-ID: <5c52c3$nrl$1@nargun.cc.uq.oz.au> References: <32e54b6d DOT 501326 AT news DOT prestel DOT co DOT uk> NNTP-Posting-Host: student.uq.edu.au 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: : 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? yah... Compile sprite use machine code "Mov" and the immediate values. Ofcourse if you are going to copy a block of memory from a scr to destination then, rep movsd is the fastest! But what if you got a transparentcy pixel involve!! then compile sprite or RLE encoding will be much faster!!! for exmpale: you have the following sprite to put into your game, and 0 mean transparent pixel! 0 0 0 0 56 23 12 0 0 0 5 only compile sprite can do this without doing any comparision(if statement).. you can't do this with rep movsd! hope this help! ------------- cheers, diing \|V|/ (o o) +---------------------oOO--(_)--OOo---------------------------+ | Diing-Seng Toh | Lead Programmer and Project Manager | | | Game Project 96 | +-------------------------------------------------------------+ |Homepage:http://student.uq.edu.au/~e3222483 | | Try my free SVGA Game Sprite Editor at this page | +-------------------------------------------------------------+ | Bachelor of Computer System Engineering Honous (1995) | | Master of Information Technology Study(1996) | | Degree is just another piece of paper if you know nothing! | +-------------------------------------------------------------+ | Life is case sensitive... | +-----------------------------Oooo----------------------------+ oooO ( ) ( ) ) / \ ( (_/ \_)