From: castroto AT remus DOT rutgers DOT edu (Fabrizio Castrotorres) Newsgroups: comp.os.msdos.djgpp Subject: Re: sprites and ALLEGRO'S draw_sprite(); Date: 27 Jan 1998 14:28:28 -0500 Organization: Rutgers University LCSR Lines: 45 Message-ID: <6alcgs$suh$1@remus.rutgers.edu> References: <19980123161800 DOT LAA01145 AT ladder01 DOT news DOT aol DOT com> NNTP-Posting-Host: remus.rutgers.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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