]> icculus.org git repositories - btb/d2x.git/blob - include/grdef.h
fix debian menu
[btb/d2x.git] / include / grdef.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/grdef.h,v $
15  * $Revision: 1.3 $
16  * $Author: bradleyb $
17  * $Date: 2002-02-15 12:21:45 $
18  *
19  * Internal definitions for graphics lib.
20  *
21  * $Log: not supported by cvs2svn $
22  * Revision 1.2  2001/11/14 10:31:40  bradleyb
23  * change __ENV_WINDOWS__ to __WINDOWS__, __ENV_MSDOS__ to __MSDOS__
24  *
25  * Revision 1.1.1.2  2001/01/19 03:34:09  bradleyb
26  * Import of d2x-0.0.9-pre1
27  *
28  * Revision 1.2  1999/11/20 10:05:16  donut
29  * variable size menu patch from Jan Bobrowski.  Variable menu font size support and a bunch of fixes for menus that didn't work quite right, by me (MPM).
30  *
31  * Revision 1.1.1.1  1999/06/14 22:02:14  donut
32  * Import of d1x 1.37 source.
33  *
34  * Revision 1.5  1995/09/14  15:36:33  allender
35  * added stuff for 68k version
36  *
37  * Revision 1.4  1995/07/05  16:10:57  allender
38  * gr_linear_movsd prototype changes
39  *
40  * Revision 1.3  1995/04/19  14:39:28  allender
41  * changed function prototype
42  *
43  * Revision 1.2  1995/04/18  09:49:53  allender
44  * *** empty log message ***
45  *
46  * Revision 1.1  1995/03/09  09:04:56  allender
47  * Initial revision
48  *
49  *
50  * --- PC RCS information ---
51  * Revision 1.8  1994/05/06  12:50:09  john
52  * Added supertransparency; neatend things up; took out warnings.
53  * 
54  * Revision 1.7  1994/01/25  11:40:29  john
55  * Added gr_check_mode function.
56  * 
57  * Revision 1.6  1993/10/15  16:22:53  john
58  * y
59  * 
60  * Revision 1.5  1993/09/29  17:31:00  john
61  * added gr_vesa_pixel
62  * 
63  * Revision 1.4  1993/09/29  16:14:43  john
64  * added global canvas descriptors.
65  * 
66  * Revision 1.3  1993/09/08  17:38:02  john
67  * Looking for errors
68  * 
69  * Revision 1.2  1993/09/08  15:54:29  john
70  * *** empty log message ***
71  * 
72  * Revision 1.1  1993/09/08  11:37:57  john
73  * Initial revision
74  * 
75  *
76  */
77 #define USE_2D_ASM 1
78  
79 void gr_init_bitmap_alloc( grs_bitmap *bm, int mode, int x, int y, int w, int h, int bytesperline);
80 void show_fullscr(grs_bitmap *bm);
81 void gr_init_sub_bitmap (grs_bitmap *bm, grs_bitmap *bmParent, int x, int y, int w, int h );
82 void gr_init_bitmap( grs_bitmap *bm, int mode, int x, int y, int w, int h, int bytesperline, unsigned char * data );
83
84 extern void gr_set_buffer(int w, int h, int r, int (*buffer_func)());
85
86 extern void gr_pal_setblock( int start, int n, unsigned char * palette );
87 extern void gr_pal_getblock( int start, int n, unsigned char * palette );
88 extern void gr_pal_setone( int index, unsigned char red, unsigned char green, unsigned char blue );
89
90 void gr_linear_movsb( ubyte * source, ubyte * dest, int nbytes);
91 void gr_linear_movsw( ubyte * source, ubyte * dest, int nbytes);
92 #if ( defined(__MWERKS__) && defined(__MC68K__) && defined(USE_2D_ASM) )
93 void gr_linear_movsd(ubyte * src:__A0, ubyte * dest:__A1, uint num_pixels:__D0 );
94 #else
95 void gr_linear_movsd( ubyte * source, ubyte * dest, unsigned int nbytes);
96 #endif
97 void gr_linear_rep_movsd_2x( ubyte * source, ubyte * dest, uint nbytes);
98 void gr_linear_stosd( ubyte * dest, unsigned char color, unsigned int nbytes);
99 extern unsigned int gr_var_color;
100 extern unsigned int gr_var_bwidth;
101 extern unsigned char * gr_var_bitmap;
102
103 void gr_linear_line( int x0, int y0, int x1, int y1);
104
105 extern unsigned int Table8to32[256];
106
107 #ifdef __DJGPP__
108 extern unsigned char * gr_video_memory;
109 #endif
110
111
112 #define MINX    0
113 #define MINY    0
114 #define MAXX    (GWIDTH-1)
115 #define MAXY    (GHEIGHT-1)
116 #define TYPE    grd_curcanv->cv_bitmap.bm_type
117 #define DATA    grd_curcanv->cv_bitmap.bm_data
118 #define XOFFSET grd_curcanv->cv_bitmap.bm_x
119 #define YOFFSET grd_curcanv->cv_bitmap.bm_y
120 #define ROWSIZE grd_curcanv->cv_bitmap.bm_rowsize
121 #define COLOR   grd_curcanv->cv_color
122
123 void order( int *x1, int *x2 );