From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro Vesa mode graphics Date: Wed, 29 Jan 1997 21:57:39 +0000 Organization: None Distribution: world Message-ID: References: <32e9265d DOT 3993736 AT news DOT primenet DOT com> <32ee5ff9 DOT 8293044 AT news DOT primenet DOT com> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 Lines: 33 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Mike McLean writes: >>That doesn't explain your problem, though. Can you post some source that >>demonstrates the trouble? I need more info before I can say what's >>wrong... > >Well, here is the exact code i am using. >main() >{ > set_gfx_mode(GFX_VESA2B, 640, 480, 0, 0); > clear(screen); > line(screen,4,1,4,34,1); > line(screen,4,15,20,1,1); [etc] > line(screen,130,34,140,1,1); > line(screen,140,1,155,34,1); > line(screen,140,20,150,20,1); That can't be the entire program - where's the closing brace at the end? Are you waiting for a keypress before quitting back to DOS? If not, the garbage on your screen is probably command.com trying to display the C:\ prompt, and getting it wrong because it doesn't realise your program has switched to graphics mode. And where's the call to allegro_init()? You must do that before using any other Allegro functions. If you did this, Allegro would automatically handle switching back to text mode when your program finishes, so command.com would stay happy. /* * Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ * Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'. */