Mail Archives: djgpp/1997/01/30/02:41:57
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'.
*/
- Raw text -