Mail Archives: djgpp/1998/03/22/09:00:20
James W Sager Iii writes:
>void main(void)
>{
>//640 x 480 mode
> set_gfx_mode(0,640,480,1024,1024);
> allegro_init();
I'm not sure why this would crash, but it is grossly incorrect to call
any other Allegro functions before using allegro_init(). Trying to set a
video mode before initialising the lib is just asking for trouble...
Also, why are you passing zero as the first param to set_gfx_mode()?
Using the GFX_* defines would make your code more readable, and prevent
it from breaking if I ever change what the actual numbers are.
--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
"Pigs use it for a tambourine" - Frank Zappa
- Raw text -