Message-ID: <3872A91F.103CE108@sympatico.ca> From: BRAD MURPHY X-Mailer: Mozilla 4.05 [en]C-SYMPA (Win95; I) MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Blit Question! Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 30 Date: Wed, 05 Jan 2000 02:20:21 GMT NNTP-Posting-Host: 206.172.198.63 X-Trace: news21.bellglobal.com 947038821 206.172.198.63 (Tue, 04 Jan 2000 21:20:21 EDT) NNTP-Posting-Date: Tue, 04 Jan 2000 21:20:21 EDT Organization: Sympatico To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I am currently learning allegro and I was wondering if anyone could give me a some help with blit. I've read the allegro.txt definition, but some things are still not clicking. The code that i'm working with is: circlefill(dblbuffer, 0, 100, 50, 15); /* draw first time */ vsync(); blit(dblbuffer, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H); // blit 1 for (x = 1; x < 320; x++) { rest(10); /* slow it down so we can see it */ circlefill(dblbuffer, x - 1, 100, 50, 0); /* erase from last place */ circlefill(dblbuffer, x, 100, 50, 15); /* redraw at new place */ textout(dblbuffer, font, "Double buffering (mode 13h)", 0, 0, 15); vsync(); blit(dblbuffer, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H); // blit 2 } I understand that blit is putting the dblbuffer that is in memory onto the screen, but what is the difference between the first blit and the second? How does the second blit know that it is putting the circle in a different spot as the first blit. And why do you put the second blit right before it loops back to rest(10). Doesn't this create a pause where two circles are on the screen before the erase? It looks to me that every time through the loop the circle is being painted twice on the screen and only being erased once. Any info would be greatly appreciated! BRAD MURPHY