Mail Archives: djgpp/1998/04/16/10:01:58
George Foot wrote:
> The first thing you should do is see whether or not the `ex1' example
> program runs. This program should set a 320x200 8-bit colour mode,
> print a message, and wait for a keypress. You should find it in the
> `examples' subdirectory of Allegro, and it should already have been
> compiled for you by Allegro's build process.
>
> If this program fails, something is very wrong -- let us know. If
> this program works properly then you're doing something wrong in your
> source code -- show us some source code so that we can see what you're
> doing wrong.
>
> Without seeing your source, I'd guess that you forgot to call
> `allegro_init' before `set_gfx_mode'.
Thanks for responding. Here's the source that is giving me problems:
#include<allegro.h>
int main(){
allegro_init();
install_keyboard();
set_gfx_mode(GFX_AUTODETECT,640,480,0,0); /* ******* */
textout_centre(screen,font,"HI",160,100,255);
readkey();
return 0;
}
this is the code that is giving me problems. I've also experienced the
same problem with some of the examples that come with Allegro. The
funny thing is that the line with the ******* will run just fine if I
have:
set_gfx_mode(GFX_AUTODETECT,320,200,0,0);
but once I try to go to 640 by 480 I get that wierd message. I can't
see what the problem would be.
- Raw text -