Re: A92: The problem with variable-line sprites


[Prev][Next][Index][Thread]

Re: A92: The problem with variable-line sprites




To use variable line sprites:

assuming your sprite is layed out like this:
dc.w number of lines
dc.w line1
dc.w line2
dc.w ...
dc.w maskline1
dc.w maskline2
dc.w maskline3
dc.w ...

then, ...
move spritename.w to d0
lea spritename+2 to a0
lea spritename+2+(2*lines) to a1
lea starting address to a2
or (a1).w to (a2)
xor (a1)+.w to (a2)
or (a0)+.w to (a2)+
subtract 1 to d0
loop above 4 lines until d0=4
rts

note: use 4*lines and .l for lword width ; 1*lines and .b for byte width
you'll have do modify it for grayscale.

hope this helps

Noah Medling
http://xp.calc.org/

---- "Cliff L. Biffle" <cbiffle@safety.net> wrote:
> 
> 
> >how can l take what l have there and make it so that it will
> >display the lines of sprite and the lines of mask that l intended, instead of
> >using the lines of sprite as a mask when changing the number of lines that
> >the sprite is to be displayed?
> 
> Um...do you have any code to go along with that?
> --Cliff Biffle
> 
> Optimist: This glass is half full.
> Pessimist: This glass is half empty.
> Cynic: They drank my water.  Figures.
> Engineer: The glass should be -half- this size!
> 
> 
> 
> 
> 

___________________________________________________________________
To get your own FREE ZDNet onebox - FREE voicemail, email, and fax,
all in one place - sign up today at http://www.zdnetonebox.com