Message-ID: <388228CE.2B807C34@gtcom.net> From: Krogg X-Mailer: Mozilla 4.61 [en] (Win95; U) X-Accept-Language: en-US,en-GB,en,ja MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: another allegro drawing question References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 53 Date: Sun, 16 Jan 2000 15:23:42 -0500 NNTP-Posting-Host: 12.16.179.80 X-Trace: eagle.america.net 948054741 12.16.179.80 (Sun, 16 Jan 2000 15:32:21 EST) NNTP-Posting-Date: Sun, 16 Jan 2000 15:32:21 EST Organization: 24hoursupport.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Matt Huston wrote: > > Okay, I have two pong paddles that move accross the screen. They move and > all ,but leave a smeere accross > the screen. They are 150x25x8 bit BITMAPs in a datafile. You may find this > code useful in helping me. > > Thanks, > M. Huston > > //////////////////////////////////////////////////// > > void draw_pong() > { > draw_sprite(BUFFER, GAMEDATA[BMPPONG1].dat, pong1_x, pong1_y); > draw_sprite(BUFFER, GAMEDATA[BMPPONG2].dat, pong2_x, pong2_y); > > blit(BUFFER,screen,0,0,0,0,640,480); > // vsync(); //It made the paddles move slower so I left it out > } You forgot to clear the buffer.... you can put it in like below: void draw_pong() { clear(BUFFER); draw_sprite(BUFFER, GAMEDATA[BMPPONG1].dat, pong1_x, pong1_y); draw_sprite(BUFFER, GAMEDATA[BMPPONG2].dat, pong2_x, pong2_y); draw_any_thing_else_that_needs_to_be_drawn(); blit(BUFFER,screen,0,0,0,0,640,480); } -- |"""""<`.THE PRINCE ,'>"""""""""""""""""""""""""""""""""""| | `.`/""""""\,',' my sig is too big, | |SEE HIS ( / \ \' SEE HIS but its really cool. | | FACE \/<> <>\/ SMILE | | / W \ Visit my ascii art site: | | ,'\_|||||_/`. http://www.gtcom.net/~krogg/ascii/ | | ,',' ||| `.`. krogg DOT no DOT to DOT spam AT gtcom DOT net | |____<,' TIME TO DIE `.>____Remove no.to.spam to reply____|