Replace 0x%p with %p.
[wine] / include / d3d8types.h
1 /*
2  * Copyright (C) 2002 Jason Edmeades
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef __WINE_D3D8TYPES_H
20 #define __WINE_D3D8TYPES_H
21
22
23 /*****************************************************************************
24  * Direct 3D v8 #defines
25  */
26
27 #define D3DCLEAR_TARGET   1
28 #define D3DCLEAR_ZBUFFER  2
29 #define D3DCLEAR_STENCIL  4
30
31 #define D3DCLIPPLANE0 (1 << 0)
32 #define D3DCLIPPLANE1 (1 << 1)
33 #define D3DCLIPPLANE2 (1 << 2)
34 #define D3DCLIPPLANE3 (1 << 3)
35 #define D3DCLIPPLANE4 (1 << 4)
36 #define D3DCLIPPLANE5 (1 << 5)
37
38 #define D3DCOLOR_ARGB(a,r,g,b)        ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
39 #define D3DCOLOR_COLORVALUE(r,g,b,a)  D3DCOLOR_RGBA((DWORD)((r)*255.f),(DWORD)((g)*255.f),(DWORD)((b)*255.f),(DWORD)((a)*255.f))
40 #define D3DCOLOR_RGBA(r,g,b,a)        D3DCOLOR_ARGB(a,r,g,b)
41 #define D3DCOLOR_XRGB(r,g,b)          D3DCOLOR_ARGB(0xff,r,g,b)
42
43 #define D3DCOLORWRITEENABLED_RED     1
44 #define D3DCOLORWRITEENABLED_GREEN   2
45 #define D3DCOLORWRITEENABLED_BLUE    4
46 #define D3DCOLORWRITEENABLED_ALPHA   8
47
48 #define D3DCS_LEFT                 0x001
49 #define D3DCS_RIGHT                0x002
50 #define D3DCS_TOP                  0x004
51 #define D3DCS_BOTTOM               0x008
52 #define D3DCS_FRONT                0x010
53 #define D3DCS_BACK                 0x020
54 #define D3DCS_PLANE0               0x040
55 #define D3DCS_PLANE1               0x080
56 #define D3DCS_PLANE2               0x100
57 #define D3DCS_PLANE3               0x200
58 #define D3DCS_PLANE4               0x400
59 #define D3DCS_PLANE5               0x800
60 #define D3DCS_ALL                  0xFFF
61
62 #define D3DFVF_TEXTUREFORMAT1 3
63 #define D3DFVF_TEXTUREFORMAT2 0
64 #define D3DFVF_TEXTUREFORMAT3 1
65 #define D3DFVF_TEXTUREFORMAT4 2
66 #define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))
67 #define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2)
68 #define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))
69 #define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
70
71 #define D3DLOCK_READONLY           0x0010
72 #define D3DLOCK_NOSYSLOCK          0x0800
73 #define D3DLOCK_NOOVERWRITE        0x1000
74 #define D3DLOCK_DISCARD            0x2000
75 #define D3DLOCK_NO_DIRTY_UPDATE    0x8000
76
77 #define D3DMAXUSERCLIPPLANES       32
78
79 #define D3DRENDERSTATE_WRAPBIAS    0x80
80
81 #define D3DTSS_TCI_PASSTHRU                       0x00000
82 #define D3DTSS_TCI_CAMERASPACENORMAL              0x10000
83 #define D3DTSS_TCI_CAMERASPACEPOSITION            0x20000
84 #define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR    0x30000
85
86
87 #define D3DTS_WORLD  D3DTS_WORLDMATRIX(0)
88 #define D3DTS_WORLD1 D3DTS_WORLDMATRIX(1)
89 #define D3DTS_WORLD2 D3DTS_WORLDMATRIX(2)
90 #define D3DTS_WORLD3 D3DTS_WORLDMATRIX(3)
91 #define D3DTS_WORLDMATRIX(index) (D3DTRANSFORMSTATETYPE)(index + 256)
92
93 #define D3DUSAGE_RENDERTARGET       0x01
94 #define D3DUSAGE_DEPTHSTENCIL       0x02
95 #define D3DUSAGE_WRITEONLY          0x08
96 #define D3DUSAGE_SOFTWAREPROCESSING 0x10
97 #define D3DUSAGE_DONOTCLIP          0x20
98 #define D3DUSAGE_POINTS             0x40
99 #define D3DUSAGE_RTPATCHES          0x80
100 #define D3DUSAGE_NPATCHES           0x100
101 #define D3DUSAGE_DYNAMIC            0x200
102
103 #define D3DWRAP_U        1
104 #define D3DWRAP_V        2
105 #define D3DWRAP_W        4
106 #define D3DWRAPCOORD_0   1
107 #define D3DWRAPCOORD_1   2
108 #define D3DWRAPCOORD_2   4
109 #define D3DWRAPCOORD_3   8
110
111 #define MAX_DEVICE_IDENTIFIER_STRING        512
112
113 #define D3DFVF_RESERVED0           0x0001
114 #define D3DFVF_POSITION_MASK       0x000E
115 #define D3DFVF_XYZ                 0x0002
116 #define D3DFVF_XYZRHW              0x0004
117 #define D3DFVF_XYZB1               0x0006
118 #define D3DFVF_XYZB2               0x0008
119 #define D3DFVF_XYZB3               0x000a
120 #define D3DFVF_XYZB4               0x000c
121 #define D3DFVF_XYZB5               0x000e
122 #define D3DFVF_NORMAL              0x0010
123 #define D3DFVF_PSIZE               0x0020
124 #define D3DFVF_DIFFUSE             0x0040
125 #define D3DFVF_SPECULAR            0x0080
126 #define D3DFVF_TEXCOUNT_MASK       0x0f00
127 #define D3DFVF_TEXCOUNT_SHIFT           8
128 #define D3DFVF_TEX0                0x0000
129 #define D3DFVF_TEX1                0x0100
130 #define D3DFVF_TEX2                0x0200
131 #define D3DFVF_TEX3                0x0300
132 #define D3DFVF_TEX4                0x0400
133 #define D3DFVF_TEX5                0x0500
134 #define D3DFVF_TEX6                0x0600
135 #define D3DFVF_TEX7                0x0700
136 #define D3DFVF_TEX8                0x0800
137 #define D3DFVF_LASTBETA_UBYTE4     0x1000
138 #define D3DFVF_RESERVED2           0xE000
139
140 #define D3DTA_SELECTMASK        0x0000000f
141 #define D3DTA_DIFFUSE           0x00000000
142 #define D3DTA_CURRENT           0x00000001
143 #define D3DTA_TEXTURE           0x00000002
144 #define D3DTA_TFACTOR           0x00000003
145 #define D3DTA_SPECULAR          0x00000004
146 #define D3DTA_COMPLEMENT        0x00000010
147 #define D3DTA_ALPHAREPLICATE    0x00000020
148 #define D3DTA_TEMP              0x00000005
149
150 #define MAKEFOURCC(ch0, ch1, ch2, ch3)  \
151     ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) |  \
152     ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
153
154 /*****************************************************************************
155  * Direct 3D v8 enumerated types
156  */
157 typedef enum _D3DBACKBUFFER_TYPE {
158     D3DBACKBUFFER_TYPE_MONO         = 0,
159     D3DBACKBUFFER_TYPE_LEFT         = 1,
160     D3DBACKBUFFER_TYPE_RIGHT        = 2,
161
162     D3DBACKBUFFER_TYPE_FORCE_DWORD  = 0x7fffffff
163 } D3DBACKBUFFER_TYPE;
164
165 typedef enum _D3DBASISTYPE{
166    D3DBASIS_BEZIER        = 0,
167    D3DBASIS_BSPLINE       = 1,
168    D3DBASIS_INTERPOLATE   = 2,
169
170    D3DBASIS_FORCE_DWORD   = 0x7fffffff
171 } D3DBASISTYPE;
172
173 typedef enum _D3DBLEND {
174     D3DBLEND_ZERO               =  1,
175     D3DBLEND_ONE                =  2,
176     D3DBLEND_SRCCOLOR           =  3,
177     D3DBLEND_INVSRCCOLOR        =  4,
178     D3DBLEND_SRCALPHA           =  5,
179     D3DBLEND_INVSRCALPHA        =  6,
180     D3DBLEND_DESTALPHA          =  7,
181     D3DBLEND_INVDESTALPHA       =  8,
182     D3DBLEND_DESTCOLOR          =  9,
183     D3DBLEND_INVDESTCOLOR       = 10,
184     D3DBLEND_SRCALPHASAT        = 11,
185     D3DBLEND_BOTHSRCALPHA       = 12,
186     D3DBLEND_BOTHINVSRCALPHA    = 13,
187
188     D3DBLEND_FORCE_DWORD        = 0x7fffffff
189 } D3DBLEND;
190
191 typedef enum _D3DBLENDOP {
192     D3DBLENDOP_ADD              = 1,
193     D3DBLENDOP_SUBTRACT         = 2,
194     D3DBLENDOP_REVSUBTRACT      = 3,
195     D3DBLENDOP_MIN              = 4,
196     D3DBLENDOP_MAX              = 5,
197
198     D3DBLENDOP_FORCE_DWORD      = 0x7fffffff
199 } D3DBLENDOP;
200
201 typedef enum _D3DCMPFUNC {
202     D3DCMP_NEVER                = 1,
203     D3DCMP_LESS                 = 2,
204     D3DCMP_EQUAL                = 3,
205     D3DCMP_LESSEQUAL            = 4,
206     D3DCMP_GREATER              = 5,
207     D3DCMP_NOTEQUAL             = 6,
208     D3DCMP_GREATEREQUAL         = 7,
209     D3DCMP_ALWAYS               = 8,
210
211     D3DCMP_FORCE_DWORD          = 0x7fffffff
212 } D3DCMPFUNC;
213
214 typedef enum _D3DCUBEMAP_FACES {
215     D3DCUBEMAP_FACE_POSITIVE_X     = 0,
216     D3DCUBEMAP_FACE_NEGATIVE_X     = 1,
217     D3DCUBEMAP_FACE_POSITIVE_Y     = 2,
218     D3DCUBEMAP_FACE_NEGATIVE_Y     = 3,
219     D3DCUBEMAP_FACE_POSITIVE_Z     = 4,
220     D3DCUBEMAP_FACE_NEGATIVE_Z     = 5,
221
222     D3DCUBEMAP_FACE_FORCE_DWORD    = 0xffffffff
223 } D3DCUBEMAP_FACES;
224
225 typedef enum _D3DCULL {
226     D3DCULL_NONE                = 1,
227     D3DCULL_CW                  = 2,
228     D3DCULL_CCW                 = 3,
229
230     D3DCULL_FORCE_DWORD         = 0x7fffffff
231 } D3DCULL;
232
233 typedef enum _D3DDEBUGMONITORTOKENS {
234     D3DDMT_ENABLE          = 0,
235     D3DDMT_DISABLE         = 1,
236
237     D3DDMT_FORCE_DWORD     = 0x7fffffff
238 } D3DDEBUGMONITORTOKENS;
239
240 typedef enum _D3DDEVTYPE {
241     D3DDEVTYPE_HAL         = 1,
242     D3DDEVTYPE_REF         = 2,
243     D3DDEVTYPE_SW          = 3,
244
245     D3DDEVTYPE_FORCE_DWORD = 0xffffffff
246 } D3DDEVTYPE;
247
248 typedef enum _D3DFILLMODE {
249     D3DFILL_POINT               = 1,
250     D3DFILL_WIREFRAME           = 2,
251     D3DFILL_SOLID               = 3,
252
253     D3DFILL_FORCE_DWORD         = 0x7fffffff
254 } D3DFILLMODE;
255
256 typedef enum _D3DFOGMODE {
257     D3DFOG_NONE                 = 0,
258     D3DFOG_EXP                  = 1,
259     D3DFOG_EXP2                 = 2,
260     D3DFOG_LINEAR               = 3,
261
262     D3DFOG_FORCE_DWORD          = 0x7fffffff
263 } D3DFOGMODE;
264
265 typedef enum _D3DFORMAT {
266     D3DFMT_UNKNOWN              =   0,
267
268     D3DFMT_R8G8B8               =  20,
269     D3DFMT_A8R8G8B8             =  21,
270     D3DFMT_X8R8G8B8             =  22,
271     D3DFMT_R5G6B5               =  23,
272     D3DFMT_X1R5G5B5             =  24,
273     D3DFMT_A1R5G5B5             =  25,
274     D3DFMT_A4R4G4B4             =  26,
275     D3DFMT_R3G3B2               =  27,
276     D3DFMT_A8                   =  28,
277     D3DFMT_A8R3G3B2             =  29,
278     D3DFMT_X4R4G4B4             =  30,
279
280     D3DFMT_A8P8                 =  40,
281     D3DFMT_P8                   =  41,
282
283     D3DFMT_L8                   =  50,
284     D3DFMT_A8L8                 =  51,
285     D3DFMT_A4L4                 =  52,
286
287     D3DFMT_V8U8                 =  60,
288     D3DFMT_L6V5U5               =  61,
289     D3DFMT_X8L8V8U8             =  62,
290     D3DFMT_Q8W8V8U8             =  63,
291     D3DFMT_V16U16               =  64,
292     D3DFMT_W11V11U10            =  65,
293
294     D3DFMT_UYVY                 =  MAKEFOURCC('U', 'Y', 'V', 'Y'),
295     D3DFMT_YUY2                 =  MAKEFOURCC('Y', 'U', 'Y', '2'),
296     D3DFMT_DXT1                 =  MAKEFOURCC('D', 'X', 'T', '1'),
297     D3DFMT_DXT2                 =  MAKEFOURCC('D', 'X', 'T', '2'),
298     D3DFMT_DXT3                 =  MAKEFOURCC('D', 'X', 'T', '3'),
299     D3DFMT_DXT4                 =  MAKEFOURCC('D', 'X', 'T', '4'),
300     D3DFMT_DXT5                 =  MAKEFOURCC('D', 'X', 'T', '5'),
301
302     D3DFMT_D16_LOCKABLE         =  70,
303     D3DFMT_D32                  =  71,
304     D3DFMT_D15S1                =  73,
305     D3DFMT_D24S8                =  75,
306     D3DFMT_D16                  =  80,
307     D3DFMT_D24X8                =  77,
308     D3DFMT_D24X4S4              =  79,
309
310     D3DFMT_VERTEXDATA           = 100,
311     D3DFMT_INDEX16              = 101,
312     D3DFMT_INDEX32              = 102,
313
314     D3DFMT_FORCE_DWORD          = 0xFFFFFFFF
315 } D3DFORMAT;
316
317 typedef enum _D3DLIGHTTYPE {
318     D3DLIGHT_POINT          = 1,
319     D3DLIGHT_SPOT           = 2,
320     D3DLIGHT_DIRECTIONAL    = 3,
321
322     D3DLIGHT_FORCE_DWORD    = 0x7fffffff
323 } D3DLIGHTTYPE;
324
325 typedef enum _D3DMATERIALCOLORSOURCE {
326     D3DMCS_MATERIAL         = 0,
327     D3DMCS_COLOR1           = 1,
328     D3DMCS_COLOR2           = 2,
329
330     D3DMCS_FORCE_DWORD      = 0x7fffffff
331 } D3DMATERIALCOLORSOURCE;
332
333 typedef enum _D3DMULTISAMPLE_TYPE {
334     D3DMULTISAMPLE_NONE            =  0,
335     D3DMULTISAMPLE_2_SAMPLES       =  2,
336     D3DMULTISAMPLE_3_SAMPLES       =  3,
337     D3DMULTISAMPLE_4_SAMPLES       =  4,
338     D3DMULTISAMPLE_5_SAMPLES       =  5,
339     D3DMULTISAMPLE_6_SAMPLES       =  6,
340     D3DMULTISAMPLE_7_SAMPLES       =  7,
341     D3DMULTISAMPLE_8_SAMPLES       =  8,
342     D3DMULTISAMPLE_9_SAMPLES       =  9,
343     D3DMULTISAMPLE_10_SAMPLES      = 10,
344     D3DMULTISAMPLE_11_SAMPLES      = 11,
345     D3DMULTISAMPLE_12_SAMPLES      = 12,
346     D3DMULTISAMPLE_13_SAMPLES      = 13,
347     D3DMULTISAMPLE_14_SAMPLES      = 14,
348     D3DMULTISAMPLE_15_SAMPLES      = 15,
349     D3DMULTISAMPLE_16_SAMPLES      = 16,
350
351     D3DMULTISAMPLE_FORCE_DWORD     = 0xffffffff
352 } D3DMULTISAMPLE_TYPE;
353
354 typedef enum _D3DORDERTYPE {
355    D3DORDER_LINEAR      = 1,
356    D3DORDER_QUADRATIC   = 2,
357    D3DORDER_CUBIC       = 3,
358    D3DORDER_QUINTIC     = 5,
359
360    D3DORDER_FORCE_DWORD = 0x7fffffff
361 } D3DORDERTYPE;
362
363 typedef enum _D3DPATCHEDGESTYLE {
364    D3DPATCHEDGE_DISCRETE    = 0,
365    D3DPATCHEDGE_CONTINUOUS  = 1,
366
367    D3DPATCHEDGE_FORCE_DWORD = 0x7fffffff,
368 } D3DPATCHEDGESTYLE;
369
370 typedef enum _D3DPOOL {
371     D3DPOOL_DEFAULT                 = 0,
372     D3DPOOL_MANAGED                 = 1,
373     D3DPOOL_SYSTEMMEM               = 2,
374     D3DPOOL_SCRATCH                 = 3,
375
376     D3DPOOL_FORCE_DWORD             = 0x7fffffff
377 } D3DPOOL;
378
379 typedef enum _D3DPRIMITIVETYPE {
380     D3DPT_POINTLIST             = 1,
381     D3DPT_LINELIST              = 2,
382     D3DPT_LINESTRIP             = 3,
383     D3DPT_TRIANGLELIST          = 4,
384     D3DPT_TRIANGLESTRIP         = 5,
385     D3DPT_TRIANGLEFAN           = 6,
386
387     D3DPT_FORCE_DWORD           = 0x7fffffff
388 } D3DPRIMITIVETYPE;
389
390 typedef enum _D3DRENDERSTATETYPE {
391     D3DRS_ZENABLE                   =   7,
392     D3DRS_FILLMODE                  =   8,
393     D3DRS_SHADEMODE                 =   9,
394     D3DRS_LINEPATTERN               =  10,
395     D3DRS_ZWRITEENABLE              =  14,
396     D3DRS_ALPHATESTENABLE           =  15,
397     D3DRS_LASTPIXEL                 =  16,
398     D3DRS_SRCBLEND                  =  19,
399     D3DRS_DESTBLEND                 =  20,
400     D3DRS_CULLMODE                  =  22,
401     D3DRS_ZFUNC                     =  23,
402     D3DRS_ALPHAREF                  =  24,
403     D3DRS_ALPHAFUNC                 =  25,
404     D3DRS_DITHERENABLE              =  26,
405     D3DRS_ALPHABLENDENABLE          =  27,
406     D3DRS_FOGENABLE                 =  28,
407     D3DRS_SPECULARENABLE            =  29,
408     D3DRS_ZVISIBLE                  =  30,
409     D3DRS_FOGCOLOR                  =  34,
410     D3DRS_FOGTABLEMODE              =  35,
411     D3DRS_FOGSTART                  =  36,
412     D3DRS_FOGEND                    =  37,
413     D3DRS_FOGDENSITY                =  38,
414     D3DRS_EDGEANTIALIAS             =  40,
415     D3DRS_ZBIAS                     =  47,
416     D3DRS_RANGEFOGENABLE            =  48,
417     D3DRS_STENCILENABLE             =  52,
418     D3DRS_STENCILFAIL               =  53,
419     D3DRS_STENCILZFAIL              =  54,
420     D3DRS_STENCILPASS               =  55,
421     D3DRS_STENCILFUNC               =  56,
422     D3DRS_STENCILREF                =  57,
423     D3DRS_STENCILMASK               =  58,
424     D3DRS_STENCILWRITEMASK          =  59,
425     D3DRS_TEXTUREFACTOR             =  60,
426     D3DRS_WRAP0                     = 128,
427     D3DRS_WRAP1                     = 129,
428     D3DRS_WRAP2                     = 130,
429     D3DRS_WRAP3                     = 131,
430     D3DRS_WRAP4                     = 132,
431     D3DRS_WRAP5                     = 133,
432     D3DRS_WRAP6                     = 134,
433     D3DRS_WRAP7                     = 135,
434     D3DRS_CLIPPING                  = 136,
435     D3DRS_LIGHTING                  = 137,
436     D3DRS_AMBIENT                   = 139,
437     D3DRS_FOGVERTEXMODE             = 140,
438     D3DRS_COLORVERTEX               = 141,
439     D3DRS_LOCALVIEWER               = 142,
440     D3DRS_NORMALIZENORMALS          = 143,
441     D3DRS_DIFFUSEMATERIALSOURCE     = 145,
442     D3DRS_SPECULARMATERIALSOURCE    = 146,
443     D3DRS_AMBIENTMATERIALSOURCE     = 147,
444     D3DRS_EMISSIVEMATERIALSOURCE    = 148,
445     D3DRS_VERTEXBLEND               = 151,
446     D3DRS_CLIPPLANEENABLE           = 152,
447     D3DRS_SOFTWAREVERTEXPROCESSING  = 153,
448     D3DRS_POINTSIZE                 = 154,
449     D3DRS_POINTSIZE_MIN             = 155,
450     D3DRS_POINTSPRITEENABLE         = 156,
451     D3DRS_POINTSCALEENABLE          = 157,
452     D3DRS_POINTSCALE_A              = 158,
453     D3DRS_POINTSCALE_B              = 159,
454     D3DRS_POINTSCALE_C              = 160,
455     D3DRS_MULTISAMPLEANTIALIAS      = 161,
456     D3DRS_MULTISAMPLEMASK           = 162,
457     D3DRS_PATCHEDGESTYLE            = 163,
458     D3DRS_PATCHSEGMENTS             = 164,
459     D3DRS_DEBUGMONITORTOKEN         = 165,
460     D3DRS_POINTSIZE_MAX             = 166,
461     D3DRS_INDEXEDVERTEXBLENDENABLE  = 167,
462     D3DRS_COLORWRITEENABLE          = 168,
463     D3DRS_TWEENFACTOR               = 170,
464     D3DRS_BLENDOP                   = 171,
465     D3DRS_POSITIONORDER             = 172,
466     D3DRS_NORMALORDER               = 173,
467
468     D3DRS_FORCE_DWORD               = 0x7fffffff
469 } D3DRENDERSTATETYPE;
470
471 typedef enum _D3DRESOURCETYPE {
472     D3DRTYPE_SURFACE                =  1,
473     D3DRTYPE_VOLUME                 =  2,
474     D3DRTYPE_TEXTURE                =  3,
475     D3DRTYPE_VOLUMETEXTURE          =  4,
476     D3DRTYPE_CUBETEXTURE            =  5,
477     D3DRTYPE_VERTEXBUFFER           =  6,
478     D3DRTYPE_INDEXBUFFER            =  7,
479
480     D3DRTYPE_FORCE_DWORD            = 0x7fffffff
481 } D3DRESOURCETYPE;
482
483 typedef enum _D3DSHADEMODE {
484     D3DSHADE_FLAT               = 1,
485     D3DSHADE_GOURAUD            = 2,
486     D3DSHADE_PHONG              = 3,
487
488     D3DSHADE_FORCE_DWORD        = 0x7fffffff
489 } D3DSHADEMODE;
490
491 typedef enum _D3DSTATEBLOCKTYPE {
492     D3DSBT_ALL           = 1,
493     D3DSBT_PIXELSTATE    = 2,
494     D3DSBT_VERTEXSTATE   = 3,
495
496     D3DSBT_FORCE_DWORD   = 0xffffffff
497 } D3DSTATEBLOCKTYPE;
498
499 typedef enum _D3DSTENCILOP {
500     D3DSTENCILOP_KEEP           = 1,
501     D3DSTENCILOP_ZERO           = 2,
502     D3DSTENCILOP_REPLACE        = 3,
503     D3DSTENCILOP_INCRSAT        = 4,
504     D3DSTENCILOP_DECRSAT        = 5,
505     D3DSTENCILOP_INVERT         = 6,
506     D3DSTENCILOP_INCR           = 7,
507     D3DSTENCILOP_DECR           = 8,
508
509     D3DSTENCILOP_FORCE_DWORD    = 0x7fffffff
510 } D3DSTENCILOP;
511
512 typedef enum _D3DSWAPEFFECT {
513     D3DSWAPEFFECT_DISCARD         = 1,
514     D3DSWAPEFFECT_FLIP            = 2,
515     D3DSWAPEFFECT_COPY            = 3,
516     D3DSWAPEFFECT_COPY_VSYNC      = 4,
517
518     D3DSWAPEFFECT_FORCE_DWORD     = 0xFFFFFFFF
519 } D3DSWAPEFFECT;
520
521 typedef enum _D3DTEXTUREADDRESS {
522     D3DTADDRESS_WRAP            = 1,
523     D3DTADDRESS_MIRROR          = 2,
524     D3DTADDRESS_CLAMP           = 3,
525     D3DTADDRESS_BORDER          = 4,
526     D3DTADDRESS_MIRRORONCE      = 5,
527
528     D3DTADDRESS_FORCE_DWORD     = 0x7fffffff
529 } D3DTEXTUREADDRESS;
530
531 typedef enum _D3DTEXTUREFILTERTYPE {
532     D3DTEXF_NONE            = 0,
533     D3DTEXF_POINT           = 1,
534     D3DTEXF_LINEAR          = 2,
535     D3DTEXF_ANISOTROPIC     = 3,
536     D3DTEXF_FLATCUBIC       = 4,
537     D3DTEXF_GAUSSIANCUBIC   = 5,
538
539     D3DTEXF_FORCE_DWORD     = 0x7fffffff
540 } D3DTEXTUREFILTERTYPE;
541
542 typedef enum _D3DTEXTUREOP {
543     D3DTOP_DISABLE                   =  1,
544     D3DTOP_SELECTARG1                =  2,
545     D3DTOP_SELECTARG2                =  3,
546     D3DTOP_MODULATE                  =  4,
547     D3DTOP_MODULATE2X                =  5,
548     D3DTOP_MODULATE4X                =  6,
549     D3DTOP_ADD                       =  7,
550     D3DTOP_ADDSIGNED                 =  8,
551     D3DTOP_ADDSIGNED2X               =  9,
552     D3DTOP_SUBTRACT                  = 10,
553     D3DTOP_ADDSMOOTH                 = 11,
554     D3DTOP_BLENDDIFFUSEALPHA         = 12,
555     D3DTOP_BLENDTEXTUREALPHA         = 13,
556     D3DTOP_BLENDFACTORALPHA          = 14,
557     D3DTOP_BLENDTEXTUREALPHAPM       = 15,
558     D3DTOP_BLENDCURRENTALPHA         = 16,
559     D3DTOP_PREMODULATE               = 17,
560     D3DTOP_MODULATEALPHA_ADDCOLOR    = 18,
561     D3DTOP_MODULATECOLOR_ADDALPHA    = 19,
562     D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20,
563     D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21,
564     D3DTOP_BUMPENVMAP                = 22,
565     D3DTOP_BUMPENVMAPLUMINANCE       = 23,
566     D3DTOP_DOTPRODUCT3               = 24,
567     D3DTOP_MULTIPLYADD               = 25,
568     D3DTOP_LERP                      = 26,
569
570     D3DTOP_FORCE_DWORD               = 0x7fffffff,
571 } D3DTEXTUREOP;
572
573 typedef enum _D3DTEXTURESTAGESTATETYPE {
574     D3DTSS_COLOROP               =  1,
575     D3DTSS_COLORARG1             =  2,
576     D3DTSS_COLORARG2             =  3,
577     D3DTSS_ALPHAOP               =  4,
578     D3DTSS_ALPHAARG1             =  5,
579     D3DTSS_ALPHAARG2             =  6,
580     D3DTSS_BUMPENVMAT00          =  7,
581     D3DTSS_BUMPENVMAT01          =  8,
582     D3DTSS_BUMPENVMAT10          =  9,
583     D3DTSS_BUMPENVMAT11          = 10,
584     D3DTSS_TEXCOORDINDEX         = 11,
585     D3DTSS_ADDRESSU              = 13,
586     D3DTSS_ADDRESSV              = 14,
587     D3DTSS_BORDERCOLOR           = 15,
588     D3DTSS_MAGFILTER             = 16,
589     D3DTSS_MINFILTER             = 17,
590     D3DTSS_MIPFILTER             = 18,
591     D3DTSS_MIPMAPLODBIAS         = 19,
592     D3DTSS_MAXMIPLEVEL           = 20,
593     D3DTSS_MAXANISOTROPY         = 21,
594     D3DTSS_BUMPENVLSCALE         = 22,
595     D3DTSS_BUMPENVLOFFSET        = 23,
596     D3DTSS_TEXTURETRANSFORMFLAGS = 24,
597     D3DTSS_ADDRESSW              = 25,
598     D3DTSS_COLORARG0             = 26,
599     D3DTSS_ALPHAARG0             = 27,
600     D3DTSS_RESULTARG             = 28,
601
602     D3DTSS_FORCE_DWORD           = 0x7fffffff
603 } D3DTEXTURESTAGESTATETYPE;
604
605 typedef enum _D3DTEXTURETRANSFORMFLAGS {
606     D3DTTFF_DISABLE         =   0,
607     D3DTTFF_COUNT1          =   1,
608     D3DTTFF_COUNT2          =   2,
609     D3DTTFF_COUNT3          =   3,
610     D3DTTFF_COUNT4          =   4,
611     D3DTTFF_PROJECTED       = 256,
612
613     D3DTTFF_FORCE_DWORD     = 0x7fffffff
614 } D3DTEXTURETRANSFORMFLAGS;
615
616 typedef enum _D3DTRANSFORMSTATETYPE {
617     D3DTS_VIEW            =  2,
618     D3DTS_PROJECTION      =  3,
619     D3DTS_TEXTURE0        = 16,
620     D3DTS_TEXTURE1        = 17,
621     D3DTS_TEXTURE2        = 18,
622     D3DTS_TEXTURE3        = 19,
623     D3DTS_TEXTURE4        = 20,
624     D3DTS_TEXTURE5        = 21,
625     D3DTS_TEXTURE6        = 22,
626     D3DTS_TEXTURE7        = 23,
627
628     D3DTS_FORCE_DWORD     = 0x7fffffff
629 } D3DTRANSFORMSTATETYPE;
630
631 typedef enum _D3DVERTEXBLENDFLAGS {
632     D3DVBF_DISABLE  =   0,
633     D3DVBF_1WEIGHTS =   1,
634     D3DVBF_2WEIGHTS =   2,
635     D3DVBF_3WEIGHTS =   3,
636     D3DVBF_TWEENING = 255,
637     D3DVBF_0WEIGHTS = 256
638 } D3DVERTEXBLENDFLAGS;
639
640 typedef enum _D3DZBUFFERTYPE {
641     D3DZB_FALSE                 = 0,
642     D3DZB_TRUE                  = 1,
643     D3DZB_USEW                  = 2,
644
645     D3DZB_FORCE_DWORD           = 0x7fffffff
646 } D3DZBUFFERTYPE;
647
648
649 /*****************************************************************************
650  * Direct 3D v8 typedefs
651  */
652 typedef DWORD D3DCOLOR;
653
654 /*****************************************************************************
655  * Direct 3D v8 structures
656  */
657 typedef struct _D3DADAPTER_IDENTIFIER8 {
658     char            Driver[MAX_DEVICE_IDENTIFIER_STRING];
659     char            Description[MAX_DEVICE_IDENTIFIER_STRING];
660
661 #if defined(_WIN32) || defined(__WINE__)
662     LARGE_INTEGER   DriverVersion;            /* Defined for 32-bit components */
663 #else
664     DWORD           DriverVersionLowPart;     /* Defined for 16-bit driver components */
665     DWORD           DriverVersionHighPart;
666 #endif
667
668     DWORD           VendorId;
669     DWORD           DeviceId;
670     DWORD           SubSysId;
671     DWORD           Revision;
672
673     GUID            DeviceIdentifier;
674
675     DWORD           WHQLLevel;
676 } D3DADAPTER_IDENTIFIER8;
677
678 typedef struct _D3DBOX {
679     UINT                Left;
680     UINT                Top;
681     UINT                Right;
682     UINT                Bottom;
683     UINT                Front;
684     UINT                Back;
685 } D3DBOX;
686
687 typedef struct _D3DCLIPSTATUS8 {
688    DWORD ClipUnion;
689    DWORD ClipIntersection;
690 } D3DCLIPSTATUS8;
691
692 typedef struct _D3DCOLORVALUE {
693     float r;
694     float g;
695     float b;
696     float a;
697 } D3DCOLORVALUE;
698
699 typedef struct _D3DDEVICE_CREATION_PARAMETERS {
700     UINT          AdapterOrdinal;
701     D3DDEVTYPE    DeviceType;
702     HWND          hFocusWindow;
703     DWORD         BehaviorFlags;
704 } D3DDEVICE_CREATION_PARAMETERS;
705
706 typedef struct _D3DDISPLAYMODE {
707     UINT            Width;
708     UINT            Height;
709     UINT            RefreshRate;
710     D3DFORMAT       Format;
711 } D3DDISPLAYMODE;
712
713 typedef struct _D3DGAMMARAMP {
714     WORD                red  [256];
715     WORD                green[256];
716     WORD                blue [256];
717 } D3DGAMMARAMP;
718
719 typedef struct _D3DINDEXBUFFER_DESC {
720     D3DFORMAT           Format;
721     D3DRESOURCETYPE     Type;
722     DWORD               Usage;
723     D3DPOOL             Pool;
724     UINT                Size;
725 } D3DINDEXBUFFER_DESC;
726
727 typedef struct _D3DVECTOR {
728     float x;
729     float y;
730     float z;
731 } D3DVECTOR;
732
733 typedef struct _D3DLIGHT8 {
734     D3DLIGHTTYPE    Type;
735     D3DCOLORVALUE   Diffuse;
736     D3DCOLORVALUE   Specular;
737     D3DCOLORVALUE   Ambient;
738     D3DVECTOR       Position;
739     D3DVECTOR       Direction;
740     float           Range;
741     float           Falloff;
742     float           Attenuation0;
743     float           Attenuation1;
744     float           Attenuation2;
745     float           Theta;
746     float           Phi;
747 } D3DLIGHT8;
748
749 typedef struct _D3DLINEPATTERN {
750     WORD    wRepeatFactor;
751     WORD    wLinePattern;
752 } D3DLINEPATTERN;
753
754 typedef struct _D3DLOCKED_BOX {
755     INT                 RowPitch;
756     INT                 SlicePitch;
757     void*               pBits;
758 } D3DLOCKED_BOX;
759
760 typedef struct _D3DLOCKED_RECT {
761     INT                 Pitch;
762     void*               pBits;
763 } D3DLOCKED_RECT;
764
765 typedef struct _D3DMATERIAL8 {
766     D3DCOLORVALUE   Diffuse;
767     D3DCOLORVALUE   Ambient;
768     D3DCOLORVALUE   Specular;
769     D3DCOLORVALUE   Emissive;
770     float           Power;
771 } D3DMATERIAL8;
772
773 typedef struct _D3DMATRIX {
774     union {
775         struct {
776             float        _11, _12, _13, _14;
777             float        _21, _22, _23, _24;
778             float        _31, _32, _33, _34;
779             float        _41, _42, _43, _44;
780         } DUMMYSTRUCTNAME;
781         float m[4][4];
782     } DUMMYUNIONNAME;
783 } D3DMATRIX;
784
785 typedef struct _D3DPRESENT_PARAMETERS_ {
786     UINT                    BackBufferWidth;
787     UINT                    BackBufferHeight;
788     D3DFORMAT               BackBufferFormat;
789     UINT                    BackBufferCount;
790
791     D3DMULTISAMPLE_TYPE     MultiSampleType;
792
793     D3DSWAPEFFECT           SwapEffect;
794     HWND                    hDeviceWindow;
795     BOOL                    Windowed;
796     BOOL                    EnableAutoDepthStencil;
797     D3DFORMAT               AutoDepthStencilFormat;
798     DWORD                   Flags;
799
800     UINT                    FullScreen_RefreshRateInHz;
801     UINT                    FullScreen_PresentationInterval;
802
803 } D3DPRESENT_PARAMETERS;
804
805 typedef struct _D3DRANGE {
806     UINT                Offset;
807     UINT                Size;
808 } D3DRANGE;
809
810 typedef struct _D3DRASTER_STATUS {
811     BOOL            InVBlank;
812     UINT            ScanLine;
813 } D3DRASTER_STATUS;
814
815 typedef struct _D3DRECT {
816     LONG x1;
817     LONG y1;
818     LONG x2;
819     LONG y2;
820 } D3DRECT;
821
822 typedef struct _D3DRECTPATCH_INFO {
823     UINT                StartVertexOffsetWidth;
824     UINT                StartVertexOffsetHeight;
825     UINT                Width;
826     UINT                Height;
827     UINT                Stride;
828     D3DBASISTYPE        Basis;
829     D3DORDERTYPE        Order;
830 } D3DRECTPATCH_INFO;
831
832 typedef struct _D3DSURFACE_DESC {
833     D3DFORMAT           Format;
834     D3DRESOURCETYPE     Type;
835     DWORD               Usage;
836     D3DPOOL             Pool;
837     UINT                Size;
838     D3DMULTISAMPLE_TYPE MultiSampleType;
839     UINT                Width;
840     UINT                Height;
841 } D3DSURFACE_DESC;
842
843 typedef struct _D3DTRIPATCH_INFO {
844     UINT                StartVertexOffset;
845     UINT                NumVertices;
846     D3DBASISTYPE        Basis;
847     D3DORDERTYPE        Order;
848 } D3DTRIPATCH_INFO;
849
850 typedef struct _D3DVERTEXBUFFER_DESC {
851     D3DFORMAT           Format;
852     D3DRESOURCETYPE     Type;
853     DWORD               Usage;
854     D3DPOOL             Pool;
855     UINT                Size;
856     DWORD               FVF;
857 } D3DVERTEXBUFFER_DESC;
858
859 typedef struct _D3DVIEWPORT8 {
860     DWORD       X;
861     DWORD       Y;
862     DWORD       Width;
863     DWORD       Height;
864     float       MinZ;
865     float       MaxZ;
866 } D3DVIEWPORT8;
867
868 typedef struct _D3DVOLUME_DESC {
869     D3DFORMAT           Format;
870     D3DRESOURCETYPE     Type;
871     DWORD               Usage;
872     D3DPOOL             Pool;
873     UINT                Size;
874     UINT                Width;
875     UINT                Height;
876     UINT                Depth;
877 } D3DVOLUME_DESC;
878
879 #endif  /* __WINE_D3D8TYPES_H */