From: "Matthew Smith" Newsgroups: comp.os.msdos.djgpp Subject: Re: allegro, masked_blit() question Date: Sat, 29 Sep 2001 11:57:13 +0100 Lines: 73 Message-ID: <9p48tk$bs9$1@news8.svr.pol.co.uk> References: <9ovqkn$61l$1 AT uranium DOT btinternet DOT com> NNTP-Posting-Host: modem-130.articuno.dialup.pol.co.uk X-Trace: news8.svr.pol.co.uk 1001760500 12169 217.135.26.130 (29 Sep 2001 10:48:20 GMT) NNTP-Posting-Date: 29 Sep 2001 10:48:20 GMT X-Complaints-To: abuse AT theplanet DOT net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Yes it does change. In 8-bit modes color index 0 is the transparent one. You need do ensure that the PCX or BMP file you load into the Grabber has the transparent pixels with color 0. This may be black, but it need not be. There may be another black in the palette but only index 0 is masked. Palette index 0 is also the color of the border around the screen, so making color 0=bright pink is not an ideal solution. It always helps with Allegro questions to state the colour depth and screen driver you are using. Also, except here on the DJGPP group, you should say which OS and compiler you have too. The forums at www.allegro.cc are a good place to discuss Allegro programming (in English, mostly) There is also a Spanish and a Brazilian (Portugese) forum but I do not have the URL for these to hand. What is your native language? Do you have Allegro documents in your prefered language? "Tim Nicholson" wrote in message news:9ovqkn$61l$1 AT uranium DOT btinternet DOT com... > What colour depth have you set allegro to use? > > If you are using truecolour mode then the mask colour is 'Bright Pink' > (maximum red and blue, zero green) and not black, I don't think the fact > that the source bitmap is only 8bit changes this. > > Tim > > "bullwinkle" wrote in message > news:j952rt0oga8l5ak6n4krurcku12nc8oje2 AT 4ax DOT com... > > I'm currently using Allegro in conjunction with DJGPP to program a > > game in the C language. My computer OS is Win98 but the game i'm > > writing is for DOS. anyway, i'm trying to implement a masked_blit() > > to display my bitmap object, compiled in the Allegro's Grabber > > program. the point being to show the background graphics through the > > black, or color 0, sections of the given bitmap. The graphic setting > > is at 800x600 resolution and the bitmap is currently saved as 256 > > colors. the problem is - when i draw the bitmap using > > "masked_blit(..)" i get the full bitmap drawing, including the black > > portions - basically i get the full rectangle drawing that i > > originally 'grabbed' in the Grabber program, including all the black > > portions. The background graphics don't show through the black > > portions of the bitmap. Any thoughts or suggestions as to how i can > > get the bitmap's black portions to show the background graphics using > > masked_blit(..) would be appreciated. i've used it successfully in > > the past, but for some reason it's not working correctly on this > > particular bitmap. anyway, any thoughts or suggestions would be > > appreciated. also, if you need further information to help diagnose > > the problem please ask and i'll provide it. > > > > thanks much for any help anyone can provide. > > > >