[SDL] Question about animation; erasing where my sprite has been

me at infinite-labs.net
Sat Mar 1 07:18:42 PST 2008


Il giorno 01/mar/08, alle ore 16:14, Michael Sullivan ha scritto:
> I've drawn my sprite in it's original position.  I move it to a new
> location and redraw the screen.  The sprite is drawn in then new
> position, but also still shows in the old position.  How to fix this?

Once you have drawn over a surface, whatever was on it is erased and  
replaced (alpha compositing aside). So, you will need to redraw the  
backdrop, or at least the portion of it that you want to be visible  
again after the sprite moves.

  - ∞



More information about the SDL mailing list