Message-ID: <352CFE0E.1D0A4E63@sprynet.com> Date: Thu, 09 Apr 1998 09:57:50 -0700 From: Ishpeck Organization: Lunaticnologies MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: allegro datafiles still won't work References: <1998040901241100 DOT VAA03751 AT ladder01 DOT news DOT aol DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 192.41.91.150 Lines: 46 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 > #include > > #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; > }