From: "John Carbrey" Newsgroups: comp.os.msdos.djgpp References: <7chfic$u4q$1 AT camel0 DOT mindspring DOT com> Subject: Re: Loading a bitmap from a file w/ allegro Lines: 32 X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Message-ID: <9nXG2.13339$134.131194@tor-nn1.netcom.ca> Date: Sun, 14 Mar 1999 18:10:20 -0800 NNTP-Posting-Host: 207.181.81.92 X-Complaints-To: abuse AT netcom DOT ca X-Trace: tor-nn1.netcom.ca 921453125 207.181.81.92 (Sun, 14 Mar 1999 18:12:05 EDT) NNTP-Posting-Date: Sun, 14 Mar 1999 18:12:05 EDT Organization: Netcom Canada To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Lark > wrote in message <7chfic$u4q$1 AT camel0 DOT mindspring DOT com>... >Can someone post just a short snippet of code that will load a bmp or pcx >file and display it on the screen? I am having a lot of trouble getting >this to work. Thanks. > > #define GRAPHIC_DIR "d:/assg/12comp~1/graphics/" BITMAP * bmpINTRO,*bmpMAIN; char buf[256]; bmpINTRO=create_bitmap(640,480); bmpMAIN=create_bitmap(640,480); replace_filename(buf,GRAPHIC_DIR, "Title Screen.bmp",sizeof(buf)); bmpINTRO=load_bmp(buf,pal); replace_filename(buf,GRAPHIC_DIR, "Main Screen.bmp",sizeof(buf)); bmpMAIN =load_bmp(buf,pal); blit(bmpINTRO,screen, 0,0,0,0,640,480); readkey(); fadeout(1000); blit(bmpMAIN,screen, 0,0,0,0,640,480); readkey(); // Clean Up // destroy_bitmap(bmpINTRO); destroy_bitmap(bmpMAIN);