Mail Archives: djgpp/1998/01/27/13:16:02
Dont AT spam DOT me wrote:
>
> How can a "fade in" been done with djgpp? And what is the syntax?
> TIA
> please respond via newsgroup.
There are at least three different ways of doing it; all involve
gradually increasing the palette colors from black to their desired
values. Pseudocode follows:
count up from zero to 63
for each color, if RGB < target, increase by one
(fade from black to grey, then colors will saturate into palette)
for each color, set RGB to target * count / 64
(all colors will fade in proportional to their brightness)
for each color, if RGB < target, increase by ratio of RGB of target
(all colors fade in at the same rate)
I'm sure you can think of more ideas. By the way, it is EXTREMELY
impolite to fake your email address. Those of us who reply via email as
a courtesy do not like getting our messages bounced back to us. There
are better ways to deal with spam.
--
---------------------------------------------------------------------
| John M. Aldrich | "If 'everybody knows' such-and-such, |
| aka Fighteer I | then it ain't so, by at least ten |
| mailto:fighteer AT cs DOT com | thousand to one." |
| http://www.cs.com/fighteer | - Lazarus Long |
---------------------------------------------------------------------
- Raw text -