Mail Archives: djgpp/1998/01/31/03:30:33

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Transparent colours with allegro.
Date: 31 Jan 1998 05:15:58 GMT
Organization: The National Capital FreeNet
Lines: 16
Message-ID: <6auc2e$>
References: <01bd2d22$db496440$ce51dece AT stachowiak>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

"Helix" (maciek AT compmore DOT net) writes:
> Could someone help me out, I would like to know how to select one color
> form a pallete and make it transparent. I would appreciate some examples of
> some code. THANKS

Easy: make that color color index 0, then use it in sprites etc.

(Since you mention palettes I assume you're using an 8-bit mode. If you
are using truecoloror highcolor, there is only one palette, albeit a huge
one, and the magenta color (255,0,255) is the transparent one.)
    .*.  Friendship, companionship, love, and having fun are the reasons for
 -()  <  life. All else; sex, money, fame, etc.; are just to get/express these.
    `*'  Send any and all mail with attachments to the hotmail address please.
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca pgd73 AT hotmail DOT com

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019