Mail Archives: djgpp/1998/01/27/14:30:42
pitel AT aol DOT com (Pitel) writes:
>Hello
>Can someone help me, i am trying to display
>a sprite animation on a screen that i have place
>a background bitmap image, but as i move the sprite
>the sprite destroyes the background (erases it).
>how can i save the background image and restore it
>when the sprite has moved off that area.
>Thanks
>Pitel AT aol DOT com
>Eric
Or you can use double buffering,
1.- save the background that will be written over by the sprite to a buffer
before you put the sprite on the screen.
2.- Blit sprite to screen
3.- restore previous background
4.- save new background....
5.- Blit sprite ...etc
All drawsprite does is make a certain pixels in your sprite transparent
so that that you can see background around the sprite, it does not do
double buffering for you.
hope that helps
- Raw text -