From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro Palette functions Date: Thu, 23 Jan 1997 20:56:04 +0000 Organization: None Lines: 40 Distribution: world Message-ID: References: <32E03293 DOT 2908 AT worldnet DOT att DOT net> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Rob Vasquez writes: >I've set up and maked (made?) Allegro, and the only functions I can't >get to work are the palette functions. > > There is a function: > > set_color(int index, RGB*); > > RGB is a structure as: > > typedef struct RGB > { > unsigned char r, g, b; > } RGB; > > Can someone send me some code that will work with this function? I What doesn't work with these functions? Posting some code that demonstrates your problem would help a lot... To fade the screen background (color 0) from black to white, try something like: int i; RGB c; for (i=0; i<64; i++) { c.r = c.g = c.b = i; vsync(); set_color(0, &c); } If you just want to fade in the entire screen, though, try using the fade_in() function, which does all the work for you (look at the demo game for an example of how it is used). /* * Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ * Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'. */