Mail Archives: djgpp/1999/12/25/17:29:27
Spooky <spo_nospam_oky760 AT crosswinds DOT net> writes:
> {
> BITMAP *back;
> PALLETE pal;
> clear(back);
You should not use bitmap without creating it first with load_bitmap,
create_bitmap or something similar. So remove 'clear(back)'.
> allegro_init();
> install_keyboard();
> install_timer();
> set_gfx_mode(GFX_VGA, 320, 240, 0, 0);
GFX_VGA can not handle 320x240 resolution. This resolution is
supported by GFX_MODEX and some other drivers. But you should use
GFX_AUTODETECT and test return value of set_gfx_mode, or use GFX_SAFE
if you are using WIP version of Allegro (3.9.xx).
if (set_gfx_mode (GFX_AUTODETECT, 320, 240, 0, 0) != 0) {
fprintf (stderr, "Error setting graphics mode\n");
exit (1);
}
--
Michael Bukin
- Raw text -