Hey guys! I am having a slite sprite problem.  I am using Code Warrior 7.  I am 
trying  make a Palm Pong clone.

I have my sprites running but when ever one moves,  the place at which they were,  you 
can see that still plus where they are now.  Understand what I am saying?
I need to figure out how to erase the stop it was just at so that there is only one 
picture of the ball at a time.  I tried getting a rectangle to erase the last stop but 
that doesn't work,  or atleast the way I did it.


// The Ball Rectangle
RctSetRectangle (&BallRect,Ballx, Bally, Ball->width, Ball->height);
do {
if (hit==0){
if(Ballx<148){Ballx++;Bally++;}}
if (hit==1){
if(Ballx<148){Ballx--;Bally--;}}
if(Ballx>=147){hit=1;}
if(Ballx<8){hit=0;}
if(KeyCurrentState()==keyBitHard2){Checkit=true;}
if(KeyCurrentState()>0){
if(KeyCurrentState()==keyBitPageUp){delay++;if(delay>5){y--;delay=0;}}
if(KeyCurrentState()==keyBitPageDown){delay++;if(delay>5){y++;delay=0;}}
if(KeyCurrentState()==NULL){y=y;}}
WinDrawBitmap(Bar1,1,y);
WinDrawBitmap(Bar2,148,yy);

// The Ball 
WinDrawBitmap(Ball,Ballx,Bally);
WinCopyRectangle(oldDrawBall,offscreenBall,&BallRect,Ballx,Bally,winErase);


Thanks in Advance!

-- Brandon
www.DreamCodersRealm.com



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to