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/general.c $
21 * $Revision: 1.23 $
22 * $Author: unknown $
23 * $Date: 1993/04/08 16:25:15 $
24 *
25 * Generic primitive drawing routines.
26 *
27 * This file is part of the 2d library.
28 *
29 * $Log: general.c $
30 * Revision 1.23 1993/04/08 16:25:15 unknown
31 * Took out dummy functions for strings.
32 *
33 * Revision 1.22 1993/03/29 18:30:17 kaboom
34 * Removed dummy functions for concave polygons.
35 *
36 * Revision 1.21 1993/03/03 17:54:53 kaboom
37 * Removed stubs for gen_int_{u}disk().
38 *
39 * Revision 1.20 1993/02/25 12:58:40 kaboom
40 * Removed stubs for Gouraud shaders.
41 *
42 * Revision 1.19 1993/02/16 15:41:38 kaboom
43 * Moved the rest of the primitive routines to other files.
44 *
45 * Revision 1.18 1993/02/04 17:17:24 kaboom
46 * Moved many functions into other files. Added functab entries for cpoly.
47 *
48 * Revision 1.14 1993/01/11 17:58:25 matt
49 * Added gr_int_spoly() (code in gour.c)
50 *
51 * Revision 1.13 1993/01/07 21:06:50 kaboom
52 * Updated references to dr_xxx to grd_xxx. Updated faux function table
53 * with init_driver entry.
54 *
55 * Revision 1.10 1992/12/30 15:13:40 kaboom
56 * Removed calc_vram() and calc_row(), reserved for drivers. Removed
57 * function table, reserved for drivers.
58 *
59 * Revision 1.9 1992/12/14 18:13:37 kaboom
60 * Changed NULL table entries to gr_null.
61 *
62 * Revision 1.8 1992/12/11 20:30:42 kaboom
63 * Added slots in function table for wait_display and sub_bm functions.
64 *
65 * Revision 1.4 1992/11/12 13:27:20 kaboom
66 * Removed gen_bitmap and gen_ubitmap. The dispatching is now done from
67 * the actual gr_bitmap macro.
68 *
69 * Revision 1.3 1992/10/21 15:54:04 kaboom
70 * Added function blanks for additional driver functions, including fixed-
71 * point and integral versions of many functions and general, convex and
72 * concave polygon functions. Updated 2d structure prefix from gr_ to be
73 * grs_.
74 *
75 * Revision 1.1 1992/10/10 12:00:00 kaboom
76 * Initial revision.
77 */
78
gen_fix_ucircle(void)79 void gen_fix_ucircle (void)
80 {
81 }
82
gen_fix_circle(void)83 void gen_fix_circle (void)
84 {
85 }
86
gen_fix_udisk(void)87 void gen_fix_udisk (void)
88 {
89 }
90
gen_fix_disk(void)91 void gen_fix_disk (void)
92 {
93 }
94
gen_int_urod(void)95 void gen_int_urod (void)
96 {
97 }
98
gen_int_rod(void)99 void gen_int_rod (void)
100 {
101 }
102
gen_fix_urod(void)103 void gen_fix_urod (void)
104 {
105 }
106
gen_fix_rod(void)107 void gen_fix_rod (void)
108 {
109 }
110
111 //int gen_flat24_ubitmap (grs_bitmap *bm, short x, short y)
112 //void gen_flat24_ubitmap (grs_bitmap *bm, short x, short y)
113
114 #ifdef INCLUDE_GEN_FUNC_TABLES
115 void (*gen_func[grd_FUNCS])() = {
116 gr_null, /* set_upixel */
117 gr_null, /* set_pixel */
118 gr_null, /* get_upixel */
119 gr_null, /* get_pixel */
120
121 gen_clear,
122 gen_upoint,
123 gen_point,
124 gen_uhline,
125 gen_hline,
126 gen_uvline,
127 gen_vline,
128 gen_urect,
129 gen_rect,
130 gen_ubox,
131 gen_box,
132
133 gen_fix_uline,
134 gen_fix_line,
135 gen_fix_upoly,
136 gen_fix_poly,
137 gen_fix_uspoly,
138 gen_fix_spoly,
139 gen_fix_ucpoly,
140 gen_fix_cpoly,
141 gen_fix_utmap,
142 gen_fix_tmap,
143
144 gen_int_ucircle,
145 gen_int_circle,
146 gen_fix_ucircle,
147 gen_fix_circle,
148 gen_int_udisk,
149 gen_int_disk,
150 gen_fix_udisk,
151 gen_fix_disk,
152 gen_int_urod,
153 gen_int_rod,
154 gen_fix_urod,
155 gen_fix_rod,
156
157 /* bitmap drawing functions. */
158 gr_null, /* draw bitmap device->device */
159 gr_null,
160 gen_mono_ubitmap,
161 gen_mono_bitmap,
162 gen_flat8_ubitmap,
163 gen_flat8_bitmap,
164 gr_null, /* draw 24 bit */
165 gr_null,
166 gen_rsd8_ubitmap,
167 gen_rsd8_bitmap,
168
169 /* bitmap get functions. */
170 gr_null, /* get bitmap device->device */
171 gr_null,
172 gr_null, /* get mono bitmap */
173 gr_null,
174 gen_get_flat8_ubitmap,
175 gen_get_flat8_bitmap,
176 gr_null, /* get 24 bit bitmap */
177 gr_null,
178 gr_null, /* get rsd8 bitmap */
179 gr_null,
180
181 /* bitmap transform functions. */
182 gen_scale_ubitmap,
183 gen_scale_bitmap,
184 gen_roll_ubitmap,
185 gen_roll_bitmap,
186
187 /* text/font functions. */
188 gen_ustring,
189 gen_string,
190
191 /* span drawing functions. */
192 gen_solid_lr,
193 gen_opaque_lrpp,
194 gr_null, /* draw_lrii */
195 gr_null, /* draw_lrcc */
196
197 /* device functions. */
198 gr_null, /* init_driver */
199 gr_null, /* init_screen */
200 gr_null, /* save_mode */
201 gr_null, /* rest_mode */
202 gr_null, /* calc_row */
203 gr_null, /* calc_vram */
204 gr_null, /* wait_vsync */
205 gr_null, /* wait_display */
206 gr_null, /* sub_bm */
207 gr_null, /* cut_screen */
208 gr_null, /* set_pal */
209 gr_null /* get_pal */
210 };
211 #endif /* INCLUDE_GEN_FUNC_TABLES */
212