Mail Archives: djgpp/2000/02/07/11:44:15
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 -