www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/18/01:45:36

From: Alex Demko <ademko AT mbnet DOT mb DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro Palette functions
Date: Fri, 17 Jan 1997 20:55:12 -0600
Organization: Chaos Software
Lines: 30
Message-ID: <32E03B90.24FE@mbnet.mb.ca>
References: <32E03293 DOT 2908 AT worldnet DOT att DOT net>
NNTP-Posting-Host: dyn2-014.cc.umanitoba.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>   Can someone send me some code that will work with this function? I
> tried making a FOR loop and having it fade in colors, but to no avail.
> The only other way I can do this is to use GRX, which is a waste to
> include 'grx.h' and link 'grx.lib' for just one function.

Do you want to make the whole screen fade in or out (if yes, use
fade_in() and fade_out()).

If you want to make a faded palette:

{
  /* make the firt 64 colors, grayscale like */
  struct RGB col;
  int i;

  for (i=0; i<64; i++)
    {
    col->r=i;
    col->g=i;
    col->b=i;
    set_color(i,&col);
    }
}

-- 
====================================================================
Alex Demko (Alex_Demko AT mbnet DOT mb DOT ca) # Chaos Software Productions
Univ. of Manitoba Comp. Sci.        # Just released: Drip! (PC 386+)
C C++ Pascal Delphi Perl HTML Java  # http://www.mbnet.mb.ca/chaos

- Raw text -


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