From: "Graham Reeds" Newsgroups: comp.os.msdos.djgpp References: Subject: Re: Buffering text... Lines: 77 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: Date: Fri, 1 Dec 2000 11:51:49 -0000 NNTP-Posting-Host: 62.254.81.170 X-Complaints-To: abuse AT ntlworld DOT com X-Trace: news2-win.server.ntlworld.com 975671517 62.254.81.170 (Fri, 01 Dec 2000 11:51:57 GMT) NNTP-Posting-Date: Fri, 01 Dec 2000 11:51:57 GMT Organization: ntlworld News Service To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Okay - it's been a while, but I've finally got round to posting it... I have a series of debug info (well actually it's the dos output of the a Tetris clone). All I'm outputting is the playarea via two for(;;) loops with the various block type portrayed by different letters with loads of text below telling me the various states of my variable lists. My first problem was smooth update of the screen, which was flickery and head-ache inducing. That was solved. I thought that I'd add color to the proceedings but it wasn't important. What is important is getting the algorithms to work - fancy interfaces are secondary. So colour isn't that important, but would sure make it look more attractive. The basically function looks as follows (white space removed as well us chunk of code): /* ** Function - DrawColorTextPlayArea() ** draws a playarea from chars */ void DrawColorTextPlayArea() { int x, y; gotoxy(0,0); /* reposition cursor */ while (inportb(0x03da) & 0x08); /* wait for retrace to end */ while (!(inportb(0x03da) & 0x08)); /* wait for new retrace to start */ for (y=PLAYAREA_NVHEIGHT; y