source: trunk/src/ddraw/divewrap.h@ 478

Last change on this file since 478 was 422, checked in by hugh, 26 years ago

Created DIVEWRAp.h to presewrve FS selector

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