1 /* $Id: palette.h,v 1.4 2004-05-12 22:06:02 btb Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
16 * Protoypes for palette functions
19 * Revision 1.11 1994/11/15 17:55:10 john
20 * Made text palette fade in when game over.
22 * Revision 1.10 1994/11/07 13:53:42 john
23 * Added better gamma stufff.
25 * Revision 1.9 1994/11/07 13:38:03 john
26 * Added gamma correction stuff.
28 * Revision 1.8 1994/11/05 13:05:59 john
29 * Added back in code to allow keys during fade.
31 * Revision 1.7 1994/11/05 12:46:37 john
32 * Changed palette stuff a bit.
34 * Revision 1.6 1994/09/22 16:08:37 john
35 * Fixed some palette stuff.
37 * Revision 1.5 1994/08/09 11:27:04 john
40 * Revision 1.4 1994/06/09 10:39:33 john
41 * In fade out.in functions, returned 1 if key was pressed...
43 * Revision 1.3 1994/05/31 19:04:24 john
44 * Added key to stop fade if desired.
46 * Revision 1.2 1994/05/06 12:50:42 john
47 * Added supertransparency; neatend things up; took out warnings.
49 * Revision 1.1 1994/05/04 14:59:57 john
59 #define DEFAULT_LEVEL_PALETTE "groupa.256" //don't confuse with DEFAULT_PALETTE
61 extern void gr_palette_set_gamma( int gamma );
62 extern int gr_palette_get_gamma();
63 extern ubyte gr_palette_faded_out;
64 extern int grd_fades_disabled;
65 extern void gr_palette_clear();
66 extern int gr_palette_fade_out(ubyte *pal, int nsteps, int allow_keys );
67 extern int gr_palette_fade_in(ubyte *pal,int nsteps, int allow_keys );
68 extern void gr_palette_load( ubyte * pal );
69 extern void gr_make_cthru_table(ubyte * table, ubyte r, ubyte g, ubyte b );
70 extern void gr_make_blend_table(ubyte *blend_table, ubyte r, ubyte g, ubyte b);
71 extern int gr_find_closest_color_current( int r, int g, int b );
72 extern void gr_palette_read(ubyte * palette);
73 extern void init_computed_colors(void);
75 extern ubyte gr_palette_gamma;
76 extern ubyte gr_current_pal[256*3];
79 typedef ubyte PALETTE [256 * 3];
80 extern void DoSetPalette (PALETTE *pPal);