Re: A85: Sliding Pixels
[Prev][Next][Index][Thread]
Re: A85: Sliding Pixels
On Tue, 6 Oct 1998, Patrick Gray wrote:
> I need to know how to "slide" sprites. I have a grayscale sprite on
> the screen, and I need to know how to manipulate the sprite to move
> one "sprite length" toward the top of the screen. How do you do that?
>
> -Gray
>
It depends on the size of your sprites (when you slide from left to right
or vice versa) If your sprites are 8 pixels wide then you draw over the
sprite (only up 1 pixel) then if you have a background, draw the
background where the bottom of the sprite used to be. This way you don't
use the graph mem and you have smooth scrolling.
Here's a picture if I made no sense..
$FC00 ................ -> ..10001001....
$FC10 ..10001001...... -> ..10000001....
$FC20 ..10000001...... -> ..,,,,,,,,.... <-Uncovered BG
$FC30 ................ -> ..............
If you're using a sprite routine that supports masking it makes using
backgrounds a lot easier. In that case you would just draw you sprite
shifted up 1 then redraw the background that was uncovered.
-Humberto Yeverino Jr.
"I kick ass for the Lord."
***********************************************************
Home Page:
http://www.engr.csufresno.edu/~humberto/Home.html
Ti Page:
http://www.engr.csufresno.edu/~humberto/tex.html
z80 Source Page:
http://www.engr.csufresno.edu/~humberto/z80source.html
Official Tyrant Home Page:
http://www.engr.csufresno.edu/~humberto/tyrant.html
E-mail:
humberto@engr.csufresno.edu
***********************************************************
Follow-Ups:
References: