From: tackmast AT aol DOT com (TackMast) Newsgroups: comp.os.msdos.djgpp Subject: datafiles problems in allegro Date: 6 Apr 1998 20:15:56 GMT Lines: 45 Message-ID: <1998040620155601.QAA16833@ladder03.news.aol.com> NNTP-Posting-Host: ladder03.news.aol.com Organization: AOL http://www.aol.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk i previously posted a message on having problems with graphics in allegro. after redoing my test program a lot of times and moving the placement things, i've found that it's not loading the graphics that's giving me my problems, it's getting the datafile loaded and able. when i load the datafile, my program just freezes for no apparent reason. i copied a lot of the code out of the example program 12, but it still doesn't work. i'm wondering if it might be because i use the dat archiver instead of the grabber since the grabber just won't work. so, can someone tell me why the datafiles aren't loading or possibly why the grabber won't work? here's the code: #include #include #include "allegro.h" #include "picture.h" /* the file produced defining everything in the datafile */ main(int argc, char *argv[]) { DATAFILE *datafile; char buf[80]; allegro_init(); install_keyboard(); strcpy(buf, argv[0]); strcpy(get_filename(buf), "example.dat"); datafile = load_datafile(buf); datafile = load_datafile("Picture.dat"); set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0); set_pallete(datafile[GAME_PAL].dat); blit(datafile[MAIN_TGA].dat, screen, 0, 0, 0, 0, 320, 200); readkey(); unload_datafile(datafile); return 0; }