source: trunk/src/ddraw/new/divewrap.h@ 10367

Last change on this file since 10367 was 3345, checked in by mike, 25 years ago

Experimental fullscreen DDraw

File size: 6.9 KB
Line 
1/* $Id: divewrap.h,v 1.1 2000-04-07 18:21:12 mike Exp $ */
2
3/*
4 * Wrapper for DIVE functions calls
5 *
6 * Copyright 1999 Markus Montkowski
7 *
8 * Project Odin Software License can be found in LICENSE.TXT
9 *
10 */
11
12
13#ifndef __DIVEWRAP_H__
14 #define __DIVEWRAP_H__
15
16 #define INCL_MM_OS2
17 #include <os2sel.h>
18 #include <dive.h>
19
20 inline ULONG APIENTRY _DiveQueryCaps ( PDIVE_CAPS a,
21 ULONG b )
22 {
23 ULONG yyrc;
24 USHORT sel = RestoreOS2FS();
25
26 yyrc = DiveQueryCaps(a, b);
27 SetFS(sel);
28
29 return yyrc;
30 }
31 #undef DiveQueryCaps
32 #define DiveQueryCaps _DiveQueryCaps
33
34 inline ULONG APIENTRY _DiveOpen ( HDIVE *a,
35 BOOL b,
36 PVOID c )
37 {
38 ULONG yyrc;
39 USHORT sel = RestoreOS2FS();
40
41 yyrc = DiveOpen(a, b, c);
42 SetFS(sel);
43
44 return yyrc;
45 }
46 #undef DiveOpen
47 #define DiveOpen _DiveOpen
48
49 inline ULONG APIENTRY _DiveSetupBlitter ( HDIVE a,
50 PSETUP_BLITTER b )
51 {
52 ULONG yyrc;
53 USHORT sel = RestoreOS2FS();
54
55 yyrc = DiveSetupBlitter(a, b);
56 SetFS(sel);
57
58 return yyrc;
59 }
60 #undef DiveSetupBlitter
61 #define DiveSetupBlitter _DiveSetupBlitter
62
63 inline ULONG APIENTRY _DiveBlitImage ( HDIVE a,
64 ULONG b,
65 ULONG c )
66 {
67 ULONG yyrc;
68 USHORT sel = RestoreOS2FS();
69
70 yyrc = DiveBlitImage(a, b, c);
71 SetFS(sel);
72
73 return yyrc;
74 }
75 #undef DiveBlitImage
76 #define DiveBlitImage _DiveBlitImage
77
78 inline ULONG APIENTRY _DiveBlitImageLines ( HDIVE a,
79 ULONG b,
80 ULONG c,
81 PBYTE d )
82 {
83 ULONG yyrc;
84 USHORT sel = RestoreOS2FS();
85
86 yyrc = DiveBlitImageLines(a, b, c, d);
87 SetFS(sel);
88
89 return yyrc;
90 }
91 #undef DiveBlitImageLines
92 #define DiveBlitImageLines _DiveBlitImageLines
93
94 inline ULONG APIENTRY _DiveClose ( HDIVE a )
95 {
96 ULONG yyrc;
97 USHORT sel = RestoreOS2FS();
98
99 yyrc = DiveClose(a);
100 SetFS(sel);
101
102 return yyrc;
103 }
104 #undef DiveClose
105 #define DiveClose _DiveClose
106
107 inline ULONG APIENTRY _DiveAcquireFrameBuffer ( HDIVE a,
108 PRECTL b )
109 {
110 ULONG yyrc;
111 USHORT sel = RestoreOS2FS();
112
113 yyrc = DiveAcquireFrameBuffer(a, b);
114 SetFS(sel);
115
116 return yyrc;
117 }
118 #undef DiveAcquireFrameBuffer
119 #define DiveAcquireFrameBuffer _DiveAcquireFrameBuffer
120
121 inline ULONG APIENTRY _DiveSwitchBank ( HDIVE a,
122 ULONG b )
123 {
124 ULONG yyrc;
125 USHORT sel = RestoreOS2FS();
126
127 yyrc = DiveSwitchBank(a, b);
128 SetFS(sel);
129
130 return yyrc;
131 }
132 #undef DiveSwitchBank
133 #define DiveSwitchBank _DiveSwitchBank
134
135 inline ULONG APIENTRY _DiveDeacquireFrameBuffer ( HDIVE a )
136 {
137 ULONG yyrc;
138 USHORT sel = RestoreOS2FS();
139
140 yyrc = DiveDeacquireFrameBuffer(a);
141 SetFS(sel);
142
143 return yyrc;
144 }
145 #undef DiveDeacquireFrameBuffer
146 #define DiveDeacquireFrameBuffer _DiveDeacquireFrameBuffer
147
148 inline ULONG APIENTRY _DiveCalcFrameBufferAddress ( HDIVE a,
149 PRECTL b,
150 PBYTE *c,
151 PULONG d,
152 PULONG e )
153 {
154 ULONG yyrc;
155 USHORT sel = RestoreOS2FS();
156
157 yyrc = DiveCalcFrameBufferAddress(a, b, c, d, e);
158 SetFS(sel);
159
160 return yyrc;
161 }
162 #undef DiveCalcFrameBufferAddress
163 #define DiveCalcFrameBufferAddress _DiveCalcFrameBufferAddress
164
165 inline ULONG APIENTRY _DiveAllocImageBuffer ( HDIVE a,
166 PULONG b,
167 FOURCC c,
168 ULONG d,
169 ULONG e,
170 ULONG f,
171 PBYTE g )
172 {
173 ULONG yyrc;
174 USHORT sel = RestoreOS2FS();
175
176 yyrc = DiveAllocImageBuffer(a, b, c, d, e, f, g);
177 SetFS(sel);
178
179 return yyrc;
180 }
181 #undef DiveAllocImageBuffer
182 #define DiveAllocImageBuffer _DiveAllocImageBuffer
183
184 inline ULONG APIENTRY _DiveFreeImageBuffer ( HDIVE a,
185 ULONG b )
186 {
187 ULONG yyrc;
188 USHORT sel = RestoreOS2FS();
189
190 yyrc = DiveFreeImageBuffer(a, b);
191 SetFS(sel);
192
193 return yyrc;
194 }
195 #undef DiveFreeImageBuffer
196 #define DiveFreeImageBuffer _DiveFreeImageBuffer
197
198 inline ULONG APIENTRY _DiveBeginImageBufferAccess ( HDIVE a,
199 ULONG b,
200 PBYTE *c,
201 PULONG d,
202 PULONG e )
203 {
204 ULONG yyrc;
205 USHORT sel = RestoreOS2FS();
206
207 yyrc = DiveBeginImageBufferAccess(a, b, c, d, e);
208 SetFS(sel);
209
210 return yyrc;
211 }
212 #undef DiveBeginImageBufferAccess
213 #define DiveBeginImageBufferAccess _DiveBeginImageBufferAccess
214
215 inline ULONG APIENTRY _DiveEndImageBufferAccess ( HDIVE a,
216 ULONG b )
217 {
218 ULONG yyrc;
219 USHORT sel = RestoreOS2FS();
220
221 yyrc = DiveEndImageBufferAccess(a, b);
222 SetFS(sel);
223
224 return yyrc;
225 }
226 #undef DiveEndImageBufferAccess
227 #define DiveEndImageBufferAccess _DiveEndImageBufferAccess
228
229 inline ULONG APIENTRY _DiveSetDestinationPalette ( HDIVE a,
230 ULONG b,
231 ULONG c,
232 PBYTE d )
233 {
234 ULONG yyrc;
235 USHORT sel = RestoreOS2FS();
236
237 yyrc = DiveSetDestinationPalette(a, b, c, d);
238 SetFS(sel);
239
240 return yyrc;
241 }
242 #undef DiveSetDestinationPalette
243 #define DiveSetDestinationPalette _DiveSetDestinationPalette
244
245 inline ULONG APIENTRY _DiveSetSourcePalette ( HDIVE a,
246 ULONG b,
247 ULONG c,
248 PBYTE d )
249 {
250 ULONG yyrc;
251 USHORT sel = RestoreOS2FS();
252
253 yyrc = DiveSetSourcePalette(a, b, c, d);
254 SetFS(sel);
255
256 return yyrc;
257 }
258 #undef DiveSetSourcePalette
259 #define DiveSetSourcePalette _DiveSetSourcePalette
260
261 inline ULONG APIENTRY _DiveSetTransparentBlitMode ( HDIVE a,
262 ULONG b,
263 ULONG c,
264 ULONG d )
265 {
266 ULONG yyrc;
267 USHORT sel = RestoreOS2FS();
268
269 yyrc = DiveSetTransparentBlitMode(a, b, c, d);
270 SetFS(sel);
271
272 return yyrc;
273 }
274 #undef DiveSetTransparentBlitMode
275 #define DiveSetTransparentBlitMode _DiveSetTransparentBlitMode
276
277
278#endif
Note: See TracBrowser for help on using the repository browser.