]> icculus.org git repositories - btb/d2x.git/blob - include/grdef.h
add g3_uninit_polygon_model (doesn't do anything)
[btb/d2x.git] / include / grdef.h
1 /* $Id: grdef.h,v 1.10 2004-08-28 23:17:45 schaffner 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  *
17  * Internal definitions for graphics lib.
18  *
19  */
20
21 void gr_init_bitmap_alloc( grs_bitmap *bm, int mode, int x, int y, int w, int h, int bytesperline);
22 void gr_init_sub_bitmap (grs_bitmap *bm, grs_bitmap *bmParent, int x, int y, int w, int h );
23 void gr_init_bitmap( grs_bitmap *bm, int mode, int x, int y, int w, int h, int bytesperline, unsigned char * data );
24
25 extern void gr_set_buffer(int w, int h, int r, int (*buffer_func)());
26
27 extern void gr_pal_setblock( int start, int n, unsigned char * palette );
28 extern void gr_pal_getblock( int start, int n, unsigned char * palette );
29 extern void gr_pal_setone( int index, unsigned char red, unsigned char green, unsigned char blue );
30
31 void gr_linear_movsb( ubyte * source, ubyte * dest, int nbytes);
32 void gr_linear_movsw( ubyte * source, ubyte * dest, int nbytes);
33 void gr_linear_stosd( ubyte * dest, unsigned char color, unsigned int nbytes);
34
35 extern unsigned int gr_var_color;
36 extern unsigned int gr_var_bwidth;
37 extern unsigned char * gr_var_bitmap;
38
39 void gr_linear_movsd( ubyte * source, ubyte * dest, unsigned int nbytes);
40 void gr_linear_rep_movsd_2x(ubyte *source, ubyte *dest, unsigned int nbytes);
41
42 void gr_linear_line( int x0, int y0, int x1, int y1);
43
44 extern unsigned int Table8to32[256];
45
46 #ifdef __MSDOS__
47 extern unsigned char * gr_video_memory;
48 #endif
49
50
51 #define MINX    0
52 #define MINY    0
53 #define MAXX    (GWIDTH-1)
54 #define MAXY    (GHEIGHT-1)
55 #define TYPE    grd_curcanv->cv_bitmap.bm_type
56 #define DATA    grd_curcanv->cv_bitmap.bm_data
57 #define XOFFSET grd_curcanv->cv_bitmap.bm_x
58 #define YOFFSET grd_curcanv->cv_bitmap.bm_y
59 #define ROWSIZE grd_curcanv->cv_bitmap.bm_rowsize
60 #define COLOR   grd_curcanv->cv_color
61
62 void order( int *x1, int *x2 );