From: G DOT DegliEsposti AT ads DOT it To: djgpp AT delorie DOT com Message-ID: Date: Mon, 22 Dec 1997 09:52:21 +0100 Subject: Re: allegro bmp/pcx loading problems Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Precedence: bulk >I have a program which uses allegro to load 6 bitmaps, all of size >77x105 and i want to keep writing them over top of each other to do >some crude animation. However, half of the time when I try to compile >the program, the compiler gives me the error: "virtual memory >exhausted" the other half of the time it compiles but i get a general maybe this is because your temporary files go to a directory with not enough space available. >protection fault after it has displayed 2 frames. What am I doing >wrong? here is the source if you're interested (I am just trying stuff >out and so I just modified one of the allegro examples). oh yeah by >the way, i accidentally overwrote allegro example #15 so if someone >could just post ex15.c that would be great too. > [...] >void main() BTW: according to ANSI, main() sould return int > /* read in the bitmap files */ > the_image[0] = load_bitmap("run1.bmp", the_pallete[0]); > if (!the_image[0]) {printf("Error reading bitmap file run1.bmp"); [...] > allegro_init(); > install_keyboard(); > if (set_gfx_mode (GFX_AUTODETECT, 640, 480, 0, 0)!=0) exit(1); I am not sure if this is your problem: I usually put allegro_init() before any other call to allegro functions. ciao Giacomo