]> icculus.org git repositories - btb/d2x.git/blob - include/palette.h
This commit was generated by cvs2svn to compensate for changes in r2,
[btb/d2x.git] / include / palette.h
1 /*
2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
11 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13 /*
14  * $Source: /cvs/cvsroot/d2x/include/palette.h,v $
15  * $Revision: 1.1.1.1 $
16  * $Author: bradleyb $
17  * $Date: 2001-01-19 03:30:16 $
18  * 
19  * Protoypes for palette functions
20  * 
21  * $Log: not supported by cvs2svn $
22  * Revision 1.1.1.1  1999/06/14 22:02:19  donut
23  * Import of d1x 1.37 source.
24  *
25  * Revision 1.11  1994/11/15  17:55:10  john
26  * Made text palette fade in when game over.
27  * 
28  * Revision 1.10  1994/11/07  13:53:42  john
29  * Added better gamma stufff.
30  * 
31  * Revision 1.9  1994/11/07  13:38:03  john
32  * Added gamma correction stuff.
33  * 
34  * Revision 1.8  1994/11/05  13:05:59  john
35  * Added back in code to allow keys during fade.
36  * 
37  * Revision 1.7  1994/11/05  12:46:37  john
38  * Changed palette stuff a bit.
39  * 
40  * Revision 1.6  1994/09/22  16:08:37  john
41  * Fixed some palette stuff.
42  * 
43  * Revision 1.5  1994/08/09  11:27:04  john
44  * Add cthru stuff.
45  * 
46  * Revision 1.4  1994/06/09  10:39:33  john
47  * In fade out.in functions, returned 1 if key was pressed...
48  * 
49  * Revision 1.3  1994/05/31  19:04:24  john
50  * Added key to stop fade if desired.
51  * 
52  * Revision 1.2  1994/05/06  12:50:42  john
53  * Added supertransparency; neatend things up; took out warnings.
54  * 
55  * Revision 1.1  1994/05/04  14:59:57  john
56  * Initial revision
57  * 
58  * 
59  */
60
61
62
63 #ifndef _PALETTE_H
64 #define _PALETTE_H
65
66 extern void gr_palette_set_gamma( int gamma );
67 extern int gr_palette_get_gamma();
68 extern ubyte gr_palette_faded_out;
69 extern void gr_palette_clear();
70 extern int gr_palette_fade_out(ubyte *pal, int nsteps, int allow_keys );
71 extern int gr_palette_fade_in(ubyte *pal,int nsteps, int allow_keys );
72 extern void gr_palette_load( ubyte * pal );
73 extern void gr_make_cthru_table(ubyte * table, ubyte r, ubyte g, ubyte b );
74 extern int gr_find_closest_color_current( int r, int g, int b );
75 extern void gr_palette_read(ubyte * palette);
76 extern void init_computed_colors(void);
77
78
79
80 extern ubyte gr_palette_gamma;
81 extern ubyte gr_current_pal[256*3];
82
83 #ifdef D1XD3D
84 typedef ubyte PALETTE [256 * 3];
85 extern void DoSetPalette (PALETTE *pPal);
86 #endif
87
88 #endif