From: libolt AT primenet DOT com (Mike McLean) Newsgroups: comp.os.msdos.djgpp Subject: Re: more with Sprites in Allegro Date: 5 May 1997 20:02:00 -0700 Organization: Lightning Bolt Software Lines: 40 Message-ID: <336e9e2e.2077659@news.primenet.com> References: <336cda63 DOT 5017831 AT news DOT primenet DOT com> <336D41CD DOT 4DE1 AT total DOT net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk thanks for the help, but i still have no clue what to do, I put what you added in, I took most of the code from example21 >Mike McLean wrote: >> >> Thanks for those who responded to my earlier question. Now I've got >> the sprite into an allegro data file. The only problem is I can't >> figure out how to display it. here is the code i am using >> >> #include >> void main(int argc, char *argv[]) >> { >> char datafile_name[80]; >> int frame; >> BITMAP *spr; >> DATAFILE *data; >> strcpy(datafile_name, argv[0]); >> strcpy(get_filename(datafile_name), "cool.dat"); >> set_gfx_mode(GFX_AUTODETECT,640,480,0,0); >> data = load_datafile (datafile_name); >> set_pallete(data[1].dat); >> draw_sprite (spr, data[frame].dat,0,0); > > blit(spr, screen, source_x, source_y, dest_x, dest_y, width, height); > >> delay(2000); >> set_gfx_mode(GFX_TEXT,80,25,0,0); >> } > > >You _really_ should have a look at the demo files included with Allegro; >they do the things written about in the doc. > >Good luck, >Les > >-- >Leslie E Murphy > >lemurphy AT total DOT net