delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/07/11:44:15

Message-ID: <F77915E7F086D31197F4009027CC81C925A495@probe-2.as-london.acclaim.com>
From: Shawn Hargreaves <SHargreaves AT acclaimstudios DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: Changing transparent color in 256 mode?
Date: Mon, 7 Feb 2000 15:33:43 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Reply-To: djgpp AT delorie DOT com

Todorovic writes:
>> I was wondering if there is any way to change the transparent
>> color from black to something else.
>
> Change constant MASK_COLOR_xx in allegro.h, recompile Allegro, and 
> you'll have it.

Bad advice: that won't work at all.

Mask colors are not easily modifiable: most of the 8 bit drawing code
relies on it being zero because this is faster to test against, and
the truecolor code relies on it being magenta because that is 
symmetrical in both RGB and BGR color formats, which avoids having
to support multiple bit patterns for the mask.

So, you are pretty much stuck with the default colors, sorry. This 
isn't really a problem, though, because the mask color is zero, not
black! Whether you have zero coming out as black, or as some other
color, or whether you assign some other color number to be black, is
entirely up to what palette you use, so you can simply change this
in your paint program (assuming you have a decent paint program that
allows proper palette editing: Windows Paint is no good for doing 
game graphics).


	Shawn Hargreaves.

- Raw text -


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