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