1 /*
2 
3 Copyright (C) 2015-2018 Night Dive Studios, LLC.
4 
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 
18 */
19 /*
20  * $Source: n:/project/lib/src/2d/RCS/grcbm.h $
21  * $Revision: 1.1 $
22  * $Author: kevin $
23  * $Date: 1994/03/15 13:09:57 $
24  *
25  * Dispatch macros for bitmap draw functions.
26  *
27  * This file is part of the 2d library.
28  *
29  * $Log: grcbm.h $
30  * Revision 1.1  1994/03/15  13:09:57  kevin
31  * Initial revision
32  *
33  * Revision 1.5  1993/12/01  21:27:36  baf
34  * Added macros for translucent/8 bitmaps.
35  *
36  * Revision 1.4  1993/10/19  10:15:22  kaboom
37  * Now includes tabdat.h.
38  *
39  * Revision 1.3  1993/10/08  01:15:59  kaboom
40  * Changed quotes in #include liness to angle brackets for Watcom problem.
41  *
42  * Revision 1.2  1993/09/02  20:10:45  kaboom
43  * Added macros for flat 24 bitmap routines.
44  *
45  * Revision 1.1  1993/04/29  18:35:50  kaboom
46  * Initial revision
47  */
48 
49 #ifndef __GRCBM_H
50 #define __GRCBM_H
51 #include "icanvas.h"
52 #include "tabdat.h"
53 
54 /* bitmap draw routines. */
55 #define gr_clut_ubitmap(bm,x,y,cl) \
56    ((void (*)(grs_bitmap *_bm,short _x,short _y, uchar *_cl)) \
57    grd_canvas_table[CLUT_DRAW_DEVICE_UBITMAP+2*((bm)->type)])(bm,x,y,cl)
58 #define gr_clut_bitmap(bm,x,y,cl) \
59    ((int (*)(grs_bitmap *_bm,short _x,short _y, uchar *_cl)) \
60    grd_canvas_table[CLUT_DRAW_DEVICE_BITMAP+2*((bm)->type)])(bm,x,y,cl)
61 
62 #define gr_mono_clut_ubitmap \
63    ((void (*)(grs_bitmap *bm,short x,short y,uchar *cl)) \
64    grd_canvas_table[CLUT_DRAW_MONO_UBITMAP])
65 #define gr_mono_clut_bitmap \
66    ((int (*)(grs_bitmap *bm,short x,short y,uchar *cl)) \
67    grd_canvas_table[CLUT_DRAW_MONO_BITMAP])
68 #define gr_flat8_clut_ubitmap \
69    ((void (*)(grs_bitmap *bm,short x,short y,uchar *cl)) \
70    grd_canvas_table[CLUT_DRAW_FLAT8_UBITMAP])
71 #define gr_flat8_clut_bitmap \
72    ((int (*)(grs_bitmap *bm,short x,short y,uchar *cl)) \
73    grd_canvas_table[CLUT_DRAW_FLAT8_BITMAP])
74 #define gr_flat24_clut_ubitmap \
75    ((void (*)(grs_bitmap *bm,short x,short y,uchar *cl)) \
76    grd_canvas_table[CLUT_DRAW_FLAT24_UBITMAP])
77 #define gr_flat24_clut_bitmap \
78    ((int (*)(grs_bitmap *bm,short x,short y,uchar *cl)) \
79    grd_canvas_table[CLUT_DRAW_FLAT24_BITMAP])
80 #define gr_rsd8_clut_ubitmap \
81    ((void (*)(grs_bitmap *bm,short x,short y,uchar *cl)) \
82    grd_canvas_table[CLUT_DRAW_RSD8_UBITMAP])
83 #define gr_rsd8_clut_bitmap \
84    ((int (*)(grs_bitmap *bm,short x,short y,uchar *cl)) \
85    grd_canvas_table[CLUT_DRAW_RSD8_BITMAP])
86 #define gr_tluc8_clut_ubitmap \
87    ((void (*)(grs_bitmap *bm,short x,short y,uchar *cl)) \
88    grd_canvas_table[CLUT_DRAW_TLUC8_UBITMAP])
89 #define gr_tluc8_clut_bitmap \
90    ((int (*)(grs_bitmap *bm,short x,short y,uchar *cl)) \
91    grd_canvas_table[CLUT_DRAW_TLUC8_BITMAP])
92 #endif /* !__GRDBM_H */
93