From: "Steve Patton" Newsgroups: comp.os.msdos.djgpp Subject: Re: Error, and more... Date: Thu, 28 May 1998 15:27:52 -0600 Organization: AT&T WorldNet Services Lines: 101 Message-ID: <6kkko9$jjb@bgtnsc02.worldnet.att.net> References: <3 DOT 0 DOT 5 DOT 32 DOT 19980528163406 DOT 0079ee10 AT wcnet DOT org> NNTP-Posting-Host: 12.67.33.93 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Joseph Schroeder wrote in message <3 DOT 0 DOT 5 DOT 32 DOT 19980528163406 DOT 0079ee10 AT wcnet DOT org>... > I have several questions for you all... That I cannot figure out how to >slove or do. First, can allegro display gifs or animated gifs? Allegro does not come with tools to do that, if you write the code, you can make your own procedure to load and display a GIF or animated GIF, however, (as quoted from the FAQ.TXT that comes with Allegro) Unisys has a patent on the LZW compression algorithm that is used by the GIF format. I want everything in Allegro to be freely usable without any restrictions whatsoever, which means I can't include any code that is subject to licencing or the payment of royalties. >Second, when i put in c++ commands... I try to actually make the .o file >into an .exe, it gives me a bunch of errors, and it cant find a library >called stdcx >full error | > v >Error: c:/djgpp/bin/ld.exe: cannot open -lstdcx: No such file or directory >(ENOENT) Chances are you did not download or correctly install _ALL_ of the C++ Libraries.. go to here http://www.rt66.com/~brennan/djgpp/ and get the following files gpp2721b.zip lgp271b.zip Chances are you are missing the LGP271b.zip, which contains the libraries >Third, When i use the code for displaying a BMP file... ( > >main() >{ > BITMAP *bmp; > RGB pal[256]; > > allegro_init(); > set_gfx_mode(GFX_AUTODETECT,800,600,0,0); > > bmp=load_bitmap(filename,pal); > blit(bmp,screen,0,0,0,0,bmp->w,bmp->h); >} > >) ... It seems that i can only display one bitmap to the screen at a >time... could i change that? And... could I make it so all you would do is >set a varible, perhaps named image and set it to a specific bmp name, so >that you would only have to make it goto a sub with a variable set to >display a bitmap. Another quote from the FAQ.TXT How can I display several different images at the same time? When I show the second one it messes up the palette for the first. That is how the video hardware works: there can only be one palette in use at any given moment. Either convert your images so that they all use the same palette (see the Allegro homepage for some utilities that can help with this...) or switch to a truecolor graphics mode. And I'm not too sure what you are asking about the variable, but you could try this void Display ( char *filename ) { BITMAP *bmp; PALETTE pal; bmp = load_bitmap ( filename, pal ); clear ( screen ); set_palette ( pal ); blit ( bmp, screen, 0, 0, 0, 0, bmp->w, bmp->h ); destroy_bitmap ( bmp ); } If you wanted to call a procedure to display a filename. >Fourth, Are there any other good libraries like allegro out there? Ive >tried a couple... but I have never gotten them in correctly... My opinion is that Allegro is a good multipurpose library that will easily let you interface with graphics, sound, input, and such. There are other libraries that are free that are made for Allegro. The other libraries I've seen are pay for us. But go to http://www.rt66.com/~brennan/djgpp/ because he has some other good libraries up on his page that you can try out. -Steve http://home.att.net/~pattonl