]> icculus.org git repositories - btb/d2x.git/blob - include/palette.h
enable -nofade
[btb/d2x.git] / include / palette.h
1 /* $Id: palette.h,v 1.3 2002-10-11 03:37:58 btb Exp $ */
2 /*
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.
13 */
14 /*
15  *
16  * Protoypes for palette functions
17  *
18  * Old Log:
19  * Revision 1.11  1994/11/15  17:55:10  john
20  * Made text palette fade in when game over.
21  *
22  * Revision 1.10  1994/11/07  13:53:42  john
23  * Added better gamma stufff.
24  *
25  * Revision 1.9  1994/11/07  13:38:03  john
26  * Added gamma correction stuff.
27  *
28  * Revision 1.8  1994/11/05  13:05:59  john
29  * Added back in code to allow keys during fade.
30  *
31  * Revision 1.7  1994/11/05  12:46:37  john
32  * Changed palette stuff a bit.
33  *
34  * Revision 1.6  1994/09/22  16:08:37  john
35  * Fixed some palette stuff.
36  *
37  * Revision 1.5  1994/08/09  11:27:04  john
38  * Add cthru stuff.
39  *
40  * Revision 1.4  1994/06/09  10:39:33  john
41  * In fade out.in functions, returned 1 if key was pressed...
42  *
43  * Revision 1.3  1994/05/31  19:04:24  john
44  * Added key to stop fade if desired.
45  *
46  * Revision 1.2  1994/05/06  12:50:42  john
47  * Added supertransparency; neatend things up; took out warnings.
48  *
49  * Revision 1.1  1994/05/04  14:59:57  john
50  * Initial revision
51  *
52  *
53  */
54
55
56 #ifndef _PALETTE_H
57 #define _PALETTE_H
58
59 #define DEFAULT_LEVEL_PALETTE "groupa.256" //don't confuse with DEFAULT_PALETTE
60
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 int gr_find_closest_color_current( int r, int g, int b );
71 extern void gr_palette_read(ubyte * palette);
72 extern void init_computed_colors(void);
73
74 extern ubyte gr_palette_gamma;
75 extern ubyte gr_current_pal[256*3];
76
77 #ifdef D1XD3D
78 typedef ubyte PALETTE [256 * 3];
79 extern void DoSetPalette (PALETTE *pPal);
80 #endif
81
82 #endif