www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/25/17:29:27

To: djgpp AT delorie DOT com
Subject: Re: A desperate cry for help. :-)
References: <38632FD5 DOT 94811A78 AT crosswinds DOT net>
From: Michael Bukin <M DOT A DOT Bukin AT inp DOT nsk DOT su>
Date: 25 Dec 1999 21:39:24 +0600
In-Reply-To: Spooky's message of "Fri, 24 Dec 1999 00:33:26 -0800"
Message-ID: <20aemzkp1v.fsf@Sky.inp.nsk.su>
Lines: 27
X-Mailer: Gnus v5.5/Emacs 19.34
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019