Mail Archives: djgpp/1998/04/09/13:33:58
Well the source looks okay. It should work.
But, then again, when you program, SHOULD and
WILL are two entirely seperate tings....
My first question is: Is the data file there?
My second is: Is it corrupted?
My third question would be: Was it saved correctly
to begin with? Maybe the array isn't saved correctly,
and you're trying to access parts in an array that
just aren't there.
TackMast wrote:
>
> i got the grabber working, and made a different datafile containing the same
> things, but my program still won't work. It seems to not find the datafile or
> not load it, because the dos screen just sits there with the cursor blinking,
> doing nothing. if i do set_gfx_mode before i load the datafile, it switches to
> the graphics mode and freezes, because (what i think) the datafile won't load
> properly. can someone please help??
>
> #include <stdio.h>
> #include <stdlib.h>
>
> #include "allegro.h"
> #include "game.h"
>
> main()
> {
> DATAFILE *datafile;
>
> allegro_init();
> install_keyboard();
> install_timer();
>
> datafile = load_datafile("game.dat");
>
> set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0);
>
> blit(datafile[MAIN].dat, screen, 0, 0, 0, 0, 320, 200);
>
> readkey();
>
> return 0;
> }
- Raw text -