From: George Foot Newsgroups: comp.os.msdos.djgpp Subject: Re: HELP!!![Allegro] Datafile problem!!! Date: 16 Jun 1998 21:58:48 GMT Organization: Oxford University, England Lines: 35 Message-ID: <6m6pqo$nnr$4@news.ox.ac.uk> References: <358596F4 DOT A5F6088C AT netrover DOT com> NNTP-Posting-Host: sable.ox.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Mon, 15 Jun 1998 17:49:41 -0400 in comp.os.msdos.djgpp Nicolas Blais wrote: : void show_centered_bmp(char filename[20],int y) : { : BITMAP* bmp; : PALETTE pal; : bmp = load_bmp(filename,pal); : masked_blit(bmp,screen,0,0,(SCREEN_W-bmp->w)/2,y,bmp->w,bmp->h); : destroy_bitmap(bmp); : } : show_centered_bmp(datafile[Title_Main].dat, 100); Your function expects to be given a filename, and then loads, displays and destroys the bitmap. However, you're passing it a pointer to an already-existing bitmap. You have two choices: a) Modify the function so that it takes the BITMAP * and just displays it (no loading or destroying) b) Modify the call so that it uses the syntax described in grabber.txt to refer to objects in datafiles: show_centered_bmp ("datafile.dat#Title_Main", 100); perhaps -- it depends on the filename of the datafile and the object name of the bitmap. See the file `grabber.txt' in Allegro's `tools' subdirectory for details. -- george DOT foot AT merton DOT oxford DOT ac DOT uk xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/lojban.html