Subversion Repositories spacemission

Rev

Rev 1 | Rev 10 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 4
Line 23... Line 23...
23
 *
23
 *
24
 *    e-mail : kazuya-y@infosakyu.ne.jp
24
 *    e-mail : kazuya-y@infosakyu.ne.jp
25
 *    URL    : http://www.infosakyu.ne.jp/~kazuya-y/index.html
25
 *    URL    : http://www.infosakyu.ne.jp/~kazuya-y/index.html
26
 *
26
 *
27
 ***************************************************************************)
27
 ***************************************************************************)
-
 
28
{
-
 
29
(c)2004 Jaro Benes Recompilation with Erik Unger's headers
28
 
30
 
29
unit DirectX;
31
Join in order:
30
 
-
 
31
interface
32
  1) DirectDraw
32
 
-
 
33
{$Z4}
-
 
34
{$A+}
-
 
35
{$WEAKPACKAGEUNIT}
-
 
36
 
-
 
37
{$IFNDEF DirectX3}
33
  2) Direct3D
38
{$IFNDEF DirectX5}
34
  3) Direct3DRM
39
{$IFNDEF DirectX6}
35
  4) DirectInput
40
{$IFNDEF DirectX7}
36
  5) DirectPlay
41
  {$DEFINE DirectX7}
37
  6) DirectSetup
42
{$ENDIF}
-
 
43
{$ENDIF}
-
 
44
{$ENDIF}
38
  7) DirectSound
45
{$ENDIF}
39
  8) DirectMusic
46
 
40
}
47
{$IFDEF DirectX3}
41
Unit DirectX;
48
  {$UNDEF DirectX5}
-
 
49
  {$UNDEF DirectX6}
-
 
50
  {$UNDEF DirectX7}
-
 
51
  {$DEFINE SupportDirectX3}
-
 
52
{$ENDIF}
-
 
53
 
42
 
54
{$IFDEF DirectX5}
-
 
55
  {$UNDEF DirectX3}
-
 
56
  {$UNDEF DirectX6}
-
 
57
  {$UNDEF DirectX7}
-
 
58
  {$DEFINE SupportDirectX3}
-
 
59
  {$DEFINE SupportDirectX5}
-
 
60
{$ENDIF}
43
Interface
61
 
44
 
62
{$IFDEF DirectX6}
-
 
63
  {$UNDEF DirectX3}
-
 
64
  {$UNDEF DirectX5}
-
 
65
  {$UNDEF DirectX7}
-
 
66
  {$DEFINE SupportDirectX3}
-
 
67
  {$DEFINE SupportDirectX5}
-
 
68
  {$DEFINE SupportDirectX6}
45
{Delphi version marks}
69
{$ENDIF}
-
 
70
 
46
 
71
{$IFDEF DirectX7}
47
{$I DelphiXcfg.inc}
72
  {$UNDEF DirectX3}
-
 
73
  {$UNDEF DirectX5}
-
 
74
  {$UNDEF DirectX6}
-
 
75
  {$DEFINE SupportDirectX3}
-
 
76
  {$DEFINE SupportDirectX5}
-
 
77
  {$DEFINE SupportDirectX6}
-
 
78
  {$DEFINE SupportDirectX7}
-
 
79
{$ENDIF}
-
 
80
 
48
 
81
uses Windows, MMSystem, ActiveX;
-
 
82
 
-
 
83
const
-
 
84
{$IFDEF DirectX3}
49
{$MINENUMSIZE 4}
85
  DirectXUnitVersion = 3;
-
 
86
{$ENDIF}{$IFDEF DirectX5}
-
 
87
  DirectXUnitVersion = 5;
-
 
88
{$ENDIF}{$IFDEF DirectX6}
-
 
89
  DirectXUnitVersion = 6;
-
 
90
{$ENDIF}{$IFDEF DirectX7}
-
 
91
  DirectXUnitVersion = 7;
-
 
92
{$ENDIF}
50
{$ALIGN ON}
93
 
51
 
-
 
52
uses
-
 
53
  Windows, MMSystem;
-
 
54
//DirectDraw file
94
(*==========================================================================;
55
(*==========================================================================;
95
 *
56
 *
96
 *  Copyright (C) Microsoft Corporation.  All Rights Reserved.
57
 *  Copyright (C) 1994-1997 Microsoft Corporation.  All Rights Reserved.
-
 
58
 *
-
 
59
 *  Files:      ddraw.h dvp.h
-
 
60
 *  Content:    DirectDraw and DirectDrawVideoPort include files
-
 
61
 *
-
 
62
 *  DirectX 7.0 Delphi adaptation by Erik Unger
-
 
63
 *
-
 
64
 *  Modified: 10-Sep-2000
-
 
65
 *
-
 
66
 *  Download: http://www.delphi-jedi.org/DelphiGraphics/
-
 
67
 *  E-Mail: DelphiDirectX@next-reality.com
97
 *
68
 *
98
 *  File:       ddraw.h
-
 
99
 *  Content:    DirectDraw include file
-
 
100
 *
69
 *
101
 ***************************************************************************)
70
 ***************************************************************************)
102
 
71
 
-
 
72
var
103
{ FOURCC codes for DX compressed-texture pixel formats }
73
  DDrawDLL : HMODULE = 0;
104
 
74
 
105
const
-
 
106
  FOURCC_DXT1 = Ord('D') + Ord('X') shl 8 + Ord('T') shl 16 + Ord('1') shl 24;
75
function DDErrorString(Value: HResult) : string;
-
 
76
 
107
  FOURCC_DXT2 = Ord('D') + Ord('X') shl 8 + Ord('T') shl 16 + Ord('2') shl 24;
77
function MAKEFOURCC(ch0, ch1, ch2, ch3: Char) : DWORD;
108
  FOURCC_DXT3 = Ord('D') + Ord('X') shl 8 + Ord('T') shl 16 + Ord('3') shl 24;
-
 
109
  FOURCC_DXT4 = Ord('D') + Ord('X') shl 8 + Ord('T') shl 16 + Ord('4') shl 24;
-
 
110
  FOURCC_DXT5 = Ord('D') + Ord('X') shl 8 + Ord('T') shl 16 + Ord('5') shl 24;
-
 
111
 
78
 
-
 
79
(*
112
{ GUIDS used by DirectDraw objects }
80
 * FOURCC codes for DX compressed-texture pixel formats
-
 
81
 *)
-
 
82
const
-
 
83
  FOURCC_DXT1 = 'DXT1';
-
 
84
  FOURCC_DXT2 = 'DXT2';
-
 
85
  FOURCC_DXT3 = 'DXT3';
-
 
86
  FOURCC_DXT4 = 'DXT4';
-
 
87
  FOURCC_DXT5 = 'DXT5';
113
 
88
 
-
 
89
(*
-
 
90
 * GUIDS used by DirectDraw objects
-
 
91
 *)
114
const
92
const
115
  CLSID_DirectDraw: TGUID = '{D7B70EE0-4340-11CF-B063-0020AFC2CD35}';
93
  CLSID_DirectDraw: TGUID = '{D7B70EE0-4340-11CF-B063-0020AFC2CD35}';
116
  CLSID_DirectDraw7: TGUID = '{3C305196-50DB-11D3-9CFE-00C04FD930C5}';
94
  CLSID_DirectDraw7: TGUID = '{3c305196-50db-11d3-9cfe-00c04fd930c5}';
117
  CLSID_DirectDrawClipper: TGUID = '{593817A0-7DB3-11CF-A2DE-00AA00B93356}';
95
  CLSID_DirectDrawClipper: TGUID = '{593817A0-7DB3-11CF-A2DE-00AA00b93356}';
118
  IID_IDirectDraw: TGUID = '{6C14DB80-A733-11CE-A521-0020AF0BE560}';
-
 
119
  IID_IDirectDraw2: TGUID = '{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}';
-
 
120
  IID_IDirectDraw4: TGUID = '{9C59509A-39BD-11D1-8C4A-00C04FD930C5}';
-
 
121
  IID_IDirectDraw7: TGUID = '{15E65EC0-3B9C-11D2-B92F-00609797EA5B}';
-
 
122
  IID_IDirectDrawSurface: TGUID = '{6C14DB81-A733-11CE-A521-0020AF0BE560}';
-
 
123
  IID_IDirectDrawSurface2: TGUID = '{57805885-6EEC-11CF-9441-A82303C10E27}';
-
 
124
  IID_IDirectDrawSurface3: TGUID = '{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}';
-
 
125
  IID_IDirectDrawSurface4: TGUID = '{0B2B8630-AD35-11D0-8EA6-00609797EA5B}';
-
 
126
  IID_IDirectDrawSurface7: TGUID = '{06675A80-3B9B-11D2-B92F-00609797EA5B}';
-
 
127
  IID_IDirectDrawPalette: TGUID = '{6C14DB84-A733-11CE-A521-0020AF0BE560}';
-
 
128
  IID_IDirectDrawClipper: TGUID = '{6C14DB85-A733-11CE-A521-0020AF0BE560}';
-
 
129
  IID_IDirectDrawColorControl: TGUID = '{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}';
-
 
130
  IID_IDirectDrawGammaControl: TGUID = '{69C11C3E-B46B-11D1-AD7A-00C04FC29B4E}';
-
 
131
 
96
 
132
const
97
const
133
  DD_ROP_SPACE = 256 div 32;       // space required to store ROP array
98
  DD_ROP_SPACE = (256 div 32);       // space required to store ROP array
134
 
99
 
135
  MAX_DDDEVICEID_STRING = 512;
100
  MAX_DDDEVICEID_STRING = 512;
136
 
101
 
-
 
102
(*
-
 
103
 * Flags for the IDirectDraw4::GetDeviceIdentifier method
-
 
104
 *)
-
 
105
 
-
 
106
(*
-
 
107
 * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped
-
 
108
 * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the
-
 
109
 * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is
-
 
110
 * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities
-
 
111
 * of the DirectDraw object involved.
-
 
112
 *)
-
 
113
  DDGDI_GETHOSTIDENTIFIER         = $00000001;
-
 
114
 
-
 
115
(*============================================================================
-
 
116
 *
137
{ DirectDraw Structures }
117
 * DirectDraw Structures
-
 
118
 *
-
 
119
 * Various structures used to invoke DirectDraw.
-
 
120
 *
-
 
121
 *==========================================================================*)
-
 
122
 
-
 
123
var
-
 
124
  NilGUID : TGUID{$IfNDef VER6UP} absolute 0{$EndIf};
138
 
125
 
139
type
126
type
-
 
127
  TRefGUID = packed record
-
 
128
    case integer of
-
 
129
    1: (guid : PGUID);
-
 
130
    2: (dwFlags : DWORD);
-
 
131
  end;
-
 
132
 
140
  IDirectDraw = interface;
133
  IDirectDraw = interface;
141
  IDirectDraw2 = interface;
134
  IDirectDraw2 = interface;
142
  IDirectDraw4 = interface;
135
  IDirectDraw4 = interface;
143
  IDirectDraw7 = interface;
136
  IDirectDraw7 = interface;
144
  IDirectDrawSurface = interface;
137
  IDirectDrawSurface = interface;
145
  IDirectDrawSurface2 = interface;
138
  IDirectDrawSurface2 = interface;
146
  IDirectDrawSurface3 = interface;
139
  IDirectDrawSurface3 = interface;
147
  IDirectDrawSurface4 = interface;
140
  IDirectDrawSurface4 = interface;
148
  IDirectDrawSurface7 = interface;
141
  IDirectDrawSurface7 = interface;
-
 
142
 
149
  IDirectDrawPalette = interface;
143
  IDirectDrawPalette = interface;
150
  IDirectDrawClipper = interface;
144
  IDirectDrawClipper = interface;
151
  IDirectDrawColorControl = interface;
145
  IDirectDrawColorControl = interface;
152
  IDirectDrawGammaControl = interface;
146
  IDirectDrawGammaControl = interface;
153
 
147
 
-
 
148
(*
154
{ TDDARGB structure }
149
 * Generic pixel format with 8-bit RGB and alpha components
155
 
150
 *)
156
  PDDARGB = ^TDDARGB;
151
  PDDARGB = ^TDDARGB;
157
  TDDARGB = record
152
  TDDARGB = packed record
158
    Blue: Byte;
153
    blue:     BYTE;
159
    Green: Byte;
154
    green:    BYTE;
160
    Red: Byte;
155
    red:      BYTE;
161
    Alpha: Byte;
156
    alpha:    BYTE;
162
  end;
157
  end;
163
 
158
 
164
  DDARGB = TDDARGB;
-
 
165
  LPDDARGB = PDDARGB;
-
 
166
 
159
(*
-
 
160
 * This version of the structure remains for backwards source compatibility.
167
{ TDDRGBA structure }
161
 * The DDARGB structure is the one that should be used for all DirectDraw APIs.
168
 
162
 *)
169
  PDDRGBA = ^TDDRGBA;
163
  PDDRGBA = ^TDDRGBA;
170
  TDDRGBA = record
164
  TDDRGBA = packed record
171
    Red: Byte;
165
    red   : BYTE;
172
    Green: Byte;
166
    green : BYTE;
173
    Blue: Byte;
167
    blue  : BYTE;
174
    Alpha: Byte;
168
    alpha : BYTE;
175
  end;
169
  end;
176
 
170
 
177
  DDRGBA = TDDRGBA;
-
 
178
  LPDDRGBA = PDDRGBA;
-
 
179
 
171
(*
180
{ TDDColorKey structure }
172
 * TDDColorKey
181
 
173
 *)
182
  PDDColorKey = ^TDDColorKey;
174
  PDDColorKey = ^TDDColorKey;
183
  TDDColorKey = record
175
  TDDColorKey = packed record
184
    dwColorSpaceLowValue: DWORD;   // low boundary of color space that is to
176
    dwColorSpaceLowValue: DWORD;   // low boundary of color space that is to
185
                                   //  be treated as Color Key, inclusive
177
                                   // be treated as Color Key, inclusive
186
    dwColorSpaceHighValue: DWORD;  // high boundary of color space that is
178
    dwColorSpaceHighValue: DWORD;  // high boundary of color space that is
187
                                   //  to be treated as Color Key, inclusive
179
                                   // to be treated as Color Key, inclusive
188
  end;
180
  end;
189
 
181
 
190
  DDCOLORKEY = TDDColorKey;
182
// Delphi 5 can't handle interface in variant records
191
  LPDDCOLORKEY = PDDColorKey;
183
// so we have to use pointers instead (which can be type-casted into interfaces):
192
 
184
 
193
{ TDDBltFX structure }
185
{$IFDEF VER5UP}
-
 
186
  PDirectDrawSurface = Pointer;              
-
 
187
{$ELSE}
-
 
188
  PDirectDrawSurface = IDirectDrawSurface;
-
 
189
{$ENDIF}
194
 
190
 
-
 
191
(*
-
 
192
 * TDDBltFX
-
 
193
 * Used to pass override information to the DIRECTDRAWSURFACE callback Blt.
-
 
194
 *)
195
  PDDBltFX = ^TDDBltFX;
195
  PDDBltFX = ^TDDBltFX;
196
  TDDBltFX = record
196
  TDDBltFX = packed record
197
    dwSize: DWORD;                           // size of structure
197
    dwSize                        : DWORD;     // size of structure
198
    dwDDFX: DWORD;                           // FX operations
198
    dwDDFX                        : DWORD;     // FX operations
199
    dwROP: DWORD;                            // Win32 raster operations
199
    dwROP                         : DWORD;     // Win32 raster operations
200
    dwDDROP: DWORD;                          // Raster operations new for DirectDraw
200
    dwDDROP                       : DWORD;     // Raster operations new for DirectDraw
201
    dwRotationAngle: DWORD;                  // Rotation angle for blt
201
    dwRotationAngle               : DWORD;     // Rotation angle for blt
202
    dwZBufferOpCode: DWORD;                  // ZBuffer compares
202
    dwZBufferOpCode               : DWORD;     // ZBuffer compares
203
    dwZBufferLow: DWORD;                     // Low limit of Z buffer
203
    dwZBufferLow                  : DWORD;     // Low limit of Z buffer
204
    dwZBufferHigh: DWORD;                    // High limit of Z buffer
204
    dwZBufferHigh                 : DWORD;     // High limit of Z buffer
205
    dwZBufferBaseDest: DWORD;                // Destination base value
205
    dwZBufferBaseDest             : DWORD;     // Destination base value
206
    dwZDestConstBitDepth: DWORD;             // Bit depth used to specify Z constant for destination
206
    dwZDestConstBitDepth          : DWORD;     // Bit depth used to specify Z constant for destination
207
    case Integer of
207
    case integer of
208
    0: (
208
    0: (
209
      dwZDestConst: DWORD;                   // Constant to use as Z buffer for dest
209
      dwZDestConst                : DWORD      // Constant to use as Z buffer for dest
-
 
210
     );
-
 
211
    1: (
-
 
212
      lpDDSZBufferDest            : PDirectDrawSurface; // Surface to use as Z buffer for dest
210
      dwZSrcConstBitDepth: DWORD;            // Bit depth used to specify Z constant for source
213
      dwZSrcConstBitDepth         : DWORD;     // Bit depth used to specify Z constant for source
-
 
214
      case integer of
-
 
215
      0: (
211
      dwZSrcConst: DWORD;                    // Constant to use as Z buffer for src
216
        dwZSrcConst               : DWORD;     // Constant to use as Z buffer for src
-
 
217
       );
-
 
218
      1: (
-
 
219
        lpDDSZBufferSrc           : PDirectDrawSurface; // Surface to use as Z buffer for src
212
      dwAlphaEdgeBlendBitDepth: DWORD;       // Bit depth used to specify constant for alpha edge blend
220
        dwAlphaEdgeBlendBitDepth  : DWORD;     // Bit depth used to specify constant for alpha edge blend
213
      dwAlphaEdgeBlend: DWORD;               // Alpha for edge blending
221
        dwAlphaEdgeBlend          : DWORD;     // Alpha for edge blending
214
      dwReserved: DWORD;
222
        dwReserved                : DWORD;
215
      dwAlphaDestConstBitDepth: DWORD;       // Bit depth used to specify alpha constant for destination
223
        dwAlphaDestConstBitDepth  : DWORD;     // Bit depth used to specify alpha constant for destination
-
 
224
        case integer of
-
 
225
        0: (
216
      dwAlphaDestConst: DWORD;               // Constant to use as Alpha Channel
226
          dwAlphaDestConst        : DWORD;     // Constant to use as Alpha Channel
-
 
227
         );
-
 
228
        1: (
-
 
229
          lpDDSAlphaDest          : PDirectDrawSurface; // Surface to use as Alpha Channel
217
      dwAlphaSrcConstBitDepth: DWORD;        // Bit depth used to specify alpha constant for source
230
          dwAlphaSrcConstBitDepth : DWORD;     // Bit depth used to specify alpha constant for source
-
 
231
          case integer of
-
 
232
          0: (
218
      dwAlphaSrcConst: DWORD;                // Constant to use as Alpha Channel
233
            dwAlphaSrcConst       : DWORD;     // Constant to use as Alpha Channel
-
 
234
          );
-
 
235
          1: (
-
 
236
            lpDDSAlphaSrc         : PDirectDrawSurface; // Surface to use as Alpha Channel
-
 
237
            case integer of
-
 
238
            0: (
219
      dwFillColor: DWORD;                    // color in RGB or Palettized
239
              dwFillColor         : DWORD;     // color in RGB or Palettized
220
      ddckDestColorkey: TDDColorKey;          // DestColorkey override
-
 
221
      ddckSrcColorkey: TDDColorKey;           // SrcColorkey override
-
 
222
      );
240
            );
223
    1: (
241
            1: (
224
      lpDDSZBufferDest: Pointer{IDirectDrawSurface};  // Surface to use as Z buffer for dest
-
 
225
      _union1b: DWORD;
-
 
226
      lpDDSZBufferSrc: Pointer{IDirectDrawSurface};   // Surface to use as Z buffer for src
-
 
227
      _union1d: DWORD;
-
 
228
      _union1e: DWORD;
-
 
229
      _union1f: DWORD;
-
 
230
      _union1g: DWORD;
-
 
231
      lpDDSAlphaDest: Pointer{IDirectDrawSurface};    // Surface to use as Alpha Channel
-
 
232
      _union1i: DWORD;
-
 
233
      lpDDSAlphaSrc: Pointer{IDirectDrawSurface};     // Surface to use as Alpha Channel
-
 
234
      dwFillDepth: DWORD;                    // depth value for z-buffer
242
              dwFillDepth         : DWORD;     // depth value for z-buffer
235
      );
243
            );
236
    2: (
244
            2: (
237
      _union2a: DWORD;
-
 
238
      _union2b: DWORD;
-
 
239
      _union2c: DWORD;
-
 
240
      _union2d: DWORD;
-
 
241
      _union2e: DWORD;
-
 
242
      _union2f: DWORD;
-
 
243
      _union2g: DWORD;
-
 
244
      _union2h: DWORD;
-
 
245
      _union2i: DWORD;
-
 
246
      _union2j: DWORD;
-
 
247
      lpDDSPattern: Pointer{IDirectDrawSurface};       // Surface to use as pattern
245
              dwFillPixel         : DWORD;     // pixel value
248
      );
246
            );
-
 
247
            3: (
-
 
248
              lpDDSPattern        : PDirectDrawSurface; // Surface to use as pattern
-
 
249
              ddckDestColorkey    : TDDColorKey; // DestColorkey override
-
 
250
              ddckSrcColorkey     : TDDColorKey; // SrcColorkey override
-
 
251
            )
-
 
252
        )
-
 
253
      )
-
 
254
    )
-
 
255
  )
249
  end;
256
  end;
250
 
257
 
251
  DDBLTFX = TDDBltFX;
-
 
252
  LPDDBLTFX = PDDBltFX;
-
 
253
 
258
(*
254
{ TDDSCaps structure }
259
 * TDDSCaps
255
 
260
 *)
256
  PDDSCaps = ^TDDSCaps;
261
  PDDSCaps = ^TDDSCaps;
257
  TDDSCaps = record
262
  TDDSCaps = packed record
258
    dwCaps: DWORD;         // capabilities of surface wanted
263
    dwCaps: DWORD;         // capabilities of surface wanted
259
  end;
264
  end;
260
 
265
 
-
 
266
(*
261
  DDSCAPS = TDDSCaps;
267
 * TDDOSCaps
262
  LPDDSCAPS = PDDSCaps;
-
 
263
{ TDDOSCaps structure }
-
 
264
 
268
 *)
265
  PDDOSCaps = ^TDDOSCaps;
269
  PDDOSCaps = ^TDDOSCaps;
266
  TDDOSCaps = record
270
  TDDOSCaps = packed record
267
    dwCaps: DWORD;         // capabilities of surface wanted
271
    dwCaps: DWORD;         // capabilities of surface wanted
268
  end;
272
  end;
269
 
273
 
270
  DDOSCAPS = TDDOSCaps;
-
 
271
  LPDDOSCAPS = PDDOSCaps;
-
 
272
 
-
 
273
 
274
(*
274
{ TDDSCapsEx structure }
275
 * This structure is used internally by DirectDraw.
275
 
276
 *)
276
  PDDSCapsEx = ^TDDSCapsEx;
277
  PDDSCapsEx = ^TDDSCapsEx;
277
  TDDSCapsEx = record
278
  TDDSCapsEx = packed record
278
    dwCaps2: DWORD;
279
    dwCaps2 : DWORD;
279
    dwCaps3: DWORD;
280
    dwCaps3 : DWORD;
280
    dwCaps4: DWORD;
281
    dwCaps4 : DWORD;
281
  end;
282
  end;
282
 
283
 
283
  DDSCAPSEX = TDDSCapsEx;
-
 
284
  LPDDSCAPSEX = PDDSCapsEx;
-
 
285
 
284
(*
286
{ TDDSCaps2 structure }
285
 * TDDSCaps2
287
 
286
 *)
288
  PDDSCaps2 = ^TDDSCaps2;
287
  PDDSCaps2 = ^TDDSCaps2;
289
  TDDSCaps2 = record
288
  TDDSCaps2 = packed record
290
    dwCaps: DWORD;         // capabilities of surface wanted
289
    dwCaps: DWORD;         // capabilities of surface wanted
291
    dwCaps2: DWORD;
290
    dwCaps2 : DWORD;
292
    dwCaps3: DWORD;
291
    dwCaps3 : DWORD;
293
    dwCaps4: DWORD;
292
    dwCaps4 : DWORD;
294
  end;
293
  end;
295
 
294
 
296
  DDSCAPS2 = TDDSCaps2;
-
 
297
  LPDDSCAPS2 = PDDSCaps2;
-
 
298
 
295
(*
299
{ TDDCaps structure }
296
 * TDDCaps
-
 
297
 *)
300
 
298
(*
301
  PDDCaps_DX1 = ^TDDCaps_DX1;
-
 
302
  TDDCaps_DX1 = record
-
 
303
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
-
 
304
    dwCaps: DWORD;                 // driver specific capabilities
-
 
305
    dwCaps2: DWORD;                // more driver specific capabilites
-
 
306
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
-
 
307
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
-
 
308
    dwFXAlphaCaps: DWORD;          // alpha driver specific capabilities
-
 
309
    dwPalCaps: DWORD;              // palette capabilities
-
 
310
    dwSVCaps: DWORD;               // stereo vision capabilities
-
 
311
    dwAlphaBltConstBitDepths: DWORD;       // DDBD_2,4,8
-
 
312
    dwAlphaBltPixelBitDepths: DWORD;       // DDBD_1,2,4,8
-
 
313
    dwAlphaBltSurfaceBitDepths: DWORD;     // DDBD_1,2,4,8
-
 
314
    dwAlphaOverlayConstBitDepths: DWORD;   // DDBD_2,4,8
-
 
315
    dwAlphaOverlayPixelBitDepths: DWORD;   // DDBD_1,2,4,8
-
 
316
    dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
-
 
317
    dwZBufferBitDepths: DWORD;             // DDBD_8,16,24,32
-
 
318
    dwVidMemTotal: DWORD;          // total amount of video memory
-
 
319
    dwVidMemFree: DWORD;           // amount of free video memory
-
 
320
    dwMaxVisibleOverlays: DWORD;   // maximum number of visible overlays
-
 
321
    dwCurrVisibleOverlays: DWORD;  // current number of visible overlays
-
 
322
    dwNumFourCCCodes: DWORD;       // number of four cc codes
-
 
323
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
-
 
324
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
-
 
325
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
-
 
326
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
-
 
327
    dwAlignStrideAlign: DWORD;     // stride alignment
-
 
328
    dwRops: array[0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
-
 
329
    ddsCaps: TDDSCaps;             // TDDSCaps structure has all the general capabilities
299
 * This structure is the TDDCaps structure as it was in version 2 and 3 of Direct X.
330
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
331
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
332
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
333
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
334
    dwMinHwCodecStretch: DWORD;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
335
    dwMaxHwCodecStretch: DWORD;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
336
    dwReserved1: DWORD;            // reserved
-
 
337
    dwReserved2: DWORD;            // reserved
-
 
338
    dwReserved3: DWORD;            // reserved
300
 * It is present for back compatability.
339
  end;
301
 *)
340
 
-
 
341
  PDDCaps_DX3 = ^TDDCaps_DX3;
302
  PDDCaps_DX3 = ^TDDCaps_DX3;
342
  TDDCaps_DX3 = record
303
  TDDCaps_DX3 = packed record
343
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
304
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
344
    dwCaps: DWORD;                 // driver specific capabilities
305
    dwCaps: DWORD;                 // driver specific capabilities
345
    dwCaps2: DWORD;                // more driver specific capabilites
306
    dwCaps2: DWORD;                // more driver specific capabilites
346
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
307
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
347
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
308
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
Line 363... Line 324...
363
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
324
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
364
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
325
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
365
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
326
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
366
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
327
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
367
    dwAlignStrideAlign: DWORD;     // stride alignment
328
    dwAlignStrideAlign: DWORD;     // stride alignment
368
    dwRops: array[0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
329
    dwRops: Array [0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
369
    ddsCaps: TDDSCaps;             // TDDSCaps structure has all the general capabilities
330
    ddsCaps: TDDSCaps;             // TDDSCaps structure has all the general capabilities
370
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
331
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
371
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
332
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
372
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
333
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
373
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
334
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
Line 377... Line 338...
377
    dwReserved2: DWORD;            // reserved
338
    dwReserved2: DWORD;            // reserved
378
    dwReserved3: DWORD;            // reserved
339
    dwReserved3: DWORD;            // reserved
379
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
340
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
380
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
341
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
381
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
342
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
382
    dwSVBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
343
    dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
383
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
344
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
384
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
345
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
385
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
346
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
386
    dwVSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
347
    dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
387
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
348
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
388
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
349
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
389
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
350
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
390
    dwSSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
351
    dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
391
    dwReserved4: DWORD;            // reserved
352
    dwReserved4 : DWORD;
392
    dwReserved5: DWORD;            // reserved
353
    dwReserved5 : DWORD;
393
    dwReserved6: DWORD;            // reserved
354
    dwReserved6 : DWORD;
394
  end;
355
  end;
395
 
356
 
-
 
357
(*
-
 
358
 * This structure is the TDDCaps structure as it was in version 5 of Direct X.
-
 
359
 * It is present for back compatability.
-
 
360
 *)
396
  PDDCaps_DX5 = ^TDDCaps_DX5;
361
  PDDCaps_DX5 = ^TDDCaps_DX5;
397
  TDDCaps_DX5 = record
362
  TDDCaps_DX5 = packed record
398
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
363
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
399
    dwCaps: DWORD;                 // driver specific capabilities
364
    dwCaps: DWORD;                 // driver specific capabilities
400
    dwCaps2: DWORD;                // more driver specific capabilites
365
    dwCaps2: DWORD;                // more driver specific capabilites
401
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
366
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
402
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
367
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
Line 418... Line 383...
418
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
383
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
419
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
384
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
420
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
385
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
421
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
386
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
422
    dwAlignStrideAlign: DWORD;     // stride alignment
387
    dwAlignStrideAlign: DWORD;     // stride alignment
423
    dwRops: array[0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
388
    dwRops: Array [0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
424
    ddsCaps: TDDSCaps;             // TDDSCaps structure has all the general capabilities
389
    ddsCaps: TDDSCaps;             // TDDSCaps structure has all the general capabilities
425
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
390
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
426
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
391
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
427
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
392
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
428
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
393
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
Line 432... Line 397...
432
    dwReserved2: DWORD;            // reserved
397
    dwReserved2: DWORD;            // reserved
433
    dwReserved3: DWORD;            // reserved
398
    dwReserved3: DWORD;            // reserved
434
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
399
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
435
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
400
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
436
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
401
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
437
    dwSVBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
402
    dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
438
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
403
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
439
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
404
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
440
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
405
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
441
    dwVSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
406
    dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
442
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
407
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
443
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
408
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
444
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
409
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
445
    dwSSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
410
    dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
446
    { Members added for DX5 }
411
    // Members added for DX5:
447
    dwMaxVideoPorts: DWORD;        // maximum number of usable video ports
412
    dwMaxVideoPorts: DWORD;        // maximum number of usable video ports
448
    dwCurrVideoPorts: DWORD;       // current number of video ports used
413
    dwCurrVideoPorts: DWORD;       // current number of video ports used
449
    dwSVBCaps2: DWORD;             // more driver specific capabilities for System->Vmem blts
414
    dwSVBCaps2: DWORD;             // more driver specific capabilities for System->Vmem blts
450
    dwNLVBCaps: DWORD;             // driver specific capabilities for non-local->local vidmem blts
415
    dwNLVBCaps: DWORD;             // driver specific capabilities for non-local->local vidmem blts
451
    dwNLVBCaps2: DWORD;            // more driver specific capabilities non-local->local vidmem blts
416
    dwNLVBCaps2: DWORD;            // more driver specific capabilities non-local->local vidmem blts
452
    dwNLVBCKeyCaps: DWORD;         // driver color key capabilities for non-local->local vidmem blts
417
    dwNLVBCKeyCaps: DWORD;         // driver color key capabilities for non-local->local vidmem blts
453
    dwNLVBFXCaps: DWORD;           // driver FX capabilities for non-local->local blts
418
    dwNLVBFXCaps: DWORD;           // driver FX capabilities for non-local->local blts
454
    dwNLVBRops: array[0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
419
    dwNLVBRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
455
  end;
420
  end;
456
 
421
 
457
  PDDCaps_DX6 = ^TDDCaps_DX6;
422
  PDDCaps_DX6 = ^TDDCaps_DX6;
458
  TDDCaps_DX6 = record
423
  TDDCaps_DX6 = packed record
459
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
-
 
460
    dwCaps: DWORD;                 // driver specific capabilities
-
 
461
    dwCaps2: DWORD;                // more driver specific capabilites
-
 
462
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
-
 
463
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
-
 
464
    dwFXAlphaCaps: DWORD;          // alpha caps
-
 
465
    dwPalCaps: DWORD;              // palette capabilities
-
 
466
    dwSVCaps: DWORD;               // stereo vision capabilities
-
 
467
    dwAlphaBltConstBitDepths: DWORD;       // DDBD_2,4,8
-
 
468
    dwAlphaBltPixelBitDepths: DWORD;       // DDBD_1,2,4,8
-
 
469
    dwAlphaBltSurfaceBitDepths: DWORD;     // DDBD_1,2,4,8
-
 
470
    dwAlphaOverlayConstBitDepths: DWORD;   // DDBD_2,4,8
-
 
471
    dwAlphaOverlayPixelBitDepths: DWORD;   // DDBD_1,2,4,8
-
 
472
    dwAlphaOverlaySurfaceBitDepths: DWORD; // DDBD_1,2,4,8
-
 
473
    dwZBufferBitDepths: DWORD;             // DDBD_8,16,24,32
-
 
474
    dwVidMemTotal: DWORD;          // total amount of video memory
-
 
475
    dwVidMemFree: DWORD;           // amount of free video memory
-
 
476
    dwMaxVisibleOverlays: DWORD;   // maximum number of visible overlays
-
 
477
    dwCurrVisibleOverlays: DWORD;  // current number of visible overlays
-
 
478
    dwNumFourCCCodes: DWORD;       // number of four cc codes
-
 
479
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
-
 
480
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
-
 
481
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
-
 
482
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
-
 
483
    dwAlignStrideAlign: DWORD;     // stride alignment
-
 
484
    dwRops: array[0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
-
 
485
    ddsOldCaps: TDDSCaps;          // Was TDDSCaps ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
-
 
486
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
487
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
488
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
489
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
490
    dwMinHwCodecStretch: DWORD;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
491
    dwMaxHwCodecStretch: DWORD;    // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
-
 
492
    dwReserved1: DWORD;            // reserved
-
 
493
    dwReserved2: DWORD;            // reserved
-
 
494
    dwReserved3: DWORD;            // reserved
-
 
495
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
-
 
496
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
-
 
497
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
-
 
498
    dwSVBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
-
 
499
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
-
 
500
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
-
 
501
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
-
 
502
    dwVSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
-
 
503
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
-
 
504
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
-
 
505
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
-
 
506
    dwSSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
-
 
507
    { Members added for DX5 }
-
 
508
    dwMaxVideoPorts: DWORD;        // maximum number of usable video ports
-
 
509
    dwCurrVideoPorts: DWORD;       // current number of video ports used
-
 
510
    dwSVBCaps2: DWORD;             // more driver specific capabilities for System->Vmem blts
-
 
511
    dwNLVBCaps: DWORD;             // driver specific capabilities for non-local->local vidmem blts
-
 
512
    dwNLVBCaps2: DWORD;            // more driver specific capabilities non-local->local vidmem blts
-
 
513
    dwNLVBCKeyCaps: DWORD;         // driver color key capabilities for non-local->local vidmem blts
-
 
514
    dwNLVBFXCaps: DWORD;           // driver FX capabilities for non-local->local blts
-
 
515
    dwNLVBRops: array[0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
-
 
516
    { Members added for DX6 }
-
 
517
    ddsCaps: TDDSCaps2;            // Surface Caps
-
 
518
  end;
-
 
519
 
-
 
520
  PDDCaps_DX7 = ^TDDCaps_DX7;
-
 
521
  TDDCaps_DX7 = record
-
 
522
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
424
    dwSize: DWORD;                 // size of the DDDRIVERCAPS structure
523
    dwCaps: DWORD;                 // driver specific capabilities
425
    dwCaps: DWORD;                 // driver specific capabilities
524
    dwCaps2: DWORD;                // more driver specific capabilites
426
    dwCaps2: DWORD;                // more driver specific capabilites
525
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
427
    dwCKeyCaps: DWORD;             // color key capabilities of the surface
526
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
428
    dwFXCaps: DWORD;               // driver specific stretching and effects capabilites
Line 542... Line 444...
542
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
444
    dwAlignBoundarySrc: DWORD;     // source rectangle alignment
543
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
445
    dwAlignSizeSrc: DWORD;         // source rectangle byte size
544
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
446
    dwAlignBoundaryDest: DWORD;    // dest rectangle alignment
545
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
447
    dwAlignSizeDest: DWORD;        // dest rectangle byte size
546
    dwAlignStrideAlign: DWORD;     // stride alignment
448
    dwAlignStrideAlign: DWORD;     // stride alignment
547
    dwRops: array[0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
449
    dwRops: Array [0..DD_ROP_SPACE-1] of DWORD;   // ROPS supported
548
    ddsOldCaps: TDDSCaps;          // Was TDDSCaps ddsCaps. ddsCaps is of type DDSCAPS2 for DX6
450
    ddsOldCaps: TDDSCaps;          // Was dssCaps: TDDSCaps. ddsCaps is of type TDDScaps2 for DX6
549
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
451
    dwMinOverlayStretch: DWORD;    // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
550
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
452
    dwMaxOverlayStretch: DWORD;    // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
551
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
453
    dwMinLiveVideoStretch: DWORD;  // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
552
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
454
    dwMaxLiveVideoStretch: DWORD;  // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
553
    dwMinHwCodecStretch: DWORD;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
455
    dwMinHwCodecStretch: DWORD;    // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3
Line 556... Line 458...
556
    dwReserved2: DWORD;            // reserved
458
    dwReserved2: DWORD;            // reserved
557
    dwReserved3: DWORD;            // reserved
459
    dwReserved3: DWORD;            // reserved
558
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
460
    dwSVBCaps: DWORD;              // driver specific capabilities for System->Vmem blts
559
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
461
    dwSVBCKeyCaps: DWORD;          // driver color key capabilities for System->Vmem blts
560
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
462
    dwSVBFXCaps: DWORD;            // driver FX capabilities for System->Vmem blts
561
    dwSVBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
463
    dwSVBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->Vmem blts
562
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
464
    dwVSBCaps: DWORD;              // driver specific capabilities for Vmem->System blts
563
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
465
    dwVSBCKeyCaps: DWORD;          // driver color key capabilities for Vmem->System blts
564
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
466
    dwVSBFXCaps: DWORD;            // driver FX capabilities for Vmem->System blts
565
    dwVSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
467
    dwVSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for Vmem->System blts
566
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
468
    dwSSBCaps: DWORD;              // driver specific capabilities for System->System blts
567
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
469
    dwSSBCKeyCaps: DWORD;          // driver color key capabilities for System->System blts
568
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
470
    dwSSBFXCaps: DWORD;            // driver FX capabilities for System->System blts
569
    dwSSBRops: array[0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
471
    dwSSBRops: Array [0..DD_ROP_SPACE-1] of DWORD;// ROPS supported for System->System blts
570
    { Members added for DX5 }
472
    // Members added for DX5:
571
    dwMaxVideoPorts: DWORD;        // maximum number of usable video ports
473
    dwMaxVideoPorts: DWORD;        // maximum number of usable video ports
572
    dwCurrVideoPorts: DWORD;       // current number of video ports used
474
    dwCurrVideoPorts: DWORD;       // current number of video ports used
573
    dwSVBCaps2: DWORD;             // more driver specific capabilities for System->Vmem blts
475
    dwSVBCaps2: DWORD;             // more driver specific capabilities for System->Vmem blts
574
    dwNLVBCaps: DWORD;             // driver specific capabilities for non-local->local vidmem blts
476
    dwNLVBCaps: DWORD;             // driver specific capabilities for non-local->local vidmem blts
575
    dwNLVBCaps2: DWORD;            // more driver specific capabilities non-local->local vidmem blts
477
    dwNLVBCaps2: DWORD;            // more driver specific capabilities non-local->local vidmem blts
576
    dwNLVBCKeyCaps: DWORD;         // driver color key capabilities for non-local->local vidmem blts
478
    dwNLVBCKeyCaps: DWORD;         // driver color key capabilities for non-local->local vidmem blts
577
    dwNLVBFXCaps: DWORD;           // driver FX capabilities for non-local->local blts
479
    dwNLVBFXCaps: DWORD;           // driver FX capabilities for non-local->local blts
578
    dwNLVBRops: array[0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
480
    dwNLVBRops: Array [0..DD_ROP_SPACE-1] of DWORD; // ROPS supported for non-local->local blts
579
    { Members added for DX6 }
481
    // Members added for DX6 release
580
    ddsCaps: TDDSCaps2;            // Surface Caps
482
    ddsCaps : TDDSCaps2 ;          // Surface Caps
581
  end;
483
  end;
582
 
484
 
583
{$IFDEF DirectX1}
-
 
584
  TDDCaps = TDDCaps_DX1;
485
  TDDCaps_DX7 = TDDCaps_DX6;
-
 
486
 
585
  PDDCaps = PDDCaps_DX1;
487
  PDDCaps = ^TDDCaps;
-
 
488
 
586
{$ENDIF}{$IFDEF DirectX3}
489
{$IFDEF DIRECTX3}
587
  TDDCaps = TDDCaps_DX3;
490
  TDDCaps = TDDCaps_DX3;
588
  PDDCaps = PDDCaps_DX3;
491
{$ELSE}
589
{$ENDIF}{$IFDEF DirectX5}
492
  {$IFDEF DIRECTX5}
590
  TDDCaps = TDDCaps_DX5;
493
    TDDCaps = TDDCaps_DX5;
591
  PDDCaps = PDDCaps_DX5;
494
  {$ELSE}
592
{$ENDIF}{$IFDEF DirectX6}
495
    {$IFDEF DIRECTX6}
593
  TDDCaps = TDDCaps_DX6;
496
      TDDCaps = TDDCaps_DX6;
594
  PDDCaps = PDDCaps_DX6;
497
    {$ELSE}
595
{$ENDIF}{$IFDEF DirectX7}
-
 
596
  TDDCaps = TDDCaps_DX7;
498
      TDDCaps = TDDCaps_DX7;
597
  PDDCaps = PDDCaps_DX7;
499
    {$ENDIF}
-
 
500
  {$ENDIF}
598
{$ENDIF}
501
{$ENDIF}
599
 
502
 
600
  DDCAPS = TDDCaps;
-
 
601
  LPDDCAPS = PDDCaps;
-
 
602
 
503
 
603
{ TDDPixelFormat structure }
-
 
604
 
504
 
-
 
505
 
-
 
506
(*
-
 
507
 * TDDPixelFormat
-
 
508
 *)
605
  PDDPixelFormat = ^TDDPixelFormat;
509
  PDDPixelFormat_DX5 = ^TDDPixelFormat_DX5;
606
  TDDPixelFormat = record
510
  TDDPixelFormat_DX5 = packed record
607
    dwSize: DWORD;                // size of structure
511
    dwSize: DWORD;                 // size of structure
608
    dwFlags: DWORD;               // pixel format flags
512
    dwFlags: DWORD;                // pixel format flags
609
    dwFourCC: DWORD;              // (FOURCC code)
513
    dwFourCC: DWORD;               // (FOURCC code)
610
    case Integer of
514
    case Integer of
611
      0: (
515
    0: (
-
 
516
      dwZBufferBitDepth: DWORD;      // how many bits for z buffers
-
 
517
     );
-
 
518
    1: (
-
 
519
      dwAlphaBitDepth: DWORD;        // how many bits for alpha channels
-
 
520
     );
-
 
521
    2: (
612
        dwRGBBitCount: DWORD;          // how many bits per pixel
522
      dwRGBBitCount: DWORD;          // how many bits per pixel
613
        dwRBitMask: DWORD;             // mask for red bit
523
      dwRBitMask: DWORD;             // mask for red bit
614
        dwGBitMask: DWORD;             // mask for green bits
524
      dwGBitMask: DWORD;             // mask for green bits
615
        dwBBitMask: DWORD;             // mask for blue bits
525
      dwBBitMask: DWORD;             // mask for blue bits
616
        dwRGBAlphaBitMask: DWORD;      // mask for alpha channel
526
      dwRGBAlphaBitMask: DWORD;      // mask for alpha channel
617
        );
527
     );
-
 
528
    3: (
-
 
529
      dwYUVBitCount: DWORD;          // how many bits per pixel
-
 
530
      dwYBitMask: DWORD;             // mask for Y bits
-
 
531
      dwUBitMask: DWORD;             // mask for U bits
-
 
532
      dwVBitMask: DWORD;             // mask for V bits
-
 
533
      case Integer of
-
 
534
      0: (
-
 
535
        dwYUVAlphaBitMask: DWORD;      // mask for alpha channel
-
 
536
       );
618
      1: (
537
      1: (
619
        _union1a: DWORD;
538
        dwRGBZBitMask: DWORD;
-
 
539
       );
-
 
540
      2: (
620
        _union1b: DWORD;
541
        dwYUVZBitMask: DWORD;
-
 
542
       );
-
 
543
     );
-
 
544
  end;
-
 
545
 
-
 
546
  PDDPixelFormat_DX6 = ^TDDPixelFormat_DX6;
-
 
547
  TDDPixelFormat_DX6 = packed record
-
 
548
    dwSize: DWORD;                 // size of structure
-
 
549
    dwFlags: DWORD;                // pixel format flags
-
 
550
    dwFourCC: DWORD;               // (FOURCC code)
621
        _union1c: DWORD;
551
    case Integer of
622
        _union1d: DWORD;
552
      1: (
-
 
553
          dwRGBBitCount : DWORD;  // how many bits per pixel
-
 
554
          dwRBitMask : DWORD;  // mask for red bit
-
 
555
          dwGBitMask : DWORD;  // mask for green bits
-
 
556
          dwBBitMask : DWORD;  // mask for blue bits
623
        dwRGBZBitMask: DWORD;          // mask for Z channel
557
          dwRGBAlphaBitMask : DWORD; // mask for alpha channel
624
        );
558
          );
625
      2: (
559
      2: (
626
        dwYUVBitCount: DWORD;          // how many bits per pixel
560
          dwYUVBitCount : DWORD;  // how many bits per pixel
627
        dwYBitMask: DWORD;             // mask for Y bits
561
          dwYBitMask : DWORD;  // mask for Y bits
628
        dwUBitMask: DWORD;             // mask for U bits
562
          dwUBitMask : DWORD;  // mask for U bits
629
        dwVBitMask: DWORD;             // mask for V bits
563
          dwVBitMask : DWORD;  // mask for V bits
630
        dwYUVAlphaBitMask: DWORD;      // mask for alpha channel
564
          dwYUVAlphaBitMask : DWORD; // mask for alpha channel
631
        );
565
          );
632
      3: (
566
      3: (
633
        _union3a: DWORD;
-
 
634
        _union3b: DWORD;
-
 
635
        _union3c: DWORD;
-
 
636
        _union3d: DWORD;
-
 
637
        dwYUVZBitMask: DWORD;          // mask for Z channel
-
 
638
        );
-
 
639
      4: (
-
 
640
        dwZBufferBitDepth: DWORD;      // how many bits for z buffers
567
          dwZBufferBitDepth : DWORD; // how many total bits/pixel in z buffer (including any stencil bits)
641
        dwStencilBitDepth: DWORD;      // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
568
          dwStencilBitDepth : DWORD; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
642
        dwZBitMask: DWORD;             // mask for Z bits
569
          dwZBitMask : DWORD;  // mask for Z bits
643
        dwStencilBitMask: DWORD;       // mask for stencil bits
570
          dwStencilBitMask : DWORD; // mask for stencil bits
-
 
571
          dwLuminanceAlphaBitMask : DWORD;// mask for alpha channel
644
        );
572
          );
645
      5: (
573
      4: (
646
        dwAlphaBitDepth: DWORD;        // how many bits for alpha channels
574
          dwAlphaBitDepth : DWORD; // how many bits for alpha channels
647
        );
-
 
648
      6: (
-
 
649
        dwLuminanceBitCount: DWORD;    // how many bits per pixel
-
 
650
        dwLuminanceBitMask: DWORD;     // mask for luminance bits
575
          dwLuminanceBitMask : DWORD; // mask for luminance bits
651
        _union6c: DWORD;
-
 
652
        _union6d: DWORD;
-
 
653
        dwLuminanceAlphaBitMask: DWORD;
-
 
654
       );
-
 
655
      7: (
-
 
656
        dwBumpBitCount: DWORD;         // how many bits per "buxel", total
-
 
657
        dwBumpDuBitMask: DWORD;        // mask for bump map U delta bits
-
 
658
        dwBumpDvBitMask: DWORD;        // mask for bump map V delta bits
576
          dwBumpDvBitMask : DWORD;        // mask for bump map V delta bits
659
        dwBumpLuminanceBitMask: DWORD; // mask for luminance in bump map
577
          dwBumpLuminanceBitMask : DWORD; // mask for luminance in bump map
-
 
578
          dwRGBZBitMask : DWORD;  // mask for Z channel
-
 
579
          );
-
 
580
      5: (
-
 
581
           dwLuminanceBitCount : DWORD; // how many bits per pixel
-
 
582
           dwBumpDuBitMask : DWORD;       // mask for bump map U delta bits
-
 
583
           Fill1, Fill2    : DWORD;
-
 
584
           dwYUVZBitMask   : DWORD;  // mask for Z channel
-
 
585
         );
-
 
586
      6: ( dwBumpBitCount  : DWORD;         // how many bits per "buxel", total
660
       );
587
         );
661
  end;
588
  end;
662
 
589
 
663
  DDPIXELFORMAT = TDDPixelFormat;
590
  TDDPixelFormat_DX3 = TDDPixelFormat_DX5;
664
  LPDDPIXELFORMAT = PDDPixelFormat;
591
  TDDPixelFormat_DX7 = TDDPixelFormat_DX6;
665
 
592
 
-
 
593
  PDDPixelFormat = ^TDDPixelFormat;
-
 
594
{$IFDEF DIRECTX3}
-
 
595
  TDDPixelFormat = TDDPixelFormat_DX3;
-
 
596
{$ELSE}
-
 
597
  {$IFDEF DIRECTX5}
-
 
598
    TDDPixelFormat = TDDPixelFormat_DX5;
-
 
599
  {$ELSE}
666
{ DDOVERLAYFX structure }
600
    {$IFDEF DIRECTX6}
-
 
601
      TDDPixelFormat = TDDPixelFormat_DX6;
-
 
602
    {$ELSE}
-
 
603
      TDDPixelFormat = TDDPixelFormat_DX7;
-
 
604
    {$ENDIF}
-
 
605
  {$ENDIF}
-
 
606
{$ENDIF}
667
 
607
 
-
 
608
(*
-
 
609
 * TDDOverlayFX
-
 
610
 *)
668
  PDDOverlayFx = ^TDDOverlayFx;
611
  PDDOverlayFX = ^TDDOverlayFX;
669
  TDDOverlayFx = record
612
  TDDOverlayFX = packed record
670
    dwSize: DWORD;                         // size of structure
613
    dwSize: DWORD;                         // size of structure
671
    dwAlphaEdgeBlendBitDepth: DWORD;       // Bit depth used to specify constant for alpha edge blend
614
    dwAlphaEdgeBlendBitDepth: DWORD;       // Bit depth used to specify constant for alpha edge blend
672
    dwAlphaEdgeBlend: DWORD;               // Constant to use as alpha for edge blend
615
    dwAlphaEdgeBlend: DWORD;               // Constant to use as alpha for edge blend
673
    dwReserved: DWORD;
616
    dwReserved: DWORD;
674
    dwAlphaDestConstBitDepth: DWORD;       // Bit depth used to specify alpha constant for destination
617
    dwAlphaDestConstBitDepth: DWORD;       // Bit depth used to specify alpha constant for destination
Line 681... Line 624...
681
      dckSrcColorkey: TDDColorKey;         // DestColorkey override
624
      dckSrcColorkey: TDDColorKey;                 // DestColorkey override
682
      dwDDFX: DWORD;                       // Overlay FX
625
      dwDDFX: DWORD;                         // Overlay FX
683
      dwFlags: DWORD;                      // flags
626
      dwFlags: DWORD;                        // flags
684
      );
627
     );
685
    1: (
628
    1: (
686
      lpDDSAlphaDest: Pointer{IDirectDrawSurface};  // Surface to use as alpha channel for dest
629
      lpDDSAlphaDest: PDirectDrawSurface;     // Surface to use as alpha channel for dest
687
      _union1b: DWORD;
630
      filler: DWORD;
688
      lpDDSAlphaSrc: Pointer{IDirectDrawSurface};   // Surface to use as alpha channel for src
631
      lpDDSAlphaSrc: PDirectDrawSurface;      // Surface to use as alpha channel for src
689
      );
632
     );
690
  end;
633
  end;
691
 
634
 
692
  DDOVERLAYFX = TDDOverlayFx;
-
 
693
  LPDDOVERLAYFX = PDDOverlayFx;
-
 
694
 
635
(*
695
{ TDDBltBatch structure }
636
 * TDDBltBatch: BltBatch entry structure
696
 
637
 *)
697
  PDDBltBatch = ^TDDBltBatch;
638
  PDDBltBatch = ^TDDBltBatch;
698
  TDDBltBatch = record
639
  TDDBltBatch = packed record
699
    lprDest: PRect;
640
    lprDest: PRect;
700
    lpDDSSrc: IDirectDrawSurface;
641
    lpDDSSrc: IDirectDrawSurface;
701
    lprSrc: PRect;
642
    lprSrc: PRect;
702
    dwFlags: DWORD;
643
    dwFlags: DWORD;
703
    lpDDBltFx: PDDBltFX;
644
    lpDDBltFx: TDDBltFX;
704
  end;
-
 
705
 
-
 
706
  DDBLTBATCH = TDDBltBatch;
-
 
707
  LPDDBLTBATCH = PDDBltBatch;
-
 
708
 
-
 
709
{ TDDSurfaceDesc structure }
-
 
710
 
-
 
711
  PDDSurfaceDesc = ^TDDSurfaceDesc;
-
 
712
  TDDSurfaceDesc = record
-
 
713
    dwSize: DWORD;                   // size of the TDDSurfaceDesc structure
-
 
714
    dwFlags: DWORD;                  // determines what fields are valid
-
 
715
    dwHeight: DWORD;                 // height of surface to be created
-
 
716
    dwWidth: DWORD;                  // width of input surface
-
 
717
    case Integer of
-
 
718
      0: (
-
 
719
        lPitch: Longint;
-
 
720
        dwBackBufferCount: DWORD;        // number of back buffers requested
-
 
721
        case Integer of
-
 
722
        0: (
-
 
723
          dwMipMapCount: DWORD;          // number of mip-map levels requested
-
 
724
          dwAlphaBitDepth: DWORD;        // depth of alpha buffer requested
-
 
725
          dwReserved: DWORD;             // reserved
-
 
726
          lpSurface: Pointer;            // pointer to the associated surface memory
-
 
727
          ddckCKDestOverlay: TDDColorKey;// color key for destination overlay use
-
 
728
          ddckCKDestBlt: TDDColorKey;    // color key for destination blt use
-
 
729
          ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use
-
 
730
          ddckCKSrcBlt: TDDColorKey;     // color key for source blt use
-
 
731
          ddpfPixelFormat: TDDPixelFormat;// pixel format description of the surface
-
 
732
          ddsCaps: TDDSCaps;             // direct draw surface capabilities
-
 
733
          );
-
 
734
        1: (
-
 
735
          dwZBufferBitDepth: DWORD;      // depth of Z buffer requested
-
 
736
          );
-
 
737
        2: (
-
 
738
          dwRefreshRate: DWORD;          // refresh rate (used when display mode is described)
-
 
739
          );
-
 
740
      );
-
 
741
      1: (
-
 
742
        dwLinearSize: DWORD
-
 
743
      );
-
 
744
  end;
-
 
745
 
-
 
746
  DDSURFACEDESC = TDDSurfaceDesc;
-
 
747
  LPDDSURFACEDESC = PDDSurfaceDesc;
-
 
748
 
-
 
749
{ TDDSurfaceDesc2 structure }
-
 
750
 
-
 
751
  PDDSurfaceDesc2 = ^TDDSurfaceDesc2;
-
 
752
  TDDSurfaceDesc2 = record
-
 
753
    dwSize: DWORD;                   // size of the TDDSurfaceDesc2 structure
-
 
754
    dwFlags: DWORD;                  // determines what fields are valid
-
 
755
    dwHeight: DWORD;                 // height of surface to be created
-
 
756
    dwWidth: DWORD;                  // width of input surface
-
 
757
    case Integer of
-
 
758
      0: (
-
 
759
        lPitch: Longint;
-
 
760
        dwBackBufferCount: DWORD;        // number of back buffers requested
-
 
761
        case Integer of
-
 
762
        0: (
-
 
763
          dwMipMapCount: DWORD;          // number of mip-map levels requested
-
 
764
          dwAlphaBitDepth: DWORD;        // depth of alpha buffer requested
-
 
765
          dwReserved: DWORD;             // reserved
-
 
766
          lpSurface: Pointer;            // pointer to the associated surface memory
-
 
767
          ddckCKDestOverlay: TDDColorKey;// color key for destination overlay use
-
 
768
          ddckCKDestBlt: TDDColorKey;    // color key for destination blt use
-
 
769
          ddckCKSrcOverlay: TDDColorKey; // color key for source overlay use
-
 
770
          ddckCKSrcBlt: TDDColorKey;     // color key for source blt use
-
 
771
          ddpfPixelFormat: TDDPixelFormat;// pixel format description of the surface
-
 
772
          ddsCaps: TDDSCaps2;            // direct draw surface capabilities
-
 
773
          dwTextureStage: DWORD;         // stage in multitexture cascade
-
 
774
          );
-
 
775
        1: (
-
 
776
          dwRefreshRate: DWORD;          // refresh rate (used when display mode is described)
-
 
777
          );
-
 
778
      );
-
 
779
      1: (
-
 
780
        dwLinearSize: DWORD
-
 
781
      );
-
 
782
  end;
-
 
783
 
-
 
784
  DDSURFACEDESC2 = TDDSurfaceDesc2;
-
 
785
  LPDDSURFACEDESC2 = PDDSurfaceDesc2;
-
 
786
 
-
 
787
{ TDDOptSurfaceDesc structure }
-
 
788
 
-
 
789
  PDDOptSurfaceDesc = ^TDDOptSurfaceDesc;
-
 
790
  TDDOptSurfaceDesc = record
-
 
791
    dwSize: DWORD;             // size of the DDOPTSURFACEDESC structure
-
 
792
    dwFlags: DWORD;            // determines what fields are valid
-
 
793
    ddSCaps: TDDSCaps2;        // Common caps like: Memory type
-
 
794
    ddOSCaps: TDDOSCaps;       // Common caps like: Memory type
-
 
795
    guid: TGUID;               // Compression technique GUID
-
 
796
    dwCompressionRatio: DWORD; // Compression ratio
-
 
797
  end;
-
 
798
 
-
 
799
  DDOPTSURFACEDESC = TDDOptSurfaceDesc;
-
 
800
  LPDDOPTSURFACEDESC = PDDOptSurfaceDesc;
-
 
801
 
-
 
802
{ TDDColorControl structure }
-
 
803
 
-
 
804
  PDDColorControl = ^TDDColorControl;
-
 
805
  TDDColorControl = record
-
 
806
    dwSize: DWORD;
-
 
807
    dwFlags: DWORD;
-
 
808
    lBrightness: Longint;
-
 
809
    lContrast: Longint;
-
 
810
    lHue: Longint;
-
 
811
    lSaturation: Longint;
-
 
812
    lSharpness: Longint;
-
 
813
    lGamma: Longint;
-
 
814
    lColorEnable: Longint;
-
 
815
    dwReserved1: DWORD;
-
 
816
  end;
645
  end;
817
 
646
 
818
  DDCOLORCONTROL = TDDColorControl;
-
 
819
  LPDDCOLORCONTROL = PDDCOLORCONTROL;
-
 
820
 
647
(*
821
{ TDDGammaRamp structure }
648
 * TDDGammaRamp
822
 
649
 *)
823
  PDDGammaRamp = ^TDDGammaRamp;
650
  PDDGammaRamp = ^TDDGammaRamp;
824
  TDDGammaRamp = record
651
  TDDGammaRamp = packed record
825
    Red: array[0..255] of Word;
652
    red   : array[0..255] of WORD;
826
    Green: array[0..255] of Word;
653
    green : array[0..255] of WORD;
827
    Blue: array[0..255] of Word;
654
    blue  : array[0..255] of WORD;
828
  end;
655
  end;
829
 
656
 
830
  DDGAMMARAMP = TDDGammaRamp;
-
 
831
  LPDDGAMMARAMP = PDDGammaRamp;
-
 
832
 
657
(*
833
{ TDDDeviceIdentifier structure }
658
 *  This is the structure within which DirectDraw returns data about the current graphics driver and chipset
-
 
659
 *)
834
 
660
 
835
  PDDDeviceIdentifier = ^TDDDeviceIdentifier;
661
  PDDDeviceIdentifier = ^TDDDeviceIdentifier;
836
  TDDDeviceIdentifier = record
662
  TDDDeviceIdentifier = packed record
837
    //
663
    //
838
    // These elements are for presentation to the user only. They should not be used to identify particular
664
    // These elements are for presentation to the user only. They should not be used to identify particular
839
    // drivers, since this is unreliable and many different strings may be associated with the same
665
    // drivers, since this is unreliable and many different strings may be associated with the same
840
    // device, and the same driver from different vendors.
666
    // device, and the same driver from different vendors.
841
    //
667
    //
Line 874... Line 700...
874
    // This element can also be used to identify particular problematic drivers.
700
    // This element can also be used to identify particular problematic drivers.
875
    //
701
    //
876
    guidDeviceIdentifier: TGUID;
702
    guidDeviceIdentifier: TGUID;
877
  end;
703
  end;
878
 
704
 
879
  DDDEVICEIDENTIFIER = TDDDeviceIdentifier;
-
 
880
  LPDDDEVICEIDENTIFIER = PDDDeviceIdentifier;
-
 
881
 
-
 
882
{ TDDDeviceIdentifier2 structure }
-
 
883
 
-
 
884
  PDDDeviceIdentifier2 = ^TDDDeviceIdentifier2;
705
  PDDDeviceIdentifier2 = ^TDDDeviceIdentifier2;
885
  TDDDeviceIdentifier2 = record
706
  TDDDeviceIdentifier2 = packed record
886
    //
707
    //
887
    // These elements are for presentation to the user only. They should not be used to identify particular
708
    // These elements are for presentation to the user only. They should not be used to identify particular
888
    // drivers, since this is unreliable and many different strings may be associated with the same
709
    // drivers, since this is unreliable and many different strings may be associated with the same
889
    // device, and the same driver from different vendors.
710
    // device, and the same driver from different vendors.
890
    //
711
    //
Line 922... Line 743...
922
    // reprofile the graphics subsystem.
743
    // reprofile the graphics subsystem.
923
    // This element can also be used to identify particular problematic drivers.
744
    // This element can also be used to identify particular problematic drivers.
924
    //
745
    //
925
    guidDeviceIdentifier: TGUID;
746
    guidDeviceIdentifier: TGUID;
926
 
747
 
927
    //
748
    (*
928
    // This element is used to determine the Windows Hardware Quality Lab (WHQL)
749
     * This element is used to determine the Windows Hardware Quality Lab (WHQL)
929
    // certification level for this driver/device pair.
750
     * certification level for this driver/device pair.
930
    //
751
     *)
931
    dwWHQLLevel: DWORD;
752
    dwWHQLLevel: DWORD;
932
  end;
753
  end;
933
 
754
 
934
  DDDEVICEIDENTIFIER2 = TDDDeviceIdentifier2;
-
 
935
  LPDDDEVICEIDENTIFIER2 = PDDDeviceIdentifier2;
-
 
936
 
755
(*
937
{ Callbacks }
756
 * callbacks
938
 
757
 *)
939
  TClipperCallback = function(lpDDClipper: IDirectDrawClipper; hWnd: HWND;
758
  TClipperCallback = function(lpDDClipper: IDirectDrawClipper; hWnd: HWND;
940
      Code: DWORD; lpContext: Pointer): HResult; stdcall;
759
      Code: DWORD; lpContext: Pointer): HResult; stdcall;
941
  LPCLIPPERCALLBACK = TClipperCallback;
-
 
942
 
-
 
943
  TSurfacesStreamingCallback = function(Arg: DWORD): HResult; stdcall;
760
  TSurfacesStreamingCallback = function(Arg: DWORD): HResult; stdcall;
944
  LPSURFACESTREAMINGCALLBACK =TSurfacesStreamingCallback;
-
 
945
 
761
 
-
 
762
(*
-
 
763
 * TDDSurfaceDesc
-
 
764
 *)
-
 
765
  PDDSurfaceDesc_DX5 = ^TDDSurfaceDesc_DX5;
-
 
766
  TDDSurfaceDesc_DX5 = packed record
-
 
767
    dwSize: DWORD;                 // size of the TDDSurfaceDesc structure
-
 
768
    dwFlags: DWORD;                // determines what fields are valid
-
 
769
    dwHeight: DWORD;               // height of surface to be created
-
 
770
    dwWidth: DWORD;                // width of input surface
-
 
771
    case Integer of
-
 
772
    0: (
-
 
773
      dwLinearSize : DWORD;       // unused at the moment
-
 
774
     );
-
 
775
    1: (
-
 
776
      lPitch: LongInt;                 // distance to start of next line (return value only)
-
 
777
      dwBackBufferCount: DWORD;      // number of back buffers requested
-
 
778
      case Integer of
-
 
779
      0: (
-
 
780
        dwMipMapCount: DWORD;          // number of mip-map levels requested
-
 
781
        dwAlphaBitDepth: DWORD;        // depth of alpha buffer requested
-
 
782
        dwReserved: DWORD;             // reserved
-
 
783
        lpSurface: Pointer;              // pointer to the associated surface memory
-
 
784
        ddckCKDestOverlay: TDDColorKey;      // color key for destination overlay use
-
 
785
        ddckCKDestBlt: TDDColorKey;          // color key for destination blt use
-
 
786
        ddckCKSrcOverlay: TDDColorKey;       // color key for source overlay use
-
 
787
        ddckCKSrcBlt: TDDColorKey;           // color key for source blt use
-
 
788
        ddpfPixelFormat: TDDPixelFormat_DX5; // pixel format description of the surface
-
 
789
        ddsCaps: TDDSCaps;                // direct draw surface capabilities
-
 
790
       );
-
 
791
      1: (
-
 
792
        dwZBufferBitDepth: DWORD;      // depth of Z buffer requested
-
 
793
       );
-
 
794
      2: (
-
 
795
        dwRefreshRate: DWORD;          // refresh rate (used when display mode is described)
-
 
796
       );
-
 
797
     );
-
 
798
  end;
-
 
799
 
-
 
800
  PDDSurfaceDesc_DX6 = ^TDDSurfaceDesc_DX6;
-
 
801
  TDDSurfaceDesc_DX6 = packed record
-
 
802
    dwSize: DWORD;                 // size of the TDDSurfaceDesc structure
-
 
803
    dwFlags: DWORD;                // determines what fields are valid
-
 
804
    dwHeight: DWORD;               // height of surface to be created
-
 
805
    dwWidth: DWORD;                // width of input surface
-
 
806
    case Integer of
-
 
807
    0: (
-
 
808
      dwLinearSize : DWORD;       // unused at the moment
-
 
809
     );
-
 
810
    1: (
-
 
811
      lPitch: LongInt;                 // distance to start of next line (return value only)
-
 
812
      dwBackBufferCount: DWORD;      // number of back buffers requested
-
 
813
      case Integer of
-
 
814
      0: (
-
 
815
        dwMipMapCount: DWORD;          // number of mip-map levels requested
-
 
816
        dwAlphaBitDepth: DWORD;        // depth of alpha buffer requested
-
 
817
        dwReserved: DWORD;             // reserved
-
 
818
        lpSurface: Pointer;              // pointer to the associated surface memory
-
 
819
        ddckCKDestOverlay: TDDColorKey;      // color key for destination overlay use
-
 
820
        ddckCKDestBlt: TDDColorKey;          // color key for destination blt use
-
 
821
        ddckCKSrcOverlay: TDDColorKey;       // color key for source overlay use
-
 
822
        ddckCKSrcBlt: TDDColorKey;           // color key for source blt use
-
 
823
        ddpfPixelFormat: TDDPixelFormat_DX6; // pixel format description of the surface
-
 
824
        ddsCaps: TDDSCaps;                // direct draw surface capabilities
-
 
825
       );
-
 
826
      1: (
-
 
827
        dwZBufferBitDepth: DWORD;      // depth of Z buffer requested
-
 
828
       );
-
 
829
      2: (
-
 
830
        dwRefreshRate: DWORD;          // refresh rate (used when display mode is described)
-
 
831
       );
-
 
832
     );
-
 
833
  end;
-
 
834
 
-
 
835
  PDDSurfaceDesc = ^TDDSurfaceDesc;
-
 
836
{$IFDEF DIRECTX5}
-
 
837
  TDDSurfaceDesc = TDDSurfaceDesc_DX5;
-
 
838
{$ELSE}
-
 
839
  TDDSurfaceDesc = TDDSurfaceDesc_DX6;
-
 
840
{$ENDIF}
-
 
841
 
-
 
842
 
-
 
843
(*
-
 
844
 * TDDSurfaceDesc2
-
 
845
 *)
-
 
846
  PDDSurfaceDesc2 = ^TDDSurfaceDesc2;
-
 
847
  TDDSurfaceDesc2 = packed record
-
 
848
    dwSize: DWORD;                 // size of the TDDSurfaceDesc structure
-
 
849
    dwFlags: DWORD;                // determines what fields are valid
-
 
850
    dwHeight: DWORD;               // height of surface to be created
-
 
851
    dwWidth: DWORD;                // width of input surface
-
 
852
    case Integer of
-
 
853
    0: (
-
 
854
      lPitch : LongInt;                  // distance to start of next line (return value only)
-
 
855
     );
-
 
856
    1: (
-
 
857
      dwLinearSize : DWORD;              // Formless late-allocated optimized surface size
-
 
858
      dwBackBufferCount: DWORD;          // number of back buffers requested
-
 
859
      case Integer of
-
 
860
      0: (
-
 
861
        dwMipMapCount: DWORD;            // number of mip-map levels requested
-
 
862
        dwAlphaBitDepth: DWORD;          // depth of alpha buffer requested
-
 
863
        dwReserved: DWORD;               // reserved
-
 
864
        lpSurface: Pointer;              // pointer to the associated surface memory
-
 
865
        ddckCKDestOverlay: TDDColorKey;  // color key for destination overlay use
-
 
866
        ddckCKDestBlt: TDDColorKey;      // color key for destination blt use
-
 
867
        ddckCKSrcOverlay: TDDColorKey;   // color key for source overlay use
-
 
868
        ddckCKSrcBlt: TDDColorKey;       // color key for source blt use
-
 
869
        ddpfPixelFormat: TDDPixelFormat; // pixel format description of the surface
-
 
870
        ddsCaps: TDDSCaps2;              // direct draw surface capabilities
-
 
871
        dwTextureStage: DWORD;           // stage in multitexture cascade
-
 
872
       );
-
 
873
      1: (
-
 
874
        dwRefreshRate: DWORD;          // refresh rate (used when display mode is described)
-
 
875
       );
-
 
876
     );
-
 
877
  end;
-
 
878
 
-
 
879
(*
-
 
880
 * TDDOptSurfaceDesc
-
 
881
 *)
-
 
882
 
-
 
883
  PDDOptSurfaceDesc = ^TDDOptSurfaceDesc;
-
 
884
  TDDOptSurfaceDesc = packed record
-
 
885
    dwSize : DWORD;             // size of the DDOPTSURFACEDESC structure
-
 
886
    dwFlags : DWORD;            // determines what fields are valid
-
 
887
    ddSCaps : TDDSCaps2;        // Common caps like: Memory type
-
 
888
    ddOSCaps : TDDOSCaps;       // Common caps like: Memory type
-
 
889
    guid : TGUID;               // Compression technique GUID
-
 
890
    dwCompressionRatio : DWORD; // Compression ratio
-
 
891
  end;
-
 
892
 
-
 
893
(*
-
 
894
 * DDCOLORCONTROL
-
 
895
 *)
-
 
896
  PDDColorControl = ^TDDColorControl;
-
 
897
  TDDColorControl = packed record
-
 
898
    dwSize: DWORD;
-
 
899
    dwFlags: DWORD;
-
 
900
    lBrightness: LongInt;
-
 
901
    lContrast: LongInt;
-
 
902
    lHue: LongInt;
-
 
903
    lSaturation: LongInt;
-
 
904
    lSharpness: LongInt;
-
 
905
    lGamma: LongInt;
-
 
906
    lColorEnable: LongInt;
-
 
907
    dwReserved1: DWORD;
-
 
908
  end;
-
 
909
 
-
 
910
(*
-
 
911
 * callbacks
-
 
912
 *)
-
 
913
 
-
 
914
{$IFNDEF WINNT}
946
  TDDEnumModesCallback = function(const lpDDSurfaceDesc: TDDSurfaceDesc;
915
  TDDEnumModesCallback = function (const lpDDSurfaceDesc: TDDSurfaceDesc;
947
      lpContext: Pointer): HResult; stdcall;
916
      lpContext: Pointer) : HResult; stdcall;
948
  LPDDENUMMODESCALLBACK = TDDEnumModesCallback;
-
 
949
 
-
 
950
  TDDEnumModesCallback2 = function(const lpDDSurfaceDesc: TDDSurfaceDesc2;
917
  TDDEnumModesCallback2 = function (const lpDDSurfaceDesc: TDDSurfaceDesc2;
951
      lpContext: Pointer): HResult; stdcall;
918
      lpContext: Pointer) : HResult; stdcall;
952
  LPDDENUMMODESCALLBACK2 = TDDEnumModesCallback2;
-
 
953
 
-
 
954
  TDDEnumSurfacesCallback = function(lpDDSurface: IDirectDrawSurface;
919
  TDDEnumSurfacesCallback = function (lpDDSurface: IDirectDrawSurface;
955
      const lpDDSurfaceDesc: TDDSurfaceDesc; lpContext: Pointer): HResult; stdcall;
920
      const lpDDSurfaceDesc: TDDSurfaceDesc; lpContext: Pointer) : HResult; stdcall;
956
  LPDDENUMSURFACESCALLBACK = TDDEnumSurfacesCallback;
-
 
957
 
-
 
958
  TDDEnumSurfacesCallback2 = function(lpDDSurface: IDirectDrawSurface4;
921
  TDDEnumSurfacesCallback2 = function (lpDDSurface: IDirectDrawSurface4;
959
      const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer): HResult; stdcall;
922
      const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer) : HResult; stdcall;
960
  LPDDENUMSURFACESCALLBACK2 = TDDEnumSurfacesCallback2;
-
 
961
 
-
 
962
  TDDEnumSurfacesCallback7 = function(lpDDSurface: IDirectDrawSurface7;
923
  TDDEnumSurfacesCallback7 = function (lpDDSurface: IDirectDrawSurface7;
963
      const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer): HResult; stdcall;
924
      const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer) : HResult; stdcall;
-
 
925
{$ENDIF}
-
 
926
 
-
 
927
(*
-
 
928
 * INTERACES FOLLOW:
-
 
929
 *      IDirectDraw
-
 
930
 *      IDirectDrawClipper
-
 
931
 *      IDirectDrawPalette
964
  LPDDENUMSURFACESCALLBACK7 = TDDEnumSurfacesCallback7;
932
 *      IDirectDrawSurface
-
 
933
 *)
965
 
934
 
-
 
935
(*
966
{ IDirectDraw Interface }
936
 * IDirectDraw
-
 
937
 *)
967
 
938
 
968
  IDirectDraw = interface(IUnknown)
939
  IDirectDraw = interface (IUnknown)
969
    ['{6C14DB80-A733-11CE-A521-0020AF0BE560}']
940
    ['{6C14DB80-A733-11CE-A521-0020AF0BE560}']
970
    // IDirectDraw methods
941
    (*** IDirectDraw methods ***)
971
    function Compact: HResult; stdcall;
942
    function Compact: HResult; stdcall;
-
 
943
    function CreateClipper (dwFlags: DWORD;
-
 
944
        out lplpDDClipper: IDirectDrawClipper;
-
 
945
        pUnkOuter: IUnknown) : HResult; stdcall;
972
    function CreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper;
946
    function CreatePalette (dwFlags: DWORD; lpColorTable: pointer;
-
 
947
        out lplpDDPalette: IDirectDrawPalette;
-
 
948
        pUnkOuter: IUnknown) : HResult; stdcall;
-
 
949
    function CreateSurface (var lpDDSurfaceDesc: TDDSurfaceDesc;
-
 
950
        out lplpDDSurface: IDirectDrawSurface;
973
        pUnkOuter: IUnknown): HResult; stdcall;
951
        pUnkOuter: IUnknown) : HResult; stdcall;
974
    function CreatePalette(dwFlags: DWORD; lpColorTable: PPaletteEntry;
-
 
975
        out lplpDDPalette: IDirectDrawPalette; pUnkOuter: IUnknown): HResult; stdcall;
-
 
976
    function CreateSurface(const lpDDSurfaceDesc: TDDSurfaceDesc;
-
 
977
        out lplpDDSurface: IDirectDrawSurface; pUnkOuter: IUnknown): HResult; stdcall;
-
 
978
    function DuplicateSurface(lpDDSurface: IDirectDrawSurface;
952
    function DuplicateSurface (lpDDSurface: IDirectDrawSurface;
979
        out lplpDupDDSurface: IDirectDrawSurface): HResult; stdcall;
953
        out lplpDupDDSurface: IDirectDrawSurface) : HResult; stdcall;
980
    function EnumDisplayModes(dwFlags: DWORD;
954
    function EnumDisplayModes (dwFlags: DWORD;
981
        const lpDDSurfaceDesc: TDDSurfaceDesc; lpContext: Pointer;
955
        lpDDSurfaceDesc: PDDSurfaceDesc; lpContext: Pointer;
982
        lpEnumModesCallback: TDDEnumModesCallback): HResult; stdcall;
956
        lpEnumModesCallback: TDDEnumModesCallback) : HResult; stdcall;
983
    function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc;
957
    function EnumSurfaces (dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc;
984
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback): HResult; stdcall;
958
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback) :
-
 
959
        HResult; stdcall;
985
    function FlipToGDISurface: HResult; stdcall;
960
    function FlipToGDISurface: HResult; stdcall;
986
    function GetCaps(var lpDDDriverCaps: TDDCaps; var lpDDHELCaps: TDDCaps): HResult; stdcall;
961
    function GetCaps (lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps) : HResult; stdcall;
987
    function GetDisplayMode(var lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
962
    function GetDisplayMode (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
988
    function GetFourCCCodes(var lpNumCodes, lpCodes: DWORD): HResult; stdcall;
963
    function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: PDWORD) : HResult; stdcall;
989
    function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface): HResult; stdcall;
964
    function GetGDISurface (out lplpGDIDDSSurface: IDirectDrawSurface) :
-
 
965
        HResult; stdcall;
990
    function GetMonitorFrequency(var lpdwFrequency: DWORD): HResult; stdcall;
966
    function GetMonitorFrequency (out lpdwFrequency: DWORD) : HResult; stdcall;
991
    function GetScanLine(var lpdwScanLine: DWORD): HResult; stdcall;
967
    function GetScanLine (out lpdwScanLine: DWORD) : HResult; stdcall;
992
    function GetVerticalBlankStatus(var lpbIsInVB: BOOL): HResult; stdcall;
968
    function GetVerticalBlankStatus (out lpbIsInVB: BOOL) : HResult; stdcall;
993
    function Initialize(lpGUID: PGUID): HResult; stdcall;
969
    function Initialize (lpGUID: PGUID) : HResult; stdcall;
994
    function RestoreDisplayMode: HResult; stdcall;
970
    function RestoreDisplayMode: HResult; stdcall;
995
    function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall;
971
    function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD) : HResult; stdcall;
-
 
972
    (*** Warning!  SetDisplayMode differs between DirectDraw 1 and DirectDraw 2 ***)
996
    function SetDisplayMode(dwWidth, dwHeight, dwBpp: DWORD): HResult; stdcall;
973
    function SetDisplayMode (dwWidth: DWORD; dwHeight: DWORD;
-
 
974
        dwBpp: DWORD) : HResult; stdcall;
997
    function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
975
    function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle) :
-
 
976
        HResult; stdcall;
998
  end;
977
  end;
999
 
978
 
1000
{ IDirectDraw2 Interface }
-
 
1001
 
-
 
1002
  IDirectDraw2 = interface(IUnknown)
979
  IDirectDraw2 = interface (IUnknown)
1003
    ['{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}']
980
    ['{B3A6F3E0-2B43-11CF-A2DE-00AA00B93356}']
1004
    // IDirectDraw methods
981
    (*** IDirectDraw methods ***)
1005
    function Compact: HResult; stdcall;
982
    function Compact: HResult; stdcall;
-
 
983
    function CreateClipper (dwFlags: DWORD;
-
 
984
        out lplpDDClipper: IDirectDrawClipper;
-
 
985
        pUnkOuter: IUnknown) : HResult; stdcall;
1006
    function CreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper;
986
    function CreatePalette (dwFlags: DWORD; lpColorTable: pointer;
-
 
987
        out lplpDDPalette: IDirectDrawPalette;
-
 
988
        pUnkOuter: IUnknown) : HResult; stdcall;
-
 
989
    function CreateSurface (var lpDDSurfaceDesc: TDDSurfaceDesc;
-
 
990
        out lplpDDSurface: IDirectDrawSurface;
1007
        pUnkOuter: IUnknown): HResult; stdcall;
991
        pUnkOuter: IUnknown) : HResult; stdcall;
1008
    function CreatePalette(dwFlags: DWORD; lpColorTable: PPaletteEntry;
-
 
1009
        out lplpDDPalette: IDirectDrawPalette; pUnkOuter: IUnknown): HResult; stdcall;
-
 
1010
    function CreateSurface(const lpDDSurfaceDesc: TDDSurfaceDesc;
-
 
1011
        out lplpDDSurface: IDirectDrawSurface; pUnkOuter: IUnknown): HResult; stdcall;
-
 
1012
    function DuplicateSurface(lpDDSurface: IDirectDrawSurface;
992
    function DuplicateSurface (lpDDSurface: IDirectDrawSurface;
1013
        out lplpDupDDSurface: IDirectDrawSurface): HResult; stdcall;
993
        out lplpDupDDSurface: IDirectDrawSurface) : HResult; stdcall;
1014
    function EnumDisplayModes(dwFlags: DWORD;
994
    function EnumDisplayModes (dwFlags: DWORD;
1015
        const lpDDSurfaceDesc: TDDSurfaceDesc; lpContext: Pointer;
995
        lpDDSurfaceDesc: PDDSurfaceDesc; lpContext: Pointer;
1016
        lpEnumModesCallback: TDDEnumModesCallback): HResult; stdcall;
996
        lpEnumModesCallback: TDDEnumModesCallback) : HResult; stdcall;
1017
    function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc;
997
    function EnumSurfaces (dwFlags: DWORD; var lpDDSD: TDDSurfaceDesc;
1018
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback): HResult; stdcall;
998
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback) :
-
 
999
        HResult; stdcall;
1019
    function FlipToGDISurface: HResult; stdcall;
1000
    function FlipToGDISurface: HResult; stdcall;
1020
    function GetCaps(var lpDDDriverCaps: TDDCaps; var lpDDHELCaps: TDDCaps): HResult; stdcall;
1001
    function GetCaps (lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps) : HResult; stdcall;
1021
    function GetDisplayMode(var lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1002
    function GetDisplayMode (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
1022
    function GetFourCCCodes(var lpNumCodes, lpCodes: DWORD): HResult; stdcall;
1003
    function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: PDWORD) : HResult; stdcall;
1023
    function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface): HResult; stdcall;
1004
    function GetGDISurface (out lplpGDIDDSSurface: IDirectDrawSurface) : HResult; stdcall;
1024
    function GetMonitorFrequency(var lpdwFrequency: DWORD): HResult; stdcall;
1005
    function GetMonitorFrequency (out lpdwFrequency: DWORD) : HResult; stdcall;
1025
    function GetScanLine(var lpdwScanLine: DWORD): HResult; stdcall;
1006
    function GetScanLine (out lpdwScanLine: DWORD) : HResult; stdcall;
1026
    function GetVerticalBlankStatus(var lpbIsInVB: BOOL): HResult; stdcall;
1007
    function GetVerticalBlankStatus (out lpbIsInVB: BOOL) : HResult; stdcall;
1027
    function Initialize(lpGUID: PGUID): HResult; stdcall;
1008
    function Initialize (lpGUID: PGUID) : HResult; stdcall;
1028
    function RestoreDisplayMode: HResult; stdcall;
1009
    function RestoreDisplayMode: HResult; stdcall;
1029
    function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall;
1010
    function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD) : HResult; stdcall;
-
 
1011
(*** Warning!  SetDisplayMode differs between DirectDraw 1 and DirectDraw 2 ***)
1030
    function SetDisplayMode(dwWidth, dwHeight, dwBPP, dwRefreshRate: DWORD;
1012
    function SetDisplayMode (dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD;
1031
        dwFlags: DWORD): HResult; stdcall;
1013
        dwRefreshRate: DWORD; dwFlags: DWORD) : HResult; stdcall;
1032
    function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1014
    function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle) :
1033
    // IDirectDraw2 methods
1015
        HResult; stdcall;
-
 
1016
    (*** Added in the v2 interface ***)
1034
    function GetAvailableVidMem(var lpDDSCaps: TDDSCaps;
1017
    function GetAvailableVidMem (var lpDDSCaps: TDDSCaps;
1035
        var lpdwTotal, lpdwFree: DWORD): HResult; stdcall;
1018
        out lpdwTotal, lpdwFree: DWORD) : HResult; stdcall;
1036
  end;
1019
  end;
1037
 
1020
 
1038
{ IDirectDraw4 Interface }
-
 
1039
 
-
 
1040
  IDirectDraw4 = interface(IUnknown)
1021
  IDirectDraw4 = interface (IUnknown)
1041
    ['{9C59509A-39BD-11D1-8C4A-00C04FD930C5}']
1022
    ['{9c59509a-39bd-11d1-8c4a-00c04fd930c5}']
1042
    // IDirectDraw methods
1023
    (*** IDirectDraw methods ***)
1043
    function Compact: HResult; stdcall;
1024
    function Compact: HResult; stdcall;
-
 
1025
    function CreateClipper (dwFlags: DWORD;
-
 
1026
        out lplpDDClipper: IDirectDrawClipper;
-
 
1027
        pUnkOuter: IUnknown) : HResult; stdcall;
1044
    function CreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper;
1028
    function CreatePalette (dwFlags: DWORD; lpColorTable: pointer;
-
 
1029
        out lplpDDPalette: IDirectDrawPalette;
1045
        pUnkOuter: IUnknown): HResult; stdcall;
1030
        pUnkOuter: IUnknown) : HResult; stdcall;
1046
    function CreatePalette(dwFlags: DWORD; lpColorTable: PPaletteEntry;
-
 
1047
        out lplpDDPalette: IDirectDrawPalette; pUnkOuter: IUnknown): HResult; stdcall;
-
 
1048
    function CreateSurface(const lpDDSurfaceDesc: TDDSurfaceDesc2;
1031
    function CreateSurface (const lpDDSurfaceDesc: TDDSurfaceDesc2;
1049
        out lplpDDSurface: IDirectDrawSurface4; pUnkOuter: IUnknown): HResult; stdcall;
1032
        out lplpDDSurface: IDirectDrawSurface4;
-
 
1033
        pUnkOuter: IUnknown) : HResult; stdcall;
1050
    function DuplicateSurface(lpDDSurface: IDirectDrawSurface4;
1034
    function DuplicateSurface (lpDDSurface: IDirectDrawSurface4;
1051
        out lplpDupDDSurface: IDirectDrawSurface4): HResult; stdcall;
1035
        out lplpDupDDSurface: IDirectDrawSurface4) : HResult; stdcall;
1052
    function EnumDisplayModes(dwFlags: DWORD;
1036
    function EnumDisplayModes (dwFlags: DWORD;
1053
        const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer;
1037
        lpDDSurfaceDesc: PDDSurfaceDesc2; lpContext: Pointer;
1054
        lpEnumModesCallback: TDDEnumModesCallback2): HResult; stdcall;
1038
        lpEnumModesCallback: TDDEnumModesCallback2) : HResult; stdcall;
1055
    function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2;
1039
    function EnumSurfaces (dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2;
1056
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback2): HResult; stdcall;
1040
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback2) :
-
 
1041
        HResult; stdcall;
1057
    function FlipToGDISurface: HResult; stdcall;
1042
    function FlipToGDISurface: HResult; stdcall;
1058
    function GetCaps(var lpDDDriverCaps: TDDCaps; var lpDDHELCaps: TDDCaps): HResult; stdcall;
1043
    function GetCaps (lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps) : HResult; stdcall;
1059
    function GetDisplayMode(var lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
1044
    function GetDisplayMode (out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall;
1060
    function GetFourCCCodes(var lpNumCodes, lpCodes: DWORD): HResult; stdcall;
1045
    function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: PDWORD) : HResult; stdcall;
1061
    function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface2): HResult; stdcall;
1046
    function GetGDISurface (out lplpGDIDDSSurface: IDirectDrawSurface4) :
-
 
1047
        HResult; stdcall;
1062
    function GetMonitorFrequency(var lpdwFrequency: DWORD): HResult; stdcall;
1048
    function GetMonitorFrequency (out lpdwFrequency: DWORD) : HResult; stdcall;
1063
    function GetScanLine(var lpdwScanLine: DWORD): HResult; stdcall;
1049
    function GetScanLine (out lpdwScanLine: DWORD) : HResult; stdcall;
1064
    function GetVerticalBlankStatus(var lpbIsInVB: BOOL): HResult; stdcall;
1050
    function GetVerticalBlankStatus (out lpbIsInVB: BOOL) : HResult; stdcall;
1065
    function Initialize(lpGUID: PGUID): HResult; stdcall;
1051
    function Initialize (lpGUID: PGUID) : HResult; stdcall;
1066
    function RestoreDisplayMode: HResult; stdcall;
1052
    function RestoreDisplayMode: HResult; stdcall;
1067
    function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall;
1053
    function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD) : HResult; stdcall;
-
 
1054
(*** Warning!  SetDisplayMode differs between DirectDraw 1 and DirectDraw 2 ***)
1068
    function SetDisplayMode(dwWidth, dwHeight, dwBPP, dwRefreshRate: DWORD;
1055
    function SetDisplayMode (dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD;
1069
        dwFlags: DWORD): HResult; stdcall;
1056
        dwRefreshRate: DWORD; dwFlags: DWORD) : HResult; stdcall;
1070
    function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1057
    function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle) :
1071
    // IDirectDraw2 methods
1058
        HResult; stdcall;
-
 
1059
    (*** Added in the v2 interface ***)
1072
    function GetAvailableVidMem(var lpDDSCaps: TDDSCaps;
1060
    function GetAvailableVidMem (const lpDDSCaps: TDDSCaps2;
1073
        var lpdwTotal, lpdwFree: DWORD): HResult; stdcall;
1061
        out lpdwTotal, lpdwFree: DWORD) : HResult; stdcall;
1074
    // IDirectDraw4 methods
1062
    (*** Added in the V4 Interface ***)
-
 
1063
    function GetSurfaceFromDC (hdc : Windows.HDC;
1075
    function GetSurfaceFromDC(hdc: HDC; lpDDS: IDirectDrawSurface4): HResult; stdcall;
1064
        out lpDDS4: IDirectDrawSurface4) : HResult; stdcall;
1076
    function RestoreAllSurfaces: HResult; stdcall;
1065
    function RestoreAllSurfaces : HResult; stdcall;
1077
    function TestCooperativeLevel: HResult; stdcall;
1066
    function TestCooperativeLevel : HResult; stdcall;
1078
    function GetDeviceIdentifier(var lpdddi: TDDDeviceIdentifier; dwFlags: DWORD): HResult; stdcall;
1067
    function GetDeviceIdentifier (out lpdddi: TDDDeviceIdentifier;
-
 
1068
        dwFlags: DWORD) : HResult; stdcall;
1079
  end;
1069
  end;
1080
 
1070
 
1081
{ IDirectDraw7 Interface }
-
 
1082
 
-
 
1083
  IDirectDraw7 = interface(IUnknown)
1071
  IDirectDraw7 = interface (IUnknown)
1084
    ['{15E65EC0-3B9C-11D2-B92F-00609797EA5B}']
1072
    ['{15e65ec0-3b9c-11d2-b92f-00609797ea5b}']
1085
    // IDirectDraw methods
1073
    (*** IDirectDraw methods ***)
1086
    function Compact: HResult; stdcall;
1074
    function Compact: HResult; stdcall;
-
 
1075
    function CreateClipper (dwFlags: DWORD;
-
 
1076
        out lplpDDClipper: IDirectDrawClipper;
-
 
1077
        pUnkOuter: IUnknown) : HResult; stdcall;
1087
    function CreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper;
1078
    function CreatePalette (dwFlags: DWORD; lpColorTable: pointer;
-
 
1079
        out lplpDDPalette: IDirectDrawPalette;
1088
        pUnkOuter: IUnknown): HResult; stdcall;
1080
        pUnkOuter: IUnknown) : HResult; stdcall;
1089
    function CreatePalette(dwFlags: DWORD; lpColorTable: PPaletteEntry;
-
 
1090
        out lplpDDPalette: IDirectDrawPalette; pUnkOuter: IUnknown): HResult; stdcall;
-
 
1091
    function CreateSurface(const lpDDSurfaceDesc: TDDSurfaceDesc2;
1081
    function CreateSurface (const lpDDSurfaceDesc: TDDSurfaceDesc2;
1092
        out lplpDDSurface: IDirectDrawSurface7; pUnkOuter: IUnknown): HResult; stdcall;
1082
        out lplpDDSurface: IDirectDrawSurface7;
-
 
1083
        pUnkOuter: IUnknown) : HResult; stdcall;
1093
    function DuplicateSurface(lpDDSurface: IDirectDrawSurface7;
1084
    function DuplicateSurface (lpDDSurface: IDirectDrawSurface7;
1094
        out lplpDupDDSurface: IDirectDrawSurface7): HResult; stdcall;
1085
        out lplpDupDDSurface: IDirectDrawSurface7) : HResult; stdcall;
1095
    function EnumDisplayModes(dwFlags: DWORD;
1086
    function EnumDisplayModes (dwFlags: DWORD;
1096
        const lpDDSurfaceDesc: TDDSurfaceDesc2; lpContext: Pointer;
1087
        lpDDSurfaceDesc: PDDSurfaceDesc2; lpContext: Pointer;
1097
        lpEnumModesCallback: TDDEnumModesCallback2): HResult; stdcall;
1088
        lpEnumModesCallback: TDDEnumModesCallback2) : HResult; stdcall;
1098
    function EnumSurfaces(dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2;
1089
    function EnumSurfaces (dwFlags: DWORD; const lpDDSD: TDDSurfaceDesc2;
1099
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback7): HResult; stdcall;
1090
        lpContext: Pointer; lpEnumCallback: TDDEnumSurfacesCallback7) :
-
 
1091
        HResult; stdcall;
1100
    function FlipToGDISurface: HResult; stdcall;
1092
    function FlipToGDISurface: HResult; stdcall;
1101
    function GetCaps(var lpDDDriverCaps: TDDCaps; var lpDDHELCaps: TDDCaps): HResult; stdcall;
1093
    function GetCaps (lpDDDriverCaps: PDDCaps; lpDDHELCaps: PDDCaps) : HResult; stdcall;
1102
    function GetDisplayMode(var lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
1094
    function GetDisplayMode (out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall;
1103
    function GetFourCCCodes(var lpNumCodes, lpCodes: DWORD): HResult; stdcall;
1095
    function GetFourCCCodes (var lpNumCodes: DWORD; lpCodes: PDWORD) : HResult; stdcall;
1104
    function GetGDISurface(out lplpGDIDDSSurface: IDirectDrawSurface7): HResult; stdcall;
1096
    function GetGDISurface (out lplpGDIDDSSurface: IDirectDrawSurface7) :
-
 
1097
        HResult; stdcall;
1105
    function GetMonitorFrequency(var lpdwFrequency: DWORD): HResult; stdcall;
1098
    function GetMonitorFrequency (out lpdwFrequency: DWORD) : HResult; stdcall;
1106
    function GetScanLine(var lpdwScanLine: DWORD): HResult; stdcall;
1099
    function GetScanLine (out lpdwScanLine: DWORD) : HResult; stdcall;
1107
    function GetVerticalBlankStatus(var lpbIsInVB: BOOL): HResult; stdcall;
1100
    function GetVerticalBlankStatus (out lpbIsInVB: BOOL) : HResult; stdcall;
1108
    function Initialize(lpGUID: PGUID): HResult; stdcall;
1101
    function Initialize (lpGUID: PGUID) : HResult; stdcall;
1109
    function RestoreDisplayMode: HResult; stdcall;
1102
    function RestoreDisplayMode: HResult; stdcall;
1110
    function SetCooperativeLevel(hWnd: HWND; dwFlags: DWORD): HResult; stdcall;
1103
    function SetCooperativeLevel (hWnd: HWND; dwFlags: DWORD) : HResult; stdcall;
1111
    function SetDisplayMode(dwWidth, dwHeight, dwBPP, dwRefreshRate: DWORD;
1104
    function SetDisplayMode (dwWidth: DWORD; dwHeight: DWORD; dwBPP: DWORD;
1112
        dwFlags: DWORD): HResult; stdcall;
1105
        dwRefreshRate: DWORD; dwFlags: DWORD) : HResult; stdcall;
1113
    function WaitForVerticalBlank(dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1106
    function WaitForVerticalBlank (dwFlags: DWORD; hEvent: THandle) :
1114
    // IDirectDraw2 methods
1107
        HResult; stdcall;
-
 
1108
    (*** Added in the v2 interface ***)
1115
    function GetAvailableVidMem(var lpDDSCaps: TDDSCaps;
1109
    function GetAvailableVidMem (const lpDDSCaps: TDDSCaps2;
1116
        var lpdwTotal, lpdwFree: DWORD): HResult; stdcall;
1110
        out lpdwTotal, lpdwFree: DWORD) : HResult; stdcall;
1117
    // IDirectDraw4 methods
1111
    (*** Added in the V4 Interface ***)
-
 
1112
    function GetSurfaceFromDC (hdc : Windows.HDC;
1118
    function GetSurfaceFromDC(hdc: HDC; lpDDS: IDirectDrawSurface4): HResult; stdcall;
1113
        out lpDDS: IDirectDrawSurface7) : HResult; stdcall;
1119
    function RestoreAllSurfaces: HResult; stdcall;
1114
    function RestoreAllSurfaces : HResult; stdcall;
1120
    function TestCooperativeLevel: HResult; stdcall;
1115
    function TestCooperativeLevel : HResult; stdcall;
1121
    function GetDeviceIdentifier(var lpdddi: TDDDeviceIdentifier; dwFlags: DWORD): HResult; stdcall;
1116
    function GetDeviceIdentifier (out lpdddi: TDDDeviceIdentifier2;
1122
    // IDirectDraw7 methods
1117
        dwFlags: DWORD) : HResult; stdcall;
1123
    function StartModeTest(var lpModesToTest: TSize; dwNumEntries: DWORD; dwFlags: DWORD): HResult; stdcall;
1118
    function StartModeTest(const lpModesToTest; dwNumEntries, dwFlags: DWORD) : HResult; stdcall;
1124
    function EvaluateMode(dwFlags: DWORD; var pSecondsUntilTimeout: DWORD): HResult; stdcall;
1119
    function EvaluateMode(dwFlags: DWORD; out pSecondsUntilTimeout: DWORD) : HResult; stdcall;
1125
  end;
1120
  end;
1126
 
1121
 
-
 
1122
 
-
 
1123
 
-
 
1124
(*
1127
{ IDirectDrawPalette Interface }
1125
 * IDirectDrawPalette
-
 
1126
 *)
1128
 
1127
 
1129
  IDirectDrawPalette = interface(IUnknown)
1128
  IDirectDrawPalette = interface (IUnknown)
1130
    ['{6C14DB84-A733-11CE-A521-0020AF0BE560}']
1129
    ['{6C14DB84-A733-11CE-A521-0020AF0BE560}']
1131
    // IDirectDrawPalette methods
1130
    (*** IDirectDrawPalette methods ***)
1132
    function GetCaps(varlpdwCaps: DWORD): HResult; stdcall;
1131
    function GetCaps (out lpdwCaps: DWORD) : HResult; stdcall;
1133
    function GetEntries(dwFlags: DWORD; dwBase: DWORD; dwNumEntries: DWORD;
1132
    function GetEntries (dwFlags: DWORD; dwBase: DWORD; dwNumEntries: DWORD;
1134
        lpEntries: PPaletteEntry): HResult; stdcall;
1133
        lpEntries: pointer) : HResult; stdcall;
1135
    function Initialize(lpDD: IDirectDraw; dwFlags: DWORD;
1134
    function Initialize (lpDD: IDirectDraw; dwFlags: DWORD;
1136
        lpDDColorTable: PPaletteEntry): HResult; stdcall;
1135
        lpDDColorTable: pointer) : HResult; stdcall;
1137
    function SetEntries(dwFlags: DWORD; dwStartingEntry: DWORD;
1136
    function SetEntries (dwFlags: DWORD; dwStartingEntry: DWORD;
1138
        dwCount: DWORD; lpEntries: PPaletteEntry): HResult; stdcall;
1137
        dwCount: DWORD; lpEntries: pointer) : HResult; stdcall;
1139
  end;
1138
  end;
1140
 
1139
 
-
 
1140
(*
1141
{ IDirectDrawClipper Interface }
1141
 * IDirectDrawClipper
-
 
1142
 *)
1142
 
1143
 
1143
  IDirectDrawClipper = interface(IUnknown)
1144
  IDirectDrawClipper = interface (IUnknown)
1144
    ['{6C14DB85-A733-11CE-A521-0020AF0BE560}']
1145
    ['{6C14DB85-A733-11CE-A521-0020AF0BE560}']
1145
    // IDirectDrawClipper methods
1146
    (*** IDirectDrawClipper methods ***)
1146
    function GetClipList(const lpRect: TRect; lpClipList: PRgnData;
1147
    function GetClipList (lpRect: PRect; lpClipList: PRgnData;
1147
        var lpdwSize: DWORD): HResult; stdcall;
1148
        var lpdwSize: DWORD) : HResult; stdcall;
1148
    function GetHWnd(var lphWnd: HWND): HResult; stdcall;
1149
    function GetHWnd (out lphWnd: HWND) : HResult; stdcall;
1149
    function Initialize(lpDD: IDirectDraw; dwFlags: DWORD): HResult; stdcall;
1150
    function Initialize (lpDD: IDirectDraw; dwFlags: DWORD) : HResult; stdcall;
1150
    function IsClipListChanged(var lpbChanged: BOOL): HResult; stdcall;
1151
    function IsClipListChanged (out lpbChanged: BOOL) : HResult; stdcall;
1151
    function SetClipList(lpClipList: PRgnData; dwFlags: DWORD): HResult; stdcall;
1152
    function SetClipList (lpClipList: PRgnData; dwFlags: DWORD) : HResult; stdcall;
1152
    function SetHWnd(dwFlags: DWORD; hWnd: HWND): HResult; stdcall;
1153
    function SetHWnd (dwFlags: DWORD; hWnd: HWND) : HResult; stdcall;
1153
  end;
1154
  end;
1154
 
1155
 
-
 
1156
(*
1155
{ IDirectDrawSurface Interface }
1157
 * IDirectDrawSurface and related interfaces
-
 
1158
 *)
1156
 
1159
 
1157
  IDirectDrawSurface = interface(IUnknown)
1160
  IDirectDrawSurface = interface (IUnknown)
1158
    ['{6C14DB81-A733-11CE-A521-0020AF0BE560}']
1161
    ['{6C14DB81-A733-11CE-A521-0020AF0BE560}']
1159
    // IDirectDrawSurface methods
1162
    (*** IDirectDrawSurface methods ***)
1160
    function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface): HResult; stdcall;
1163
    function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface) :
-
 
1164
        HResult; stdcall;
1161
    function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
1165
    function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall;
-
 
1166
    function Blt (lpDestRect: PRect;
1162
    function Blt(const lpDestRect: TRect; lpDDSrcSurface: IDirectDrawSurface;
1167
        lpDDSrcSurface: IDirectDrawSurface; lpSrcRect: PRect;
1163
        const lpSrcRect: TRect; dwFlags: DWORD; const lpDDBltFx: TDDBltFX): HResult; stdcall;
1168
        dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall;
1164
    function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1169
    function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1165
        dwFlags: DWORD): HResult; stdcall;
1170
        dwFlags: DWORD) : HResult; stdcall;
1166
    function BltFast(dwX, dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface;
1171
    function BltFast (dwX: DWORD; dwY: DWORD;
-
 
1172
        lpDDSrcSurface: IDirectDrawSurface; lpSrcRect: PRect;
1167
        const lpSrcRect: TRect; dwTrans: DWORD): HResult; stdcall;
1173
        dwTrans: DWORD) : HResult; stdcall;
1168
    function DeleteAttachedSurface(dwFlags: DWORD;
1174
    function DeleteAttachedSurface (dwFlags: DWORD;
1169
        lpDDSAttachedSurface: IDirectDrawSurface): HResult; stdcall;
1175
        lpDDSAttachedSurface: IDirectDrawSurface) : HResult; stdcall;
1170
    function EnumAttachedSurfaces(lpContext: Pointer;
1176
    function EnumAttachedSurfaces (lpContext: Pointer;
1171
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback): HResult; stdcall;
1177
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback) : HResult; stdcall;
1172
    function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
1178
    function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer;
1173
        lpfnCallback: TDDEnumSurfacesCallback): HResult; stdcall;
1179
        lpfnCallback: TDDEnumSurfacesCallback) : HResult; stdcall;
1174
    function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface;
1180
    function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface;
1175
        dwFlags: DWORD): HResult; stdcall;
1181
        dwFlags: DWORD) : HResult; stdcall;
1176
    function GetAttachedSurface(var lpDDSCaps: TDDSCaps;
1182
    function GetAttachedSurface (var lpDDSCaps: TDDSCaps;
1177
        out lplpDDAttachedSurface: IDirectDrawSurface): HResult; stdcall;
1183
        (*out*)var lplpDDAttachedSurface: IDirectDrawSurface) : HResult; stdcall;
1178
    function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
1184
    function GetBltStatus (dwFlags: DWORD) : HResult; stdcall;
1179
    function GetCaps(var lpDDSCaps: TDDSCaps): HResult; stdcall;
1185
    function GetCaps (out lpDDSCaps: TDDSCaps) : HResult; stdcall;
1180
    function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
1186
    function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1181
    function GetColorKey(dwFlags: DWORD; var lpDDColorKey: TDDColorKey): HResult; stdcall;
1187
    function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
-
 
1188
        HResult; stdcall;
1182
    function GetDC(var lphDC: HDC): HResult; stdcall;
1189
    function GetDC (out lphDC: HDC) : HResult; stdcall;
1183
    function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
1190
    function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall;
1184
    function GetOverlayPosition(var lplX, lplY: Longint): HResult; stdcall;
1191
    function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall;
1185
    function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
1192
    function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1186
    function GetPixelFormat(var lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
1193
    function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall;
1187
    function GetSurfaceDesc(var lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1194
    function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
1188
    function Initialize(lpDD: IDirectDraw;
1195
    function Initialize (lpDD: IDirectDraw;
1189
        const lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1196
        out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
1190
    function IsLost: HResult; stdcall;
1197
    function IsLost: HResult; stdcall;
1191
    function Lock(lpDestRect: PRect; var lpDDSurfaceDesc: TDDSurfaceDesc;
1198
    function Lock (lpDestRect: PRect; out lpDDSurfaceDesc:
1192
        dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1199
        TDDSurfaceDesc; dwFlags: DWORD; hEvent: THandle) : HResult; stdcall;
1193
    function ReleaseDC(hDC: HDC): HResult; stdcall;
1200
    function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall;
1194
    function Restore: HResult; stdcall;
1201
    function _Restore: HResult; stdcall;
1195
    function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
1202
    function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1196
    function SetColorKey(dwFlags: DWORD; const lpDDColorKey: TDDColorKey): HResult; stdcall;
1203
    function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
-
 
1204
        HResult; stdcall;
1197
    function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
1205
    function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall;
1198
    function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
1206
    function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1199
    function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
1207
    function Unlock (lpSurfaceData: Pointer) : HResult; stdcall;
1200
    function UpdateOverlay(const lpSrcRect: TRect;
1208
    function UpdateOverlay (lpSrcRect: PRect;
1201
        lpDDDestSurface: IDirectDrawSurface; const lpDestRect: TRect;
1209
        lpDDDestSurface: IDirectDrawSurface; lpDestRect: PRect;
1202
        dwFlags: DWORD; const lpDDOverlayFx: TDDOverlayFX): HResult; stdcall;
1210
        dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall;
1203
    function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
1211
    function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall;
1204
    function UpdateOverlayZOrder(dwFlags: DWORD;
1212
    function UpdateOverlayZOrder (dwFlags: DWORD;
1205
        lpDDSReference: IDirectDrawSurface): HResult; stdcall;
1213
        lpDDSReference: IDirectDrawSurface) : HResult; stdcall;
1206
  end;
1214
  end;
1207
 
1215
 
-
 
1216
(*
1208
{ IDirectDrawSurface2 Interface }
1217
 * IDirectDrawSurface2 and related interfaces
-
 
1218
 *)
1209
 
1219
 
1210
  IDirectDrawSurface2 = interface(IUnknown)
1220
  IDirectDrawSurface2 = interface (IUnknown)
1211
    ['{57805885-6EEC-11CF-9441-A82303C10E27}']
1221
    ['{57805885-6eec-11cf-9441-a82303c10e27}']
1212
    // IDirectDrawSurface methods
1222
    (*** IDirectDrawSurface methods ***)
1213
    function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface2): HResult; stdcall;
1223
    function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface2) :
-
 
1224
        HResult; stdcall;
1214
    function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
1225
    function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall;
-
 
1226
    function Blt (lpDestRect: PRect;
1215
    function Blt(const lpDestRect: TRect; lpDDSrcSurface: IDirectDrawSurface2;
1227
        lpDDSrcSurface: IDirectDrawSurface2; lpSrcRect: PRect;
1216
        const lpSrcRect: TRect; dwFlags: DWORD; const lpDDBltFx: TDDBltFX): HResult; stdcall;
1228
        dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall;
1217
    function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1229
    function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1218
        dwFlags: DWORD): HResult; stdcall;
1230
        dwFlags: DWORD) : HResult; stdcall;
1219
    function BltFast(dwX, dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface2;
1231
    function BltFast (dwX: DWORD; dwY: DWORD;
-
 
1232
        lpDDSrcSurface: IDirectDrawSurface2; lpSrcRect: PRect;
1220
        const lpSrcRect: TRect; dwTrans: DWORD): HResult; stdcall;
1233
        dwTrans: DWORD) : HResult; stdcall;
1221
    function DeleteAttachedSurface(dwFlags: DWORD;
1234
    function DeleteAttachedSurface (dwFlags: DWORD;
1222
        lpDDSAttachedSurface: IDirectDrawSurface2): HResult; stdcall;
1235
        lpDDSAttachedSurface: IDirectDrawSurface2) : HResult; stdcall;
1223
    function EnumAttachedSurfaces(lpContext: Pointer;
1236
    function EnumAttachedSurfaces (lpContext: Pointer;
1224
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback): HResult; stdcall;
1237
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback) : HResult; stdcall;
1225
    function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
1238
    function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer;
Line 1227... Line 1240...
1227
    function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface2;
1240
    function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface2;
1228
        dwFlags: DWORD): HResult; stdcall;
1241
        dwFlags: DWORD) : HResult; stdcall;
1229
    function GetAttachedSurface(var lpDDSCaps: TDDSCaps;
1242
    function GetAttachedSurface (var lpDDSCaps: TDDSCaps;
1230
        out lplpDDAttachedSurface: IDirectDrawSurface2): HResult; stdcall;
1243
        out lplpDDAttachedSurface: IDirectDrawSurface2) : HResult; stdcall;
1231
    function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
1244
    function GetBltStatus (dwFlags: DWORD) : HResult; stdcall;
1232
    function GetCaps(var lpDDSCaps: TDDSCaps): HResult; stdcall;
1245
    function GetCaps (out lpDDSCaps: TDDSCaps) : HResult; stdcall;
1233
    function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
1246
    function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1234
    function GetColorKey(dwFlags: DWORD; var lpDDColorKey: TDDColorKey): HResult; stdcall;
1247
    function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
-
 
1248
        HResult; stdcall;
1235
    function GetDC(var lphDC: HDC): HResult; stdcall;
1249
    function GetDC (out lphDC: HDC) : HResult; stdcall;
1236
    function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
1250
    function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall;
1237
    function GetOverlayPosition(var lplX, lplY: Longint): HResult; stdcall;
1251
    function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall;
1238
    function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
1252
    function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1239
    function GetPixelFormat(var lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
1253
    function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall;
1240
    function GetSurfaceDesc(var lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1254
    function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
-
 
1255
    function Initialize (lpDD: IDirectDraw;
1241
    function Initialize(lpDD: IDirectDraw; const lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1256
        out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
1242
    function IsLost: HResult; stdcall;
1257
    function IsLost: HResult; stdcall;
1243
    function Lock(lpDestRect: PRect; const lpDDSurfaceDesc: TDDSurfaceDesc;
1258
    function Lock (lpDestRect: PRect;
-
 
1259
        out lpDDSurfaceDesc: TDDSurfaceDesc; dwFlags: DWORD;
1244
        dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1260
        hEvent: THandle) : HResult; stdcall;
1245
    function ReleaseDC(hDC: HDC): HResult; stdcall;
1261
    function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall;
1246
    function Restore: HResult; stdcall;
1262
    function _Restore: HResult; stdcall;
1247
    function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
1263
    function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1248
    function SetColorKey(dwFlags: DWORD; const lpDDColorKey: TDDColorKey): HResult; stdcall;
1264
    function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
-
 
1265
        HResult; stdcall;
1249
    function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
1266
    function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall;
1250
    function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
1267
    function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1251
    function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
1268
    function Unlock (lpSurfaceData: Pointer) : HResult; stdcall;
1252
    function UpdateOverlay(const lpSrcRect: TRect;
1269
    function UpdateOverlay (lpSrcRect: PRect;
1253
        lpDDDestSurface: IDirectDrawSurface2; const lpDestRect: TRect;
1270
        lpDDDestSurface: IDirectDrawSurface2; lpDestRect: PRect;
1254
        dwFlags: DWORD; const lpDDOverlayFx: TDDOverlayFX): HResult; stdcall;
1271
        dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall;
1255
    function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
1272
    function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall;
1256
    function UpdateOverlayZOrder(dwFlags: DWORD;
1273
    function UpdateOverlayZOrder (dwFlags: DWORD;
1257
        lpDDSReference: IDirectDrawSurface2): HResult; stdcall;
1274
        lpDDSReference: IDirectDrawSurface2) : HResult; stdcall;
1258
    // IDirectDrawSurface2 methods
1275
    (*** Added in the v2 interface ***)
1259
    function GetDDInterface(out lplpDD: IUnknown): HResult; stdcall;
1276
    function GetDDInterface (var lplpDD: IDirectDraw) : HResult; stdcall;
1260
    function PageLock(dwFlags: DWORD): HResult; stdcall;
1277
    function PageLock (dwFlags: DWORD) : HResult; stdcall;
1261
    function PageUnlock(dwFlags: DWORD): HResult; stdcall;
1278
    function PageUnlock (dwFlags: DWORD) : HResult; stdcall;
1262
  end;
1279
  end;
1263
 
1280
 
1264
{ IDirectDrawSurface3 Interface }
-
 
1265
 
-
 
1266
  IDirectDrawSurface3 = interface(IUnknown)
1281
  IDirectDrawSurface3 = interface (IUnknown)
1267
    ['{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}']
1282
    ['{DA044E00-69B2-11D0-A1D5-00AA00B8DFBB}']
1268
    // IDirectDrawSurface methods
1283
    (*** IDirectDrawSurface methods ***)
1269
    function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface3): HResult; stdcall;
1284
    function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface3) :
-
 
1285
        HResult; stdcall;
1270
    function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
1286
    function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall;
-
 
1287
    function Blt (lpDestRect: PRect;
1271
    function Blt(const lpDestRect: TRect; lpDDSrcSurface: IDirectDrawSurface3;
1288
        lpDDSrcSurface: IDirectDrawSurface3; lpSrcRect: PRect;
1272
        const lpSrcRect: TRect; dwFlags: DWORD; const lpDDBltFx: TDDBltFX): HResult; stdcall;
1289
        dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall;
1273
    function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1290
    function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1274
        dwFlags: DWORD): HResult; stdcall;
1291
        dwFlags: DWORD) : HResult; stdcall;
1275
    function BltFast(dwX, dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface3;
1292
    function BltFast (dwX: DWORD; dwY: DWORD;
-
 
1293
        lpDDSrcSurface: IDirectDrawSurface3; lpSrcRect: PRect;
1276
        const lpSrcRect: TRect; dwTrans: DWORD): HResult; stdcall;
1294
        dwTrans: DWORD) : HResult; stdcall;
1277
    function DeleteAttachedSurface(dwFlags: DWORD;
1295
    function DeleteAttachedSurface (dwFlags: DWORD;
1278
        lpDDSAttachedSurface: IDirectDrawSurface3): HResult; stdcall;
1296
        lpDDSAttachedSurface: IDirectDrawSurface3) : HResult; stdcall;
1279
    function EnumAttachedSurfaces(lpContext: Pointer;
1297
    function EnumAttachedSurfaces (lpContext: Pointer;
1280
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback): HResult; stdcall;
1298
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback) : HResult; stdcall;
1281
    function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
1299
    function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer;
Line 1283... Line 1301...
1283
    function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface3;
1301
    function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface3;
1284
        dwFlags: DWORD): HResult; stdcall;
1302
        dwFlags: DWORD) : HResult; stdcall;
1285
    function GetAttachedSurface(var lpDDSCaps: TDDSCaps;
1303
    function GetAttachedSurface (var lpDDSCaps: TDDSCaps;
1286
        out lplpDDAttachedSurface: IDirectDrawSurface3): HResult; stdcall;
1304
        out lplpDDAttachedSurface: IDirectDrawSurface3) : HResult; stdcall;
1287
    function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
1305
    function GetBltStatus (dwFlags: DWORD) : HResult; stdcall;
1288
    function GetCaps(var lpDDSCaps: TDDSCaps): HResult; stdcall;
1306
    function GetCaps (out lpDDSCaps: TDDSCaps) : HResult; stdcall;
1289
    function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
1307
    function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1290
    function GetColorKey(dwFlags: DWORD; var lpDDColorKey: TDDColorKey): HResult; stdcall;
1308
    function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
-
 
1309
        HResult; stdcall;
1291
    function GetDC(var lphDC: HDC): HResult; stdcall;
1310
    function GetDC (out lphDC: HDC) : HResult; stdcall;
1292
    function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
1311
    function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall;
1293
    function GetOverlayPosition(var lplX, lplY: Longint): HResult; stdcall;
1312
    function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall;
1294
    function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
1313
    function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1295
    function GetPixelFormat(var lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
1314
    function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall;
1296
    function GetSurfaceDesc(var lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1315
    function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
-
 
1316
    function Initialize (lpDD: IDirectDraw;
1297
    function Initialize(lpDD: IDirectDraw; const lpDDSurfaceDesc: TDDSurfaceDesc): HResult; stdcall;
1317
        out lpDDSurfaceDesc: TDDSurfaceDesc) : HResult; stdcall;
1298
    function IsLost: HResult; stdcall;
1318
    function IsLost: HResult; stdcall;
1299
    function Lock(lpDestRect: PRect; const lpDDSurfaceDesc: TDDSurfaceDesc;
1319
    function Lock (lpDestRect: PRect;
-
 
1320
        out lpDDSurfaceDesc: TDDSurfaceDesc; dwFlags: DWORD;
1300
        dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1321
        hEvent: THandle) : HResult; stdcall;
1301
    function ReleaseDC(hDC: HDC): HResult; stdcall;
1322
    function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall;
1302
    function Restore: HResult; stdcall;
1323
    function _Restore: HResult; stdcall;
1303
    function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
1324
    function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1304
    function SetColorKey(dwFlags: DWORD; const lpDDColorKey: TDDColorKey): HResult; stdcall;
1325
    function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
-
 
1326
        HResult; stdcall;
1305
    function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
1327
    function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall;
1306
    function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
1328
    function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1307
    function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
1329
    function Unlock (lpSurfaceData: Pointer) : HResult; stdcall;
1308
    function UpdateOverlay(const lpSrcRect: TRect;
1330
    function UpdateOverlay (lpSrcRect: PRect;
1309
        lpDDDestSurface: IDirectDrawSurface3; const lpDestRect: TRect;
1331
        lpDDDestSurface: IDirectDrawSurface3; lpDestRect: PRect;
1310
        dwFlags: DWORD; const lpDDOverlayFx: TDDOverlayFX): HResult; stdcall;
1332
        dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall;
1311
    function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
1333
    function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall;
1312
    function UpdateOverlayZOrder(dwFlags: DWORD;
1334
    function UpdateOverlayZOrder (dwFlags: DWORD;
1313
        lpDDSReference: IDirectDrawSurface3): HResult; stdcall;
1335
        lpDDSReference: IDirectDrawSurface3) : HResult; stdcall;
1314
    // IDirectDrawSurface2 methods
1336
    (*** Added in the v2 interface ***)
1315
    function GetDDInterface(out lplpDD: IUnknown): HResult; stdcall;
1337
    function GetDDInterface (out lplpDD: IDirectDraw) : HResult; stdcall;
1316
    function PageLock(dwFlags: DWORD): HResult; stdcall;
1338
    function PageLock (dwFlags: DWORD) : HResult; stdcall;
1317
    function PageUnlock(dwFlags: DWORD): HResult; stdcall;
1339
    function PageUnlock (dwFlags: DWORD) : HResult; stdcall;
1318
    // IDirectDrawSurface3 methods
1340
    (*** Added in the V3 interface ***)
1319
    function SetSurfaceDesc(const lpddsd: TDDSurfaceDesc; dwFlags: DWORD): HResult; stdcall;
1341
    function SetSurfaceDesc(const lpddsd: TDDSurfaceDesc; dwFlags: DWORD) : HResult; stdcall;
1320
  end;
1342
  end;
1321
 
1343
 
-
 
1344
(*
1322
{ IDirectDrawSurface4 Interface }
1345
 * IDirectDrawSurface4 and related interfaces
1323
 
1346
 *)
1324
  IDirectDrawSurface4 = interface(IUnknown)
1347
  IDirectDrawSurface4 = interface (IUnknown)
1325
    ['{0B2B8630-AD35-11D0-8EA6-00609797EA5B}']
1348
    ['{0B2B8630-AD35-11D0-8EA6-00609797EA5B}']
1326
    // IDirectDrawSurface methods
1349
    (*** IDirectDrawSurface methods ***)
1327
    function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface4): HResult; stdcall;
1350
    function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface4) :
-
 
1351
        HResult; stdcall;
1328
    function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
1352
    function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall;
-
 
1353
    function Blt (lpDestRect: PRect;
1329
    function Blt(const lpDestRect: TRect; lpDDSrcSurface: IDirectDrawSurface4;
1354
        lpDDSrcSurface: IDirectDrawSurface4; lpSrcRect: PRect;
1330
        const lpSrcRect: TRect; dwFlags: DWORD; const lpDDBltFx: TDDBltFX): HResult; stdcall;
1355
        dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall;
1331
    function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1356
    function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1332
        dwFlags: DWORD): HResult; stdcall;
1357
        dwFlags: DWORD) : HResult; stdcall;
1333
    function BltFast(dwX, dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface4;
1358
    function BltFast (dwX: DWORD; dwY: DWORD;
-
 
1359
        lpDDSrcSurface: IDirectDrawSurface4; lpSrcRect: PRect;
1334
        const lpSrcRect: TRect; dwTrans: DWORD): HResult; stdcall;
1360
        dwTrans: DWORD) : HResult; stdcall;
1335
    function DeleteAttachedSurface(dwFlags: DWORD;
1361
    function DeleteAttachedSurface (dwFlags: DWORD;
1336
        lpDDSAttachedSurface: IDirectDrawSurface4): HResult; stdcall;
1362
        lpDDSAttachedSurface: IDirectDrawSurface4) : HResult; stdcall;
1337
    function EnumAttachedSurfaces(lpContext: Pointer;
1363
    function EnumAttachedSurfaces (lpContext: Pointer;
1338
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback2): HResult; stdcall;
1364
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback2) : HResult; stdcall;
1339
    function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
1365
    function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer;
1340
        lpfnCallback: TDDEnumSurfacesCallback2): HResult; stdcall;
1366
        lpfnCallback: TDDEnumSurfacesCallback2) : HResult; stdcall;
1341
    function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface4;
1367
    function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface4;
1342
        dwFlags: DWORD): HResult; stdcall;
1368
        dwFlags: DWORD) : HResult; stdcall;
1343
    function GetAttachedSurface(var lpDDSCaps: TDDSCaps2;
1369
    function GetAttachedSurface (const lpDDSCaps: TDDSCaps2;
1344
        out lplpDDAttachedSurface: IDirectDrawSurface4): HResult; stdcall;
1370
        out lplpDDAttachedSurface: IDirectDrawSurface4) : HResult; stdcall;
1345
    function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
1371
    function GetBltStatus (dwFlags: DWORD) : HResult; stdcall;
1346
    function GetCaps(var lpDDSCaps: TDDSCaps2): HResult; stdcall;
1372
    function GetCaps (out lpDDSCaps: TDDSCaps2) : HResult; stdcall;
1347
    function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
1373
    function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1348
    function GetColorKey(dwFlags: DWORD; var lpDDColorKey: TDDColorKey): HResult; stdcall;
1374
    function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
-
 
1375
        HResult; stdcall;
1349
    function GetDC(var lphDC: HDC): HResult; stdcall;
1376
    function GetDC (out lphDC: HDC) : HResult; stdcall;
1350
    function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
1377
    function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall;
1351
    function GetOverlayPosition(var lplX, lplY: Longint): HResult; stdcall;
1378
    function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall;
1352
    function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
1379
    function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1353
    function GetPixelFormat(var lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
1380
    function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall;
1354
    function GetSurfaceDesc(var lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
1381
    function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall;
-
 
1382
    function Initialize (lpDD: IDirectDraw;
1355
    function Initialize(lpDD: IDirectDraw; const lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
1383
        out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall;
1356
    function IsLost: HResult; stdcall;
1384
    function IsLost: HResult; stdcall;
-
 
1385
    function Lock (lpDestRect: PRect;
1357
    function Lock(lpDestRect: PRect; const lpDDSurfaceDesc: TDDSurfaceDesc2;
1386
        out lpDDSurfaceDesc: TDDSurfaceDesc2; dwFlags: DWORD;
1358
        dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1387
        hEvent: THandle) : HResult; stdcall;
1359
    function ReleaseDC(hDC: HDC): HResult; stdcall;
1388
    function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall;
1360
    function Restore: HResult; stdcall;
1389
    function _Restore: HResult; stdcall;
1361
    function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
1390
    function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1362
    function SetColorKey(dwFlags: DWORD; const lpDDColorKey: TDDColorKey): HResult; stdcall;
1391
    function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
-
 
1392
        HResult; stdcall;
1363
    function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
1393
    function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall;
1364
    function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
1394
    function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1365
    function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
1395
    function Unlock (lpRect: PRect) : HResult; stdcall;
1366
    function UpdateOverlay(const lpSrcRect: TRect; lpDDDestSurface: IDirectDrawSurface4;
1396
    function UpdateOverlay (lpSrcRect: PRect;
-
 
1397
        lpDDDestSurface: IDirectDrawSurface4; lpDestRect: PRect;
1367
        const lpDestRect: TRect; dwFlags: DWORD; const lpDDOverlayFx: TDDOverlayFX): HResult; stdcall;
1398
        dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall;
1368
    function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
1399
    function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall;
-
 
1400
    function UpdateOverlayZOrder (dwFlags: DWORD;
1369
    function UpdateOverlayZOrder(dwFlags: DWORD; lpDDSReference: IDirectDrawSurface4): HResult; stdcall;
1401
        lpDDSReference: IDirectDrawSurface4) : HResult; stdcall;
1370
    // IDirectDrawSurface2 methods
1402
    (*** Added in the v2 interface ***)
1371
    function GetDDInterface(out lplpDD: IUnknown): HResult; stdcall;
1403
    function GetDDInterface (out lplpDD: IUnknown) : HResult; stdcall;
1372
    function PageLock(dwFlags: DWORD): HResult; stdcall;
1404
    function PageLock (dwFlags: DWORD) : HResult; stdcall;
1373
    function PageUnlock(dwFlags: DWORD): HResult; stdcall;
1405
    function PageUnlock (dwFlags: DWORD) : HResult; stdcall;
1374
    // IDirectDrawSurface3 methods
1406
    (*** Added in the V3 interface ***)
1375
    function SetSurfaceDesc(const lpddsd: TDDSurfaceDesc2; dwFlags: DWORD): HResult; stdcall;
1407
    function SetSurfaceDesc(const lpddsd2: TDDSurfaceDesc2; dwFlags: DWORD) : HResult; stdcall;
1376
    // IDirectDrawSurface4 methods
1408
    (*** Added in the v4 interface ***)
1377
    function SetPrivateData(const guidTag: TGUID; lpData: Pointer;
1409
    function SetPrivateData(const guidTag: TGUID; lpData: pointer;
1378
      cbSize: DWORD; dwFlags: DWORD): HResult; stdcall;
1410
        cbSize: DWORD; dwFlags: DWORD) : HResult; stdcall;
1379
    function GetPrivateData(const guidTag: TGUID; lpData: Pointer;
1411
    function GetPrivateData(const guidTag: TGUID; lpBuffer: pointer;
1380
      var cbSize: DWORD): HResult; stdcall;
1412
        var lpcbBufferSize: DWORD) : HResult; stdcall;
1381
    function FreePrivateData(const guidTag: TGUID): HResult; stdcall;
1413
    function FreePrivateData(const guidTag: TGUID) : HResult; stdcall;
1382
    function GetUniquenessValue(var lpValue: DWORD): HResult; stdcall;
1414
    function GetUniquenessValue(out lpValue: DWORD) : HResult; stdcall;
1383
    function ChangeUniquenessValue: HResult; stdcall;
1415
    function ChangeUniquenessValue : HResult; stdcall;
1384
  end;
1416
  end;
1385
 
1417
 
1386
{ IDirectDrawSurface7 Interface }
-
 
1387
 
-
 
1388
  IDirectDrawSurface7 = interface(IUnknown)
1418
  IDirectDrawSurface7 = interface (IUnknown)
1389
    ['{06675A80-3B9B-11D2-B92F-00609797EA5B}']
1419
    ['{06675a80-3b9b-11d2-b92f-00609797ea5b}']
1390
    // IDirectDrawSurface methods
1420
    (*** IDirectDrawSurface methods ***)
1391
    function AddAttachedSurface(lpDDSAttachedSurface: IDirectDrawSurface7): HResult; stdcall;
1421
    function AddAttachedSurface (lpDDSAttachedSurface: IDirectDrawSurface7) :
-
 
1422
        HResult; stdcall;
1392
    function AddOverlayDirtyRect(const lpRect: TRect): HResult; stdcall;
1423
    function AddOverlayDirtyRect (const lpRect: TRect) : HResult; stdcall;
-
 
1424
    function Blt (lpDestRect: PRect;
1393
    function Blt(const lpDestRect: TRect; lpDDSrcSurface: IDirectDrawSurface7;
1425
        lpDDSrcSurface: IDirectDrawSurface7; lpSrcRect: PRect;
1394
        const lpSrcRect: TRect; dwFlags: DWORD; const lpDDBltFx: TDDBltFX): HResult; stdcall;
1426
        dwFlags: DWORD; lpDDBltFx: PDDBltFX) : HResult; stdcall;
1395
    function BltBatch(const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1427
    function BltBatch (const lpDDBltBatch: TDDBltBatch; dwCount: DWORD;
1396
        dwFlags: DWORD): HResult; stdcall;
1428
        dwFlags: DWORD) : HResult; stdcall;
1397
    function BltFast(dwX, dwY: DWORD; lpDDSrcSurface: IDirectDrawSurface7;
1429
    function BltFast (dwX: DWORD; dwY: DWORD;
-
 
1430
        lpDDSrcSurface: IDirectDrawSurface7; lpSrcRect: PRect;
1398
        const lpSrcRect: TRect; dwTrans: DWORD): HResult; stdcall;
1431
        dwTrans: DWORD) : HResult; stdcall;
1399
    function DeleteAttachedSurface(dwFlags: DWORD;
1432
    function DeleteAttachedSurface (dwFlags: DWORD;
1400
        lpDDSAttachedSurface: IDirectDrawSurface7): HResult; stdcall;
1433
        lpDDSAttachedSurface: IDirectDrawSurface7) : HResult; stdcall;
1401
    function EnumAttachedSurfaces(lpContext: Pointer;
1434
    function EnumAttachedSurfaces (lpContext: Pointer;
1402
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback7): HResult; stdcall;
1435
        lpEnumSurfacesCallback: TDDEnumSurfacesCallback7) : HResult; stdcall;
1403
    function EnumOverlayZOrders(dwFlags: DWORD; lpContext: Pointer;
1436
    function EnumOverlayZOrders (dwFlags: DWORD; lpContext: Pointer;
1404
        lpfnCallback: TDDEnumSurfacesCallback7): HResult; stdcall;
1437
        lpfnCallback: TDDEnumSurfacesCallback7) : HResult; stdcall;
1405
    function Flip(lpDDSurfaceTargetOverride: IDirectDrawSurface7;
1438
    function Flip (lpDDSurfaceTargetOverride: IDirectDrawSurface7;
1406
        dwFlags: DWORD): HResult; stdcall;
1439
        dwFlags: DWORD) : HResult; stdcall;
1407
    function GetAttachedSurface(var lpDDSCaps: TDDSCaps2;
1440
    function GetAttachedSurface (const lpDDSCaps: TDDSCaps2;
1408
        out lplpDDAttachedSurface: IDirectDrawSurface7): HResult; stdcall;
1441
        out lplpDDAttachedSurface: IDirectDrawSurface7) : HResult; stdcall;
1409
    function GetBltStatus(dwFlags: DWORD): HResult; stdcall;
1442
    function GetBltStatus (dwFlags: DWORD) : HResult; stdcall;
1410
    function GetCaps(var lpDDSCaps: TDDSCaps2): HResult; stdcall;
1443
    function GetCaps (out lpDDSCaps: TDDSCaps2) : HResult; stdcall;
1411
    function GetClipper(out lplpDDClipper: IDirectDrawClipper): HResult; stdcall;
1444
    function GetClipper (out lplpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1412
    function GetColorKey(dwFlags: DWORD; var lpDDColorKey: TDDColorKey): HResult; stdcall;
1445
    function GetColorKey (dwFlags: DWORD; out lpDDColorKey: TDDColorKey) :
-
 
1446
        HResult; stdcall;
1413
    function GetDC(var lphDC: HDC): HResult; stdcall;
1447
    function GetDC (out lphDC: HDC) : HResult; stdcall;
1414
    function GetFlipStatus(dwFlags: DWORD): HResult; stdcall;
1448
    function GetFlipStatus (dwFlags: DWORD) : HResult; stdcall;
1415
    function GetOverlayPosition(var lplX, lplY: Longint): HResult; stdcall;
1449
    function GetOverlayPosition (out lplX, lplY: LongInt) : HResult; stdcall;
1416
    function GetPalette(out lplpDDPalette: IDirectDrawPalette): HResult; stdcall;
1450
    function GetPalette (out lplpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1417
    function GetPixelFormat(var lpDDPixelFormat: TDDPixelFormat): HResult; stdcall;
1451
    function GetPixelFormat (out lpDDPixelFormat: TDDPixelFormat) : HResult; stdcall;
1418
    function GetSurfaceDesc(var lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
1452
    function GetSurfaceDesc (out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall;
-
 
1453
    function Initialize (lpDD: IDirectDraw;
1419
    function Initialize(lpDD: IDirectDraw; const lpDDSurfaceDesc: TDDSurfaceDesc2): HResult; stdcall;
1454
        out lpDDSurfaceDesc: TDDSurfaceDesc2) : HResult; stdcall;
1420
    function IsLost: HResult; stdcall;
1455
    function IsLost: HResult; stdcall;
-
 
1456
    function Lock (lpDestRect: PRect;
1421
    function Lock(lpDestRect: PRect; const lpDDSurfaceDesc: TDDSurfaceDesc2;
1457
        out lpDDSurfaceDesc: TDDSurfaceDesc2; dwFlags: DWORD;
1422
        dwFlags: DWORD; hEvent: THandle): HResult; stdcall;
1458
        hEvent: THandle) : HResult; stdcall;
1423
    function ReleaseDC(hDC: HDC): HResult; stdcall;
1459
    function ReleaseDC (hDC: Windows.HDC) : HResult; stdcall;
1424
    function Restore: HResult; stdcall;
1460
    function _Restore: HResult; stdcall;
1425
    function SetClipper(lpDDClipper: IDirectDrawClipper): HResult; stdcall;
1461
    function SetClipper (lpDDClipper: IDirectDrawClipper) : HResult; stdcall;
1426
    function SetColorKey(dwFlags: DWORD; const lpDDColorKey: TDDColorKey): HResult; stdcall;
1462
    function SetColorKey (dwFlags: DWORD; lpDDColorKey: PDDColorKey) :
-
 
1463
        HResult; stdcall;
1427
    function SetOverlayPosition(lX, lY: Longint): HResult; stdcall;
1464
    function SetOverlayPosition (lX, lY: LongInt) : HResult; stdcall;
1428
    function SetPalette(lpDDPalette: IDirectDrawPalette): HResult; stdcall;
1465
    function SetPalette (lpDDPalette: IDirectDrawPalette) : HResult; stdcall;
1429
    function Unlock(lpSurfaceData: Pointer): HResult; stdcall;
1466
    function Unlock (lpRect: PRect) : HResult; stdcall;
1430
    function UpdateOverlay(const lpSrcRect: TRect; lpDDDestSurface: IDirectDrawSurface7;
1467
    function UpdateOverlay (lpSrcRect: PRect;
-
 
1468
        lpDDDestSurface: IDirectDrawSurface7; lpDestRect: PRect;
1431
        const lpDestRect: TRect; dwFlags: DWORD; const lpDDOverlayFx: TDDOverlayFX): HResult; stdcall;
1469
        dwFlags: DWORD; lpDDOverlayFx: PDDOverlayFX) : HResult; stdcall;
1432
    function UpdateOverlayDisplay(dwFlags: DWORD): HResult; stdcall;
1470
    function UpdateOverlayDisplay (dwFlags: DWORD) : HResult; stdcall;
-
 
1471
    function UpdateOverlayZOrder (dwFlags: DWORD;
1433
    function UpdateOverlayZOrder(dwFlags: DWORD; lpDDSReference: IDirectDrawSurface7): HResult; stdcall;
1472
        lpDDSReference: IDirectDrawSurface7) : HResult; stdcall;
1434
    // IDirectDrawSurface2 methods
1473
    (*** Added in the v2 interface ***)
1435
    function GetDDInterface(out lplpDD: IUnknown): HResult; stdcall;
1474
    function GetDDInterface (out lplpDD: IUnknown) : HResult; stdcall;
1436
    function PageLock(dwFlags: DWORD): HResult; stdcall;
1475
    function PageLock (dwFlags: DWORD) : HResult; stdcall;
1437
    function PageUnlock(dwFlags: DWORD): HResult; stdcall;
1476
    function PageUnlock (dwFlags: DWORD) : HResult; stdcall;
1438
    // IDirectDrawSurface3 methods
1477
    (*** Added in the V3 interface ***)
1439
    function SetSurfaceDesc(const lpddsd: TDDSurfaceDesc2; dwFlags: DWORD): HResult; stdcall;
1478
    function SetSurfaceDesc(const lpddsd2: TDDSurfaceDesc2; dwFlags: DWORD) : HResult; stdcall;
1440
    // IDirectDrawSurface4 methods
1479
    (*** Added in the v4 interface ***)
1441
    function SetPrivateData(const guidTag: TGUID; lpData: Pointer;
1480
    function SetPrivateData(const guidTag: TGUID; lpData: pointer;
1442
      cbSize: DWORD; dwFlags: DWORD): HResult; stdcall;
1481
        cbSize: DWORD; dwFlags: DWORD) : HResult; stdcall;
1443
    function GetPrivateData(const guidTag: TGUID; lpData: Pointer;
1482
    function GetPrivateData(const guidTag: TGUID; lpBuffer: pointer;
1444
      var cbSize: DWORD): HResult; stdcall;
1483
        var lpcbBufferSize: DWORD) : HResult; stdcall;
1445
    function FreePrivateData(const guidTag: TGUID): HResult; stdcall;
1484
    function FreePrivateData(const guidTag: TGUID) : HResult; stdcall;
1446
    function GetUniquenessValue(var lpValue: DWORD): HResult; stdcall;
1485
    function GetUniquenessValue(out lpValue: DWORD) : HResult; stdcall;
1447
    function ChangeUniquenessValue: HResult; stdcall;
1486
    function ChangeUniquenessValue : HResult; stdcall;
1448
    // Moved Texture7 methods here
1487
    (*** Moved Texture7 methods here ***)
1449
    function SetPriority(dwPriority: DWORD): HResult; stdcall;
1488
    function SetPriority(dwPriority: DWORD) : HResult; stdcall;
1450
    function GetPriority(var lpdwPriority: DWORD): HResult; stdcall;
1489
    function GetPriority(out lpdwPriority: DWORD) : HResult; stdcall;
1451
    function SetLOD(dwMaxLOD: DWORD): HResult; stdcall;
1490
    function SetLOD(dwMaxLOD: DWORD) : HResult; stdcall;
1452
    function GetLOD(var lpdwMaxLOD: DWORD): HResult; stdcall;
1491
    function GetLOD(out lpdwMaxLOD: DWORD) : HResult; stdcall;
1453
  end;
1492
  end;
1454
 
1493
 
1455
{ IDirectDrawColorControl Interface }
-
 
1456
 
-
 
1457
  IDirectDrawColorControl = interface(IUnknown)
1494
  IDirectDrawColorControl = interface (IUnknown)
1458
    ['{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}']
1495
    ['{4B9F0EE0-0D7E-11D0-9B06-00A0C903A3B8}']
1459
    // IDirectDrawColorControl methods
-
 
1460
    function GetColorControls(var lpColorControl: TDDColorControl): HResult; stdcall;
1496
    function GetColorControls(out lpColorControl: TDDColorControl) : HResult; stdcall;
1461
    function SetColorControls(const lpColorControl: TDDColorControl): HResult; stdcall;
1497
    function SetColorControls(const lpColorControl: TDDColorControl) : HResult; stdcall;
1462
  end;
1498
  end;
1463
 
1499
 
-
 
1500
(*
1464
{ IDirectDrawGammaControl Interface }
1501
 * IDirectDrawGammaControl
1465
 
1502
 *)
1466
  IDirectDrawGammaControl = interface(IUnknown)
1503
  IDirectDrawGammaControl = interface (IUnknown)
1467
    ['{69C11C3E-B46B-11D1-AD7A-00C04FC29B4E}']
1504
    ['{69C11C3E-B46B-11D1-AD7A-00C04FC29B4E}']
1468
    // IDirectDrawGammaControl methods
-
 
1469
    function GetGammaRamp(dwFlags: DWORD; var lpRampData: TDDGammaRamp): HResult; stdcall;
1505
    function GetGammaRamp (dwFlags: DWORD; out lpRampData: TDDGammaRamp)
-
 
1506
        : HResult; stdcall;
1470
    function SetGammaRamp(dwFlags: DWORD; const lpRampData: TDDGammaRamp): HResult; stdcall;
1507
    function SetGammaRamp (dwFlags: DWORD; const lpRampData: TDDGammaRamp)
-
 
1508
        : HResult; stdcall;
1471
  end;
1509
  end;
1472
 
1510
 
1473
const
1511
type
1474
{ Flags for DirectDrawEnumerateEx }
1512
  IID_IDirectDraw = IDirectDraw;
-
 
1513
  IID_IDirectDraw2 = IDirectDraw2;
-
 
1514
  IID_IDirectDraw4 = IDirectDraw4;
-
 
1515
  IID_IDirectDraw7 = IDirectDraw7;
1475
  DDENUM_ATTACHEDSECONDARYDEVICES = $00000001;
1516
  IID_IDirectDrawSurface = IDirectDrawSurface;
1476
  DDENUM_DETACHEDSECONDARYDEVICES = $00000002;
1517
  IID_IDirectDrawSurface2 = IDirectDrawSurface2;
-
 
1518
  IID_IDirectDrawSurface3 = IDirectDrawSurface3;
1477
  DDENUM_NONDISPLAYDEVICES        = $00000004;
1519
  IID_IDirectDrawSurface4 = IDirectDrawSurface4;
-
 
1520
  IID_IDirectDrawSurface7 = IDirectDrawSurface7;
1478
 
1521
 
1479
{ Flags for the IDirectDraw4.GetDeviceIdentifier method }
1522
  IID_IDirectDrawPalette = IDirectDrawPalette;
1480
  DDGDI_GETHOSTIDENTIFIER = $00000001;
1523
  IID_IDirectDrawClipper = IDirectDrawClipper;
-
 
1524
  IID_IDirectDrawColorControl = IDirectDrawColorControl;
-
 
1525
  IID_IDirectDrawGammaControl = IDirectDrawGammaControl;
1481
 
1526
 
-
 
1527
const  
-
 
1528
(*
1482
{ ddsCaps field is valid. }
1529
 * ddsCaps field is valid.
-
 
1530
 *)
1483
  DDSD_CAPS               = $00000001;     // default
1531
  DDSD_CAPS               = $00000001;     // default
-
 
1532
 
-
 
1533
(*
-
 
1534
 * dwHeight field is valid.
-
 
1535
 *)
1484
  DDSD_HEIGHT             = $00000002;
1536
  DDSD_HEIGHT             = $00000002;
-
 
1537
 
-
 
1538
(*
-
 
1539
 * dwWidth field is valid.
-
 
1540
 *)
1485
  DDSD_WIDTH              = $00000004;
1541
  DDSD_WIDTH              = $00000004;
-
 
1542
 
-
 
1543
(*
-
 
1544
 * lPitch is valid.
-
 
1545
 *)
1486
  DDSD_PITCH              = $00000008;
1546
  DDSD_PITCH              = $00000008;
-
 
1547
 
-
 
1548
(*
-
 
1549
 * dwBackBufferCount is valid.
-
 
1550
 *)
1487
  DDSD_BACKBUFFERCOUNT    = $00000020;
1551
  DDSD_BACKBUFFERCOUNT    = $00000020;
-
 
1552
 
-
 
1553
(*
-
 
1554
 * dwZBufferBitDepth is valid.  (shouldnt be used in DDSURFACEDESC2)
-
 
1555
 *)
1488
  DDSD_ZBUFFERBITDEPTH    = $00000040;
1556
  DDSD_ZBUFFERBITDEPTH    = $00000040;
-
 
1557
 
-
 
1558
(*
-
 
1559
 * dwAlphaBitDepth is valid.
-
 
1560
 *)
1489
  DDSD_ALPHABITDEPTH      = $00000080;
1561
   DDSD_ALPHABITDEPTH      = $00000080;
-
 
1562
 
-
 
1563
(*
-
 
1564
 * lpSurface is valid.
-
 
1565
 *)
1490
  DDSD_LPSURFACE          = $00000800;
1566
  DDSD_LPSURFACE           = $00000800;
-
 
1567
 
-
 
1568
(*
-
 
1569
 * ddpfPixelFormat is valid.
-
 
1570
 *)
1491
  DDSD_PIXELFORMAT        = $00001000;
1571
  DDSD_PIXELFORMAT        = $00001000;
-
 
1572
 
-
 
1573
(*
-
 
1574
 * ddckCKDestOverlay is valid.
-
 
1575
 *)
1492
  DDSD_CKDESTOVERLAY      = $00002000;
1576
  DDSD_CKDESTOVERLAY      = $00002000;
-
 
1577
 
-
 
1578
(*
-
 
1579
 * ddckCKDestBlt is valid.
-
 
1580
 *)
1493
  DDSD_CKDESTBLT          = $00004000;
1581
  DDSD_CKDESTBLT          = $00004000;
-
 
1582
 
-
 
1583
(*
-
 
1584
 * ddckCKSrcOverlay is valid.
-
 
1585
 *)
1494
  DDSD_CKSRCOVERLAY       = $00008000;
1586
  DDSD_CKSRCOVERLAY       = $00008000;
-
 
1587
 
-
 
1588
(*
-
 
1589
 * ddckCKSrcBlt is valid.
-
 
1590
 *)
1495
  DDSD_CKSRCBLT           = $00010000;
1591
  DDSD_CKSRCBLT           = $00010000;
-
 
1592
 
-
 
1593
(*
-
 
1594
 * dwMipMapCount is valid.
-
 
1595
 *)
1496
  DDSD_MIPMAPCOUNT        = $00020000;
1596
  DDSD_MIPMAPCOUNT        = $00020000;
-
 
1597
 
-
 
1598
 (*
-
 
1599
  * dwRefreshRate is valid
-
 
1600
  *)
1497
  DDSD_REFRESHRATE        = $00040000;
1601
  DDSD_REFRESHRATE        = $00040000;
-
 
1602
 
-
 
1603
(*
-
 
1604
 * dwLinearSize is valid
-
 
1605
 *)
1498
  DDSD_LINEARSIZE         = $00080000;
1606
  DDSD_LINEARSIZE         = $00080000;
-
 
1607
 
-
 
1608
(*
-
 
1609
 * dwTextureStage is valid
-
 
1610
 *)
1499
  DDSD_TEXTURESTAGE       = $00100000;
1611
  DDSD_TEXTURESTAGE       = $00100000;
1500
  DDSD_FVF                = $00200000;
-
 
1501
  DDSD_SRCVBHANDLE        = $00400000;
-
 
1502
  DDSD_ALL                = $007ff9ee;
-
 
1503
 
1612
 
-
 
1613
(*
-
 
1614
 * All input fields are valid.
-
 
1615
 *)
-
 
1616
  DDSD_ALL                = $001ff9ee;
-
 
1617
 
-
 
1618
 
-
 
1619
(*
-
 
1620
 * guid field is valid.
-
 
1621
 *)
-
 
1622
  DDOSD_GUID                  = $00000001;
-
 
1623
 
-
 
1624
(*
-
 
1625
 * dwCompressionRatio field is valid.
-
 
1626
 *)
-
 
1627
  DDOSD_COMPRESSION_RATIO     = $00000002;
-
 
1628
 
-
 
1629
(*
-
 
1630
 * ddSCaps field is valid.
-
 
1631
 *)
-
 
1632
  DDOSD_SCAPS                 = $00000004;
-
 
1633
 
-
 
1634
(*
-
 
1635
 * ddOSCaps field is valid.
-
 
1636
 *)
-
 
1637
  DDOSD_OSCAPS                = $00000008;
-
 
1638
 
-
 
1639
(*
-
 
1640
 * All input fields are valid.
-
 
1641
 *)
-
 
1642
  DDOSD_ALL                   = $0000000f;
-
 
1643
 
-
 
1644
(*
-
 
1645
 * The surface's optimized pixelformat is compressed
-
 
1646
 *)
-
 
1647
  DDOSDCAPS_OPTCOMPRESSED                       = $00000001;
-
 
1648
 
-
 
1649
(*
-
 
1650
 * The surface's optimized pixelformat is reordered
-
 
1651
 *)
-
 
1652
  DDOSDCAPS_OPTREORDERED                        = $00000002;
-
 
1653
 
-
 
1654
(*
-
 
1655
 * The opt surface is a monolithic mipmap
-
 
1656
 *)
-
 
1657
  DDOSDCAPS_MONOLITHICMIPMAP            = $00000004;
-
 
1658
 
-
 
1659
(*
-
 
1660
 * The valid Surf caps:
-
 
1661
 *   DDSCAPS_SYSTEMMEMORY       = $00000800;
-
 
1662
 *   DDSCAPS_VIDEOMEMORY        = $00004000;
-
 
1663
 *   DDSCAPS_LOCALVIDMEM        = $10000000;
-
 
1664
 *   DDSCAPS_NONLOCALVIDMEM     = $20000000;
-
 
1665
 *)
-
 
1666
  DDOSDCAPS_VALIDSCAPS          = $30004800;
-
 
1667
 
-
 
1668
(*
-
 
1669
 * The valid OptSurf caps
-
 
1670
 *)
-
 
1671
  DDOSDCAPS_VALIDOSCAPS                 = $00000007;
-
 
1672
 
-
 
1673
 
-
 
1674
(*
-
 
1675
 * DDCOLORCONTROL
-
 
1676
 *)
-
 
1677
 
-
 
1678
(*
-
 
1679
 * lBrightness field is valid.
-
 
1680
 *)
-
 
1681
  DDCOLOR_BRIGHTNESS            = $00000001;
-
 
1682
 
-
 
1683
(*
-
 
1684
 * lContrast field is valid.
-
 
1685
 *)
-
 
1686
  DDCOLOR_CONTRAST              = $00000002;
-
 
1687
 
-
 
1688
(*
-
 
1689
 * lHue field is valid.
-
 
1690
 *)
-
 
1691
  DDCOLOR_HUE                   = $00000004;
-
 
1692
 
-
 
1693
(*
-
 
1694
 * lSaturation field is valid.
-
 
1695
 *)
-
 
1696
  DDCOLOR_SATURATION            = $00000008;
-
 
1697
 
-
 
1698
(*
-
 
1699
 * lSharpness field is valid.
-
 
1700
 *)
-
 
1701
  DDCOLOR_SHARPNESS             = $00000010;
-
 
1702
 
-
 
1703
(*
-
 
1704
 * lGamma field is valid.
-
 
1705
 *)
-
 
1706
  DDCOLOR_GAMMA                 = $00000020;
-
 
1707
 
-
 
1708
(*
-
 
1709
 * lColorEnable field is valid.
-
 
1710
 *)
-
 
1711
  DDCOLOR_COLORENABLE           = $00000040;
-
 
1712
 
-
 
1713
 
-
 
1714
 
-
 
1715
(*============================================================================
-
 
1716
 *
1504
{ DirectDraw Driver Capability Flags }
1717
 * Direct Draw Capability Flags
-
 
1718
 *
-
 
1719
 * These flags are used to describe the capabilities of a given Surface.
-
 
1720
 * All flags are bit flags.
-
 
1721
 *
-
 
1722
 *==========================================================================*)
-
 
1723
 
-
 
1724
(****************************************************************************
-
 
1725
 *
-
 
1726
 * DIRECTDRAWSURFACE CAPABILITY FLAGS
-
 
1727
 *
-
 
1728
 ****************************************************************************)
-
 
1729
(*
-
 
1730
 * This bit currently has no meaning.
-
 
1731
 *)
-
 
1732
  DDSCAPS_RESERVED1                       = $00000001;
-
 
1733
 
-
 
1734
(*
-
 
1735
 * Indicates that this surface contains alpha-only information.
-
 
1736
 * (To determine if a surface is RGBA/YUVA, the pixel format must be
-
 
1737
 * interrogated.)
-
 
1738
 *)
-
 
1739
  DDSCAPS_ALPHA                           = $00000002;
-
 
1740
 
-
 
1741
(*
-
 
1742
 * Indicates that this surface is a backbuffer.  It is generally
-
 
1743
 * set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
-
 
1744
 * It indicates that this surface is THE back buffer of a surface
-
 
1745
 * flipping structure.  DirectDraw supports N surfaces in a
-
 
1746
 * surface flipping structure.  Only the surface that immediately
-
 
1747
 * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
-
 
1748
 * The other surfaces are identified as back buffers by the presence
-
 
1749
 * of the DDSCAPS_FLIP capability, their attachment order, and the
-
 
1750
 * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
-
 
1751
 * capabilities.  The bit is sent to CreateSurface when a standalone
-
 
1752
 * back buffer is being created.  This surface could be attached to
-
 
1753
 * a front buffer and/or back buffers to form a flipping surface
-
 
1754
 * structure after the CreateSurface call.  See AddAttachments for
-
 
1755
 * a detailed description of the behaviors in this case.
-
 
1756
 *)
-
 
1757
  DDSCAPS_BACKBUFFER                      = $00000004;
-
 
1758
 
-
 
1759
(*
-
 
1760
 * Indicates a complex surface structure is being described.  A
-
 
1761
 * complex surface structure results in the creation of more than
-
 
1762
 * one surface.  The additional surfaces are attached to the root
-
 
1763
 * surface.  The complex structure can only be destroyed by
-
 
1764
 * destroying the root.
-
 
1765
 *)
-
 
1766
  DDSCAPS_COMPLEX                         = $00000008;
-
 
1767
 
-
 
1768
(*
-
 
1769
 * Indicates that this surface is a part of a surface flipping structure.
-
 
1770
 * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
-
 
1771
 * DDSCAP_BACKBUFFER bits are not set.  They are set by CreateSurface
-
 
1772
 * on the resulting creations.  The dwBackBufferCount field in the
-
 
1773
 * TDDSurfaceDesc structure must be set to at least 1 in order for
-
 
1774
 * the CreateSurface call to succeed.  The DDSCAPS_COMPLEX capability
-
 
1775
 * must always be set with creating multiple surfaces through CreateSurface.
-
 
1776
 *)
-
 
1777
  DDSCAPS_FLIP                            = $00000010;
-
 
1778
 
-
 
1779
(*
-
 
1780
 * Indicates that this surface is THE front buffer of a surface flipping
-
 
1781
 * structure.  It is generally set by CreateSurface when the DDSCAPS_FLIP
-
 
1782
 * capability bit is set.
-
 
1783
 * If this capability is sent to CreateSurface then a standalonw front buffer
-
 
1784
 * is created.  This surface will not have the DDSCAPS_FLIP capability.
-
 
1785
 * It can be attached to other back buffers to form a flipping structure.
-
 
1786
 * See AddAttachments for a detailed description of the behaviors in this
-
 
1787
 * case.
-
 
1788
 *)
-
 
1789
  DDSCAPS_FRONTBUFFER                     = $00000020;
-
 
1790
 
-
 
1791
(*
-
 
1792
 * Indicates that this surface is any offscreen surface that is not an overlay,
-
 
1793
 * texture, zbuffer, front buffer, back buffer, or alpha surface.  It is used
-
 
1794
 * to identify plain vanilla surfaces.
-
 
1795
 *)
-
 
1796
  DDSCAPS_OFFSCREENPLAIN                  = $00000040;
-
 
1797
 
-
 
1798
(*
-
 
1799
 * Indicates that this surface is an overlay.  It may or may not be directly visible
-
 
1800
 * depending on whether or not it is currently being overlayed onto the primary
-
 
1801
 * surface.  DDSCAPS_VISIBLE can be used to determine whether or not it is being
-
 
1802
 * overlayed at the moment.
-
 
1803
 *)
-
 
1804
  DDSCAPS_OVERLAY                         = $00000080;
-
 
1805
 
-
 
1806
(*
-
 
1807
 * Indicates that unique DirectDrawPalette objects can be created and
-
 
1808
 * attached to this surface.
-
 
1809
 *)
-
 
1810
  DDSCAPS_PALETTE                         = $00000100;
-
 
1811
 
-
 
1812
(*
-
 
1813
 * Indicates that this surface is the primary surface.  The primary
-
 
1814
 * surface represents what the user is seeing at the moment.
-
 
1815
 *)
-
 
1816
  DDSCAPS_PRIMARYSURFACE                  = $00000200;
-
 
1817
 
-
 
1818
(*
-
 
1819
 * This flag used to be DDSCAPS_PRIMARYSURFACELEFT, which is now
-
 
1820
 * obsolete.
-
 
1821
 *)
-
 
1822
  DDSCAPS_RESERVED3              = $00000400;
-
 
1823
(*
-
 
1824
 * Indicates that this surface is the primary surface for the left eye.
-
 
1825
 * The primary surface for the left eye represents what the user is seeing
-
 
1826
 * at the moment with the users left eye.  When this surface is created the
-
 
1827
 * DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
-
 
1828
 * right eye.
-
 
1829
 *)
-
 
1830
  DDSCAPS_PRIMARYSURFACELEFT = DDSCAPS_RESERVED3;
-
 
1831
 
-
 
1832
(*
-
 
1833
 * Indicates that this surface memory was allocated in system memory
-
 
1834
 *)
-
 
1835
  DDSCAPS_SYSTEMMEMORY                    = $00000800;
-
 
1836
 
-
 
1837
(*
-
 
1838
 * Indicates that this surface can be used as a 3D texture.  It does not
-
 
1839
 * indicate whether or not the surface is being used for that purpose.
-
 
1840
 *)
-
 
1841
  DDSCAPS_TEXTURE                         = $00001000;
-
 
1842
 
-
 
1843
(*
-
 
1844
 * Indicates that a surface may be a destination for 3D rendering.  This
-
 
1845
 * bit must be set in order to query for a Direct3D Device Interface
-
 
1846
 * from this surface.
-
 
1847
 *)
-
 
1848
  DDSCAPS_3DDEVICE                        = $00002000;
-
 
1849
 
-
 
1850
(*
-
 
1851
 * Indicates that this surface exists in video memory.
-
 
1852
 *)
-
 
1853
  DDSCAPS_VIDEOMEMORY                     = $00004000;
-
 
1854
 
-
 
1855
(*
-
 
1856
 * Indicates that changes made to this surface are immediately visible.
-
 
1857
 * It is always set for the primary surface and is set for overlays while
-
 
1858
 * they are being overlayed and texture maps while they are being textured.
-
 
1859
 *)
-
 
1860
  DDSCAPS_VISIBLE                         = $00008000;
-
 
1861
 
-
 
1862
(*
-
 
1863
 * Indicates that only writes are permitted to the surface.  Read accesses
-
 
1864
 * from the surface may or may not generate a protection fault, but the
-
 
1865
 * results of a read from this surface will not be meaningful.  READ ONLY.
-
 
1866
 *)
-
 
1867
  DDSCAPS_WRITEONLY                       = $00010000;
-
 
1868
 
-
 
1869
(*
-
 
1870
 * Indicates that this surface is a z buffer. A z buffer does not contain
-
 
1871
 * displayable information.  Instead it contains bit depth information that is
-
 
1872
 * used to determine which pixels are visible and which are obscured.
-
 
1873
 *)
-
 
1874
  DDSCAPS_ZBUFFER                         = $00020000;
-
 
1875
 
-
 
1876
(*
-
 
1877
 * Indicates surface will have a DC associated long term
-
 
1878
 *)
-
 
1879
  DDSCAPS_OWNDC                           = $00040000;
-
 
1880
 
-
 
1881
(*
-
 
1882
 * Indicates surface should be able to receive live video
-
 
1883
 *)
-
 
1884
  DDSCAPS_LIVEVIDEO                       = $00080000;
-
 
1885
 
-
 
1886
(*
-
 
1887
 * Indicates surface should be able to have a stream decompressed
-
 
1888
 * to it by the hardware.
-
 
1889
 *)
-
 
1890
  DDSCAPS_HWCODEC                         = $00100000;
-
 
1891
 
-
 
1892
(*
-
 
1893
 * Surface is a ModeX surface.
-
 
1894
 *
-
 
1895
 *)
-
 
1896
  DDSCAPS_MODEX                           = $00200000;
-
 
1897
 
-
 
1898
(*
-
 
1899
 * Indicates surface is one level of a mip-map. This surface will
-
 
1900
 * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map.
-
 
1901
 * This can be done explicitly, by creating a number of surfaces and
-
 
1902
 * attaching them with AddAttachedSurface or by implicitly by CreateSurface.
-
 
1903
 * If this bit is set then DDSCAPS_TEXTURE must also be set.
-
 
1904
 *)
-
 
1905
  DDSCAPS_MIPMAP                          = $00400000;
-
 
1906
 
-
 
1907
(*
-
 
1908
 * This bit is reserved. It should not be specified.
-
 
1909
 *)
-
 
1910
  DDSCAPS_RESERVED2                       = $00800000;
-
 
1911
 
-
 
1912
(*
-
 
1913
 * Indicates that memory for the surface is not allocated until the surface
-
 
1914
 * is loaded (via the Direct3D texture Load() function).
-
 
1915
 *)
-
 
1916
  DDSCAPS_ALLOCONLOAD                     = $04000000;
-
 
1917
 
-
 
1918
(*
-
 
1919
 * Indicates that the surface will recieve data from a video port.
-
 
1920
 *)
-
 
1921
  DDSCAPS_VIDEOPORT                       = $08000000;
-
 
1922
 
-
 
1923
(*
-
 
1924
 * Indicates that a video memory surface is resident in true, local video
-
 
1925
 * memory rather than non-local video memory. If this flag is specified then
-
 
1926
 * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
-
 
1927
 * DDSCAPS_NONLOCALVIDMEM.
-
 
1928
 *)
-
 
1929
  DDSCAPS_LOCALVIDMEM                     = $10000000;
-
 
1930
 
-
 
1931
(*
-
 
1932
 * Indicates that a video memory surface is resident in non-local video
-
 
1933
 * memory rather than true, local video memory. If this flag is specified
-
 
1934
 * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with
-
 
1935
 * DDSCAPS_LOCALVIDMEM.
-
 
1936
 *)
-
 
1937
  DDSCAPS_NONLOCALVIDMEM                  = $20000000;
-
 
1938
 
-
 
1939
(*
-
 
1940
 * Indicates that this surface is a standard VGA mode surface, and not a
-
 
1941
 * ModeX surface. (This flag will never be set in combination with the
-
 
1942
 * DDSCAPS_MODEX flag).
-
 
1943
 *)
-
 
1944
  DDSCAPS_STANDARDVGAMODE                 = $40000000;
-
 
1945
 
-
 
1946
(*
-
 
1947
 * Indicates that this surface will be an optimized surface. This flag is
-
 
1948
 * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface
-
 
1949
 * will be created without any underlying video memory until loaded.
-
 
1950
 *)
-
 
1951
  DDSCAPS_OPTIMIZED                       = $80000000;
-
 
1952
 
-
 
1953
 
-
 
1954
 
-
 
1955
(*
-
 
1956
 * Indicates that this surface will receive data from a video port using
-
 
1957
 * the de-interlacing hardware.  This allows the driver to allocate memory
-
 
1958
 * for any extra buffers that may be required.  The DDSCAPS_VIDEOPORT and
-
 
1959
 * DDSCAPS_OVERLAY flags must also be set.
-
 
1960
 *)
-
 
1961
  DDSCAPS2_HARDWAREDEINTERLACE            = $00000002;
-
 
1962
 
-
 
1963
(*
-
 
1964
 * Indicates to the driver that this surface will be locked very frequently
-
 
1965
 * (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap
-
 
1966
 * set must also have DDSCAPS_TEXTURE. This cap cannot be used with
-
 
1967
 * DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE.
-
 
1968
 *)
-
 
1969
  DDSCAPS2_HINTDYNAMIC                  = $00000004;
-
 
1970
 
-
 
1971
(*
-
 
1972
 * Indicates to the driver that this surface can be re-ordered/retiled on
-
 
1973
 * load. This operation will not change the size of the texture. It is
-
 
1974
 * relatively fast and symmetrical, since the application may lock these
-
 
1975
 * bits (although it will take a performance hit when doing so). Surfaces
-
 
1976
 * with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be
-
 
1977
 * used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE.
-
 
1978
 *)
-
 
1979
  DDSCAPS2_HINTSTATIC                   = $00000008;
-
 
1980
 
-
 
1981
(*
-
 
1982
 * Indicates that the client would like this texture surface to be managed by the
-
 
1983
 * DirectDraw/Direct3D runtime. Surfaces with this cap set must also have
-
 
1984
 * DDSCAPS_TEXTURE and DDSCAPS_SYSTEMMEMORY.
-
 
1985
 *)
-
 
1986
  DDSCAPS2_TEXTUREMANAGE                  = $00000010;
-
 
1987
 
-
 
1988
(*
-
 
1989
 * These bits are reserved for internal use *)
-
 
1990
  DDSCAPS2_RESERVED1                      = $00000020;
-
 
1991
  DDSCAPS2_RESERVED2                      = $00000040;
-
 
1992
 
-
 
1993
(*
-
 
1994
 * Indicates to the driver that this surface will never be locked again.
-
 
1995
 * The driver is free to optimize this surface via retiling and actual compression.
-
 
1996
 * All calls to Lock() or Blts from this surface will fail. Surfaces with this
-
 
1997
 * cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with
-
 
1998
 * DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC.
-
 
1999
 *)
-
 
2000
  DDSCAPS2_OPAQUE                         = $00000080;
-
 
2001
 
-
 
2002
(*
-
 
2003
 * Applications should set this bit at CreateSurface time to indicate that they
-
 
2004
 * intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set.
-
 
2005
 *)
-
 
2006
  DDSCAPS2_HINTANTIALIASING               = $00000100;
-
 
2007
 
-
 
2008
(*
-
 
2009
 * This flag is used at CreateSurface time to indicate that this set of
-
 
2010
 * surfaces is a cubic environment map
-
 
2011
 *)
-
 
2012
  DDSCAPS2_CUBEMAP                        = $00000200;
-
 
2013
 
-
 
2014
(*
-
 
2015
 * These flags preform two functions:
-
 
2016
 * - At CreateSurface time, they define which of the six cube faces are
-
 
2017
 *   required by the application.
-
 
2018
 * - After creation, each face in the cubemap will have exactly one of these
-
 
2019
 *   bits set.
-
 
2020
 *)
-
 
2021
  DDSCAPS2_CUBEMAP_POSITIVEX              = $00000400;
-
 
2022
  DDSCAPS2_CUBEMAP_NEGATIVEX              = $00000800;
-
 
2023
  DDSCAPS2_CUBEMAP_POSITIVEY              = $00001000;
-
 
2024
  DDSCAPS2_CUBEMAP_NEGATIVEY              = $00002000;
-
 
2025
  DDSCAPS2_CUBEMAP_POSITIVEZ              = $00004000;
-
 
2026
  DDSCAPS2_CUBEMAP_NEGATIVEZ              = $00008000;
-
 
2027
 
-
 
2028
(*
-
 
2029
 * This macro may be used to specify all faces of a cube map at CreateSurface time
-
 
2030
 *)
-
 
2031
  DDSCAPS2_CUBEMAP_ALLFACES = ( DDSCAPS2_CUBEMAP_POSITIVEX or
-
 
2032
                                DDSCAPS2_CUBEMAP_NEGATIVEX or
-
 
2033
                                DDSCAPS2_CUBEMAP_POSITIVEY or
-
 
2034
                                DDSCAPS2_CUBEMAP_NEGATIVEY or
-
 
2035
                                DDSCAPS2_CUBEMAP_POSITIVEZ or
-
 
2036
                                DDSCAPS2_CUBEMAP_NEGATIVEZ );
-
 
2037
 
-
 
2038
 
-
 
2039
(*
-
 
2040
 * This flag is an additional flag which is present on mipmap sublevels from DX7 onwards
-
 
2041
 * It enables easier use of GetAttachedSurface rather than EnumAttachedSurfaces for surface
-
 
2042
 * constructs such as Cube Maps, wherein there are more than one mipmap surface attached
-
 
2043
 * to the root surface.
-
 
2044
 * This caps bit is ignored by CreateSurface
-
 
2045
 *)
-
 
2046
  DDSCAPS2_MIPMAPSUBLEVEL                 = $00010000;
-
 
2047
 
-
 
2048
(* This flag indicates that the texture should be managed by D3D only *)
-
 
2049
  DDSCAPS2_D3DTEXTUREMANAGE               = $00020000;
-
 
2050
 
-
 
2051
(* This flag indicates that the managed surface can be safely lost *)
-
 
2052
  DDSCAPS2_DONOTPERSIST                   = $00040000;
-
 
2053
 
-
 
2054
(* indicates that this surface is part of a stereo flipping chain *)
-
 
2055
  DDSCAPS2_STEREOSURFACELEFT              = $00080000;
-
 
2056
 
-
 
2057
 
1505
 
2058
 
-
 
2059
 (****************************************************************************
-
 
2060
 *
-
 
2061
 * DIRECTDRAW DRIVER CAPABILITY FLAGS
-
 
2062
 *
-
 
2063
 ****************************************************************************)
-
 
2064
 
-
 
2065
(*
-
 
2066
 * Display hardware has 3D acceleration.
-
 
2067
 *)
1506
  DDCAPS_3D                   = $00000001;
2068
  DDCAPS_3D                       = $00000001;
-
 
2069
 
-
 
2070
(*
-
 
2071
 * Indicates that DirectDraw will support only dest rectangles that are aligned
-
 
2072
 * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
-
 
2073
 * READ ONLY.
-
 
2074
 *)
1507
  DDCAPS_ALIGNBOUNDARYDEST    = $00000002;
2075
  DDCAPS_ALIGNBOUNDARYDEST        = $00000002;
-
 
2076
 
-
 
2077
(*
-
 
2078
 * Indicates that DirectDraw will support only source rectangles  whose sizes in
-
 
2079
 * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively.  READ ONLY.
-
 
2080
 *)
1508
  DDCAPS_ALIGNSIZEDEST        = $00000004;
2081
  DDCAPS_ALIGNSIZEDEST            = $00000004;
-
 
2082
(*
-
 
2083
 * Indicates that DirectDraw will support only source rectangles that are aligned
-
 
2084
 * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
-
 
2085
 * READ ONLY.
-
 
2086
 *)
1509
  DDCAPS_ALIGNBOUNDARYSRC     = $00000008;
2087
  DDCAPS_ALIGNBOUNDARYSRC         = $00000008;
-
 
2088
 
-
 
2089
(*
-
 
2090
 * Indicates that DirectDraw will support only source rectangles  whose sizes in
-
 
2091
 * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively.  READ ONLY.
-
 
2092
 *)
1510
  DDCAPS_ALIGNSIZESRC         = $00000010;
2093
  DDCAPS_ALIGNSIZESRC             = $00000010;
-
 
2094
 
-
 
2095
(*
-
 
2096
 * Indicates that DirectDraw will create video memory surfaces that have a stride
-
 
2097
 * alignment equal to DIRECTDRAWCAPS.dwAlignStride.  READ ONLY.
-
 
2098
 *)
1511
  DDCAPS_ALIGNSTRIDE          = $00000020;
2099
  DDCAPS_ALIGNSTRIDE              = $00000020;
-
 
2100
 
-
 
2101
(*
-
 
2102
 * Display hardware is capable of blt operations.
-
 
2103
 *)
1512
  DDCAPS_BLT                  = $00000040;
2104
  DDCAPS_BLT                      = $00000040;
-
 
2105
 
-
 
2106
(*
-
 
2107
 * Display hardware is capable of asynchronous blt operations.
-
 
2108
 *)
1513
  DDCAPS_BLTQUEUE             = $00000080;
2109
  DDCAPS_BLTQUEUE                 = $00000080;
-
 
2110
 
-
 
2111
(*
-
 
2112
 * Display hardware is capable of color space conversions during the blt operation.
-
 
2113
 *)
1514
  DDCAPS_BLTFOURCC            = $00000100;
2114
  DDCAPS_BLTFOURCC                = $00000100;
-
 
2115
 
-
 
2116
(*
-
 
2117
 * Display hardware is capable of stretching during blt operations.
-
 
2118
 *)
1515
  DDCAPS_BLTSTRETCH           = $00000200;
2119
  DDCAPS_BLTSTRETCH               = $00000200;
-
 
2120
 
-
 
2121
(*
-
 
2122
 * Display hardware is shared with GDI.
-
 
2123
 *)
1516
  DDCAPS_GDI                  = $00000400;
2124
  DDCAPS_GDI                      = $00000400;
-
 
2125
 
-
 
2126
(*
-
 
2127
 * Display hardware can overlay.
-
 
2128
 *)
1517
  DDCAPS_OVERLAY              = $00000800;
2129
  DDCAPS_OVERLAY                  = $00000800;
-
 
2130
 
-
 
2131
(*
-
 
2132
 * Set if display hardware supports overlays but can not clip them.
-
 
2133
 *)
1518
  DDCAPS_OVERLAYCANTCLIP      = $00001000;
2134
  DDCAPS_OVERLAYCANTCLIP          = $00001000;
-
 
2135
 
-
 
2136
(*
-
 
2137
 * Indicates that overlay hardware is capable of color space conversions during
-
 
2138
 * the overlay operation.
-
 
2139
 *)
1519
  DDCAPS_OVERLAYFOURCC        = $00002000;
2140
  DDCAPS_OVERLAYFOURCC            = $00002000;
-
 
2141
 
-
 
2142
(*
-
 
2143
 * Indicates that stretching can be done by the overlay hardware.
-
 
2144
 *)
1520
  DDCAPS_OVERLAYSTRETCH       = $00004000;
2145
  DDCAPS_OVERLAYSTRETCH           = $00004000;
-
 
2146
 
-
 
2147
(*
-
 
2148
 * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
-
 
2149
 * other than the primary surface.
-
 
2150
 *)
1521
  DDCAPS_PALETTE              = $00008000;
2151
  DDCAPS_PALETTE                  = $00008000;
-
 
2152
 
-
 
2153
(*
-
 
2154
 * Indicates that palette changes can be syncd with the veritcal refresh.
-
 
2155
 *)
1522
  DDCAPS_PALETTEVSYNC         = $00010000;
2156
  DDCAPS_PALETTEVSYNC             = $00010000;
-
 
2157
 
-
 
2158
(*
-
 
2159
 * Display hardware can return the current scan line.
-
 
2160
 *)
1523
  DDCAPS_READSCANLINE         = $00020000;
2161
  DDCAPS_READSCANLINE             = $00020000;
-
 
2162
 
-
 
2163
(*
-
 
2164
 * Display hardware has stereo vision capabilities.  DDSCAPS_PRIMARYSURFACELEFT
-
 
2165
 * can be created.
-
 
2166
 *)
1524
  DDCAPS_STEREOVIEW           = $00040000;
2167
  DDCAPS_STEREOVIEW               = $00040000;
-
 
2168
 
-
 
2169
(*
-
 
2170
 * Display hardware is capable of generating a vertical blank interrupt.
-
 
2171
 *)
1525
  DDCAPS_VBI                  = $00080000;
2172
  DDCAPS_VBI                      = $00080000;
-
 
2173
 
-
 
2174
(*
-
 
2175
 * Supports the use of z buffers with blt operations.
-
 
2176
 *)
1526
  DDCAPS_ZBLTS                = $00100000;
2177
  DDCAPS_ZBLTS                    = $00100000;
-
 
2178
 
-
 
2179
(*
-
 
2180
 * Supports Z Ordering of overlays.
-
 
2181
 *)
1527
  DDCAPS_ZOVERLAYS            = $00200000;
2182
  DDCAPS_ZOVERLAYS                = $00200000;
-
 
2183
 
-
 
2184
(*
-
 
2185
 * Supports color key
-
 
2186
 *)
1528
  DDCAPS_COLORKEY             = $00400000;
2187
  DDCAPS_COLORKEY                 = $00400000;
-
 
2188
 
-
 
2189
(*
-
 
2190
 * Supports alpha surfaces
-
 
2191
 *)
1529
  DDCAPS_ALPHA                = $00800000;
2192
  DDCAPS_ALPHA                    = $00800000;
-
 
2193
 
-
 
2194
(*
-
 
2195
 * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)
-
 
2196
 *)
1530
  DDCAPS_COLORKEYHWASSIST     = $01000000;
2197
  DDCAPS_COLORKEYHWASSIST         = $01000000;
-
 
2198
 
-
 
2199
(*
-
 
2200
 * no hardware support at all
-
 
2201
 *)
1531
  DDCAPS_NOHARDWARE           = $02000000;
2202
  DDCAPS_NOHARDWARE               = $02000000;
-
 
2203
 
-
 
2204
(*
-
 
2205
 * Display hardware is capable of color fill with bltter
-
 
2206
 *)
1532
  DDCAPS_BLTCOLORFILL         = $04000000;
2207
  DDCAPS_BLTCOLORFILL             = $04000000;
-
 
2208
 
-
 
2209
(*
-
 
2210
 * Display hardware is bank switched, and potentially very slow at
-
 
2211
 * random access to VRAM.
-
 
2212
 *)
1533
  DDCAPS_BANKSWITCHED         = $08000000;
2213
  DDCAPS_BANKSWITCHED             = $08000000;
-
 
2214
 
-
 
2215
(*
-
 
2216
 * Display hardware is capable of depth filling Z-buffers with bltter
-
 
2217
 *)
1534
  DDCAPS_BLTDEPTHFILL         = $10000000;
2218
  DDCAPS_BLTDEPTHFILL             = $10000000;
-
 
2219
 
-
 
2220
(*
-
 
2221
 * Display hardware is capable of clipping while bltting.
-
 
2222
 *)
1535
  DDCAPS_CANCLIP              = $20000000;
2223
  DDCAPS_CANCLIP                  = $20000000;
-
 
2224
 
-
 
2225
(*
-
 
2226
 * Display hardware is capable of clipping while stretch bltting.
-
 
2227
 *)
1536
  DDCAPS_CANCLIPSTRETCHED     = $40000000;
2228
  DDCAPS_CANCLIPSTRETCHED         = $40000000;
-
 
2229
 
-
 
2230
(*
-
 
2231
 * Display hardware is capable of bltting to or from system memory
-
 
2232
 *)
1537
  DDCAPS_CANBLTSYSMEM         = $80000000;
2233
  DDCAPS_CANBLTSYSMEM             = $80000000;
1538
 
2234
 
1539
{ More DirectDraw Driver Capability Flags (dwCaps2) }
-
 
1540
 
2235
 
-
 
2236
 (****************************************************************************
-
 
2237
 *
-
 
2238
 * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
-
 
2239
 *
-
 
2240
 ****************************************************************************)
-
 
2241
 
-
 
2242
(*
-
 
2243
 * Display hardware is certified
-
 
2244
 *)
1541
  DDCAPS2_CERTIFIED            = $00000001;
2245
  DDCAPS2_CERTIFIED               = $00000001;
-
 
2246
 
-
 
2247
(*
-
 
2248
 * Driver cannot interleave 2D operations (lock and blt) to surfaces with
-
 
2249
 * Direct3D rendering operations between calls to BeginScene() and EndScene()
-
 
2250
 *)
1542
  DDCAPS2_NO2DDURING3DSCENE    = $00000002;
2251
  DDCAPS2_NO2DDURING3DSCENE       = $00000002;
-
 
2252
 
-
 
2253
(*
-
 
2254
 * Display hardware contains a video port
-
 
2255
 *)
1543
  DDCAPS2_VIDEOPORT            = $00000004;
2256
  DDCAPS2_VIDEOPORT               = $00000004;
-
 
2257
 
-
 
2258
(*
-
 
2259
 * The overlay can be automatically flipped according to the video port
-
 
2260
 * VSYNCs, providing automatic doubled buffered display of video port
-
 
2261
 * data using an overlay
-
 
2262
 *)
1544
  DDCAPS2_AUTOFLIPOVERLAY      = $00000008;
2263
  DDCAPS2_AUTOFLIPOVERLAY         = $00000008;
-
 
2264
 
-
 
2265
(*
-
 
2266
 * Overlay can display each field of interlaced data individually while
-
 
2267
 * it is interleaved in memory without causing jittery artifacts.
-
 
2268
 *)
1545
  DDCAPS2_CANBOBINTERLEAVED    = $00000010;
2269
  DDCAPS2_CANBOBINTERLEAVED     = $00000010;
-
 
2270
 
-
 
2271
(*
-
 
2272
 * Overlay can display each field of interlaced data individually while
-
 
2273
 * it is not interleaved in memory without causing jittery artifacts.
-
 
2274
 *)
1546
  DDCAPS2_CANBOBNONINTERLEAVED = $00000020;
2275
  DDCAPS2_CANBOBNONINTERLEAVED  = $00000020;
-
 
2276
 
-
 
2277
(*
-
 
2278
 * The overlay surface contains color controls (brightness, sharpness, etc.)
-
 
2279
 *)
1547
  DDCAPS2_COLORCONTROLOVERLAY  = $00000040;
2280
  DDCAPS2_COLORCONTROLOVERLAY   = $00000040;
-
 
2281
 
-
 
2282
(*
-
 
2283
 * The primary surface contains color controls (gamma, etc.)
-
 
2284
 *)
1548
  DDCAPS2_COLORCONTROLPRIMARY  = $00000080;
2285
  DDCAPS2_COLORCONTROLPRIMARY   = $00000080;
-
 
2286
 
-
 
2287
(*
-
 
2288
 * RGBZ -> RGB supported for 16:16 RGB:Z
-
 
2289
 *)
1549
  DDCAPS2_CANDROPZ16BIT        = $00000100;
2290
  DDCAPS2_CANDROPZ16BIT         = $00000100;
-
 
2291
 
-
 
2292
(*
-
 
2293
 * Driver supports non-local video memory.
-
 
2294
 *)
1550
  DDCAPS2_NONLOCALVIDMEM       = $00000200;
2295
  DDCAPS2_NONLOCALVIDMEM          = $00000200;
-
 
2296
 
-
 
2297
(*
-
 
2298
 * Dirver supports non-local video memory but has different capabilities for
-
 
2299
 * non-local video memory surfaces. If this bit is set then so must
-
 
2300
 * DDCAPS2_NONLOCALVIDMEM.
-
 
2301
 *)
1551
  DDCAPS2_NONLOCALVIDMEMCAPS   = $00000400;
2302
  DDCAPS2_NONLOCALVIDMEMCAPS      = $00000400;
-
 
2303
 
-
 
2304
(*
-
 
2305
 * Driver neither requires nor prefers surfaces to be pagelocked when performing
-
 
2306
 * blts involving system memory surfaces
-
 
2307
 *)
1552
  DDCAPS2_NOPAGELOCKREQUIRED   = $00000800;
2308
  DDCAPS2_NOPAGELOCKREQUIRED      = $00000800;
-
 
2309
 
-
 
2310
(*
-
 
2311
 * Driver can create surfaces which are wider than the primary surface
-
 
2312
 *)
1553
  DDCAPS2_WIDESURFACES         = $00001000;
2313
  DDCAPS2_WIDESURFACES            = $00001000;
-
 
2314
 
-
 
2315
(*
-
 
2316
 * Driver supports bob without using a video port by handling the
-
 
2317
 * DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip.
-
 
2318
 *)
1554
  DDCAPS2_CANFLIPODDEVEN       = $00002000;
2319
  DDCAPS2_CANFLIPODDEVEN          = $00002000;
-
 
2320
 
-
 
2321
(*
-
 
2322
 * Driver supports bob using hardware
-
 
2323
 *)
1555
  DDCAPS2_CANBOBHARDWARE       = $00004000;
2324
  DDCAPS2_CANBOBHARDWARE          = $00004000;
-
 
2325
 
-
 
2326
(*
-
 
2327
 * Driver supports bltting any FOURCC surface to another surface of the same FOURCC
-
 
2328
 *)
1556
  DDCAPS2_COPYFOURCC           = $00008000;
2329
  DDCAPS2_COPYFOURCC              = $00008000;
1557
  DDCAPS2_PRIMARYGAMMA         = $00020000;
-
 
1558
  DDCAPS2_CANRENDERWINDOWED    = $00080000;
-
 
1559
  DDCAPS2_CANCALIBRATEGAMMA    = $00100000;
-
 
1560
  DDCAPS2_FLIPINTERVAL         = $00200000;
-
 
1561
  DDCAPS2_FLIPNOVSYNC          = $00400000;
-
 
1562
  DDCAPS2_CANMANAGETEXTURE     = $00800000;
-
 
1563
  DDCAPS2_TEXMANINNONLOCALVIDMEM = $01000000;
-
 
1564
  DDCAPS2_STEREO                 = $02000000;
-
 
1565
  DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL = $04000000;
-
 
1566
 
2330
 
1567
{ DirectDrawSurface Capability Flags }
-
 
1568
 
2331
 
-
 
2332
(*
1569
  DDSCAPS_RESERVED1           = $00000001; { DDSCAPS_3D }
2333
 * Driver supports loadable gamma ramps for the primary surface
1570
  DDSCAPS_ALPHA               = $00000002;
-
 
1571
  DDSCAPS_BACKBUFFER          = $00000004;
-
 
1572
  DDSCAPS_COMPLEX             = $00000008;
-
 
1573
  DDSCAPS_FLIP                = $00000010;
-
 
1574
  DDSCAPS_FRONTBUFFER         = $00000020;
-
 
1575
  DDSCAPS_OFFSCREENPLAIN      = $00000040;
-
 
1576
  DDSCAPS_OVERLAY             = $00000080;
-
 
1577
  DDSCAPS_PALETTE             = $00000100;
-
 
1578
  DDSCAPS_PRIMARYSURFACE      = $00000200;
-
 
1579
  DDSCAPS_RESERVED3           = $00000400; { DDSCAPS_PRIMARYSURFACELEFT }
-
 
1580
  DDSCAPS_SYSTEMMEMORY        = $00000800;
-
 
1581
  DDSCAPS_TEXTURE             = $00001000;
-
 
1582
  DDSCAPS_3DDEVICE            = $00002000;
-
 
1583
  DDSCAPS_VIDEOMEMORY         = $00004000;
-
 
1584
  DDSCAPS_VISIBLE             = $00008000;
-
 
1585
  DDSCAPS_WRITEONLY           = $00010000;
-
 
-
 
2334
 *)
1586
  DDSCAPS_ZBUFFER             = $00020000;
2335
  DDCAPS2_PRIMARYGAMMA            = $00020000;
1587
  DDSCAPS_OWNDC               = $00040000;
-
 
1588
  DDSCAPS_LIVEVIDEO           = $00080000;
-
 
1589
  DDSCAPS_HWCODEC             = $00100000;
-
 
1590
  DDSCAPS_MODEX               = $00200000;
-
 
1591
  DDSCAPS_MIPMAP              = $00400000;
-
 
1592
  DDSCAPS_RESERVED2           = $00800000;
-
 
1593
  DDSCAPS_ALLOCONLOAD         = $04000000;
-
 
1594
  DDSCAPS_VIDEOPORT           = $08000000;
-
 
1595
  DDSCAPS_LOCALVIDMEM         = $10000000;
-
 
1596
  DDSCAPS_NONLOCALVIDMEM      = $20000000;
-
 
1597
  DDSCAPS_STANDARDVGAMODE     = $40000000;
-
 
1598
  DDSCAPS_OPTIMIZED           = $80000000;
-
 
1599
 
2336
 
-
 
2337
(*
1600
{ DirectDrawSurface Capability Flags 2 }
2338
 * Driver can render in windowed mode.
-
 
2339
 *)
-
 
2340
  DDCAPS2_CANRENDERWINDOWED       = $00080000;
1601
 
2341
 
1602
  DDSCAPS2_HARDWAREDEINTERLACE = $00000002;
-
 
1603
  DDSCAPS2_HINTDYNAMIC         = $00000004;
-
 
1604
  DDSCAPS2_HINTSTATIC          = $00000008;
-
 
-
 
2342
(*
1605
  DDSCAPS2_TEXTUREMANAGE       = $00000010;
2343
 * A calibrator is available to adjust the gamma ramp according to the
1606
  DDSCAPS2_RESERVED1           = $00000020;
2344
 * physical display properties so that the result will be identical on
1607
  DDSCAPS2_RESERVED2           = $00000040;
-
 
1608
  DDSCAPS2_OPAQUE              = $00000080;
2345
 * all calibrated systems.
1609
  DDSCAPS2_HINTANTIALIASING    = $00000100;
-
 
-
 
2346
 *)
1610
  DDSCAPS2_CUBEMAP             = $00000200;
2347
  DDCAPS2_CANCALIBRATEGAMMA       = $00100000;
1611
  DDSCAPS2_CUBEMAP_POSITIVEX   = $00000400;
-
 
1612
  DDSCAPS2_CUBEMAP_NEGATIVEX   = $00000800;
-
 
1613
  DDSCAPS2_CUBEMAP_POSITIVEY   = $00001000;
-
 
1614
  DDSCAPS2_CUBEMAP_NEGATIVEY   = $00002000;
-
 
1615
  DDSCAPS2_CUBEMAP_POSITIVEZ   = $00004000;
-
 
1616
  DDSCAPS2_CUBEMAP_NEGATIVEZ   = $00008000;
-
 
1617
 
2348
 
1618
  DDSCAPS2_CUBEMAP_ALLFACES    =
-
 
1619
    DDSCAPS2_CUBEMAP_POSITIVEX or DDSCAPS2_CUBEMAP_NEGATIVEX or
-
 
-
 
2349
(*
1620
    DDSCAPS2_CUBEMAP_POSITIVEY or DDSCAPS2_CUBEMAP_NEGATIVEY or
2350
 * Indicates that the driver will respond to DDFLIP_INTERVALn flags
-
 
2351
 *)
1621
    DDSCAPS2_CUBEMAP_POSITIVEZ or DDSCAPS2_CUBEMAP_NEGATIVEZ;
2352
  DDCAPS2_FLIPINTERVAL            = $00200000;
1622
 
2353
 
1623
  DDSCAPS2_MIPMAPSUBLEVEL      = $00010000;
-
 
-
 
2354
(*
1624
  DDSCAPS2_D3DTEXTUREMANAGE    = $00020000;
2355
 * Indicates that the driver will respond to DDFLIP_NOVSYNC
-
 
2356
 *)
1625
  DDSCAPS2_DONOTPERSIST        = $00040000;
2357
   DDCAPS2_FLIPNOVSYNC             = $00400000;
1626
  DDSCAPS2_STEREOSURFACELEFT   = $00080000;
-
 
1627
 
2358
 
-
 
2359
(*
-
 
2360
 * Driver supports management of video memory, if this flag is ON,
-
 
2361
 * driver manages the texture if requested with DDSCAPS2_TEXTUREMANAGE on
-
 
2362
 * DirectX manages the texture if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on
-
 
2363
 *)
1628
{ TDDOptSurfaceDesc flags }
2364
  DDCAPS2_CANMANAGETEXTURE        = $00800000;
1629
 
2365
 
-
 
2366
(*
1630
  DDOSD_GUID              = $00000001;
2367
 * The Direct3D texture manager uses this cap to decide whether to put managed
1631
  DDOSD_COMPRESSION_RATIO = $00000002;
2368
 * surfaces in non-local video memory. If the cap is set, the texture manager will
1632
  DDOSD_SCAPS             = $00000004;
2369
 * put managed surfaces in non-local vidmem. Drivers that cannot texture from
1633
  DDOSD_OSCAPS            = $00000008;
2370
 * local vidmem SHOULD NOT set this cap.
-
 
2371
 *)
1634
  DDOSD_ALL               = $0000000F;
2372
  DDCAPS2_TEXMANINNONLOCALVIDMEM  = $01000000;
1635
 
2373
 
-
 
2374
(*
-
 
2375
 * Indicates that the driver supports DX7 type of stereo in at least one mode (which may
-
 
2376
 * not necessarily be the current mode). Applications should use IDirectDraw7 (or higher)
-
 
2377
 * ::EnumDisplayModes and check the DDSURFACEDESC.ddsCaps.dwCaps2 field for the presence of
-
 
2378
 * DDSCAPS2_STEREOSURFACELEFT to check if a particular mode supports stereo. The application
-
 
2379
 * can also use IDirectDraw7(or higher)::GetDisplayMode to check the current mode.
-
 
2380
 *)
1636
{ ddOSCaps field is valid. }
2381
  DDCAPS2_STEREO                  = $02000000;
1637
 
2382
 
-
 
2383
(*
1638
  DDOSDCAPS_OPTCOMPRESSED    = $00000001;
2384
 * This caps bit is intended for internal DirectDraw use.
1639
  DDOSDCAPS_OPTREORDERED     = $00000002;
2385
 * -It is only valid if DDCAPS2_NONLOCALVIDMEMCAPS is set.
-
 
2386
 * -If this bit is set, then DDCAPS_CANBLTSYSMEM MUST be set by the driver (and
-
 
2387
 *  all the assoicated system memory blt caps must be correct).
-
 
2388
 * -It implies that the system->video blt caps in DDCAPS also apply to system to
-
 
2389
 *  nonlocal blts. I.e. the dwSVBCaps, dwSVBCKeyCaps, dwSVBFXCaps and dwSVBRops
1640
  DDOSDCAPS_MONOLITHICMIPMAP = $00000004;
2390
 *  members of DDCAPS (DDCORECAPS) are filled in correctly.
-
 
2391
 * -Any blt from system to nonlocal memory that matches these caps bits will
-
 
2392
 *  be passed to the driver.
-
 
2393
 *
-
 
2394
 * NOTE: This is intended to enable the driver itself to do efficient reordering
-
 
2395
 * of textures. This is NOT meant to imply that hardware can write into AGP memory.
1641
  DDOSDCAPS_VALIDSCAPS       = $30004800;
2396
 * This operation is not currently supported.
-
 
2397
 *)
1642
  DDOSDCAPS_VALIDOSCAPS      = $00000007;
2398
  DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL   = $04000000;
1643
 
2399
 
-
 
2400
(****************************************************************************
-
 
2401
 *
1644
{ DirectDraw FX Alpha Capability Flags }
2402
 * DIRECTDRAW FX ALPHA CAPABILITY FLAGS
-
 
2403
 *
-
 
2404
 ****************************************************************************)
1645
 
2405
 
-
 
2406
(*
-
 
2407
 * Supports alpha blending around the edge of a source color keyed surface.
-
 
2408
 * For Blt.
-
 
2409
 *)
1646
  DDFXALPHACAPS_BLTALPHAEDGEBLEND         = $00000001;
2410
  DDFXALPHACAPS_BLTALPHAEDGEBLEND         = $00000001;
-
 
2411
 
-
 
2412
(*
-
 
2413
 * Supports alpha information in the pixel format.  The bit depth of alpha
-
 
2414
 * information in the pixel format can be 1,2,4, or 8.  The alpha value becomes
-
 
2415
 * more opaque as the alpha value increases.  (0 is transparent.)
-
 
2416
 * For Blt.
-
 
2417
 *)
1647
  DDFXALPHACAPS_BLTALPHAPIXELS            = $00000002;
2418
  DDFXALPHACAPS_BLTALPHAPIXELS            = $00000002;
-
 
2419
 
-
 
2420
(*
-
 
2421
 * Supports alpha information in the pixel format.  The bit depth of alpha
-
 
2422
 * information in the pixel format can be 1,2,4, or 8.  The alpha value
-
 
2423
 * becomes more transparent as the alpha value increases.  (0 is opaque.)
-
 
2424
 * This flag can only be set if DDCAPS_ALPHA is set.
-
 
2425
 * For Blt.
-
 
2426
 *)
1648
  DDFXALPHACAPS_BLTALPHAPIXELSNEG         = $00000004;
2427
  DDFXALPHACAPS_BLTALPHAPIXELSNEG         = $00000004;
-
 
2428
 
-
 
2429
(*
-
 
2430
 * Supports alpha only surfaces.  The bit depth of an alpha only surface can be
-
 
2431
 * 1,2,4, or 8.  The alpha value becomes more opaque as the alpha value increases.
-
 
2432
 * (0 is transparent.)
-
 
2433
 * For Blt.
-
 
2434
 *)
1649
  DDFXALPHACAPS_BLTALPHASURFACES          = $00000008;
2435
  DDFXALPHACAPS_BLTALPHASURFACES          = $00000008;
-
 
2436
 
-
 
2437
(*
-
 
2438
 * The depth of the alpha channel data can range can be 1,2,4, or 8.
-
 
2439
 * The NEG suffix indicates that this alpha channel becomes more transparent
-
 
2440
 * as the alpha value increases. (0 is opaque.)  This flag can only be set if
-
 
2441
 * DDCAPS_ALPHA is set.
-
 
2442
 * For Blt.
-
 
2443
 *)
1650
  DDFXALPHACAPS_BLTALPHASURFACESNEG       = $00000010;
2444
  DDFXALPHACAPS_BLTALPHASURFACESNEG       = $00000010;
-
 
2445
 
-
 
2446
(*
-
 
2447
 * Supports alpha blending around the edge of a source color keyed surface.
-
 
2448
 * For Overlays.
-
 
2449
 *)
1651
  DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND     = $00000020;
2450
  DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND     = $00000020;
-
 
2451
 
-
 
2452
(*
-
 
2453
 * Supports alpha information in the pixel format.  The bit depth of alpha
-
 
2454
 * information in the pixel format can be 1,2,4, or 8.  The alpha value becomes
-
 
2455
 * more opaque as the alpha value increases.  (0 is transparent.)
-
 
2456
 * For Overlays.
-
 
2457
 *)
1652
  DDFXALPHACAPS_OVERLAYALPHAPIXELS        = $00000040;
2458
  DDFXALPHACAPS_OVERLAYALPHAPIXELS        = $00000040;
-
 
2459
 
-
 
2460
(*
-
 
2461
 * Supports alpha information in the pixel format.  The bit depth of alpha
-
 
2462
 * information in the pixel format can be 1,2,4, or 8.  The alpha value
-
 
2463
 * becomes more transparent as the alpha value increases.  (0 is opaque.)
-
 
2464
 * This flag can only be set if DDCAPS_ALPHA is set.
-
 
2465
 * For Overlays.
-
 
2466
 *)
1653
  DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG     = $00000080;
2467
  DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG     = $00000080;
-
 
2468
 
-
 
2469
(*
-
 
2470
 * Supports alpha only surfaces.  The bit depth of an alpha only surface can be
-
 
2471
 * 1,2,4, or 8.  The alpha value becomes more opaque as the alpha value increases.
-
 
2472
 * (0 is transparent.)
-
 
2473
 * For Overlays.
-
 
2474
 *)
1654
  DDFXALPHACAPS_OVERLAYALPHASURFACES      = $00000100;
2475
  DDFXALPHACAPS_OVERLAYALPHASURFACES      = $00000100;
-
 
2476
 
-
 
2477
(*
-
 
2478
 * The depth of the alpha channel data can range can be 1,2,4, or 8.  
-
 
2479
 * The NEG suffix indicates that this alpha channel becomes more transparent
-
 
2480
 * as the alpha value increases. (0 is opaque.)  This flag can only be set if
-
 
2481
 * DDCAPS_ALPHA is set.
-
 
2482
 * For Overlays.
-
 
2483
 *)
1655
  DDFXALPHACAPS_OVERLAYALPHASURFACESNEG   = $00000200;
2484
  DDFXALPHACAPS_OVERLAYALPHASURFACESNEG   = $00000200;
1656
 
2485
 
-
 
2486
(****************************************************************************
-
 
2487
 *
1657
{ DirectDraw FX Capability Flags }
2488
 * DIRECTDRAW FX CAPABILITY FLAGS
-
 
2489
 *
-
 
2490
 ****************************************************************************)
1658
 
2491
 
-
 
2492
(*
-
 
2493
 * Uses arithmetic operations to stretch and shrink surfaces during blt
-
 
2494
 * rather than pixel doubling techniques.  Along the Y axis.
-
 
2495
 *)
1659
  DDFXCAPS_BLTARITHSTRETCHY       = $00000020;
2496
  DDFXCAPS_BLTARITHSTRETCHY       = $00000020;
-
 
2497
 
-
 
2498
(*
-
 
2499
 * Uses arithmetic operations to stretch during blt
-
 
2500
 * rather than pixel doubling techniques.  Along the Y axis. Only
-
 
2501
 * works for x1, x2, etc.
-
 
2502
 *)
1660
  DDFXCAPS_BLTARITHSTRETCHYN      = $00000010;
2503
  DDFXCAPS_BLTARITHSTRETCHYN      = $00000010;
-
 
2504
 
-
 
2505
(*
-
 
2506
 * Supports mirroring left to right in blt.
-
 
2507
 *)
1661
  DDFXCAPS_BLTMIRRORLEFTRIGHT     = $00000040;
2508
  DDFXCAPS_BLTMIRRORLEFTRIGHT     = $00000040;
-
 
2509
 
-
 
2510
(*
-
 
2511
 * Supports mirroring top to bottom in blt.
-
 
2512
 *)
1662
  DDFXCAPS_BLTMIRRORUPDOWN        = $00000080;
2513
  DDFXCAPS_BLTMIRRORUPDOWN        = $00000080;
-
 
2514
 
-
 
2515
(*
-
 
2516
 * Supports arbitrary rotation for blts.
-
 
2517
 *)
1663
  DDFXCAPS_BLTROTATION            = $00000100;
2518
  DDFXCAPS_BLTROTATION            = $00000100;
-
 
2519
 
-
 
2520
(*
-
 
2521
 * Supports 90 degree rotations for blts.
-
 
2522
 *)
1664
  DDFXCAPS_BLTROTATION90          = $00000200;
2523
   DDFXCAPS_BLTROTATION90          = $00000200;
-
 
2524
 
-
 
2525
(*
-
 
2526
 * DirectDraw supports arbitrary shrinking of a surface along the
-
 
2527
 * x axis (horizontal direction) for blts.
-
 
2528
 *)
1665
  DDFXCAPS_BLTSHRINKX             = $00000400;
2529
  DDFXCAPS_BLTSHRINKX             = $00000400;
-
 
2530
 
-
 
2531
(*
-
 
2532
 * DirectDraw supports integer shrinking (1x,2x,) of a surface
-
 
2533
 * along the x axis (horizontal direction) for blts.
-
 
2534
 *)
1666
  DDFXCAPS_BLTSHRINKXN            = $00000800;
2535
  DDFXCAPS_BLTSHRINKXN            = $00000800;
-
 
2536
 
-
 
2537
(*
-
 
2538
 * DirectDraw supports arbitrary shrinking of a surface along the
-
 
2539
 * y axis (horizontal direction) for blts.  
-
 
2540
 *)
1667
  DDFXCAPS_BLTSHRINKY             = $00001000;
2541
  DDFXCAPS_BLTSHRINKY             = $00001000;
-
 
2542
 
-
 
2543
(*
-
 
2544
 * DirectDraw supports integer shrinking (1x,2x,) of a surface
-
 
2545
 * along the y axis (vertical direction) for blts.
-
 
2546
 *)
1668
  DDFXCAPS_BLTSHRINKYN            = $00002000;
2547
  DDFXCAPS_BLTSHRINKYN            = $00002000;
-
 
2548
 
-
 
2549
(*
-
 
2550
 * DirectDraw supports arbitrary stretching of a surface along the
-
 
2551
 * x axis (horizontal direction) for blts.
-
 
2552
 *)
1669
  DDFXCAPS_BLTSTRETCHX            = $00004000;
2553
  DDFXCAPS_BLTSTRETCHX            = $00004000;
-
 
2554
 
-
 
2555
(*
-
 
2556
 * DirectDraw supports integer stretching (1x,2x,) of a surface
-
 
2557
 * along the x axis (horizontal direction) for blts.
-
 
2558
 *)
1670
  DDFXCAPS_BLTSTRETCHXN           = $00008000;
2559
  DDFXCAPS_BLTSTRETCHXN           = $00008000;
-
 
2560
 
-
 
2561
(*
-
 
2562
 * DirectDraw supports arbitrary stretching of a surface along the
-
 
2563
 * y axis (horizontal direction) for blts.  
-
 
2564
 *)
1671
  DDFXCAPS_BLTSTRETCHY            = $00010000;
2565
  DDFXCAPS_BLTSTRETCHY            = $00010000;
-
 
2566
 
-
 
2567
(*
-
 
2568
 * DirectDraw supports integer stretching (1x,2x,) of a surface
-
 
2569
 * along the y axis (vertical direction) for blts.  
-
 
2570
 *)
1672
  DDFXCAPS_BLTSTRETCHYN           = $00020000;
2571
  DDFXCAPS_BLTSTRETCHYN           = $00020000;
-
 
2572
 
-
 
2573
(*
-
 
2574
 * Uses arithmetic operations to stretch and shrink surfaces during
-
 
2575
 * overlay rather than pixel doubling techniques.  Along the Y axis
-
 
2576
 * for overlays.
-
 
2577
 *)
1673
  DDFXCAPS_OVERLAYARITHSTRETCHY   = $00040000;
2578
  DDFXCAPS_OVERLAYARITHSTRETCHY   = $00040000;
-
 
2579
 
-
 
2580
(*
-
 
2581
 * Uses arithmetic operations to stretch surfaces during
-
 
2582
 * overlay rather than pixel doubling techniques.  Along the Y axis
-
 
2583
 * for overlays. Only works for x1, x2, etc.
-
 
2584
 *)
1674
  DDFXCAPS_OVERLAYARITHSTRETCHYN  = $00000008;
2585
  DDFXCAPS_OVERLAYARITHSTRETCHYN  = $00000008;
-
 
2586
 
-
 
2587
(*
-
 
2588
 * DirectDraw supports arbitrary shrinking of a surface along the
-
 
2589
 * x axis (horizontal direction) for overlays.
-
 
2590
 *)
1675
  DDFXCAPS_OVERLAYSHRINKX         = $00080000;
2591
  DDFXCAPS_OVERLAYSHRINKX         = $00080000;
-
 
2592
 
-
 
2593
(*
-
 
2594
 * DirectDraw supports integer shrinking (1x,2x,) of a surface
-
 
2595
 * along the x axis (horizontal direction) for overlays.
-
 
2596
 *)
1676
  DDFXCAPS_OVERLAYSHRINKXN        = $00100000;
2597
  DDFXCAPS_OVERLAYSHRINKXN        = $00100000;
-
 
2598
 
-
 
2599
(*
-
 
2600
 * DirectDraw supports arbitrary shrinking of a surface along the
-
 
2601
 * y axis (horizontal direction) for overlays.
-
 
2602
 *)
1677
  DDFXCAPS_OVERLAYSHRINKY         = $00200000;
2603
  DDFXCAPS_OVERLAYSHRINKY         = $00200000;
-
 
2604
 
-
 
2605
(*
-
 
2606
 * DirectDraw supports integer shrinking (1x,2x,) of a surface
-
 
2607
 * along the y axis (vertical direction) for overlays.  
-
 
2608
 *)
1678
  DDFXCAPS_OVERLAYSHRINKYN        = $00400000;
2609
  DDFXCAPS_OVERLAYSHRINKYN        = $00400000;
-
 
2610
 
-
 
2611
(*
-
 
2612
 * DirectDraw supports arbitrary stretching of a surface along the
-
 
2613
 * x axis (horizontal direction) for overlays.
-
 
2614
 *)
1679
  DDFXCAPS_OVERLAYSTRETCHX        = $00800000;
2615
  DDFXCAPS_OVERLAYSTRETCHX        = $00800000;
-
 
2616
 
-
 
2617
(*
-
 
2618
 * DirectDraw supports integer stretching (1x,2x,) of a surface
-
 
2619
 * along the x axis (horizontal direction) for overlays.
-
 
2620
 *)
1680
  DDFXCAPS_OVERLAYSTRETCHXN       = $01000000;
2621
  DDFXCAPS_OVERLAYSTRETCHXN       = $01000000;
-
 
2622
 
-
 
2623
(*
-
 
2624
 * DirectDraw supports arbitrary stretching of a surface along the
-
 
2625
 * y axis (horizontal direction) for overlays.  
-
 
2626
 *)
1681
  DDFXCAPS_OVERLAYSTRETCHY        = $02000000;
2627
  DDFXCAPS_OVERLAYSTRETCHY        = $02000000;
-
 
2628
 
-
 
2629
(*
-
 
2630
 * DirectDraw supports integer stretching (1x,2x,) of a surface
-
 
2631
 * along the y axis (vertical direction) for overlays.  
-
 
2632
 *)
1682
  DDFXCAPS_OVERLAYSTRETCHYN       = $04000000;
2633
  DDFXCAPS_OVERLAYSTRETCHYN       = $04000000;
-
 
2634
 
-
 
2635
(*
-
 
2636
 * DirectDraw supports mirroring of overlays across the vertical axis
-
 
2637
 *)
1683
  DDFXCAPS_OVERLAYMIRRORLEFTRIGHT = $08000000;
2638
  DDFXCAPS_OVERLAYMIRRORLEFTRIGHT = $08000000;
-
 
2639
 
-
 
2640
(*
-
 
2641
 * DirectDraw supports mirroring of overlays across the horizontal axis
-
 
2642
 *)
1684
  DDFXCAPS_OVERLAYMIRRORUPDOWN    = $10000000;
2643
  DDFXCAPS_OVERLAYMIRRORUPDOWN    = $10000000;
-
 
2644
 
-
 
2645
(*
-
 
2646
 * Driver can do alpha blending for blits.
-
 
2647
 *)
1685
  DDFXCAPS_BLTALPHA               = $00000001;
2648
  DDFXCAPS_BLTALPHA             = $00000001;
-
 
2649
 
-
 
2650
(*
-
 
2651
 * Driver can do geometric transformations (or warps) for blits.
-
 
2652
 *)
1686
  DDFXCAPS_BLTTRANSFORM           = $00000002;
2653
  DDFXCAPS_BLTTRANSFORM         = $00000002;
-
 
2654
 
-
 
2655
(*
-
 
2656
 * Driver can do surface-reconstruction filtering for warped blits.
-
 
2657
 *)
1687
  DDFXCAPS_BLTFILTER              = DDFXCAPS_BLTARITHSTRETCHY;
2658
  DDFXCAPS_BLTFILTER           = DDFXCAPS_BLTARITHSTRETCHY;
-
 
2659
 
-
 
2660
(*
-
 
2661
 * Driver can do alpha blending for overlays.
-
 
2662
 *)
1688
  DDFXCAPS_OVERLAYALPHA           = $00000004;
2663
  DDFXCAPS_OVERLAYALPHA                 = $00000004;
-
 
2664
 
-
 
2665
(*
-
 
2666
 * Driver can do geometric transformations (or warps) for overlays.
-
 
2667
 *)
1689
  DDFXCAPS_OVERLAYTRANSFORM       = $20000000;
2668
  DDFXCAPS_OVERLAYTRANSFORM     = $20000000;
-
 
2669
 
-
 
2670
(*
-
 
2671
 * Driver can do surface-reconstruction filtering for warped overlays.
-
 
2672
 *)
1690
  DDFXCAPS_OVERLAYFILTER          = DDFXCAPS_OVERLAYARITHSTRETCHY;
2673
  DDFXCAPS_OVERLAYFILTER              = DDFXCAPS_OVERLAYARITHSTRETCHY;
1691
 
2674
 
-
 
2675
(****************************************************************************
-
 
2676
 *
1692
{ DirectDraw Stereo View Capabilities }
2677
 * DIRECTDRAW STEREO VIEW CAPABILITIES
-
 
2678
 *
-
 
2679
 ****************************************************************************)
1693
 
2680
 
-
 
2681
(*
-
 
2682
 * This flag used to be DDSVCAPS_ENIGMA, which is now obsolete
-
 
2683
 * The stereo view is accomplished via enigma encoding.
-
 
2684
 *)
1694
  DDSVCAPS_RESERVED1              = $00000001;
2685
  DDSVCAPS_RESERVED1                 = $00000001;
-
 
2686
  DDSVCAPS_ENIGMA                 = DDSVCAPS_RESERVED1;
-
 
2687
 
-
 
2688
(*
-
 
2689
 * This flag used to be DDSVCAPS_FLICKER, which is now obsolete
-
 
2690
 * The stereo view is accomplished via high frequency flickering.
-
 
2691
 *)
1695
  DDSVCAPS_RESERVED2              = $00000002;
2692
  DDSVCAPS_RESERVED2                = $00000002;
-
 
2693
  DDSVCAPS_FLICKER                = DDSVCAPS_RESERVED2;
-
 
2694
 
-
 
2695
(*
-
 
2696
 * This flag used to be DDSVCAPS_REDBLUE, which is now obsolete
-
 
2697
 * The stereo view is accomplished via red and blue filters applied
-
 
2698
 * to the left and right eyes.  All images must adapt their colorspaces
-
 
2699
 * for this process.
-
 
2700
 *)
1696
  DDSVCAPS_RESERVED3              = $00000004;
2701
  DDSVCAPS_RESERVED3                = $00000004;
-
 
2702
  DDSVCAPS_REDBLUE                = DDSVCAPS_RESERVED3;
-
 
2703
 
-
 
2704
(*
-
 
2705
 * This flag used to be DDSVCAPS_SPLIT, which is now obsolete
-
 
2706
 * The stereo view is accomplished with split screen technology.
-
 
2707
 *)
1697
  DDSVCAPS_RESERVED4              = $00000008;
2708
  DDSVCAPS_RESERVED4                  = $00000008;
-
 
2709
  DDSVCAPS_SPLIT                  = DDSVCAPS_RESERVED4;
-
 
2710
 
-
 
2711
(*
-
 
2712
 * The stereo view is accomplished with switching technology
-
 
2713
 *)
1698
  DDSVCAPS_STEREOSEQUENTIAL       = $00000010;
2714
  DDSVCAPS_STEREOSEQUENTIAL       = $00000010;
1699
 
2715
 
-
 
2716
(****************************************************************************
-
 
2717
 *
1700
{ DirectDrawPalette Capabilities }
2718
 * DIRECTDRAWPALETTE CAPABILITIES
-
 
2719
 *
-
 
2720
 ****************************************************************************)
1701
 
2721
 
-
 
2722
(*
-
 
2723
 * Index is 4 bits.  There are sixteen color entries in the palette table.
-
 
2724
 *)
1702
  DDPCAPS_4BIT               = $00000001;
2725
  DDPCAPS_4BIT                    = $00000001;
-
 
2726
 
-
 
2727
(*
-
 
2728
 * Index is onto a 8 bit color index.  This field is only valid with the
-
 
2729
 * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target
-
 
2730
 * surface is in 8bpp. Each color entry is one byte long and is an index
-
 
2731
 * into destination surface's 8bpp palette.
-
 
2732
 *)
1703
  DDPCAPS_8BITENTRIES        = $00000002;
2733
  DDPCAPS_8BITENTRIES             = $00000002;
-
 
2734
 
-
 
2735
(*
-
 
2736
 * Index is 8 bits.  There are 256 color entries in the palette table.
-
 
2737
 *)
1704
  DDPCAPS_8BIT               = $00000004;
2738
  DDPCAPS_8BIT                    = $00000004;
-
 
2739
 
-
 
2740
(*
-
 
2741
 * Indicates that this DIRECTDRAWPALETTE should use the palette color array
-
 
2742
 * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
-
 
2743
 * object.
-
 
2744
 * This flag is obsolete. DirectDraw always initializes the color array from
-
 
2745
 * the lpDDColorArray parameter. The definition remains for source-level
-
 
2746
 * compatibility.
-
 
2747
 *)
1705
  DDPCAPS_INITIALIZE         = $00000008;
2748
  DDPCAPS_INITIALIZE              = $00000008;
-
 
2749
 
-
 
2750
(*
-
 
2751
 * This palette is the one attached to the primary surface.  Changing this
-
 
2752
 * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
-
 
2753
 * and supported.
-
 
2754
 *)
1706
  DDPCAPS_PRIMARYSURFACE     = $00000010;
2755
  DDPCAPS_PRIMARYSURFACE          = $00000010;
-
 
2756
 
-
 
2757
(*
-
 
2758
 * This palette is the one attached to the primary surface left.  Changing
-
 
2759
 * this table has immediate effect on the display for the left eye unless
-
 
2760
 * DDPSETPAL_VSYNC is specified and supported.
-
 
2761
 *)
1707
  DDPCAPS_PRIMARYSURFACELEFT = $00000020;
2762
  DDPCAPS_PRIMARYSURFACELEFT      = $00000020;
-
 
2763
 
-
 
2764
(*
-
 
2765
 * This palette can have all 256 entries defined
-
 
2766
 *)
1708
  DDPCAPS_ALLOW256           = $00000040;
2767
  DDPCAPS_ALLOW256                = $00000040;
-
 
2768
 
-
 
2769
(*
-
 
2770
 * This palette can have modifications to it synced with the monitors
-
 
2771
 * refresh rate.
-
 
2772
 *)
1709
  DDPCAPS_VSYNC              = $00000080;
2773
  DDPCAPS_VSYNC                   = $00000080;
-
 
2774
 
-
 
2775
(*
-
 
2776
 * Index is 1 bit.  There are two color entries in the palette table.
-
 
2777
 *)
1710
  DDPCAPS_1BIT               = $00000100;
2778
  DDPCAPS_1BIT                    = $00000100;
-
 
2779
 
-
 
2780
(*
-
 
2781
 * Index is 2 bit.  There are four color entries in the palette table.
-
 
2782
 *)
1711
  DDPCAPS_2BIT               = $00000200;
2783
  DDPCAPS_2BIT                    = $00000200;
-
 
2784
 
-
 
2785
(*
-
 
2786
 * The peFlags member of PALETTEENTRY denotes an 8 bit alpha value
-
 
2787
 *)
1712
  DDPCAPS_ALPHA              = $00000400;
2788
  DDPCAPS_ALPHA                 = $00000400;
1713
 
2789
 
-
 
2790
(****************************************************************************
-
 
2791
 *
-
 
2792
 * DIRECTDRAWPALETTE SETENTRY CONSTANTS
-
 
2793
 *
-
 
2794
 ****************************************************************************)
-
 
2795
 
-
 
2796
 
-
 
2797
(****************************************************************************
-
 
2798
 *
-
 
2799
 * DIRECTDRAWPALETTE GETENTRY CONSTANTS
-
 
2800
 *
-
 
2801
 ****************************************************************************)
-
 
2802
 
1714
{ DirectDraw BitDepth Constants }
2803
(* 0 is the only legal value *)
-
 
2804
 
-
 
2805
(****************************************************************************
-
 
2806
 *
-
 
2807
 * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
-
 
2808
 *
-
 
2809
 ****************************************************************************)
1715
 
2810
 
-
 
2811
(*
-
 
2812
 * The passed pointer is an IUnknown ptr. The cbData argument to SetPrivateData
-
 
2813
 * must be set to sizeof(IUnknown^). DirectDraw will call AddRef through this
-
 
2814
 * pointer and Release when the private data is destroyed. This includes when
-
 
2815
 * the surface or palette is destroyed before such priovate data is destroyed.
-
 
2816
 *)
-
 
2817
  DDSPD_IUNKNOWNPOINTER           = $00000001;
-
 
2818
 
-
 
2819
(*
-
 
2820
 * Private data is only valid for the current state of the object,
-
 
2821
 * as determined by the uniqueness value.
-
 
2822
 *)
-
 
2823
  DDSPD_VOLATILE                  = $00000002;
-
 
2824
 
-
 
2825
(****************************************************************************
-
 
2826
 *
-
 
2827
 * DIRECTDRAWSURFACE SETPALETTE CONSTANTS
-
 
2828
 *
-
 
2829
 ****************************************************************************)
-
 
2830
 
-
 
2831
 
-
 
2832
(****************************************************************************
-
 
2833
 *
-
 
2834
 * DIRECTDRAW BITDEPTH CONSTANTS
-
 
2835
 *
-
 
2836
 * NOTE:  These are only used to indicate supported bit depths.   These
-
 
2837
 * are flags only, they are not to be used as an actual bit depth.   The
-
 
2838
 * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual
-
 
2839
 * bit depths in a surface or for changing the display mode.
-
 
2840
 *
-
 
2841
 ****************************************************************************)
-
 
2842
 
-
 
2843
(*
-
 
2844
 * 1 bit per pixel.
-
 
2845
 *)
1716
  DDBD_1  = $00004000;
2846
  DDBD_1                  = $00004000;
-
 
2847
 
-
 
2848
(*
-
 
2849
 * 2 bits per pixel.
-
 
2850
 *)
1717
  DDBD_2  = $00002000;
2851
  DDBD_2                  = $00002000;
-
 
2852
 
-
 
2853
(*
-
 
2854
 * 4 bits per pixel.
-
 
2855
 *)
1718
  DDBD_4  = $00001000;
2856
  DDBD_4                  = $00001000;
-
 
2857
 
-
 
2858
(*
-
 
2859
 * 8 bits per pixel.
-
 
2860
 *)
1719
  DDBD_8  = $00000800;
2861
  DDBD_8                  = $00000800;
-
 
2862
 
-
 
2863
(*
-
 
2864
 * 16 bits per pixel.
-
 
2865
 *)
1720
  DDBD_16 = $00000400;
2866
  DDBD_16                 = $00000400;
-
 
2867
 
-
 
2868
(*
-
 
2869
 * 24 bits per pixel.
-
 
2870
 *)
1721
  DDBD_24 = $00000200;
2871
  DDBD_24                 = $00000200;
-
 
2872
 
-
 
2873
(*
-
 
2874
 * 32 bits per pixel.
-
 
2875
 *)
1722
  DDBD_32 = $00000100;
2876
  DDBD_32                 = $00000100;
1723
 
2877
 
-
 
2878
(****************************************************************************
-
 
2879
 *
1724
{ DirectDraw Set/Get Color Key Flags }
2880
 * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
-
 
2881
 *
-
 
2882
 ****************************************************************************)
1725
 
2883
 
-
 
2884
(*
-
 
2885
 * Set if the structure contains a color space.  Not set if the structure
-
 
2886
 * contains a single color key.
-
 
2887
 *)
1726
  DDCKEY_COLORSPACE  = $00000001;
2888
  DDCKEY_COLORSPACE       = $00000001;
-
 
2889
 
-
 
2890
(*
-
 
2891
 * Set if the structure specifies a color key or color space which is to be
-
 
2892
 * used as a destination color key for blt operations.
-
 
2893
 *)
1727
  DDCKEY_DESTBLT     = $00000002;
2894
  DDCKEY_DESTBLT          = $00000002;
-
 
2895
 
-
 
2896
(*
-
 
2897
 * Set if the structure specifies a color key or color space which is to be
-
 
2898
 * used as a destination color key for overlay operations.
-
 
2899
 *)
1728
  DDCKEY_DESTOVERLAY = $00000004;
2900
  DDCKEY_DESTOVERLAY      = $00000004;
-
 
2901
 
-
 
2902
(*
-
 
2903
 * Set if the structure specifies a color key or color space which is to be
-
 
2904
 * used as a source color key for blt operations.
-
 
2905
 *)
1729
  DDCKEY_SRCBLT      = $00000008;
2906
  DDCKEY_SRCBLT           = $00000008;
-
 
2907
 
-
 
2908
(*
-
 
2909
 * Set if the structure specifies a color key or color space which is to be
-
 
2910
 * used as a source color key for overlay operations.
-
 
2911
 *)
1730
  DDCKEY_SRCOVERLAY  = $00000010;
2912
  DDCKEY_SRCOVERLAY       = $00000010;
1731
 
2913
 
1732
{ DirectDraw Color Key Capability Flags }
-
 
1733
 
2914
 
-
 
2915
(****************************************************************************
-
 
2916
 *
-
 
2917
 * DIRECTDRAW COLOR KEY CAPABILITY FLAGS
-
 
2918
 *
-
 
2919
 ****************************************************************************)
-
 
2920
 
-
 
2921
(*
-
 
2922
 * Supports transparent blting using a color key to identify the replaceable
-
 
2923
 * bits of the destination surface for RGB colors.
-
 
2924
 *)
1734
  DDCKEYCAPS_DESTBLT                = $00000001;
2925
  DDCKEYCAPS_DESTBLT                      = $00000001;
-
 
2926
 
-
 
2927
(*
-
 
2928
 * Supports transparent blting using a color space to identify the replaceable
-
 
2929
 * bits of the destination surface for RGB colors.
-
 
2930
 *)
1735
  DDCKEYCAPS_DESTBLTCLRSPACE        = $00000002;
2931
  DDCKEYCAPS_DESTBLTCLRSPACE              = $00000002;
-
 
2932
 
-
 
2933
(*
-
 
2934
 * Supports transparent blting using a color space to identify the replaceable
-
 
2935
 * bits of the destination surface for YUV colors.
-
 
2936
 *)
1736
  DDCKEYCAPS_DESTBLTCLRSPACEYUV     = $00000004;
2937
  DDCKEYCAPS_DESTBLTCLRSPACEYUV           = $00000004;
-
 
2938
 
-
 
2939
(*
-
 
2940
 * Supports transparent blting using a color key to identify the replaceable
-
 
2941
 * bits of the destination surface for YUV colors.
-
 
2942
 *)
1737
  DDCKEYCAPS_DESTBLTYUV             = $00000008;
2943
  DDCKEYCAPS_DESTBLTYUV                   = $00000008;
-
 
2944
 
-
 
2945
(*
-
 
2946
 * Supports overlaying using colorkeying of the replaceable bits of the surface
-
 
2947
 * being overlayed for RGB colors.
-
 
2948
 *)
1738
  DDCKEYCAPS_DESTOVERLAY            = $00000010;
2949
  DDCKEYCAPS_DESTOVERLAY                  = $00000010;
-
 
2950
 
-
 
2951
(*
-
 
2952
 * Supports a color space as the color key for the destination for RGB colors.
-
 
2953
 *)
1739
  DDCKEYCAPS_DESTOVERLAYCLRSPACE    = $00000020;
2954
  DDCKEYCAPS_DESTOVERLAYCLRSPACE          = $00000020;
-
 
2955
 
-
 
2956
(*
-
 
2957
 * Supports a color space as the color key for the destination for YUV colors.
-
 
2958
 *)
1740
  DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV = $00000040;
2959
  DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV       = $00000040;
-
 
2960
 
-
 
2961
(*
-
 
2962
 * Supports only one active destination color key value for visible overlay
-
 
2963
 * surfaces.
-
 
2964
 *)
1741
  DDCKEYCAPS_DESTOVERLAYONEACTIVE   = $00000080;
2965
  DDCKEYCAPS_DESTOVERLAYONEACTIVE         = $00000080;
-
 
2966
 
-
 
2967
(*
-
 
2968
 * Supports overlaying using colorkeying of the replaceable bits of the
-
 
2969
 * surface being overlayed for YUV colors.
-
 
2970
 *)
1742
  DDCKEYCAPS_DESTOVERLAYYUV         = $00000100;
2971
  DDCKEYCAPS_DESTOVERLAYYUV               = $00000100;
-
 
2972
 
-
 
2973
(*
-
 
2974
 * Supports transparent blting using the color key for the source with
-
 
2975
 * this surface for RGB colors.
-
 
2976
 *)
1743
  DDCKEYCAPS_SRCBLT                 = $00000200;
2977
  DDCKEYCAPS_SRCBLT                       = $00000200;
-
 
2978
 
-
 
2979
(*
-
 
2980
 * Supports transparent blting using a color space for the source with
-
 
2981
 * this surface for RGB colors.
-
 
2982
 *)
1744
  DDCKEYCAPS_SRCBLTCLRSPACE         = $00000400;
2983
  DDCKEYCAPS_SRCBLTCLRSPACE               = $00000400;
-
 
2984
 
-
 
2985
(*
-
 
2986
 * Supports transparent blting using a color space for the source with
-
 
2987
 * this surface for YUV colors.
-
 
2988
 *)
1745
  DDCKEYCAPS_SRCBLTCLRSPACEYUV      = $00000800;
2989
  DDCKEYCAPS_SRCBLTCLRSPACEYUV            = $00000800;
-
 
2990
 
-
 
2991
(*
-
 
2992
 * Supports transparent blting using the color key for the source with
-
 
2993
 * this surface for YUV colors.
-
 
2994
 *)
1746
  DDCKEYCAPS_SRCBLTYUV              = $00001000;
2995
  DDCKEYCAPS_SRCBLTYUV                    = $00001000;
-
 
2996
 
-
 
2997
(*
-
 
2998
 * Supports overlays using the color key for the source with this
-
 
2999
 * overlay surface for RGB colors.
-
 
3000
 *)
1747
  DDCKEYCAPS_SRCOVERLAY             = $00002000;
3001
  DDCKEYCAPS_SRCOVERLAY                   = $00002000;
-
 
3002
 
-
 
3003
(*
-
 
3004
 * Supports overlays using a color space as the source color key for
-
 
3005
 * the overlay surface for RGB colors.
-
 
3006
 *)
1748
  DDCKEYCAPS_SRCOVERLAYCLRSPACE     = $00004000;
3007
  DDCKEYCAPS_SRCOVERLAYCLRSPACE           = $00004000;
-
 
3008
 
-
 
3009
(*
-
 
3010
 * Supports overlays using a color space as the source color key for
-
 
3011
 * the overlay surface for YUV colors.
-
 
3012
 *)
1749
  DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV  = $00008000;
3013
  DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV        = $00008000;
-
 
3014
 
-
 
3015
(*
-
 
3016
 * Supports only one active source color key value for visible
-
 
3017
 * overlay surfaces.
-
 
3018
 *)
1750
  DDCKEYCAPS_SRCOVERLAYONEACTIVE    = $00010000;
3019
  DDCKEYCAPS_SRCOVERLAYONEACTIVE          = $00010000;
-
 
3020
 
-
 
3021
(*
-
 
3022
 * Supports overlays using the color key for the source with this
-
 
3023
 * overlay surface for YUV colors.
-
 
3024
 *)
1751
  DDCKEYCAPS_SRCOVERLAYYUV          = $00020000;
3025
  DDCKEYCAPS_SRCOVERLAYYUV                = $00020000;
-
 
3026
 
-
 
3027
(*
-
 
3028
 * there are no bandwidth trade-offs for using colorkey with an overlay
-
 
3029
 *)
1752
  DDCKEYCAPS_NOCOSTOVERLAY          = $00040000;
3030
  DDCKEYCAPS_NOCOSTOVERLAY                = $00040000;
1753
 
3031
 
1754
{ DirectDraw PixelFormat Flags }
-
 
1755
 
3032
 
-
 
3033
(****************************************************************************
-
 
3034
 *
-
 
3035
 * DIRECTDRAW PIXELFORMAT FLAGS
-
 
3036
 *
-
 
3037
 ****************************************************************************)
-
 
3038
 
-
 
3039
(*
-
 
3040
 * The surface has alpha channel information in the pixel format.
-
 
3041
 *)
1756
  DDPF_ALPHAPIXELS       = $00000001;
3042
  DDPF_ALPHAPIXELS                        = $00000001;
-
 
3043
 
-
 
3044
(*
-
 
3045
 * The pixel format contains alpha only information
-
 
3046
 *)
1757
  DDPF_ALPHA             = $00000002;
3047
  DDPF_ALPHA                              = $00000002;
-
 
3048
 
-
 
3049
(*
-
 
3050
 * The FourCC code is valid.
-
 
3051
 *)
1758
  DDPF_FOURCC            = $00000004;
3052
  DDPF_FOURCC                             = $00000004;
-
 
3053
 
-
 
3054
(*
-
 
3055
 * The surface is 4-bit color indexed.
-
 
3056
 *)
1759
  DDPF_PALETTEINDEXED4   = $00000008;
3057
  DDPF_PALETTEINDEXED4                    = $00000008;
-
 
3058
 
-
 
3059
(*
-
 
3060
 * The surface is indexed into a palette which stores indices
-
 
3061
 * into the destination surface's 8-bit palette.
-
 
3062
 *)
1760
  DDPF_PALETTEINDEXEDTO8 = $00000010;
3063
  DDPF_PALETTEINDEXEDTO8                  = $00000010;
-
 
3064
 
-
 
3065
(*
-
 
3066
 * The surface is 8-bit color indexed.
-
 
3067
 *)
1761
  DDPF_PALETTEINDEXED8   = $00000020;
3068
  DDPF_PALETTEINDEXED8                    = $00000020;
-
 
3069
 
-
 
3070
(*
-
 
3071
 * The RGB data in the pixel format structure is valid.
-
 
3072
 *)
1762
  DDPF_RGB               = $00000040;
3073
  DDPF_RGB                                = $00000040;
-
 
3074
 
-
 
3075
(*
-
 
3076
 * The surface will accept pixel data in the format specified
-
 
3077
 * and compress it during the write.
-
 
3078
 *)
1763
  DDPF_COMPRESSED        = $00000080;
3079
  DDPF_COMPRESSED                         = $00000080;
-
 
3080
 
-
 
3081
(*
-
 
3082
 * The surface will accept RGB data and translate it during
-
 
3083
 * the write to YUV data.  The format of the data to be written
-
 
3084
 * will be contained in the pixel format structure.  The DDPF_RGB
-
 
3085
 * flag will be set.
-
 
3086
 *)
1764
  DDPF_RGBTOYUV          = $00000100;
3087
  DDPF_RGBTOYUV                           = $00000100;
-
 
3088
 
-
 
3089
(*
-
 
3090
 * pixel format is YUV - YUV data in pixel format struct is valid
-
 
3091
 *)
1765
  DDPF_YUV               = $00000200;
3092
  DDPF_YUV                                = $00000200;
-
 
3093
 
-
 
3094
(*
-
 
3095
 * pixel format is a z buffer only surface
-
 
3096
 *)
1766
  DDPF_ZBUFFER           = $00000400;
3097
  DDPF_ZBUFFER                            = $00000400;
-
 
3098
 
-
 
3099
(*
-
 
3100
 * The surface is 1-bit color indexed.
-
 
3101
 *)
1767
  DDPF_PALETTEINDEXED1   = $00000800;
3102
  DDPF_PALETTEINDEXED1                    = $00000800;
-
 
3103
 
-
 
3104
(*
-
 
3105
 * The surface is 2-bit color indexed.
-
 
3106
 *)
1768
  DDPF_PALETTEINDEXED2   = $00001000;
3107
  DDPF_PALETTEINDEXED2                    = $00001000;
-
 
3108
 
-
 
3109
(*
-
 
3110
 * The surface contains Z information in the pixels
-
 
3111
 *)
1769
  DDPF_ZPIXELS           = $00002000;
3112
  DDPF_ZPIXELS                          = $00002000;
-
 
3113
 
-
 
3114
(*
-
 
3115
 * The surface contains stencil information along with Z
-
 
3116
 *)
1770
  DDPF_STENCILBUFFER     = $00004000;
3117
  DDPF_STENCILBUFFER                    = $00004000;
-
 
3118
 
-
 
3119
(*
-
 
3120
 * Premultiplied alpha format -- the color components have been
-
 
3121
 * premultiplied by the alpha component.
-
 
3122
 *)
1771
  DDPF_ALPHAPREMULT      = $00008000;
3123
  DDPF_ALPHAPREMULT                     = $00008000;
1772
  DDPF_LUMINANCE         = $00020000;
-
 
1773
  DDPF_BUMPLUMINANCE     = $00040000;
-
 
1774
  DDPF_BUMPDUDV          = $00080000;
-
 
1775
 
3124
 
1776
{ DirectDraw SetDisplayMode Flags }
-
 
1777
 
3125
 
-
 
3126
(*
-
 
3127
 * Luminance data in the pixel format is valid.
-
 
3128
 * Use this flag for luminance-only or luminance+alpha surfaces,
-
 
3129
 * the bit depth is then ddpf.dwLuminanceBitCount.
-
 
3130
 *)
1778
  DDSDM_STANDARDVGAMODE  = $00000001;
3131
  DDPF_LUMINANCE                          = $00020000;
1779
 
3132
 
-
 
3133
(*
1780
{ DirectDraw EnumDisplayModes Flags }
3134
 * Luminance data in the pixel format is valid.
-
 
3135
 * Use this flag when hanging luminance off bumpmap surfaces,
-
 
3136
 * the bit mask for the luminance portion of the pixel is then
-
 
3137
 * ddpf.dwBumpLuminanceBitMask
-
 
3138
 *)
-
 
3139
  DDPF_BUMPLUMINANCE                      = $00040000;
1781
 
3140
 
-
 
3141
(*
1782
  DDEDM_REFRESHRATES     = $00000001;
3142
 * Bump map dUdV data in the pixel format is valid.
-
 
3143
 *)
1783
  DDEDM_STANDARDVGAMODES = $00000002;
3144
  DDPF_BUMPDUDV                           = $00080000;
1784
 
3145
 
-
 
3146
(*===========================================================================
-
 
3147
 *
-
 
3148
 *
-
 
3149
 * DIRECTDRAW CALLBACK FLAGS
-
 
3150
 *
-
 
3151
 *
-
 
3152
 *==========================================================================*)
-
 
3153
 
-
 
3154
(****************************************************************************
-
 
3155
 *
1785
{ DirectDraw EnumSurfaces Flags }
3156
 * DIRECTDRAW ENUMSURFACES FLAGS
-
 
3157
 *
-
 
3158
 ****************************************************************************)
1786
 
3159
 
-
 
3160
(*
-
 
3161
 * Enumerate all of the surfaces that meet the search criterion.
-
 
3162
 *)
1787
  DDENUMSURFACES_ALL           = $00000001;
3163
  DDENUMSURFACES_ALL                      = $00000001;
-
 
3164
 
-
 
3165
(*
-
 
3166
 * A search hit is a surface that matches the surface description.
-
 
3167
 *)
1788
  DDENUMSURFACES_MATCH         = $00000002;
3168
  DDENUMSURFACES_MATCH                    = $00000002;
-
 
3169
 
-
 
3170
(*
-
 
3171
 * A search hit is a surface that does not match the surface description.
-
 
3172
 *)
1789
  DDENUMSURFACES_NOMATCH       = $00000004;
3173
  DDENUMSURFACES_NOMATCH                  = $00000004;
-
 
3174
 
-
 
3175
(*
-
 
3176
 * Enumerate the first surface that can be created which meets the search criterion.
-
 
3177
 *)
1790
  DDENUMSURFACES_CANBECREATED  = $00000008;
3178
  DDENUMSURFACES_CANBECREATED             = $00000008;
-
 
3179
 
-
 
3180
(*
-
 
3181
 * Enumerate the surfaces that already exist that meet the search criterion.
-
 
3182
 *)
1791
  DDENUMSURFACES_DOESEXIST     = $00000010;
3183
  DDENUMSURFACES_DOESEXIST                = $00000010;
1792
 
3184
 
-
 
3185
(****************************************************************************
-
 
3186
 *
-
 
3187
 * DIRECTDRAW SETDISPLAYMODE FLAGS
-
 
3188
 *
-
 
3189
 ****************************************************************************)
-
 
3190
 
-
 
3191
(*
-
 
3192
 * The desired mode is a standard VGA mode
-
 
3193
 *)
-
 
3194
  DDSDM_STANDARDVGAMODE                   = $00000001;
-
 
3195
 
-
 
3196
(****************************************************************************
-
 
3197
 *
-
 
3198
 * DIRECTDRAW ENUMDISPLAYMODES FLAGS
-
 
3199
 *
-
 
3200
 ****************************************************************************)
-
 
3201
 
-
 
3202
(*
-
 
3203
 * Enumerate Modes with different refresh rates.  EnumDisplayModes guarantees
-
 
3204
 * that a particular mode will be enumerated only once.  This flag specifies whether
-
 
3205
 * the refresh rate is taken into account when determining if a mode is unique.
-
 
3206
 *)
-
 
3207
  DDEDM_REFRESHRATES                      = $00000001;
-
 
3208
 
-
 
3209
(*
-
 
3210
 * Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA
-
 
3211
 * modes such as mode 0x13 in addition to the usual ModeX modes (which are always
-
 
3212
 * enumerated if the application has previously called SetCooperativeLevel with the
-
 
3213
 * DDSCL_ALLOWMODEX flag set).
-
 
3214
 *)
-
 
3215
  DDEDM_STANDARDVGAMODES                  = $00000002;
-
 
3216
 
-
 
3217
 
-
 
3218
(****************************************************************************
-
 
3219
 *
1793
{ DirectDraw SetCooperativeLevel Flags }
3220
 * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
-
 
3221
 *
-
 
3222
 ****************************************************************************)
1794
 
3223
 
-
 
3224
(*
-
 
3225
 * Exclusive mode owner will be responsible for the entire primary surface.
-
 
3226
 * GDI can be ignored. used with DD
-
 
3227
 *)
1795
  DDSCL_FULLSCREEN          = $00000001;
3228
  DDSCL_FULLSCREEN                        = $00000001;
-
 
3229
 
-
 
3230
(*
-
 
3231
 * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode
-
 
3232
 *)
1796
  DDSCL_ALLOWREBOOT         = $00000002;
3233
  DDSCL_ALLOWREBOOT                       = $00000002;
-
 
3234
 
-
 
3235
(*
-
 
3236
 * prevents DDRAW from modifying the application window.
-
 
3237
 * prevents DDRAW from minimize/restore the application window on activation.
-
 
3238
 *)
1797
  DDSCL_NOWINDOWCHANGES     = $00000004;
3239
  DDSCL_NOWINDOWCHANGES                   = $00000004;
-
 
3240
 
-
 
3241
(*
-
 
3242
 * app wants to work as a regular Windows application
-
 
3243
 *)
1798
  DDSCL_NORMAL              = $00000008;
3244
  DDSCL_NORMAL                            = $00000008;
-
 
3245
 
-
 
3246
(*
-
 
3247
 * app wants exclusive access
-
 
3248
 *)
1799
  DDSCL_EXCLUSIVE           = $00000010;
3249
  DDSCL_EXCLUSIVE                         = $00000010;
-
 
3250
 
-
 
3251
 
-
 
3252
(*
-
 
3253
 * app can deal with non-windows display modes
-
 
3254
 *)
1800
  DDSCL_ALLOWMODEX          = $00000040;
3255
  DDSCL_ALLOWMODEX                        = $00000040;
-
 
3256
 
-
 
3257
(*
-
 
3258
 * this window will receive the focus messages
-
 
3259
 *)
1801
  DDSCL_SETFOCUSWINDOW      = $00000080;
3260
  DDSCL_SETFOCUSWINDOW                    = $00000080;
-
 
3261
 
-
 
3262
(*
-
 
3263
 * this window is associated with the DDRAW object and will
-
 
3264
 * cover the screen in fullscreen mode
-
 
3265
 *)
1802
  DDSCL_SETDEVICEWINDOW     = $00000100;
3266
  DDSCL_SETDEVICEWINDOW                   = $00000100;
-
 
3267
 
-
 
3268
(*
-
 
3269
 * app wants DDRAW to create a window to be associated with the
-
 
3270
 * DDRAW object
-
 
3271
 *)
1803
  DDSCL_CREATEDEVICEWINDOW  = $00000200;
3272
  DDSCL_CREATEDEVICEWINDOW                = $00000200;
-
 
3273
 
-
 
3274
(*
-
 
3275
 * App explicitly asks DDRAW/D3D to be multithread safe. This makes D3D
-
 
3276
 * take the global crtisec more frequently.
-
 
3277
 *)
1804
  DDSCL_MULTITHREADED       = $00000400;
3278
  DDSCL_MULTITHREADED                     = $00000400;
-
 
3279
 
-
 
3280
(*
-
 
3281
 * App hints that it would like to keep the FPU set up for optimal Direct3D
-
 
3282
 * performance (single precision and exceptions disabled) so Direct3D
-
 
3283
 * does not need to explicitly set the FPU each time
-
 
3284
 *)
1805
  DDSCL_FPUSETUP            = $00000800;
3285
  DDSCL_FPUSETUP                          = $00000800;
-
 
3286
 
-
 
3287
(*
-
 
3288
 * App specifies that it needs either double precision FPU or FPU exceptions
-
 
3289
 * enabled. This makes Direct3D explicitly set the FPU state eah time it is
-
 
3290
 * called. Setting the flag will reduce Direct3D performance. The flag is
-
 
3291
 * assumed by default in DirectX 6 and earlier. See also DDSCL_FPUSETUP
-
 
3292
 *)
1806
  DDSCL_FPUPRESERVE         = $00001000;
3293
  DDSCL_FPUPRESERVE                          = $00001000;
1807
 
3294
 
-
 
3295
(****************************************************************************
-
 
3296
 *
1808
{ DirectDraw Blt Flags }
3297
 * DIRECTDRAW BLT FLAGS
-
 
3298
 *
-
 
3299
 ****************************************************************************)
1809
 
3300
 
-
 
3301
(*
-
 
3302
 * Use the alpha information in the pixel format or the alpha channel surface
-
 
3303
 * attached to the destination surface as the alpha channel for this blt.
-
 
3304
 *)
1810
  DDBLT_ALPHADEST                = $00000001;
3305
  DDBLT_ALPHADEST                         = $00000001;
-
 
3306
 
-
 
3307
(*
-
 
3308
 * Use the dwConstAlphaDest field in the TDDBltFX structure as the alpha channel
-
 
3309
 * for the destination surface for this blt.
-
 
3310
 *)
1811
  DDBLT_ALPHADESTCONSTOVERRIDE   = $00000002;
3311
  DDBLT_ALPHADESTCONSTOVERRIDE            = $00000002;
-
 
3312
 
-
 
3313
(*
-
 
3314
 * The NEG suffix indicates that the destination surface becomes more
-
 
3315
 * transparent as the alpha value increases. (0 is opaque)
-
 
3316
 *)
1812
  DDBLT_ALPHADESTNEG             = $00000004;
3317
  DDBLT_ALPHADESTNEG                      = $00000004;
-
 
3318
 
-
 
3319
(*
-
 
3320
 * Use the lpDDSAlphaDest field in the TDDBltFX structure as the alpha
-
 
3321
 * channel for the destination for this blt.
-
 
3322
 *)
1813
  DDBLT_ALPHADESTSURFACEOVERRIDE = $00000008;
3323
  DDBLT_ALPHADESTSURFACEOVERRIDE          = $00000008;
-
 
3324
 
-
 
3325
(*
-
 
3326
 * Use the dwAlphaEdgeBlend field in the TDDBltFX structure as the alpha channel
-
 
3327
 * for the edges of the image that border the color key colors.
-
 
3328
 *)
1814
  DDBLT_ALPHAEDGEBLEND           = $00000010;
3329
  DDBLT_ALPHAEDGEBLEND                    = $00000010;
-
 
3330
 
-
 
3331
(*
-
 
3332
 * Use the alpha information in the pixel format or the alpha channel surface
-
 
3333
 * attached to the source surface as the alpha channel for this blt.
-
 
3334
 *)
1815
  DDBLT_ALPHASRC                 = $00000020;
3335
  DDBLT_ALPHASRC                          = $00000020;
-
 
3336
 
-
 
3337
(*
-
 
3338
 * Use the dwConstAlphaSrc field in the TDDBltFX structure as the alpha channel
-
 
3339
 * for the source for this blt.
-
 
3340
 *)
1816
  DDBLT_ALPHASRCCONSTOVERRIDE    = $00000040;
3341
  DDBLT_ALPHASRCCONSTOVERRIDE             = $00000040;
-
 
3342
 
-
 
3343
(*
-
 
3344
 * The NEG suffix indicates that the source surface becomes more transparent
-
 
3345
 * as the alpha value increases. (0 is opaque)
-
 
3346
 *)
1817
  DDBLT_ALPHASRCNEG              = $00000080;
3347
  DDBLT_ALPHASRCNEG                       = $00000080;
-
 
3348
 
-
 
3349
(*
-
 
3350
 * Use the lpDDSAlphaSrc field in the TDDBltFX structure as the alpha channel
-
 
3351
 * for the source for this blt.
-
 
3352
 *)
1818
  DDBLT_ALPHASRCSURFACEOVERRIDE  = $00000100;
3353
  DDBLT_ALPHASRCSURFACEOVERRIDE           = $00000100;
-
 
3354
 
-
 
3355
(*
-
 
3356
 * Do this blt asynchronously through the FIFO in the order received.  If
-
 
3357
 * there is no room in the hardware FIFO fail the call.
-
 
3358
 *)
1819
  DDBLT_ASYNC                    = $00000200;
3359
  DDBLT_ASYNC                             = $00000200;
-
 
3360
 
-
 
3361
(*
-
 
3362
 * Uses the dwFillColor field in the TDDBltFX structure as the RGB color
-
 
3363
 * to fill the destination rectangle on the destination surface with.
-
 
3364
 *)
1820
  DDBLT_COLORFILL                = $00000400;
3365
  DDBLT_COLORFILL                         = $00000400;
-
 
3366
 
-
 
3367
(*
-
 
3368
 * Uses the dwDDFX field in the TDDBltFX structure to specify the effects
-
 
3369
 * to use for the blt.
-
 
3370
 *)
1821
  DDBLT_DDFX                     = $00000800;
3371
  DDBLT_DDFX                              = $00000800;
-
 
3372
 
-
 
3373
(*
-
 
3374
 * Uses the dwDDROPS field in the TDDBltFX structure to specify the ROPS
-
 
3375
 * that are not part of the Win32 API.
-
 
3376
 *)
1822
  DDBLT_DDROPS                   = $00001000;
3377
  DDBLT_DDROPS                            = $00001000;
-
 
3378
 
-
 
3379
(*
-
 
3380
 * Use the color key associated with the destination surface.
-
 
3381
 *)
1823
  DDBLT_KEYDEST                  = $00002000;
3382
  DDBLT_KEYDEST                           = $00002000;
-
 
3383
 
-
 
3384
(*
-
 
3385
 * Use the dckDestColorkey field in the TDDBltFX structure as the color key
-
 
3386
 * for the destination surface.
-
 
3387
 *)
1824
  DDBLT_KEYDESTOVERRIDE          = $00004000;
3388
  DDBLT_KEYDESTOVERRIDE                   = $00004000;
-
 
3389
 
-
 
3390
(*
-
 
3391
 * Use the color key associated with the source surface.
-
 
3392
 *)
1825
  DDBLT_KEYSRC                   = $00008000;
3393
  DDBLT_KEYSRC                            = $00008000;
-
 
3394
 
-
 
3395
(*
-
 
3396
 * Use the dckSrcColorkey field in the TDDBltFX structure as the color key
-
 
3397
 * for the source surface.
-
 
3398
 *)
1826
  DDBLT_KEYSRCOVERRIDE           = $00010000;
3399
  DDBLT_KEYSRCOVERRIDE                    = $00010000;
-
 
3400
 
-
 
3401
(*
-
 
3402
 * Use the dwROP field in the TDDBltFX structure for the raster operation
-
 
3403
 * for this blt.  These ROPs are the same as the ones defined in the Win32 API.
-
 
3404
 *)
1827
  DDBLT_ROP                      = $00020000;
3405
  DDBLT_ROP                               = $00020000;
-
 
3406
 
-
 
3407
(*
-
 
3408
 * Use the dwRotationAngle field in the TDDBltFX structure as the angle
-
 
3409
 * (specified in 1/100th of a degree) to rotate the surface.
-
 
3410
 *)
1828
  DDBLT_ROTATIONANGLE            = $00040000;
3411
  DDBLT_ROTATIONANGLE                     = $00040000;
-
 
3412
 
-
 
3413
(*
-
 
3414
 * Z-buffered blt using the z-buffers attached to the source and destination
-
 
3415
 * surfaces and the dwZBufferOpCode field in the TDDBltFX structure as the
-
 
3416
 * z-buffer opcode.
-
 
3417
 *)
1829
  DDBLT_ZBUFFER                  = $00080000;
3418
  DDBLT_ZBUFFER                           = $00080000;
-
 
3419
 
-
 
3420
(*
-
 
3421
 * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
-
 
3422
 * in the TDDBltFX structure as the z-buffer and z-buffer opcode respectively
-
 
3423
 * for the destination.
-
 
3424
 *)
1830
  DDBLT_ZBUFFERDESTCONSTOVERRIDE = $00100000;
3425
  DDBLT_ZBUFFERDESTCONSTOVERRIDE          = $00100000;
-
 
3426
 
-
 
3427
(*
-
 
3428
 * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
-
 
3429
 * field in the TDDBltFX structure as the z-buffer and z-buffer opcode
-
 
3430
 * respectively for the destination.
-
 
3431
 *)
1831
  DDBLT_ZBUFFERDESTOVERRIDE      = $00200000;
3432
  DDBLT_ZBUFFERDESTOVERRIDE               = $00200000;
-
 
3433
 
-
 
3434
(*
-
 
3435
 * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
-
 
3436
 * in the TDDBltFX structure as the z-buffer and z-buffer opcode respectively
-
 
3437
 * for the source.
-
 
3438
 *)
1832
  DDBLT_ZBUFFERSRCCONSTOVERRIDE  = $00400000;
3439
  DDBLT_ZBUFFERSRCCONSTOVERRIDE           = $00400000;
-
 
3440
 
-
 
3441
(*
-
 
3442
 * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
-
 
3443
 * field in the TDDBltFX structure as the z-buffer and z-buffer opcode
-
 
3444
 * respectively for the source.
-
 
3445
 *)
1833
  DDBLT_ZBUFFERSRCOVERRIDE       = $00800000;
3446
   DDBLT_ZBUFFERSRCOVERRIDE                = $00800000;
-
 
3447
 
-
 
3448
(*
-
 
3449
 * wait until the device is ready to handle the blt
-
 
3450
 * this will cause blt to not return DDERR_WASSTILLDRAWING
-
 
3451
 *)
1834
  DDBLT_WAIT                     = $01000000;
3452
  DDBLT_WAIT                              = $01000000;
-
 
3453
 
-
 
3454
(*
-
 
3455
 * Uses the dwFillDepth field in the TDDBltFX structure as the depth value
-
 
3456
 * to fill the destination rectangle on the destination Z-buffer surface
-
 
3457
 * with.
-
 
3458
 *)
1835
  DDBLT_DEPTHFILL                = $02000000;
3459
  DDBLT_DEPTHFILL                         = $02000000;
-
 
3460
 
-
 
3461
(*
-
 
3462
 * wait until the device is ready to handle the blt
-
 
3463
 * this will cause blt to not return DDERR_WASSTILLDRAWING
-
 
3464
 *)
1836
  DDBLT_DONOTWAIT                = $08000000;
3465
  DDBLT_DONOTWAIT                         = $08000000;
1837
 
3466
 
-
 
3467
(****************************************************************************
-
 
3468
 *
1838
{ BltFast Flags }
3469
 * BLTFAST FLAGS
-
 
3470
 *
-
 
3471
 ****************************************************************************)
1839
 
3472
 
1840
  DDBLTFAST_NOCOLORKEY   = $00000000;
3473
  DDBLTFAST_NOCOLORKEY                    = $00000000;
1841
  DDBLTFAST_SRCCOLORKEY  = $00000001;
3474
  DDBLTFAST_SRCCOLORKEY                   = $00000001;
1842
  DDBLTFAST_DESTCOLORKEY = $00000002;
3475
  DDBLTFAST_DESTCOLORKEY                  = $00000002;
1843
  DDBLTFAST_WAIT         = $00000010;
3476
  DDBLTFAST_WAIT                          = $00000010;
1844
  DDBLTFAST_DONOTWAIT    = $00000020;
3477
  DDBLTFAST_DONOTWAIT                     = $00000020;
1845
 
3478
 
-
 
3479
(****************************************************************************
-
 
3480
 *
1846
{ Flip Flags }
3481
 * FLIP FLAGS
-
 
3482
 *
-
 
3483
 ****************************************************************************)
-
 
3484
 
1847
 
3485
 
1848
  DDFLIP_WAIT      = $00000001;
3486
  DDFLIP_WAIT                          = $00000001;
-
 
3487
 
-
 
3488
(*
-
 
3489
 * Indicates that the target surface contains the even field of video data.
-
 
3490
 * This flag is only valid with an overlay surface.
-
 
3491
 *)
1849
  DDFLIP_EVEN      = $00000002;
3492
  DDFLIP_EVEN                          = $00000002;
-
 
3493
 
-
 
3494
(*
-
 
3495
 * Indicates that the target surface contains the odd field of video data.
-
 
3496
 * This flag is only valid with an overlay surface.
-
 
3497
 *)
1850
  DDFLIP_ODD       = $00000004;
3498
  DDFLIP_ODD                           = $00000004;
-
 
3499
 
-
 
3500
(*
-
 
3501
 * Causes DirectDraw to perform the physical flip immediately and return
-
 
3502
 * to the application. Typically, what was the front buffer but is now the back
-
 
3503
 * buffer will still be visible (depending on timing) until the next vertical
-
 
3504
 * retrace. Subsequent operations involving the two flipped surfaces will
-
 
3505
 * not check to see if the physical flip has finished (i.e. will not return
-
 
3506
 * DDERR_WASSTILLDRAWING for that reason (but may for other reasons)).
-
 
3507
 * This allows an application to perform Flips at a higher frequency than the
-
 
3508
 * monitor refresh rate, but may introduce visible artifacts.
-
 
3509
 * Only effective if DDCAPS2_FLIPNOVSYNC is set. If that bit is not set,
-
 
3510
 * DDFLIP_NOVSYNC has no effect.
-
 
3511
 *)
1851
  DDFLIP_NOVSYNC   = $00000008;
3512
  DDFLIP_NOVSYNC                       = $00000008;
-
 
3513
 
-
 
3514
 
-
 
3515
(*
-
 
3516
 * Flip Interval Flags. These flags indicate how many vertical retraces to wait between
-
 
3517
 * each flip. The default is one. DirectDraw will return DDERR_WASSTILLDRAWING for each
-
 
3518
 * surface involved in the flip until the specified number of vertical retraces has
-
 
3519
 * ocurred. Only effective if DDCAPS2_FLIPINTERVAL is set. If that bit is not set,
-
 
3520
 * DDFLIP_INTERVALn has no effect.
-
 
3521
 *)
-
 
3522
 
-
 
3523
(*
-
 
3524
 * DirectDraw will flip on every other vertical sync
-
 
3525
 *)
1852
  DDFLIP_INTERVAL2 = $02000000;
3526
  DDFLIP_INTERVAL2                     = $02000000;
-
 
3527
 
-
 
3528
 
-
 
3529
(*
-
 
3530
 * DirectDraw will flip on every third vertical sync
-
 
3531
 *)
1853
  DDFLIP_INTERVAL3 = $03000000;
3532
  DDFLIP_INTERVAL3                     = $03000000;
-
 
3533
 
-
 
3534
 
-
 
3535
(*
-
 
3536
 * DirectDraw will flip on every fourth vertical sync
-
 
3537
 *)
1854
  DDFLIP_INTERVAL4 = $04000000;
3538
  DDFLIP_INTERVAL4                     = $04000000;
-
 
3539
 
-
 
3540
(*
-
 
3541
 * DirectDraw will flip and display a main stereo surface
-
 
3542
 *)
1855
  DDFLIP_STEREO    = $00000010;
3543
  DDFLIP_STEREO                        = $00000010;
-
 
3544
 
-
 
3545
(*
-
 
3546
 * On IDirectDrawSurface7 and higher interfaces, the default is DDFLIP_WAIT. If you wish
-
 
3547
 * to override the default and use time when the accelerator is busy (as denoted by
-
 
3548
 * the DDERR_WASSTILLDRAWING return code) then use DDFLIP_DONOTWAIT.
-
 
3549
 *)
1856
  DDFLIP_DONOTWAIT = $00000020;
3550
  DDFLIP_DONOTWAIT                     = $00000020;
1857
 
3551
 
-
 
3552
(****************************************************************************
-
 
3553
 *
1858
{ DirectDraw Surface Overlay Flags }
3554
 * DIRECTDRAW SURFACE OVERLAY FLAGS
-
 
3555
 *
-
 
3556
 ****************************************************************************)
1859
 
3557
 
-
 
3558
(*
-
 
3559
 * Use the alpha information in the pixel format or the alpha channel surface
-
 
3560
 * attached to the destination surface as the alpha channel for the
-
 
3561
 * destination overlay.
-
 
3562
 *)
1860
  DDOVER_ALPHADEST                = $00000001;
3563
  DDOVER_ALPHADEST                        = $00000001;
-
 
3564
 
-
 
3565
(*
-
 
3566
 * Use the dwConstAlphaDest field in the TDDOverlayFX structure as the
-
 
3567
 * destination alpha channel for this overlay.
-
 
3568
 *)
1861
  DDOVER_ALPHADESTCONSTOVERRIDE   = $00000002;
3569
  DDOVER_ALPHADESTCONSTOVERRIDE           = $00000002;
-
 
3570
 
-
 
3571
(*
-
 
3572
 * The NEG suffix indicates that the destination surface becomes more
-
 
3573
 * transparent as the alpha value increases.
-
 
3574
 *)
1862
  DDOVER_ALPHADESTNEG             = $00000004;
3575
  DDOVER_ALPHADESTNEG                     = $00000004;
-
 
3576
 
-
 
3577
(*
-
 
3578
 * Use the lpDDSAlphaDest field in the TDDOverlayFX structure as the alpha
-
 
3579
 * channel destination for this overlay.
-
 
3580
 *)
1863
  DDOVER_ALPHADESTSURFACEOVERRIDE = $00000008;
3581
  DDOVER_ALPHADESTSURFACEOVERRIDE         = $00000008;
-
 
3582
 
-
 
3583
(*
-
 
3584
 * Use the dwAlphaEdgeBlend field in the TDDOverlayFX structure as the alpha
-
 
3585
 * channel for the edges of the image that border the color key colors.
-
 
3586
 *)
1864
  DDOVER_ALPHAEDGEBLEND           = $00000010;
3587
  DDOVER_ALPHAEDGEBLEND                   = $00000010;
-
 
3588
 
-
 
3589
(*
-
 
3590
 * Use the alpha information in the pixel format or the alpha channel surface
-
 
3591
 * attached to the source surface as the source alpha channel for this overlay.
-
 
3592
 *)
1865
  DDOVER_ALPHASRC                 = $00000020;
3593
  DDOVER_ALPHASRC                         = $00000020;
-
 
3594
 
-
 
3595
(*
-
 
3596
 * Use the dwConstAlphaSrc field in the TDDOverlayFX structure as the source
-
 
3597
 * alpha channel for this overlay.
-
 
3598
 *)
1866
  DDOVER_ALPHASRCCONSTOVERRIDE    = $00000040;
3599
  DDOVER_ALPHASRCCONSTOVERRIDE            = $00000040;
-
 
3600
 
-
 
3601
(*
-
 
3602
 * The NEG suffix indicates that the source surface becomes more transparent
-
 
3603
 * as the alpha value increases.
-
 
3604
 *)
1867
  DDOVER_ALPHASRCNEG              = $00000080;
3605
  DDOVER_ALPHASRCNEG                      = $00000080;
-
 
3606
 
-
 
3607
(*
-
 
3608
 * Use the lpDDSAlphaSrc field in the TDDOverlayFX structure as the alpha channel
-
 
3609
 * source for this overlay.
-
 
3610
 *)
1868
  DDOVER_ALPHASRCSURFACEOVERRIDE  = $00000100;
3611
  DDOVER_ALPHASRCSURFACEOVERRIDE          = $00000100;
-
 
3612
 
-
 
3613
(*
-
 
3614
 * Turn this overlay off.
-
 
3615
 *)
1869
  DDOVER_HIDE                     = $00000200;
3616
  DDOVER_HIDE                             = $00000200;
-
 
3617
 
-
 
3618
(*
-
 
3619
 * Use the color key associated with the destination surface.
-
 
3620
 *)
1870
  DDOVER_KEYDEST                  = $00000400;
3621
  DDOVER_KEYDEST                          = $00000400;
-
 
3622
 
-
 
3623
(*
-
 
3624
 * Use the dckDestColorkey field in the TDDOverlayFX structure as the color key
-
 
3625
 * for the destination surface
-
 
3626
 *)
1871
  DDOVER_KEYDESTOVERRIDE          = $00000800;
3627
  DDOVER_KEYDESTOVERRIDE                  = $00000800;
-
 
3628
 
-
 
3629
(*
-
 
3630
 * Use the color key associated with the source surface.
-
 
3631
 *)
1872
  DDOVER_KEYSRC                   = $00001000;
3632
  DDOVER_KEYSRC                           = $00001000;
-
 
3633
 
-
 
3634
(*
-
 
3635
 * Use the dckSrcColorkey field in the TDDOverlayFX structure as the color key
-
 
3636
 * for the source surface.
-
 
3637
 *)
1873
  DDOVER_KEYSRCOVERRIDE           = $00002000;
3638
  DDOVER_KEYSRCOVERRIDE                   = $00002000;
-
 
3639
 
-
 
3640
(*
-
 
3641
 * Turn this overlay on.
-
 
3642
 *)
1874
  DDOVER_SHOW                     = $00004000;
3643
  DDOVER_SHOW                             = $00004000;
-
 
3644
 
-
 
3645
(*
-
 
3646
 * Add a dirty rect to an emulated overlayed surface.
-
 
3647
 *)
1875
  DDOVER_ADDDIRTYRECT             = $00008000;
3648
  DDOVER_ADDDIRTYRECT                     = $00008000;
-
 
3649
 
-
 
3650
(*
-
 
3651
 * Redraw all dirty rects on an emulated overlayed surface.
-
 
3652
 *)
1876
  DDOVER_REFRESHDIRTYRECTS        = $00010000;
3653
  DDOVER_REFRESHDIRTYRECTS                = $00010000;
-
 
3654
 
-
 
3655
(*
-
 
3656
 * Redraw the entire surface on an emulated overlayed surface.
-
 
3657
 *)
1877
  DDOVER_REFRESHALL               = $00020000;
3658
  DDOVER_REFRESHALL                      = $00020000;
-
 
3659
 
-
 
3660
(*
-
 
3661
 * Use the overlay FX flags to define special overlay FX
-
 
3662
 *)
1878
  DDOVER_DDFX                     = $00080000;
3663
  DDOVER_DDFX                             = $00080000;
-
 
3664
 
-
 
3665
(*
-
 
3666
 * Autoflip the overlay when ever the video port autoflips
-
 
3667
 *)
1879
  DDOVER_AUTOFLIP                 = $00100000;
3668
  DDOVER_AUTOFLIP                         = $00100000;
-
 
3669
 
-
 
3670
(*
-
 
3671
 * Display each field of video port data individually without
-
 
3672
 * causing any jittery artifacts
-
 
3673
 *)
1880
  DDOVER_BOB                      = $00200000;
3674
  DDOVER_BOB                              = $00200000;
-
 
3675
 
-
 
3676
(*
-
 
3677
 * Indicates that bob/weave decisions should not be overridden by other
-
 
3678
 * interfaces.
-
 
3679
 *)
1881
  DDOVER_OVERRIDEBOBWEAVE         = $00400000;
3680
  DDOVER_OVERRIDEBOBWEAVE                 = $00400000;
-
 
3681
 
-
 
3682
(*
-
 
3683
 * Indicates that the surface memory is composed of interleaved fields.
-
 
3684
 *)
1882
  DDOVER_INTERLEAVED              = $00800000;
3685
  DDOVER_INTERLEAVED                      = $00800000;
-
 
3686
 
-
 
3687
(*
-
 
3688
 * Indicates that bob will be performed using hardware rather than
-
 
3689
 * software or emulated.
-
 
3690
 *)
1883
  DDOVER_BOBHARDWARE              = $01000000;
3691
  DDOVER_BOBHARDWARE                    = $01000000;
-
 
3692
 
-
 
3693
(*
-
 
3694
 * Indicates that overlay FX structure contains valid ARGB scaling factors.
-
 
3695
 *)
1884
  DDOVER_ARGBSCALEFACTORS         = $02000000;
3696
  DDOVER_ARGBSCALEFACTORS                 = $02000000;
-
 
3697
 
-
 
3698
(*
-
 
3699
 * Indicates that ARGB scaling factors can be degraded to fit driver capabilities.
-
 
3700
 *)
1885
  DDOVER_DEGRADEARGBSCALING       = $04000000;
3701
  DDOVER_DEGRADEARGBSCALING               = $04000000;
1886
 
3702
 
-
 
3703
(****************************************************************************
-
 
3704
 *
1887
{ DirectDrawSurface Lock Flags }
3705
 * DIRECTDRAWSURFACE LOCK FLAGS
-
 
3706
 *
-
 
3707
 ****************************************************************************)
1888
 
3708
 
-
 
3709
(*
-
 
3710
 * The default.  Set to indicate that Lock should return a valid memory pointer
-
 
3711
 * to the top of the specified rectangle.  If no rectangle is specified then a
-
 
3712
 * pointer to the top of the surface is returned.
-
 
3713
 *)
1889
  DDLOCK_SURFACEMEMORYPTR  = $00000000;    // default
3714
  DDLOCK_SURFACEMEMORYPTR                 = $00000000;    // = default
-
 
3715
 
-
 
3716
(*
-
 
3717
 * Set to indicate that Lock should wait until it can obtain a valid memory
-
 
3718
 * pointer before returning.  If this bit is set, Lock will never return
-
 
3719
 * DDERR_WASSTILLDRAWING.
-
 
3720
 *)
1890
  DDLOCK_WAIT              = $00000001;
3721
  DDLOCK_WAIT                             = $00000001;
-
 
3722
 
-
 
3723
(*
-
 
3724
 * Set if an event handle is being passed to Lock.  Lock will trigger the event
-
 
3725
 * when it can return the surface memory pointer requested.
-
 
3726
 *)
1891
  DDLOCK_EVENT             = $00000002;
3727
  DDLOCK_EVENT                            = $00000002;
-
 
3728
 
-
 
3729
(*
-
 
3730
 * Indicates that the surface being locked will only be read from.
-
 
3731
 *)
1892
  DDLOCK_READONLY          = $00000010;
3732
  DDLOCK_READONLY                         = $00000010;
-
 
3733
 
-
 
3734
(*
-
 
3735
 * Indicates that the surface being locked will only be written to
-
 
3736
 *)
1893
  DDLOCK_WRITEONLY         = $00000020;
3737
  DDLOCK_WRITEONLY                        = $00000020;
-
 
3738
 
-
 
3739
(*
-
 
3740
 * Indicates that a system wide lock should not be taken when this surface
-
 
3741
 * is locked. This has several advantages (cursor responsiveness, ability
-
 
3742
 * to call more Windows functions, easier debugging) when locking video
-
 
3743
 * memory surfaces. However, an application specifying this flag must
-
 
3744
 * comply with a number of conditions documented in the help file.
-
 
3745
 * Furthermore, this flag cannot be specified when locking the primary.
-
 
3746
 *)
1894
  DDLOCK_NOSYSLOCK         = $00000800;
3747
  DDLOCK_NOSYSLOCK                        = $00000800;
-
 
3748
 
-
 
3749
(*
-
 
3750
 * Used only with Direct3D Vertex Buffer Locks. Indicates that no vertices
-
 
3751
 * that were referred to in Draw*PrimtiveVB calls since the start of the
-
 
3752
 * frame (or the last lock without this flag) will be modified during the
-
 
3753
 * lock. This can be useful when one is only appending data to the vertex
-
 
3754
 * buffer
-
 
3755
 *)
1895
  DDLOCK_NOOVERWRITE       = $00001000;
3756
  DDLOCK_NOOVERWRITE                      = $00001000;
-
 
3757
 
-
 
3758
(*
-
 
3759
 * Indicates that no assumptions will be made about the contents of the
-
 
3760
 * surface or vertex buffer during this lock.
-
 
3761
 * This enables two things:
-
 
3762
 * -    Direct3D or the driver may provide an alternative memory
-
 
3763
 *      area as the vertex buffer. This is useful when one plans to clear the
-
 
3764
 *      contents of the vertex buffer and fill in new data.
-
 
3765
 * -    Drivers sometimes store surface data in a re-ordered format.
-
 
3766
 *      When the application locks the surface, the driver is forced to un-re-order
-
 
3767
 *      the surface data before allowing the application to see the surface contents.
-
 
3768
 *      This flag is a hint to the driver that it can skip the un-re-ordering process
-
 
3769
 *      since the application plans to overwrite every single pixel in the surface
-
 
3770
 *      or locked rectangle (and so erase any un-re-ordered pixels anyway).
-
 
3771
 *      Applications should always set this flag when they intend to overwrite the entire
-
 
3772
 *      surface or locked rectangle.
-
 
3773
 *)
1896
  DDLOCK_DISCARDCONTENTS   = $00002000;
3774
  DDLOCK_DISCARDCONTENTS                  = $00002000;
-
 
3775
 (*
-
 
3776
  * DDLOCK_OKTOSWAP is an older, less informative name for DDLOCK_DISCARDCONTENTS
-
 
3777
  *)
1897
  DDLOCK_OKTOSWAP          = $00002000;
3778
  DDLOCK_OKTOSWAP                         = $00002000;
-
 
3779
 
-
 
3780
(*
-
 
3781
 * On IDirectDrawSurface7 and higher interfaces, the default is DDLOCK_WAIT. If you wish
-
 
3782
 * to override the default and use time when the accelerator is busy (as denoted by
-
 
3783
 * the DDERR_WASSTILLDRAWING return code) then use DDLOCK_DONOTWAIT.
-
 
3784
 *)
1898
  DDLOCK_DONOTWAIT         = $00004000;
3785
  DDLOCK_DONOTWAIT                        = $00004000;
1899
 
3786
 
1900
{ DirectDrawSurface Blt FX Flags }
-
 
1901
 
3787
 
-
 
3788
(****************************************************************************
-
 
3789
 *
-
 
3790
 * DIRECTDRAWSURFACE PAGELOCK FLAGS
-
 
3791
 *
-
 
3792
 ****************************************************************************)
-
 
3793
 
-
 
3794
(*
-
 
3795
 * No flags defined at present
-
 
3796
 *)
-
 
3797
 
-
 
3798
 
-
 
3799
(****************************************************************************
-
 
3800
 *
-
 
3801
 * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS
-
 
3802
 *
-
 
3803
 ****************************************************************************)
-
 
3804
 
-
 
3805
(*
-
 
3806
 * No flags defined at present
-
 
3807
 *)
-
 
3808
 
-
 
3809
 
-
 
3810
(****************************************************************************
-
 
3811
 *
-
 
3812
 * DIRECTDRAWSURFACE BLT FX FLAGS
-
 
3813
 *
-
 
3814
 ****************************************************************************)
-
 
3815
 
-
 
3816
(*
-
 
3817
 * If stretching, use arithmetic stretching along the Y axis for this blt.
-
 
3818
 *)
1902
  DDBLTFX_ARITHSTRETCHY    = $00000001;
3819
  DDBLTFX_ARITHSTRETCHY                   = $00000001;
-
 
3820
 
-
 
3821
(*
-
 
3822
 * Do this blt mirroring the surface left to right.  Spin the
-
 
3823
 * surface around its y-axis.
-
 
3824
 *)
1903
  DDBLTFX_MIRRORLEFTRIGHT  = $00000002;
3825
  DDBLTFX_MIRRORLEFTRIGHT                 = $00000002;
-
 
3826
 
-
 
3827
(*
-
 
3828
 * Do this blt mirroring the surface up and down.  Spin the surface
-
 
3829
 * around its x-axis.
-
 
3830
 *)
1904
  DDBLTFX_MIRRORUPDOWN     = $00000004;
3831
  DDBLTFX_MIRRORUPDOWN                    = $00000004;
-
 
3832
 
-
 
3833
(*
-
 
3834
 * Schedule this blt to avoid tearing.
-
 
3835
 *)
1905
  DDBLTFX_NOTEARING        = $00000008;
3836
  DDBLTFX_NOTEARING                       = $00000008;
-
 
3837
 
-
 
3838
(*
-
 
3839
 * Do this blt rotating the surface one hundred and eighty degrees.
-
 
3840
 *)
1906
  DDBLTFX_ROTATE180        = $00000010;
3841
  DDBLTFX_ROTATE180                       = $00000010;
-
 
3842
 
-
 
3843
(*
-
 
3844
 * Do this blt rotating the surface two hundred and seventy degrees.
-
 
3845
 *)
1907
  DDBLTFX_ROTATE270        = $00000020;
3846
  DDBLTFX_ROTATE270                       = $00000020;
-
 
3847
 
-
 
3848
(*
-
 
3849
 * Do this blt rotating the surface ninety degrees.
-
 
3850
 *)
1908
  DDBLTFX_ROTATE90         = $00000040;
3851
  DDBLTFX_ROTATE90                        = $00000040;
-
 
3852
 
-
 
3853
(*
-
 
3854
 * Do this z blt using dwZBufferLow and dwZBufferHigh as  range values
-
 
3855
 * specified to limit the bits copied from the source surface.
-
 
3856
 *)
1909
  DDBLTFX_ZBUFFERRANGE     = $00000080;
3857
  DDBLTFX_ZBUFFERRANGE                    = $00000080;
-
 
3858
 
-
 
3859
(*
-
 
3860
 * Do this z blt adding the dwZBufferBaseDest to each of the sources z values
-
 
3861
 * before comparing it with the desting z values.
-
 
3862
 *)
1910
  DDBLTFX_ZBUFFERBASEDEST  = $00000100;
3863
  DDBLTFX_ZBUFFERBASEDEST                 = $00000100;
1911
 
3864
 
-
 
3865
(****************************************************************************
-
 
3866
 *
1912
{ DirectDrawSurface Overlay FX Flags }
3867
 * DIRECTDRAWSURFACE OVERLAY FX FLAGS
-
 
3868
 *
-
 
3869
 ****************************************************************************)
1913
 
3870
 
-
 
3871
(*
-
 
3872
 * If stretching, use arithmetic stretching along the Y axis for this overlay.
-
 
3873
 *)
1914
  DDOVERFX_ARITHSTRETCHY   = $00000001;
3874
  DDOVERFX_ARITHSTRETCHY                  = $00000001;
-
 
3875
 
-
 
3876
(*
-
 
3877
 * Mirror the overlay across the vertical axis
-
 
3878
 *)
1915
  DDOVERFX_MIRRORLEFTRIGHT = $00000002;
3879
  DDOVERFX_MIRRORLEFTRIGHT                = $00000002;
1916
  DDOVERFX_MIRRORUPDOWN    = $00000004;
-
 
1917
 
3880
 
-
 
3881
(*
1918
{ Flags for dwDDFX member of DDSPRITEFX structure }
3882
 * Mirror the overlay across the horizontal axis
-
 
3883
 *)
-
 
3884
  DDOVERFX_MIRRORUPDOWN                   = $00000004;
1919
 
3885
 
-
 
3886
(****************************************************************************
-
 
3887
 *
-
 
3888
 * Flags for dwDDFX member of DDSPRITEFX structure
-
 
3889
 *
-
 
3890
 ****************************************************************************)
-
 
3891
(*
-
 
3892
 * Use affine transformation matrix in fTransform member.
-
 
3893
 *)
1920
  DDSPRITEFX_AFFINETRANSFORM    = $00000001;
3894
  DDSPRITEFX_AFFINETRANSFORM            = $00000001;
-
 
3895
 
-
 
3896
(*
-
 
3897
 * Use RGBA scaling factors in ddrgbaScaleFactors member.
-
 
3898
 *)
1921
  DDSPRITEFX_RGBASCALING        = $00000002;
3899
  DDSPRITEFX_RGBASCALING                        = $00000002;
-
 
3900
 
-
 
3901
(*
-
 
3902
 * Degrade RGBA scaling factors to accommodate driver's capabilities.
-
 
3903
 *)
1922
  DDSPRITEFX_DEGRADERGBASCALING = $00000004;
3904
  DDSPRITEFX_DEGRADERGBASCALING         = $00000004;
-
 
3905
 
-
 
3906
(*
-
 
3907
 * Do bilinear filtering of stretched or warped sprite.
-
 
3908
 *)
1923
  DDSPRITEFX_BILINEARFILTER     = $00000008;
3909
  DDSPRITEFX_BILINEARFILTER                     = $00000008;
-
 
3910
 
-
 
3911
(*
-
 
3912
 * Do "blur" filtering of stretched or warped sprite.
-
 
3913
 *)
1924
  DDSPRITEFX_BLURFILTER         = $00000010;
3914
  DDSPRITEFX_BLURFILTER                         = $00000010;
-
 
3915
 
-
 
3916
(*
-
 
3917
 * Do "flat" filtering of stretched or warped sprite.
-
 
3918
 *)
1925
  DDSPRITEFX_FLATFILTER         = $00000020;
3919
  DDSPRITEFX_FLATFILTER                         = $00000020;
-
 
3920
 
-
 
3921
(*
-
 
3922
 * Degrade filtering operation to accommodate driver's capabilities.
-
 
3923
 *)
1926
  DDSPRITEFX_DEGRADEFILTER      = $00000040;
3924
  DDSPRITEFX_DEGRADEFILTER              = $00000040;
1927
 
3925
 
-
 
3926
(****************************************************************************
-
 
3927
 *
1928
{ DirectDraw WaitForVerticalBlank Flags }
3928
 * DIRECTDRAW WAITFORVERTICALBLANK FLAGS
-
 
3929
 *
-
 
3930
 ****************************************************************************)
1929
 
3931
 
-
 
3932
(*
-
 
3933
 * return when the vertical blank interval begins
-
 
3934
 *)
1930
  DDWAITVB_BLOCKBEGIN      = $00000001;
3935
  DDWAITVB_BLOCKBEGIN                     = $00000001;
-
 
3936
 
-
 
3937
(*
-
 
3938
 * set up an event to trigger when the vertical blank begins
-
 
3939
 *)
1931
  DDWAITVB_BLOCKBEGINEVENT = $00000002;
3940
  DDWAITVB_BLOCKBEGINEVENT                = $00000002;
-
 
3941
 
-
 
3942
(*
-
 
3943
 * return when the vertical blank interval ends and display begins
-
 
3944
 *)
1932
  DDWAITVB_BLOCKEND        = $00000004;
3945
  DDWAITVB_BLOCKEND                       = $00000004;
1933
 
3946
 
-
 
3947
(****************************************************************************
-
 
3948
 *
1934
{ DirectDraw GetFlipStatus Flags }
3949
 * DIRECTDRAW GETFLIPSTATUS FLAGS
-
 
3950
 *
-
 
3951
 ****************************************************************************)
1935
 
3952
 
-
 
3953
(*
-
 
3954
 * is it OK to flip now?
-
 
3955
 *)
1936
  DDGFS_CANFLIP    = $00000001;
3956
  DDGFS_CANFLIP                   = $00000001;
-
 
3957
 
-
 
3958
(*
-
 
3959
 * is the last flip finished?
-
 
3960
 *)
1937
  DDGFS_ISFLIPDONE = $00000002;
3961
  DDGFS_ISFLIPDONE                = $00000002;
1938
 
3962
 
-
 
3963
(****************************************************************************
-
 
3964
 *
1939
{ DirectDraw GetBltStatus Flags }
3965
 * DIRECTDRAW GETBLTSTATUS FLAGS
-
 
3966
 *
-
 
3967
 ****************************************************************************)
1940
 
3968
 
-
 
3969
(*
-
 
3970
 * is it OK to blt now?
-
 
3971
 *)
1941
  DDGBS_CANBLT     = $00000001;
3972
  DDGBS_CANBLT                    = $00000001;
-
 
3973
 
-
 
3974
(*
-
 
3975
 * is the blt to the surface finished?
-
 
3976
 *)
1942
  DDGBS_ISBLTDONE  = $00000002;
3977
  DDGBS_ISBLTDONE                 = $00000002;
1943
 
3978
 
1944
{ DirectDraw EnumOverlayZOrder Flags }
-
 
1945
 
3979
 
-
 
3980
(****************************************************************************
-
 
3981
 *
-
 
3982
 * DIRECTDRAW ENUMOVERLAYZORDER FLAGS
-
 
3983
 *
-
 
3984
 ****************************************************************************)
-
 
3985
 
-
 
3986
(*
-
 
3987
 * Enumerate overlays back to front.
-
 
3988
 *)
1946
  DDENUMOVERLAYZ_BACKTOFRONT = $00000000;
3989
  DDENUMOVERLAYZ_BACKTOFRONT      = $00000000;
-
 
3990
 
-
 
3991
(*
-
 
3992
 * Enumerate overlays front to back
-
 
3993
 *)
1947
  DDENUMOVERLAYZ_FRONTTOBACK = $00000001;
3994
  DDENUMOVERLAYZ_FRONTTOBACK      = $00000001;
1948
 
3995
 
-
 
3996
(****************************************************************************
-
 
3997
 *
1949
{ DirectDraw UpdateOverlayZOrder Flags }
3998
 * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS
-
 
3999
 *
-
 
4000
 ****************************************************************************)
1950
 
4001
 
-
 
4002
(*
-
 
4003
 * Send overlay to front
-
 
4004
 *)
1951
  DDOVERZ_SENDTOFRONT     = $00000000;
4005
  DDOVERZ_SENDTOFRONT             = $00000000;
-
 
4006
 
-
 
4007
(*
-
 
4008
 * Send overlay to back
-
 
4009
 *)
1952
  DDOVERZ_SENDTOBACK      = $00000001;
4010
  DDOVERZ_SENDTOBACK              = $00000001;
1953
  DDOVERZ_MOVEFORWARD     = $00000002;
-
 
1954
  DDOVERZ_MOVEBACKWARD    = $00000003;
-
 
1955
  DDOVERZ_INSERTINFRONTOF = $00000004;
-
 
1956
  DDOVERZ_INSERTINBACKOF  = $00000005;
-
 
1957
 
4011
 
-
 
4012
(*
-
 
4013
 * Move Overlay forward
-
 
4014
 *)
1958
{ DirectDrawSurface SetPrivateData Constants }
4015
  DDOVERZ_MOVEFORWARD             = $00000002;
1959
 
4016
 
-
 
4017
(*
1960
  DDSPD_IUNKNOWNPOINTER   = $00000001;
4018
 * Move Overlay backward
-
 
4019
 *)
1961
  DDSPD_VOLATILE          = $00000002;
4020
  DDOVERZ_MOVEBACKWARD            = $00000003;
1962
 
4021
 
-
 
4022
(*
1963
{ TDDColorControl flags }
4023
 * Move Overlay in front of relative surface
-
 
4024
 *)
-
 
4025
  DDOVERZ_INSERTINFRONTOF         = $00000004;
1964
 
4026
 
1965
  DDCOLOR_BRIGHTNESS    = $00000001;
-
 
1966
  DDCOLOR_CONTRAST      = $00000002;
-
 
-
 
4027
(*
1967
  DDCOLOR_HUE           = $00000004;
4028
 * Move Overlay in back of relative surface
1968
  DDCOLOR_SATURATION    = $00000008;
-
 
1969
  DDCOLOR_SHARPNESS     = $00000010;
-
 
-
 
4029
 *)
1970
  DDCOLOR_GAMMA         = $00000020;
4030
  DDOVERZ_INSERTINBACKOF          = $00000005;
1971
  DDCOLOR_COLORENABLE   = $00000040;
-
 
1972
 
4031
 
-
 
4032
(****************************************************************************
-
 
4033
 *
1973
{ DirectDraw SetGammaRamp Flags }
4034
 * DIRECTDRAW SETGAMMARAMP FLAGS
-
 
4035
 *
-
 
4036
 ****************************************************************************)
1974
 
4037
 
-
 
4038
(*
-
 
4039
 * Request calibrator to adjust the gamma ramp according to the physical
-
 
4040
 * properties of the display so that the result should appear identical
-
 
4041
 * on all systems.
-
 
4042
 *)
1975
  DDSGR_CALIBRATE = $00000001;
4043
  DDSGR_CALIBRATE                        = $00000001;
1976
 
4044
 
-
 
4045
(****************************************************************************
-
 
4046
 *
1977
{ DirectDraw StartModeTest Flags }
4047
 * DIRECTDRAW STARTMODETEST FLAGS
-
 
4048
 *
-
 
4049
 ****************************************************************************)
1978
 
4050
 
-
 
4051
(*
-
 
4052
 * Indicates that the mode being tested has passed
-
 
4053
 *)
1979
  DDSMT_ISTESTREQUIRED = $00000001;
4054
 DDSMT_ISTESTREQUIRED                   = $00000001;
1980
 
4055
 
1981
{ DirectDraw EvaluateMode Flags  }
-
 
1982
 
4056
 
-
 
4057
(****************************************************************************
-
 
4058
 *
-
 
4059
 * DIRECTDRAW EVALUATEMODE FLAGS
-
 
4060
 *
-
 
4061
 ****************************************************************************)
-
 
4062
 
-
 
4063
(*
-
 
4064
 * Indicates that the mode being tested has passed
-
 
4065
 *)
1983
  DDEM_MODEPASSED      = $00000001;
4066
 DDEM_MODEPASSED                        = $00000001;
-
 
4067
 
-
 
4068
(*
-
 
4069
 * Indicates that the mode being tested has failed
-
 
4070
 *)
1984
  DDEM_MODEFAILED      = $00000002;
4071
 DDEM_MODEFAILED                        = $00000002;
1985
 
4072
 
-
 
4073
(*===========================================================================
-
 
4074
 *
-
 
4075
 *
1986
{ DirectDraw Return Codes }
4076
 * DIRECTDRAW RETURN CODES
-
 
4077
 *
-
 
4078
 * The return values from DirectDraw Commands and Surface that return an HResult
-
 
4079
 * are codes from DirectDraw concerning the results of the action
-
 
4080
 * requested by DirectDraw.
-
 
4081
 *
-
 
4082
 *==========================================================================*)
1987
 
4083
 
-
 
4084
(*
-
 
4085
 * Status is OK
-
 
4086
 *
-
 
4087
 * Issued by: DirectDraw Commands and all callbacks
-
 
4088
 *)
1988
  DD_OK                                   = HResult(0);
4089
  DD_OK                                   = 0;
1989
  DD_FALSE                                = HResult(S_FALSE);
4090
  DD_FALSE                                = S_FALSE;
1990
 
4091
 
-
 
4092
(****************************************************************************
-
 
4093
 *
-
 
4094
 * DIRECTDRAW ENUMCALLBACK RETURN VALUES
-
 
4095
 *
-
 
4096
 * EnumCallback returns are used to control the flow of the DIRECTDRAW and
-
 
4097
 * DIRECTDRAWSURFACE object enumerations.   They can only be returned by
1991
{ DirectDraw EnumCallback Return Values }
4098
 * enumeration callback routines.
-
 
4099
 *
-
 
4100
 ****************************************************************************)
1992
 
4101
 
-
 
4102
(*
-
 
4103
 * stop the enumeration
-
 
4104
 *)
1993
  DDENUMRET_CANCEL = 0;
4105
  DDENUMRET_CANCEL                        = 0;
-
 
4106
 
-
 
4107
(*
-
 
4108
 * continue the enumeration
-
 
4109
 *)
1994
  DDENUMRET_OK     = 1;
4110
  DDENUMRET_OK                            = 1;
1995
 
4111
 
-
 
4112
(****************************************************************************
-
 
4113
 *
1996
{ DirectDraw Error Codes }
4114
 * DIRECTDRAW ERRORS
-
 
4115
 *
-
 
4116
 * Errors are represented by negative values and cannot be combined.
-
 
4117
 *
-
 
4118
 ****************************************************************************)
1997
 
4119
 
1998
  DDERR_ALREADYINITIALIZED                = HResult($88760000 + 5);
-
 
1999
  DDERR_CANNOTATTACHSURFACE               = HResult($88760000 + 10);
-
 
2000
  DDERR_CANNOTDETACHSURFACE               = HResult($88760000 + 20);
-
 
2001
  DDERR_CURRENTLYNOTAVAIL                 = HResult($88760000 + 40);
-
 
2002
  DDERR_EXCEPTION                         = HResult($88760000 + 55);
-
 
2003
  DDERR_GENERIC                           = HResult(E_FAIL);
-
 
2004
  DDERR_HEIGHTALIGN                       = HResult($88760000 + 90);
-
 
2005
  DDERR_INCOMPATIBLEPRIMARY               = HResult($88760000 + 95);
-
 
2006
  DDERR_INVALIDCAPS                       = HResult($88760000 + 100);
-
 
2007
  DDERR_INVALIDCLIPLIST                   = HResult($88760000 + 110);
-
 
2008
  DDERR_INVALIDMODE                       = HResult($88760000 + 120);
-
 
2009
  DDERR_INVALIDOBJECT                     = HResult($88760000 + 130);
-
 
2010
  DDERR_INVALIDPARAMS                     = HResult(E_INVALIDARG);
-
 
2011
  DDERR_INVALIDPIXELFORMAT                = HResult($88760000 + 145);
-
 
2012
  DDERR_INVALIDRECT                       = HResult($88760000 + 150);
-
 
2013
  DDERR_LOCKEDSURFACES                    = HResult($88760000 + 160);
-
 
2014
  DDERR_NO3D                              = HResult($88760000 + 170);
-
 
2015
  DDERR_NOALPHAHW                         = HResult($88760000 + 180);
-
 
2016
  DDERR_NOSTEREOHARDWARE                  = HResult($88760000 + 181);
-
 
2017
  DDERR_NOSURFACELEFT                     = HResult($88760000 + 182);
-
 
2018
  DDERR_NOCLIPLIST                        = HResult($88760000 + 205);
-
 
2019
  DDERR_NOCOLORCONVHW                     = HResult($88760000 + 210);
-
 
2020
  DDERR_NOCOOPERATIVELEVELSET             = HResult($88760000 + 212);
-
 
2021
  DDERR_NOCOLORKEY                        = HResult($88760000 + 215);
-
 
2022
  DDERR_NOCOLORKEYHW                      = HResult($88760000 + 220);
-
 
2023
  DDERR_NODIRECTDRAWSUPPORT               = HResult($88760000 + 222);
-
 
2024
  DDERR_NOEXCLUSIVEMODE                   = HResult($88760000 + 225);
-
 
2025
  DDERR_NOFLIPHW                          = HResult($88760000 + 230);
-
 
2026
  DDERR_NOGDI                             = HResult($88760000 + 240);
-
 
2027
  DDERR_NOMIRRORHW                        = HResult($88760000 + 250);
-
 
2028
  DDERR_NOTFOUND                          = HResult($88760000 + 255);
-
 
2029
  DDERR_NOOVERLAYHW                       = HResult($88760000 + 260);
-
 
2030
  DDERR_OVERLAPPINGRECTS                  = HResult($88760000 + 270);
-
 
2031
  DDERR_NORASTEROPHW                      = HResult($88760000 + 280);
-
 
2032
  DDERR_NOROTATIONHW                      = HResult($88760000 + 290);
-
 
2033
  DDERR_NOSTRETCHHW                       = HResult($88760000 + 310);
-
 
2034
  DDERR_NOT4BITCOLOR                      = HResult($88760000 + 316);
-
 
2035
  DDERR_NOT4BITCOLORINDEX                 = HResult($88760000 + 317);
-
 
2036
  DDERR_NOT8BITCOLOR                      = HResult($88760000 + 320);
-
 
2037
  DDERR_NOTEXTUREHW                       = HResult($88760000 + 330);
-
 
2038
  DDERR_NOVSYNCHW                         = HResult($88760000 + 335);
-
 
2039
  DDERR_NOZBUFFERHW                       = HResult($88760000 + 340);
-
 
2040
  DDERR_NOZOVERLAYHW                      = HResult($88760000 + 350);
-
 
2041
  DDERR_OUTOFCAPS                         = HResult($88760000 + 360);
-
 
2042
  DDERR_OUTOFMEMORY                       = HResult(E_OUTOFMEMORY);
-
 
2043
  DDERR_OUTOFVIDEOMEMORY                  = HResult($88760000 + 380);
-
 
2044
  DDERR_OVERLAYCANTCLIP                   = HResult($88760000 + 382);
-
 
2045
  DDERR_OVERLAYCOLORKEYONLYONEACTIVE      = HResult($88760000 + 384);
-
 
2046
  DDERR_PALETTEBUSY                       = HResult($88760000 + 387);
-
 
2047
  DDERR_COLORKEYNOTSET                    = HResult($88760000 + 400);
-
 
2048
  DDERR_SURFACEALREADYATTACHED            = HResult($88760000 + 410);
-
 
2049
  DDERR_SURFACEALREADYDEPENDENT           = HResult($88760000 + 420);
4120
  _FACDD = $876;
2050
  DDERR_SURFACEBUSY                       = HResult($88760000 + 430);
-
 
2051
  DDERR_CANTLOCKSURFACE                   = HResult($88760000 + 435);
-
 
2052
  DDERR_SURFACEISOBSCURED                 = HResult($88760000 + 440);
-
 
2053
  DDERR_SURFACELOST                       = HResult($88760000 + 450);
-
 
2054
  DDERR_SURFACENOTATTACHED                = HResult($88760000 + 460);
-
 
2055
  DDERR_TOOBIGHEIGHT                      = HResult($88760000 + 470);
-
 
2056
  DDERR_TOOBIGSIZE                        = HResult($88760000 + 480);
-
 
2057
  DDERR_TOOBIGWIDTH                       = HResult($88760000 + 490);
-
 
2058
  DDERR_UNSUPPORTED                       = HResult(E_NOTIMPL);
-
 
2059
  DDERR_UNSUPPORTEDFORMAT                 = HResult($88760000 + 510);
-
 
2060
  DDERR_UNSUPPORTEDMASK                   = HResult($88760000 + 520);
-
 
2061
  DDERR_INVALIDSTREAM                     = HResult($88760000 + 521);
-
 
2062
  DDERR_VERTICALBLANKINPROGRESS           = HResult($88760000 + 537);
-
 
2063
  DDERR_WASSTILLDRAWING                   = HResult($88760000 + 540);
-
 
2064
  DDERR_DDSCAPSCOMPLEXREQUIRED            = HResult($88760000 + 542);
-
 
2065
  DDERR_XALIGN                            = HResult($88760000 + 560);
-
 
2066
  DDERR_INVALIDDIRECTDRAWGUID             = HResult($88760000 + 561);
-
 
2067
  DDERR_DIRECTDRAWALREADYCREATED          = HResult($88760000 + 562);
-
 
2068
  DDERR_NODIRECTDRAWHW                    = HResult($88760000 + 563);
-
 
2069
  DDERR_PRIMARYSURFACEALREADYEXISTS       = HResult($88760000 + 564);
-
 
2070
  DDERR_NOEMULATION                       = HResult($88760000 + 565);
-
 
2071
  DDERR_REGIONTOOSMALL                    = HResult($88760000 + 566);
-
 
2072
  DDERR_CLIPPERISUSINGHWND                = HResult($88760000 + 567);
-
 
2073
  DDERR_NOCLIPPERATTACHED                 = HResult($88760000 + 568);
-
 
2074
  DDERR_NOHWND                            = HResult($88760000 + 569);
-
 
2075
  DDERR_HWNDSUBCLASSED                    = HResult($88760000 + 570);
-
 
2076
  DDERR_HWNDALREADYSET                    = HResult($88760000 + 571);
-
 
2077
  DDERR_NOPALETTEATTACHED                 = HResult($88760000 + 572);
-
 
2078
  DDERR_NOPALETTEHW                       = HResult($88760000 + 573);
-
 
2079
  DDERR_BLTFASTCANTCLIP                   = HResult($88760000 + 574);
-
 
2080
  DDERR_NOBLTHW                           = HResult($88760000 + 575);
-
 
2081
  DDERR_NODDROPSHW                        = HResult($88760000 + 576);
4121
  MAKE_DDHRESULT = HResult(1 shl 31) or HResult(_FACDD shl 16);
2082
  DDERR_OVERLAYNOTVISIBLE                 = HResult($88760000 + 577);
-
 
2083
  DDERR_NOOVERLAYDEST                     = HResult($88760000 + 578);
-
 
2084
  DDERR_INVALIDPOSITION                   = HResult($88760000 + 579);
-
 
2085
  DDERR_NOTAOVERLAYSURFACE                = HResult($88760000 + 580);
-
 
2086
  DDERR_EXCLUSIVEMODEALREADYSET           = HResult($88760000 + 581);
-
 
2087
  DDERR_NOTFLIPPABLE                      = HResult($88760000 + 582);
-
 
2088
  DDERR_CANTDUPLICATE                     = HResult($88760000 + 583);
-
 
2089
  DDERR_NOTLOCKED                         = HResult($88760000 + 584);
-
 
2090
  DDERR_CANTCREATEDC                      = HResult($88760000 + 585);
-
 
2091
  DDERR_NODC                              = HResult($88760000 + 586);
-
 
2092
  DDERR_WRONGMODE                         = HResult($88760000 + 587);
-
 
2093
  DDERR_IMPLICITLYCREATED                 = HResult($88760000 + 588);
-
 
2094
  DDERR_NOTPALETTIZED                     = HResult($88760000 + 589);
-
 
2095
  DDERR_UNSUPPORTEDMODE                   = HResult($88760000 + 590);
-
 
2096
  DDERR_NOMIPMAPHW                        = HResult($88760000 + 591);
-
 
2097
  DDERR_INVALIDSURFACETYPE                = HResult($88760000 + 592);
-
 
2098
  DDERR_NOOPTIMIZEHW                      = HResult($88760000 + 600);
-
 
2099
  DDERR_NOTLOADED                         = HResult($88760000 + 601);
-
 
2100
  DDERR_NOFOCUSWINDOW                     = HResult($88760000 + 602);
-
 
2101
  DDERR_NOTONMIPMAPSUBLEVEL               = HResult($88760000 + 603);
-
 
2102
  DDERR_DCALREADYCREATED                  = HResult($88760000 + 620);
-
 
2103
  DDERR_NONONLOCALVIDMEM                  = HResult($88760000 + 630);
-
 
2104
  DDERR_CANTPAGELOCK                      = HResult($88760000 + 640);
-
 
2105
  DDERR_CANTPAGEUNLOCK                    = HResult($88760000 + 660);
-
 
2106
  DDERR_NOTPAGELOCKED                     = HResult($88760000 + 680);
-
 
2107
  DDERR_MOREDATA                          = HResult($88760000 + 690);
-
 
2108
  DDERR_EXPIRED                           = HResult($88760000 + 691);
-
 
2109
  DDERR_TESTFINISHED                      = HResult($88760000 + 692);
-
 
2110
  DDERR_NEWMODE                           = HResult($88760000 + 693);
-
 
2111
  DDERR_D3DNOTINITIALIZED                 = HResult($88760000 + 694);
-
 
2112
  DDERR_VIDEONOTACTIVE                    = HResult($88760000 + 695);
-
 
2113
  DDERR_NOMONITORINFORMATION              = HResult($88760000 + 696);
-
 
2114
  DDERR_NODRIVERSUPPORT                   = HResult($88760000 + 697);
-
 
2115
  DDERR_DEVICEDOESNTOWNSURFACE            = HResult($88760000 + 699);
-
 
2116
  DDERR_NOTINITIALIZED                    = HResult(CO_E_NOTINITIALIZED);
-
 
2117
 
4122
 
2118
{ API's }
-
 
2119
 
4123
 
-
 
4124
(*
-
 
4125
 * This object is already initialized
-
 
4126
 *)
-
 
4127
  DDERR_ALREADYINITIALIZED                = MAKE_DDHRESULT + 5;
-
 
4128
 
-
 
4129
(*
-
 
4130
 * This surface can not be attached to the requested surface.
-
 
4131
 *)
-
 
4132
  DDERR_CANNOTATTACHSURFACE               = MAKE_DDHRESULT + 10;
-
 
4133
 
-
 
4134
(*
-
 
4135
 * This surface can not be detached from the requested surface.
-
 
4136
 *)
-
 
4137
  DDERR_CANNOTDETACHSURFACE               = MAKE_DDHRESULT + 20;
-
 
4138
 
-
 
4139
(*
-
 
4140
 * Support is currently not available.
-
 
4141
 *)
-
 
4142
  DDERR_CURRENTLYNOTAVAIL                 = MAKE_DDHRESULT + 40;
-
 
4143
 
-
 
4144
(*
-
 
4145
 * An exception was encountered while performing the requested operation
-
 
4146
 *)
-
 
4147
  DDERR_EXCEPTION                         = MAKE_DDHRESULT + 55;
-
 
4148
 
-
 
4149
(*
-
 
4150
 * Generic failure.
-
 
4151
 *)
2120
function GET_WHQL_YEAR(dwWHQLLevel: DWORD): DWORD;
4152
  DDERR_GENERIC                           = E_FAIL;
-
 
4153
 
-
 
4154
(*
-
 
4155
 * Height of rectangle provided is not a multiple of reqd alignment
-
 
4156
 *)
-
 
4157
  DDERR_HEIGHTALIGN                       = MAKE_DDHRESULT + 90;
-
 
4158
 
-
 
4159
(*
-
 
4160
 * Unable to match primary surface creation request with existing
-
 
4161
 * primary surface.
-
 
4162
 *)
-
 
4163
  DDERR_INCOMPATIBLEPRIMARY               = MAKE_DDHRESULT + 95;
-
 
4164
 
-
 
4165
(*
-
 
4166
 * One or more of the caps bits passed to the callback are incorrect.
-
 
4167
 *)
-
 
4168
  DDERR_INVALIDCAPS                       = MAKE_DDHRESULT + 100;
-
 
4169
 
-
 
4170
(*
-
 
4171
 * DirectDraw does not support provided Cliplist.
-
 
4172
 *)
-
 
4173
  DDERR_INVALIDCLIPLIST                   = MAKE_DDHRESULT + 110;
-
 
4174
 
-
 
4175
(*
-
 
4176
 * DirectDraw does not support the requested mode
-
 
4177
 *)
-
 
4178
  DDERR_INVALIDMODE                       = MAKE_DDHRESULT + 120;
-
 
4179
 
-
 
4180
(*
-
 
4181
 * DirectDraw received a pointer that was an invalid DIRECTDRAW object.
-
 
4182
 *)
-
 
4183
  DDERR_INVALIDOBJECT                     = MAKE_DDHRESULT + 130;
-
 
4184
 
-
 
4185
(*
-
 
4186
 * One or more of the parameters passed to the callback function are
-
 
4187
 * incorrect.
-
 
4188
 *)
-
 
4189
  DDERR_INVALIDPARAMS                     = E_INVALIDARG;
-
 
4190
 
-
 
4191
(*
-
 
4192
 * pixel format was invalid as specified
-
 
4193
 *)
-
 
4194
  DDERR_INVALIDPIXELFORMAT                = MAKE_DDHRESULT + 145;
-
 
4195
 
-
 
4196
(*
-
 
4197
 * Rectangle provided was invalid.
-
 
4198
 *)
-
 
4199
  DDERR_INVALIDRECT                       = MAKE_DDHRESULT + 150;
-
 
4200
 
-
 
4201
(*
-
 
4202
 * Operation could not be carried out because one or more surfaces are locked
-
 
4203
 *)
-
 
4204
  DDERR_LOCKEDSURFACES                    = MAKE_DDHRESULT + 160;
-
 
4205
 
-
 
4206
(*
-
 
4207
 * There is no 3D present.
-
 
4208
 *)
-
 
4209
  DDERR_NO3D                              = MAKE_DDHRESULT + 170;
-
 
4210
 
-
 
4211
(*
-
 
4212
 * Operation could not be carried out because there is no alpha accleration
-
 
4213
 * hardware present or available.
-
 
4214
 *)
-
 
4215
  DDERR_NOALPHAHW                         = MAKE_DDHRESULT + 180;
-
 
4216
 
-
 
4217
(*
-
 
4218
 * Operation could not be carried out because there is no stereo
-
 
4219
 * hardware present or available.
-
 
4220
 *)
-
 
4221
  DDERR_NOSTEREOHARDWARE          = MAKE_DDHRESULT + 181;
-
 
4222
 
-
 
4223
(*
-
 
4224
 * Operation could not be carried out because there is no hardware
-
 
4225
 * present which supports stereo surfaces
-
 
4226
 *)
-
 
4227
  DDERR_NOSURFACELEFT             = MAKE_DDHRESULT + 182;
-
 
4228
 
-
 
4229
(*
-
 
4230
 * no clip list available
-
 
4231
 *)
-
 
4232
  DDERR_NOCLIPLIST                        = MAKE_DDHRESULT + 205;
-
 
4233
 
-
 
4234
(*
-
 
4235
 * Operation could not be carried out because there is no color conversion
-
 
4236
 * hardware present or available.
-
 
4237
 *)
-
 
4238
  DDERR_NOCOLORCONVHW                     = MAKE_DDHRESULT + 210;
-
 
4239
 
-
 
4240
(*
-
 
4241
 * Create function called without DirectDraw object method SetCooperativeLevel
-
 
4242
 * being called.
-
 
4243
 *)
-
 
4244
  DDERR_NOCOOPERATIVELEVELSET             = MAKE_DDHRESULT + 212;
-
 
4245
 
-
 
4246
(*
-
 
4247
 * Surface doesn't currently have a color key
-
 
4248
 *)
-
 
4249
  DDERR_NOCOLORKEY                        = MAKE_DDHRESULT + 215;
-
 
4250
 
-
 
4251
(*
-
 
4252
 * Operation could not be carried out because there is no hardware support
-
 
4253
 * of the dest color key.
-
 
4254
 *)
-
 
4255
  DDERR_NOCOLORKEYHW                      = MAKE_DDHRESULT + 220;
-
 
4256
 
-
 
4257
(*
-
 
4258
 * No DirectDraw support possible with current display driver
-
 
4259
 *)
-
 
4260
  DDERR_NODIRECTDRAWSUPPORT               = MAKE_DDHRESULT + 222;
-
 
4261
 
-
 
4262
(*
-
 
4263
 * Operation requires the application to have exclusive mode but the
-
 
4264
 * application does not have exclusive mode.
-
 
4265
 *)
-
 
4266
  DDERR_NOEXCLUSIVEMODE                   = MAKE_DDHRESULT + 225;
-
 
4267
 
-
 
4268
(*
-
 
4269
 * Flipping visible surfaces is not supported.
-
 
4270
 *)
-
 
4271
  DDERR_NOFLIPHW                          = MAKE_DDHRESULT + 230;
-
 
4272
 
-
 
4273
(*
-
 
4274
 * There is no GDI present.
-
 
4275
 *)
-
 
4276
  DDERR_NOGDI                             = MAKE_DDHRESULT + 240;
-
 
4277
 
-
 
4278
(*
-
 
4279
 * Operation could not be carried out because there is no hardware present
-
 
4280
 * or available.
-
 
4281
 *)
-
 
4282
  DDERR_NOMIRRORHW                        = MAKE_DDHRESULT + 250;
-
 
4283
 
-
 
4284
(*
-
 
4285
 * Requested item was not found
-
 
4286
 *)
-
 
4287
  DDERR_NOTFOUND                          = MAKE_DDHRESULT + 255;
-
 
4288
 
-
 
4289
(*
-
 
4290
 * Operation could not be carried out because there is no overlay hardware
-
 
4291
 * present or available.
-
 
4292
 *)
-
 
4293
  DDERR_NOOVERLAYHW                       = MAKE_DDHRESULT + 260;
-
 
4294
 
-
 
4295
(*
-
 
4296
 * Operation could not be carried out because the source and destination
-
 
4297
 * rectangles are on the same surface and overlap each other.
-
 
4298
 *)
-
 
4299
  DDERR_OVERLAPPINGRECTS                = MAKE_DDHRESULT + 270;
-
 
4300
 
-
 
4301
(*
-
 
4302
 * Operation could not be carried out because there is no appropriate raster
-
 
4303
 * op hardware present or available.
-
 
4304
 *)
-
 
4305
  DDERR_NORASTEROPHW                      = MAKE_DDHRESULT + 280;
-
 
4306
 
-
 
4307
(*
-
 
4308
 * Operation could not be carried out because there is no rotation hardware
-
 
4309
 * present or available.
-
 
4310
 *)
-
 
4311
  DDERR_NOROTATIONHW                      = MAKE_DDHRESULT + 290;
-
 
4312
 
-
 
4313
(*
-
 
4314
 * Operation could not be carried out because there is no hardware support
-
 
4315
 * for stretching
-
 
4316
 *)
-
 
4317
  DDERR_NOSTRETCHHW                       = MAKE_DDHRESULT + 310;
-
 
4318
 
-
 
4319
(*
-
 
4320
 * DirectDrawSurface is not in 4 bit color palette and the requested operation
-
 
4321
 * requires 4 bit color palette.
-
 
4322
 *)
-
 
4323
  DDERR_NOT4BITCOLOR                      = MAKE_DDHRESULT + 316;
-
 
4324
 
-
 
4325
(*
-
 
4326
 * DirectDrawSurface is not in 4 bit color index palette and the requested
-
 
4327
 * operation requires 4 bit color index palette.
-
 
4328
 *)
-
 
4329
  DDERR_NOT4BITCOLORINDEX                 = MAKE_DDHRESULT + 317;
-
 
4330
 
-
 
4331
(*
-
 
4332
 * DirectDraw Surface is not in 8 bit color mode and the requested operation
-
 
4333
 * requires 8 bit color.
-
 
4334
 *)
-
 
4335
  DDERR_NOT8BITCOLOR                      = MAKE_DDHRESULT + 320;
-
 
4336
 
-
 
4337
(*
-
 
4338
 * Operation could not be carried out because there is no texture mapping
-
 
4339
 * hardware present or available.
-
 
4340
 *)
-
 
4341
  DDERR_NOTEXTUREHW                       = MAKE_DDHRESULT + 330;
-
 
4342
 
-
 
4343
(*
-
 
4344
 * Operation could not be carried out because there is no hardware support
-
 
4345
 * for vertical blank synchronized operations.
-
 
4346
 *)
-
 
4347
  DDERR_NOVSYNCHW                         = MAKE_DDHRESULT + 335;
-
 
4348
 
-
 
4349
(*
-
 
4350
 * Operation could not be carried out because there is no hardware support
-
 
4351
 * for zbuffer blting.
-
 
4352
 *)
-
 
4353
  DDERR_NOZBUFFERHW                       = MAKE_DDHRESULT + 340;
-
 
4354
 
-
 
4355
(*
-
 
4356
 * Overlay surfaces could not be z layered based on their BltOrder because
-
 
4357
 * the hardware does not support z layering of overlays.
-
 
4358
 *)
-
 
4359
  DDERR_NOZOVERLAYHW                      = MAKE_DDHRESULT + 350;
-
 
4360
 
-
 
4361
(*
-
 
4362
 * The hardware needed for the requested operation has already been
-
 
4363
 * allocated.
-
 
4364
 *)
-
 
4365
  DDERR_OUTOFCAPS                         = MAKE_DDHRESULT + 360;
-
 
4366
 
-
 
4367
(*
-
 
4368
 * DirectDraw does not have enough memory to perform the operation.
-
 
4369
 *)
-
 
4370
  DDERR_OUTOFMEMORY                       = E_OUTOFMEMORY;
-
 
4371
 
-
 
4372
(*
-
 
4373
 * DirectDraw does not have enough memory to perform the operation.
-
 
4374
 *)
-
 
4375
  DDERR_OUTOFVIDEOMEMORY                  = MAKE_DDHRESULT + 380;
-
 
4376
 
-
 
4377
(*
-
 
4378
 * hardware does not support clipped overlays
-
 
4379
 *)
-
 
4380
  DDERR_OVERLAYCANTCLIP                   = MAKE_DDHRESULT + 382;
-
 
4381
 
-
 
4382
(*
-
 
4383
 * Can only have ony color key active at one time for overlays
-
 
4384
 *)
-
 
4385
  DDERR_OVERLAYCOLORKEYONLYONEACTIVE      = MAKE_DDHRESULT + 384;
-
 
4386
 
-
 
4387
(*
-
 
4388
 * Access to this palette is being refused because the palette is already
-
 
4389
 * locked by another thread.
-
 
4390
 *)
-
 
4391
  DDERR_PALETTEBUSY                       = MAKE_DDHRESULT + 387;
-
 
4392
 
-
 
4393
(*
-
 
4394
 * No src color key specified for this operation.
-
 
4395
 *)
-
 
4396
  DDERR_COLORKEYNOTSET                    = MAKE_DDHRESULT + 400;
-
 
4397
 
-
 
4398
(*
-
 
4399
 * This surface is already attached to the surface it is being attached to.
-
 
4400
 *)
-
 
4401
  DDERR_SURFACEALREADYATTACHED            = MAKE_DDHRESULT + 410;
-
 
4402
 
-
 
4403
(*
-
 
4404
 * This surface is already a dependency of the surface it is being made a
-
 
4405
 * dependency of.
-
 
4406
 *)
-
 
4407
  DDERR_SURFACEALREADYDEPENDENT           = MAKE_DDHRESULT + 420;
-
 
4408
 
-
 
4409
(*
-
 
4410
 * Access to this surface is being refused because the surface is already
-
 
4411
 * locked by another thread.
-
 
4412
 *)
-
 
4413
  DDERR_SURFACEBUSY                       = MAKE_DDHRESULT + 430;
-
 
4414
 
-
 
4415
(*
-
 
4416
 * Access to this surface is being refused because no driver exists
-
 
4417
 * which can supply a pointer to the surface.
-
 
4418
 * This is most likely to happen when attempting to lock the primary
-
 
4419
 * surface when no DCI provider is present.
-
 
4420
 * Will also happen on attempts to lock an optimized surface.
-
 
4421
 *)
-
 
4422
  DDERR_CANTLOCKSURFACE                   = MAKE_DDHRESULT + 435;
-
 
4423
 
-
 
4424
(*
-
 
4425
 * Access to Surface refused because Surface is obscured.
-
 
4426
 *)
-
 
4427
  DDERR_SURFACEISOBSCURED                 = MAKE_DDHRESULT + 440;
-
 
4428
 
-
 
4429
(*
-
 
4430
 * Access to this surface is being refused because the surface is gone.
-
 
4431
 * The DIRECTDRAWSURFACE object representing this surface should
-
 
4432
 * have Restore called on it.
-
 
4433
 *)
-
 
4434
  DDERR_SURFACELOST                       = MAKE_DDHRESULT + 450;
-
 
4435
 
-
 
4436
(*
-
 
4437
 * The requested surface is not attached.
-
 
4438
 *)
-
 
4439
  DDERR_SURFACENOTATTACHED                = MAKE_DDHRESULT + 460;
-
 
4440
 
-
 
4441
(*
-
 
4442
 * Height requested by DirectDraw is too large.
-
 
4443
 *)
-
 
4444
  DDERR_TOOBIGHEIGHT                      = MAKE_DDHRESULT + 470;
-
 
4445
 
-
 
4446
(*
-
 
4447
 * Size requested by DirectDraw is too large --  The individual height and
-
 
4448
 * width are OK.
-
 
4449
 *)
-
 
4450
  DDERR_TOOBIGSIZE                        = MAKE_DDHRESULT + 480;
-
 
4451
 
-
 
4452
(*
-
 
4453
 * Width requested by DirectDraw is too large.
-
 
4454
 *)
-
 
4455
  DDERR_TOOBIGWIDTH                       = MAKE_DDHRESULT + 490;
-
 
4456
 
-
 
4457
(*
-
 
4458
 * Action not supported.
-
 
4459
 *)
-
 
4460
  DDERR_UNSUPPORTED                       = E_NOTIMPL;
-
 
4461
 
-
 
4462
(*
-
 
4463
 * FOURCC format requested is unsupported by DirectDraw
-
 
4464
 *)
-
 
4465
  DDERR_UNSUPPORTEDFORMAT                 = MAKE_DDHRESULT + 510;
-
 
4466
 
-
 
4467
(*
-
 
4468
 * Bitmask in the pixel format requested is unsupported by DirectDraw
-
 
4469
 *)
-
 
4470
  DDERR_UNSUPPORTEDMASK                   = MAKE_DDHRESULT + 520;
-
 
4471
 
-
 
4472
(*
-
 
4473
 * The specified stream contains invalid data
-
 
4474
 *)
-
 
4475
  DDERR_INVALIDSTREAM                     = MAKE_DDHRESULT + 521;
-
 
4476
 
-
 
4477
(*
-
 
4478
 * vertical blank is in progress
-
 
4479
 *)
-
 
4480
  DDERR_VERTICALBLANKINPROGRESS           = MAKE_DDHRESULT + 537;
-
 
4481
 
-
 
4482
(*
-
 
4483
 * Informs DirectDraw that the previous Blt which is transfering information
-
 
4484
 * to or from this Surface is incomplete.
-
 
4485
 *)
-
 
4486
  DDERR_WASSTILLDRAWING                   = MAKE_DDHRESULT + 540;
-
 
4487
 
-
 
4488
(*
-
 
4489
 * The specified surface type requires specification of the COMPLEX flag
-
 
4490
 *)
-
 
4491
  DDERR_DDSCAPSCOMPLEXREQUIRED            = MAKE_DDHRESULT + 542;
-
 
4492
 
-
 
4493
(*
-
 
4494
 * Rectangle provided was not horizontally aligned on reqd. boundary
-
 
4495
 *)
-
 
4496
  DDERR_XALIGN                            = MAKE_DDHRESULT + 560;
-
 
4497
 
-
 
4498
(*
-
 
4499
 * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver
-
 
4500
 * identifier.
-
 
4501
 *)
-
 
4502
  DDERR_INVALIDDIRECTDRAWGUID             = MAKE_DDHRESULT + 561;
-
 
4503
 
-
 
4504
(*
-
 
4505
 * A DirectDraw object representing this driver has already been created
-
 
4506
 * for this process.
-
 
4507
 *)
-
 
4508
  DDERR_DIRECTDRAWALREADYCREATED          = MAKE_DDHRESULT + 562;
-
 
4509
 
-
 
4510
(*
-
 
4511
 * A hardware only DirectDraw object creation was attempted but the driver
-
 
4512
 * did not support any hardware.
-
 
4513
 *)
-
 
4514
  DDERR_NODIRECTDRAWHW                    = MAKE_DDHRESULT + 563;
-
 
4515
 
-
 
4516
(*
2121
function GET_WHQL_MONTH(dwWHQLLevel: DWORD): DWORD;
4517
 * this process already has created a primary surface
-
 
4518
 *)
-
 
4519
  DDERR_PRIMARYSURFACEALREADYEXISTS       = MAKE_DDHRESULT + 564;
-
 
4520
 
-
 
4521
(*
-
 
4522
 * software emulation not available.
-
 
4523
 *)
-
 
4524
  DDERR_NOEMULATION                       = MAKE_DDHRESULT + 565;
-
 
4525
 
-
 
4526
(*
2122
function GET_WHQL_DAY(dwWHQLLevel: DWORD): DWORD;
4527
 * region passed to Clipper::GetClipList is too small.
-
 
4528
 *)
-
 
4529
  DDERR_REGIONTOOSMALL                    = MAKE_DDHRESULT + 566;
-
 
4530
 
-
 
4531
(*
-
 
4532
 * an attempt was made to set a clip list for a clipper objec that
-
 
4533
 * is already monitoring an hwnd.
-
 
4534
 *)
-
 
4535
  DDERR_CLIPPERISUSINGHWND                = MAKE_DDHRESULT + 567;
-
 
4536
 
-
 
4537
(*
-
 
4538
 * No clipper object attached to surface object
-
 
4539
 *)
-
 
4540
  DDERR_NOCLIPPERATTACHED                 = MAKE_DDHRESULT + 568;
-
 
4541
 
-
 
4542
(*
-
 
4543
 * Clipper notification requires an HWND or
-
 
4544
 * no HWND has previously been set as the CooperativeLevel HWND.
-
 
4545
 *)
-
 
4546
  DDERR_NOHWND                            = MAKE_DDHRESULT + 569;
-
 
4547
 
-
 
4548
(*
-
 
4549
 * HWND used by DirectDraw CooperativeLevel has been subclassed,
-
 
4550
 * this prevents DirectDraw from restoring state.
-
 
4551
 *)
-
 
4552
  DDERR_HWNDSUBCLASSED                    = MAKE_DDHRESULT + 570;
-
 
4553
 
-
 
4554
(*
-
 
4555
 * The CooperativeLevel HWND has already been set.
-
 
4556
 * It can not be reset while the process has surfaces or palettes created.
-
 
4557
 *)
-
 
4558
  DDERR_HWNDALREADYSET                    = MAKE_DDHRESULT + 571;
-
 
4559
 
-
 
4560
(*
-
 
4561
 * No palette object attached to this surface.
-
 
4562
 *)
-
 
4563
  DDERR_NOPALETTEATTACHED                 = MAKE_DDHRESULT + 572;
-
 
4564
 
-
 
4565
(*
-
 
4566
 * No hardware support for 16 or 256 color palettes.
-
 
4567
 *)
-
 
4568
  DDERR_NOPALETTEHW                       = MAKE_DDHRESULT + 573;
-
 
4569
 
-
 
4570
(*
-
 
4571
 * If a clipper object is attached to the source surface passed into a
-
 
4572
 * BltFast call.
-
 
4573
 *)
-
 
4574
  DDERR_BLTFASTCANTCLIP                   = MAKE_DDHRESULT + 574;
-
 
4575
 
-
 
4576
(*
-
 
4577
 * No blter.
-
 
4578
 *)
-
 
4579
  DDERR_NOBLTHW                           = MAKE_DDHRESULT + 575;
-
 
4580
 
-
 
4581
(*
-
 
4582
 * No DirectDraw ROP hardware.
-
 
4583
 *)
-
 
4584
  DDERR_NODDROPSHW                        = MAKE_DDHRESULT + 576;
-
 
4585
 
-
 
4586
(*
-
 
4587
 * returned when GetOverlayPosition is called on a hidden overlay
-
 
4588
 *)
-
 
4589
  DDERR_OVERLAYNOTVISIBLE                 = MAKE_DDHRESULT + 577;
-
 
4590
 
-
 
4591
(*
-
 
4592
 * returned when GetOverlayPosition is called on a overlay that UpdateOverlay
-
 
4593
 * has never been called on to establish a destionation.
-
 
4594
 *)
-
 
4595
  DDERR_NOOVERLAYDEST                     = MAKE_DDHRESULT + 578;
-
 
4596
 
-
 
4597
(*
-
 
4598
 * returned when the position of the overlay on the destionation is no longer
-
 
4599
 * legal for that destionation.
-
 
4600
 *)
-
 
4601
  DDERR_INVALIDPOSITION                   = MAKE_DDHRESULT + 579;
-
 
4602
 
-
 
4603
(*
-
 
4604
 * returned when an overlay member is called for a non-overlay surface
-
 
4605
 *)
-
 
4606
  DDERR_NOTAOVERLAYSURFACE                = MAKE_DDHRESULT + 580;
-
 
4607
 
-
 
4608
(*
-
 
4609
 * An attempt was made to set the cooperative level when it was already
-
 
4610
 * set to exclusive.
-
 
4611
 *)
-
 
4612
  DDERR_EXCLUSIVEMODEALREADYSET           = MAKE_DDHRESULT + 581;
-
 
4613
 
-
 
4614
(*
-
 
4615
 * An attempt has been made to flip a surface that is not flippable.
-
 
4616
 *)
-
 
4617
  DDERR_NOTFLIPPABLE                      = MAKE_DDHRESULT + 582;
-
 
4618
 
-
 
4619
(*
-
 
4620
 * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly
-
 
4621
 * created.
-
 
4622
 *)
-
 
4623
  DDERR_CANTDUPLICATE                     = MAKE_DDHRESULT + 583;
-
 
4624
 
-
 
4625
(*
-
 
4626
 * Surface was not locked.  An attempt to unlock a surface that was not
-
 
4627
 * locked at all, or by this process, has been attempted.
-
 
4628
 *)
-
 
4629
  DDERR_NOTLOCKED                         = MAKE_DDHRESULT + 584;
-
 
4630
 
-
 
4631
(*
-
 
4632
 * Windows can not create any more DCs, or a DC was requested for a paltte-indexed
-
 
4633
 * surface when the surface had no palette AND the display mode was not palette-indexed
-
 
4634
 * (in this case DirectDraw cannot select a proper palette into the DC)
-
 
4635
 *)
-
 
4636
  DDERR_CANTCREATEDC                      = MAKE_DDHRESULT + 585;
-
 
4637
 
-
 
4638
(*
-
 
4639
 * No DC was ever created for this surface.
-
 
4640
 *)
-
 
4641
  DDERR_NODC                              = MAKE_DDHRESULT + 586;
-
 
4642
 
-
 
4643
(*
-
 
4644
 * This surface can not be restored because it was created in a different
-
 
4645
 * mode.
-
 
4646
 *)
-
 
4647
  DDERR_WRONGMODE                         = MAKE_DDHRESULT + 587;
-
 
4648
 
-
 
4649
(*
-
 
4650
 * This surface can not be restored because it is an implicitly created
-
 
4651
 * surface.
-
 
4652
 *)
-
 
4653
  DDERR_IMPLICITLYCREATED                 = MAKE_DDHRESULT + 588;
-
 
4654
 
-
 
4655
(*
-
 
4656
 * The surface being used is not a palette-based surface
-
 
4657
 *)
-
 
4658
  DDERR_NOTPALETTIZED                     = MAKE_DDHRESULT + 589;
-
 
4659
 
-
 
4660
(*
-
 
4661
 * The display is currently in an unsupported mode
-
 
4662
 *)
-
 
4663
  DDERR_UNSUPPORTEDMODE                   = MAKE_DDHRESULT + 590;
-
 
4664
 
-
 
4665
(*
-
 
4666
 * Operation could not be carried out because there is no mip-map
-
 
4667
 * texture mapping hardware present or available.
-
 
4668
 *)
-
 
4669
  DDERR_NOMIPMAPHW                        = MAKE_DDHRESULT + 591;
-
 
4670
 
-
 
4671
(*
-
 
4672
 * The requested action could not be performed because the surface was of
-
 
4673
 * the wrong type.
-
 
4674
 *)
-
 
4675
  DDERR_INVALIDSURFACETYPE                = MAKE_DDHRESULT + 592;
-
 
4676
 
-
 
4677
(*
-
 
4678
 * Device does not support optimized surfaces, therefore no video memory optimized surfaces
-
 
4679
 *)
-
 
4680
  DDERR_NOOPTIMIZEHW                      = MAKE_DDHRESULT + 600;
-
 
4681
 
-
 
4682
(*
-
 
4683
 * Surface is an optimized surface, but has not yet been allocated any memory
-
 
4684
 *)
-
 
4685
  DDERR_NOTLOADED                         = MAKE_DDHRESULT + 601;
-
 
4686
 
-
 
4687
(*
-
 
4688
 * Attempt was made to create or set a device window without first setting
-
 
4689
 * the focus window
-
 
4690
 *)
-
 
4691
  DDERR_NOFOCUSWINDOW                     = MAKE_DDHRESULT + 602;
-
 
4692
 
-
 
4693
(*
-
 
4694
 * Attempt was made to set a palette on a mipmap sublevel
-
 
4695
 *)
-
 
4696
  DDERR_NOTONMIPMAPSUBLEVEL               = MAKE_DDHRESULT + 603;
-
 
4697
 
-
 
4698
(*
-
 
4699
 * A DC has already been returned for this surface. Only one DC can be
-
 
4700
 * retrieved per surface.
-
 
4701
 *)
-
 
4702
  DDERR_DCALREADYCREATED                  = MAKE_DDHRESULT + 620;
-
 
4703
 
-
 
4704
(*
-
 
4705
 * An attempt was made to allocate non-local video memory from a device
-
 
4706
 * that does not support non-local video memory.
-
 
4707
 *)
-
 
4708
  DDERR_NONONLOCALVIDMEM                  = MAKE_DDHRESULT + 630;
-
 
4709
 
-
 
4710
(*
-
 
4711
 * The attempt to page lock a surface failed.
-
 
4712
 *)
-
 
4713
  DDERR_CANTPAGELOCK                      = MAKE_DDHRESULT + 640;
-
 
4714
 
-
 
4715
(*
-
 
4716
 * The attempt to page unlock a surface failed.
-
 
4717
 *)
-
 
4718
  DDERR_CANTPAGEUNLOCK                    = MAKE_DDHRESULT + 660;
-
 
4719
 
-
 
4720
(*
-
 
4721
 * An attempt was made to page unlock a surface with no outstanding page locks.
-
 
4722
 *)
-
 
4723
  DDERR_NOTPAGELOCKED                     = MAKE_DDHRESULT + 680;
-
 
4724
 
-
 
4725
(*
-
 
4726
 * There is more data available than the specified buffer size could hold
-
 
4727
 *)
-
 
4728
  DDERR_MOREDATA                                = MAKE_DDHRESULT + 690;
-
 
4729
 
-
 
4730
(*
-
 
4731
 * The data has expired and is therefore no longer valid.
-
 
4732
 *)
-
 
4733
  DDERR_EXPIRED                           = MAKE_DDHRESULT + 691;
-
 
4734
 
-
 
4735
(*
-
 
4736
 * The mode test has finished executing.
-
 
4737
 *)
-
 
4738
 DDERR_TESTFINISHED                      = MAKE_DDHRESULT + 692;
-
 
4739
 
-
 
4740
(*
-
 
4741
 * The mode test has switched to a new mode.
-
 
4742
 *)
-
 
4743
 DDERR_NEWMODE                           = MAKE_DDHRESULT + 693;
-
 
4744
 
-
 
4745
(*
-
 
4746
 * D3D has not yet been initialized.
-
 
4747
 *)
-
 
4748
 DDERR_D3DNOTINITIALIZED                 = MAKE_DDHRESULT + 694;
-
 
4749
 
-
 
4750
(*
-
 
4751
 * The video port is not active
-
 
4752
 *)
-
 
4753
  DDERR_VIDEONOTACTIVE                          = MAKE_DDHRESULT + 695;
-
 
4754
 
-
 
4755
(*
-
 
4756
 * The monitor does not have EDID data.
-
 
4757
 *)
-
 
4758
 DDERR_NOMONITORINFORMATION             = MAKE_DDHRESULT + 696;
-
 
4759
 
-
 
4760
(*
-
 
4761
 * The driver does not enumerate display mode refresh rates.
-
 
4762
 *)
-
 
4763
 DDERR_NODRIVERSUPPORT                  = MAKE_DDHRESULT + 697;
-
 
4764
 
-
 
4765
(*
-
 
4766
 * Surfaces created by one direct draw device cannot be used directly by
-
 
4767
 * another direct draw device.
-
 
4768
 *)
-
 
4769
  DDERR_DEVICEDOESNTOWNSURFACE                  = MAKE_DDHRESULT + 699;
-
 
4770
 
-
 
4771
(*
-
 
4772
 * An attempt was made to invoke an interface member of a DirectDraw object
-
 
4773
 * created by CoCreateInstance() before it was initialized.
-
 
4774
 *)
-
 
4775
  DDERR_NOTINITIALIZED                    = CO_E_NOTINITIALIZED;
-
 
4776
 
-
 
4777
(* Alpha bit depth constants *)
-
 
4778
 
-
 
4779
(*
-
 
4780
 * API's
-
 
4781
 *)
2123
 
4782
 
2124
type
4783
type
2125
  HMonitor = THandle;
4784
  HMonitor = THandle;
2126
 
4785
 
2127
  TDDEnumCallbackA = function(lpGUID: PGUID; lpDriverDescription: LPSTR;
4786
  TDDEnumCallbackA = function (lpGUID: PGUID; lpDriverDescription: PAnsiChar;
2128
    lpDriverName: LPSTR; lpContext: Pointer): BOOL; stdcall;
4787
      lpDriverName: PAnsiChar; lpContext: Pointer) : BOOL; stdcall;
2129
  LPDDENUMCALLBACKA = TDDEnumCallbackA;
-
 
2130
 
-
 
2131
  TDDEnumCallbackW = function(lpGUID: PGUID; lpDriverDescription: LPWSTR;
4788
  TDDEnumCallbackW = function (lpGUID: PGUID; lpDriverDescription: PWideChar;
2132
    lpDriverName: LPWSTR; lpContext: Pointer): BOOL; stdcall;
4789
      lpDriverName: PWideChar; lpContext: Pointer) : BOOL; stdcall;
-
 
4790
{$IFDEF UNICODE}
2133
  LPDDENUMCALLBACKW = TDDEnumCallbackW;
4791
  TDDEnumCallback = TDDEnumCallbackW;
2134
 
4792
{$ELSE}
2135
  TDDEnumCallback = TDDEnumCallbackA;
4793
  TDDEnumCallback = TDDEnumCallbackA;
2136
  LPDDENUMCALLBACK = TDDEnumCallback;
4794
{$ENDIF}
2137
 
4795
 
2138
  TDDEnumCallbackExA = function(lpGUID: PGUID; lpDriverDescription: LPSTR;
4796
  TDDEnumCallbackExA = function (lpGUID: PGUID; lpDriverDescription: PAnsiChar;
2139
    lpDriverName: LPSTR; lpContext: Pointer; Monitor: HMonitor): BOOL; stdcall;
4797
      lpDriverName: PAnsiChar; lpContext: Pointer; Monitor: HMonitor) : BOOL;
2140
  LPDDENUMCALLBACKEXA = TDDEnumCallbackExA;
4798
      stdcall;
2141
 
-
 
2142
  TDDEnumCallbackExW = function(lpGUID: PGUID; lpDriverDescription: LPWSTR;
4799
  TDDEnumCallbackExW = function (lpGUID: PGUID; lpDriverDescription: PWideChar;
2143
    lpDriverName: LPWSTR; lpContext: Pointer; Monitor: HMonitor): BOOL; stdcall;
4800
      lpDriverName: PWideChar; lpContext: Pointer; Monitor: HMonitor) : BOOL;
2144
  LPDDENUMCALLBACKEXW = TDDEnumCallbackExW;
4801
      stdcall;
2145
 
4802
     
-
 
4803
{$IFDEF UNICODE}
-
 
4804
  TDDEnumCallbackEx = TDDEnumCallbackExW;
-
 
4805
{$ELSE}
2146
  TDDEnumCallbackEx = TDDEnumCallbackExA;
4806
  TDDEnumCallbackEx = TDDEnumCallbackExA;
-
 
4807
{$ENDIF}
-
 
4808
 
-
 
4809
var
-
 
4810
  DirectDrawEnumerateA : function (lpCallback: TDDEnumCallbackA;
-
 
4811
       lpContext: Pointer) : HResult; stdcall;
-
 
4812
  DirectDrawEnumerateW : function (lpCallback: TDDEnumCallbackW;
-
 
4813
       lpContext: Pointer) : HResult; stdcall;
-
 
4814
  DirectDrawEnumerate : function (lpCallback: TDDEnumCallback;
-
 
4815
       lpContext: Pointer) : HResult; stdcall;
-
 
4816
 
-
 
4817
  DirectDrawEnumerateExA : function (lpCallback: TDDEnumCallbackExA;
-
 
4818
       lpContext: Pointer; dwFlags: DWORD) : HResult; stdcall;
-
 
4819
  DirectDrawEnumerateExW : function (lpCallback: TDDEnumCallbackExW;
-
 
4820
       lpContext: Pointer; dwFlags: DWORD) : HResult; stdcall;
2147
  LPDDENUMCALLBACKEX = TDDEnumCallbackEx;
4821
  DirectDrawEnumerateEx : function (lpCallback: TDDEnumCallbackEx;
-
 
4822
       lpContext: Pointer; dwFlags: DWORD) : HResult; stdcall;
-
 
4823
 
-
 
4824
  DirectDrawCreate : function (lpGUID: PGUID;
-
 
4825
       out lplpDD: IDirectDraw;
-
 
4826
       pUnkOuter: IUnknown) : HResult; stdcall;
-
 
4827
  DirectDrawCreateEx : function  (lpGUID: PGUID;
-
 
4828
       out lplpDD: IDirectDraw7; const iid: TGUID;
-
 
4829
       pUnkOuter: IUnknown) : HResult; stdcall;
-
 
4830
  DirectDrawCreateClipper : function (dwFlags: DWORD;
-
 
4831
       out lplpDDClipper: IDirectDrawClipper;
-
 
4832
       pUnkOuter: IUnknown) : HResult; stdcall;
2148
 
4833
 
2149
const
4834
const
-
 
4835
(*
-
 
4836
 * Flags for DirectDrawEnumerateEx
-
 
4837
 * DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to
-
 
4838
 * obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx.
-
 
4839
 * By default, only the primary display device is enumerated.
-
 
4840
 * DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES)
-
 
4841
 *)
-
 
4842
 
-
 
4843
(*
-
 
4844
 * This flag causes enumeration of any GDI display devices which are part of
-
 
4845
 * the Windows Desktop
-
 
4846
 *)
-
 
4847
  DDENUM_ATTACHEDSECONDARYDEVICES     = $00000001;
-
 
4848
 
-
 
4849
(*
-
 
4850
 * This flag causes enumeration of any GDI display devices which are not
-
 
4851
 * part of the Windows Desktop
-
 
4852
 *)
-
 
4853
  DDENUM_DETACHEDSECONDARYDEVICES     = $00000002;
-
 
4854
 
-
 
4855
(*
-
 
4856
 * This flag causes enumeration of non-display devices
-
 
4857
 *)
-
 
4858
  DDENUM_NONDISPLAYDEVICES            = $00000004;
-
 
4859
 
2150
  REGSTR_KEY_DDHW_DESCRIPTION = 'Description';
4860
  REGSTR_KEY_DDHW_DESCRIPTION = 'Description';
2151
  REGSTR_KEY_DDHW_DRIVERNAME  = 'DriverName';
4861
  REGSTR_KEY_DDHW_DRIVERNAME  = 'DriverName';
2152
  REGSTR_PATH_DDHW            = 'Hardware\DirectDrawDrivers';
4862
  REGSTR_PATH_DDHW            = 'Hardware\DirectDrawDrivers';
2153
 
4863
 
2154
  DDCREATE_HARDWAREONLY       = $00000001;
4864
  DDCREATE_HARDWAREONLY       = $00000001;
2155
  DDCREATE_EMULATIONONLY      = $00000002;
4865
  DDCREATE_EMULATIONONLY      = $00000002;
2156
 
4866
 
2157
function DirectDrawEnumerateA(lpCallback: TDDEnumCallbackA; lpContext: Pointer): HResult; stdcall;
-
 
2158
function DirectDrawEnumerateW(lpCallback: TDDEnumCallbackW; lpContext: Pointer): HResult; stdcall;
-
 
-
 
4867
(*
2159
function DirectDrawEnumerate(lpCallback: TDDEnumCallbackA; lpContext: Pointer): HResult; stdcall;
4868
 * Macros for interpretting DDEVICEIDENTIFIER2.dwWHQLLevel
2160
 
4869
 *)
2161
function DirectDrawEnumerateExA(lpCallback: TDDEnumCallbackExA; lpContext: Pointer; dwFlags: DWORD): HResult; stdcall;
4870
function GET_WHQL_YEAR(dwWHQLLevel: DWORD) : DWORD;
2162
function DirectDrawEnumerateExW(lpCallback: TDDEnumCallbackExW; lpContext: Pointer; dwFlags: DWORD): HResult; stdcall;
4871
function GET_WHQL_MONTH(dwWHQLLevel: DWORD) : DWORD;
2163
function DirectDrawEnumerateEx(lpCallback: TDDEnumCallbackExA; lpContext: Pointer; dwFlags: DWORD): HResult; stdcall;
4872
function GET_WHQL_DAY(dwWHQLLevel: DWORD) : DWORD;
2164
 
4873
 
2165
function DirectDrawCreate(lpGUID: PGUID; out lplpDD: IDirectDraw;
-
 
2166
  pUnkOuter: IUnknown): HResult; stdcall;
-
 
2167
function DirectDrawCreateEx(lpGUID: PGUID; out lplpDD; const iid: TGUID;
-
 
2168
  pUnkOuter: IUnknown): HResult; stdcall;
-
 
2169
function DirectDrawCreateClipper(dwFlags: DWORD; out lplpDDClipper: IDirectDrawClipper;
-
 
2170
  pUnkOuter: IUnknown): HResult; stdcall;
-
 
2171
 
4874
 
2172
(*==========================================================================;
4875
(*==========================================================================;
2173
 *
4876
 *
2174
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
4877
 *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
2175
 *
4878
 *
2176
 *  File:       dvp.h
4879
 *  File:       dvp.h
2177
 *  Content:    DirectDrawVideoPort include file
4880
 *  Content:    DirectDrawVideoPort include file
2178
 *
4881
 *
2179
 ***************************************************************************)
4882
 ***************************************************************************)
2180
 
4883
 
2181
{ GUIDS used by DirectDrawVideoPort objects }
-
 
2182
 
-
 
2183
const
4884
const
-
 
4885
(*
-
 
4886
 * GUIDS used by DirectDrawVideoPort objects
-
 
4887
 *)
-
 
4888
  DDVPTYPE_E_HREFH_VREFH: TGUID =
-
 
4889
      (D1:$54F39980;D2:$DA60;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8));
-
 
4890
  DDVPTYPE_E_HREFH_VREFL: TGUID =
-
 
4891
      (D1:$92783220;D2:$DA60;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8));
-
 
4892
  DDVPTYPE_E_HREFL_VREFH: TGUID =
-
 
4893
      (D1:$A07A02E0;D2:$DA60;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8));
-
 
4894
  DDVPTYPE_E_HREFL_VREFL: TGUID =
2184
  IID_IDDVideoPortContainer: TGUID = '{6C142760-A733-11CE-A521-0020AF0BE560}';
4895
      (D1:$E09C77E0;D2:$DA60;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8));
-
 
4896
  DDVPTYPE_CCIR656: TGUID =
-
 
4897
      (D1:$FCA326A0;D2:$DA60;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8));
-
 
4898
  DDVPTYPE_BROOKTREE: TGUID =
2185
  IID_IDirectDrawVideoPort: TGUID = '{B36D93E0-2B43-11CF-A2DE-00AA00B93356}';
4899
      (D1:$1352A560;D2:$DA61;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8));
-
 
4900
  DDVPTYPE_PHILIPS: TGUID =
-
 
4901
      (D1:$332CF160;D2:$DA61;D3:$11CF;D4:($9B,$06,$00,$A0,$C9,$03,$A3,$B8));
2186
 
4902
 
2187
  DDVPTYPE_E_HREFH_VREFH: TGUID = '{54F39980-DA60-11CF-9B06-00A0C903A3B8}';
-
 
2188
  DDVPTYPE_E_HREFH_VREFL: TGUID = '{92783220-DA60-11CF-9B06-00A0C903A3B8}';
-
 
2189
  DDVPTYPE_E_HREFL_VREFH: TGUID = '{A07A02E0-DA60-11CF-9B06-00A0C903A3B8}';
-
 
2190
  DDVPTYPE_E_HREFL_VREFL: TGUID = '{E09C77E0-DA60-11CF-9B06-00A0C903A3B8}';
-
 
2191
  DDVPTYPE_CCIR656: TGUID = '{FCA326A0-DA60-11CF-9B06-00A0C903A3B8}';
-
 
2192
  DDVPTYPE_BROOKTREE: TGUID = '{1352A560-DA61-11CF-9B06-00A0C903A3B8}';
-
 
-
 
4903
(*
2193
  DDVPTYPE_PHILIPS: TGUID = '{332CF160-DA61-11CF-9B06-00A0C903A3B8}';
4904
 * GUIDS used to describe connections
-
 
4905
 *)
2194
 
4906
 
-
 
4907
(*============================================================================
-
 
4908
 *
2195
{ DirectDraw Structures }
4909
 * DirectDraw Structures
-
 
4910
 *
-
 
4911
 * Various structures used to invoke DirectDraw.
-
 
4912
 *
-
 
4913
 *==========================================================================*)
2196
 
4914
 
2197
type
4915
type
2198
  IDDVideoPortContainer = interface;
-
 
2199
  IDirectDrawVideoPort = interface;
-
 
2200
 
-
 
2201
{ TDDVideoportConnect structure }
-
 
2202
 
4916
 
-
 
4917
(*
-
 
4918
 * TDDVideoPortConnect
-
 
4919
 *)
2203
  PDDVideoportConnect = ^TDDVideoportConnect;
4920
  PDDVideoPortConnect = ^TDDVideoPortConnect;
2204
  TDDVideoportConnect = record
4921
  TDDVideoPortConnect = packed record
2205
    dwSize: DWORD;        // size of the TDDVideoportConnect structure
4922
    dwSize: DWORD;        // size of the TDDVideoPortConnect structure
2206
    dwPortWidth: DWORD;   // Width of the video port
4923
    dwPortWidth: DWORD;   // Width of the video port
2207
    guidTypeID: TGUID;    // Description of video port connection
4924
    guidTypeID: TGUID;    // Description of video port connection
2208
    dwFlags: DWORD;       // Connection flags
4925
    dwFlags: DWORD;       // Connection flags
2209
    dwReserved1: DWORD;   // Reserved, set to zero.
4926
    dwReserved1: DWORD;   // Reserved, set to zero.
2210
  end;
4927
  end;
2211
 
4928
 
2212
  DDVIDEOPORTCONNECT = TDDVideoportConnect;
-
 
2213
  LPDDVIDEOPORTCONNECT = PDDVideoportConnect;
-
 
2214
 
4929
(*
2215
{ TDDVideoportCaps structure }
4930
 * TDDVideoPortCaps
2216
 
4931
 *)
2217
  PDDVideoportCaps = ^TDDVideoportCaps;
4932
  PDDVideoPortCaps = ^TDDVideoPortCaps;
2218
  TDDVideoportCaps = record
4933
  TDDVideoPortCaps = packed record
2219
    dwSize: DWORD;                          // size of the TDDVideoportCaps structure
4934
    dwSize: DWORD;                          // size of the TDDVideoPortCaps structure
2220
    dwFlags: DWORD;                         // indicates which fields contain data
4935
    dwFlags: DWORD;                         // indicates which fields contain data
2221
    dwMaxWidth: DWORD;                      // max width of the video port field
4936
    dwMaxWidth: DWORD;                      // max width of the video port field
2222
    dwMaxVBIWidth: DWORD;                   // max width of the VBI data
4937
    dwMaxVBIWidth: DWORD;                   // max width of the VBI data
2223
    dwMaxHeight: DWORD;                     // max height of the video port field
4938
    dwMaxHeight: DWORD;                     // max height of the video port field
2224
    dwVideoPortID: DWORD;                   // Video port ID (0 - (dwMaxVideoPorts -1))
4939
    dwVideoPortID: DWORD;                   // Video port ID (0 - (dwMaxVideoPorts -1))
Line 2235... Line 4950...
2235
    dwNumPreferredAutoflip: DWORD;          // Optimal number of autoflippable surfaces for hardware
4950
    dwNumPreferredAutoflip: DWORD;      // Optimal number of autoflippable surfaces for hardware
2236
    wNumFilterTapsX: WORD;                  // Number of taps the prescaler uses in the X direction (0 - no prescale, 1 - replication, etc.)
4951
    wNumFilterTapsX: WORD;              // Number of taps the prescaler uses in the X direction (0 - no prescale, 1 - replication, etc.)
2237
    wNumFilterTapsY: WORD;                  // Number of taps the prescaler uses in the Y direction (0 - no prescale, 1 - replication, etc.)
4952
    wNumFilterTapsY: WORD;              // Number of taps the prescaler uses in the Y direction (0 - no prescale, 1 - replication, etc.)
2238
  end;
4953
  end;
2239
 
4954
 
-
 
4955
const
-
 
4956
(*
-
 
4957
 * The dwMaxWidth and dwMaxVBIWidth members are valid
-
 
4958
 *)
-
 
4959
  DDVPD_WIDTH = $00000001;
-
 
4960
 
-
 
4961
(*
-
 
4962
 * The dwMaxHeight member is valid
-
 
4963
 *)
-
 
4964
  DDVPD_HEIGHT = $00000002;
-
 
4965
 
-
 
4966
(*
-
 
4967
 * The dwVideoPortID member is valid
-
 
4968
 *)
-
 
4969
  DDVPD_ID = $00000004;
-
 
4970
 
-
 
4971
(*
-
 
4972
 * The dwCaps member is valid
-
 
4973
 *)
2240
  DDVIDEOPORTCAPS = TDDVideoportCaps;
4974
  DDVPD_CAPS = $00000008;
-
 
4975
 
-
 
4976
(*
-
 
4977
 * The dwFX member is valid
-
 
4978
 *)
-
 
4979
  DDVPD_FX = $00000010;
-
 
4980
 
-
 
4981
(*
-
 
4982
 * The dwNumAutoFlipSurfaces member is valid
-
 
4983
 *)
2241
  LPDDVIDEOPORTCAPS = PDDVideoportCaps;
4984
  DDVPD_AUTOFLIP = $00000020;
-
 
4985
 
-
 
4986
(*
-
 
4987
 * All of the alignment members are valid
-
 
4988
 *)
-
 
4989
  DDVPD_ALIGN = $00000040;
2242
 
4990
 
-
 
4991
(*
-
 
4992
 * The dwNumPreferredAutoflip member is valid
-
 
4993
 *)
2243
{ TDDVideoportDesc structure }
4994
  DDVPD_PREFERREDAUTOFLIP = $00000080;
2244
 
4995
 
-
 
4996
(*
-
 
4997
 * The wNumFilterTapsX and wNumFilterTapsY fields are valid
-
 
4998
 *)
-
 
4999
  DDVPD_FILTERQUALITY     = $00000100;
-
 
5000
 
-
 
5001
type
-
 
5002
(*
-
 
5003
 * TDDVideoPortDesc
-
 
5004
 *)
2245
  PDDVideoportDesc = ^TDDVideoportDesc;
5005
  PDDVideoPortDesc = ^TDDVideoPortDesc;
2246
  TDDVideoportDesc = record
5006
  TDDVideoPortDesc = packed record
2247
    dwSize: DWORD;                       // size of the TDDVideoportDesc structure
5007
    dwSize: DWORD;                       // size of the TDDVideoPortDesc structure
2248
    dwFieldWidth: DWORD;                 // width of the video port field
5008
    dwFieldWidth: DWORD;                 // width of the video port field
2249
    dwVBIWidth: DWORD;                   // width of the VBI data
5009
    dwVBIWidth: DWORD;                   // width of the VBI data
2250
    dwFieldHeight: DWORD;                // height of the video port field
5010
    dwFieldHeight: DWORD;                // height of the video port field
2251
    dwMicrosecondsPerField: DWORD;       // Microseconds per video field
5011
    dwMicrosecondsPerField: DWORD;       // Microseconds per video field
2252
    dwMaxPixelsPerSecond: DWORD;         // Maximum pixel rate per second
5012
    dwMaxPixelsPerSecond: DWORD;         // Maximum pixel rate per second
2253
    dwVideoPortID: DWORD;                // Video port ID (0 - (dwMaxVideoPorts -1))
5013
    dwVideoPortID: DWORD;                // Video port ID (0 - (dwMaxVideoPorts -1))
2254
    dwReserved1: DWORD;                  // Reserved for future use - set to zero
5014
    dwReserved1: DWORD;                  // Reserved for future use - set to zero
2255
    VideoPortType: TDDVideoportConnect;   // Description of video port connection
5015
    VideoPortType: TDDVideoPortConnect;  // Description of video port connection
2256
    dwReserved2: DWORD;                  // Reserved for future use - set to zero
5016
    dwReserved2: DWORD;                  // Reserved for future use - set to zero
2257
    dwReserved3: DWORD;                  // Reserved for future use - set to zero
5017
    dwReserved3: DWORD;                  // Reserved for future use - set to zero
2258
  end;
5018
  end;
2259
 
5019
 
2260
  DDVIDEOPORTDESC = TDDVideoportDesc;
-
 
2261
  LPDDVIDEOPORTDESC = PDDVideoportDesc;
-
 
2262
 
5020
(*
2263
{ TDDVideoportInfo structure }
5021
 * TDDVideoPortInfo
2264
 
5022
 *)
2265
  PDDVideoportInfo = ^TDDVideoportInfo;
5023
  PDDVideoPortInfo = ^TDDVideoPortInfo;
2266
  TDDVideoportInfo = record
5024
  TDDVideoPortInfo = packed record
2267
    dwSize: DWORD;                            // Size of the structure
5025
    dwSize: DWORD;                            // Size of the structure
2268
    dwOriginX: DWORD;                         // Placement of the video data within the surface.
5026
    dwOriginX: DWORD;                         // Placement of the video data within the surface.
2269
    dwOriginY: DWORD;                         // Placement of the video data within the surface.
5027
    dwOriginY: DWORD;                         // Placement of the video data within the surface.
2270
    dwVPFlags: DWORD;                         // Video port options
5028
    dwVPFlags: DWORD;                         // Video port options
2271
    rCrop: TRect;                             // Cropping rectangle (optional).
5029
    rCrop: TRect;                             // Cropping rectangle (optional).
Line 2277... Line 5035...
2277
    dwVBIHeight: DWORD;                       // Specifies the number of lines of data within the vertical blanking interval.
5035
    dwVBIHeight: DWORD;                       // Specifies the number of lines of data within the vertical blanking interval.
2278
    dwReserved1: DWORD;                       // Reserved for future use - set to zero
5036
    dwReserved1: DWORD;                       // Reserved for future use - set to zero
2279
    dwReserved2: DWORD;                       // Reserved for future use - set to zero
5037
    dwReserved2: DWORD;                       // Reserved for future use - set to zero
2280
  end;
5038
  end;
2281
 
5039
 
2282
  DDVIDEOPORTINFO = TDDVideoportInfo;
-
 
2283
  LPDDVIDEOPORTINFO = PDDVideoportInfo;
-
 
2284
 
5040
(*
2285
{ TDDVideoportBandWidth structure }
5041
 * TDDVideoPortBandWidth
2286
 
5042
 *)
2287
  PDDVideoportBandWidth = ^TDDVideoportBandWidth;
5043
  PDDVideoPortBandWidth = ^TDDVideoPortBandWidth;
2288
  TDDVideoportBandWidth = record
5044
  TDDVideoPortBandWidth = packed record
2289
    dwSize: DWORD;                 // Size of the structure
5045
    dwSize: DWORD;                 // Size of the structure
2290
    dwCaps: DWORD;
5046
    dwCaps: DWORD;
2291
    dwOverlay: DWORD;              // Zoom factor at which overlay is supported
5047
    dwOverlay: DWORD;              // Zoom factor at which overlay is supported
2292
    dwColorkey: DWORD;             // Zoom factor at which overlay w/ colorkey is supported
5048
    dwColorkey: DWORD;             // Zoom factor at which overlay w/ colorkey is supported
2293
    dwYInterpolate: DWORD;         // Zoom factor at which overlay w/ Y interpolation is supported
5049
    dwYInterpolate: DWORD;         // Zoom factor at which overlay w/ Y interpolation is supported
2294
    dwYInterpAndColorkey: DWORD;   // Zoom factor at which ovelray w/ Y interpolation and colorkeying is supported
5050
    dwYInterpAndColorkey: DWORD;   // Zoom factor at which ovelray w/ Y interpolation and colorkeying is supported
2295
    dwReserved1: DWORD;            // Reserved for future use - set to zero
5051
    dwReserved1: DWORD;            // Reserved for future use - set to zero
2296
    dwReserved2: DWORD;            // Reserved for future use - set to zero
5052
    dwReserved2: DWORD;            // Reserved for future use - set to zero
2297
  end;
5053
  end;
2298
 
5054
 
2299
  DDVIDEOPORTBANDWIDTH = TDDVideoportBandWidth;
-
 
2300
  LPDDVIDEOPORTBANDWIDTH = PDDVideoportBandWidth;
-
 
2301
 
5055
(*
2302
{ TDDVideoportStatus structure }
5056
 * TDDVideoPortStatus
2303
 
5057
 *)
2304
  PDDVideoportStatus = ^TDDVideoportStatus;
5058
  PDDVideoPortStatus = ^TDDVideoPortStatus;
2305
  TDDVideoportStatus = record
5059
  TDDVideoPortStatus = record
2306
    dwSize: DWORD;                       // Size of the structure
5060
    dwSize: DWORD;                       // Size of the structure
2307
    bInUse: BOOL;                        // TRUE if video port is currently being used
5061
    bInUse: BOOL;                        // TRUE if video port is currently being used
2308
    dwFlags: DWORD;                      // Currently not used
5062
    dwFlags: DWORD;                      // Currently not used
2309
    dwReserved1: DWORD;                  // Reserved for future use
5063
    dwReserved1: DWORD;                  // Reserved for future use
2310
    VideoPortType: TDDVideoportConnect;   // Information about the connection
5064
    VideoPortType: TDDVideoPortConnect;  // Information about the connection
2311
    dwReserved2: DWORD;                  // Reserved for future use
5065
    dwReserved2: DWORD;                  // Reserved for future use
2312
    dwReserved3: DWORD;                  // Reserved for future use
5066
    dwReserved3: DWORD;                  // Reserved for future use
2313
  end;
5067
  end;
2314
 
5068
 
2315
  DDVIDEOPORTSTATUS = TDDVideoportStatus;
-
 
2316
  LPDDVIDEOPORTSTATUS = PDDVideoportStatus;
-
 
2317
 
-
 
2318
{ API's }
-
 
2319
 
-
 
2320
  TDDEnumVideoCallback = function(const lpDDVideoPortCaps: TDDVideoportCaps;
-
 
2321
      lpContext: Pointer): HResult; stdcall;
-
 
2322
  LPDDENUMVIDEOCALLBACK = TDDEnumVideoCallback;
-
 
2323
 
-
 
2324
{ IDirectDrawVideoPortContainer Interface }
-
 
2325
 
-
 
2326
  IDDVideoPortContainer = interface(IUnknown)
-
 
2327
    ['{6C142760-A733-11CE-A521-0020AF0BE560}']
-
 
2328
    // IDDVideoPortContainer methods
-
 
2329
    function CreateVideoPort(dwFlags: DWORD; const lpDDVideoPortDesc:
-
 
2330
        TDDVideoportDesc; out lplpDDVideoPort: IDirectDrawVideoPort;
-
 
2331
        pUnkOuter: IUnknown): HResult; stdcall;
-
 
2332
    function EnumVideoPorts(dwFlags: DWORD;
-
 
2333
        const lpDDVideoPortCaps: TDDVideoportCaps; lpContext: Pointer;
-
 
2334
        lpEnumVideoCallback: TDDEnumVideoCallback): HResult; stdcall;
-
 
2335
    function GetVideoPortConnectInfo(dwPortId: DWORD; var lpNumEntries: DWORD;
-
 
2336
        var lpConnectInfo: TDDVideoportConnect): HResult; stdcall;
-
 
2337
    function QueryVideoPortStatus(dwPortId: DWORD;
-
 
2338
        var lpVPStatus: TDDVideoportStatus): HResult; stdcall;
-
 
2339
  end;
-
 
2340
 
-
 
2341
{ IDirectDrawVideoPort Interface }
-
 
2342
 
-
 
2343
  IDirectDrawVideoPort = interface(IUnknown)
-
 
2344
    ['{B36D93E0-2B43-11CF-A2DE-00AA00B93356}']
-
 
2345
    // IDirectDrawVideoPort methods
-
 
2346
    function Flip(lpDDSurface: IDirectDrawSurface; dwFlags: DWORD): HResult; stdcall;
-
 
2347
    function GetBandwidthInfo(const lpddpfFormat: TDDPixelFormat; dwWidth: DWORD;
-
 
2348
        dwHeight: DWORD; dwFlags: DWORD; var lpBandwidth: TDDVideoportBandWidth): HResult; stdcall;
-
 
2349
    function GetColorControls(var lpColorControl: TDDColorControl): HResult; stdcall;
-
 
2350
    function GetInputFormats(var lpNumFormats: DWORD; var lpFormats:
-
 
2351
        TDDPixelFormat; dwFlags: DWORD): HResult; stdcall;
-
 
2352
    function GetOutputFormats(const lpInputFormat: TDDPixelFormat;
-
 
2353
        var lpNumFormats: DWORD; var lpFormats: TDDPixelFormat; dwFlags: DWORD): HResult; stdcall;
-
 
2354
    function GetFieldPolarity(var lpbVideoField: BOOL): HResult; stdcall;
-
 
2355
    function GetVideoLine(var lpdwLine: DWORD): HResult; stdcall;
-
 
2356
    function GetVideoSignalStatus(varlpdwStatus: DWORD): HResult; stdcall;
-
 
2357
    function SetColorControls(const lpColorControl: TDDColorControl): HResult; stdcall;
-
 
2358
    function SetTargetSurface(lpDDSurface: IDirectDrawSurface; dwFlags: DWORD): HResult; stdcall;
-
 
2359
    function StartVideo(const lpVideoInfo: TDDVideoportInfo): HResult; stdcall;
-
 
2360
    function StopVideo: HResult; stdcall;
-
 
2361
    function UpdateVideo(const lpVideoInfo: TDDVideoportInfo): HResult; stdcall;
-
 
2362
    function WaitForSync(dwFlags: DWORD; dwLine: DWORD; dwTimeout: DWORD): HResult; stdcall;
-
 
2363
  end;
-
 
2364
 
-
 
2365
 
-
 
2366
const
5069
const
-
 
5070
(*============================================================================
-
 
5071
 *
2367
{ Video Port Flags }
5072
 * Video Port Flags
2368
 
5073
 *
2369
  DDVPD_WIDTH             = $00000001;
-
 
2370
  DDVPD_HEIGHT            = $00000002;
-
 
2371
  DDVPD_ID                = $00000004;
-
 
2372
  DDVPD_CAPS              = $00000008;
-
 
2373
  DDVPD_FX                = $00000010;
-
 
2374
  DDVPD_AUTOFLIP          = $00000020;
-
 
2375
  DDVPD_ALIGN             = $00000040;
5074
 * All flags are bit flags.
2376
  DDVPD_PREFERREDAUTOFLIP = $00000080;
-
 
-
 
5075
 *
2377
  DDVPD_FILTERQUALITY     = $00000100;
5076
 *==========================================================================*)
2378
 
5077
 
-
 
5078
(****************************************************************************
-
 
5079
 *
2379
{ TDDVideoportConnect flags }
5080
 * VIDEOPORT TDDVideoPortConnect FLAGS
-
 
5081
 *
-
 
5082
 ****************************************************************************)
2380
 
5083
 
-
 
5084
(*
-
 
5085
 * When this is set by the driver and passed to the client, this
-
 
5086
 * indicates that the video port is capable of double clocking the data.
-
 
5087
 * When this is set by the client, this indicates that the video port
-
 
5088
 * should enable double clocking.  This flag is only valid with external
-
 
5089
 * syncs.
-
 
5090
 *)
2381
  DDVPCONNECT_DOUBLECLOCK      = $00000001;
5091
  DDVPCONNECT_DOUBLECLOCK = $00000001;
-
 
5092
 
-
 
5093
(*
-
 
5094
 * When this is set by the driver and passed to the client, this
-
 
5095
 * indicates that the video port is capable of using an external VACT
-
 
5096
 * signal. When this is set by the client, this indicates that the
-
 
5097
 * video port should use the external VACT signal.
-
 
5098
 *)
2382
  DDVPCONNECT_VACT             = $00000002;
5099
  DDVPCONNECT_VACT = $00000002;
-
 
5100
 
-
 
5101
(*
-
 
5102
 * When this is set by the driver and passed to the client, this
-
 
5103
 * indicates that the video port is capable of treating even fields
-
 
5104
 * like odd fields and visa versa.  When this is set by the client,
-
 
5105
 * this indicates that the video port should treat even fields like odd
-
 
5106
 * fields.
-
 
5107
 *)
2383
  DDVPCONNECT_INVERTPOLARITY   = $00000004;
5108
  DDVPCONNECT_INVERTPOLARITY = $00000004;
-
 
5109
 
-
 
5110
(*
-
 
5111
 * Indicates that any data written to the video port during the VREF
-
 
5112
 * period will not be written into the frame buffer. This flag is read only.
-
 
5113
 *)
2384
  DDVPCONNECT_DISCARDSVREFDATA = $00000008;
5114
  DDVPCONNECT_DISCARDSVREFDATA = $00000008;
-
 
5115
 
-
 
5116
(*
-
 
5117
 * When this is set be the driver and passed to the client, this
-
 
5118
 * indicates that the device will write half lines into the frame buffer
-
 
5119
 * if half lines are provided by the decoder.  If this is set by the client,
-
 
5120
 * this indicates that the decoder will be supplying half lines.
-
 
5121
 *)
2385
  DDVPCONNECT_HALFLINE         = $00000010;
5122
  DDVPCONNECT_HALFLINE = $00000010;
-
 
5123
 
-
 
5124
(*
-
 
5125
 * Indicates that the signal is interlaced. This flag is only
-
 
5126
 * set by the client.
-
 
5127
 *)
2386
  DDVPCONNECT_INTERLACED       = $00000020;
5128
  DDVPCONNECT_INTERLACED = $00000020;
-
 
5129
 
-
 
5130
(*
-
 
5131
 * Indicates that video port is shareable and that this video port
-
 
5132
 * will use the even fields.  This flag is only set by the client.
-
 
5133
 *)
2387
  DDVPCONNECT_SHAREEVEN        = $00000040;
5134
  DDVPCONNECT_SHAREEVEN = $00000040;
-
 
5135
 
-
 
5136
(*
-
 
5137
 * Indicates that video port is shareable and that this video port
-
 
5138
 * will use the odd fields.  This flag is only set by the client.
-
 
5139
 *)
2388
  DDVPCONNECT_SHAREODD         = $00000080;
5140
  DDVPCONNECT_SHAREODD = $00000080;
2389
 
5141
 
-
 
5142
(****************************************************************************
-
 
5143
 *
2390
{ TDDVideoportDesc caps }
5144
 * VIDEOPORT TDDVideoPortDesc CAPS
-
 
5145
 *
-
 
5146
 ****************************************************************************)
2391
 
5147
 
-
 
5148
(*
-
 
5149
 * Flip can be performed automatically to avoid tearing.
-
 
5150
 *)
2392
  DDVPCAPS_AUTOFLIP               = $00000001;
5151
  DDVPCAPS_AUTOFLIP = $00000001;
-
 
5152
 
-
 
5153
(*
-
 
5154
 * Supports interlaced video
-
 
5155
 *)
2393
  DDVPCAPS_INTERLACED             = $00000002;
5156
  DDVPCAPS_INTERLACED = $00000002;
-
 
5157
 
-
 
5158
(*
-
 
5159
 * Supports non-interlaced video
-
 
5160
 *)
2394
  DDVPCAPS_NONINTERLACED          = $00000004;
5161
  DDVPCAPS_NONINTERLACED = $00000004;
-
 
5162
 
-
 
5163
(*
-
 
5164
 * Indicates that the device can return whether the current field
-
 
5165
 * of an interlaced signal is even or odd.
-
 
5166
 *)
2395
  DDVPCAPS_READBACKFIELD          = $00000008;
5167
  DDVPCAPS_READBACKFIELD = $00000008;
-
 
5168
 
-
 
5169
(*
-
 
5170
 * Indicates that the device can return the current line of video
-
 
5171
 * being written into the frame buffer.
-
 
5172
 *)
2396
  DDVPCAPS_READBACKLINE           = $00000010;
5173
  DDVPCAPS_READBACKLINE = $00000010;
-
 
5174
 
-
 
5175
(*
-
 
5176
 * Allows two gen-locked video streams to share a single video port,
-
 
5177
 * where one stream uses the even fields and the other uses the odd
-
 
5178
 * fields. Separate parameters (including address, scaling,
-
 
5179
 * cropping, etc.) are maintained for both fields.)
-
 
5180
 *)
2397
  DDVPCAPS_SHAREABLE              = $00000020;
5181
  DDVPCAPS_SHAREABLE = $00000020;
-
 
5182
 
-
 
5183
(*
-
 
5184
 * Even fields of video can be automatically discarded.
-
 
5185
 *)
2398
  DDVPCAPS_SKIPEVENFIELDS         = $00000040;
5186
  DDVPCAPS_SKIPEVENFIELDS = $00000040;
-
 
5187
 
-
 
5188
(*
-
 
5189
 * Odd fields of video can be automatically discarded.
-
 
5190
 *)
2399
  DDVPCAPS_SKIPODDFIELDS          = $00000080;
5191
  DDVPCAPS_SKIPODDFIELDS = $00000080;
-
 
5192
 
-
 
5193
(*
-
 
5194
 * Indicates that the device is capable of driving the graphics
-
 
5195
 * VSYNC with the video port VSYNC.
-
 
5196
 *)
2400
  DDVPCAPS_SYNCMASTER             = $00000100;
5197
  DDVPCAPS_SYNCMASTER = $00000100;
-
 
5198
 
-
 
5199
(*
-
 
5200
 * Indicates that data within the vertical blanking interval can
-
 
5201
 * be written to a different surface.
-
 
5202
 *)
2401
  DDVPCAPS_VBISURFACE             = $00000200;
5203
  DDVPCAPS_VBISURFACE = $00000200;
-
 
5204
 
-
 
5205
(*
-
 
5206
 * Indicates that the video port can perform color operations
-
 
5207
 * on the incoming data before it is written to the frame buffer.
-
 
5208
 *)
2402
  DDVPCAPS_COLORCONTROL           = $00000400;
5209
  DDVPCAPS_COLORCONTROL = $00000400;
-
 
5210
 
-
 
5211
(*
-
 
5212
 * Indicates that the video port can accept VBI data in a different
-
 
5213
 * width or format than the regular video data.
-
 
5214
 *)
2403
  DDVPCAPS_OVERSAMPLEDVBI         = $00000800;
5215
  DDVPCAPS_OVERSAMPLEDVBI = $00000800;
-
 
5216
 
-
 
5217
(*
-
 
5218
 * Indicates that the video port can write data directly to system memory
-
 
5219
 *)
2404
  DDVPCAPS_SYSTEMMEMORY           = $00001000;
5220
  DDVPCAPS_SYSTEMMEMORY = $00001000;
-
 
5221
 
-
 
5222
(*
-
 
5223
 * Indicates that the VBI and video portions of the video stream can
-
 
5224
 * be controlled by an independent processes.
-
 
5225
 *)
2405
  DDVPCAPS_VBIANDVIDEOINDEPENDENT = $00002000;
5226
  DDVPCAPS_VBIANDVIDEOINDEPENDENT       = $00002000;
-
 
5227
 
-
 
5228
(*
-
 
5229
 * Indicates that the video port contains high quality hardware
-
 
5230
 * de-interlacing hardware that should be used instead of the
-
 
5231
 * bob/weave algorithms.
-
 
5232
 *)
2406
  DDVPCAPS_HARDWAREDEINTERLACE    = $00004000;
5233
  DDVPCAPS_HARDWAREDEINTERLACE          = $00004000;
2407
 
5234
 
-
 
5235
(****************************************************************************
-
 
5236
 *
2408
{ TDDVideoportDesc FX }
5237
 * VIDEOPORT TDDVideoPortDesc FX
-
 
5238
 *
-
 
5239
 ****************************************************************************)
2409
 
5240
 
-
 
5241
(*
-
 
5242
 * Limited cropping is available to crop out the vertical interval data.
-
 
5243
 *)
2410
  DDVPFX_CROPTOPDATA     = $00000001;
5244
  DDVPFX_CROPTOPDATA = $00000001;
-
 
5245
 
-
 
5246
(*
-
 
5247
 * Incoming data can be cropped in the X direction before it is written
-
 
5248
 * to the surface.
-
 
5249
 *)
2411
  DDVPFX_CROPX           = $00000002;
5250
  DDVPFX_CROPX = $00000002;
-
 
5251
 
-
 
5252
(*
-
 
5253
 * Incoming data can be cropped in the Y direction before it is written
-
 
5254
 * to the surface.
-
 
5255
 *)
2412
  DDVPFX_CROPY           = $00000004;
5256
  DDVPFX_CROPY = $00000004;
-
 
5257
 
-
 
5258
(*
-
 
5259
 * Supports interleaving interlaced fields in memory.
-
 
5260
 *)
2413
  DDVPFX_INTERLEAVE      = $00000008;
5261
  DDVPFX_INTERLEAVE = $00000008;
-
 
5262
 
-
 
5263
(*
-
 
5264
 * Supports mirroring left to right as the video data is written
-
 
5265
 * into the frame buffer.
-
 
5266
 *)
2414
  DDVPFX_MIRRORLEFTRIGHT = $00000010;
5267
  DDVPFX_MIRRORLEFTRIGHT = $00000010;
-
 
5268
 
-
 
5269
(*
-
 
5270
 * Supports mirroring top to bottom as the video data is written
-
 
5271
 * into the frame buffer.
-
 
5272
 *)
2415
  DDVPFX_MIRRORUPDOWN    = $00000020;
5273
  DDVPFX_MIRRORUPDOWN = $00000020;
-
 
5274
 
-
 
5275
(*
-
 
5276
 * Data can be arbitrarily shrunk in the X direction before it
-
 
5277
 * is written to the surface.
-
 
5278
 *)
2416
  DDVPFX_PRESHRINKX      = $00000040;
5279
  DDVPFX_PRESHRINKX = $00000040;
-
 
5280
 
-
 
5281
(*
-
 
5282
 * Data can be arbitrarily shrunk in the Y direction before it
-
 
5283
 * is written to the surface.
-
 
5284
 *)
2417
  DDVPFX_PRESHRINKY      = $00000080;
5285
  DDVPFX_PRESHRINKY = $00000080;
-
 
5286
 
-
 
5287
(*
-
 
5288
 * Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the X
-
 
5289
 * direction before it is written to the surface.
-
 
5290
 *)
2418
  DDVPFX_PRESHRINKXB     = $00000100;
5291
  DDVPFX_PRESHRINKXB = $00000100;
-
 
5292
 
-
 
5293
(*
-
 
5294
 * Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the Y
-
 
5295
 * direction before it is written to the surface.
-
 
5296
 *)
2419
  DDVPFX_PRESHRINKYB     = $00000200;
5297
  DDVPFX_PRESHRINKYB = $00000200;
-
 
5298
 
-
 
5299
(*
-
 
5300
 * Data can be shrunk in increments of 1/x in the X direction
-
 
5301
 * (where X is specified in the TDDVideoPortCaps.dwPreshrinkXStep)
-
 
5302
 * before it is written to the surface.
-
 
5303
 *)
2420
  DDVPFX_PRESHRINKXS     = $00000400;
5304
  DDVPFX_PRESHRINKXS = $00000400;
-
 
5305
 
-
 
5306
(*
-
 
5307
 * Data can be shrunk in increments of 1/x in the Y direction
-
 
5308
 * (where X is specified in the TDDVideoPortCaps.dwPreshrinkYStep)
-
 
5309
 * before it is written to the surface.
-
 
5310
 *)
2421
  DDVPFX_PRESHRINKYS     = $00000800;
5311
  DDVPFX_PRESHRINKYS = $00000800;
-
 
5312
 
-
 
5313
(*
-
 
5314
 * Data can be arbitrarily stretched in the X direction before
-
 
5315
 * it is written to the surface.
-
 
5316
 *)
2422
  DDVPFX_PRESTRETCHX     = $00001000;
5317
  DDVPFX_PRESTRETCHX = $00001000;
-
 
5318
 
-
 
5319
(*
-
 
5320
 * Data can be arbitrarily stretched in the Y direction before
-
 
5321
 * it is written to the surface.
-
 
5322
 *)
2423
  DDVPFX_PRESTRETCHY     = $00002000;
5323
  DDVPFX_PRESTRETCHY = $00002000;
-
 
5324
 
-
 
5325
(*
-
 
5326
 * Data can be integer stretched in the X direction before it is
-
 
5327
 * written to the surface.
-
 
5328
 *)
2424
  DDVPFX_PRESTRETCHXN    = $00004000;
5329
  DDVPFX_PRESTRETCHXN = $00004000;
-
 
5330
 
-
 
5331
(*
-
 
5332
 * Data can be integer stretched in the Y direction before it is
-
 
5333
 * written to the surface.
-
 
5334
 *)
2425
  DDVPFX_PRESTRETCHYN    = $00008000;
5335
  DDVPFX_PRESTRETCHYN = $00008000;
-
 
5336
 
-
 
5337
(*
-
 
5338
 * Indicates that data within the vertical blanking interval can
-
 
5339
 * be converted independently of the remaining video data.
-
 
5340
 *)
2426
  DDVPFX_VBICONVERT      = $00010000;
5341
  DDVPFX_VBICONVERT = $00010000;
-
 
5342
 
-
 
5343
(*
-
 
5344
 * Indicates that scaling can be disabled for data within the
-
 
5345
 * vertical blanking interval.
-
 
5346
 *)
2427
  DDVPFX_VBINOSCALE      = $00020000;
5347
  DDVPFX_VBINOSCALE = $00020000;
-
 
5348
 
-
 
5349
(*
-
 
5350
 * Indicates that the video data can ignore the left and right
-
 
5351
 * cropping coordinates when cropping oversampled VBI data.
-
 
5352
 *)
2428
  DDVPFX_IGNOREVBIXCROP  = $00040000;
5353
  DDVPFX_IGNOREVBIXCROP = $00040000;
-
 
5354
 
-
 
5355
(*
-
 
5356
 * Indicates that interleaving can be disabled for data within the
-
 
5357
 * vertical blanking interval.
-
 
5358
 *)
2429
  DDVPFX_VBINOINTERLEAVE = $00080000;
5359
  DDVPFX_VBINOINTERLEAVE     = $00080000;
2430
 
5360
 
-
 
5361
(****************************************************************************
-
 
5362
 *
2431
{ TDDVideoportInfo flags }
5363
 * VIDEOPORT TDDVideoPortInfo FLAGS
-
 
5364
 *
-
 
5365
 ****************************************************************************)
2432
 
5366
 
-
 
5367
(*
-
 
5368
 * Perform automatic flipping.   Auto-flipping is performed between
-
 
5369
 * the overlay surface that was attached to the video port using
-
 
5370
 * IDirectDrawVideoPort::AttachSurface and the overlay surfaces that
-
 
5371
 * are attached to the surface via the IDirectDrawSurface::AttachSurface
-
 
5372
 * method.  The flip order is the order in which the overlay surfaces
-
 
5373
 * were. attached.
-
 
5374
 *)
2433
  DDVP_AUTOFLIP            = $00000001;
5375
  DDVP_AUTOFLIP = $00000001;
-
 
5376
 
-
 
5377
(*
-
 
5378
 * Perform conversion using the ddpfOutputFormat information.
-
 
5379
 *)
2434
  DDVP_CONVERT             = $00000002;
5380
  DDVP_CONVERT = $00000002;
-
 
5381
 
-
 
5382
(*
-
 
5383
 * Perform cropping using the specified rectangle.
-
 
5384
 *)
2435
  DDVP_CROP                = $00000004;
5385
  DDVP_CROP = $00000004;
-
 
5386
 
-
 
5387
(*
-
 
5388
 * Indicates that interlaced fields should be interleaved in memory.
-
 
5389
 *)
2436
  DDVP_INTERLEAVE          = $00000008;
5390
  DDVP_INTERLEAVE = $00000008;
-
 
5391
 
-
 
5392
(*
-
 
5393
 * Indicates that the data should be mirrored left to right as it's
-
 
5394
 * written into the frame buffer.
-
 
5395
 *)
2437
  DDVP_MIRRORLEFTRIGHT     = $00000010;
5396
  DDVP_MIRRORLEFTRIGHT = $00000010;
-
 
5397
 
-
 
5398
(*
-
 
5399
 * Indicates that the data should be mirrored top to bottom as it's
-
 
5400
 * written into the frame buffer.
-
 
5401
 *)
2438
  DDVP_MIRRORUPDOWN        = $00000020;
5402
  DDVP_MIRRORUPDOWN = $00000020;
-
 
5403
 
-
 
5404
(*
-
 
5405
 * Perform pre-scaling/zooming based on the pre-scale parameters.
-
 
5406
 *)
2439
  DDVP_PRESCALE            = $00000040;
5407
  DDVP_PRESCALE = $00000040;
-
 
5408
 
-
 
5409
(*
-
 
5410
 * Ignore input of even fields.
-
 
5411
 *)
2440
  DDVP_SKIPEVENFIELDS      = $00000080;
5412
  DDVP_SKIPEVENFIELDS = $00000080;
-
 
5413
 
-
 
5414
(*
-
 
5415
 * Ignore input of odd fields.
-
 
5416
 *)
2441
  DDVP_SKIPODDFIELDS       = $00000100;
5417
  DDVP_SKIPODDFIELDS = $00000100;
-
 
5418
 
-
 
5419
(*
-
 
5420
 * Drive the graphics VSYNCs using the video port VYSNCs.
-
 
5421
 *)
2442
  DDVP_SYNCMASTER          = $00000200;
5422
  DDVP_SYNCMASTER = $00000200;
-
 
5423
 
-
 
5424
(*
-
 
5425
 * The ddpfVBIOutputFormatFormat member contains data that should be used
-
 
5426
 * to convert the data within the vertical blanking interval.
-
 
5427
 *)
2443
  DDVP_VBICONVERT          = $00000400;
5428
  DDVP_VBICONVERT = $00000400;
-
 
5429
 
-
 
5430
(*
-
 
5431
 * Indicates that data within the vertical blanking interval
-
 
5432
 * should not be scaled.
-
 
5433
 *)
2444
  DDVP_VBINOSCALE          = $00000800;
5434
  DDVP_VBINOSCALE = $00000800;
-
 
5435
 
-
 
5436
(*
-
 
5437
 * Indicates that these bob/weave decisions should not be
-
 
5438
 * overriden by other interfaces.
-
 
5439
 *)
2445
  DDVP_OVERRIDEBOBWEAVE    = $00001000;
5440
  DDVP_OVERRIDEBOBWEAVE = $00001000;
-
 
5441
 
-
 
5442
(*
-
 
5443
 * Indicates that the video data should ignore the left and right
-
 
5444
 * cropping coordinates when cropping the VBI data.
-
 
5445
 *)
2446
  DDVP_IGNOREVBIXCROP      = $00002000;
5446
  DDVP_IGNOREVBIXCROP = $00002000;
-
 
5447
 
-
 
5448
(*
-
 
5449
 * Indicates that interleaving can be disabled for data within the
-
 
5450
 * vertical blanking interval.
-
 
5451
 *)
-
 
5452
  DDVP_VBINOINTERLEAVE                  = $00004000;
-
 
5453
 
-
 
5454
(*
-
 
5455
 * Indicates that the video port should use the hardware
-
 
5456
 * de-interlacing hardware.
-
 
5457
 *)
2447
  DDVP_HARDWAREDEINTERLACE = $00008000;
5458
  DDVP_HARDWAREDEINTERLACE              = $00008000;
2448
 
5459
 
-
 
5460
(****************************************************************************
-
 
5461
 *
2449
{ DirectDrawVideoport GetInputFormat/GetOutputFormat flags }
5462
 * DIRIRECTDRAWVIDEOPORT GETINPUTFORMAT/GETOUTPUTFORMAT FLAGS
-
 
5463
 *
-
 
5464
 ****************************************************************************)
2450
 
5465
 
-
 
5466
(*
-
 
5467
 * Return formats for the video data
-
 
5468
 *)
2451
  DDVPFORMAT_VIDEO = $00000001;
5469
  DDVPFORMAT_VIDEO = $00000001;
-
 
5470
 
-
 
5471
(*
-
 
5472
 * Return formats for the VBI data
-
 
5473
 *)
2452
  DDVPFORMAT_VBI = $00000002;
5474
  DDVPFORMAT_VBI = $00000002;
2453
 
5475
 
-
 
5476
(****************************************************************************
-
 
5477
 *
2454
{ DirectDrawVideoport SetTargetSurface flags }
5478
 * DIRIRECTDRAWVIDEOPORT SETTARGETSURFACE FLAGS
-
 
5479
 *
-
 
5480
 ****************************************************************************)
2455
 
5481
 
-
 
5482
(*
-
 
5483
 * Surface should receive video data (and VBI data if a surface
-
 
5484
 * is not explicitly attached for that purpose)
-
 
5485
 *)
2456
  DDVPTARGET_VIDEO = $00000001;
5486
  DDVPTARGET_VIDEO = $00000001;
-
 
5487
 
-
 
5488
(*
-
 
5489
 * Surface should receive VBI data
-
 
5490
 *)
2457
  DDVPTARGET_VBI = $00000002;
5491
  DDVPTARGET_VBI = $00000002;
2458
 
5492
 
-
 
5493
(****************************************************************************
-
 
5494
 *
2459
{ DirectDrawVideoport WaitForSync flags }
5495
 * DIRIRECTDRAWVIDEOPORT WAITFORSYNC FLAGS
-
 
5496
 *
-
 
5497
 ****************************************************************************)
2460
 
5498
 
-
 
5499
(*
-
 
5500
 * Waits until the beginning of the next VSYNC
-
 
5501
 *)
2461
  DDVPWAIT_BEGIN = $00000001;
5502
  DDVPWAIT_BEGIN = $00000001;
-
 
5503
 
-
 
5504
(*
-
 
5505
 * Waits until the end of the next/current VSYNC
-
 
5506
 *)
2462
  DDVPWAIT_END = $00000002;
5507
  DDVPWAIT_END = $00000002;
-
 
5508
 
-
 
5509
(*
-
 
5510
 * Waits until the beginning of the specified line
-
 
5511
 *)
2463
  DDVPWAIT_LINE = $00000003;
5512
  DDVPWAIT_LINE = $00000003;
2464
 
5513
 
-
 
5514
(****************************************************************************
-
 
5515
 *
2465
{ DirectDrawVideoport flip flags }
5516
 * DIRECTDRAWVIDEOPORT FLIP FLAGS
-
 
5517
 *
-
 
5518
 ****************************************************************************)
2466
 
5519
 
-
 
5520
(*
-
 
5521
 * Flips the normal video surface
-
 
5522
 *)
2467
  DDVPFLIP_VIDEO = $00000001;
5523
  DDVPFLIP_VIDEO = $00000001;
-
 
5524
 
-
 
5525
(*
-
 
5526
 * Flips the VBI surface
-
 
5527
 *)
2468
  DDVPFLIP_VBI = $00000002;
5528
  DDVPFLIP_VBI = $00000002;
2469
 
5529
 
-
 
5530
(****************************************************************************
-
 
5531
 *
2470
{ DirectDrawVideoport GetVideoSiginalStatus values }
5532
 * DIRIRECTDRAWVIDEOPORT GETVIDEOSIGNALSTATUS VALUES
-
 
5533
 *
-
 
5534
 ****************************************************************************)
2471
 
5535
 
-
 
5536
(*
-
 
5537
 * No video signal is present at the video port
-
 
5538
 *)
2472
  DDVPSQ_NOSIGNAL = $00000001;
5539
  DDVPSQ_NOSIGNAL = $00000001;
-
 
5540
 
-
 
5541
(*
-
 
5542
 * A valid video signal is present at the video port
-
 
5543
 *)
2473
  DDVPSQ_SIGNALOK = $00000002;
5544
  DDVPSQ_SIGNALOK = $00000002;
2474
 
5545
 
-
 
5546
(****************************************************************************
-
 
5547
 *
2475
{ TDDVideoportBandWidth Flags }
5548
 * VIDEOPORTBANDWIDTH Flags
-
 
5549
 *
-
 
5550
 ****************************************************************************)
2476
 
5551
 
-
 
5552
(*
-
 
5553
 * The specified height/width refer to the size of the video port data
-
 
5554
 * written into memory, after prescaling has occured.
-
 
5555
 *)
2477
  DDVPB_VIDEOPORT = $00000001;
5556
  DDVPB_VIDEOPORT = $00000001;
-
 
5557
 
-
 
5558
(*
-
 
5559
 * The specified height/width refer to the source size of the overlay.
-
 
5560
 *)
2478
  DDVPB_OVERLAY = $00000002;
5561
  DDVPB_OVERLAY = $00000002;
-
 
5562
 
-
 
5563
(*
-
 
5564
 * This is a query for the device to return which caps this device requires.
-
 
5565
 *)
2479
  DDVPB_TYPE = $00000004;
5566
  DDVPB_TYPE = $00000004;
2480
 
5567
 
-
 
5568
(****************************************************************************
-
 
5569
 *
2481
{ TDDVideoportBandWidth Caps }
5570
 * VIDEOPORTBANDWIDTH Caps
-
 
5571
 *
-
 
5572
 ****************************************************************************)
2482
 
5573
 
-
 
5574
(*
-
 
5575
 * The bandwidth for this device is dependant on the overlay source size.
-
 
5576
 *)
2483
  DDVPBCAPS_SOURCE = $00000001;
5577
  DDVPBCAPS_SOURCE = $00000001;
-
 
5578
 
-
 
5579
(*
-
 
5580
 * The bandwidth for this device is dependant on the overlay destination
-
 
5581
 * size.
-
 
5582
 *)
2484
  DDVPBCAPS_DESTINATION = $00000002;
5583
  DDVPBCAPS_DESTINATION = $00000002;
2485
 
5584
 
-
 
5585
(****************************************************************************
-
 
5586
 *
2486
{ IDDVideoportContainer.CreateVideoPort flags }
5587
 * DDVIDEOPORTCONTAINER CreateVideoPort flags
-
 
5588
 *
-
 
5589
 ****************************************************************************)
2487
 
5590
 
-
 
5591
(*
-
 
5592
 * The process only wants to control the VBI portion of the video stream.
-
 
5593
 *)
2488
  DDVPCREATE_VBIONLY   = $00000001;
5594
  DDVPCREATE_VBIONLY                    = $00000001;
-
 
5595
 
-
 
5596
(*
-
 
5597
 * The process only wants to control the non-VBI (video) portion of
-
 
5598
 * the video stream.
-
 
5599
 *)
2489
  DDVPCREATE_VIDEOONLY = $00000002;
5600
  DDVPCREATE_VIDEOONLY                  = $00000002;
2490
 
5601
 
-
 
5602
(****************************************************************************
-
 
5603
 *
2491
{ TDDVideoportStatus flags }
5604
 * DDVIDEOPORTSTATUS flags
-
 
5605
 *
-
 
5606
 ****************************************************************************)
2492
 
5607
 
-
 
5608
(*
-
 
5609
 * The video port interface is only controlling the VBI portion of the
-
 
5610
 * video stream
-
 
5611
 *)
2493
  DDVPSTATUS_VBIONLY   = $00000001;
5612
  DDVPSTATUS_VBIONLY                    = $00000001;
-
 
5613
 
-
 
5614
(*
-
 
5615
 * The video port interface is only controlling the video portion of the
-
 
5616
 * video stream
-
 
5617
 *)
2494
  DDVPSTATUS_VIDEOONLY = $00000002;
5618
  DDVPSTATUS_VIDEOONLY                  = $00000002;
2495
 
5619
 
-
 
5620
 
-
 
5621
type
-
 
5622
(*
-
 
5623
 * API's
-
 
5624
 *)
-
 
5625
 
-
 
5626
  TDDEnumVideoCallback = function (lpTDDVideoPortCaps: PDDVideoPortCaps;
-
 
5627
      lpContext: Pointer) : HResult; stdcall;
-
 
5628
 
-
 
5629
(*
-
 
5630
 * INTERACES FOLLOW:
-
 
5631
 *      IDirectDrawVideoPort
-
 
5632
 *      IVideoPort
-
 
5633
 *)
-
 
5634
 
-
 
5635
 
-
 
5636
(*
-
 
5637
 * IDirectDrawVideoPort
-
 
5638
 *)
-
 
5639
  IDirectDrawVideoPort = interface (IUnknown)
-
 
5640
    ['{B36D93E0-2B43-11CF-A2DE-00AA00B93356}']
-
 
5641
    (*** IDirectDrawVideoPort methods ***)
-
 
5642
    function Flip(lpDDSurface: IDirectDrawSurface; dwFlags: DWORD) : HResult; stdcall;
-
 
5643
    function GetBandwidthInfo(var lpddpfFormat: TDDPixelFormat;
-
 
5644
        dwWidth: DWORD; dwHeight: DWORD; dwFlags: DWORD;
-
 
5645
        var lpBandwidth: TDDVideoPortBandWidth) : HResult; stdcall;
-
 
5646
    function GetColorControls(var lpColorControl: TDDColorControl) : HResult; stdcall;
-
 
5647
    function GetInputFormats(var lpNumFormats: DWORD; var lpFormats:
-
 
5648
        TDDPixelFormat; dwFlags: DWORD) : HResult; stdcall;
-
 
5649
    function GetOutputFormats(var lpInputFormat: TDDPixelFormat;
-
 
5650
        var lpNumFormats: DWORD; lpFormats: PDDPixelFormat; dwFlags: DWORD)
-
 
5651
        : HResult; stdcall;
-
 
5652
    function GetFieldPolarity(var lpbVideoField: BOOL) : HResult; stdcall;
-
 
5653
    function GetVideoLine(var lpdwLine: DWORD) : HResult; stdcall;
-
 
5654
    function GetVideoSignalStatus(varlpdwStatus: DWORD) : HResult; stdcall;
-
 
5655
    function SetColorControls(var lpColorControl: TDDColorControl) : HResult; stdcall;
-
 
5656
    function SetTargetSurface(lpDDSurface: IDirectDrawSurface; dwFlags: DWORD) :
-
 
5657
        HResult; stdcall;
-
 
5658
    function StartVideo(var lpVideoInfo: TDDVideoPortInfo) : HResult; stdcall;
-
 
5659
    function StopVideo: HResult; stdcall;
-
 
5660
    function UpdateVideo(var lpVideoInfo: TDDVideoPortInfo) : HResult; stdcall;
-
 
5661
    function WaitForSync(dwFlags: DWORD; dwLine: DWORD; dwTimeout: DWORD) :
-
 
5662
        HResult; stdcall;
-
 
5663
  end;
-
 
5664
 
-
 
5665
(*
-
 
5666
 * IDirectDrawVideoPortContainer
-
 
5667
 *)
-
 
5668
  IDDVideoPortContainer = interface (IUnknown)
-
 
5669
    ['{6C142760-A733-11CE-A521-0020AF0BE560}']
-
 
5670
    (*** IDDVideoPortContainer methods ***)
-
 
5671
    function CreateVideoPort(dwFlags: DWORD; var lpTDDVideoPortDesc:
-
 
5672
        TDDVideoPortDesc; var lplpDDVideoPort: IDirectDrawVideoPort;
-
 
5673
        pUnkOuter: IUnknown) : HResult; stdcall;
-
 
5674
    function EnumVideoPorts(dwFlags: DWORD;
-
 
5675
        lpTDDVideoPortCaps: PDDVideoPortCaps; lpContext: Pointer;
-
 
5676
        lpEnumVideoCallback: TDDEnumVideoCallback) : HResult; stdcall;
-
 
5677
    function GetVideoPortConnectInfo(dwPortId: DWORD; var lpNumEntries: DWORD;
-
 
5678
        lpConnectInfo: PDDVideoPortConnect) : HResult; stdcall;
-
 
5679
    function QueryVideoPortStatus(dwPortId: DWORD;
-
 
5680
        var lpVPStatus: TDDVideoPortStatus) : HResult; stdcall;
-
 
5681
  end;
-
 
5682
 
-
 
5683
  IID_IDDVideoPortContainer = IDDVideoPortContainer;
-
 
5684
  IID_IDirectDrawVideoPort = IDirectDrawVideoPort;
-
 
5685
 
-
 
5686
 
-
 
5687
//Direct3D file
2496
(*==========================================================================;
5688
(*==========================================================================;
2497
 *
5689
 *
2498
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
5690
 *  Copyright (C) 1995-1998 Microsoft Corporation.  All Rights Reserved.
2499
 *
5691
 *
2500
 *  File:       d3dtypes.h
5692
 *  Files:   d3dtypes.h d3dcaps.h d3d.h
-
 
5693
 *
2501
 *  Content:    Direct3D types include file
5694
 *  DirectX 7.0 Delphi adaptation by Erik Unger
-
 
5695
 *
-
 
5696
 *  Modyfied: 26-Jun-2000
-
 
5697
 *
-
 
5698
 *  Download: http://www.delphi-jedi.org/DelphiGraphics/
-
 
5699
 *  E-Mail: DelphiDirectX@next-reality.com
2502
 *
5700
 *
2503
 ***************************************************************************)
5701
 ***************************************************************************)
2504
 
5702
 
2505
type
-
 
2506
  TD3DValue = Single;
-
 
2507
  D3DValue = TD3DValue;
5703
(* TD3DValue is the fundamental Direct3D fractional data type *)
2508
 
5704
 
2509
  TD3DFixed = Longint;
5705
type
2510
  D3DFIXED = TD3DFixed;
5706
  TRefClsID = TGUID;
2511
 
5707
 
-
 
5708
type
-
 
5709
  TD3DValue = Single;
-
 
5710
  TD3DFixed = LongInt;
-
 
5711
  float = TD3DValue;
-
 
5712
  PD3DColor = ^TD3DColor;
2512
  TD3DColor = DWORD;
5713
  TD3DColor = DWORD;
2513
  D3DCOLOR = TD3DColor;
-
 
2514
 
5714
 
2515
function D3DVALP(val: TD3DValue; prec: Integer): TD3DValue;
-
 
2516
function D3DVAL(val: TD3DValue): TD3DValue;
5715
function D3DVal(val: variant) : float;
2517
function D3DDivide(a, b: TD3DValue): TD3DValue;
5716
function D3DDivide(a,b: double) : float;
2518
function D3DMultiply(a, b: TD3DValue): TD3DValue;
5717
function D3DMultiply(a,b: double) : float;
2519
 
5718
 
2520
(*
5719
(*
2521
 * Format of CI colors is
5720
 * Format of CI colors is
2522
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5721
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2523
 *  |    alpha      |         color index           |   fraction    |
5722
 *  |    alpha      |         color index           |   fraction    |
2524
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5723
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2525
 *)
5724
 *)
2526
 
5725
 
-
 
5726
// #define CI_GETALPHA(ci)    ((ci) >> 24)
2527
function CI_GETALPHA(ci: Integer): Byte;
5727
function CI_GETALPHA(ci: DWORD) : DWORD;
-
 
5728
 
-
 
5729
// #define CI_GETINDEX(ci)    (((ci) >> 8) & 0xffff)
2528
function CI_GETINDEX(ci: Integer): Word;
5730
function CI_GETINDEX(ci: DWORD) : DWORD;
-
 
5731
 
-
 
5732
// #define CI_GETFRACTION(ci) ((ci) & 0xff)
2529
function CI_GETFRACTION(ci: Integer): Byte;
5733
function CI_GETFRACTION(ci: DWORD) : DWORD;
-
 
5734
 
-
 
5735
// #define CI_ROUNDINDEX(ci)  CI_GETINDEX((ci) + 0x80)
2530
function CI_ROUNDINDEX(ci: Integer): Integer;
5736
function CI_ROUNDINDEX(ci: DWORD) : DWORD;
-
 
5737
 
-
 
5738
// #define CI_MASKALPHA(ci)   ((ci) & 0xffffff)
2531
function CI_MASKALPHA(ci: Integer): Integer;
5739
function CI_MASKALPHA(ci: DWORD) : DWORD;
-
 
5740
 
-
 
5741
// #define CI_MAKE(a, i, f)    (((a) << 24) | ((i) << 8) | (f))
2532
function CI_MAKE(a: Byte; i: Word; f: Byte): Integer;
5742
function CI_MAKE(a,i,f: DWORD) : DWORD;
2533
 
5743
 
2534
(*
5744
(*
2535
 * Format of RGBA colors is
5745
 * Format of RGBA colors is
2536
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5746
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2537
 *  |    alpha      |      red      |     green     |     blue      |
5747
 *  |    alpha      |      red      |     green     |     blue      |
2538
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5748
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2539
 *)
5749
 *)
2540
 
5750
 
-
 
5751
// #define RGBA_GETALPHA(rgb)      ((rgb) >> 24)
2541
function RGBA_GETALPHA(rgb: TD3DColor): Byte;
5752
function RGBA_GETALPHA(rgb: TD3DColor) : DWORD;
-
 
5753
 
-
 
5754
// #define RGBA_GETRED(rgb)        (((rgb) >> 16) & 0xff)
2542
function RGBA_GETRED(rgb: TD3DColor): Byte;
5755
function RGBA_GETRED(rgb: TD3DColor) : DWORD;
-
 
5756
 
-
 
5757
// #define RGBA_GETGREEN(rgb)      (((rgb) >> 8) & 0xff)
2543
function RGBA_GETGREEN(rgb: TD3DColor): Byte;
5758
function RGBA_GETGREEN(rgb: TD3DColor) : DWORD;
-
 
5759
 
-
 
5760
// #define RGBA_GETBLUE(rgb)       ((rgb) & 0xff)
2544
function RGBA_GETBLUE(rgb: TD3DColor): Byte;
5761
function RGBA_GETBLUE(rgb: TD3DColor) : DWORD;
-
 
5762
 
-
 
5763
// #define RGBA_MAKE(r, g, b, a)   ((TD3DColor) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)))
2545
function RGBA_MAKE(r, g, b, a: Byte): TD3DColor;
5764
function RGBA_MAKE(r, g, b, a: DWORD) : TD3DColor;
2546
 
5765
 
2547
(* D3DRGB and D3DRGBA may be used as initialisers for D3DCOLORs
5766
(* D3DRGB and D3DRGBA may be used as initialisers for D3DCOLORs
2548
 * The float values must be in the range 0..1
5767
 * The float values must be in the range 0..1
2549
 *)
5768
 *)
2550
 
5769
 
-
 
5770
// #define D3DRGB(r, g, b) \
-
 
5771
//     (0xff000000L | (((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255))
2551
function D3DRGB(r, g, b: TD3DValue): TD3DColor;
5772
function D3DRGB(r, g, b: float) : TD3DColor;
-
 
5773
 
-
 
5774
// #define D3DRGBA(r, g, b, a) \
-
 
5775
//     (  (((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) \
-
 
5776
//     |   (((long)((g) * 255)) << 8) | (long)((b) * 255) \
-
 
5777
//    )
2552
function D3DRGBA(r, g, b, a: TD3DValue): TD3DColor;
5778
function D3DRGBA(r, g, b, a: float) : TD3DColor;
2553
 
5779
 
2554
(*
5780
(*
2555
 * Format of RGB colors is
5781
 * Format of RGB colors is
2556
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5782
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2557
 *  |    ignored    |      red      |     green     |     blue      |
5783
 *  |    ignored    |      red      |     green     |     blue      |
2558
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
5784
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2559
 *)
5785
 *)
2560
 
5786
 
-
 
5787
// #define RGB_GETRED(rgb)         (((rgb) >> 16) & 0xff)
2561
function RGB_GETRED(rgb: TD3DColor): Byte;
5788
function RGB_GETRED(rgb: TD3DColor) : DWORD;
-
 
5789
 
-
 
5790
// #define RGB_GETGREEN(rgb)       (((rgb) >> 8) & 0xff)
2562
function RGB_GETGREEN(rgb: TD3DColor): Byte;
5791
function RGB_GETGREEN(rgb: TD3DColor) : DWORD;
-
 
5792
 
-
 
5793
// #define RGB_GETBLUE(rgb)        ((rgb) & 0xff)
2563
function RGB_GETBLUE(rgb: TD3DColor): Byte;
5794
function RGB_GETBLUE(rgb: TD3DColor) : DWORD;
-
 
5795
 
-
 
5796
// #define RGBA_SETALPHA(rgba, x) (((x) << 24) | ((rgba) & 0x00ffffff))
2564
function RGBA_SETALPHA(rgba: TD3DColor; x: Byte): TD3DColor;
5797
function RGBA_SETALPHA(rgba: TD3DColor; x: DWORD) : TD3DColor;
-
 
5798
 
-
 
5799
// #define RGB_MAKE(r, g, b)       ((TD3DColor) (((r) << 16) | ((g) << 8) | (b)))
2565
function RGB_MAKE(r, g, b: Byte): TD3DColor;
5800
function RGB_MAKE(r, g, b: DWORD) : TD3DColor;
-
 
5801
 
-
 
5802
// #define RGBA_TORGB(rgba)       ((TD3DColor) ((rgba) & 0xffffff))
2566
function RGBA_TORGB(rgba: TD3DColor): TD3DColor;
5803
function RGBA_TORGB(rgba: TD3DColor) : TD3DColor;
-
 
5804
 
-
 
5805
// #define RGB_TORGBA(rgb)        ((TD3DColor) ((rgb) | 0xff000000))
2567
function RGB_TORGBA(rgb: TD3DColor): TD3DColor;
5806
function RGB_TORGBA(rgb: TD3DColor) : TD3DColor;
2568
 
5807
 
-
 
5808
(*
-
 
5809
 * Flags for Enumerate functions
-
 
5810
 *)
2569
const
5811
const
-
 
5812
 
-
 
5813
(*
2570
{ Flags for Enumerate functions }
5814
 * Stop the enumeration
-
 
5815
 *)
2571
 
5816
 
2572
  D3DENUMRET_CANCEL = DDENUMRET_CANCEL;
5817
  D3DENUMRET_CANCEL                        = DDENUMRET_CANCEL;
-
 
5818
 
-
 
5819
(*
-
 
5820
 * Continue the enumeration
-
 
5821
 *)
-
 
5822
 
2573
  D3DENUMRET_OK     = DDENUMRET_OK;
5823
  D3DENUMRET_OK                            = DDENUMRET_OK;
2574
 
5824
 
2575
type
5825
type
2576
  TD3DValidateCallback = function(lpUserArg: Pointer; dwOffset: DWORD): HResult; stdcall;
5826
  TD3DValidateCallback = function (lpUserArg: Pointer;
2577
  LPD3DVALIDATECALLBACK = TD3DValidateCallback;
5827
      dwOffset: DWORD): HResult; stdcall;
2578
 
-
 
2579
  TD3DEnumTextureFormatsCalback = function(const lpDdsd: TDDSurfaceDesc;
5828
  TD3DEnumTextureFormatsCallback = function (var lpDdsd: TDDSurfaceDesc;
2580
      lpContext: Pointer): HResult; stdcall;
5829
      lpContext: Pointer): HResult; stdcall;
2581
  LPD3DENUMTEXTUREFORMATSCALLBACK = TD3DEnumTextureFormatsCalback;
-
 
2582
 
-
 
2583
  TD3DEnumPixelFormatsCallback = function(const lpDDPixFmt: TDDPixelFormat;
5830
  TD3DEnumPixelFormatsCallback = function (var lpDDPixFmt: TDDPixelFormat;
2584
      lpContext: Pointer): HResult; stdcall;
5831
      lpContext: Pointer): HResult; stdcall;
2585
 
5832
 
-
 
5833
 
-
 
5834
  PD3DMaterialHandle = ^TD3DMaterialHandle;
2586
  TD3DMaterialHandle = DWORD;
5835
  TD3DMaterialHandle = DWORD;
2587
  D3DMATERIALHANDLE = TD3DMaterialHandle;
-
 
2588
 
5836
 
-
 
5837
  PD3DTextureHandle = ^TD3DTextureHandle;
2589
  TD3DTextureHandle = DWORD;
5838
  TD3DTextureHandle = DWORD;
2590
  D3DTEXTUREHANDLE = TD3DTextureHandle;
-
 
2591
 
5839
 
-
 
5840
  PD3DMatrixHandle = ^TD3DMatrixHandle;
2592
  TD3DMatrixHandle = DWORD;
5841
  TD3DMatrixHandle = DWORD;
2593
  D3DMATRIXHANDLE = TD3DMatrixHandle;
-
 
2594
 
-
 
2595
{ TD3DColorValue structure }
-
 
2596
 
5842
 
2597
  PD3DColorValue = ^TD3DColorValue;
5843
  PD3DColorValue = ^TD3DColorValue;
2598
  TD3DColorValue = record
5844
  TD3DColorValue = packed record
2599
    case Integer of
5845
    case Integer of
2600
    0: (
5846
    0: (
2601
      r: TD3DValue;
5847
      r: TD3DValue;
2602
      g: TD3DValue;
5848
      g: TD3DValue;
2603
      b: TD3DValue;
5849
      b: TD3DValue;
Line 2609... Line 5855...
2609
      dvB: TD3DValue;
5855
      dvB: TD3DValue;
2610
      dvA: TD3DValue;
5856
      dvA: TD3DValue;
2611
      );
5857
     );
2612
  end;
5858
  end;
2613
 
5859
 
2614
  D3DCOLORVALUE = TD3DColorValue;
-
 
2615
 
-
 
2616
{ TD3DRect structure }
-
 
2617
 
-
 
2618
  PD3DRect = ^TD3DRect;
5860
  PD3DRect = ^TD3DRect;
2619
  TD3DRect = record
5861
  TD3DRect = packed record
2620
    case Integer of
5862
    case Integer of
2621
    0: (
5863
    0: (
2622
      x1: Longint;
5864
      x1: LongInt;
2623
      y1: Longint;
5865
      y1: LongInt;
2624
      x2: Longint;
5866
      x2: LongInt;
2625
      y2: Longint;
5867
      y2: LongInt;
2626
      );
5868
     );
2627
    1: (
5869
    1: (
2628
      lX1: Longint;
5870
      lX1: LongInt;
2629
      lY1: Longint;
5871
      lY1: LongInt;
2630
      lX2: Longint;
5872
      lX2: LongInt;
2631
      lY2: Longint;
5873
      lY2: LongInt;
-
 
5874
     );
-
 
5875
     2: (
-
 
5876
       a: array[0..3] of LongInt;
2632
      );
5877
     );
2633
  end;
5878
  end;
2634
 
5879
 
2635
  D3DRECT = TD3DRect;
-
 
2636
  LPD3DRECT = PD3DRect;
-
 
2637
 
-
 
2638
{ TD3DVector structure }
-
 
2639
 
-
 
2640
  PD3DVector = ^TD3DVector;
5880
  PD3DVector = ^TD3DVector;
2641
  TD3DVector = record
5881
  TD3DVector = packed record
2642
    case Integer of
5882
    case Integer of
2643
    0: (
5883
    0: (
2644
      x: TD3DValue;
5884
      x: TD3DValue;
2645
      y: TD3DValue;
5885
      y: TD3DValue;
2646
      z: TD3DValue;
5886
      z: TD3DValue;
Line 2650... Line 5890...
2650
      dvY: TD3DValue;
5890
      dvY: TD3DValue;
2651
      dvZ: TD3DValue;
5891
      dvZ: TD3DValue;
2652
      );
5892
     );
2653
  end;
5893
  end;
2654
 
5894
 
-
 
5895
(******************************************************************
-
 
5896
 *                                                                *
-
 
5897
 *   D3DVec.inl                                                   *
-
 
5898
 *                                                                *
2655
  D3DVECTOR = TD3DVector;
5899
 *   Float-valued 3D vector class for Direct3D.                   *
-
 
5900
 *                                                                *
2656
  LPD3DVECTOR = PD3DVector;
5901
 *   Copyright (c) 1996-1998 Microsoft Corp. All rights reserved. *
-
 
5902
 *                                                                *
-
 
5903
 ******************************************************************)
2657
 
5904
 
2658
// Addition and subtraction
5905
    // Addition and subtraction
2659
function VectorAdd(v1, v2: TD3DVector) : TD3DVector;
5906
  function VectorAdd(const v1, v2: TD3DVector) : TD3DVector;
2660
function VectorSub(v1, v2: TD3DVector) : TD3DVector;
5907
  function VectorSub(const v1, v2: TD3DVector) : TD3DVector;
2661
// Scalar multiplication and division
5908
    // Scalar multiplication and division
2662
function VectorMulS(v: TD3DVector; s: TD3DValue) : TD3DVector;
5909
  function VectorMulS(const v: TD3DVector; s: TD3DValue) : TD3DVector;
2663
function VectorDivS(v: TD3DVector; s: TD3DValue) : TD3DVector;
5910
  function VectorDivS(const v: TD3DVector; s: TD3DValue) : TD3DVector;
2664
// Memberwise multiplication and division
5911
    // Memberwise multiplication and division
2665
function VectorMul(v1, v2: TD3DVector) : TD3DVector;
5912
  function VectorMul(const v1, v2: TD3DVector) : TD3DVector;
2666
function VectorDiv(v1, v2: TD3DVector) : TD3DVector;
5913
  function VectorDiv(const v1, v2: TD3DVector) : TD3DVector;
2667
// Vector dominance
5914
    // Vector dominance
2668
function VectorSmaller(v1, v2: TD3DVector) : boolean;
5915
  function VectorSmaller(v1, v2: TD3DVector) : boolean;
2669
function VectorSmallerEquel(v1, v2: TD3DVector) : boolean;
5916
  function VectorSmallerEquel(v1, v2: TD3DVector) : boolean;
2670
// Bitwise equality
5917
    // Bitwise equality
2671
function VectorEquel(v1, v2: TD3DVector) : boolean;
5918
  function VectorEquel(v1, v2: TD3DVector) : boolean;
2672
// Length-related functions
5919
    // Length-related functions
2673
function VectorSquareMagnitude(v: TD3DVector) : TD3DValue;
5920
  function VectorSquareMagnitude(v: TD3DVector) : TD3DValue;
2674
function VectorMagnitude(v: TD3DVector) : TD3DValue;
5921
  function VectorMagnitude(v: TD3DVector) : TD3DValue;
2675
// Returns vector with same direction and unit length
5922
    // Returns vector with same direction and unit length
2676
function VectorNormalize(v: TD3DVector) : TD3DVector;
5923
  function VectorNormalize(const v: TD3DVector) : TD3DVector;
2677
// Return min/max component of the input vector
5924
    // Return min/max component of the input vector
2678
function VectorMin(v: TD3DVector) : TD3DValue;
5925
  function VectorMin(v: TD3DVector) : TD3DValue;
2679
function VectorMax(v: TD3DVector) : TD3DValue;
5926
  function VectorMax(v: TD3DVector) : TD3DValue;
2680
// Return memberwise min/max of input vectors
5927
    // Return memberwise min/max of input vectors
2681
function VectorMinimize(v1, v2: TD3DVector) : TD3DVector;
5928
  function VectorMinimize(const v1, v2: TD3DVector) : TD3DVector;
2682
function VectorMaximize(v1, v2: TD3DVector) : TD3DVector;
5929
  function VectorMaximize(const v1, v2: TD3DVector) : TD3DVector;
2683
// Dot and cross product
5930
    // Dot and cross product
2684
function VectorDotProduct(v1, v2: TD3DVector) : TD3DValue;
5931
  function VectorDotProduct(v1, v2: TD3DVector) : TD3DValue;
2685
function VectorCrossProduct(v1, v2: TD3DVector) : TD3DVector;
5932
  function VectorCrossProduct(const v1, v2: TD3DVector) : TD3DVector;
2686
 
5933
 
2687
type
5934
type
-
 
5935
(*
2688
{ Vertex data types supported in an ExecuteBuffer. }
5936
 * Vertex data types supported in an ExecuteBuffer.
-
 
5937
 *)
2689
 
5938
 
-
 
5939
(*
2690
{ TD3DHVertex structure }
5940
 * Homogeneous vertices
-
 
5941
 *)
2691
 
5942
 
2692
  PD3DHVertex = ^TD3DHVertex;
5943
  PD3DHVertex = ^TD3DHVertex;
2693
  TD3DHVertex = record
5944
  TD3DHVertex = packed record
2694
    dwFlags: DWORD;        // Homogeneous clipping flags
5945
    dwFlags: DWORD;        (* Homogeneous clipping flags *)
2695
    case Integer of
5946
    case Integer of
2696
    0: (
5947
    0: (
2697
      hx: TD3DValue;
5948
      hx: TD3DValue;
2698
      hy: TD3DValue;
5949
      hy: TD3DValue;
2699
      hz: TD3DValue;
5950
      hz: TD3DValue;
Line 2703... Line 5954...
2703
      dvHY: TD3DValue;
5954
      dvHY: TD3DValue;
2704
      dvHZ: TD3DValue;
5955
      dvHZ: TD3DValue;
2705
      );
5956
     );
2706
  end;
5957
  end;
2707
 
5958
 
2708
  D3DHVERTEX = TD3DHVertex;
-
 
2709
 
5959
(*
2710
{ TD3DTLVertex structure }
5960
 * Transformed/lit vertices
-
 
5961
 *)
2711
 
5962
 
2712
  PD3DTLVertex = ^TD3DTLVertex;
5963
  PD3DTLVertex = ^TD3DTLVertex;
2713
  TD3DTLVertex = record
5964
  TD3DTLVertex = packed record
2714
    case Integer of
5965
    case Integer of
2715
    0: (
5966
    0: (
2716
      sx: TD3DValue;             // Screen coordinates
5967
      sx: TD3DValue;             (* Screen coordinates *)
2717
      sy: TD3DValue;
5968
      sy: TD3DValue;
2718
      sz: TD3DValue;
5969
      sz: TD3DValue;
2719
      rhw: TD3DValue;            // Reciprocal of homogeneous w
5970
      rhw: TD3DValue;            (* Reciprocal of homogeneous w *)
2720
      color: TD3DColor;          // Vertex color
5971
      color: TD3DColor;          (* Vertex color *)
2721
      specular: TD3DColor;       // Specular component of vertex
5972
      specular: TD3DColor;       (* Specular component of vertex *)
2722
      tu: TD3DValue;             // Texture coordinates
5973
      tu: TD3DValue;             (* Texture coordinates *)
2723
      tv: TD3DValue;
5974
      tv: TD3DValue;
2724
      );
5975
     );
2725
    1: (
5976
    1: (
2726
      dvSX: TD3DValue;
5977
      dvSX: TD3DValue;
2727
      dvSY: TD3DValue;
5978
      dvSY: TD3DValue;
Line 2732... Line 5983...
2732
      dvTU: TD3DValue;
5983
      dvTU: TD3DValue;
2733
      dvTV: TD3DValue;
5984
      dvTV: TD3DValue;
2734
      );
5985
     );
2735
  end;
5986
  end;
2736
 
5987
 
2737
  D3DTLVERTEX = TD3DTLVertex;
-
 
2738
 
5988
(*
2739
{ TD3DLVertex structure }
5989
 * Untransformed/lit vertices
-
 
5990
 *)
2740
 
5991
 
2741
  PD3DLVertex = ^TD3DLVertex;
5992
  PD3DLVertex = ^TD3DLVertex;
2742
  TD3DLVertex = record
5993
  TD3DLVertex = packed record
2743
    case Integer of
5994
    case Integer of
2744
    0: (
5995
    0: (
2745
      x: TD3DValue;             // Homogeneous coordinates
5996
      x: TD3DValue;             (* Homogeneous coordinates *)
2746
      y: TD3DValue;
5997
      y: TD3DValue;
2747
      z: TD3DValue;
5998
      z: TD3DValue;
2748
      dwReserved: DWORD;
5999
      dwReserved: DWORD;
2749
      color: TD3DColor;         // Vertex color
6000
      color: TD3DColor;         (* Vertex color *)
2750
      specular: TD3DColor;      // Specular component of vertex
6001
      specular: TD3DColor;      (* Specular component of vertex *)
2751
      tu: TD3DValue;            // Texture coordinates
6002
      tu: TD3DValue;            (* Texture coordinates *)
2752
      tv: TD3DValue;
6003
      tv: TD3DValue;
2753
      );
6004
     );
2754
    1: (
6005
    1: (
2755
      dvX: TD3DValue;
6006
      dvX: TD3DValue;
2756
      dvY: TD3DValue;
6007
      dvY: TD3DValue;
2757
      dvZ: TD3DValue;
6008
      dvZ: TD3DValue;
2758
      _union1d: DWORD;
6009
      UNIONFILLER1d: DWORD;
2759
      dcColor: TD3DColor;
6010
      dcColor: TD3DColor;
2760
      dcSpecular: TD3DColor;
6011
      dcSpecular: TD3DColor;
2761
      dvTU: TD3DValue;
6012
      dvTU: TD3DValue;
2762
      dvTV: TD3DValue;
6013
      dvTV: TD3DValue;
2763
      );
6014
     );
2764
  end;
6015
  end;
2765
 
6016
 
2766
  D3DLVERTEX = TD3DLVertex;
-
 
2767
 
6017
(*
2768
{ TD3DVertex structure }
6018
 * Untransformed/unlit vertices
-
 
6019
 *)
2769
 
6020
 
2770
  PD3DVertex = ^TD3DVertex;
6021
  PD3DVertex = ^TD3DVertex;
2771
  TD3DVertex = record
6022
  TD3DVertex = packed record
2772
    case Integer of
6023
    case Integer of
2773
    0: (
6024
    0: (
2774
      x: TD3DValue;             // Homogeneous coordinates
6025
      x: TD3DValue;             (* Homogeneous coordinates *)
2775
      y: TD3DValue;
6026
      y: TD3DValue;
2776
      z: TD3DValue;
6027
      z: TD3DValue;
2777
      nx: TD3DValue;            // Normal
6028
      nx: TD3DValue;            (* Normal *)
2778
      ny: TD3DValue;
6029
      ny: TD3DValue;
2779
      nz: TD3DValue;
6030
      nz: TD3DValue;
2780
      tu: TD3DValue;            // Texture coordinates
6031
      tu: TD3DValue;            (* Texture coordinates *)
2781
      tv: TD3DValue;
6032
      tv: TD3DValue;
2782
      );
6033
     );
2783
    1: (
6034
    1: (
2784
      dvX: TD3DValue;
6035
      dvX: TD3DValue;
2785
      dvY: TD3DValue;
6036
      dvY: TD3DValue;
Line 2790... Line 6041...
2790
      dvTU: TD3DValue;
6041
      dvTU: TD3DValue;
2791
      dvTV: TD3DValue;
6042
      dvTV: TD3DValue;
2792
      );
6043
     );
2793
  end;
6044
  end;
2794
 
6045
 
2795
  D3DVERTEX = TD3DVertex;
-
 
2796
 
6046
(*
2797
{ TD3DMatrix structure }
6047
 * Matrix, viewport, and tranformation structures and definitions.
-
 
6048
 *)
2798
 
6049
 
2799
  PD3DMatrix = ^TD3DMatrix;
6050
  PD3DMatrix = ^TD3DMatrix;
2800
  TD3DMatrix = record
6051
  TD3DMatrix = packed record
-
 
6052
    case integer of
2801
    _11, _12, _13, _14: TD3DValue;
6053
      0 : (_11, _12, _13, _14: TD3DValue;
2802
    _21, _22, _23, _24: TD3DValue;
6054
           _21, _22, _23, _24: TD3DValue;
2803
    _31, _32, _33, _34: TD3DValue;
6055
           _31, _32, _33, _34: TD3DValue;
2804
    _41, _42, _43, _44: TD3DValue;
6056
           _41, _42, _43, _44: TD3DValue);
-
 
6057
      1 : (m : array [0..3, 0..3] of TD3DValue);
2805
  end;
6058
  end;
2806
 
6059
 
2807
  D3DMATRIX = TD3DMatrix;
-
 
2808
 
-
 
2809
{ TD3DViewport structure }
-
 
2810
 
-
 
2811
  PD3DViewport = ^TD3DViewport;
6060
  PD3DViewport = ^TD3DViewport;
2812
  TD3DViewport = record
6061
  TD3DViewport = packed record
2813
    dwSize: DWORD;
6062
    dwSize: DWORD;
2814
    dwX: DWORD;
6063
    dwX: DWORD;
2815
    dwY: DWORD;               // Top left
6064
    dwY: DWORD;                (* Top left *)
2816
    dwWidth: DWORD;
6065
    dwWidth: DWORD;
2817
    dwHeight: DWORD;          // Dimensions
6066
    dwHeight: DWORD;           (* Dimensions *)
2818
    dvScaleX: TD3DValue;       // Scale homogeneous to screen
6067
    dvScaleX: TD3DValue;       (* Scale homogeneous to screen *)
2819
    dvScaleY: TD3DValue;       // Scale homogeneous to screen
6068
    dvScaleY: TD3DValue;       (* Scale homogeneous to screen *)
2820
    dvMaxX: TD3DValue;         // Min/max homogeneous x coord
6069
    dvMaxX: TD3DValue;         (* Min/max homogeneous x coord *)
2821
    dvMaxY: TD3DValue;         // Min/max homogeneous y coord
6070
    dvMaxY: TD3DValue;         (* Min/max homogeneous y coord *)
2822
    dvMinZ: TD3DValue;
6071
    dvMinZ: TD3DValue;
2823
    dvMaxZ: TD3DValue;         // Min/max homogeneous z coord
6072
    dvMaxZ: TD3DValue;         (* Min/max homogeneous z coord *)
2824
  end;
6073
  end;
2825
 
6074
 
2826
  D3DVIEWPORT = TD3DViewport;
-
 
2827
 
-
 
2828
{ TD3DViewport2 structure }
-
 
2829
 
-
 
2830
  PD3DViewport2 = ^TD3DViewport2;
6075
  PD3DViewport2 = ^TD3DViewport2;
2831
  TD3DViewport2 = record
6076
  TD3DViewport2 = packed record
2832
    dwSize: DWORD;
6077
    dwSize: DWORD;
2833
    dwX: DWORD;
6078
    dwX: DWORD;
2834
    dwY: DWORD;               // Top left
6079
    dwY: DWORD;                (* Viewport Top left *)
2835
    dwWidth: DWORD;
6080
    dwWidth: DWORD;
2836
    dwHeight: DWORD;          // Dimensions
6081
    dwHeight: DWORD;           (* Viewport Dimensions *)
2837
    dvClipX: TD3DValue;        // Top left of clip volume
6082
    dvClipX: TD3DValue;        (* Top left of clip volume *)
2838
    dvClipY: TD3DValue;
6083
    dvClipY: TD3DValue;
2839
    dvClipWidth: TD3DValue;    // Clip Volume Dimensions
6084
    dvClipWidth: TD3DValue;    (* Clip Volume Dimensions *)
2840
    dvClipHeight: TD3DValue;
6085
    dvClipHeight: TD3DValue;
-
 
6086
    dvMinZ: TD3DValue;         (* Min/max of clip Volume *)
2841
    dvMinZ: TD3DValue;
6087
    dvMaxZ: TD3DValue;
2842
    dvMaxZ: TD3DValue;         // Min/max homogeneous z coord
-
 
2843
  end;
6088
  end;
2844
 
6089
 
2845
  D3DVIEWPORT2 = TD3DViewport2;
-
 
2846
 
-
 
2847
{ TD3DViewport2 structure }
-
 
2848
 
-
 
2849
  PD3DViewport7 = ^TD3DViewport7;
6090
  PD3DViewport7 = ^TD3DViewport7;
2850
  TD3DViewport7 = record
6091
  TD3DViewport7 = packed record
2851
    dwX: DWORD;
6092
    dwX: DWORD;
2852
    dwY: DWORD;               // Top left
6093
    dwY: DWORD;                (* Viewport Top left *)
2853
    dwWidth: DWORD;
6094
    dwWidth: DWORD;
2854
    dwHeight: DWORD;          // Dimensions
6095
    dwHeight: DWORD;           (* Viewport Dimensions *)
-
 
6096
    dvMinZ: TD3DValue;         (* Min/max of clip Volume *)
2855
    dvMinZ: TD3DValue;
6097
    dvMaxZ: TD3DValue;
2856
    dvMaxZ: TD3DValue;         // Min/max homogeneous z coord
-
 
2857
  end;
6098
  end;
2858
 
6099
 
-
 
6100
(*
2859
  D3DVIEWPORT7 = TD3DViewport7;
6101
 * Values for clip fields.
-
 
6102
 *)
2860
 
6103
 
2861
const
6104
const
2862
{ Max number of user clipping planes, supported in D3D. }
6105
// Max number of user clipping planes, supported in D3D.
2863
  D3DMAXUSERCLIPPLANES = 32;
6106
  D3DMAXUSERCLIPPLANES  = 32;
2864
 
6107
 
2865
{ These bits could be ORed together to use with D3DRENDERSTATE_CLIPPLANEENABLE }
6108
// These bits could be ORed together to use with D3DRENDERSTATE_CLIPPLANEENABLE
-
 
6109
//
2866
  D3DCLIPPLANE0 = 1 shl 0;
6110
  D3DCLIPPLANE0 = (1 shl 0);
2867
  D3DCLIPPLANE1 = 1 shl 1;
6111
  D3DCLIPPLANE1 = (1 shl 1);
2868
  D3DCLIPPLANE2 = 1 shl 2;
6112
  D3DCLIPPLANE2 = (1 shl 2);
2869
  D3DCLIPPLANE3 = 1 shl 3;
6113
  D3DCLIPPLANE3 = (1 shl 3);
2870
  D3DCLIPPLANE4 = 1 shl 4;
6114
  D3DCLIPPLANE4 = (1 shl 4);
2871
  D3DCLIPPLANE5 = 1 shl 5;
6115
  D3DCLIPPLANE5 = (1 shl 5);
2872
 
-
 
2873
{ Values for clip fields. }
-
 
2874
 
6116
 
-
 
6117
const
2875
  D3DCLIP_LEFT   = $00000001;
6118
  D3DCLIP_LEFT                            = $00000001;
2876
  D3DCLIP_RIGHT  = $00000002;
6119
  D3DCLIP_RIGHT                           = $00000002;
2877
  D3DCLIP_TOP    = $00000004;
6120
  D3DCLIP_TOP                             = $00000004;
2878
  D3DCLIP_BOTTOM = $00000008;
6121
  D3DCLIP_BOTTOM                          = $00000008;
2879
  D3DCLIP_FRONT  = $00000010;
6122
  D3DCLIP_FRONT                           = $00000010;
Line 2883... Line 6126...
2883
  D3DCLIP_GEN2   = $00000100;
6126
  D3DCLIP_GEN2                            = $00000100;
2884
  D3DCLIP_GEN3   = $00000200;
6127
  D3DCLIP_GEN3                            = $00000200;
2885
  D3DCLIP_GEN4   = $00000400;
6128
  D3DCLIP_GEN4                            = $00000400;
2886
  D3DCLIP_GEN5   = $00000800;
6129
  D3DCLIP_GEN5                            = $00000800;
2887
 
6130
 
-
 
6131
(*
2888
{ Values for d3d status. }
6132
 * Values for d3d status.
-
 
6133
 *)
2889
 
6134
 
2890
  D3DSTATUS_CLIPUNIONLEFT   = D3DCLIP_LEFT;
6135
  D3DSTATUS_CLIPUNIONLEFT                 = D3DCLIP_LEFT;
2891
  D3DSTATUS_CLIPUNIONRIGHT  = D3DCLIP_RIGHT;
6136
  D3DSTATUS_CLIPUNIONRIGHT                = D3DCLIP_RIGHT;
2892
  D3DSTATUS_CLIPUNIONTOP    = D3DCLIP_TOP;
6137
  D3DSTATUS_CLIPUNIONTOP                  = D3DCLIP_TOP;
2893
  D3DSTATUS_CLIPUNIONBOTTOM = D3DCLIP_BOTTOM;
6138
  D3DSTATUS_CLIPUNIONBOTTOM               = D3DCLIP_BOTTOM;
Line 2911... Line 6156...
2911
  D3DSTATUS_CLIPINTERSECTIONGEN2   = $00100000;
6156
  D3DSTATUS_CLIPINTERSECTIONGEN2          = $00100000;
2912
  D3DSTATUS_CLIPINTERSECTIONGEN3   = $00200000;
6157
  D3DSTATUS_CLIPINTERSECTIONGEN3          = $00200000;
2913
  D3DSTATUS_CLIPINTERSECTIONGEN4   = $00400000;
6158
  D3DSTATUS_CLIPINTERSECTIONGEN4          = $00400000;
2914
  D3DSTATUS_CLIPINTERSECTIONGEN5   = $00800000;
6159
  D3DSTATUS_CLIPINTERSECTIONGEN5          = $00800000;
2915
  D3DSTATUS_ZNOTVISIBLE            = $01000000;
6160
  D3DSTATUS_ZNOTVISIBLE                   = $01000000;
-
 
6161
(* Do not use 0x80000000 for any status flags in future as it is reserved *)
2916
 
6162
 
2917
  D3DSTATUS_CLIPUNIONALL =
6163
  D3DSTATUS_CLIPUNIONALL = (
2918
    D3DSTATUS_CLIPUNIONLEFT or
6164
            D3DSTATUS_CLIPUNIONLEFT or
2919
    D3DSTATUS_CLIPUNIONRIGHT or
6165
            D3DSTATUS_CLIPUNIONRIGHT or
2920
    D3DSTATUS_CLIPUNIONTOP or
6166
            D3DSTATUS_CLIPUNIONTOP or
2921
    D3DSTATUS_CLIPUNIONBOTTOM or
6167
            D3DSTATUS_CLIPUNIONBOTTOM or
2922
    D3DSTATUS_CLIPUNIONFRONT or
6168
            D3DSTATUS_CLIPUNIONFRONT or
Line 2924... Line 6170...
2924
    D3DSTATUS_CLIPUNIONGEN0 or
6170
            D3DSTATUS_CLIPUNIONGEN0 or
2925
    D3DSTATUS_CLIPUNIONGEN1 or
6171
            D3DSTATUS_CLIPUNIONGEN1 or
2926
    D3DSTATUS_CLIPUNIONGEN2 or
6172
            D3DSTATUS_CLIPUNIONGEN2 or
2927
    D3DSTATUS_CLIPUNIONGEN3 or
6173
            D3DSTATUS_CLIPUNIONGEN3 or
2928
    D3DSTATUS_CLIPUNIONGEN4 or
6174
            D3DSTATUS_CLIPUNIONGEN4 or
2929
    D3DSTATUS_CLIPUNIONGEN5;
6175
            D3DSTATUS_CLIPUNIONGEN5);
2930
 
6176
 
2931
  D3DSTATUS_CLIPINTERSECTIONALL =
6177
  D3DSTATUS_CLIPINTERSECTIONALL = (
2932
    D3DSTATUS_CLIPINTERSECTIONLEFT or
6178
            D3DSTATUS_CLIPINTERSECTIONLEFT or
2933
    D3DSTATUS_CLIPINTERSECTIONRIGHT or
6179
            D3DSTATUS_CLIPINTERSECTIONRIGHT or
2934
    D3DSTATUS_CLIPINTERSECTIONTOP or
6180
            D3DSTATUS_CLIPINTERSECTIONTOP or
2935
    D3DSTATUS_CLIPINTERSECTIONBOTTOM or
6181
            D3DSTATUS_CLIPINTERSECTIONBOTTOM or
2936
    D3DSTATUS_CLIPINTERSECTIONFRONT or
6182
            D3DSTATUS_CLIPINTERSECTIONFRONT or
Line 2938... Line 6184...
2938
    D3DSTATUS_CLIPINTERSECTIONGEN0 or
6184
            D3DSTATUS_CLIPINTERSECTIONGEN0 or
2939
    D3DSTATUS_CLIPINTERSECTIONGEN1 or
6185
            D3DSTATUS_CLIPINTERSECTIONGEN1 or
2940
    D3DSTATUS_CLIPINTERSECTIONGEN2 or
6186
            D3DSTATUS_CLIPINTERSECTIONGEN2 or
2941
    D3DSTATUS_CLIPINTERSECTIONGEN3 or
6187
            D3DSTATUS_CLIPINTERSECTIONGEN3 or
2942
    D3DSTATUS_CLIPINTERSECTIONGEN4 or
6188
            D3DSTATUS_CLIPINTERSECTIONGEN4 or
2943
    D3DSTATUS_CLIPINTERSECTIONGEN5;
6189
            D3DSTATUS_CLIPINTERSECTIONGEN5);
2944
 
6190
 
2945
  D3DSTATUS_DEFAULT = (
6191
  D3DSTATUS_DEFAULT = (
2946
    D3DSTATUS_CLIPINTERSECTIONALL or
6192
            D3DSTATUS_CLIPINTERSECTIONALL or
2947
    D3DSTATUS_ZNOTVISIBLE );
6193
            D3DSTATUS_ZNOTVISIBLE);
2948
 
6194
 
-
 
6195
(*
2949
{ Options for direct transform calls }
6196
 * Options for direct transform calls
-
 
6197
 *)
2950
 
6198
 
2951
  D3DTRANSFORM_CLIPPED       = $00000001;
6199
  D3DTRANSFORM_CLIPPED       = $00000001;
2952
  D3DTRANSFORM_UNCLIPPED     = $00000002;
6200
  D3DTRANSFORM_UNCLIPPED     = $00000002;
2953
 
6201
 
2954
type
6202
type
2955
{ TD3DTransformData structure }
-
 
2956
 
-
 
2957
  PD3DTransformData = ^TD3DTransformData;
6203
  PD3DTransformData = ^TD3DTransformData;
2958
  TD3DTransformData = record
6204
  TD3DTransformData = packed record
2959
    dwSize: DWORD;
6205
    dwSize: DWORD;
2960
    lpIn: Pointer;             // Input vertices
6206
    lpIn: Pointer;             (* Input vertices *)
2961
    dwInSize: DWORD;           // Stride of input vertices
6207
    dwInSize: DWORD;           (* Stride of input vertices *)
2962
    lpOut: Pointer;            // Output vertices
6208
    lpOut: Pointer;            (* Output vertices *)
2963
    dwOutSize: DWORD;          // Stride of output vertices
6209
    dwOutSize: DWORD;          (* Stride of output vertices *)
2964
    lpHOut: PD3DHVertex;       // Output homogeneous vertices
6210
    lpHOut: ^TD3DHVertex;       (* Output homogeneous vertices *)
2965
    dwClip: DWORD;             // Clipping hint
6211
    dwClip: DWORD;             (* Clipping hint *)
2966
    dwClipIntersection: DWORD;
6212
    dwClipIntersection: DWORD;
2967
    dwClipUnion: DWORD;        // Union of all clip flags
6213
    dwClipUnion: DWORD;        (* Union of all clip flags *)
2968
    drExtent: TD3DRect;         // Extent of transformed vertices
6214
    drExtent: TD3DRect;         (* Extent of transformed vertices *)
2969
  end;
6215
  end;
2970
 
6216
 
2971
  D3DTRANSFORMDATA = TD3DTransformData;
-
 
2972
  LPD3DTRANSFORMDATA = PD3DTransformData;
-
 
2973
 
6217
(*
2974
{ TD3DLightingElement structure }
6218
 * Structure defining position and direction properties for lighting.
-
 
6219
 *)
2975
 
6220
 
2976
  PD3DLightingElement = ^TD3DLightingElement;
6221
  PD3DLightingElement = ^TD3DLightingElement;
2977
  TD3DLightingElement = record
6222
  TD3DLightingElement = packed record
2978
    dvPosition: TD3DVector;           // Lightable point in model space
6223
    dvPosition: TD3DVector;           (* Lightable point in model space *)
2979
    dvNormal: TD3DVector;             // Normalised unit vector
6224
    dvNormal: TD3DVector;             (* Normalised unit vector *)
2980
  end;
6225
  end;
2981
 
6226
 
2982
  D3DLIGHTINGELEMENT = TD3DLightingElement;
-
 
2983
  LPD3DLIGHTINGELEMENT = PD3DLightingElement;
-
 
2984
 
6227
(*
2985
{ TD3DMaterial structure }
6228
 * Structure defining material properties for lighting.
-
 
6229
 *)
2986
 
6230
 
2987
  PD3DMaterial = ^TD3DMaterial;
6231
  PD3DMaterial = ^TD3DMaterial;
2988
  TD3DMaterial = record
6232
  TD3DMaterial = packed record
2989
    dwSize: DWORD;
6233
    dwSize: DWORD;
2990
    case Integer of
6234
    case Integer of
2991
    0: (
6235
    0: (
2992
      diffuse: TD3DColorValue;        // Diffuse color RGBA
6236
      diffuse: TD3DColorValue;        (* Diffuse color RGBA *)
2993
      ambient: TD3DColorValue;        // Ambient color RGB
6237
      ambient: TD3DColorValue;        (* Ambient color RGB *)
2994
      specular: TD3DColorValue;       // Specular 'shininess'
6238
      specular: TD3DColorValue;       (* Specular 'shininess' *)
2995
      emissive: TD3DColorValue;       // Emissive color RGB
6239
      emissive: TD3DColorValue;       (* Emissive color RGB *)
2996
      power: TD3DValue;               // Sharpness if specular highlight
6240
      power: TD3DValue;               (* Sharpness if specular highlight *)
2997
      hTexture: TD3DTextureHandle;    // Handle to texture map
6241
      hTexture: TD3DTextureHandle;    (* Handle to texture map *)
2998
      dwRampSize: DWORD;
6242
      dwRampSize: DWORD;
2999
      );
6243
     );
3000
    1: (
6244
    1: (
3001
      dcvDiffuse: TD3DColorValue;
6245
      dcvDiffuse: TD3DColorValue;
3002
      dcvAmbient: TD3DColorValue;
6246
      dcvAmbient: TD3DColorValue;
Line 3004... Line 6248...
3004
      dcvEmissive: TD3DColorValue;
6248
      dcvEmissive: TD3DColorValue;
3005
      dvPower: TD3DValue;
6249
      dvPower: TD3DValue;
3006
      );
6250
     );
3007
  end;
6251
  end;
3008
 
6252
 
3009
  D3DMATERIAL = TD3DMaterial;
-
 
3010
  LPD3DMATERIAL = PD3DMaterial;
-
 
3011
 
-
 
3012
{ TD3DMaterial7 structure }
-
 
3013
 
-
 
3014
  PD3DMaterial7 = ^TD3DMaterial7;
6253
  PD3DMaterial7 = ^TD3DMaterial7;
3015
  TD3DMaterial7 = record
6254
  TD3DMaterial7 = packed record
3016
    case Integer of
6255
    case Integer of
3017
    0: (
6256
    0: (
3018
      diffuse: TD3DColorValue;        // Diffuse color RGBA
6257
      diffuse: TD3DColorValue;        (* Diffuse color RGBA *)
3019
      ambient: TD3DColorValue;        // Ambient color RGB
6258
      ambient: TD3DColorValue;        (* Ambient color RGB *)
3020
      specular: TD3DColorValue;       // Specular 'shininess'
6259
      specular: TD3DColorValue;       (* Specular 'shininess' *)
3021
      emissive: TD3DColorValue;       // Emissive color RGB
6260
      emissive: TD3DColorValue;       (* Emissive color RGB *)
3022
      power: TD3DValue;               // Sharpness if specular highlight
6261
      power: TD3DValue;               (* Sharpness if specular highlight *)
3023
      );
6262
     );
3024
    1: (
6263
    1: (
3025
      dcvDiffuse: TD3DColorValue;
6264
      dcvDiffuse: TD3DColorValue;
3026
      dcvAmbient: TD3DColorValue;
6265
      dcvAmbient: TD3DColorValue;
3027
      dcvSpecular: TD3DColorValue;
6266
      dcvSpecular: TD3DColorValue;
3028
      dcvEmissive: TD3DColorValue;
6267
      dcvEmissive: TD3DColorValue;
3029
      dvPower: TD3DValue;
6268
      dvPower: TD3DValue;
3030
      );
6269
     );
3031
  end;
6270
  end;
3032
 
6271
 
3033
  D3DMATERIAL7 = TD3DMaterial7;
6272
  PD3DLightType = ^TD3DLightType;
3034
  LPD3DMATERIAL7 = PD3DMaterial7;
-
 
3035
 
-
 
3036
{ TD3DLightType }
-
 
3037
 
-
 
3038
  TD3DLightType = (
6273
  TD3DLightType = (
3039
    D3DLIGHT_INVALID_0,
6274
    D3DLIGHT_INVALID_0,
3040
    D3DLIGHT_POINT,
6275
    D3DLIGHT_POINT,
3041
    D3DLIGHT_SPOT,
6276
    D3DLIGHT_SPOT,
3042
    D3DLIGHT_DIRECTIONAL,
6277
    D3DLIGHT_DIRECTIONAL,
-
 
6278
// Note: The following light type (D3DLIGHT_PARALLELPOINT)
-
 
6279
// is no longer supported from D3D for DX7 onwards.
3043
    D3DLIGHT_PARALLELPOINT
6280
    D3DLIGHT_PARALLELPOINT,
3044
{$IFNDEF SupportDirectX5},D3DLIGHT_GLSPOT{$ENDIF}
6281
    D3DLIGHT_GLSPOT);
3045
  );
-
 
3046
 
6282
 
3047
  D3DLIGHTTYPE = TD3DLightType;
-
 
3048
 
6283
(*
3049
{ TD3DLight structure }
6284
 * Structure defining a light source and its properties.
-
 
6285
 *)
3050
 
6286
 
3051
  PD3DLight = ^TD3DLight;
6287
  PD3DLight = ^TD3DLight;
3052
  TD3DLight = record
6288
  TD3DLight = packed record
3053
    dwSize: DWORD;
6289
    dwSize: DWORD;
3054
    dltType: TD3DLightType;     // Type of light source
6290
    dltType: TD3DLightType;     (* Type of light source *)
3055
    dcvColor: TD3DColorValue;   // Color of light
6291
    dcvColor: TD3DColorValue;   (* Color of light *)
3056
    dvPosition: TD3DVector;     // Position in world space
6292
    dvPosition: TD3DVector;     (* Position in world space *)
3057
    dvDirection: TD3DVector;    // Direction in world space
6293
    dvDirection: TD3DVector;    (* Direction in world space *)
3058
    dvRange: TD3DValue;         // Cutoff range
6294
    dvRange: TD3DValue;         (* Cutoff range *)
3059
    dvFalloff: TD3DValue;       // Falloff
6295
    dvFalloff: TD3DValue;       (* Falloff *)
3060
    dvAttenuation0: TD3DValue;  // Constant attenuation
6296
    dvAttenuation0: TD3DValue;  (* Constant attenuation *)
3061
    dvAttenuation1: TD3DValue;  // Linear attenuation
6297
    dvAttenuation1: TD3DValue;  (* Linear attenuation *)
3062
    dvAttenuation2: TD3DValue;  // Quadratic attenuation
6298
    dvAttenuation2: TD3DValue;  (* Quadratic attenuation *)
3063
    dvTheta: TD3DValue;         // Inner angle of spotlight cone
6299
    dvTheta: TD3DValue;         (* Inner angle of spotlight cone *)
3064
    dvPhi: TD3DValue;           // Outer angle of spotlight cone
6300
    dvPhi: TD3DValue;           (* Outer angle of spotlight cone *)
3065
  end;
6301
  end;
3066
 
6302
 
3067
  D3DLIGHT = TD3DLight;
-
 
3068
  LPD3DLIGHT = PD3DLight;
-
 
3069
 
-
 
3070
{ TD3DLight7 structure }
-
 
3071
 
-
 
3072
  PD3DLight7 = ^TD3DLight7;
6303
  PD3DLight7 = ^TD3DLight7;
3073
  TD3DLight7 = record
6304
  TD3DLight7 = packed record
3074
    dltType: TD3DLightType;     // Type of light source
6305
    dltType: TD3DLightType;     (* Type of light source *)
3075
    dcvDiffuse: TD3DColorValue; // Diffuse color of light
6306
    dcvDiffuse: TD3DColorValue; (* Diffuse color of light *)
3076
    dcvSpecular: TD3DColorValue;// Specular color of light
6307
    dcvSpecular: TD3DColorValue;(* Specular color of light *)
3077
    dcvAmbient: TD3DColorValue; // Ambient color of light
6308
    dcvAmbient: TD3DColorValue; (* Ambient color of light *)
3078
    dvPosition: TD3DVector;     // Position in world space
6309
    dvPosition: TD3DVector;     (* Position in world space *)
3079
    dvDirection: TD3DVector;    // Direction in world space
6310
    dvDirection: TD3DVector;    (* Direction in world space *)
3080
    dvRange: TD3DValue;         // Cutoff range
6311
    dvRange: TD3DValue;         (* Cutoff range *)
3081
    dvFalloff: TD3DValue;       // Falloff
6312
    dvFalloff: TD3DValue;       (* Falloff *)
3082
    dvAttenuation0: TD3DValue;  // Constant attenuation
6313
    dvAttenuation0: TD3DValue;  (* Constant attenuation *)
3083
    dvAttenuation1: TD3DValue;  // Linear attenuation
6314
    dvAttenuation1: TD3DValue;  (* Linear attenuation *)
3084
    dvAttenuation2: TD3DValue;  // Quadratic attenuation
6315
    dvAttenuation2: TD3DValue;  (* Quadratic attenuation *)
3085
    dvTheta: TD3DValue;         // Inner angle of spotlight cone
6316
    dvTheta: TD3DValue;         (* Inner angle of spotlight cone *)
3086
    dvPhi: TD3DValue;           // Outer angle of spotlight cone
6317
    dvPhi: TD3DValue;           (* Outer angle of spotlight cone *)
3087
  end;
6318
  end;
3088
 
6319
 
3089
  D3DLIGHT7 = TD3DLight7;
-
 
3090
  LPD3DLIGHT7 = PD3DLight7;
-
 
3091
 
6320
(*
3092
{ Structure defining a light source and its properties. }
6321
 * Structure defining a light source and its properties.
-
 
6322
 *)
3093
 
6323
 
-
 
6324
(* flags bits *)
3094
const
6325
const
3095
{ flags bits }
-
 
3096
 
-
 
3097
  D3DLIGHT_ACTIVE                       = $00000001;
6326
  D3DLIGHT_ACTIVE                       = $00000001;
3098
  D3DLIGHT_NO_SPECULAR                  = $00000002;
6327
  D3DLIGHT_NO_SPECULAR  = $00000002;
3099
  D3DLIGHT_ALL                          = D3DLIGHT_ACTIVE or D3DLIGHT_NO_SPECULAR;
6328
  D3DLIGHT_ALL = D3DLIGHT_ACTIVE or D3DLIGHT_ACTIVE;
3100
 
6329
 
3101
{ maximum valid light range }
6330
(* maximum valid light range *)
3102
  D3DLIGHT_RANGE_MAX: TD3DValue = 3.4 * 10e+38;
6331
  D3DLIGHT_RANGE_MAX            = 1.8439088915e+18; //sqrt(FLT_MAX);
3103
 
6332
 
3104
type
6333
type
3105
{ TD3DLight2 structure }
-
 
3106
 
-
 
3107
  PD3DLight2 = ^TD3DLight2;
6334
  PD3DLight2 = ^TD3DLight2;
3108
  TD3DLight2 = record
6335
  TD3DLight2 = packed record
3109
    dwSize: DWORD;
6336
    dwSize: DWORD;
3110
    dltType: TD3DLightType;     // Type of light source
6337
    dltType: TD3DLightType;     (* Type of light source *)
3111
    dcvColor: TD3DColorValue;   // Color of light
6338
    dcvColor: TD3DColorValue;   (* Color of light *)
3112
    dvPosition: TD3DVector;     // Position in world space
6339
    dvPosition: TD3DVector;     (* Position in world space *)
3113
    dvDirection: TD3DVector;    // Direction in world space
6340
    dvDirection: TD3DVector;    (* Direction in world space *)
3114
    dvRange: TD3DValue;         // Cutoff range
6341
    dvRange: TD3DValue;         (* Cutoff range *)
3115
    dvFalloff: TD3DValue;       // Falloff
6342
    dvFalloff: TD3DValue;       (* Falloff *)
3116
    dvAttenuation0: TD3DValue;  // Constant attenuation
6343
    dvAttenuation0: TD3DValue;  (* Constant attenuation *)
3117
    dvAttenuation1: TD3DValue;  // Linear attenuation
6344
    dvAttenuation1: TD3DValue;  (* Linear attenuation *)
3118
    dvAttenuation2: TD3DValue;  // Quadratic attenuation
6345
    dvAttenuation2: TD3DValue;  (* Quadratic attenuation *)
3119
    dvTheta: TD3DValue;         // Inner angle of spotlight cone
6346
    dvTheta: TD3DValue;         (* Inner angle of spotlight cone *)
3120
    dvPhi: TD3DValue;           // Outer angle of spotlight cone
6347
    dvPhi: TD3DValue;           (* Outer angle of spotlight cone *)
3121
    dwFlags: DWORD;
6348
    dwFlags: DWORD;
3122
  end;
6349
  end;
3123
 
6350
 
3124
  D3DLIGHT2 = TD3DLight2;
-
 
3125
  LPD3DLIGHT2 = PD3DLight2;
-
 
3126
 
-
 
3127
{ TD3DLightData structure }
-
 
3128
 
-
 
3129
  PD3DLightData = ^TD3DLightData;
6351
  PD3DLightData = ^TD3DLightData;
3130
  TD3DLightData = record
6352
  TD3DLightData = packed record
3131
    dwSize: DWORD;
6353
    dwSize: DWORD;
3132
    lpIn: PD3DLightingElement;   // Input positions and normals
6354
    lpIn: ^TD3DLightingElement;   (* Input positions and normals *)
3133
    dwInSize: DWORD;             // Stride of input elements
6355
    dwInSize: DWORD;             (* Stride of input elements *)
3134
    lpOut: PD3DTLVertex;         // Output colors
6356
    lpOut: ^TD3DTLVertex;         (* Output colors *)
3135
    dwOutSize: DWORD;            // Stride of output colors
6357
    dwOutSize: DWORD;            (* Stride of output colors *)
3136
  end;
6358
  end;
3137
 
6359
 
3138
  D3DLIGHTDATA = TD3DLightData;
-
 
3139
  LPD3DLIGHTDATA = PD3DLightData;
-
 
3140
 
-
 
3141
(*
6360
(*
3142
 * Before DX5, these values were in an enum called
6361
 * Before DX5, these values were in an enum called
3143
 * D3DCOLORMODEL. This was not correct, since they are
6362
 * TD3DColorModel. This was not correct, since they are
3144
 * bit flags. A driver can surface either or both flags
6363
 * bit flags. A driver can surface either or both flags
3145
 * in the dcmColorModel member of D3DDEVICEDESC.
6364
 * in the dcmColorModel member of D3DDEVICEDESC.
3146
 *)
6365
 *)
3147
 
6366
 
3148
type
6367
type
3149
  TD3DColorModel = DWORD;
6368
  TD3DColorModel = DWORD;
3150
  D3DCOLORMODEL = TD3DColorModel;
-
 
3151
 
6369
 
3152
const
6370
const
3153
  D3DCOLOR_INVALID_0 = 0;
-
 
3154
  D3DCOLOR_MONO = 1;
6371
  D3DCOLOR_MONO = 1;
3155
  D3DCOLOR_RGB = 2;
6372
  D3DCOLOR_RGB  = 2;
3156
 
6373
 
-
 
6374
(*
3157
{ Options for clearing }
6375
 * Options for clearing
-
 
6376
 *)
3158
 
6377
 
3159
const
6378
const
3160
  D3DCLEAR_TARGET  = $00000001; // Clear target surface
6379
  D3DCLEAR_TARGET            = $00000001; (* Clear target surface *)
3161
  D3DCLEAR_ZBUFFER = $00000002; // Clear target z buffer
6380
  D3DCLEAR_ZBUFFER           = $00000002; (* Clear target z buffer *)
3162
  D3DCLEAR_STENCIL = $00000004; // Clear stencil planes
6381
  D3DCLEAR_STENCIL           = $00000004; (* Clear stencil planes *)
3163
 
6382
 
-
 
6383
(*
-
 
6384
 * Execute buffers are allocated via Direct3D.  These buffers may then
-
 
6385
 * be filled by the application with instructions to execute along with
-
 
6386
 * vertex data.
-
 
6387
 *)
-
 
6388
 
-
 
6389
(*
3164
{ Supported op codes for execute instructions. }
6390
 * Supported op codes for execute instructions.
-
 
6391
 *)
3165
 
6392
 
3166
type
6393
type
-
 
6394
  PD3DOpcode = ^TD3DOpcode;
3167
  TD3DOpcode = (
6395
  TD3DOpcode = (
3168
    D3DOP_INVALID_0,
6396
    D3DOP_INVALID_0,
3169
    D3DOP_POINT,
6397
    D3DOP_POINT,
3170
    D3DOP_LINE,
6398
    D3DOP_LINE,
3171
    D3DOP_TRIANGLE,
6399
    D3DOP_TRIANGLE,
Line 3177... Line 6405...
3177
    D3DOP_PROCESSVERTICES,
6405
    D3DOP_PROCESSVERTICES,
3178
    D3DOP_TEXTURELOAD,
6406
    D3DOP_TEXTURELOAD,
3179
    D3DOP_EXIT,
6407
    D3DOP_EXIT,
3180
    D3DOP_BRANCHFORWARD,
6408
    D3DOP_BRANCHFORWARD,
3181
    D3DOP_SPAN,
6409
    D3DOP_SPAN,
3182
    D3DOP_SETSTATUS
6410
    D3DOP_SETSTATUS);
3183
  );
-
 
3184
 
-
 
3185
  D3DOPCODE = TD3DOpcode;
-
 
3186
 
6411
 
3187
{ TD3DInstruction structure }
6412
  PD3DInstruction = ^TD3DInstruction;
3188
 
-
 
3189
  TD3DInstruction = record
6413
  TD3DInstruction = packed record
3190
    bOpcode: Byte;   // Instruction opcode
6414
    bOpcode: BYTE;   (* Instruction opcode *)
3191
    bSize: Byte;     // Size of each instruction data unit
6415
    bSize: BYTE;     (* Size of each instruction data unit *)
3192
    wCount: WORD;    // Count of instruction data units to follow
6416
    wCount: WORD;    (* Count of instruction data units to follow *)
3193
  end;
6417
  end;
3194
  D3DINSTRUCTION = TD3DInstruction;
-
 
3195
 
6418
 
-
 
6419
(*
3196
{ TD3DTextureLoad structure }
6420
 * Structure for texture loads
-
 
6421
 *)
3197
 
6422
 
-
 
6423
  PD3DTextureLoad = ^TD3DTextureLoad;
3198
  TD3DTextureLoad = record
6424
  TD3DTextureLoad = packed record
3199
    hDestTexture: TD3DTextureHandle;
6425
    hDestTexture: TD3DTextureHandle;
3200
    hSrcTexture: TD3DTextureHandle;
6426
    hSrcTexture: TD3DTextureHandle;
3201
  end;
6427
  end;
3202
  D3DTEXTURELOAD = TD3DTextureLoad;
-
 
3203
 
6428
 
-
 
6429
(*
3204
{ TD3DPickRecord structure }
6430
 * Structure for picking
-
 
6431
 *)
3205
 
6432
 
-
 
6433
  PD3DPickRecord = ^TD3DPickRecord;
3206
  TD3DPickRecord = record
6434
  TD3DPickRecord = packed record
3207
    bOpcode: BYTE;
6435
    bOpcode: BYTE;
3208
    bPad: BYTE;
6436
    bPad: BYTE;
3209
    dwOffset: DWORD;
6437
    dwOffset: DWORD;
3210
    dvZ: TD3DValue;
6438
    dvZ: TD3DValue;
3211
  end;
6439
  end;
3212
  D3DPICKRECORD = TD3DPickRecord;
-
 
3213
 
6440
 
-
 
6441
(*
-
 
6442
 * The following defines the rendering states which can be set in the
3214
{ TD3DShadeMode }
6443
 * execute buffer.
-
 
6444
 *)
3215
 
6445
 
-
 
6446
  PD3DShadeMode = ^TD3DShadeMode;
3216
  TD3DShadeMode = (
6447
  TD3DShadeMode = (
3217
    D3DSHADE_INVALID_0,
6448
    D3DSHADE_INVALID_0,
3218
    D3DSHADE_FLAT,
6449
    D3DSHADE_FLAT,
3219
    D3DSHADE_GOURAUD,
6450
    D3DSHADE_GOURAUD,
3220
    D3DSHADE_PHONG
6451
    D3DSHADE_PHONG);
3221
  );
-
 
3222
 
-
 
3223
  D3DSHADEMODE = TD3DShadeMode;
-
 
3224
 
-
 
3225
{ TD3DFillMode }
-
 
3226
 
6452
 
-
 
6453
  PD3DFillMode = ^TD3DFillMode;
3227
  TD3DFillMode = (
6454
  TD3DFillMode = (
3228
    D3DFILL_INVALID_0,
6455
    D3DFILL_INVALID_0,
3229
    D3DFILL_POINT,
6456
    D3DFILL_POINT,
3230
    D3DFILL_WIREFRAME,
6457
    D3DFILL_WIREFRAME,
3231
    D3DFILL_SOLID
6458
    D3DFILL_SOLID);
3232
  );
-
 
3233
 
6459
 
3234
  D3DFILLMODE = TD3DFillMode;
-
 
3235
 
-
 
3236
{ TD3DLinePattern structure }
6460
  PD3DLinePattern = ^TD3DLinePattern;
3237
 
-
 
3238
  TD3DLinePattern = record
6461
  TD3DLinePattern = packed record
3239
    wRepeatFactor: WORD;
6462
    wRepeatFactor: WORD;
3240
    wLinePattern: WORD;
6463
    wLinePattern: WORD;
3241
  end;
6464
  end;
3242
 
6465
 
3243
  D3DLINEPATTERN = TD3DLinePattern;
6466
  PD3DTextureFilter = ^TD3DTextureFilter;
3244
 
-
 
3245
{ TD3DTextureFilter }
-
 
3246
 
-
 
3247
  TD3DTextureFilter = (
6467
  TD3DTextureFilter = (
3248
    D3DFILTER_INVALID_0,
6468
    D3DFILTER_INVALID_0,
3249
    D3DFILTER_NEAREST,
6469
    D3DFILTER_NEAREST,
3250
    D3DFILTER_LINEAR,
6470
    D3DFILTER_LINEAR,
3251
    D3DFILTER_MIPNEAREST,
6471
    D3DFILTER_MIPNEAREST,
3252
    D3DFILTER_MIPLINEAR,
6472
    D3DFILTER_MIPLINEAR,
3253
    D3DFILTER_LINEARMIPNEAREST,
6473
    D3DFILTER_LINEARMIPNEAREST,
3254
    D3DFILTER_LINEARMIPLINEAR
6474
    D3DFILTER_LINEARMIPLINEAR);
3255
  );
-
 
3256
 
-
 
3257
  D3DTEXTUREFILTER = TD3DTextureFilter;
-
 
3258
 
-
 
3259
{ TD3DBlend }
-
 
3260
 
6475
 
-
 
6476
  PD3DBlend = ^TD3DBlend;
3261
  TD3DBlend = (
6477
  TD3DBlend = (
3262
    D3DBLEND_INVALID_0,
6478
    D3DBLEND_INVALID_0,
3263
    D3DBLEND_ZERO,
6479
    D3DBLEND_ZERO,
3264
    D3DBLEND_ONE,
6480
    D3DBLEND_ONE,
3265
    D3DBLEND_SRCCOLOR,
6481
    D3DBLEND_SRCCOLOR,
Line 3270... Line 6486...
3270
    D3DBLEND_INVDESTALPHA,
6486
    D3DBLEND_INVDESTALPHA,
3271
    D3DBLEND_DESTCOLOR,
6487
    D3DBLEND_DESTCOLOR,
3272
    D3DBLEND_INVDESTCOLOR,
6488
    D3DBLEND_INVDESTCOLOR,
3273
    D3DBLEND_SRCALPHASAT,
6489
    D3DBLEND_SRCALPHASAT,
3274
    D3DBLEND_BOTHSRCALPHA,
6490
    D3DBLEND_BOTHSRCALPHA,
3275
    D3DBLEND_BOTHINVSRCALPHA
6491
    D3DBLEND_BOTHINVSRCALPHA);
3276
  );
-
 
3277
 
-
 
3278
  D3DBLEND = TD3DBlend;
-
 
3279
 
-
 
3280
{ TD3DTextureBlend }
-
 
3281
 
6492
 
-
 
6493
  PD3DTextureBlend = ^TD3DTextureBlend;
3282
  TD3DTextureBlend = (
6494
  TD3DTextureBlend = (
3283
    D3DTBLEND_INVALID_0,
6495
    D3DTBLEND_INVALID_0,
3284
    D3DTBLEND_DECAL,
6496
    D3DTBLEND_DECAL,
3285
    D3DTBLEND_MODULATE,
6497
    D3DTBLEND_MODULATE,
3286
    D3DTBLEND_DECALALPHA,
6498
    D3DTBLEND_DECALALPHA,
3287
    D3DTBLEND_MODULATEALPHA,
6499
    D3DTBLEND_MODULATEALPHA,
3288
    D3DTBLEND_DECALMASK,
6500
    D3DTBLEND_DECALMASK,
3289
    D3DTBLEND_MODULATEMASK,
6501
    D3DTBLEND_MODULATEMASK,
3290
    D3DTBLEND_COPY,
6502
    D3DTBLEND_COPY,
3291
    D3DTBLEND_ADD
6503
    D3DTBLEND_ADD);
3292
  );
-
 
3293
 
-
 
3294
  D3DTEXTUREBLEND = TD3DTextureBlend;
-
 
3295
 
-
 
3296
{ TD3DTextureAddress }
-
 
3297
 
6504
 
-
 
6505
  PD3DTextureAddress = ^TD3DTextureAddress;
3298
  TD3DTextureAddress = (
6506
  TD3DTextureAddress = (
3299
    D3DTADDRESS_INVALID_0,
6507
    D3DTADDRESS_INVALID_0,
3300
    D3DTADDRESS_WRAP,
6508
    D3DTADDRESS_WRAP,
3301
    D3DTADDRESS_MIRROR,
6509
    D3DTADDRESS_MIRROR,
3302
    D3DTADDRESS_CLAMP,
6510
    D3DTADDRESS_CLAMP,
3303
    D3DTADDRESS_BORDER
6511
    D3DTADDRESS_BORDER);
3304
  );
-
 
3305
 
-
 
3306
  D3DTEXTUREADDRESS = TD3DTextureAddress;
-
 
3307
 
-
 
3308
{ TD3DCull }
-
 
3309
 
6512
 
-
 
6513
  PD3DCull = ^TD3DCull;
3310
  TD3DCull = (
6514
  TD3DCull = (
3311
    D3DCULL_INVALID_0,
6515
    D3DCULL_INVALID_0,
3312
    D3DCULL_NONE,
6516
    D3DCULL_NONE,
3313
    D3DCULL_CW,
6517
    D3DCULL_CW,
3314
    D3DCULL_CCW
6518
    D3DCULL_CCW);
3315
  );
-
 
3316
 
-
 
3317
  D3DCULL = TD3DCull;
-
 
3318
 
-
 
3319
{ TD3DCmpFunc }
-
 
3320
 
6519
 
-
 
6520
  PD3DCmpFunc = ^TD3DCmpFunc;
3321
  TD3DCmpFunc = (
6521
  TD3DCmpFunc = (
3322
    D3DCMP_INVALID_0,
6522
    D3DCMP_INVALID_0,
3323
    D3DCMP_NEVER,
6523
    D3DCMP_NEVER,
3324
    D3DCMP_LESS,
6524
    D3DCMP_LESS,
3325
    D3DCMP_EQUAL,
6525
    D3DCMP_EQUAL,
3326
    D3DCMP_LESSEQUAL,
6526
    D3DCMP_LESSEQUAL,
3327
    D3DCMP_GREATER,
6527
    D3DCMP_GREATER,
3328
    D3DCMP_NOTEQUAL,
6528
    D3DCMP_NOTEQUAL,
3329
    D3DCMP_GREATEREQUAL,
6529
    D3DCMP_GREATEREQUAL,
3330
    D3DCMP_ALWAYS
6530
    D3DCMP_ALWAYS);
3331
  );
-
 
3332
 
-
 
3333
  D3DCMPFUNC = TD3DCmpFunc;
-
 
3334
 
-
 
3335
{ TD3DStencilOp }
-
 
3336
 
6531
 
-
 
6532
  PD3DStencilOp = ^TD3DStencilOp;
3337
  TD3DStencilOp = (
6533
  TD3DStencilOp = (
3338
    D3DSTENCILOP_INVALID_0,
6534
    D3DSTENCILOP_INVALID_0,
3339
    D3DSTENCILOP_KEEP,
6535
    D3DSTENCILOP_KEEP,
3340
    D3DSTENCILOP_ZERO,
6536
    D3DSTENCILOP_ZERO,
3341
    D3DSTENCILOP_REPLACE,
6537
    D3DSTENCILOP_REPLACE,
3342
    D3DSTENCILOP_INCRSAT,
6538
    D3DSTENCILOP_INCRSAT,
3343
    D3DSTENCILOP_DECRSAT,
6539
    D3DSTENCILOP_DECRSAT,
3344
    D3DSTENCILOP_INVERT,
6540
    D3DSTENCILOP_INVERT,
3345
    D3DSTENCILOP_INCR,
6541
    D3DSTENCILOP_INCR,
3346
    D3DSTENCILOP_DECR
6542
    D3DSTENCILOP_DECR);
3347
  );
-
 
3348
 
-
 
3349
  D3DSTENCILOP = TD3DStencilOp;
-
 
3350
 
-
 
3351
{ TD3DFogMode }
-
 
3352
 
6543
   
-
 
6544
  PD3DFogMode = ^TD3DFogMode;
3353
  TD3DFogMode = (
6545
  TD3DFogMode = (
3354
    D3DFOG_NONE,
6546
    D3DFOG_NONE,
3355
    D3DFOG_EXP,
6547
    D3DFOG_EXP,
3356
    D3DFOG_EXP2,
6548
    D3DFOG_EXP2,
3357
    D3DFOG_LINEAR
6549
    D3DFOG_LINEAR);
3358
  );
-
 
3359
 
-
 
3360
  D3DFOGMODE = TD3DFogMode;
-
 
3361
 
-
 
3362
{ TD3DZBufferType }
-
 
3363
 
6550
 
-
 
6551
  PD3DZBufferType = ^TD3DZBufferType;
3364
  TD3DZBufferType = (
6552
  TD3DZBufferType = (
3365
    D3DZB_FALSE,
6553
    D3DZB_FALSE,
3366
    D3DZB_TRUE,     // Z buffering
6554
    D3DZB_TRUE,   // Z buffering
3367
    D3DZB_USEW      // W buffering
6555
    D3DZB_USEW);  // W buffering
3368
  );
-
 
3369
 
-
 
3370
  D3DZBUFFERTYPE = TD3DZBufferType;
-
 
3371
 
-
 
3372
{ TD3DAntialiasMode }
-
 
3373
 
6556
 
-
 
6557
  PD3DAntialiasMode = ^TD3DAntialiasMode;
3374
  TD3DAntialiasMode = (
6558
  TD3DAntialiasMode = (
3375
    D3DANTIALIAS_NONE,
6559
    D3DANTIALIAS_NONE,
3376
    D3DANTIALIAS_SORTDEPENDENT,
6560
    D3DANTIALIAS_SORTDEPENDENT,
3377
    D3DANTIALIAS_SORTINDEPENDENT
6561
    D3DANTIALIAS_SORTINDEPENDENT);
3378
  );
-
 
3379
 
-
 
3380
  D3DANTIALIASMODE = TD3DAntialiasMode;
-
 
3381
 
-
 
3382
{ TD3DVertexType }
-
 
3383
 
6562
 
-
 
6563
// Vertex types supported by Direct3D
-
 
6564
  PD3DVertexType = ^TD3DVertexType;
3384
  TD3DVertexType = (
6565
  TD3DVertexType = (
3385
    D3DVT_INVALID_0,
6566
    D3DVT_INVALID_0,
3386
    D3DVT_VERTEX,
6567
    D3DVT_VERTEX,
3387
    D3DVT_LVERTEX,
6568
    D3DVT_LVERTEX,
3388
    D3DVT_TLVERTEX
6569
    D3DVT_TLVERTEX);
3389
  );
-
 
3390
 
-
 
3391
  D3DVERTEXTYPE = TD3DVertexType;
-
 
3392
 
-
 
3393
{ TD3DPrimitiveType }
-
 
3394
 
6570
 
-
 
6571
// Primitives supported by draw-primitive API
-
 
6572
  PD3DPrimitiveType = ^TD3DPrimitiveType;
3395
  TD3DPrimitiveType = (
6573
  TD3DPrimitiveType = (
3396
    D3DPT_INVALID_0,
6574
    D3DPT_INVALID_0,
3397
    D3DPT_POINTLIST,
6575
    D3DPT_POINTLIST,
3398
    D3DPT_LINELIST,
6576
    D3DPT_LINELIST,
3399
    D3DPT_LINESTRIP,
6577
    D3DPT_LINESTRIP,
3400
    D3DPT_TRIANGLELIST,
6578
    D3DPT_TRIANGLELIST,
3401
    D3DPT_TRIANGLESTRIP,
6579
    D3DPT_TRIANGLESTRIP,
3402
    D3DPT_TRIANGLEFAN
6580
    D3DPT_TRIANGLEFAN);
3403
  );
-
 
3404
 
6581
 
3405
  D3DPRIMITIVETYPE = TD3DPrimitiveType;
-
 
3406
 
6582
(*
3407
{ Amount to add to a state to generate the override for that state. }
6583
 * Amount to add to a state to generate the override for that state.
-
 
6584
 *)
3408
 
6585
 
3409
const
6586
const
3410
  D3DSTATE_OVERRIDE_BIAS = 256;
6587
  D3DSTATE_OVERRIDE_BIAS          = 256;
3411
 
6588
 
-
 
6589
(*
3412
function D3DSTATE_OVERRIDE(typ: DWORD): DWORD;
6590
 * A state which sets the override flag for the specified state type.
-
 
6591
 *)
3413
 
6592
 
3414
{ A state which sets the override flag for the specified state type. }
6593
function D3DSTATE_OVERRIDE(StateType: DWORD) : DWORD;
3415
 
6594
 
3416
type
6595
type
3417
{ TD3DTransformStateType }
6596
  PD3DTransformStateType = ^TD3DTransformStateType;
3418
 
-
 
3419
  TD3DTransformStateType = (
6597
  TD3DTransformStateType = DWORD;
3420
    D3DTRANSFORMSTATE_INVALID_0,
-
 
3421
    D3DTRANSFORMSTATE_WORLD,
-
 
3422
    D3DTRANSFORMSTATE_VIEW,
-
 
3423
    D3DTRANSFORMSTATE_PROJECTION,
-
 
3424
 
6598
const
3425
    D3DTRANSFORMSTATE_WORLD1,
6599
  D3DTRANSFORMSTATE_WORLD         = 1;
3426
    D3DTRANSFORMSTATE_WORLD2,
6600
  D3DTRANSFORMSTATE_VIEW          = 2;
3427
    D3DTRANSFORMSTATE_WORLD3,
-
 
3428
    D3DTRANSFORMSTATE_INVALID_7,
-
 
3429
    D3DTRANSFORMSTATE_INVALID_8,
-
 
3430
    D3DTRANSFORMSTATE_INVALID_9,
6601
  D3DTRANSFORMSTATE_PROJECTION    = 3;
3431
    D3DTRANSFORMSTATE_INVALID_10,
-
 
3432
    D3DTRANSFORMSTATE_INVALID_11,
-
 
3433
    D3DTRANSFORMSTATE_INVALID_12,
6602
  D3DTRANSFORMSTATE_WORLD1        = 4;  // 2nd matrix to blend
3434
    D3DTRANSFORMSTATE_INVALID_13,
6603
  D3DTRANSFORMSTATE_WORLD2        = 5;  // 3rd matrix to blend
3435
    D3DTRANSFORMSTATE_INVALID_14,
6604
  D3DTRANSFORMSTATE_WORLD3        = 6;  // 4th matrix to blend
3436
    D3DTRANSFORMSTATE_INVALID_15,
-
 
3437
    D3DTRANSFORMSTATE_TEXTURE0,
6605
  D3DTRANSFORMSTATE_TEXTURE0      = 16;
3438
    D3DTRANSFORMSTATE_TEXTURE1,
6606
  D3DTRANSFORMSTATE_TEXTURE1      = 17;
3439
    D3DTRANSFORMSTATE_TEXTURE2,
6607
  D3DTRANSFORMSTATE_TEXTURE2      = 18;
3440
    D3DTRANSFORMSTATE_TEXTURE3,
6608
  D3DTRANSFORMSTATE_TEXTURE3      = 19;
3441
    D3DTRANSFORMSTATE_TEXTURE4,
6609
  D3DTRANSFORMSTATE_TEXTURE4      = 20;
3442
    D3DTRANSFORMSTATE_TEXTURE5,
6610
  D3DTRANSFORMSTATE_TEXTURE5      = 21;
3443
    D3DTRANSFORMSTATE_TEXTURE6,
6611
  D3DTRANSFORMSTATE_TEXTURE6      = 22;
3444
    D3DTRANSFORMSTATE_TEXTURE7
6612
  D3DTRANSFORMSTATE_TEXTURE7      = 23;
3445
  );
-
 
3446
 
-
 
3447
  D3DTRANSFORMSTATETYPE = TD3DTransformStateType;
-
 
3448
 
-
 
3449
{ TD3DLightStateType }
-
 
3450
 
6613
 
-
 
6614
type
-
 
6615
  PD3DLightStateType = ^TD3DLightStateType;
3451
  TD3DLightStateType = (
6616
  TD3DLightStateType = (
3452
    D3DLIGHTSTATE_INVALID_0,
6617
    D3DLIGHTSTATE_INVALID_0,
3453
    D3DLIGHTSTATE_MATERIAL,
6618
    D3DLIGHTSTATE_MATERIAL,
3454
    D3DLIGHTSTATE_AMBIENT,
6619
    D3DLIGHTSTATE_AMBIENT,
3455
    D3DLIGHTSTATE_COLORMODEL,
6620
    D3DLIGHTSTATE_COLORMODEL,
3456
    D3DLIGHTSTATE_FOGMODE,
6621
    D3DLIGHTSTATE_FOGMODE,
3457
    D3DLIGHTSTATE_FOGSTART,
6622
    D3DLIGHTSTATE_FOGSTART,
3458
    D3DLIGHTSTATE_FOGEND,
6623
    D3DLIGHTSTATE_FOGEND,
3459
    D3DLIGHTSTATE_FOGDENSITY,
6624
    D3DLIGHTSTATE_FOGDENSITY,
3460
    D3DLIGHTSTATE_COLORVERTEX
6625
    D3DLIGHTSTATE_COLORVERTEX);
3461
  );
-
 
3462
 
-
 
3463
  D3DLIGHTSTATETYPE = TD3DLightStateType;
-
 
3464
 
-
 
3465
{ TD3DRenderStateType }
-
 
3466
 
-
 
3467
  TD3DRenderStateType = (
-
 
3468
    D3DRENDERSTATE_INVALID_0,
-
 
3469
    D3DRENDERSTATE_TEXTUREHANDLE,       // Texture handle for legacy interfaces (Texture,Texture2)
-
 
3470
    D3DRENDERSTATE_ANTIALIAS,           // TD3DAntialiasMode
-
 
3471
    D3DRENDERSTATE_TEXTUREADDRESS,      // TD3DTextureAddress
-
 
3472
    D3DRENDERSTATE_TEXTUREPERSPECTIVE,  // TRUE for perspective correction
-
 
3473
    D3DRENDERSTATE_WRAPU,               // TRUE for wrapping in u
-
 
3474
    D3DRENDERSTATE_WRAPV,               // TRUE for wrapping in v
-
 
3475
    D3DRENDERSTATE_ZENABLE,             // TD3DZBufferType (or TRUE/FALSE for legacy)
-
 
3476
    D3DRENDERSTATE_FILLMODE,            // TD3DFillMode
-
 
3477
    D3DRENDERSTATE_SHADEMODE,           // TD3DShadeMode
-
 
3478
    D3DRENDERSTATE_LINEPATTERN,         // TD3DLinePattern
-
 
3479
    D3DRENDERSTATE_MONOENABLE,          // TRUE to enable mono rasterization
-
 
3480
    D3DRENDERSTATE_ROP2,                // ROP2
-
 
3481
    D3DRENDERSTATE_PLANEMASK,           // DWORD physical plane mask
-
 
3482
    D3DRENDERSTATE_ZWRITEENABLE,        // TRUE to enable z writes
-
 
3483
    D3DRENDERSTATE_ALPHATESTENABLE,     // TRUE to enable alpha tests
-
 
3484
    D3DRENDERSTATE_LASTPIXEL,           // TRUE for last-pixel on lines
-
 
3485
    D3DRENDERSTATE_TEXTUREMAG,          // TD3DTextureFilter
-
 
3486
    D3DRENDERSTATE_TEXTUREMIN,          // TD3DTextureFilter
-
 
3487
    D3DRENDERSTATE_SRCBLEND,            // TD3DBlend
-
 
3488
    D3DRENDERSTATE_DESTBLEND,           // TD3DBlend
-
 
3489
    D3DRENDERSTATE_TEXTUREMAPBLEND,     // TD3DTextureBlend
-
 
3490
    D3DRENDERSTATE_CULLMODE,            // TD3DCull
-
 
3491
    D3DRENDERSTATE_ZFUNC,               // TD3DCmpFunc
-
 
3492
    D3DRENDERSTATE_ALPHAREF,            // TD3DFixed
-
 
3493
    D3DRENDERSTATE_ALPHAFUNC,           // TD3DCmpFunc
-
 
3494
    D3DRENDERSTATE_DITHERENABLE,        // TRUE to enable dithering
-
 
3495
    D3DRENDERSTATE_ALPHABLENDENABLE,    // TRUE to enable alpha blending
-
 
3496
    D3DRENDERSTATE_FOGENABLE,           // TRUE to enable fog
-
 
3497
    D3DRENDERSTATE_SPECULARENABLE,      // TRUE to enable specular
-
 
3498
    D3DRENDERSTATE_ZVISIBLE,            // TRUE to enable z checking
-
 
3499
    D3DRENDERSTATE_SUBPIXEL,            // TRUE to enable subpixel correction
-
 
3500
    D3DRENDERSTATE_SUBPIXELX,           // TRUE to enable correction in X only
-
 
3501
    D3DRENDERSTATE_STIPPLEDALPHA,       // TRUE to enable stippled alpha
-
 
3502
    D3DRENDERSTATE_FOGCOLOR,            // TD3DColor
-
 
3503
    D3DRENDERSTATE_FOGTABLEMODE,        // TD3DFogMode
-
 
3504
    D3DRENDERSTATE_FOGSTART,            // Fog start (for both vertex and pixel fog)
-
 
3505
    D3DRENDERSTATE_FOGEND,              // Fog end
-
 
3506
    D3DRENDERSTATE_FOGDENSITY,          // Fog density
-
 
3507
    D3DRENDERSTATE_STIPPLEENABLE,       // TRUE to enable stippling
-
 
3508
    D3DRENDERSTATE_EDGEANTIALIAS,       // TRUE to enable edge antialiasing
-
 
3509
    D3DRENDERSTATE_COLORKEYENABLE,      // TRUE to enable source colorkeyed textures
-
 
3510
    D3DRENDERSTATE_BORDERCOLOR,         // Border color for texturing w/border
-
 
3511
    D3DRENDERSTATE_TEXTUREADDRESSU,     // Texture addressing mode for U coordinate
-
 
3512
    D3DRENDERSTATE_TEXTUREADDRESSV,     // Texture addressing mode for V coordinate
-
 
3513
    D3DRENDERSTATE_MIPMAPLODBIAS,       // TD3DValue Mipmap LOD bias
-
 
3514
    D3DRENDERSTATE_ZBIAS,               // LONG Z bias
-
 
3515
    D3DRENDERSTATE_RANGEFOGENABLE,      // Enables range-based fog
-
 
3516
    D3DRENDERSTATE_ANISOTROPY,          // Max. anisotropy. 1 = no anisotropy
-
 
3517
    D3DRENDERSTATE_FLUSHBATCH,          // Explicit flush for DP batching (DX5 Only)
-
 
3518
    D3DRENDERSTATE_TRANSLUCENTSORTINDEPENDENT,// BOOL enable sort-independent transparency
-
 
3519
    D3DRENDERSTATE_STENCILENABLE,       // BOOL enable/disable stenciling
-
 
3520
    D3DRENDERSTATE_STENCILFAIL,         // TD3DStencilOp to do if stencil test fails
-
 
3521
    D3DRENDERSTATE_STENCILZFAIL,        // TD3DStencilOp to do if stencil test passes and Z test fails
-
 
3522
    D3DRENDERSTATE_STENCILPASS,         // TD3DStencilOp to do if both stencil and Z tests pass
-
 
3523
    D3DRENDERSTATE_STENCILFUNC ,        // TD3DCmpFunc fn.  Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true
-
 
3524
    D3DRENDERSTATE_STENCILREF,          // Reference value used in stencil test
-
 
3525
    D3DRENDERSTATE_STENCILMASK,         // Mask value used in stencil test
-
 
3526
    D3DRENDERSTATE_STENCILWRITEMASK,    // Write mask applied to values written to stencil buffer
-
 
3527
    D3DRENDERSTATE_TEXTUREFACTOR,       // TD3DColor used for multi-texture blend
-
 
3528
    D3DRENDERSTATE_INVALID_61,
-
 
3529
    D3DRENDERSTATE_INVALID_62,
-
 
3530
    D3DRENDERSTATE_INVALID_63,
-
 
3531
    D3DRENDERSTATE_STIPPLEPATTERN00,    // Stipple pattern 01...
-
 
3532
    D3DRENDERSTATE_STIPPLEPATTERN01,
-
 
3533
    D3DRENDERSTATE_STIPPLEPATTERN02,
-
 
3534
    D3DRENDERSTATE_STIPPLEPATTERN03,
-
 
3535
    D3DRENDERSTATE_STIPPLEPATTERN04,
-
 
3536
    D3DRENDERSTATE_STIPPLEPATTERN05,
-
 
3537
    D3DRENDERSTATE_STIPPLEPATTERN06,
-
 
3538
    D3DRENDERSTATE_STIPPLEPATTERN07,
-
 
3539
    D3DRENDERSTATE_STIPPLEPATTERN08,
-
 
3540
    D3DRENDERSTATE_STIPPLEPATTERN09,
-
 
3541
    D3DRENDERSTATE_STIPPLEPATTERN10,
-
 
3542
    D3DRENDERSTATE_STIPPLEPATTERN11,
-
 
3543
    D3DRENDERSTATE_STIPPLEPATTERN12,
-
 
3544
    D3DRENDERSTATE_STIPPLEPATTERN13,
-
 
3545
    D3DRENDERSTATE_STIPPLEPATTERN14,
-
 
3546
    D3DRENDERSTATE_STIPPLEPATTERN15,
-
 
3547
    D3DRENDERSTATE_STIPPLEPATTERN16,
-
 
3548
    D3DRENDERSTATE_STIPPLEPATTERN17,
-
 
3549
    D3DRENDERSTATE_STIPPLEPATTERN18,
-
 
3550
    D3DRENDERSTATE_STIPPLEPATTERN19,
-
 
3551
    D3DRENDERSTATE_STIPPLEPATTERN20,
-
 
3552
    D3DRENDERSTATE_STIPPLEPATTERN21,
-
 
3553
    D3DRENDERSTATE_STIPPLEPATTERN22,
-
 
3554
    D3DRENDERSTATE_STIPPLEPATTERN23,
-
 
3555
    D3DRENDERSTATE_STIPPLEPATTERN24,
-
 
3556
    D3DRENDERSTATE_STIPPLEPATTERN25,
-
 
3557
    D3DRENDERSTATE_STIPPLEPATTERN26,
-
 
3558
    D3DRENDERSTATE_STIPPLEPATTERN27,
-
 
3559
    D3DRENDERSTATE_STIPPLEPATTERN28,
-
 
3560
    D3DRENDERSTATE_STIPPLEPATTERN29,
-
 
3561
    D3DRENDERSTATE_STIPPLEPATTERN30,
-
 
3562
    D3DRENDERSTATE_STIPPLEPATTERN31,
-
 
3563
    D3DRENDERSTATE_INVALID_95,
-
 
3564
    D3DRENDERSTATE_INVALID_96,
-
 
3565
    D3DRENDERSTATE_INVALID_97,
-
 
3566
    D3DRENDERSTATE_INVALID_98,
-
 
3567
    D3DRENDERSTATE_INVALID_99,
-
 
3568
    D3DRENDERSTATE_INVALID_100,
-
 
3569
    D3DRENDERSTATE_INVALID_101,
-
 
3570
    D3DRENDERSTATE_INVALID_102,
-
 
3571
    D3DRENDERSTATE_INVALID_103,
-
 
3572
    D3DRENDERSTATE_INVALID_104,
-
 
3573
    D3DRENDERSTATE_INVALID_105,
-
 
3574
    D3DRENDERSTATE_INVALID_106,
-
 
3575
    D3DRENDERSTATE_INVALID_107,
-
 
3576
    D3DRENDERSTATE_INVALID_108,
-
 
3577
    D3DRENDERSTATE_INVALID_109,
-
 
3578
    D3DRENDERSTATE_INVALID_110,
-
 
3579
    D3DRENDERSTATE_INVALID_111,
-
 
3580
    D3DRENDERSTATE_INVALID_112,
-
 
3581
    D3DRENDERSTATE_INVALID_113,
-
 
3582
    D3DRENDERSTATE_INVALID_114,
-
 
3583
    D3DRENDERSTATE_INVALID_115,
-
 
3584
    D3DRENDERSTATE_INVALID_116,
-
 
3585
    D3DRENDERSTATE_INVALID_117,
-
 
3586
    D3DRENDERSTATE_INVALID_118,
-
 
3587
    D3DRENDERSTATE_INVALID_119,
-
 
3588
    D3DRENDERSTATE_INVALID_120,
-
 
3589
    D3DRENDERSTATE_INVALID_121,
-
 
3590
    D3DRENDERSTATE_INVALID_122,
-
 
3591
    D3DRENDERSTATE_INVALID_123,
-
 
3592
    D3DRENDERSTATE_INVALID_124,
-
 
3593
    D3DRENDERSTATE_INVALID_125,
-
 
3594
    D3DRENDERSTATE_INVALID_126,
-
 
3595
    D3DRENDERSTATE_INVALID_127,
-
 
3596
    //
-
 
3597
    // 128 values [128, 255] are reserved for texture coordinate wrap flags.
-
 
3598
    // These are constructed with the D3DWRAP_U and D3DWRAP_V macros. Using
-
 
3599
    // a flags word preserves forward compatibility with texture coordinates
-
 
3600
    // that are >2D.
-
 
3601
    //
-
 
3602
    D3DRENDERSTATE_WRAP0,               // wrap for 1st texture coord. set
-
 
3603
    D3DRENDERSTATE_WRAP1,               // wrap for 2nd texture coord. set
-
 
3604
    D3DRENDERSTATE_WRAP2,               // wrap for 3rd texture coord. set
-
 
3605
    D3DRENDERSTATE_WRAP3,               // wrap for 4th texture coord. set
-
 
3606
    D3DRENDERSTATE_WRAP4,               // wrap for 5th texture coord. set
-
 
3607
    D3DRENDERSTATE_WRAP5,               // wrap for 6th texture coord. set
-
 
3608
    D3DRENDERSTATE_WRAP6,               // wrap for 7th texture coord. set
-
 
3609
    D3DRENDERSTATE_WRAP7,               // wrap for 8th texture coord. set
-
 
3610
    D3DRENDERSTATE_CLIPPING,
-
 
3611
    D3DRENDERSTATE_LIGHTING,
-
 
3612
    D3DRENDERSTATE_EXTENTS,
-
 
3613
    D3DRENDERSTATE_AMBIENT,
-
 
3614
    D3DRENDERSTATE_FOGVERTEXMODE,
-
 
3615
    D3DRENDERSTATE_COLORVERTEX,
-
 
3616
    D3DRENDERSTATE_LOCALVIEWER,
-
 
3617
    D3DRENDERSTATE_NORMALIZENORMALS,
-
 
3618
    D3DRENDERSTATE_COLORKEYBLENDENABLE,
-
 
3619
    D3DRENDERSTATE_DIFFUSEMATERIALSOURCE,
-
 
3620
    D3DRENDERSTATE_SPECULARMATERIALSOURCE,
-
 
3621
    D3DRENDERSTATE_AMBIENTMATERIALSOURCE,
-
 
3622
    D3DRENDERSTATE_EMISSIVEMATERIALSOURCE,
-
 
3623
    D3DRENDERSTATE_INVALID_149,
-
 
3624
    D3DRENDERSTATE_INVALID_150,
-
 
3625
    D3DRENDERSTATE_VERTEXBLEND,
-
 
3626
    D3DRENDERSTATE_CLIPPLANEENABLE
-
 
3627
  );
-
 
3628
 
6626
 
3629
  D3DRENDERSTATETYPE = TD3DRenderStateType;
6627
  PD3DRenderStateType = ^TD3DRenderStateType;
-
 
6628
  TD3DRenderStateType = DWORD;
-
 
6629
const
-
 
6630
    D3DRENDERSTATE_ANTIALIAS          = 2;    (* D3DANTIALIASMODE *)
-
 
6631
    D3DRENDERSTATE_TEXTUREPERSPECTIVE = 4;    (* TRUE for perspective correction *)
-
 
6632
    D3DRENDERSTATE_ZENABLE            = 7;    (* D3DZBUFFERTYPE (or TRUE/FALSE for legacy) *)
-
 
6633
    D3DRENDERSTATE_FILLMODE           = 8;    (* D3DFILL_MODE        *)
-
 
6634
    D3DRENDERSTATE_SHADEMODE          = 9;    (* D3DSHADEMODE *)
-
 
6635
    D3DRENDERSTATE_LINEPATTERN        = 10;   (* D3DLINEPATTERN *)
-
 
6636
    D3DRENDERSTATE_ZWRITEENABLE       = 14;   (* TRUE to enable z writes *)
-
 
6637
    D3DRENDERSTATE_ALPHATESTENABLE    = 15;   (* TRUE to enable alpha tests *)
-
 
6638
    D3DRENDERSTATE_LASTPIXEL          = 16;   (* TRUE for last-pixel on lines *)
-
 
6639
    D3DRENDERSTATE_SRCBLEND           = 19;   (* D3DBLEND *)
-
 
6640
    D3DRENDERSTATE_DESTBLEND          = 20;   (* D3DBLEND *)
-
 
6641
    D3DRENDERSTATE_CULLMODE           = 22;   (* D3DCULL *)
-
 
6642
    D3DRENDERSTATE_ZFUNC              = 23;   (* D3DCMPFUNC *)
-
 
6643
    D3DRENDERSTATE_ALPHAREF           = 24;   (* D3DFIXED *)
-
 
6644
    D3DRENDERSTATE_ALPHAFUNC          = 25;   (* D3DCMPFUNC *)
-
 
6645
    D3DRENDERSTATE_DITHERENABLE       = 26;   (* TRUE to enable dithering *)
-
 
6646
    D3DRENDERSTATE_ALPHABLENDENABLE   = 27;   (* TRUE to enable alpha blending *)
-
 
6647
    D3DRENDERSTATE_FOGENABLE          = 28;   (* TRUE to enable fog blending *)
-
 
6648
    D3DRENDERSTATE_SPECULARENABLE     = 29;   (* TRUE to enable specular *)
-
 
6649
    D3DRENDERSTATE_ZVISIBLE           = 30;   (* TRUE to enable z checking *)
-
 
6650
    D3DRENDERSTATE_STIPPLEDALPHA      = 33;   (* TRUE to enable stippled alpha (RGB device only) *)
-
 
6651
    D3DRENDERSTATE_FOGCOLOR           = 34;   (* D3DCOLOR *)
-
 
6652
    D3DRENDERSTATE_FOGTABLEMODE       = 35;   (* D3DFOGMODE *)
-
 
6653
    D3DRENDERSTATE_FOGSTART           = 36;   (* Fog start (for both vertex and pixel fog) *)
-
 
6654
    D3DRENDERSTATE_FOGEND             = 37;   (* Fog end      *)
-
 
6655
    D3DRENDERSTATE_FOGDENSITY         = 38;   (* Fog density  *)
-
 
6656
    D3DRENDERSTATE_EDGEANTIALIAS      = 40;   (* TRUE to enable edge antialiasing *)
-
 
6657
    D3DRENDERSTATE_COLORKEYENABLE     = 41;   (* TRUE to enable source colorkeyed textures *)
-
 
6658
    D3DRENDERSTATE_ZBIAS              = 47;   (* LONG Z bias *)
-
 
6659
    D3DRENDERSTATE_RANGEFOGENABLE     = 48;   (* Enables range-based fog *)
-
 
6660
 
-
 
6661
    D3DRENDERSTATE_STENCILENABLE      = 52;   (* BOOL enable/disable stenciling *)
-
 
6662
    D3DRENDERSTATE_STENCILFAIL        = 53;   (* D3DSTENCILOP to do if stencil test fails *)
-
 
6663
    D3DRENDERSTATE_STENCILZFAIL       = 54;   (* D3DSTENCILOP to do if stencil test passes and Z test fails *)
-
 
6664
    D3DRENDERSTATE_STENCILPASS        = 55;   (* D3DSTENCILOP to do if both stencil and Z tests pass *)
-
 
6665
    D3DRENDERSTATE_STENCILFUNC        = 56;   (* D3DCMPFUNC fn.  Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true *)
-
 
6666
    D3DRENDERSTATE_STENCILREF         = 57;   (* Reference value used in stencil test *)
-
 
6667
    D3DRENDERSTATE_STENCILMASK        = 58;   (* Mask value used in stencil test *)
-
 
6668
    D3DRENDERSTATE_STENCILWRITEMASK   = 59;   (* Write mask applied to values written to stencil buffer *)
-
 
6669
    D3DRENDERSTATE_TEXTUREFACTOR      = 60;   (* D3DCOLOR used for multi-texture blend *)
3630
 
6670
 
-
 
6671
    (*
-
 
6672
     * 128 values [128; 255] are reserved for texture coordinate wrap flags.
-
 
6673
     * These are constructed with the D3DWRAP_U and D3DWRAP_V macros. Using
-
 
6674
     * a flags word preserves forward compatibility with texture coordinates
-
 
6675
     * that are >2D.
-
 
6676
     *)
-
 
6677
    D3DRENDERSTATE_WRAP0              = 128;  (* wrap for 1st texture coord. set *)
-
 
6678
    D3DRENDERSTATE_WRAP1              = 129;  (* wrap for 2nd texture coord. set *)
-
 
6679
    D3DRENDERSTATE_WRAP2              = 130;  (* wrap for 3rd texture coord. set *)
-
 
6680
    D3DRENDERSTATE_WRAP3              = 131;  (* wrap for 4th texture coord. set *)
-
 
6681
    D3DRENDERSTATE_WRAP4              = 132;  (* wrap for 5th texture coord. set *)
-
 
6682
    D3DRENDERSTATE_WRAP5              = 133;  (* wrap for 6th texture coord. set *)
-
 
6683
    D3DRENDERSTATE_WRAP6              = 134;  (* wrap for 7th texture coord. set *)
-
 
6684
    D3DRENDERSTATE_WRAP7              = 135;  (* wrap for 8th texture coord. set *)
-
 
6685
    D3DRENDERSTATE_CLIPPING            = 136;
-
 
6686
    D3DRENDERSTATE_LIGHTING            = 137;
-
 
6687
    D3DRENDERSTATE_EXTENTS             = 138;
-
 
6688
    D3DRENDERSTATE_AMBIENT             = 139;
-
 
6689
    D3DRENDERSTATE_FOGVERTEXMODE       = 140;
-
 
6690
    D3DRENDERSTATE_COLORVERTEX         = 141;
-
 
6691
    D3DRENDERSTATE_LOCALVIEWER         = 142;
-
 
6692
    D3DRENDERSTATE_NORMALIZENORMALS    = 143;
-
 
6693
    D3DRENDERSTATE_COLORKEYBLENDENABLE = 144;
-
 
6694
    D3DRENDERSTATE_DIFFUSEMATERIALSOURCE    = 145;
-
 
6695
    D3DRENDERSTATE_SPECULARMATERIALSOURCE   = 146;
-
 
6696
    D3DRENDERSTATE_AMBIENTMATERIALSOURCE    = 147;
-
 
6697
    D3DRENDERSTATE_EMISSIVEMATERIALSOURCE   = 148;
-
 
6698
    D3DRENDERSTATE_VERTEXBLEND              = 151;
-
 
6699
    D3DRENDERSTATE_CLIPPLANEENABLE          = 152;
-
 
6700
 
-
 
6701
//
-
 
6702
// retired renderstates - not supported for DX7 interfaces
-
 
6703
//
-
 
6704
    D3DRENDERSTATE_TEXTUREHANDLE      = 1;    (* Texture handle for legacy interfaces (Texture;Texture2) *)
-
 
6705
    D3DRENDERSTATE_TEXTUREADDRESS     = 3;    (* D3DTEXTUREADDRESS  *)
-
 
6706
    D3DRENDERSTATE_WRAPU              = 5;    (* TRUE for wrapping in u *)
-
 
6707
    D3DRENDERSTATE_WRAPV              = 6;    (* TRUE for wrapping in v *)
-
 
6708
    D3DRENDERSTATE_MONOENABLE         = 11;   (* TRUE to enable mono rasterization *)
-
 
6709
    D3DRENDERSTATE_ROP2               = 12;   (* ROP2 *)
-
 
6710
    D3DRENDERSTATE_PLANEMASK          = 13;   (* DWORD physical plane mask *)
-
 
6711
    D3DRENDERSTATE_TEXTUREMAG         = 17;   (* D3DTEXTUREFILTER *)
-
 
6712
    D3DRENDERSTATE_TEXTUREMIN         = 18;   (* D3DTEXTUREFILTER *)
-
 
6713
    D3DRENDERSTATE_TEXTUREMAPBLEND    = 21;   (* D3DTEXTUREBLEND *)
-
 
6714
    D3DRENDERSTATE_SUBPIXEL           = 31;   (* TRUE to enable subpixel correction *)
-
 
6715
    D3DRENDERSTATE_SUBPIXELX          = 32;   (* TRUE to enable correction in X only *)
-
 
6716
    D3DRENDERSTATE_STIPPLEENABLE      = 39;   (* TRUE to enable stippling *)
-
 
6717
    D3DRENDERSTATE_BORDERCOLOR        = 43;   (* Border color for texturing w/border *)
-
 
6718
    D3DRENDERSTATE_TEXTUREADDRESSU    = 44;   (* Texture addressing mode for U coordinate *)
-
 
6719
    D3DRENDERSTATE_TEXTUREADDRESSV    = 45;   (* Texture addressing mode for V coordinate *)
-
 
6720
    D3DRENDERSTATE_MIPMAPLODBIAS      = 46;   (* D3DVALUE Mipmap LOD bias *)
-
 
6721
    D3DRENDERSTATE_ANISOTROPY         = 49;   (* Max. anisotropy. 1 = no anisotropy *)
-
 
6722
    D3DRENDERSTATE_FLUSHBATCH         = 50;   (* Explicit flush for DP batching (DX5 Only) *)
-
 
6723
    D3DRENDERSTATE_TRANSLUCENTSORTINDEPENDENT=51; (* BOOL enable sort-independent transparency *)
-
 
6724
    D3DRENDERSTATE_STIPPLEPATTERN00   = 64;   (* Stipple pattern 01...  *)
-
 
6725
    D3DRENDERSTATE_STIPPLEPATTERN01   = 65;
-
 
6726
    D3DRENDERSTATE_STIPPLEPATTERN02   = 66;
-
 
6727
    D3DRENDERSTATE_STIPPLEPATTERN03   = 67;
-
 
6728
    D3DRENDERSTATE_STIPPLEPATTERN04   = 68;
-
 
6729
    D3DRENDERSTATE_STIPPLEPATTERN05   = 69;
-
 
6730
    D3DRENDERSTATE_STIPPLEPATTERN06   = 70;
-
 
6731
    D3DRENDERSTATE_STIPPLEPATTERN07   = 71;
-
 
6732
    D3DRENDERSTATE_STIPPLEPATTERN08   = 72;
-
 
6733
    D3DRENDERSTATE_STIPPLEPATTERN09   = 73;
-
 
6734
    D3DRENDERSTATE_STIPPLEPATTERN10   = 74;
-
 
6735
    D3DRENDERSTATE_STIPPLEPATTERN11   = 75;
-
 
6736
    D3DRENDERSTATE_STIPPLEPATTERN12   = 76;
-
 
6737
    D3DRENDERSTATE_STIPPLEPATTERN13   = 77;
-
 
6738
    D3DRENDERSTATE_STIPPLEPATTERN14   = 78;
-
 
6739
    D3DRENDERSTATE_STIPPLEPATTERN15   = 79;
-
 
6740
    D3DRENDERSTATE_STIPPLEPATTERN16   = 80;
-
 
6741
    D3DRENDERSTATE_STIPPLEPATTERN17   = 81;
-
 
6742
    D3DRENDERSTATE_STIPPLEPATTERN18   = 82;
-
 
6743
    D3DRENDERSTATE_STIPPLEPATTERN19   = 83;
-
 
6744
    D3DRENDERSTATE_STIPPLEPATTERN20   = 84;
-
 
6745
    D3DRENDERSTATE_STIPPLEPATTERN21   = 85;
-
 
6746
    D3DRENDERSTATE_STIPPLEPATTERN22   = 86;
-
 
6747
    D3DRENDERSTATE_STIPPLEPATTERN23   = 87;
-
 
6748
    D3DRENDERSTATE_STIPPLEPATTERN24   = 88;
-
 
6749
    D3DRENDERSTATE_STIPPLEPATTERN25   = 89;
-
 
6750
    D3DRENDERSTATE_STIPPLEPATTERN26   = 90;
-
 
6751
    D3DRENDERSTATE_STIPPLEPATTERN27   = 91;
-
 
6752
    D3DRENDERSTATE_STIPPLEPATTERN28   = 92;
-
 
6753
    D3DRENDERSTATE_STIPPLEPATTERN29   = 93;
-
 
6754
    D3DRENDERSTATE_STIPPLEPATTERN30   = 94;
-
 
6755
    D3DRENDERSTATE_STIPPLEPATTERN31   = 95;
-
 
6756
 
-
 
6757
//
-
 
6758
// retired renderstate names - the values are still used under new naming conventions
-
 
6759
//
-
 
6760
    D3DRENDERSTATE_FOGTABLESTART      = 36;   (* Fog table start    *)
-
 
6761
    D3DRENDERSTATE_FOGTABLEEND        = 37;   (* Fog table end      *)
-
 
6762
    D3DRENDERSTATE_FOGTABLEDENSITY    = 38;   (* Fog table density  *)
-
 
6763
 
-
 
6764
type
-
 
6765
// Values for material source
-
 
6766
  PD3DMateralColorSource = ^TD3DMateralColorSource;
3631
  TD3DMaterialColorSource = (
6767
  TD3DMateralColorSource = (
3632
    D3DMCS_MATERIAL,                   // Color from material is used
6768
    D3DMCS_MATERIAL,              // Color from material is used
3633
    D3DMCS_COLOR1,                     // Diffuse vertex color is used
6769
    D3DMCS_COLOR1,                // Diffuse vertex color is used
3634
    D3DMCS_COLOR2                      // Specular vertex color is used
6770
    D3DMCS_COLOR2                 // Specular vertex color is used
3635
  );                                   // force 32-bit size enum
-
 
-
 
6771
  );
3636
 
6772
 
3637
const
6773
const
3638
{ For back-compatibility with legacy compilations }
6774
  // For back-compatibility with legacy compilations
3639
  D3DRENDERSTATE_BLENDENABLE     = D3DRENDERSTATE_ALPHABLENDENABLE;
6775
  D3DRENDERSTATE_BLENDENABLE = D3DRENDERSTATE_ALPHABLENDENABLE;
3640
  D3DRENDERSTATE_FOGTABLESTART   = D3DRENDERSTATE_FOGSTART;
-
 
3641
  D3DRENDERSTATE_FOGTABLEEND     = D3DRENDERSTATE_FOGEND;
-
 
3642
  D3DRENDERSTATE_FOGTABLEDENSITY = D3DRENDERSTATE_FOGDENSITY;
-
 
3643
 
6776
 
3644
{ Bias to apply to the texture coordinate set to apply a wrap to. }
-
 
3645
  D3DRENDERSTATE_WRAPBIAS = TD3DRenderStateType(128);
-
 
3646
 
6777
 
-
 
6778
// Bias to apply to the texture coordinate set to apply a wrap to.
-
 
6779
   D3DRENDERSTATE_WRAPBIAS                = 128;
-
 
6780
 
3647
{ Flags to construct the WRAP render states }
6781
(* Flags to construct the WRAP render states *)
3648
  D3DWRAP_U = $00000001;
6782
  D3DWRAP_U   = $00000001;
3649
  D3DWRAP_V = $00000002;
6783
  D3DWRAP_V   = $00000002;
3650
 
6784
 
3651
{ Flags to construct the WRAP render states for 1D thru 4D texture coordinates }
6785
(* Flags to construct the WRAP render states for 1D thru 4D texture coordinates *)
3652
  D3DWRAPCOORD_0 = $00000001;    // same as D3DWRAP_U
6786
  D3DWRAPCOORD_0   = $00000001;    // same as D3DWRAP_U
3653
  D3DWRAPCOORD_1 = $00000002;    // same as D3DWRAP_V
6787
  D3DWRAPCOORD_1   = $00000002;    // same as D3DWRAP_V
3654
  D3DWRAPCOORD_2 = $00000004;
6788
  D3DWRAPCOORD_2   = $00000004;
3655
  D3DWRAPCOORD_3 = $00000008;
6789
  D3DWRAPCOORD_3   = $00000008;
3656
 
6790
 
3657
function D3DRENDERSTATE_STIPPLEPATTERN(y: DWORD): TD3DRenderStateType;
6791
function D3DRENDERSTATE_STIPPLEPATTERN(y: integer) : TD3DRenderStateType;
3658
 
6792
 
3659
type
6793
type
3660
 
-
 
-
 
6794
  PD3DState = ^TD3DState;
3661
  TD3DState = record
6795
  TD3DState = packed record
3662
    case Integer of
6796
    case Integer of
3663
    0: (
6797
    0: (
3664
      dtstTransformStateType: TD3DTransformStateType;
6798
      dtstTransformStateType: TD3DTransformStateType;
3665
      dwArg: array[0..0] of DWORD;
6799
      dwArg: Array [ 0..0 ] of DWORD;
3666
      );
6800
     );
3667
    1: (
6801
    1: (
3668
      dlstLightStateType: TD3DLightStateType;
6802
      dlstLightStateType: TD3DLightStateType;
3669
      dvArg: array[0..0] of TD3DValue;
6803
      dvArg: Array [ 0..0 ] of TD3DValue;
3670
      );
6804
     );
3671
    2: (
6805
    2: (
3672
      drstRenderStateType: TD3DRenderStateType;
6806
      drstRenderStateType: TD3DRenderStateType;
3673
      );
6807
     );
3674
  end;
6808
  end;
3675
 
6809
 
-
 
6810
(*
-
 
6811
 * Operation used to load matrices
3676
  D3DSTATE = TD3DState;
6812
 * hDstMat = hSrcMat
3677
 
6813
 *)
3678
{ TD3DMatrixLoad structure }
6814
  PD3DMatrixLoad = ^TD3DMatrixLoad;
3679
 
-
 
3680
  TD3DMatrixLoad = record
6815
  TD3DMatrixLoad = packed record
3681
    hDestMatrix: TD3DMatrixHandle;   // Destination matrix
6816
    hDestMatrix: TD3DMatrixHandle;   (* Destination matrix *)
3682
    hSrcMatrix: TD3DMatrixHandle;    // Source matrix
6817
    hSrcMatrix: TD3DMatrixHandle;    (* Source matrix *)
3683
  end;
6818
  end;
3684
 
6819
 
-
 
6820
(*
-
 
6821
 * Operation used to multiply matrices
3685
  D3DMATRIXLOAD = TD3DMatrixLoad;
6822
 * hDstMat = hSrcMat1 * hSrcMat2
3686
 
6823
 *)
3687
{ TD3DMatrixMultiply structure }
6824
  PD3DMatrixMultiply = ^TD3DMatrixMultiply;
3688
 
-
 
3689
  TD3DMatrixMultiply = record
6825
  TD3DMatrixMultiply = packed record
3690
    hDestMatrix: TD3DMatrixHandle;   // Destination matrix
6826
    hDestMatrix: TD3DMatrixHandle;   (* Destination matrix *)
3691
    hSrcMatrix1: TD3DMatrixHandle;   // First source matrix
6827
    hSrcMatrix1: TD3DMatrixHandle;   (* First source matrix *)
3692
    hSrcMatrix2: TD3DMatrixHandle;   // Second source matrix
6828
    hSrcMatrix2: TD3DMatrixHandle;   (* Second source matrix *)
3693
  end;
6829
  end;
3694
 
6830
 
-
 
6831
(*
3695
  D3DMATRIXMULTIPLY = TD3DMatrixMultiply;
6832
 * Operation used to transform and light vertices.
3696
 
6833
 *)
3697
{ TD3DProcessVertices structure }
6834
  PD3DProcessVertices = ^TD3DProcessVertices;
3698
 
-
 
3699
  TD3DProcessVertices = record
6835
  TD3DProcessVertices = packed record
3700
    dwFlags: DWORD;           // Do we transform or light or just copy?
6836
    dwFlags: DWORD;           (* Do we transform or light or just copy? *)
3701
    wStart: WORD;             // Index to first vertex in source
6837
    wStart: WORD;             (* Index to first vertex in source *)
3702
    wDest: WORD;              // Index to first vertex in local buffer
6838
    wDest: WORD;              (* Index to first vertex in local buffer *)
3703
    dwCount: DWORD;           // Number of vertices to be processed
6839
    dwCount: DWORD;           (* Number of vertices to be processed *)
3704
    dwReserved: DWORD;        // Must be zero
6840
    dwReserved: DWORD;        (* Must be zero *)
3705
  end;
6841
  end;
3706
 
6842
 
3707
  D3DPROCESSVERTICES = TD3DProcessVertices;
-
 
3708
 
-
 
3709
const
6843
const
3710
  D3DPROCESSVERTICES_TRANSFORMLIGHT       = $00000000;
6844
  D3DPROCESSVERTICES_TRANSFORMLIGHT       = $00000000;
3711
  D3DPROCESSVERTICES_TRANSFORM            = $00000001;
6845
  D3DPROCESSVERTICES_TRANSFORM            = $00000001;
3712
  D3DPROCESSVERTICES_COPY                 = $00000002;
6846
  D3DPROCESSVERTICES_COPY                 = $00000002;
3713
  D3DPROCESSVERTICES_OPMASK               = $00000007;
6847
  D3DPROCESSVERTICES_OPMASK               = $00000007;
3714
 
6848
 
3715
  D3DPROCESSVERTICES_UPDATEEXTENTS        = $00000008;
6849
  D3DPROCESSVERTICES_UPDATEEXTENTS        = $00000008;
3716
  D3DPROCESSVERTICES_NOCOLOR              = $00000010;
6850
  D3DPROCESSVERTICES_NOCOLOR              = $00000010;
3717
 
6851
 
3718
{ TD3DTextureStagesStateType }
-
 
3719
 
6852
 
-
 
6853
(*
-
 
6854
 * State enumerants for per-stage texture processing.
-
 
6855
 *)
3720
type
6856
type
3721
  TD3DTextureStagesStateType = (
6857
  PD3DTextureStageStateType = ^TD3DTextureStageStateType;
3722
    D3DTSS_INVALID_0,
6858
  TD3DTextureStageStateType = DWORD;
-
 
6859
const
3723
    D3DTSS_COLOROP,           // TD3DTextureOp - per-stage blending controls for color channels
6860
  D3DTSS_COLOROP        =  1; (* D3DTEXTUREOP - per-stage blending controls for color channels *)
3724
    D3DTSS_COLORARG1,         // D3DTA_* (texture arg)
6861
  D3DTSS_COLORARG1      =  2; (* D3DTA_* (texture arg) *)
3725
    D3DTSS_COLORARG2,         // D3DTA_* (texture arg)
6862
  D3DTSS_COLORARG2      =  3; (* D3DTA_* (texture arg) *)
3726
    D3DTSS_ALPHAOP,           // TD3DTextureOp - per-stage blending controls for alpha channel
6863
  D3DTSS_ALPHAOP        =  4; (* D3DTEXTUREOP - per-stage blending controls for alpha channel *)
3727
    D3DTSS_ALPHAARG1,         // D3DTA_* (texture arg)
6864
  D3DTSS_ALPHAARG1      =  5; (* D3DTA_* (texture arg) *)
3728
    D3DTSS_ALPHAARG2,         // D3DTA_* (texture arg)
6865
  D3DTSS_ALPHAARG2      =  6; (* D3DTA_* (texture arg) *)
3729
    D3DTSS_BUMPENVMAT00,      // TD3DValue (bump mapping matrix)
6866
  D3DTSS_BUMPENVMAT00   =  7; (* D3DVALUE (bump mapping matrix) *)
3730
    D3DTSS_BUMPENVMAT01,      // TD3DValue (bump mapping matrix)
6867
  D3DTSS_BUMPENVMAT01   =  8; (* D3DVALUE (bump mapping matrix) *)
3731
    D3DTSS_BUMPENVMAT10,      // TD3DValue (bump mapping matrix)
6868
  D3DTSS_BUMPENVMAT10   =  9; (* D3DVALUE (bump mapping matrix) *)
3732
    D3DTSS_BUMPENVMAT11,      // TD3DValue (bump mapping matrix)
6869
  D3DTSS_BUMPENVMAT11   = 10; (* D3DVALUE (bump mapping matrix) *)
3733
    D3DTSS_TEXCOORDINDEX,     // identifies which set of texture coordinates index this texture
6870
  D3DTSS_TEXCOORDINDEX  = 11; (* identifies which set of texture coordinates index this texture *)
3734
    D3DTSS_ADDRESS,           // TD3DTextureAddress for both coordinates
6871
  D3DTSS_ADDRESS        = 12; (* D3DTEXTUREADDRESS for both coordinates *)
3735
    D3DTSS_ADDRESSU,          // TD3DTextureAddress for U coordinate
6872
  D3DTSS_ADDRESSU       = 13; (* D3DTEXTUREADDRESS for U coordinate *)
3736
    D3DTSS_ADDRESSV,          // TD3DTextureAddress for V coordinate
6873
  D3DTSS_ADDRESSV       = 14; (* D3DTEXTUREADDRESS for V coordinate *)
3737
    D3DTSS_BORDERCOLOR,       // TD3DColor
6874
  D3DTSS_BORDERCOLOR    = 15; (* D3DCOLOR *)
3738
    D3DTSS_MAGFILTER,         // TD3DTextureMagFilter filter to use for magnification
6875
  D3DTSS_MAGFILTER      = 16; (* D3DTEXTUREMAGFILTER filter to use for magnification *)
3739
    D3DTSS_MINFILTER,         // TD3DTextureMinFilter filter to use for minification
6876
  D3DTSS_MINFILTER      = 17; (* D3DTEXTUREMINFILTER filter to use for minification *)
3740
    D3DTSS_MIPFILTER,         // TD3DTextureMipFilter filter to use between mipmaps during minification
6877
  D3DTSS_MIPFILTER      = 18; (* D3DTEXTUREMIPFILTER filter to use between mipmaps during minification *)
3741
    D3DTSS_MIPMAPLODBIAS,     // D3DVALUE Mipmap LOD bias
6878
  D3DTSS_MIPMAPLODBIAS  = 19; (* D3DVALUE Mipmap LOD bias *)
3742
    D3DTSS_MAXMIPLEVEL,       // DWORD 0..(n-1) LOD index of largest map to use (0 == largest)
6879
  D3DTSS_MAXMIPLEVEL    = 20; (* DWORD 0..(n-1) LOD index of largest map to use (0 == largest) *)
3743
    D3DTSS_MAXANISOTROPY,     // DWORD maximum anisotropy
6880
  D3DTSS_MAXANISOTROPY  = 21; (* DWORD maximum anisotropy *)
3744
    D3DTSS_BUMPENVLSCALE,     // TD3DValue scale for bump map luminance
6881
  D3DTSS_BUMPENVLSCALE  = 22; (* D3DVALUE scale for bump map luminance *)
3745
    D3DTSS_BUMPENVLOFFSET,    // TD3DValue offset for bump map luminance
6882
  D3DTSS_BUMPENVLOFFSET = 23; (* D3DVALUE offset for bump map luminance *)
3746
    D3DTSS_TEXTURETRANSFORMFLAGS // D3DTEXTURETRANSFORMFLAGS controls texture transform
6883
  D3DTSS_TEXTURETRANSFORMFLAGS = 24; (* D3DTEXTURETRANSFORMFLAGS controls texture transform *)
3747
  );
-
 
3748
 
-
 
3749
  D3DTEXTURESTAGESTATETYPE = TD3DTextureStagesStateType;
-
 
3750
 
6884
 
3751
const
-
 
3752
{ Values, used with D3DTSS_TEXCOORDINDEX, to specify that the vertex data(position     }
6885
// Values, used with D3DTSS_TEXCOORDINDEX, to specify that the vertex data(position
3753
{ and normal in the camera space) should be taken as texture coordinates               }
6886
// and normal in the camera space) should be taken as texture coordinates
3754
{ Low 16 bits are used to specify texture coordinate index, to take the WRAP mode from }
6887
// Low 16 bits are used to specify texture coordinate index, to take the WRAP mode from
3755
 
6888
//
3756
   D3DTSS_TCI_PASSTHRU                    = $00000000;
6889
  D3DTSS_TCI_PASSTHRU                             = $00000000;
3757
   D3DTSS_TCI_CAMERASPACENORMAL           = $00010000;
6890
  D3DTSS_TCI_CAMERASPACENORMAL                    = $00010000;
3758
   D3DTSS_TCI_CAMERASPACEPOSITION         = $00020000;
6891
  D3DTSS_TCI_CAMERASPACEPOSITION                  = $00020000;
3759
   D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR = $00030000;
6892
  D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR          = $00030000;
3760
 
6893
 
3761
{ TD3DTextureOp }
-
 
3762
 
-
 
3763
type
6894
type
-
 
6895
(*
-
 
6896
 * Enumerations for COLOROP and ALPHAOP texture blending operations set in
-
 
6897
 * texture processing stage controls in D3DRENDERSTATE.
-
 
6898
 *)
-
 
6899
  PD3DTextureOp = ^TD3DTextureOp;
3764
  TD3DTextureOp = (
6900
  TD3DTextureOp = (
3765
    D3DTOP_INVALID_0,
6901
    D3DTOP_INVALID_0,
3766
    // Control
6902
// Control
3767
    D3DTOP_DISABLE,                    // disables stage
6903
    D3DTOP_DISABLE   ,      // disables stage
3768
    D3DTOP_SELECTARG1,                 // the default
6904
    D3DTOP_SELECTARG1,      // the default
3769
    D3DTOP_SELECTARG2,
6905
    D3DTOP_SELECTARG2,
-
 
6906
 
3770
    // Modulate
6907
// Modulate
3771
    D3DTOP_MODULATE,                   // multiply args together
6908
    D3DTOP_MODULATE  ,      // multiply args together
3772
    D3DTOP_MODULATE2X,                 // multiply and  1 bit
6909
    D3DTOP_MODULATE2X,      // multiply and  1 bit
3773
    D3DTOP_MODULATE4X,                 // multiply and  2 bits
6910
    D3DTOP_MODULATE4X,      // multiply and  2 bits
-
 
6911
 
3774
    // Add
6912
// Add
3775
    D3DTOP_ADD,                        // add arguments together
6913
    D3DTOP_ADD        ,   // add arguments together
3776
    D3DTOP_ADDSIGNED,                  // add with -0.5 bias
6914
    D3DTOP_ADDSIGNED  ,   // add with -0.5 bias
3777
    D3DTOP_ADDSIGNED2X,                // as above but left  1 bit
6915
    D3DTOP_ADDSIGNED2X,   // as above but left  1 bit
3778
    D3DTOP_SUBTRACT,                   // Arg1 - Arg2, with no saturation
6916
    D3DTOP_SUBTRACT   ,   // Arg1 - Arg2, with no saturation
3779
    D3DTOP_ADDSMOOTH,                  // add 2 args, subtract product
6917
    D3DTOP_ADDSMOOTH  ,   // add 2 args, subtract product
3780
                                       // Arg1 + Arg2 - Arg1*Arg2
6918
                          // Arg1 + Arg2 - Arg1*Arg2
3781
                                       // = Arg1 + (1-Arg1)*Arg2
6919
                          // = Arg1 + (1-Arg1)*Arg2
-
 
6920
 
3782
    // Linear alpha blend: Arg1*(Alpha) + Arg2*(1-Alpha)
6921
// Linear alpha blend: Arg1*(Alpha) + Arg2*(1-Alpha)
3783
    D3DTOP_BLENDDIFFUSEALPHA,          // iterated alpha
6922
    D3DTOP_BLENDDIFFUSEALPHA  , // iterated alpha
3784
    D3DTOP_BLENDTEXTUREALPHA,          // texture alpha
6923
    D3DTOP_BLENDTEXTUREALPHA  , // texture alpha
3785
    D3DTOP_BLENDFACTORALPHA,           // alpha from D3DRENDERSTATE_TEXTUREFACTOR
6924
    D3DTOP_BLENDFACTORALPHA   , // alpha from D3DRENDERSTATE_TEXTUREFACTOR
3786
    // Linear alpha blend with pre-multiplied arg1 input: Arg1 + Arg2*(1-Alpha)
6925
    // Linear alpha blend with pre-multiplied arg1 input: Arg1 + Arg2*(1-Alpha)
3787
    D3DTOP_BLENDTEXTUREALPHAPM,        // texture alpha
6926
    D3DTOP_BLENDTEXTUREALPHAPM, // texture alpha
3788
    D3DTOP_BLENDCURRENTALPHA,          // by alpha of current color
6927
    D3DTOP_BLENDCURRENTALPHA  , // by alpha of current color
-
 
6928
 
3789
    // Specular mapping
6929
// Specular mapping
3790
    D3DTOP_PREMODULATE,                // modulate with next texture before use
6930
    D3DTOP_PREMODULATE           ,     // modulate with next texture before use
3791
    D3DTOP_MODULATEALPHA_ADDCOLOR,     // Arg1.RGB + Arg1.A*Arg2.RGB
6931
    D3DTOP_MODULATEALPHA_ADDCOLOR,     // Arg1.RGB + Arg1.A*Arg2.RGB
3792
                                       // COLOROP only
6932
                                       // COLOROP only
3793
    D3DTOP_MODULATECOLOR_ADDALPHA,     // Arg1.RGB*Arg2.RGB + Arg1.A
6933
    D3DTOP_MODULATECOLOR_ADDALPHA,     // Arg1.RGB*Arg2.RGB + Arg1.A
3794
                                       // COLOROP only
6934
                                            // COLOROP only
3795
    D3DTOP_MODULATEINVALPHA_ADDCOLOR,  // (1-Arg1.A)*Arg2.RGB + Arg1.RGB
6935
    D3DTOP_MODULATEINVALPHA_ADDCOLOR,  // (1-Arg1.A)*Arg2.RGB + Arg1.RGB
3796
                                       // COLOROP only
6936
                                       // COLOROP only
3797
    D3DTOP_MODULATEINVCOLOR_ADDALPHA,  // (1-Arg1.RGB)*Arg2.RGB + Arg1.A
6937
    D3DTOP_MODULATEINVCOLOR_ADDALPHA,  // (1-Arg1.RGB)*Arg2.RGB + Arg1.A
3798
                                       // COLOROP only
6938
                                            // COLOROP only
-
 
6939
 
3799
    // Bump mapping
6940
// Bump mapping
3800
    D3DTOP_BUMPENVMAP,                 // per pixel env map perturbation
6941
    D3DTOP_BUMPENVMAP         , // per pixel env map perturbation
3801
    D3DTOP_BUMPENVMAPLUMINANCE,        // with luminance channel
6942
    D3DTOP_BUMPENVMAPLUMINANCE, // with luminance channel
3802
    // This can do either diffuse or specular bump mapping with correct input.
6943
    // This can do either diffuse or specular bump mapping with correct input.
3803
    // Performs the function (Arg1.R*Arg2.R + Arg1.G*Arg2.G + Arg1.B*Arg2.B)
6944
    // Performs the function (Arg1.R*Arg2.R + Arg1.G*Arg2.G + Arg1.B*Arg2.B)
Line 3805... Line 6946...
3805
    // The result is replicated into all four (including alpha) channels.
6946
    // The result is replicated into all four (including alpha) channels.
3806
    // This is a valid COLOROP only.
6947
    // This is a valid COLOROP only.
3807
    D3DTOP_DOTPRODUCT3
6948
    D3DTOP_DOTPRODUCT3
3808
  );
6949
  );
3809
 
6950
 
3810
  D3DTEXTUREOP = TD3DTextureOp;
-
 
3811
 
6951
(*
3812
{ Values for COLORARG1,2 and ALPHAARG1,2 texture blending operations
6952
 * Values for COLORARG1,2 and ALPHAARG1,2 texture blending operations
3813
  set in texture processing stage controls in D3DRENDERSTATE. }
6953
 * set in texture processing stage controls in D3DRENDERSTATE.
3814
 
6954
 *)
3815
const
6955
const
3816
  D3DTA_SELECTMASK     = $0000000f;  // mask for arg selector
6956
  D3DTA_SELECTMASK        = $0000000f;  // mask for arg selector
3817
  D3DTA_DIFFUSE        = $00000000;  // select diffuse color
6957
  D3DTA_DIFFUSE           = $00000000;  // select diffuse color
3818
  D3DTA_CURRENT        = $00000001;  // select result of previous stage
6958
  D3DTA_CURRENT           = $00000001;  // select result of previous stage
3819
  D3DTA_TEXTURE        = $00000002;  // select texture color
6959
  D3DTA_TEXTURE           = $00000002;  // select texture color
3820
  D3DTA_TFACTOR        = $00000003;  // select RENDERSTATE_TEXTUREFACTOR
6960
  D3DTA_TFACTOR           = $00000003;  // select RENDERSTATE_TEXTUREFACTOR
3821
  D3DTA_SPECULAR       = $00000004;  // select specular color
6961
  D3DTA_SPECULAR          = $00000004;  // select specular color
3822
  D3DTA_COMPLEMENT     = $00000010;  // take 1.0 - x
6962
  D3DTA_COMPLEMENT        = $00000010;  // take 1.0 - x
3823
  D3DTA_ALPHAREPLICATE = $00000020;  // replicate alpha to color components
6963
  D3DTA_ALPHAREPLICATE    = $00000020;  // replicate alpha to color components
3824
 
6964
 
-
 
6965
(*
3825
{ IDirect3DTexture2 State Filter Types }
6966
 *  IDirect3DTexture2 State Filter Types
3826
 
6967
 *)
3827
type
6968
type
-
 
6969
  PD3DTextureMagFilter = ^TD3DTextureMagFilter;
3828
  TD3DTextureMagFilter = (
6970
  TD3DTextureMagFilter = (
3829
    D3DTFG_INVALID_0,
6971
    D3DTFG_INVALID_0,
3830
    D3DTFG_POINT,          // nearest
6972
    D3DTFG_POINT        ,    // nearest
3831
    D3DTFG_LINEAR,         // linear interpolation
6973
    D3DTFG_LINEAR       ,    // linear interpolation
3832
    D3DTFG_FLATCUBIC,      // cubic
6974
    D3DTFG_FLATCUBIC    ,    // cubic
3833
    D3DTFG_GAUSSIANCUBIC,  // different cubic kernel
6975
    D3DTFG_GAUSSIANCUBIC,    // different cubic kernel
3834
    D3DTFG_ANISOTROPIC
6976
    D3DTFG_ANISOTROPIC
3835
  );
6977
  );
3836
 
6978
 
3837
  D3DTEXTUREMAGFILTER = TD3DTextureMagFilter;
6979
  PD3DTextureMinFilter = ^TD3DTextureMinFilter;
3838
 
-
 
3839
  TD3DTextureMinFilter = (
6980
  TD3DTextureMinFilter = (
3840
    D3DTFN_INVALID_0,
6981
    D3DTFN_INVALID_0,
3841
    D3DTFN_POINT,          // nearest
6982
    D3DTFN_POINT      ,    // nearest
3842
    D3DTFN_LINEAR,         // linear interpolation
6983
    D3DTFN_LINEAR     ,    // linear interpolation
3843
    D3DTFN_ANISOTROPIC
6984
    D3DTFN_ANISOTROPIC
3844
  );
6985
  );
3845
 
6986
 
3846
  D3DTEXTUREMINFILTER = TD3DTextureMinFilter;
6987
  PD3DTextureMipFilter = ^TD3DTextureMipFilter;
3847
 
-
 
3848
  TD3DTextureMipFilter = (
6988
  TD3DTextureMipFilter = (
3849
    D3DTFP_INVALID_0,
6989
    D3DTFP_INVALID_0,
3850
    D3DTFP_NONE,           // mipmapping disabled (use MAG filter)
6990
    D3DTFP_NONE   ,    // mipmapping disabled (use MAG filter)
3851
    D3DTFP_POINT,          // nearest
6991
    D3DTFP_POINT  ,    // nearest
3852
    D3DTFP_LINEAR          // linear interpolation
6992
    D3DTFP_LINEAR      // linear interpolation
3853
  );
6993
  );
3854
 
6994
 
3855
  D3DTEXTUREMIPFILTER = TD3DTextureMipFilter;
-
 
3856
 
6995
 
-
 
6996
(*
3857
{ Triangle flags }
6997
 * Triangle flags
-
 
6998
 *)
3858
 
6999
 
-
 
7000
(*
-
 
7001
 * Tri strip and fan flags.
-
 
7002
 * START loads all three vertices
-
 
7003
 * EVEN and ODD load just v3 with even or odd culling
-
 
7004
 * START_FLAT contains a count from 0 to 29 that allows the
-
 
7005
 * whole strip or fan to be culled in one hit.
-
 
7006
 * e.g. for a quad len = 1
-
 
7007
 *)
3859
const
7008
const
3860
  D3DTRIFLAG_START                        = $00000000;
7009
  D3DTRIFLAG_START                        = $00000000;
3861
  D3DTRIFLAG_ODD                          = $0000001e;
-
 
3862
  D3DTRIFLAG_EVEN                         = $0000001f;
7010
// #define D3DTRIFLAG_STARTFLAT(len) (len)         (* 0 < len < 30 *)
3863
 
-
 
3864
function D3DTRIFLAG_STARTFLAT(len: DWORD): DWORD;
7011
function D3DTRIFLAG_STARTFLAT(len: DWORD) : DWORD;
3865
 
7012
 
3866
{ Triangle edge flags }
-
 
3867
 
-
 
3868
const
7013
const
3869
  D3DTRIFLAG_EDGEENABLE1                  = $00000100; // v0-v1 edge
7014
  D3DTRIFLAG_ODD                          = $0000001e;
3870
  D3DTRIFLAG_EDGEENABLE2                  = $00000200; // v1-v2 edge
7015
  D3DTRIFLAG_EVEN                         = $0000001f;
3871
  D3DTRIFLAG_EDGEENABLE3                  = $00000400; // v2-v0 edge
-
 
3872
  D3DTRIFLAG_EDGEENABLETRIANGLE =
-
 
3873
      D3DTRIFLAG_EDGEENABLE1 or D3DTRIFLAG_EDGEENABLE2 or D3DTRIFLAG_EDGEENABLE3;
-
 
3874
 
7016
 
-
 
7017
(*
3875
{ TD3DTriangle structure }
7018
 * Triangle edge flags
-
 
7019
 * enable edges for wireframe or antialiasing
-
 
7020
 *)
-
 
7021
  D3DTRIFLAG_EDGEENABLE1                  = $00000100; (* v0-v1 edge *)
-
 
7022
  D3DTRIFLAG_EDGEENABLE2                  = $00000200; (* v1-v2 edge *)
-
 
7023
  D3DTRIFLAG_EDGEENABLE3                  = $00000400; (* v2-v0 edge *)
-
 
7024
  D3DTRIFLAG_EDGEENABLETRIANGLE = (
-
 
7025
      D3DTRIFLAG_EDGEENABLE1 or D3DTRIFLAG_EDGEENABLE2 or D3DTRIFLAG_EDGEENABLE3);
3876
 
7026
 
-
 
7027
(*
-
 
7028
 * Primitive structures and related defines.  Vertex offsets are to types
-
 
7029
 * TD3DVertex, TD3DLVertex, or TD3DTLVertex.
-
 
7030
 *)
-
 
7031
 
-
 
7032
(*
-
 
7033
 * Triangle list primitive structure
-
 
7034
 *)
3877
type
7035
type
3878
  PD3DTriangle = ^TD3DTriangle;
7036
  PD3DTriangle = ^TD3DTriangle;
3879
  TD3DTriangle = record
7037
  TD3DTriangle = packed record
3880
    case Integer of
7038
    case Integer of
3881
    0: (
7039
    0: (
3882
      v1: WORD;            // Vertex indices
7040
      v1: WORD;            (* Vertex indices *)
3883
      v2: WORD;
7041
      v2: WORD;
3884
      v3: WORD;
7042
      v3: WORD;
3885
      wFlags: WORD;        // Edge (and other) flags
7043
      wFlags: WORD;        (* Edge (and other) flags *)
3886
      );
7044
     );
3887
    1: (
7045
    1: (
3888
      wV1: WORD;
7046
      wV1: WORD;
3889
      wV2: WORD;
7047
      wV2: WORD;
3890
      wV3: WORD;
7048
      wV3: WORD;
3891
      );
7049
     );
3892
  end;
7050
  end;
3893
 
7051
 
3894
  D3DTRIANGLE = TD3DTriangle;
-
 
3895
  LPD3DTRIANGLE = PD3DTriangle;
-
 
3896
 
7052
(*
3897
{ TD3DLine structure }
7053
 * Line strip structure.
-
 
7054
 * The instruction count - 1 defines the number of line segments.
3898
 
7055
 *)
3899
  PD3DLine = ^TD3DLine;
7056
  PD3DLine = ^TD3DLine;
3900
  TD3DLine = record
7057
  TD3DLine = packed record
3901
    case Integer of
7058
    case Integer of
3902
    0: (
7059
    0: (
3903
      v1: WORD;            // Vertex indices
7060
      v1: WORD;            (* Vertex indices *)
3904
      v2: WORD;
7061
      v2: WORD;
3905
      );
7062
     );
3906
    1: (
7063
    1: (
3907
      wV1: WORD;
7064
      wV1: WORD;
3908
      wV2: WORD;
7065
      wV2: WORD;
3909
      );
7066
     );
3910
  end;
7067
  end;
3911
 
7068
 
3912
  D3DLINE = TD3DLine;
-
 
3913
  LPD3DLINE = PD3DLine;
-
 
3914
 
7069
(*
3915
{ TD3DSpan structure }
7070
 * Span structure
-
 
7071
 * Spans join a list of points with the same y value.
-
 
7072
 * If the y value changes, a new span is started.
3916
 
7073
 *)
3917
  PD3DSpan = ^TD3DSpan;
7074
  PD3DSpan = ^TD3DSpan;
3918
  TD3DSpan = record
7075
  TD3DSpan = packed record
3919
    wCount: WORD;        // Number of spans
7076
    wCount: WORD;        (* Number of spans *)
3920
    wFirst: WORD;        // Index to first vertex
7077
    wFirst: WORD;        (* Index to first vertex *)
3921
  end;
7078
  end;
3922
 
7079
 
3923
  D3DSPAN = TD3DSpan;
-
 
3924
  LPD3DSPAN = PD3DSpan;
-
 
3925
 
7080
(*
3926
{ TD3DPoint structure }
7081
 * Point structure
3927
 
7082
 *)
3928
  PD3DPoint = ^TD3DPoint;
7083
  PD3DPoint = ^TD3DPoint;
3929
  TD3DPoint = record
7084
  TD3DPoint = packed record
3930
    wCount: WORD;        // number of points
7085
    wCount: WORD;        (* number of points         *)
3931
    wFirst: WORD;        // index to first vertex
7086
    wFirst: WORD;        (* index to first vertex    *)
3932
  end;
7087
  end;
3933
 
7088
 
3934
  D3DPOINT = TD3DPoint;
-
 
3935
  LPD3DPOINT = PD3DPoint;
-
 
3936
 
7089
(*
3937
{ TD3DBranch structure }
7090
 * Forward branch structure.
-
 
7091
 * Mask is logically anded with the driver status mask
-
 
7092
 * if the result equals 'value', the branch is taken.
3938
 
7093
 *)
3939
  PD3DBranch = ^TD3DBranch;
7094
  PD3DBranch = ^TD3DBranch;
3940
  TD3DBranch = record
7095
  TD3DBranch = packed record
3941
    dwMask: DWORD;         // Bitmask against D3D status
7096
    dwMask: DWORD;         (* Bitmask against D3D status *)
3942
    dwValue: DWORD;
7097
    dwValue: DWORD;
3943
    bNegate: BOOL;         // TRUE to negate comparison
7098
    bNegate: BOOL;         (* TRUE to negate comparison *)
3944
    dwOffset: DWORD;       // How far to branch forward (0 for exit)
7099
    dwOffset: DWORD;       (* How far to branch forward (0 for exit)*)
3945
  end;
7100
  end;
3946
 
7101
 
-
 
7102
(*
3947
  D3DBRANCH = TD3DBranch;
7103
 * Status used for set status instruction.
3948
  LPD3DBRANCH = PD3DBranch;
7104
 * The D3D status is initialised on device creation
3949
 
-
 
3950
{ TD3DStatus structure }
7105
 * and is modified by all execute calls.
3951
 
7106
 *)
3952
  PD3DStatus = ^TD3DStatus;
7107
  PD3DStatus = ^TD3DStatus;
3953
  TD3DStatus = record
7108
  TD3DStatus = packed record
3954
    dwFlags: DWORD;        // Do we set extents or status
7109
    dwFlags: DWORD;        (* Do we set extents or status *)
3955
    dwStatus: DWORD;       // D3D status
7110
    dwStatus: DWORD;       (* D3D status *)
3956
    drExtent: TD3DRect;
7111
    drExtent: TD3DRect;
3957
  end;
7112
  end;
3958
 
7113
 
3959
  D3DSTATUS = TD3DStatus;
-
 
3960
  LPD3DSTATUS = PD3DStatus;
-
 
3961
 
-
 
3962
const
7114
const
3963
  D3DSETSTATUS_STATUS   = $00000001;
7115
  D3DSETSTATUS_STATUS    = $00000001;
3964
  D3DSETSTATUS_EXTENTS  = $00000002;
7116
  D3DSETSTATUS_EXTENTS   = $00000002;
3965
  D3DSETSTATUS_ALL      = D3DSETSTATUS_STATUS or D3DSETSTATUS_EXTENTS;
7117
  D3DSETSTATUS_ALL      = (D3DSETSTATUS_STATUS or D3DSETSTATUS_EXTENTS);
3966
 
-
 
3967
{ TD3DClipStatus structure }
-
 
3968
 
7118
 
3969
type
7119
type
3970
  PD3DClipStatus = ^TD3DClipStatus;
7120
  PD3DClipStatus = ^TD3DClipStatus;
3971
  TD3DClipStatus = record
7121
  TD3DClipStatus = packed record
3972
    dwFlags: DWORD;     // Do we set 2d extents, 3D extents or status
7122
    dwFlags : DWORD; (* Do we set 2d extents, 3D extents or status *)
3973
    dwStatus: DWORD;    // Clip status
7123
    dwStatus : DWORD; (* Clip status *)
3974
    minx, maxx: Single; // X extents
7124
    minx, maxx : float; (* X extents *)
3975
    miny, maxy: Single; // Y extents
7125
    miny, maxy : float; (* Y extents *)
3976
    minz, maxz: Single; // Z extents
7126
    minz, maxz : float; (* Z extents *)
3977
  end;
7127
  end;
3978
 
7128
 
3979
  D3DCLIPSTATUS = TD3DClipStatus;
-
 
3980
  LPD3DCLIPSTATUS = PD3DClipStatus;
-
 
3981
 
-
 
3982
const
7129
const
3983
  D3DCLIPSTATUS_STATUS        = $00000001;
7130
  D3DCLIPSTATUS_STATUS        = $00000001;
3984
  D3DCLIPSTATUS_EXTENTS2      = $00000002;
7131
  D3DCLIPSTATUS_EXTENTS2      = $00000002;
3985
  D3DCLIPSTATUS_EXTENTS3      = $00000004;
7132
  D3DCLIPSTATUS_EXTENTS3      = $00000004;
3986
 
7133
 
-
 
7134
(*
3987
{ TD3DStats structure }
7135
 * Statistics structure
3988
 
7136
 *)
3989
type
7137
type
3990
  PD3DStats = ^TD3DStats;
7138
  PD3DStats = ^TD3DStats;
3991
  TD3DStats = record
7139
  TD3DStats = packed record
3992
    dwSize: DWORD;
7140
    dwSize: DWORD;
3993
    dwTrianglesDrawn: DWORD;
7141
    dwTrianglesDrawn: DWORD;
3994
    dwLinesDrawn: DWORD;
7142
    dwLinesDrawn: DWORD;
3995
    dwPointsDrawn: DWORD;
7143
    dwPointsDrawn: DWORD;
3996
    dwSpansDrawn: DWORD;
7144
    dwSpansDrawn: DWORD;
3997
    dwVerticesProcessed: DWORD;
7145
    dwVerticesProcessed: DWORD;
3998
  end;
7146
  end;
3999
 
7147
 
4000
  D3DSTATS = TD3DStats;
-
 
4001
  LPD3DSTATS = PD3DStats;
-
 
4002
 
7148
(*
4003
{ Execute options. }
7149
 * Execute options.
-
 
7150
 * When calling using D3DEXECUTE_UNCLIPPED all the primitives
-
 
7151
 * inside the buffer must be contained within the viewport.
4004
 
7152
 *)
4005
const
7153
const
4006
  D3DEXECUTE_CLIPPED       = $00000001;
7154
  D3DEXECUTE_CLIPPED       = $00000001;
4007
  D3DEXECUTE_UNCLIPPED     = $00000002;
7155
  D3DEXECUTE_UNCLIPPED     = $00000002;
4008
 
7156
 
4009
{ TD3DExecuteData structure }
-
 
4010
 
-
 
4011
type
7157
type
4012
  PD3DExecuteData = ^TD3DExecuteData;
7158
  PD3DExecuteData = ^TD3DExecuteData;
4013
  TD3DExecuteData = record
7159
  TD3DExecuteData = packed record
4014
    dwSize: DWORD;
7160
    dwSize: DWORD;
4015
    dwVertexOffset: DWORD;
7161
    dwVertexOffset: DWORD;
4016
    dwVertexCount: DWORD;
7162
    dwVertexCount: DWORD;
4017
    dwInstructionOffset: DWORD;
7163
    dwInstructionOffset: DWORD;
4018
    dwInstructionLength: DWORD;
7164
    dwInstructionLength: DWORD;
4019
    dwHVertexOffset: DWORD;
7165
    dwHVertexOffset: DWORD;
4020
    dsStatus: D3DSTATUS;       // Status after execute
7166
    dsStatus: TD3DStatus;       (* Status after execute *)
4021
  end;
7167
  end;
4022
 
7168
 
4023
  D3DEXECUTEDATA = TD3DExecuteData;
-
 
4024
  LPD3DEXECUTEDATA = PD3DExecuteData;
-
 
4025
 
7169
(*
4026
{ Palette flags. }
7170
 * Palette flags.
-
 
7171
 * This are or'ed with the peFlags in the PALETTEENTRYs passed to DirectDraw.
-
 
7172
 *)
4027
 
7173
 
4028
const
7174
const
4029
  D3DPAL_FREE     = $00;    // Renderer may use this entry freely
7175
  D3DPAL_FREE     = $00;    (* Renderer may use this entry freely *)
4030
  D3DPAL_READONLY = $40;    // Renderer may not set this entry
7176
  D3DPAL_READONLY = $40;    (* Renderer may not set this entry *)
4031
  D3DPAL_RESERVED = $80;    // Renderer may not use this entry
7177
  D3DPAL_RESERVED = $80;    (* Renderer may not use this entry *)
4032
 
7178
 
4033
{ TD3DVertexBufferDesc structure }
-
 
4034
 
7179
 
4035
type
7180
type
4036
  PD3DVertexBufferDesc = ^TD3DVertexBufferDesc;
7181
  PD3DVertexBufferDesc = ^TD3DVertexBufferDesc;
4037
  TD3DVertexBufferDesc = record
7182
  TD3DVertexBufferDesc = packed record
4038
    dwSize: DWORD;
7183
    dwSize : DWORD;
4039
    dwCaps: DWORD;
7184
    dwCaps : DWORD;
4040
    dwFVF: DWORD;
7185
    dwFVF : DWORD;
4041
    dwNumVertices: DWORD;
7186
    dwNumVertices : DWORD;
4042
  end;
7187
  end;
4043
 
7188
 
4044
  D3DVERTEXBUFFERDESC = TD3DVertexBufferDesc;
-
 
4045
  LPD3DVERTEXBUFFERDESC = PD3DVertexBufferDesc;
-
 
4046
 
-
 
4047
{ These correspond to DDSCAPS_* flags }
-
 
4048
 
-
 
4049
const
7189
const
-
 
7190
(* These correspond to DDSCAPS_* flags *)
4050
  D3DVBCAPS_SYSTEMMEMORY = $00000800;
7191
  D3DVBCAPS_SYSTEMMEMORY      = $00000800;
4051
  D3DVBCAPS_WRITEONLY    = $00010000;
7192
  D3DVBCAPS_WRITEONLY         = $00010000;
4052
  D3DVBCAPS_OPTIMIZED    = $80000000;
7193
  D3DVBCAPS_OPTIMIZED         = $80000000;
4053
  D3DVBCAPS_DONOTCLIP    = $00000001;
7194
  D3DVBCAPS_DONOTCLIP         = $00000001;
4054
 
7195
 
4055
{ Vertex Operations for ProcessVertices }
7196
(* Vertex Operations for ProcessVertices *)
-
 
7197
  D3DVOP_LIGHT      = (1 shl 10);
-
 
7198
  D3DVOP_TRANSFORM  = (1 shl 0);
-
 
7199
  D3DVOP_CLIP       = (1 shl 2);
-
 
7200
  D3DVOP_EXTENTS    = (1 shl 3);
4056
 
7201
 
4057
  D3DVOP_LIGHT     = 1 shl 10;
-
 
4058
  D3DVOP_TRANSFORM = 1 shl 0;
-
 
4059
  D3DVOP_CLIP      = 1 shl 2;
-
 
4060
  D3DVOP_EXTENTS   = 1 shl 3;
-
 
4061
 
-
 
4062
{ The maximum number of vertices user can pass to any d3d
7202
(* The maximum number of vertices user can pass to any d3d
4063
   drawing function or to create vertex buffer with }
7203
   drawing function or to create vertex buffer with
-
 
7204
*)
4064
  D3DMAXNUMVERTICES = (1 shl 16)-1;
7205
  D3DMAXNUMVERTICES  =  ((1 shl 16) - 1);
4065
 
-
 
4066
{ The maximum number of primitives user can pass to any d3d drawing function. }
7206
(* The maximum number of primitives user can pass to any d3d
-
 
7207
   drawing function.
-
 
7208
*)
4067
  D3DMAXNUMPRIMITIVES = (1 shl 16)-1;
7209
  D3DMAXNUMPRIMITIVES = ((1 shl 16) - 1);
4068
 
7210
 
4069
{ Bits for dwFlags in ProcessVertices call }
7211
(* Bits for dwFlags in ProcessVertices call *)
4070
  D3DPV_DONOTCOPYDATA = 1 shl 0;
7212
  D3DPV_DONOTCOPYDATA = (1 shl 0);
4071
 
7213
 
4072
{ Flexible vertex format bits }
7214
//-------------------------------------------------------------------
4073
 
7215
 
-
 
7216
// Flexible vertex format bits
-
 
7217
//
4074
  D3DFVF_RESERVED0      = $001;
7218
  D3DFVF_RESERVED0        = $001;
4075
  D3DFVF_POSITION_MASK  = $00E;
7219
  D3DFVF_POSITION_MASK    = $00E;
4076
  D3DFVF_XYZ            = $002;
7220
  D3DFVF_XYZ              = $002;
4077
  D3DFVF_XYZRHW         = $004;
7221
  D3DFVF_XYZRHW           = $004;
4078
  D3DFVF_XYZB1          = $006;
7222
  D3DFVF_XYZB1            = $006;
4079
  D3DFVF_XYZB2          = $008;
7223
  D3DFVF_XYZB2            = $008;
4080
  D3DFVF_XYZB3          = $00a;
7224
  D3DFVF_XYZB3            = $00a;
4081
  D3DFVF_XYZB4          = $00c;
7225
  D3DFVF_XYZB4            = $00c;
4082
  D3DFVF_XYZB5          = $00e;
7226
  D3DFVF_XYZB5            = $00e;
-
 
7227
 
4083
  D3DFVF_NORMAL         = $010;
7228
  D3DFVF_NORMAL           = $010;
4084
  D3DFVF_RESERVED1      = $020;
7229
  D3DFVF_RESERVED1        = $020;
4085
  D3DFVF_DIFFUSE        = $040;
7230
  D3DFVF_DIFFUSE          = $040;
4086
  D3DFVF_SPECULAR       = $080;
7231
  D3DFVF_SPECULAR         = $080;
-
 
7232
 
4087
  D3DFVF_TEXCOUNT_MASK  = $f00;
7233
  D3DFVF_TEXCOUNT_MASK    = $f00;
4088
  D3DFVF_TEXCOUNT_SHIFT = 8;
7234
  D3DFVF_TEXCOUNT_SHIFT   = 8;
4089
  D3DFVF_TEX0           = $000;
7235
  D3DFVF_TEX0             = $000;
4090
  D3DFVF_TEX1           = $100;
7236
  D3DFVF_TEX1             = $100;
4091
  D3DFVF_TEX2           = $200;
7237
  D3DFVF_TEX2             = $200;
Line 4094... Line 7240...
4094
  D3DFVF_TEX5           = $500;
7240
  D3DFVF_TEX5             = $500;
4095
  D3DFVF_TEX6           = $600;
7241
  D3DFVF_TEX6             = $600;
4096
  D3DFVF_TEX7           = $700;
7242
  D3DFVF_TEX7             = $700;
4097
  D3DFVF_TEX8           = $800;
7243
  D3DFVF_TEX8             = $800;
4098
 
7244
 
4099
  D3DFVF_RESERVED2      = $F000; // 4 reserved bits
7245
  D3DFVF_RESERVED2        = $f000;  // 4 reserved bits
4100
 
-
 
4101
  D3DFVF_VERTEX         = D3DFVF_XYZ or D3DFVF_NORMAL or D3DFVF_TEX1;
-
 
4102
  D3DFVF_LVERTEX        = D3DFVF_XYZ or D3DFVF_RESERVED1 or D3DFVF_DIFFUSE or
-
 
4103
                            D3DFVF_SPECULAR or D3DFVF_TEX1;
-
 
4104
  D3DFVF_TLVERTEX       = D3DFVF_XYZRHW or D3DFVF_DIFFUSE or D3DFVF_SPECULAR or
-
 
4105
                            D3DFVF_TEX1;
-
 
4106
 
7246
 
-
 
7247
  D3DFVF_VERTEX = ( D3DFVF_XYZ or D3DFVF_NORMAL or D3DFVF_TEX1 );
-
 
7248
  D3DFVF_LVERTEX = ( D3DFVF_XYZ or D3DFVF_RESERVED1 or D3DFVF_DIFFUSE or
-
 
7249
                         D3DFVF_SPECULAR or D3DFVF_TEX1 );
-
 
7250
  D3DFVF_TLVERTEX = ( D3DFVF_XYZRHW or D3DFVF_DIFFUSE or D3DFVF_SPECULAR or
4107
{ TD3DDP_PtrStride }
7251
                          D3DFVF_TEX1 );
4108
 
7252
 
4109
type
7253
type
-
 
7254
  PD3DDP_PtrStride = ^TD3DDP_PtrStride;
4110
  TD3DDP_PtrStride = record
7255
  TD3DDP_PtrStride = packed record
4111
    lpvData: Pointer;
7256
    lpvData : pointer;
4112
    dwStride: DWORD;
7257
    dwStride : DWORD;
4113
  end;
7258
  end;
4114
 
7259
 
4115
  D3DDP_PTRSTRIDE = TD3DDP_PtrStride;
-
 
4116
 
-
 
4117
const
7260
const
4118
  D3DDP_MAXTEXCOORD = 8;
7261
  D3DDP_MAXTEXCOORD = 8;
4119
 
7262
 
4120
type
7263
type
4121
  PD3DDrawPrimitiveStridedData = ^TD3DDrawPrimitiveStridedData;
7264
  PD3DDrawPrimitiveStridedData = ^TD3DDrawPrimitiveStridedData;
4122
  TD3DDrawPrimitiveStridedData = record
7265
  TD3DDrawPrimitiveStridedData = packed record
4123
    position: TD3DDP_PtrStride;
7266
    position : TD3DDP_PtrStride;
4124
    normal: TD3DDP_PtrStride;
7267
    normal : TD3DDP_PtrStride;
4125
    diffuse: TD3DDP_PtrStride;
7268
    diffuse : TD3DDP_PtrStride;
4126
    specular: TD3DDP_PtrStride;
7269
    specular : TD3DDP_PtrStride;
4127
    textureCoords: array[0..D3DDP_MAXTEXCOORD-1] of TD3DDP_PtrStride;
7270
    textureCoords : array [0..D3DDP_MAXTEXCOORD-1] of TD3DDP_PtrStride;
4128
  end;
7271
  end;
4129
 
7272
 
4130
  D3DDRAWPRIMITIVESTRIDEDDATA = TD3DDrawPrimitiveStridedData;
-
 
4131
  LPD3DDRAWPRIMITIVESTRIDEDDATA = PD3DDrawPrimitiveStridedData;
7273
//---------------------------------------------------------------------
4132
 
-
 
4133
{ ComputeSphereVisibility return values }
7274
// ComputeSphereVisibility return values
4134
 
7275
//
4135
const
7276
const
4136
  D3DVIS_INSIDE_FRUSTUM    = 0;
7277
  D3DVIS_INSIDE_FRUSTUM      = 0;
4137
  D3DVIS_INTERSECT_FRUSTUM = 1;
7278
  D3DVIS_INTERSECT_FRUSTUM   = 1;
4138
  D3DVIS_OUTSIDE_FRUSTUM   = 2;
7279
  D3DVIS_OUTSIDE_FRUSTUM     = 2;
4139
  D3DVIS_INSIDE_LEFT       = 0;
7280
  D3DVIS_INSIDE_LEFT         = 0;
4140
  D3DVIS_INTERSECT_LEFT    = 1 shl 2;
7281
  D3DVIS_INTERSECT_LEFT      = (1 shl 2);
4141
  D3DVIS_OUTSIDE_LEFT      = 2 shl 2;
7282
  D3DVIS_OUTSIDE_LEFT        = (2 shl 2);
4142
  D3DVIS_INSIDE_RIGHT      = 0;
7283
  D3DVIS_INSIDE_RIGHT        = 0;
4143
  D3DVIS_INTERSECT_RIGHT   = 1 shl 4;
7284
  D3DVIS_INTERSECT_RIGHT     = (1 shl 4);
4144
  D3DVIS_OUTSIDE_RIGHT     = 2 shl 4;
7285
  D3DVIS_OUTSIDE_RIGHT       = (2 shl 4);
4145
  D3DVIS_INSIDE_TOP        = 0;
7286
  D3DVIS_INSIDE_TOP          = 0;
4146
  D3DVIS_INTERSECT_TOP     = 1 shl 6;
7287
  D3DVIS_INTERSECT_TOP       = (1 shl 6);
4147
  D3DVIS_OUTSIDE_TOP       = 2 shl 6;
7288
  D3DVIS_OUTSIDE_TOP         = (2 shl 6);
4148
  D3DVIS_INSIDE_BOTTOM     = 0;
7289
  D3DVIS_INSIDE_BOTTOM       = 0;
4149
  D3DVIS_INTERSECT_BOTTOM  = 1 shl 8;
7290
  D3DVIS_INTERSECT_BOTTOM    = (1 shl 8);
4150
  D3DVIS_OUTSIDE_BOTTOM    = 2 shl 8;
7291
  D3DVIS_OUTSIDE_BOTTOM      = (2 shl 8);
4151
  D3DVIS_INSIDE_NEAR       = 0;
7292
  D3DVIS_INSIDE_NEAR         = 0;
4152
  D3DVIS_INTERSECT_NEAR    = 1 shl 10;
7293
  D3DVIS_INTERSECT_NEAR      = (1 shl 10);
4153
  D3DVIS_OUTSIDE_NEAR      = 2 shl 10;
7294
  D3DVIS_OUTSIDE_NEAR        = (2 shl 10);
4154
  D3DVIS_INSIDE_FAR        = 0;
7295
  D3DVIS_INSIDE_FAR          = 0;
4155
  D3DVIS_INTERSECT_FAR     = 1 shl 12;
7296
  D3DVIS_INTERSECT_FAR       = (1 shl 12);
4156
  D3DVIS_OUTSIDE_FAR       = 2 shl 12;
7297
  D3DVIS_OUTSIDE_FAR         = (2 shl 12);
4157
 
7298
 
4158
  D3DVIS_MASK_FRUSTUM      = 3 shl 0;
7299
  D3DVIS_MASK_FRUSTUM        = (3 shl 0);
4159
  D3DVIS_MASK_LEFT         = 3 shl 2;
7300
  D3DVIS_MASK_LEFT           = (3 shl 2);
4160
  D3DVIS_MASK_RIGHT        = 3 shl 4;
7301
  D3DVIS_MASK_RIGHT          = (3 shl 4);
4161
  D3DVIS_MASK_TOP          = 3 shl 6;
7302
  D3DVIS_MASK_TOP            = (3 shl 6);
4162
  D3DVIS_MASK_BOTTOM       = 3 shl 8;
7303
  D3DVIS_MASK_BOTTOM         = (3 shl 8);
4163
  D3DVIS_MASK_NEAR         = 3 shl 10;
7304
  D3DVIS_MASK_NEAR           = (3 shl 10);
4164
  D3DVIS_MASK_FAR          = 3 shl 12;
7305
  D3DVIS_MASK_FAR            = (3 shl 12);
4165
 
-
 
4166
{ To be used with GetInfo() }
-
 
4167
 
7306
 
-
 
7307
// To be used with GetInfo()
4168
  D3DDEVINFOID_TEXTUREMANAGER    = 1;
7308
  D3DDEVINFOID_TEXTUREMANAGER    = 1;
4169
  D3DDEVINFOID_D3DTEXTUREMANAGER = 2;
7309
  D3DDEVINFOID_D3DTEXTUREMANAGER = 2;
4170
  D3DDEVINFOID_TEXTURING         = 3;
7310
  D3DDEVINFOID_TEXTURING         = 3;
4171
 
7311
 
4172
type
7312
type
4173
 
-
 
4174
{ TD3DStateBlockType }
7313
  PD3DStateBlockType = ^TD3DStateBlockType;
4175
 
-
 
4176
  TD3DStateBlockType = (
7314
  TD3DStateBlockType = (
4177
    D3DBST_INVALID_0,
7315
    D3DSBT_INVALID_0   ,
-
 
7316
    D3DSBT_ALL         , // capture all state
4178
    D3DSBT_PIXELSTATE,        // capture pixel state
7317
    D3DSBT_PIXELSTATE  , // capture pixel state
4179
    D3DSBT_VERTEXSTATE        // capture vertex state
7318
    D3DSBT_VERTEXSTATE   // capture vertex state
4180
  );
7319
  );
4181
 
7320
 
4182
  D3DSTATEBLOCKTYPE = TD3DStateBlockType;
7321
// The D3DVERTEXBLENDFLAGS type is used with D3DRENDERSTATE_VERTEXBLEND state.
4183
 
7322
//
4184
{ TD3DVertexBlendFlags }
7323
  PD3DVertexBlendFlags = ^TD3DVertexBlendFlags;
4185
 
-
 
4186
  TD3DVertexBlendFlags = (
7324
  TD3DVertexBlendFlags = (
4187
    D3DVBLEND_DISABLE,        // Disable vertex blending
7325
    D3DVBLEND_DISABLE , // Disable vertex blending
4188
    D3DVBLEND_1WEIGHT,        // blend between 2 matrices
7326
    D3DVBLEND_1WEIGHT , // blend between 2 matrices
4189
    D3DVBLEND_2WEIGHTS,       // blend between 3 matrices
7327
    D3DVBLEND_2WEIGHTS, // blend between 3 matrices
4190
    D3DVBLEND_3WEIGHTS        // blend between 4 matrices
7328
    D3DVBLEND_3WEIGHTS  // blend between 4 matrices
4191
  );
7329
  );
4192
 
7330
 
4193
  D3DVERTEXBLENDFLAGS = TD3DVertexBlendFlags;
7331
  PD3DTextureTransformFlags = ^TD3DTextureTransformFlags;
4194
 
-
 
4195
{ TD3DTextureTransformFlags }
-
 
4196
 
-
 
4197
  TD3DTextureTransformFlags = (
7332
  TD3DTextureTransformFlags = (
4198
    D3DTTFF_DISABLE,   // texture coordinates are passed directly
7333
    D3DTTFF_DISABLE ,    // texture coordinates are passed directly
4199
    D3DTTFF_COUNT1,    // rasterizer should expect 1-D texture coords
7334
    D3DTTFF_COUNT1  ,    // rasterizer should expect 1-D texture coords
4200
    D3DTTFF_COUNT2,    // rasterizer should expect 2-D texture coords
7335
    D3DTTFF_COUNT2  ,    // rasterizer should expect 2-D texture coords
4201
    D3DTTFF_COUNT3,    // rasterizer should expect 3-D texture coords
7336
    D3DTTFF_COUNT3  ,    // rasterizer should expect 3-D texture coords
4202
    D3DTTFF_COUNT4,    // rasterizer should expect 4-D texture coords
7337
    D3DTTFF_COUNT4       // rasterizer should expect 4-D texture coords
4203
    D3DTIFF_INVALID_5,
-
 
4204
    D3DTIFF_INVALID_6,
-
 
4205
    D3DTIFF_INVALID_7,
-
 
4206
    D3DTIFF_INVALID_8,
-
 
4207
    D3DTIFF_INVALID_9,
-
 
4208
    D3DTIFF_INVALID_10,
-
 
4209
    D3DTIFF_INVALID_11,
-
 
4210
    D3DTIFF_INVALID_12,
-
 
4211
    D3DTIFF_INVALID_13,
-
 
4212
    D3DTIFF_INVALID_14,
-
 
4213
    D3DTIFF_INVALID_15,
-
 
4214
    D3DTIFF_INVALID_16,
-
 
4215
    D3DTIFF_INVALID_17,
-
 
4216
    D3DTIFF_INVALID_18,
-
 
4217
    D3DTIFF_INVALID_19,
-
 
4218
    D3DTIFF_INVALID_20,
-
 
4219
    D3DTIFF_INVALID_21,
-
 
4220
    D3DTIFF_INVALID_22,
-
 
4221
    D3DTIFF_INVALID_23,
-
 
4222
    D3DTIFF_INVALID_24,
-
 
4223
    D3DTIFF_INVALID_25,
-
 
4224
    D3DTIFF_INVALID_26,
-
 
4225
    D3DTIFF_INVALID_27,
-
 
4226
    D3DTIFF_INVALID_28,
-
 
4227
    D3DTIFF_INVALID_29,
-
 
4228
    D3DTIFF_INVALID_30,
-
 
4229
    D3DTIFF_INVALID_31,
-
 
4230
    D3DTIFF_INVALID_32,
-
 
4231
    D3DTIFF_INVALID_33,
-
 
4232
    D3DTIFF_INVALID_34,
-
 
4233
    D3DTIFF_INVALID_35,
-
 
4234
    D3DTIFF_INVALID_36,
-
 
4235
    D3DTIFF_INVALID_37,
-
 
4236
    D3DTIFF_INVALID_38,
-
 
4237
    D3DTIFF_INVALID_39,
-
 
4238
    D3DTIFF_INVALID_40,
-
 
4239
    D3DTIFF_INVALID_41,
-
 
4240
    D3DTIFF_INVALID_42,
-
 
4241
    D3DTIFF_INVALID_43,
-
 
4242
    D3DTIFF_INVALID_44,
-
 
4243
    D3DTIFF_INVALID_45,
-
 
4244
    D3DTIFF_INVALID_46,
-
 
4245
    D3DTIFF_INVALID_47,
-
 
4246
    D3DTIFF_INVALID_48,
-
 
4247
    D3DTIFF_INVALID_49,
-
 
4248
    D3DTIFF_INVALID_50,
-
 
4249
    D3DTIFF_INVALID_51,
-
 
4250
    D3DTIFF_INVALID_52,
-
 
4251
    D3DTIFF_INVALID_53,
-
 
4252
    D3DTIFF_INVALID_54,
-
 
4253
    D3DTIFF_INVALID_55,
-
 
4254
    D3DTIFF_INVALID_56,
-
 
4255
    D3DTIFF_INVALID_57,
-
 
4256
    D3DTIFF_INVALID_58,
-
 
4257
    D3DTIFF_INVALID_59,
-
 
4258
    D3DTIFF_INVALID_60,
-
 
4259
    D3DTIFF_INVALID_61,
-
 
4260
    D3DTIFF_INVALID_62,
-
 
4261
    D3DTIFF_INVALID_63,
-
 
4262
    D3DTIFF_INVALID_64,
-
 
4263
    D3DTIFF_INVALID_65,
-
 
4264
    D3DTIFF_INVALID_66,
-
 
4265
    D3DTIFF_INVALID_67,
-
 
4266
    D3DTIFF_INVALID_68,
-
 
4267
    D3DTIFF_INVALID_69,
-
 
4268
    D3DTIFF_INVALID_70,
-
 
4269
    D3DTIFF_INVALID_71,
-
 
4270
    D3DTIFF_INVALID_72,
-
 
4271
    D3DTIFF_INVALID_73,
-
 
4272
    D3DTIFF_INVALID_74,
-
 
4273
    D3DTIFF_INVALID_75,
-
 
4274
    D3DTIFF_INVALID_76,
-
 
4275
    D3DTIFF_INVALID_77,
-
 
4276
    D3DTIFF_INVALID_78,
-
 
4277
    D3DTIFF_INVALID_79,
-
 
4278
    D3DTIFF_INVALID_80,
-
 
4279
    D3DTIFF_INVALID_81,
-
 
4280
    D3DTIFF_INVALID_82,
-
 
4281
    D3DTIFF_INVALID_83,
-
 
4282
    D3DTIFF_INVALID_84,
-
 
4283
    D3DTIFF_INVALID_85,
-
 
4284
    D3DTIFF_INVALID_86,
-
 
4285
    D3DTIFF_INVALID_87,
-
 
4286
    D3DTIFF_INVALID_88,
-
 
4287
    D3DTIFF_INVALID_89,
-
 
4288
    D3DTIFF_INVALID_90,
-
 
4289
    D3DTIFF_INVALID_91,
-
 
4290
    D3DTIFF_INVALID_92,
-
 
4291
    D3DTIFF_INVALID_93,
-
 
4292
    D3DTIFF_INVALID_94,
-
 
4293
    D3DTIFF_INVALID_95,
-
 
4294
    D3DTIFF_INVALID_96,
-
 
4295
    D3DTIFF_INVALID_97,
-
 
4296
    D3DTIFF_INVALID_98,
-
 
4297
    D3DTIFF_INVALID_99,
-
 
4298
    D3DTIFF_INVALID_100,
-
 
4299
    D3DTIFF_INVALID_101,
-
 
4300
    D3DTIFF_INVALID_102,
-
 
4301
    D3DTIFF_INVALID_103,
-
 
4302
    D3DTIFF_INVALID_104,
-
 
4303
    D3DTIFF_INVALID_105,
-
 
4304
    D3DTIFF_INVALID_106,
-
 
4305
    D3DTIFF_INVALID_107,
-
 
4306
    D3DTIFF_INVALID_108,
-
 
4307
    D3DTIFF_INVALID_109,
-
 
4308
    D3DTIFF_INVALID_110,
-
 
4309
    D3DTIFF_INVALID_111,
-
 
4310
    D3DTIFF_INVALID_112,
-
 
4311
    D3DTIFF_INVALID_113,
-
 
4312
    D3DTIFF_INVALID_114,
-
 
4313
    D3DTIFF_INVALID_115,
-
 
4314
    D3DTIFF_INVALID_116,
-
 
4315
    D3DTIFF_INVALID_117,
-
 
4316
    D3DTIFF_INVALID_118,
-
 
4317
    D3DTIFF_INVALID_119,
-
 
4318
    D3DTIFF_INVALID_120,
-
 
4319
    D3DTIFF_INVALID_121,
-
 
4320
    D3DTIFF_INVALID_122,
-
 
4321
    D3DTIFF_INVALID_123,
-
 
4322
    D3DTIFF_INVALID_124,
-
 
4323
    D3DTIFF_INVALID_125,
-
 
4324
    D3DTIFF_INVALID_126,
-
 
4325
    D3DTIFF_INVALID_127,
-
 
4326
    D3DTIFF_INVALID_128,
-
 
4327
    D3DTIFF_INVALID_129,
-
 
4328
    D3DTIFF_INVALID_130,
-
 
4329
    D3DTIFF_INVALID_131,
-
 
4330
    D3DTIFF_INVALID_132,
-
 
4331
    D3DTIFF_INVALID_133,
-
 
4332
    D3DTIFF_INVALID_134,
-
 
4333
    D3DTIFF_INVALID_135,
-
 
4334
    D3DTIFF_INVALID_136,
-
 
4335
    D3DTIFF_INVALID_137,
-
 
4336
    D3DTIFF_INVALID_138,
-
 
4337
    D3DTIFF_INVALID_139,
-
 
4338
    D3DTIFF_INVALID_140,
-
 
4339
    D3DTIFF_INVALID_141,
-
 
4340
    D3DTIFF_INVALID_142,
-
 
4341
    D3DTIFF_INVALID_143,
-
 
4342
    D3DTIFF_INVALID_144,
-
 
4343
    D3DTIFF_INVALID_145,
-
 
4344
    D3DTIFF_INVALID_146,
-
 
4345
    D3DTIFF_INVALID_147,
-
 
4346
    D3DTIFF_INVALID_148,
-
 
4347
    D3DTIFF_INVALID_149,
-
 
4348
    D3DTIFF_INVALID_150,
-
 
4349
    D3DTIFF_INVALID_151,
-
 
4350
    D3DTIFF_INVALID_152,
-
 
4351
    D3DTIFF_INVALID_153,
-
 
4352
    D3DTIFF_INVALID_154,
-
 
4353
    D3DTIFF_INVALID_155,
-
 
4354
    D3DTIFF_INVALID_156,
-
 
4355
    D3DTIFF_INVALID_157,
-
 
4356
    D3DTIFF_INVALID_158,
-
 
4357
    D3DTIFF_INVALID_159,
-
 
4358
    D3DTIFF_INVALID_160,
-
 
4359
    D3DTIFF_INVALID_161,
-
 
4360
    D3DTIFF_INVALID_162,
-
 
4361
    D3DTIFF_INVALID_163,
-
 
4362
    D3DTIFF_INVALID_164,
-
 
4363
    D3DTIFF_INVALID_165,
-
 
4364
    D3DTIFF_INVALID_166,
-
 
4365
    D3DTIFF_INVALID_167,
-
 
4366
    D3DTIFF_INVALID_168,
-
 
4367
    D3DTIFF_INVALID_169,
-
 
4368
    D3DTIFF_INVALID_170,
-
 
4369
    D3DTIFF_INVALID_171,
-
 
4370
    D3DTIFF_INVALID_172,
-
 
4371
    D3DTIFF_INVALID_173,
-
 
4372
    D3DTIFF_INVALID_174,
-
 
4373
    D3DTIFF_INVALID_175,
-
 
4374
    D3DTIFF_INVALID_176,
-
 
4375
    D3DTIFF_INVALID_177,
-
 
4376
    D3DTIFF_INVALID_178,
-
 
4377
    D3DTIFF_INVALID_179,
-
 
4378
    D3DTIFF_INVALID_180,
-
 
4379
    D3DTIFF_INVALID_181,
-
 
4380
    D3DTIFF_INVALID_182,
-
 
4381
    D3DTIFF_INVALID_183,
-
 
4382
    D3DTIFF_INVALID_184,
-
 
4383
    D3DTIFF_INVALID_185,
-
 
4384
    D3DTIFF_INVALID_186,
-
 
4385
    D3DTIFF_INVALID_187,
-
 
4386
    D3DTIFF_INVALID_188,
-
 
4387
    D3DTIFF_INVALID_189,
-
 
4388
    D3DTIFF_INVALID_190,
-
 
4389
    D3DTIFF_INVALID_191,
-
 
4390
    D3DTIFF_INVALID_192,
-
 
4391
    D3DTIFF_INVALID_193,
-
 
4392
    D3DTIFF_INVALID_194,
-
 
4393
    D3DTIFF_INVALID_195,
-
 
4394
    D3DTIFF_INVALID_196,
-
 
4395
    D3DTIFF_INVALID_197,
-
 
4396
    D3DTIFF_INVALID_198,
-
 
4397
    D3DTIFF_INVALID_199,
-
 
4398
    D3DTIFF_INVALID_200,
-
 
4399
    D3DTIFF_INVALID_201,
-
 
4400
    D3DTIFF_INVALID_202,
-
 
4401
    D3DTIFF_INVALID_203,
-
 
4402
    D3DTIFF_INVALID_204,
-
 
4403
    D3DTIFF_INVALID_205,
-
 
4404
    D3DTIFF_INVALID_206,
-
 
4405
    D3DTIFF_INVALID_207,
-
 
4406
    D3DTIFF_INVALID_208,
-
 
4407
    D3DTIFF_INVALID_209,
-
 
4408
    D3DTIFF_INVALID_210,
-
 
4409
    D3DTIFF_INVALID_211,
-
 
4410
    D3DTIFF_INVALID_212,
-
 
4411
    D3DTIFF_INVALID_213,
-
 
4412
    D3DTIFF_INVALID_214,
-
 
4413
    D3DTIFF_INVALID_215,
-
 
4414
    D3DTIFF_INVALID_216,
-
 
4415
    D3DTIFF_INVALID_217,
-
 
4416
    D3DTIFF_INVALID_218,
-
 
4417
    D3DTIFF_INVALID_219,
-
 
4418
    D3DTIFF_INVALID_220,
-
 
4419
    D3DTIFF_INVALID_221,
-
 
4420
    D3DTIFF_INVALID_222,
-
 
4421
    D3DTIFF_INVALID_223,
-
 
4422
    D3DTIFF_INVALID_224,
-
 
4423
    D3DTIFF_INVALID_225,
-
 
4424
    D3DTIFF_INVALID_226,
-
 
4425
    D3DTIFF_INVALID_227,
-
 
4426
    D3DTIFF_INVALID_228,
-
 
4427
    D3DTIFF_INVALID_229,
-
 
4428
    D3DTIFF_INVALID_230,
-
 
4429
    D3DTIFF_INVALID_231,
-
 
4430
    D3DTIFF_INVALID_232,
-
 
4431
    D3DTIFF_INVALID_233,
-
 
4432
    D3DTIFF_INVALID_234,
-
 
4433
    D3DTIFF_INVALID_235,
-
 
4434
    D3DTIFF_INVALID_236,
-
 
4435
    D3DTIFF_INVALID_237,
-
 
4436
    D3DTIFF_INVALID_238,
-
 
4437
    D3DTIFF_INVALID_239,
-
 
4438
    D3DTIFF_INVALID_240,
-
 
4439
    D3DTIFF_INVALID_241,
-
 
4440
    D3DTIFF_INVALID_242,
-
 
4441
    D3DTIFF_INVALID_243,
-
 
4442
    D3DTIFF_INVALID_244,
-
 
4443
    D3DTIFF_INVALID_245,
-
 
4444
    D3DTIFF_INVALID_246,
-
 
4445
    D3DTIFF_INVALID_247,
-
 
4446
    D3DTIFF_INVALID_248,
-
 
4447
    D3DTIFF_INVALID_249,
-
 
4448
    D3DTIFF_INVALID_250,
-
 
4449
    D3DTIFF_INVALID_251,
-
 
4450
    D3DTIFF_INVALID_252,
-
 
4451
    D3DTIFF_INVALID_253,
-
 
4452
    D3DTIFF_INVALID_254,
-
 
4453
    D3DTIFF_INVALID_255,
-
 
4454
    D3DTTFF_PROJECTED  // texcoords to be divided by COUNTth element
-
 
4455
  );
7338
  );
4456
 
7339
 
4457
{ Macros to set texture coordinate format bits in the FVF id }
-
 
4458
 
-
 
4459
const
7340
const
-
 
7341
  D3DTTFF_PROJECTED       = TD3DTextureTransformFlags(256); // texcoords to be divided by COUNTth element
-
 
7342
 
-
 
7343
// Macros to set texture coordinate format bits in the FVF id
-
 
7344
 
4460
  D3DFVF_TEXTUREFORMAT2 = 0;         // Two floating point values
7345
D3DFVF_TEXTUREFORMAT2 = 0;         // Two floating point values
4461
  D3DFVF_TEXTUREFORMAT1 = 3;         // One floating point value
7346
D3DFVF_TEXTUREFORMAT1 = 3;         // One floating point value
4462
  D3DFVF_TEXTUREFORMAT3 = 1;         // Three floating point values
7347
D3DFVF_TEXTUREFORMAT3 = 1;         // Three floating point values
4463
  D3DFVF_TEXTUREFORMAT4 = 2;         // Four floating point values
7348
D3DFVF_TEXTUREFORMAT4 = 2;         // Four floating point values
4464
 
7349
 
Line 4467... Line 7352...
4467
function D3DFVF_TEXCOORDSIZE4(CoordIndex: DWORD): DWORD;
7352
function D3DFVF_TEXCOORDSIZE4(CoordIndex: DWORD) : DWORD;
4468
function D3DFVF_TEXCOORDSIZE1(CoordIndex: DWORD): DWORD;
7353
function D3DFVF_TEXCOORDSIZE1(CoordIndex: DWORD) : DWORD;
4469
 
7354
 
4470
(*==========================================================================;
7355
(*==========================================================================;
4471
 *
7356
 *
4472
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
-
 
4473
 *
7357
 *
4474
 *  File:       d3dcaps.h
7358
 *  File:       d3dcaps.h
4475
 *  Content:    Direct3D capabilities include file
7359
 *  Content:    Direct3D capabilities include file
4476
 *
7360
 *
4477
 ***************************************************************************)
7361
 ***************************************************************************)
4478
 
7362
 
4479
{ Description of capabilities of transform }
7363
(* Description of capabilities of transform *)
4480
 
7364
 
4481
type
7365
type
4482
  PD3DTransformCaps = ^TD3DTransformCaps;
7366
  PD3DTransformCaps = ^TD3DTransformCaps;
4483
  TD3DTransformCaps = record
7367
  TD3DTransformCaps = packed record
4484
    dwSize: DWORD;
7368
    dwSize: DWORD;
4485
    dwCaps: DWORD;
7369
    dwCaps: DWORD;
4486
  end;
7370
  end;
4487
 
7371
 
4488
  D3DTRANSFORMCAPS = TD3DTransformCaps;
-
 
4489
  LPD3DTRANSFORMCAPS = PD3DTransformCaps;
-
 
4490
 
-
 
4491
const
7372
const
4492
  D3DTRANSFORMCAPS_CLIP = $00000001; // Will clip whilst transforming
7373
  D3DTRANSFORMCAPS_CLIP         = $00000001; (* Will clip whilst transforming *)
4493
 
7374
 
4494
{ Description of capabilities of lighting }
7375
(* Description of capabilities of lighting *)
4495
 
7376
 
4496
type
7377
type
4497
  PD3DLightingCaps = ^TD3DLightingCaps;
7378
  PD3DLightingCaps = ^TD3DLightingCaps;
4498
  TD3DLightingCaps = record
7379
  TD3DLightingCaps = packed record
4499
    dwSize: DWORD;
7380
    dwSize: DWORD;
4500
    dwCaps: DWORD;            // Lighting caps
7381
    dwCaps: DWORD;                   (* Lighting caps *)
4501
    dwLightingModel: DWORD;   // Lighting model - RGB or mono
7382
    dwLightingModel: DWORD;          (* Lighting model - RGB or mono *)
4502
    dwNumLights: DWORD;       // Number of lights that can be handled
7383
    dwNumLights: DWORD;              (* Number of lights that can be handled *)
4503
  end;
7384
  end;
4504
 
7385
 
4505
  D3DLIGHTINGCAPS = TD3DLightingCaps;
-
 
4506
  LPD3DLIGHTINGCAPS = PD3DLightingCaps;
-
 
4507
 
-
 
4508
const
7386
const
4509
  D3DLIGHTINGMODEL_RGB        = $00000001;
7387
  D3DLIGHTINGMODEL_RGB            = $00000001;
4510
  D3DLIGHTINGMODEL_MONO       = $00000002;
7388
  D3DLIGHTINGMODEL_MONO           = $00000002;
4511
 
7389
 
4512
  D3DLIGHTCAPS_POINT          = $00000001; // Point lights supported
7390
  D3DLIGHTCAPS_POINT              = $00000001; (* Point lights supported *)
4513
  D3DLIGHTCAPS_SPOT           = $00000002; // Spot lights supported
7391
  D3DLIGHTCAPS_SPOT               = $00000002; (* Spot lights supported *)
4514
  D3DLIGHTCAPS_DIRECTIONAL    = $00000004; // Directional lights supported
7392
  D3DLIGHTCAPS_DIRECTIONAL        = $00000004; (* Directional lights supported *)
4515
  D3DLIGHTCAPS_PARALLELPOINT  = $00000008; // Parallel point lights supported
7393
  D3DLIGHTCAPS_PARALLELPOINT      = $00000008; (* Parallel point lights supported *)
4516
  D3DLIGHTCAPS_GLSPOT         = $00000010; // GL syle spot lights supported
7394
  D3DLIGHTCAPS_GLSPOT             = $00000010; (* GL syle spot lights supported *)
4517
 
7395
 
4518
{ Description of capabilities for each primitive type }
7396
(* Description of capabilities for each primitive type *)
4519
 
7397
 
4520
type
7398
type
4521
  PD3DPrimCaps = ^TD3DPrimCaps;
7399
  PD3DPrimCaps = ^TD3DPrimCaps;
4522
  TD3DPrimCaps = record
7400
  TD3DPrimCaps = packed record
4523
    dwSize: DWORD;
7401
    dwSize: DWORD;
4524
    dwMiscCaps: DWORD;                 // Capability flags
7402
    dwMiscCaps: DWORD;                 (* Capability flags *)
4525
    dwRasterCaps: DWORD;
7403
    dwRasterCaps: DWORD;
4526
    dwZCmpCaps: DWORD;
7404
    dwZCmpCaps: DWORD;
4527
    dwSrcBlendCaps: DWORD;
7405
    dwSrcBlendCaps: DWORD;
4528
    dwDestBlendCaps: DWORD;
7406
    dwDestBlendCaps: DWORD;
4529
    dwAlphaCmpCaps: DWORD;
7407
    dwAlphaCmpCaps: DWORD;
4530
    dwShadeCaps: DWORD;
7408
    dwShadeCaps: DWORD;
4531
    dwTextureCaps: DWORD;
7409
    dwTextureCaps: DWORD;
4532
    dwTextureFilterCaps: DWORD;
7410
    dwTextureFilterCaps: DWORD;
4533
    dwTextureBlendCaps: DWORD;
7411
    dwTextureBlendCaps: DWORD;
4534
    dwTextureAddressCaps: DWORD;
7412
    dwTextureAddressCaps: DWORD;
4535
    dwStippleWidth: DWORD;             // maximum width and height of
7413
    dwStippleWidth: DWORD;             (* maximum width and height of *)
4536
    dwStippleHeight: DWORD;            // of supported stipple (up to 32x32)
7414
    dwStippleHeight: DWORD;            (* of supported stipple (up to 32x32) *)
4537
  end;
7415
  end;
4538
 
7416
 
4539
  D3DPRIMCAPS = TD3DPrimCaps;
-
 
4540
  LPD3DPRIMCAPS = PD3DPrimCaps;
-
 
4541
 
-
 
4542
{ TD3DPrimCaps dwMiscCaps }
-
 
4543
 
-
 
4544
const
7417
const
-
 
7418
(* TD3DPrimCaps dwMiscCaps *)
-
 
7419
 
4545
  D3DPMISCCAPS_MASKPLANES         = $00000001;
7420
  D3DPMISCCAPS_MASKPLANES         = $00000001;
4546
  D3DPMISCCAPS_MASKZ              = $00000002;
7421
  D3DPMISCCAPS_MASKZ              = $00000002;
4547
  D3DPMISCCAPS_LINEPATTERNREP     = $00000004;
7422
  D3DPMISCCAPS_LINEPATTERNREP     = $00000004;
4548
  D3DPMISCCAPS_CONFORMANT         = $00000008;
7423
  D3DPMISCCAPS_CONFORMANT         = $00000008;
4549
  D3DPMISCCAPS_CULLNONE           = $00000010;
7424
  D3DPMISCCAPS_CULLNONE           = $00000010;
4550
  D3DPMISCCAPS_CULLCW             = $00000020;
7425
  D3DPMISCCAPS_CULLCW             = $00000020;
4551
  D3DPMISCCAPS_CULLCCW            = $00000040;
7426
  D3DPMISCCAPS_CULLCCW            = $00000040;
4552
 
7427
 
4553
{ TD3DPrimCaps dwRasterCaps }
7428
(* TD3DPrimCaps dwRasterCaps *)
4554
 
7429
 
4555
  D3DPRASTERCAPS_DITHER                     = $00000001;
7430
  D3DPRASTERCAPS_DITHER           = $00000001;
4556
  D3DPRASTERCAPS_ROP2                       = $00000002;
7431
  D3DPRASTERCAPS_ROP2             = $00000002;
4557
  D3DPRASTERCAPS_XOR                        = $00000004;
7432
  D3DPRASTERCAPS_XOR              = $00000004;
4558
  D3DPRASTERCAPS_PAT                        = $00000008;
7433
  D3DPRASTERCAPS_PAT              = $00000008;
Line 4573... Line 7448...
4573
  D3DPRASTERCAPS_WBUFFER                    = $00040000;
7448
  D3DPRASTERCAPS_WBUFFER                      = $00040000;
4574
  D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT = $00080000;
7449
  D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT   = $00080000;
4575
  D3DPRASTERCAPS_WFOG                       = $00100000;
7450
  D3DPRASTERCAPS_WFOG                         = $00100000;
4576
  D3DPRASTERCAPS_ZFOG                       = $00200000;
7451
  D3DPRASTERCAPS_ZFOG                         = $00200000;
4577
 
7452
 
4578
{ TD3DPrimCaps dwZCmpCaps, dwAlphaCmpCaps }
7453
(* TD3DPrimCaps dwZCmpCaps, dwAlphaCmpCaps *)
4579
 
7454
 
-
 
7455
const
4580
  D3DPCMPCAPS_NEVER               = $00000001;
7456
  D3DPCMPCAPS_NEVER               = $00000001;
4581
  D3DPCMPCAPS_LESS                = $00000002;
7457
  D3DPCMPCAPS_LESS                = $00000002;
4582
  D3DPCMPCAPS_EQUAL               = $00000004;
7458
  D3DPCMPCAPS_EQUAL               = $00000004;
4583
  D3DPCMPCAPS_LESSEQUAL           = $00000008;
7459
  D3DPCMPCAPS_LESSEQUAL           = $00000008;
4584
  D3DPCMPCAPS_GREATER             = $00000010;
7460
  D3DPCMPCAPS_GREATER             = $00000010;
4585
  D3DPCMPCAPS_NOTEQUAL            = $00000020;
7461
  D3DPCMPCAPS_NOTEQUAL            = $00000020;
4586
  D3DPCMPCAPS_GREATEREQUAL        = $00000040;
7462
  D3DPCMPCAPS_GREATEREQUAL        = $00000040;
4587
  D3DPCMPCAPS_ALWAYS              = $00000080;
7463
  D3DPCMPCAPS_ALWAYS              = $00000080;
4588
 
7464
 
4589
{ TD3DPrimCaps dwSourceBlendCaps, dwDestBlendCaps }
7465
(* TD3DPrimCaps dwSourceBlendCaps, dwDestBlendCaps *)
4590
 
7466
 
4591
  D3DPBLENDCAPS_ZERO              = $00000001;
7467
  D3DPBLENDCAPS_ZERO              = $00000001;
4592
  D3DPBLENDCAPS_ONE               = $00000002;
7468
  D3DPBLENDCAPS_ONE               = $00000002;
4593
  D3DPBLENDCAPS_SRCCOLOR          = $00000004;
7469
  D3DPBLENDCAPS_SRCCOLOR          = $00000004;
4594
  D3DPBLENDCAPS_INVSRCCOLOR       = $00000008;
7470
  D3DPBLENDCAPS_INVSRCCOLOR       = $00000008;
Line 4600... Line 7476...
4600
  D3DPBLENDCAPS_INVDESTCOLOR      = $00000200;
7476
  D3DPBLENDCAPS_INVDESTCOLOR      = $00000200;
4601
  D3DPBLENDCAPS_SRCALPHASAT       = $00000400;
7477
  D3DPBLENDCAPS_SRCALPHASAT       = $00000400;
4602
  D3DPBLENDCAPS_BOTHSRCALPHA      = $00000800;
7478
  D3DPBLENDCAPS_BOTHSRCALPHA      = $00000800;
4603
  D3DPBLENDCAPS_BOTHINVSRCALPHA   = $00001000;
7479
  D3DPBLENDCAPS_BOTHINVSRCALPHA   = $00001000;
4604
 
7480
 
4605
{ TD3DPrimCaps dwShadeCaps }
7481
(* TD3DPrimCaps dwShadeCaps *)
4606
 
7482
 
4607
  D3DPSHADECAPS_COLORFLATMONO             = $00000001;
7483
  D3DPSHADECAPS_COLORFLATMONO             = $00000001;
4608
  D3DPSHADECAPS_COLORFLATRGB              = $00000002;
7484
  D3DPSHADECAPS_COLORFLATRGB              = $00000002;
4609
  D3DPSHADECAPS_COLORGOURAUDMONO          = $00000004;
7485
  D3DPSHADECAPS_COLORGOURAUDMONO          = $00000004;
4610
  D3DPSHADECAPS_COLORGOURAUDRGB           = $00000008;
7486
  D3DPSHADECAPS_COLORGOURAUDRGB           = $00000008;
Line 4627... Line 7503...
4627
 
7503
 
4628
  D3DPSHADECAPS_FOGFLAT                   = $00040000;
7504
  D3DPSHADECAPS_FOGFLAT                   = $00040000;
4629
  D3DPSHADECAPS_FOGGOURAUD                = $00080000;
7505
  D3DPSHADECAPS_FOGGOURAUD                = $00080000;
4630
  D3DPSHADECAPS_FOGPHONG                  = $00100000;
7506
  D3DPSHADECAPS_FOGPHONG                  = $00100000;
4631
 
7507
 
4632
{ TD3DPrimCaps dwTextureCaps }
7508
(* TD3DPrimCaps dwTextureCaps *)
4633
 
7509
 
-
 
7510
(*
-
 
7511
 * Perspective-correct texturing is supported
-
 
7512
 *)
4634
  D3DPTEXTURECAPS_PERSPECTIVE              = $00000001;
7513
  D3DPTEXTURECAPS_PERSPECTIVE     = $00000001;
-
 
7514
 
-
 
7515
(*
-
 
7516
 * Power-of-2 texture dimensions are required
-
 
7517
 *)
4635
  D3DPTEXTURECAPS_POW2                     = $00000002;
7518
  D3DPTEXTURECAPS_POW2            = $00000002;
-
 
7519
 
-
 
7520
(*
-
 
7521
 * Alpha in texture pixels is supported
-
 
7522
 *)
4636
  D3DPTEXTURECAPS_ALPHA                    = $00000004;
7523
  D3DPTEXTURECAPS_ALPHA           = $00000004;
-
 
7524
 
-
 
7525
(*
-
 
7526
 * Color-keyed textures are supported
-
 
7527
 *)
4637
  D3DPTEXTURECAPS_TRANSPARENCY             = $00000008;
7528
  D3DPTEXTURECAPS_TRANSPARENCY    = $00000008;
-
 
7529
 
-
 
7530
(*
-
 
7531
 * obsolete, see D3DPTADDRESSCAPS_BORDER
-
 
7532
 *)
4638
  D3DPTEXTURECAPS_BORDER                   = $00000010;
7533
  D3DPTEXTURECAPS_BORDER          = $00000010;
-
 
7534
 
-
 
7535
(*
-
 
7536
 * Only square textures are supported
-
 
7537
 *)
4639
  D3DPTEXTURECAPS_SQUAREONLY               = $00000020;
7538
  D3DPTEXTURECAPS_SQUAREONLY      = $00000020;
-
 
7539
 
-
 
7540
(*
-
 
7541
 * Texture indices are not scaled by the texture size prior
-
 
7542
 * to interpolation.
-
 
7543
 *)
4640
  D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE = $00000040;
7544
  D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE = $00000040;
-
 
7545
 
-
 
7546
(*
-
 
7547
 * Device can draw alpha from texture palettes
-
 
7548
 *)
4641
  D3DPTEXTURECAPS_ALPHAPALETTE             = $00000080;
7549
  D3DPTEXTURECAPS_ALPHAPALETTE    = $00000080;
-
 
7550
 
-
 
7551
(*
-
 
7552
 * Device can use non-POW2 textures if:
-
 
7553
 *  1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
-
 
7554
 *  2) D3DRS_WRAP(N) is zero for this texture's coordinates
-
 
7555
 *  3) mip mapping is not enabled (use magnification filter only)
-
 
7556
 *)
4642
  D3DPTEXTURECAPS_NONPOW2CONDITIONAL       = $00000100;
7557
  D3DPTEXTURECAPS_NONPOW2CONDITIONAL  = $00000100;
-
 
7558
 
-
 
7559
// 0x00000200L unused
-
 
7560
 
-
 
7561
(*
-
 
7562
 * Device can divide transformed texture coordinates by the
-
 
7563
 * COUNTth texture coordinate (can do D3DTTFF_PROJECTED)
-
 
7564
 *)
4643
  D3DPTEXTURECAPS_PROJECTED                = $00000400;
7565
  D3DPTEXTURECAPS_PROJECTED  = $00000400;
-
 
7566
 
-
 
7567
(*
-
 
7568
 * Device can do cubemap textures
-
 
7569
 *)
4644
  D3DPTEXTURECAPS_CUBEMAP                  = $00000800;
7570
  D3DPTEXTURECAPS_CUBEMAP           = $00000800;
-
 
7571
 
4645
  D3DPTEXTURECAPS_COLORKEYBLEND            = $00001000;
7572
  D3DPTEXTURECAPS_COLORKEYBLEND     = $00001000;
4646
 
7573
 
-
 
7574
 
4647
{ TD3DPrimCaps dwTextureFilterCaps }
7575
(* TD3DPrimCaps dwTextureFilterCaps *)
4648
 
7576
 
4649
  D3DPTFILTERCAPS_NEAREST          = $00000001;
7577
  D3DPTFILTERCAPS_NEAREST         = $00000001;
4650
  D3DPTFILTERCAPS_LINEAR           = $00000002;
7578
  D3DPTFILTERCAPS_LINEAR          = $00000002;
4651
  D3DPTFILTERCAPS_MIPNEAREST       = $00000004;
7579
  D3DPTFILTERCAPS_MIPNEAREST      = $00000004;
4652
  D3DPTFILTERCAPS_MIPLINEAR        = $00000008;
7580
  D3DPTFILTERCAPS_MIPLINEAR       = $00000008;
4653
  D3DPTFILTERCAPS_LINEARMIPNEAREST = $00000010;
7581
  D3DPTFILTERCAPS_LINEARMIPNEAREST = $00000010;
4654
  D3DPTFILTERCAPS_LINEARMIPLINEAR  = $00000020;
7582
  D3DPTFILTERCAPS_LINEARMIPLINEAR = $00000020;
4655
 
7583
 
4656
{ Device3 Min Filter }
7584
(* Device3 Min Filter *)
4657
 
-
 
4658
  D3DPTFILTERCAPS_MINFPOINT       = $00000100;
7585
  D3DPTFILTERCAPS_MINFPOINT       = $00000100;
4659
  D3DPTFILTERCAPS_MINFLINEAR      = $00000200;
7586
  D3DPTFILTERCAPS_MINFLINEAR      = $00000200;
4660
  D3DPTFILTERCAPS_MINFANISOTROPIC = $00000400;
7587
  D3DPTFILTERCAPS_MINFANISOTROPIC = $00000400;
4661
 
7588
 
4662
{ Device3 Mip Filter }
7589
(* Device3 Mip Filter *)
4663
 
-
 
4664
  D3DPTFILTERCAPS_MIPFPOINT       = $00010000;
7590
  D3DPTFILTERCAPS_MIPFPOINT       = $00010000;
4665
  D3DPTFILTERCAPS_MIPFLINEAR      = $00020000;
7591
  D3DPTFILTERCAPS_MIPFLINEAR      = $00020000;
4666
 
7592
 
4667
{ Device3 Mag Filter }
7593
(* Device3 Mag Filter *)
4668
 
-
 
4669
  D3DPTFILTERCAPS_MAGFPOINT         = $01000000;
7594
  D3DPTFILTERCAPS_MAGFPOINT         = $01000000;
4670
  D3DPTFILTERCAPS_MAGFLINEAR        = $02000000;
7595
  D3DPTFILTERCAPS_MAGFLINEAR        = $02000000;
4671
  D3DPTFILTERCAPS_MAGFANISOTROPIC   = $04000000;
7596
  D3DPTFILTERCAPS_MAGFANISOTROPIC   = $04000000;
4672
  D3DPTFILTERCAPS_MAGFAFLATCUBIC    = $08000000;
7597
  D3DPTFILTERCAPS_MAGFAFLATCUBIC    = $08000000;
4673
  D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC = $10000000;
7598
  D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC = $10000000;
4674
 
7599
 
4675
{ TD3DPrimCaps dwTextureBlendCaps }
7600
(* TD3DPrimCaps dwTextureBlendCaps *)
4676
 
7601
 
4677
  D3DPTBLENDCAPS_DECAL            = $00000001;
7602
  D3DPTBLENDCAPS_DECAL            = $00000001;
4678
  D3DPTBLENDCAPS_MODULATE         = $00000002;
7603
  D3DPTBLENDCAPS_MODULATE         = $00000002;
4679
  D3DPTBLENDCAPS_DECALALPHA       = $00000004;
7604
  D3DPTBLENDCAPS_DECALALPHA       = $00000004;
4680
  D3DPTBLENDCAPS_MODULATEALPHA    = $00000008;
7605
  D3DPTBLENDCAPS_MODULATEALPHA    = $00000008;
4681
  D3DPTBLENDCAPS_DECALMASK        = $00000010;
7606
  D3DPTBLENDCAPS_DECALMASK        = $00000010;
4682
  D3DPTBLENDCAPS_MODULATEMASK     = $00000020;
7607
  D3DPTBLENDCAPS_MODULATEMASK     = $00000020;
4683
  D3DPTBLENDCAPS_COPY             = $00000040;
7608
  D3DPTBLENDCAPS_COPY             = $00000040;
4684
  D3DPTBLENDCAPS_ADD              = $00000080;
7609
  D3DPTBLENDCAPS_ADD                      = $00000080;
4685
 
7610
 
4686
{ TD3DPrimCaps dwTextureAddressCaps }
7611
(* TD3DPrimCaps dwTextureAddressCaps *)
4687
 
-
 
4688
  D3DPTADDRESSCAPS_WRAP           = $00000001;
7612
  D3DPTADDRESSCAPS_WRAP           = $00000001;
4689
  D3DPTADDRESSCAPS_MIRROR         = $00000002;
7613
  D3DPTADDRESSCAPS_MIRROR         = $00000002;
4690
  D3DPTADDRESSCAPS_CLAMP          = $00000004;
7614
  D3DPTADDRESSCAPS_CLAMP          = $00000004;
4691
  D3DPTADDRESSCAPS_BORDER         = $00000008;
7615
  D3DPTADDRESSCAPS_BORDER         = $00000008;
4692
  D3DPTADDRESSCAPS_INDEPENDENTUV  = $00000010;
7616
  D3DPTADDRESSCAPS_INDEPENDENTUV  = $00000010;
4693
 
7617
 
4694
{ D3DDEVICEDESC dwStencilCaps }
7618
(* D3DDEVICEDESC dwStencilCaps *)
4695
 
7619
 
4696
  D3DSTENCILCAPS_KEEP    = $00000001;
7620
  D3DSTENCILCAPS_KEEP     = $00000001;
4697
  D3DSTENCILCAPS_ZERO    = $00000002;
7621
  D3DSTENCILCAPS_ZERO     = $00000002;
4698
  D3DSTENCILCAPS_REPLACE = $00000004;
7622
  D3DSTENCILCAPS_REPLACE  = $00000004;
4699
  D3DSTENCILCAPS_INCRSAT = $00000008;
7623
  D3DSTENCILCAPS_INCRSAT  = $00000008;
4700
  D3DSTENCILCAPS_DECRSAT = $00000010;
7624
  D3DSTENCILCAPS_DECRSAT  = $00000010;
4701
  D3DSTENCILCAPS_INVERT  = $00000020;
7625
  D3DSTENCILCAPS_INVERT   = $00000020;
4702
  D3DSTENCILCAPS_INCR    = $00000040;
7626
  D3DSTENCILCAPS_INCR     = $00000040;
4703
  D3DSTENCILCAPS_DECR    = $00000080;
7627
  D3DSTENCILCAPS_DECR     = $00000080;
4704
 
7628
 
4705
{ D3DDEVICEDESC dwTextureOpCaps }
7629
(* D3DDEVICEDESC dwTextureOpCaps *)
4706
 
7630
 
4707
  D3DTEXOPCAPS_DISABLE                    = $00000001;
7631
  D3DTEXOPCAPS_DISABLE                    = $00000001;
4708
  D3DTEXOPCAPS_SELECTARG1                 = $00000002;
7632
  D3DTEXOPCAPS_SELECTARG1                 = $00000002;
4709
  D3DTEXOPCAPS_SELECTARG2                 = $00000004;
7633
  D3DTEXOPCAPS_SELECTARG2                 = $00000004;
4710
  D3DTEXOPCAPS_MODULATE                   = $00000008;
7634
  D3DTEXOPCAPS_MODULATE                   = $00000008;
Line 4727... Line 7651...
4727
  D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA  = $00100000;
7651
  D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA  = $00100000;
4728
  D3DTEXOPCAPS_BUMPENVMAP                 = $00200000;
7652
  D3DTEXOPCAPS_BUMPENVMAP                 = $00200000;
4729
  D3DTEXOPCAPS_BUMPENVMAPLUMINANCE        = $00400000;
7653
  D3DTEXOPCAPS_BUMPENVMAPLUMINANCE        = $00400000;
4730
  D3DTEXOPCAPS_DOTPRODUCT3                = $00800000;
7654
  D3DTEXOPCAPS_DOTPRODUCT3                = $00800000;
4731
 
7655
 
4732
{ D3DDEVICEDESC dwFVFCaps flags }
7656
(* D3DDEVICEDESC dwFVFCaps flags *)
4733
 
7657
 
4734
  D3DFVFCAPS_TEXCOORDCOUNTMASK  = $0000ffff; // mask for texture coordinate count field
7658
  D3DFVFCAPS_TEXCOORDCOUNTMASK    = $0000ffff; (* mask for texture coordinate count field *)
4735
  D3DFVFCAPS_DONOTSTRIPELEMENTS = $00080000; // Device prefers that vertex elements not be stripped
7659
  D3DFVFCAPS_DONOTSTRIPELEMENTS   = $00080000; (* Device prefers that vertex elements not be stripped *)
4736
 
7660
 
-
 
7661
(*
4737
{ Description for a device. }
7662
 * Description for a device.
-
 
7663
 * This is used to describe a device that is to be created or to query
-
 
7664
 * the current device.
-
 
7665
 *)
4738
 
7666
 
4739
type
7667
type
4740
  PD3DDeviceDesc_DX3 = ^TD3DDeviceDesc_DX3;
7668
  PD3DDeviceDesc = ^TD3DDeviceDesc;
4741
  TD3DDeviceDesc_DX3 = record
7669
  TD3DDeviceDesc = packed record
4742
    dwSize: DWORD;                       // Size of D3DDEVICEDESC structure
7670
    dwSize: DWORD;                       (* Size of TD3DDeviceDesc structure *)
4743
    dwFlags: DWORD;                      // Indicates which fields have valid data
7671
    dwFlags: DWORD;                      (* Indicates which fields have valid data *)
4744
    dcmColorModel: TD3DColorModel;        // Color model of device
7672
    dcmColorModel: TD3DColorModel;        (* Color model of device *)
4745
    dwDevCaps: DWORD;                    // Capabilities of device
7673
    dwDevCaps: DWORD;                    (* Capabilities of device *)
4746
    dtcTransformCaps: TD3DTransformCaps; // Capabilities of transform
7674
    dtcTransformCaps: TD3DTransformCaps;  (* Capabilities of transform *)
4747
    bClipping: BOOL;                     // Device can do 3D clipping
7675
    bClipping: BOOL;                     (* Device can do 3D clipping *)
4748
    dlcLightingCaps: TD3DLightingCaps;   // Capabilities of lighting
7676
    dlcLightingCaps: TD3DLightingCaps;    (* Capabilities of lighting *)
4749
    dpcLineCaps: TD3DPrimCaps;
7677
    dpcLineCaps: TD3DPrimCaps;
4750
    dpcTriCaps: TD3DPrimCaps;
7678
    dpcTriCaps: TD3DPrimCaps;
4751
    dwDeviceRenderBitDepth: DWORD;       // One of DDBB_8, 16, etc..
7679
    dwDeviceRenderBitDepth: DWORD;       (* One of DDBB_8, 16, etc.. *)
4752
    dwDeviceZBufferBitDepth: DWORD;      // One of DDBD_16, 32, etc..
7680
    dwDeviceZBufferBitDepth: DWORD;      (* One of DDBD_16, 32, etc.. *)
4753
    dwMaxBufferSize: DWORD;              // Maximum execute buffer size
7681
    dwMaxBufferSize: DWORD;              (* Maximum execute buffer size *)
4754
    dwMaxVertexCount: DWORD;             // Maximum vertex count
7682
    dwMaxVertexCount: DWORD;             (* Maximum vertex count *)
4755
  end;
7683
    // *** New fields for DX5 *** //
4756
 
7684
 
4757
  PD3DDeviceDesc_DX5 = ^TD3DDeviceDesc_DX5;
-
 
4758
  TD3DDeviceDesc_DX5 = record
-
 
4759
    dwSize: DWORD;                       // Size of D3DDEVICEDESC structure
-
 
4760
    dwFlags: DWORD;                      // Indicates which fields have valid data
-
 
4761
    dcmColorModel: TD3DColorModel;        // Color model of device
-
 
4762
    dwDevCaps: DWORD;                    // Capabilities of device
-
 
4763
    dtcTransformCaps: TD3DTransformCaps; // Capabilities of transform
-
 
4764
    bClipping: BOOL;                     // Device can do 3D clipping
-
 
4765
    dlcLightingCaps: TD3DLightingCaps;   // Capabilities of lighting
-
 
4766
    dpcLineCaps: TD3DPrimCaps;
-
 
4767
    dpcTriCaps: TD3DPrimCaps;
-
 
4768
    dwDeviceRenderBitDepth: DWORD;       // One of DDBB_8, 16, etc..
-
 
4769
    dwDeviceZBufferBitDepth: DWORD;      // One of DDBD_16, 32, etc..
-
 
4770
    dwMaxBufferSize: DWORD;              // Maximum execute buffer size
-
 
4771
    dwMaxVertexCount: DWORD;             // Maximum vertex count
-
 
4772
    // New fields for DX5
-
 
4773
    // Width and height caps are 0 for legacy HALs.
-
 
4774
    dwMinTextureWidth, dwMinTextureHeight  : DWORD;
-
 
4775
    dwMaxTextureWidth, dwMaxTextureHeight  : DWORD;
-
 
4776
    dwMinStippleWidth, dwMaxStippleWidth   : DWORD;
-
 
4777
    dwMinStippleHeight, dwMaxStippleHeight : DWORD;
-
 
4778
  end;
-
 
4779
 
-
 
4780
  PD3DDeviceDesc_DX6 = ^TD3DDeviceDesc_DX6;
-
 
4781
  TD3DDeviceDesc_DX6 = record
-
 
4782
    dwSize: DWORD;                       // Size of D3DDEVICEDESC structure
-
 
4783
    dwFlags: DWORD;                      // Indicates which fields have valid data
-
 
4784
    dcmColorModel: TD3DColorModel;        // Color model of device
-
 
4785
    dwDevCaps: DWORD;                    // Capabilities of device
-
 
4786
    dtcTransformCaps: TD3DTransformCaps; // Capabilities of transform
-
 
4787
    bClipping: BOOL;                     // Device can do 3D clipping
-
 
4788
    dlcLightingCaps: TD3DLightingCaps;   // Capabilities of lighting
-
 
4789
    dpcLineCaps: TD3DPrimCaps;
-
 
4790
    dpcTriCaps: TD3DPrimCaps;
-
 
4791
    dwDeviceRenderBitDepth: DWORD;       // One of DDBB_8, 16, etc..
-
 
4792
    dwDeviceZBufferBitDepth: DWORD;      // One of DDBD_16, 32, etc..
-
 
4793
    dwMaxBufferSize: DWORD;              // Maximum execute buffer size
-
 
4794
    dwMaxVertexCount: DWORD;             // Maximum vertex count
-
 
4795
 
-
 
4796
    // New fields for DX5
-
 
4797
    // Width and height caps are 0 for legacy HALs.
7685
    // Width and height caps are 0 for legacy HALs.
4798
    dwMinTextureWidth, dwMinTextureHeight  : DWORD;
7686
    dwMinTextureWidth, dwMinTextureHeight  : DWORD;
4799
    dwMaxTextureWidth, dwMaxTextureHeight  : DWORD;
7687
    dwMaxTextureWidth, dwMaxTextureHeight  : DWORD;
4800
    dwMinStippleWidth, dwMaxStippleWidth   : DWORD;
7688
    dwMinStippleWidth, dwMaxStippleWidth   : DWORD;
4801
    dwMinStippleHeight, dwMaxStippleHeight : DWORD;
7689
    dwMinStippleHeight, dwMaxStippleHeight : DWORD;
Line 4810... Line 7698...
4810
    // will get clipped properly.
7698
    // will get clipped properly.
4811
    dvGuardBandLeft: TD3DValue;
7699
    dvGuardBandLeft : TD3DValue;
4812
    dvGuardBandTop: TD3DValue;
7700
    dvGuardBandTop : TD3DValue;
4813
    dvGuardBandRight: TD3DValue;
7701
    dvGuardBandRight : TD3DValue;
4814
    dvGuardBandBottom: TD3DValue;
7702
    dvGuardBandBottom : TD3DValue;
-
 
7703
 
4815
    dvExtentsAdjust: TD3DValue;
7704
    dvExtentsAdjust : TD3DValue;
4816
    dwStencilCaps: DWORD;
7705
    dwStencilCaps : DWORD;
-
 
7706
 
4817
    dwFVFCaps: DWORD;           // low 4 bits: 0 implies TLVERTEX only, 1..8 imply FVF aware
7707
    dwFVFCaps : DWORD;  (* low 4 bits: 0 implies TLVERTEX only, 1..8 imply FVF aware *)
4818
    dwTextureOpCaps: DWORD;
7708
    dwTextureOpCaps : DWORD;
4819
    wMaxTextureBlendStages: Word;
7709
    wMaxTextureBlendStages : WORD;
4820
    wMaxSimultaneousTextures: Word;
7710
    wMaxSimultaneousTextures : WORD;
4821
  end;
7711
  end;
4822
 
7712
 
4823
{$IFDEF DirectX3}
-
 
4824
  TD3DDeviceDesc = TD3DDeviceDesc_DX3;
-
 
4825
  PD3DDeviceDesc = PD3DDeviceDesc_DX3;
-
 
4826
{$ENDIF}{$IFDEF DirectX5}
-
 
4827
  TD3DDeviceDesc = TD3DDeviceDesc_DX5;
-
 
4828
  PD3DDeviceDesc = PD3DDeviceDesc_DX5;
-
 
4829
{$ENDIF}{$IFDEF DirectX6}
-
 
4830
  TD3DDeviceDesc = TD3DDeviceDesc_DX6;
-
 
4831
  PD3DDeviceDesc = PD3DDeviceDesc_DX6;
-
 
4832
{$ENDIF}{$IFDEF DirectX7}
-
 
4833
  TD3DDeviceDesc = TD3DDeviceDesc_DX6;
-
 
4834
  PD3DDeviceDesc = PD3DDeviceDesc_DX6;
-
 
4835
{$ENDIF}
-
 
4836
 
-
 
4837
  D3DDEVICEDESC = TD3DDeviceDesc;
-
 
4838
  LPD3DDEVICEDESC = PD3DDeviceDesc;
-
 
4839
 
-
 
4840
  PD3DDeviceDesc7 = ^TD3DDeviceDesc7;
7713
  PD3DDeviceDesc7 = ^TD3DDeviceDesc7;
4841
  TD3DDeviceDesc7 = record
7714
  TD3DDeviceDesc7 = packed record
4842
    dwDevCaps: DWORD;
7715
    dwDevCaps:               DWORD;             (* Capabilities of device *)
4843
    dpcLineCaps: TD3DPrimCaps;
7716
    dpcLineCaps:             TD3DPrimCaps;
4844
    dpcTriCaps: TD3DPrimCaps;
7717
    dpcTriCaps:              TD3DPrimCaps;
4845
    dwDeviceRenderBitDepth: DWORD;
7718
    dwDeviceRenderBitDepth:  DWORD;             (* One of DDBB_8, 16, etc.. *)
4846
    dwDeviceZBufferBitDepth: DWORD;
7719
    dwDeviceZBufferBitDepth: DWORD;             (* One of DDBD_16, 32, etc.. *)
4847
 
7720
 
4848
    dwMinTextureWidth: DWORD;
-
 
4849
    dwMinTextureHeight: DWORD;
7721
    dwMinTextureWidth, dwMinTextureHeight: DWORD;
4850
    dwMaxTextureWidth: DWORD;
-
 
4851
    dwMaxTextureHeight: DWORD;
7722
    dwMaxTextureWidth, dwMaxTextureHeight: DWORD;
4852
 
7723
 
4853
    dwMaxTextureRepeat: DWORD;
7724
    dwMaxTextureRepeat:                    DWORD;
4854
    dwMaxTextureAspectRatio: DWORD;
7725
    dwMaxTextureAspectRatio:               DWORD;
4855
    dwMaxAnisotropy: DWORD;
7726
    dwMaxAnisotropy:                       DWORD;
4856
 
7727
 
Line 4862... Line 7733...
4862
    dvExtentsAdjust: TD3DValue;
7733
    dvExtentsAdjust:                       TD3DValue;
4863
    dwStencilCaps: DWORD;
7734
    dwStencilCaps:                         DWORD;
4864
 
7735
 
4865
    dwFVFCaps: DWORD;
7736
    dwFVFCaps:                             DWORD;
4866
    dwTextureOpCaps: DWORD;
7737
    dwTextureOpCaps:                       DWORD;
4867
    wMaxTextureBlendStages: Word;
7738
    wMaxTextureBlendStages:                WORD;
4868
    wMaxSimultaneousTextures: Word;
7739
    wMaxSimultaneousTextures:              WORD;
4869
 
7740
 
4870
    dwMaxActiveLights: DWORD;
7741
    dwMaxActiveLights:                     DWORD;
4871
    dvMaxVertexW: TD3DValue;
7742
    dvMaxVertexW:                          TD3DValue;
4872
    deviceGUID: TGUID;
7743
    deviceGUID:                            TGUID;
4873
 
7744
 
4874
    wMaxUserClipPlanes: Word;
7745
    wMaxUserClipPlanes:                    WORD;
4875
    wMaxVertexBlendMatrices: Word;
7746
    wMaxVertexBlendMatrices:               WORD;
4876
 
7747
 
4877
    dwVertexProcessingCaps: DWORD;
7748
    dwVertexProcessingCaps:                DWORD;
4878
 
7749
 
4879
    dwReserved1: DWORD;
7750
    dwReserved1:                           DWORD;
4880
    dwReserved2: DWORD;
7751
    dwReserved2:                           DWORD;
4881
    dwReserved3: DWORD;
7752
    dwReserved3:                           DWORD;
4882
    dwReserved4: DWORD;
7753
    dwReserved4:                           DWORD;
4883
  end;
7754
  end;
4884
 
7755
 
-
 
7756
const
-
 
7757
  D3DDEVICEDESCSIZE = sizeof(TD3DDeviceDesc);
-
 
7758
  D3DDEVICEDESC7SIZE = sizeof(TD3DDeviceDesc7);
4885
 
7759
 
4886
type
7760
type
4887
  TD3DEnumDevicesCallback = function(const lpGuid: TGUID;
7761
  TD3DEnumDevicesCallbackA = function (lpGuid: PGUID; // nil for the default device
4888
      lpDeviceDescription: LPSTR; lpDeviceName: LPSTR;
7762
      lpDeviceDescription: PAnsiChar; lpDeviceName: PAnsiChar;
4889
      const lpD3DHWDeviceDesc: TD3DDeviceDesc;
7763
      var lpD3DHWDeviceDesc: TD3DDeviceDesc;
4890
      const lpD3DHELDeviceDesc: TD3DDeviceDesc;
7764
      var lpD3DHELDeviceDesc: TD3DDeviceDesc;
4891
      lpUserArg: Pointer): HResult; stdcall;
7765
      lpContext : pointer) : HResult; stdcall;
-
 
7766
  TD3DEnumDevicesCallback = TD3DEnumDevicesCallbackA;
4892
 
7767
 
-
 
7768
  TD3DEnumDevicesCallback7A = function (
-
 
7769
      lpDeviceDescription: PAnsiChar; lpDeviceName: PAnsiChar;
-
 
7770
      const lpD3DDeviceDesc: TD3DDeviceDesc7; lpContext: Pointer) : HResult; stdcall;
4893
  LPD3DENUMDEVICESCALLBACK = TD3DEnumDevicesCallback;
7771
  TD3DEnumDevicesCallback7 = TD3DEnumDevicesCallback7A;
-
 
7772
 
-
 
7773
(* TD3DDeviceDesc dwFlags indicating valid fields *)
-
 
7774
 
-
 
7775
const
-
 
7776
  D3DDD_COLORMODEL            = $00000001; (* dcmColorModel is valid *)
-
 
7777
  D3DDD_DEVCAPS               = $00000002; (* dwDevCaps is valid *)
-
 
7778
  D3DDD_TRANSFORMCAPS         = $00000004; (* dtcTransformCaps is valid *)
-
 
7779
  D3DDD_LIGHTINGCAPS          = $00000008; (* dlcLightingCaps is valid *)
-
 
7780
  D3DDD_BCLIPPING             = $00000010; (* bClipping is valid *)
-
 
7781
  D3DDD_LINECAPS              = $00000020; (* dpcLineCaps is valid *)
-
 
7782
  D3DDD_TRICAPS               = $00000040; (* dpcTriCaps is valid *)
-
 
7783
  D3DDD_DEVICERENDERBITDEPTH  = $00000080; (* dwDeviceRenderBitDepth is valid *)
-
 
7784
  D3DDD_DEVICEZBUFFERBITDEPTH = $00000100; (* dwDeviceZBufferBitDepth is valid *)
-
 
7785
  D3DDD_MAXBUFFERSIZE         = $00000200; (* dwMaxBufferSize is valid *)
-
 
7786
  D3DDD_MAXVERTEXCOUNT        = $00000400; (* dwMaxVertexCount is valid *)
-
 
7787
 
-
 
7788
(* TD3DDeviceDesc dwDevCaps flags *)
-
 
7789
 
-
 
7790
  D3DDEVCAPS_FLOATTLVERTEX        = $00000001; (* Device accepts floating point *)
-
 
7791
                                                    (* for post-transform vertex data *)
-
 
7792
  D3DDEVCAPS_SORTINCREASINGZ      = $00000002; (* Device needs data sorted for increasing Z*)
-
 
7793
  D3DDEVCAPS_SORTDECREASINGZ      = $00000004; (* Device needs data sorted for decreasing Z*)
-
 
7794
  D3DDEVCAPS_SORTEXACT            = $00000008; (* Device needs data sorted exactly *)
4894
 
7795
 
-
 
7796
  D3DDEVCAPS_EXECUTESYSTEMMEMORY  = $00000010; (* Device can use execute buffers from system memory *)
-
 
7797
  D3DDEVCAPS_EXECUTEVIDEOMEMORY   = $00000020; (* Device can use execute buffers from video memory *)
-
 
7798
  D3DDEVCAPS_TLVERTEXSYSTEMMEMORY = $00000040; (* Device can use TL buffers from system memory *)
-
 
7799
  D3DDEVCAPS_TLVERTEXVIDEOMEMORY  = $00000080; (* Device can use TL buffers from video memory *)
-
 
7800
  D3DDEVCAPS_TEXTURESYSTEMMEMORY  = $00000100; (* Device can texture from system memory *)
4895
  TD3DEnumDevicesCallback7 = function(lpDeviceDescription: LPSTR; lpDeviceName: LPSTR;
7801
  D3DDEVCAPS_TEXTUREVIDEOMEMORY   = $00000200; (* Device can texture from device memory *)
4896
      const lpD3DDeviceDesc: TD3DDeviceDesc7; lpUserArg: Pointer): HResult; stdcall;
7802
  D3DDEVCAPS_DRAWPRIMTLVERTEX     = $00000400; (* Device can draw TLVERTEX primitives *)
-
 
7803
  D3DDEVCAPS_CANRENDERAFTERFLIP   = $00000800; (* Device can render without waiting for flip to complete *)
-
 
7804
  D3DDEVCAPS_TEXTURENONLOCALVIDMEM   = $00001000; (* Device can texture from nonlocal video memory *)
-
 
7805
  D3DDEVCAPS_DRAWPRIMITIVES2         = $00002000; (* Device can support DrawPrimitives2 *)
-
 
7806
  D3DDEVCAPS_SEPARATETEXTUREMEMORIES = $00004000; (* Device is texturing from separate memory pools *)
-
 
7807
  D3DDEVCAPS_DRAWPRIMITIVES2EX       = $00008000; (* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*)
-
 
7808
  D3DDEVCAPS_HWTRANSFORMANDLIGHT     = $00010000; (* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also *)
-
 
7809
  D3DDEVCAPS_CANBLTSYSTONONLOCAL     = $00020000; (* Device supports a Tex Blt from system memory to non-local vidmem *)
-
 
7810
  D3DDEVCAPS_HWRASTERIZATION         = $00080000; (* Device has HW acceleration for rasterization *)
4897
 
7811
 
4898
  LPD3DENUMDEVICESCALLBACK7 = TD3DEnumDevicesCallback7;
-
 
4899
 
-
 
4900
{ TD3DDeviceDesc dwFlags indicating valid fields }
-
 
4901
 
7812
(*
4902
const
-
 
4903
  D3DDD_COLORMODEL            = $00000001; // dcmColorModel is valid
-
 
4904
  D3DDD_DEVCAPS               = $00000002; // dwDevCaps is valid
-
 
4905
  D3DDD_TRANSFORMCAPS         = $00000004; // dtcTransformCaps is valid
-
 
4906
  D3DDD_LIGHTINGCAPS          = $00000008; // dlcLightingCaps is valid
-
 
4907
  D3DDD_BCLIPPING             = $00000010; // bClipping is valid
-
 
4908
  D3DDD_LINECAPS              = $00000020; // dpcLineCaps is valid
-
 
4909
  D3DDD_TRICAPS               = $00000040; // dpcTriCaps is valid
-
 
4910
  D3DDD_DEVICERENDERBITDEPTH  = $00000080; // dwDeviceRenderBitDepth is valid
-
 
4911
  D3DDD_DEVICEZBUFFERBITDEPTH = $00000100; // dwDeviceZBufferBitDepth is valid
-
 
4912
  D3DDD_MAXBUFFERSIZE         = $00000200; // dwMaxBufferSize is valid
-
 
4913
  D3DDD_MAXVERTEXCOUNT        = $00000400; // dwMaxVertexCount is valid
7813
 * These are the flags in the D3DDEVICEDESC7.dwVertexProcessingCaps field
4914
 
-
 
4915
{ TD3DDeviceDesc dwDevCaps flags }
-
 
4916
 
-
 
4917
  D3DDEVCAPS_FLOATTLVERTEX           = $00000001; // Device accepts floating point
-
 
4918
                                                 // for post-transform vertex data
-
 
4919
  D3DDEVCAPS_SORTINCREASINGZ         = $00000002; // Device needs data sorted for increasing Z
-
 
4920
  D3DDEVCAPS_SORTDECREASINGZ         = $00000004; // Device needs data sorted for decreasing Z
-
 
4921
  D3DDEVCAPS_SORTEXACT               = $00000008; // Device needs data sorted exactly
-
 
4922
 
-
 
4923
  D3DDEVCAPS_EXECUTESYSTEMMEMORY     = $00000010; // Device can use execute buffers from system memory
-
 
4924
  D3DDEVCAPS_EXECUTEVIDEOMEMORY      = $00000020; // Device can use execute buffers from video memory
-
 
4925
  D3DDEVCAPS_TLVERTEXSYSTEMMEMORY    = $00000040; // Device can use TL buffers from system memory
-
 
4926
  D3DDEVCAPS_TLVERTEXVIDEOMEMORY     = $00000080; // Device can use TL buffers from video memory
-
 
4927
  D3DDEVCAPS_TEXTURESYSTEMMEMORY     = $00000100; // Device can texture from system memory
-
 
4928
  D3DDEVCAPS_TEXTUREVIDEOMEMORY      = $00000200; // Device can texture from device memory
-
 
4929
  D3DDEVCAPS_DRAWPRIMTLVERTEX        = $00000400; // Device can draw TLVERTEX primitives
-
 
4930
  D3DDEVCAPS_CANRENDERAFTERFLIP      = $00000800; // Device can render without waiting for flip to complete
-
 
4931
  D3DDEVCAPS_TEXTURENONLOCALVIDMEM   = $00001000; // Device can texture from nonlocal video memory
-
 
4932
  D3DDEVCAPS_DRAWPRIMITIVES2         = $00002000; // Device can support DrawPrimitives2
-
 
4933
  D3DDEVCAPS_SEPARATETEXTUREMEMORIES = $00004000; // Device is texturing from separate memory pools
-
 
4934
  D3DDEVCAPS_DRAWPRIMITIVES2EX       = $00008000; // Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver
-
 
4935
  D3DDEVCAPS_HWTRANSFORMANDLIGHT     = $00010000; // Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also
-
 
4936
  D3DDEVCAPS_CANBLTSYSTONONLOCAL     = $00020000; // Device supports a Tex Blt from system memory to non-local vidmem
-
 
4937
  D3DDEVCAPS_HWRASTERIZATION         = $00080000; // Device has HW acceleration for rasterization
-
 
4938
 
7814
 *)
4939
{ TD3DDeviceDesc7.dwVertexProcessingCaps field }
-
 
4940
 
7815
 
-
 
7816
(* device can do texgen *)
4941
  D3DVTXPCAPS_TEXGEN            = $00000001;
7817
  D3DVTXPCAPS_TEXGEN              = $00000001;
-
 
7818
(* device can do IDirect3DDevice7 colormaterialsource ops *)
4942
  D3DVTXPCAPS_MATERIALSOURCE7   = $00000002;
7819
  D3DVTXPCAPS_MATERIALSOURCE7     = $00000002;
-
 
7820
(* device can do vertex fog *)
4943
  D3DVTXPCAPS_VERTEXFOG         = $00000004;
7821
  D3DVTXPCAPS_VERTEXFOG           = $00000004;
-
 
7822
(* device can do directional lights *)
4944
  D3DVTXPCAPS_DIRECTIONALLIGHTS = $00000008;
7823
  D3DVTXPCAPS_DIRECTIONALLIGHTS   = $00000008;
-
 
7824
(* device can do positional lights (includes point and spot) *)
4945
  D3DVTXPCAPS_POSITIONALLIGHTS  = $00000010;
7825
  D3DVTXPCAPS_POSITIONALLIGHTS    = $00000010;
-
 
7826
(* device can do local viewer *)
4946
  D3DVTXPCAPS_LOCALVIEWER       = $00000020;
7827
  D3DVTXPCAPS_LOCALVIEWER         = $00000020;
4947
 
7828
 
4948
  D3DFDS_COLORMODEL         = $00000001; // Match color model
7829
  D3DFDS_COLORMODEL        = $00000001; (* Match color model *)
4949
  D3DFDS_GUID               = $00000002; // Match guid
7830
  D3DFDS_GUID              = $00000002; (* Match guid *)
4950
  D3DFDS_HARDWARE           = $00000004; // Match hardware/software
7831
  D3DFDS_HARDWARE          = $00000004; (* Match hardware/software *)
4951
  D3DFDS_TRIANGLES          = $00000008; // Match in triCaps
7832
  D3DFDS_TRIANGLES         = $00000008; (* Match in triCaps *)
4952
  D3DFDS_LINES              = $00000010; // Match in lineCaps
7833
  D3DFDS_LINES             = $00000010; (* Match in lineCaps  *)
4953
  D3DFDS_MISCCAPS           = $00000020; // Match primCaps.dwMiscCaps
7834
  D3DFDS_MISCCAPS          = $00000020; (* Match primCaps.dwMiscCaps *)
4954
  D3DFDS_RASTERCAPS         = $00000040; // Match primCaps.dwRasterCaps
7835
  D3DFDS_RASTERCAPS        = $00000040; (* Match primCaps.dwRasterCaps *)
4955
  D3DFDS_ZCMPCAPS           = $00000080; // Match primCaps.dwZCmpCaps
7836
  D3DFDS_ZCMPCAPS          = $00000080; (* Match primCaps.dwZCmpCaps *)
4956
  D3DFDS_ALPHACMPCAPS       = $00000100; // Match primCaps.dwAlphaCmpCaps
7837
  D3DFDS_ALPHACMPCAPS      = $00000100; (* Match primCaps.dwAlphaCmpCaps *)
4957
  D3DFDS_SRCBLENDCAPS       = $00000200; // Match primCaps.dwSourceBlendCaps
7838
  D3DFDS_SRCBLENDCAPS      = $00000200; (* Match primCaps.dwSourceBlendCaps *)
4958
  D3DFDS_DSTBLENDCAPS       = $00000400; // Match primCaps.dwDestBlendCaps
7839
  D3DFDS_DSTBLENDCAPS      = $00000400; (* Match primCaps.dwDestBlendCaps *)
4959
  D3DFDS_SHADECAPS          = $00000800; // Match primCaps.dwShadeCaps
7840
  D3DFDS_SHADECAPS         = $00000800; (* Match primCaps.dwShadeCaps *)
4960
  D3DFDS_TEXTURECAPS        = $00001000; // Match primCaps.dwTextureCaps
7841
  D3DFDS_TEXTURECAPS       = $00001000; (* Match primCaps.dwTextureCaps *)
4961
  D3DFDS_TEXTUREFILTERCAPS  = $00002000; // Match primCaps.dwTextureFilterCaps
7842
  D3DFDS_TEXTUREFILTERCAPS = $00002000; (* Match primCaps.dwTextureFilterCaps *)
4962
  D3DFDS_TEXTUREBLENDCAPS   = $00004000; // Match primCaps.dwTextureBlendCaps
7843
  D3DFDS_TEXTUREBLENDCAPS  = $00004000; (* Match primCaps.dwTextureBlendCaps *)
4963
  D3DFDS_TEXTUREADDRESSCAPS = $00008000; // Match primCaps.dwTextureBlendCaps
7844
  D3DFDS_TEXTUREADDRESSCAPS  = $00008000; (* Match primCaps.dwTextureBlendCaps *)
4964
 
-
 
4965
{ FindDevice arguments }
-
 
4966
 
7845
 
-
 
7846
(*
-
 
7847
 * FindDevice arguments
-
 
7848
 *)
4967
type
7849
type
4968
  PD3DFindDeviceSearch = ^TD3DFindDeviceSearch;
7850
  PD3DFindDeviceSearch = ^TD3DFindDeviceSearch;
4969
  TD3DFindDeviceSearch = record
7851
  TD3DFindDeviceSearch = packed record
4970
    dwSize: DWORD;
7852
    dwSize: DWORD;
4971
    dwFlags: DWORD;
7853
    dwFlags: DWORD;
4972
    bHardware: BOOL;
7854
    bHardware: BOOL;
4973
    dcmColorModel: TD3DColorModel;
7855
    dcmColorModel: TD3DColorModel;
4974
    guid: TGUID;
7856
    guid: TGUID;
4975
    dwCaps: DWORD;
7857
    dwCaps: DWORD;
4976
    dpcPrimCaps: TD3DPrimCaps;
7858
    dpcPrimCaps: TD3DPrimCaps;
4977
  end;
7859
  end;
4978
 
7860
 
4979
  D3DFINDDEVICESEARCH = TD3DFindDeviceSearch;
-
 
4980
  LPD3DFINDDEVICESEARCH = PD3DFindDeviceSearch;
-
 
4981
 
-
 
4982
  PD3DFindDeviceResult = ^TD3DFindDeviceResult;
7861
  PD3DFindDeviceResult = ^TD3DFindDeviceResult;
4983
  TD3DFindDeviceResult = record
7862
  TD3DFindDeviceResult = packed record
4984
    dwSize: DWORD;
7863
    dwSize: DWORD;
4985
    guid: TGUID;               // guid which matched
7864
    guid: TGUID;               (* guid which matched *)
4986
    ddHwDesc: TD3DDeviceDesc;   // hardware TD3DDeviceDesc
7865
    ddHwDesc: TD3DDeviceDesc;   (* hardware TD3DDeviceDesc *)
4987
    ddSwDesc: TD3DDeviceDesc;   // software TD3DDeviceDesc
7866
    ddSwDesc: TD3DDeviceDesc;   (* software TD3DDeviceDesc *)
4988
  end;
7867
  end;
4989
 
7868
 
4990
  D3DFINDDEVICERESULT = TD3DFindDeviceResult;
-
 
4991
  LPD3DFINDDEVICERESULT = PD3DFindDeviceResult;
-
 
4992
 
7869
(*
4993
{ Description of execute buffer. }
7870
 * Description of execute buffer.
4994
 
7871
 *)
4995
  PD3DExecuteBufferDesc = ^TD3DExecuteBufferDesc;
7872
  PD3DExecuteBufferDesc = ^TD3DExecuteBufferDesc;
4996
  TD3DExecuteBufferDesc = record
7873
  TD3DExecuteBufferDesc = packed record
4997
    dwSize: DWORD;         // size of this structure
7874
    dwSize: DWORD;         (* size of this structure *)
4998
    dwFlags: DWORD;        // flags indicating which fields are valid
7875
    dwFlags: DWORD;        (* flags indicating which fields are valid *)
4999
    dwCaps: DWORD;         // capabilities of execute buffer
7876
    dwCaps: DWORD;         (* capabilities of execute buffer *)
5000
    dwBufferSize: DWORD;   // size of execute buffer data
7877
    dwBufferSize: DWORD;   (* size of execute buffer data *)
5001
    lpData: Pointer;       // pointer to actual data
7878
    lpData: Pointer;       (* pointer to actual data *)
5002
  end;
7879
  end;
5003
 
7880
 
5004
  D3DEXECUTEBUFFERDESC = TD3DExecuteBufferDesc;
-
 
5005
  LPD3DEXECUTEBUFFERDESC = PD3DExecuteBufferDesc;
-
 
5006
 
-
 
5007
{ D3DEXECUTEBUFFER dwFlags indicating valid fields }
7881
(* D3DEXECUTEBUFFER dwFlags indicating valid fields *)
5008
 
7882
 
5009
const
7883
const
5010
  D3DDEB_BUFSIZE          = $00000001;     // buffer size valid
7884
  D3DDEB_BUFSIZE          = $00000001;     (* buffer size valid *)
5011
  D3DDEB_CAPS             = $00000002;     // caps valid
7885
  D3DDEB_CAPS             = $00000002;     (* caps valid *)
5012
  D3DDEB_LPDATA           = $00000004;     // lpData valid
7886
  D3DDEB_LPDATA           = $00000004;     (* lpData valid *)
5013
 
7887
 
5014
{ D3DEXECUTEBUFFER dwCaps }
7888
(* D3DEXECUTEBUFFER dwCaps *)
5015
 
7889
 
5016
  D3DDEBCAPS_SYSTEMMEMORY = $00000001;     // buffer in system memory
7890
  D3DDEBCAPS_SYSTEMMEMORY = $00000001;     (* buffer in system memory *)
5017
  D3DDEBCAPS_VIDEOMEMORY  = $00000002;     // buffer in device memory
7891
  D3DDEBCAPS_VIDEOMEMORY  = $00000002;     (* buffer in device memory *)
5018
  D3DDEBCAPS_MEM          = D3DDEBCAPS_SYSTEMMEMORY or D3DDEBCAPS_VIDEOMEMORY;
7892
  D3DDEBCAPS_MEM          = (D3DDEBCAPS_SYSTEMMEMORY or D3DDEBCAPS_VIDEOMEMORY);
5019
 
7893
 
5020
type
7894
type
5021
 
-
 
5022
{  TD3DDevInfo_TextureManager  }
-
 
5023
 
-
 
5024
  PD3DDevInfo_TextureManager = ^TD3DDevInfo_TextureManager;
7895
  PD3DDevInfo_TextureManager = ^TD3DDevInfo_TextureManager;
5025
  TD3DDevInfo_TextureManager = record
7896
  TD3DDevInfo_TextureManager = packed record
5026
    bThrashing: BOOL;                // indicates if thrashing
7897
    bThrashing:              BOOL;       (* indicates if thrashing *)
5027
    dwApproxBytesDownloaded: DWORD;  // Approximate number of bytes downloaded by texture manager
7898
    dwApproxBytesDownloaded: DWORD;      (* Approximate number of bytes downloaded by texture manager *)
5028
    dwNumEvicts: DWORD;              // number of textures evicted
7899
    dwNumEvicts:             DWORD;      (* number of textures evicted *)
5029
    dwNumVidCreates: DWORD;          // number of textures created in video memory
7900
    dwNumVidCreates:         DWORD;      (* number of textures created in video memory *)
5030
    dwNumTexturesUsed: DWORD;        // number of textures used
7901
    dwNumTexturesUsed:       DWORD;      (* number of textures used *)
5031
    dwNumUsedTexInVid: DWORD;        // number of used textures present in video memory
7902
    dwNumUsedTexInVid:       DWORD;      (* number of used textures present in video memory *)
5032
    dwWorkingSet: DWORD;             // number of textures in video memory
7903
    dwWorkingSet:            DWORD;      (* number of textures in video memory *)
5033
    dwWorkingSetBytes: DWORD;        // number of bytes in video memory
7904
    dwWorkingSetBytes:       DWORD;      (* number of bytes in video memory *)
5034
    dwTotalManaged: DWORD;           // total number of managed textures
7905
    dwTotalManaged:          DWORD;      (* total number of managed textures *)
5035
    dwTotalBytes: DWORD;             // total number of bytes of managed textures
7906
    dwTotalBytes:            DWORD;      (* total number of bytes of managed textures *)
5036
    dwLastPri: DWORD;                // priority of last texture evicted
7907
    dwLastPri:               DWORD;      (* priority of last texture evicted *)
5037
  end;
7908
  end;
5038
 
7909
 
5039
  D3DDEVINFO_TEXTUREMANAGER = TD3DDevInfo_TextureManager;
-
 
5040
  LPD3DDEVINFO_TEXTUREMANAGER = PD3DDevInfo_TextureManager;
-
 
5041
 
-
 
5042
{ TD3DDevInfo_Texturing }
-
 
5043
 
-
 
5044
  PD3DDevInfo_Texturing = ^TD3DDevInfo_Texturing;
7910
  PD3DDevInfo_Texturing = ^TD3DDevInfo_Texturing;
5045
  TD3DDevInfo_Texturing = record
7911
  TD3DDevInfo_Texturing = packed record
5046
    dwNumLoads: DWORD;           // counts Load() API calls
7912
    dwNumLoads:          DWORD;          (* counts Load() API calls *)
5047
    dwApproxBytesLoaded: DWORD;  // Approximate number bytes loaded via Load()
7913
    dwApproxBytesLoaded: DWORD;          (* Approximate number bytes loaded via Load() *)
5048
    dwNumPreLoads: DWORD;        // counts PreLoad() API calls
7914
    dwNumPreLoads:       DWORD;          (* counts PreLoad() API calls *)
5049
    dwNumSet: DWORD;             // counts SetTexture() API calls
7915
    dwNumSet:            DWORD;          (* counts SetTexture() API calls *)
5050
    dwNumCreates: DWORD;         // counts texture creates
7916
    dwNumCreates:        DWORD;          (* counts texture creates *)
5051
    dwNumDestroys: DWORD;        // counts texture destroys
7917
    dwNumDestroys:       DWORD;          (* counts texture destroys *)
5052
    dwNumSetPriorities: DWORD;   // counts SetPriority() API calls
7918
    dwNumSetPriorities:  DWORD;          (* counts SetPriority() API calls *)
5053
    dwNumSetLODs: DWORD;         // counts SetLOD() API calls
7919
    dwNumSetLODs:        DWORD;          (* counts SetLOD() API calls *)
5054
    dwNumLocks: DWORD;           // counts number of texture locks
7920
    dwNumLocks:          DWORD;          (* counts number of texture locks *)
5055
    dwNumGetDCs: DWORD;          // counts number of GetDCs to textures
7921
    dwNumGetDCs:         DWORD;          (* counts number of GetDCs to textures *)
5056
  end;
7922
  end;
5057
 
7923
 
5058
  D3DDEVINFO_TEXTURING = TD3DDevInfo_Texturing;
-
 
5059
  LPD3DDEVINFO_TEXTURING = PD3DDevInfo_Texturing;
-
 
5060
 
-
 
5061
(*==========================================================================;
7924
(*==========================================================================;
5062
 *
7925
 *
5063
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
-
 
5064
 *
7926
 *
5065
 *  File:       d3d.h
7927
 *  File:   d3d.h
5066
 *  Content:    Direct3D include file
7928
 *  Content:    Direct3D include file
5067
 *
7929
 *
5068
 ***************************************************************************)
7930
 ****************************************************************************)
5069
 
7931
 
-
 
7932
function D3DErrorString(Value: HResult) : string;
-
 
7933
 
-
 
7934
(*
5070
{ Interface IID's }
7935
 * Interface IID's
-
 
7936
 *)
5071
 
7937
 
5072
const
7938
const
5073
  IID_IDirect3D: TGUID = '{3BBA0080-2421-11CF-A31A-00AA00B93356}';
-
 
5074
  IID_IDirect3D2: TGUID = '{6AAE1EC1-662A-11D0-889D-00AA00BBB76A}';
-
 
5075
  IID_IDirect3D3: TGUID = '{BB223240-E72B-11D0-A9B4-00AA00C0993E}';
-
 
5076
  IID_IDirect3D7: TGUID = '{F5049E77-4861-11D2-A407-00A0C90629A8}';
-
 
5077
 
7939
(*
5078
  IID_IDirect3DRampDevice: TGUID = '{F2086B20-259F-11CF-A31A-00AA00B93356}';
7940
 * Internal Guid to distinguish requested MMX from MMX being used as an RGB rasterizer
-
 
7941
 *)
5079
  IID_IDirect3DRGBDevice: TGUID = '{A4665C60-2673-11CF-A31A-00AA00B93356}';
7942
  IID_IDirect3DRampDevice: TGUID =
5080
  IID_IDirect3DHALDevice: TGUID = '{84E63DE0-46AA-11CF-816F-0000C020156E}';
7943
      (D1:$F2086B20;D2:$259F;D3:$11CF;D4:($A3,$1A,$00,$AA,$00,$B9,$33,$56));
5081
  IID_IDirect3DMMXDevice: TGUID = '{881949A1-D6F3-11D0-89AB-00A0C9054129}';
7944
  IID_IDirect3DRGBDevice: TGUID =
5082
  IID_IDirect3DRefDevice: TGUID = '{50936643-13E9-11D1-89AA-00A0C9054129}';
7945
      (D1:$A4665C60;D2:$2673;D3:$11CF;D4:($A3,$1A,$00,$AA,$00,$B9,$33,$56));
5083
  IID_IDirect3DNullDevice: TGUID = '{8767DF22-BACC-11D1-8969-00A0C90629A8}';
7946
  IID_IDirect3DHALDevice: TGUID =
5084
  IID_IDirect3DTnLHalDevice: TGUID = '{F5049E78-4861-11D2-A407-00A0C90629A8}';
7947
      (D1:$84E63dE0;D2:$46AA;D3:$11CF;D4:($81,$6F,$00,$00,$C0,$20,$15,$6E));
5085
 
-
 
5086
  IID_IDirect3DDevice: TGUID = '{64108800-957D-11D0-89AB-00A0C9054129}';
7948
  IID_IDirect3DMMXDevice: TGUID =
5087
  IID_IDirect3DDevice2: TGUID = '{93281501-8CF8-11D0-89AB-00A0C9054129}';
7949
      (D1:$881949a1;D2:$d6f3;D3:$11d0;D4:($89,$ab,$00,$a0,$c9,$05,$41,$29));
5088
  IID_IDirect3DDevice3: TGUID = '{B0AB3B60-33D7-11D1-A981-00C04FD7B174}';
-
 
5089
  IID_IDirect3DDevice7: TGUID = '{F5049E79-4861-11D2-A407-00A0C90629A8}';
-
 
5090
 
7950
 
5091
  IID_IDirect3DTexture: TGUID ='{2CDCD9E0-25A0-11CF-A31A-00AA00B93356}';
7951
  IID_IDirect3DRefDevice: TGUID =
5092
  IID_IDirect3DTexture2: TGUID = '{93281502-8CF8-11D0-89AB-00A0C9054129}';
7952
      (D1:$50936643;D2:$13e9;D3:$11d1;D4:($89,$aa,$00,$a0,$c9,$05,$41,$29));
5093
  IID_IDirect3DLight: TGUID = '{4417C142-33AD-11CF-816F-0000C020156E}';
-
 
5094
  IID_IDirect3DMaterial: TGUID = '{4417C144-33AD-11CF-816F-0000C020156E}';
7953
  IID_IDirect3DNullDevice: TGUID =
5095
  IID_IDirect3DMaterial2: TGUID = '{93281503-8CF8-11D0-89AB-00A0C9054129}';
-
 
5096
  IID_IDirect3DMaterial3: TGUID = '{CA9C46F4-D3C5-11D1-B75A-00600852B312}';
-
 
5097
  IID_IDirect3DExecuteBuffer: TGUID = '{4417C145-33AD-11CF-816F-0000C020156E}';
-
 
5098
  IID_IDirect3DViewport: TGUID = '{4417C146-33AD-11CF-816F-0000C020156E}';
-
 
5099
  IID_IDirect3DViewport2: TGUID = '{93281500-8CF8-11D0-89AB-00A0C9054129}';
7954
      (D1:$8767df22;D2:$bacc;D3:$11d1;D4:($89,$69,$00,$a0,$c9,$06,$29,$a8));
5100
  IID_IDirect3DViewport3: TGUID = '{B0AB3B61-33D7-11D1-A981-00C04FD7B174}';
-
 
5101
  IID_IDirect3DVertexBuffer: TGUID = '{7A503555-4A83-11D1-A5DB-00A0C90367F8}';
-
 
5102
  IID_IDirect3DVertexBuffer7: TGUID = '{F5049E7D-4861-11D2-A407-00A0C90629A8}';
-
 
5103
 
7955
 
5104
{ Data structures }
7956
  IID_IDirect3DTnLHalDevice: TGUID = '{f5049e78-4861-11d2-a407-00a0c90629a8}';
5105
 
7957
 
5106
type
7958
type
5107
  IDirect3D = interface;
7959
  IDirect3D = interface;
5108
  IDirect3D2 = interface;
7960
  IDirect3D2 = interface;
5109
  IDirect3D3 = interface;
7961
  IDirect3D3 = interface;
Line 5123... Line 7975...
5123
  IDirect3DViewport2 = interface;
7975
  IDirect3DViewport2 = interface;
5124
  IDirect3DViewport3 = interface;
7976
  IDirect3DViewport3 = interface;
5125
  IDirect3DVertexBuffer = interface;
7977
  IDirect3DVertexBuffer = interface;
5126
  IDirect3DVertexBuffer7 = interface;
7978
  IDirect3DVertexBuffer7 = interface;
5127
 
7979
 
-
 
7980
(*
-
 
7981
 * Direct3D interfaces
-
 
7982
 *)
-
 
7983
 
5128
  IDirect3D = interface(IUnknown)
7984
  IDirect3D = interface (IUnknown)
5129
    ['{3BBA0080-2421-11CF-A31A-00AA00B93356}']
7985
    ['{3BBA0080-2421-11CF-A31A-00AA00B93356}']
5130
    // IDirect3D methods
7986
    (*** IDirect3D methods ***)
5131
    function Initialize(const lpREFIID: TGUID): HResult; stdcall;
7987
    function Initialize (lpREFIID: {REFIID} PGUID) : HResult; stdcall;
5132
    function EnumDevices(lpEnumDevicesCallback: TD3DEnumDevicesCallback;
7988
    function EnumDevices (lpEnumDevicesCallback: TD3DEnumDevicesCallback;
5133
        lpUserArg: Pointer): HResult; stdcall;
7989
        lpUserArg: Pointer) : HResult; stdcall;
5134
    function CreateLight(out lplpDirect3Dlight: IDirect3DLight;
7990
    function CreateLight (var lplpDirect3Dlight: IDirect3DLight;
5135
        pUnkOuter: IUnknown): HResult; stdcall;
7991
        pUnkOuter: IUnknown) : HResult; stdcall;
5136
    function CreateMaterial(out lplpDirect3DMaterial: IDirect3DMaterial;
7992
    function CreateMaterial (var lplpDirect3DMaterial: IDirect3DMaterial;
5137
        pUnkOuter: IUnknown): HResult; stdcall;
7993
        pUnkOuter: IUnknown) : HResult; stdcall;
5138
    function CreateViewport(out lplpD3DViewport: IDirect3DViewport;
7994
    function CreateViewport (var lplpD3DViewport: IDirect3DViewport;
5139
        pUnkOuter: IUnknown): HResult; stdcall;
7995
        pUnkOuter: IUnknown) : HResult; stdcall;
5140
    function FindDevice(const lpD3DFDS: TD3DFindDeviceSearch;
7996
    function FindDevice (var lpD3DFDS: TD3DFindDeviceSearch;
5141
        var lpD3DFDR: TD3DFindDeviceResult): HResult; stdcall;
7997
        var lpD3DFDR: TD3DFindDeviceResult) : HResult; stdcall;
5142
  end;
7998
  end;
5143
 
7999
 
5144
  IDirect3D2 = interface(IUnknown)
8000
  IDirect3D2 = interface (IUnknown)
5145
    ['{6AAE1EC1-662A-11D0-889D-00AA00BBB76A}']
8001
    ['{6aae1ec1-662a-11d0-889d-00aa00bbb76a}']
5146
    // IDirect3D methods
8002
    (*** IDirect3D2 methods ***)
5147
    function EnumDevices(lpEnumDevicesCallback: TD3DEnumDevicesCallback;
8003
    function EnumDevices(lpEnumDevicesCallback: TD3DEnumDevicesCallback;
5148
        lpUserArg: Pointer): HResult; stdcall;
8004
        lpUserArg: pointer) : HResult; stdcall;
5149
    function CreateLight(out lplpDirect3Dlight: IDirect3DLight;
8005
    function CreateLight (var lplpDirect3Dlight: IDirect3DLight;
5150
        pUnkOuter: IUnknown): HResult; stdcall;
8006
        pUnkOuter: IUnknown) : HResult; stdcall;
5151
    function CreateMaterial(out lplpDirect3DMaterial: IDirect3DMaterial2;
8007
    function CreateMaterial (var lplpDirect3DMaterial2: IDirect3DMaterial2;
5152
        pUnkOuter: IUnknown): HResult; stdcall;
8008
        pUnkOuter: IUnknown) : HResult; stdcall;
5153
    function CreateViewport(out lplpD3DViewport: IDirect3DViewport2;
8009
    function CreateViewport (var lplpD3DViewport2: IDirect3DViewport2;
5154
        pUnkOuter: IUnknown ): HResult; stdcall;
8010
        pUnkOuter: IUnknown) : HResult; stdcall;
5155
    function FindDevice(const lpD3DFDS: TD3DFindDeviceSearch;
8011
    function FindDevice (var lpD3DFDS: TD3DFindDeviceSearch;
5156
        var lpD3DFDR: TD3DFindDeviceResult): HResult; stdcall;
8012
        var lpD3DFDR: TD3DFindDeviceResult) : HResult; stdcall;
5157
    // IDirect3D2 methods
-
 
5158
    function CreateDevice(const rclsid: TGUID; lpDDS: IDirectDrawSurface;
8013
    function CreateDevice (const rclsid: TRefClsID; lpDDS: IDirectDrawSurface;
5159
        out lplpD3DDevice2: IDirect3DDevice2): HResult; stdcall;
8014
        out lplpD3DDevice2: IDirect3DDevice2) : HResult; stdcall;
5160
  end;
8015
  end;
5161
 
8016
 
5162
  IDirect3D3 = interface(IUnknown)
8017
  IDirect3D3 = interface (IUnknown)
5163
    ['{BB223240-E72B-11D0-A9B4-00AA00C0993E}']
8018
    ['{bb223240-e72b-11d0-a9b4-00aa00c0993e}']
5164
    // IDirect3D methods
8019
    (*** IDirect3D3 methods ***)
5165
    function EnumDevices(lpEnumDevicesCallback: TD3DEnumDevicesCallback;
8020
    function EnumDevices(lpEnumDevicesCallback: TD3DEnumDevicesCallback;
5166
        lpUserArg: Pointer): HResult; stdcall;
8021
        lpUserArg: pointer) : HResult; stdcall;
5167
    function CreateLight(out lplpDirect3Dlight: IDirect3DLight;
8022
    function CreateLight (var lplpDirect3Dlight: IDirect3DLight;
5168
        pUnkOuter: IUnknown): HResult; stdcall;
8023
        pUnkOuter: IUnknown) : HResult; stdcall;
5169
    function CreateMaterial(out lplpDirect3DMaterial: IDirect3DMaterial3;
8024
    function CreateMaterial (var lplpDirect3DMaterial3: IDirect3DMaterial3;
5170
        pUnkOuter: IUnknown): HResult; stdcall;
8025
        pUnkOuter: IUnknown) : HResult; stdcall;
5171
    function CreateViewport(out lplpD3DViewport: IDirect3DViewport3;
8026
    function CreateViewport (var lplpD3DViewport3: IDirect3DViewport3;
5172
        pUnkOuter: IUnknown ): HResult; stdcall;
8027
        pUnkOuter: IUnknown) : HResult; stdcall;
5173
    function FindDevice(const lpD3DFDS: TD3DFindDeviceSearch;
8028
    function FindDevice (var lpD3DFDS: TD3DFindDeviceSearch;
5174
        var lpD3DFDR: TD3DFindDeviceResult): HResult; stdcall;
8029
        var lpD3DFDR: TD3DFindDeviceResult) : HResult; stdcall;
5175
    // IDirect3D2 methods
-
 
5176
    function CreateDevice(const rclsid: TGUID; lpDDS: IDirectDrawSurface4;
8030
    function CreateDevice (const rclsid: TRefClsID; lpDDS: IDirectDrawSurface4;
5177
        out lplpD3DDevice2: IDirect3DDevice3; pUnkOuter: IUnknown): HResult; stdcall;
8031
        out lplpD3DDevice: IDirect3DDevice3; pUnkOuter: IUnknown) : HResult; stdcall;
5178
    // IDirect3D3 methods                             
8032
    function CreateVertexBuffer (var lpVBDesc: TD3DVertexBufferDesc;
5179
    function CreateVertexBuffer(const lpVBDesc: TD3DVertexBufferDesc;
8033
        var lpD3DVertexBuffer: IDirect3DVertexBuffer;
5180
        out lpD3DVertexBuffer: IDirect3DVertexBuffer; dwFlags: DWORD; pUnkOuter: IUnknown): HResult; stdcall;
8034
        dwFlags: DWORD; pUnkOuter: IUnknown) : HResult; stdcall;
5181
    function EnumZBufferFormats(const riidDevice: TGUID; lpEnumCallback: TD3DEnumPixelFormatsCallback;
8035
    function EnumZBufferFormats (const riidDevice: TRefClsID; lpEnumCallback:
5182
      lpContext: Pointer): HResult; stdcall;
8036
        TD3DEnumPixelFormatsCallback; lpContext: pointer) : HResult; stdcall;
5183
    function EvictManagedTextures: HResult; stdcall;
8037
    function EvictManagedTextures : HResult; stdcall;
5184
  end;
8038
  end;
5185
 
8039
 
5186
  IDirect3D7 = interface(IUnknown)
8040
  IDirect3D7 = interface (IUnknown)
5187
    ['{F5049E77-4861-11D2-A407-00A0C90629A8}']
8041
    ['{f5049e77-4861-11d2-a407-00a0c90629a8}']
5188
    // IDirect3D7 methods
8042
    (*** IDirect3D7 methods ***)
5189
    function EnumDevices(lpEnumDevicesCallback: TD3DEnumDevicesCallback7;
8043
    function EnumDevices(lpEnumDevicesCallback: TD3DEnumDevicesCallback7;
5190
        lpUserArg: Pointer): HResult; stdcall;
8044
        lpUserArg: pointer) : HResult; stdcall;
5191
    function CreateDevice(const rclsid: TGUID; lpDDS: IDirectDrawSurface7;
8045
    function CreateDevice (const rclsid: TGUID; lpDDS: IDirectDrawSurface7;
5192
        out lplpD3DDevice7: IDirect3DDevice7): HResult; stdcall;
8046
        out lplpD3DDevice: IDirect3DDevice7) : HResult; stdcall;
5193
    function CreateVertexBuffer(const lpVBDesc: TD3DVertexBufferDesc;
8047
    function CreateVertexBuffer (const lpVBDesc: TD3DVertexBufferDesc;
5194
        out lpD3DVertexBuffer: IDirect3DVertexBuffer7; dwFlags: DWORD): HResult; stdcall;
8048
        out lplpD3DVertexBuffer: IDirect3DVertexBuffer7;
-
 
8049
        dwFlags: DWORD) : HResult; stdcall;
5195
    function EnumZBufferFormats(const riidDevice: TGUID; lpEnumCallback: TD3DEnumPixelFormatsCallback;
8050
    function EnumZBufferFormats (const riidDevice: TGUID; lpEnumCallback:
5196
      lpContext: Pointer): HResult; stdcall;
8051
        TD3DEnumPixelFormatsCallback; lpContext: pointer) : HResult; stdcall;
5197
    function EvictManagedTextures: HResult; stdcall;
8052
    function EvictManagedTextures : HResult; stdcall;
5198
  end;
8053
  end;
5199
 
8054
 
-
 
8055
(*
-
 
8056
 * Direct3D Device interfaces
-
 
8057
 *)
-
 
8058
 
5200
  IDirect3DDevice = interface(IUnknown)
8059
  IDirect3DDevice = interface (IUnknown)
5201
    ['{64108800-957D-11D0-89AB-00A0C9054129}']
8060
    ['{64108800-957d-11d0-89ab-00a0c9054129}']
5202
    // IDirect3DDevice methods
8061
    (*** IDirect3DDevice methods ***)
5203
    function Initialize(lpd3d: IDirect3D; const lpGUID: TGUID;
8062
    function Initialize (lpd3d: IDirect3D; lpGUID: PGUID;
5204
        const lpd3ddvdesc: TD3DDeviceDesc): HResult; stdcall;
8063
        var lpd3ddvdesc: TD3DDeviceDesc) : HResult; stdcall;
5205
    function GetCaps(var lpD3DHWDevDesc: TD3DDeviceDesc;
8064
    function GetCaps (var lpD3DHWDevDesc: TD3DDeviceDesc;
5206
        var lpD3DHELDevDesc: TD3DDeviceDesc): HResult; stdcall;
8065
        var lpD3DHELDevDesc: TD3DDeviceDesc) : HResult; stdcall;
5207
    function SwapTextureHandles(lpD3DTex1: IDirect3DTexture;
8066
    function SwapTextureHandles (lpD3DTex1: IDirect3DTexture;
5208
        lpD3DTex2: IDirect3DTexture): HResult; stdcall;
8067
        lpD3DTex2: IDirect3DTexture) : HResult; stdcall;
5209
    function CreateExecuteBuffer(const lpDesc: TD3DExecuteBufferDesc;
8068
    function CreateExecuteBuffer (var lpDesc: TD3DExecuteBufferDesc ;
5210
        out lplpDirect3DExecuteBuffer: IDirect3DExecuteBuffer;
8069
        var lplpDirect3DExecuteBuffer: IDirect3DExecuteBuffer;
5211
        pUnkOuter: IUnknown): HResult; stdcall;
8070
        pUnkOuter: IUnknown) : HResult; stdcall;
5212
    function GetStats(var lpD3DStats: TD3DStats): HResult; stdcall;
8071
    function GetStats (var lpD3DStats: TD3DStats) : HResult; stdcall;
5213
    function Execute(lpDirect3DExecuteBuffer: IDirect3DExecuteBuffer;
8072
    function Execute (lpDirect3DExecuteBuffer: IDirect3DExecuteBuffer;
5214
        lpDirect3DViewport: IDirect3DViewport; dwFlags: DWORD): HResult; stdcall;
8073
        lpDirect3DViewport: IDirect3DViewport; dwFlags: DWORD) : HResult; stdcall;
5215
    function AddViewport(lpDirect3DViewport: IDirect3DViewport): HResult; stdcall;
8074
    function AddViewport (lpDirect3DViewport: IDirect3DViewport) : HResult; stdcall;
5216
    function DeleteViewport(lpDirect3DViewport: IDirect3DViewport): HResult; stdcall;
8075
    function DeleteViewport (lpDirect3DViewport: IDirect3DViewport) : HResult; stdcall;
5217
    function NextViewport(lpDirect3DViewport: IDirect3DViewport;
8076
    function NextViewport (lpDirect3DViewport: IDirect3DViewport;
5218
        out lplpDirect3DViewport: IDirect3DViewport; dwFlags: DWORD): HResult; stdcall;
8077
        var lplpDirect3DViewport: IDirect3DViewport; dwFlags: DWORD) : HResult; stdcall;
5219
    function Pick(lpDirect3DExecuteBuffer: IDirect3DExecuteBuffer;
8078
    function Pick (lpDirect3DExecuteBuffer: IDirect3DExecuteBuffer;
5220
        lpDirect3DViewport: IDirect3DViewport; dwFlags: DWORD;
8079
        lpDirect3DViewport: IDirect3DViewport; dwFlags: DWORD;
5221
        const lpRect: TD3DRect): HResult; stdcall;
8080
        var lpRect: TD3DRect) : HResult; stdcall;
5222
    function GetPickRecords(var lpCount: DWORD;
8081
    function GetPickRecords (var lpCount: DWORD;
5223
        var lpD3DPickRec: TD3DPickRecord): HResult; stdcall;
8082
        var lpD3DPickRec: TD3DPickRecord) : HResult; stdcall;
5224
    function EnumTextureFormats(lpd3dEnumTextureProc: TD3DEnumTextureFormatsCalback;
8083
    function EnumTextureFormats (lpd3dEnumTextureProc:
-
 
8084
        TD3DEnumTextureFormatsCallback; lpArg: Pointer) :
5225
        lpArg: Pointer): HResult; stdcall;
8085
        HResult; stdcall;
5226
    function CreateMatrix(var lpD3DMatHandle: TD3DMatrixHandle): HResult; stdcall;
8086
    function CreateMatrix (var lpD3DMatHandle: TD3DMatrixHandle) : HResult; stdcall;
5227
    function SetMatrix(d3dMatHandle: TD3DMatrixHandle;
8087
    function SetMatrix (d3dMatHandle: TD3DMatrixHandle;
5228
        const lpD3DMatrix: TD3DMatrix): HResult; stdcall;
8088
        var lpD3DMatrix: TD3DMatrix) : HResult; stdcall;
5229
    function GetMatrix(lpD3DMatHandle: TD3DMatrixHandle;
8089
    function GetMatrix (var lpD3DMatHandle: TD3DMatrixHandle;
5230
        var lpD3DMatrix: TD3DMatrix): HResult; stdcall;
8090
        var lpD3DMatrix: TD3DMatrix) : HResult; stdcall;
5231
    function DeleteMatrix(d3dMatHandle: TD3DMatrixHandle): HResult; stdcall;
8091
    function DeleteMatrix (d3dMatHandle: TD3DMatrixHandle) : HResult; stdcall;
5232
    function BeginScene: HResult; stdcall;
8092
    function BeginScene: HResult; stdcall;
5233
    function EndScene: HResult; stdcall;
8093
    function EndScene: HResult; stdcall;
5234
    function GetDirect3D(out lpD3D: IDirect3D): HResult; stdcall;
8094
    function GetDirect3D (var lpD3D: IDirect3D) : HResult; stdcall;
5235
  end;
8095
  end;
5236
 
8096
 
5237
  IDirect3DDevice2 = interface(IUnknown)
8097
  IDirect3DDevice2 = interface (IUnknown)
5238
    ['{93281501-8CF8-11D0-89AB-00A0C9054129}']
8098
    ['{93281501-8cf8-11d0-89ab-00a0c9054129}']
5239
    // IDirect3DDevice2 methods
8099
    (*** IDirect3DDevice2 methods ***)
5240
    function GetCaps(var lpD3DHWDevDesc: TD3DDeviceDesc;
8100
    function GetCaps (var lpD3DHWDevDesc: TD3DDeviceDesc;
5241
        var lpD3DHELDevDesc: TD3DDeviceDesc): HResult; stdcall;
8101
        var lpD3DHELDevDesc: TD3DDeviceDesc) : HResult; stdcall;
5242
    function SwapTextureHandles(lpD3DTex1: IDirect3DTexture2;
8102
    function SwapTextureHandles (lpD3DTex1: IDirect3DTexture2;
5243
        lpD3DTex2: IDirect3DTexture2): HResult; stdcall;
8103
        lpD3DTex2: IDirect3DTexture2) : HResult; stdcall;
5244
    function GetStats(var lpD3DStats: TD3DStats): HResult; stdcall;
8104
    function GetStats (var lpD3DStats: TD3DStats) : HResult; stdcall;
5245
    function AddViewport(lpDirect3DViewport: IDirect3DViewport2): HResult; stdcall;
8105
    function AddViewport (lpDirect3DViewport2: IDirect3DViewport2) : HResult; stdcall;
5246
    function DeleteViewport(lpDirect3DViewport: IDirect3DViewport2): HResult; stdcall;
8106
    function DeleteViewport (lpDirect3DViewport: IDirect3DViewport2) : HResult; stdcall;
5247
    function NextViewport(lpDirect3DViewport: IDirect3DViewport2;
8107
    function NextViewport (lpDirect3DViewport: IDirect3DViewport2;
5248
        out lplpDirect3DViewport: IDirect3DViewport2; dwFlags: DWORD): HResult; stdcall;
8108
        var lplpDirect3DViewport: IDirect3DViewport2; dwFlags: DWORD) :
-
 
8109
        HResult; stdcall;
-
 
8110
    function EnumTextureFormats (
5249
    function EnumTextureFormats(lpd3dEnumTextureProc: TD3DEnumTextureFormatsCalback;
8111
        lpd3dEnumTextureProc: TD3DEnumTextureFormatsCallback; lpArg: Pointer) :
5250
        lpArg: Pointer): HResult; stdcall;
8112
        HResult; stdcall;
5251
    function BeginScene: HResult; stdcall;
8113
    function BeginScene: HResult; stdcall;
5252
    function EndScene: HResult; stdcall;
8114
    function EndScene: HResult; stdcall;
5253
    function GetDirect3D(out lpD3D: IDirect3D2): HResult; stdcall;
8115
    function GetDirect3D (var lpD3D: IDirect3D2) : HResult; stdcall;
-
 
8116
 
-
 
8117
    (*** DrawPrimitive API ***)
5254
    function SetCurrentViewport(lpd3dViewport2: IDirect3DViewport2): HResult; stdcall;
8118
    function SetCurrentViewport (lpd3dViewport2: IDirect3DViewport2)
-
 
8119
        : HResult; stdcall;
5255
    function GetCurrentViewport(out lplpd3dViewport2: IDirect3DViewport2): HResult; stdcall;
8120
    function GetCurrentViewport (var lplpd3dViewport2: IDirect3DViewport2)
-
 
8121
        : HResult; stdcall;
-
 
8122
 
5256
    function SetRenderTarget(lpNewRenderTarget: IDirectDrawSurface): HResult; stdcall;
8123
    function SetRenderTarget (lpNewRenderTarget: IDirectDrawSurface)
-
 
8124
        : HResult; stdcall;
5257
    function GetRenderTarget(out lplpNewRenderTarget: IDirectDrawSurface): HResult; stdcall;
8125
    function GetRenderTarget (var lplpNewRenderTarget: IDirectDrawSurface)
-
 
8126
        : HResult; stdcall;
-
 
8127
 
5258
    function Begin_(d3dpt: TD3DPrimitiveType; d3dvt: TD3DVertexType;
8128
    function Begin_ (d3dpt: TD3DPrimitiveType; d3dvt: TD3DVertexType;
5259
        dwFlags: DWORD): HResult; stdcall;
8129
        dwFlags: DWORD) : HResult; stdcall;
5260
    function BeginIndexed(dptPrimitiveType: TD3DPrimitiveType; dvtVertexType:
8130
    function BeginIndexed (dptPrimitiveType: TD3DPrimitiveType; dvtVertexType:
5261
        TD3DVertexType; const lpvVertices; dwNumVertices: DWORD;
8131
        TD3DVertexType; lpvVertices: pointer; dwNumVertices: DWORD;
5262
        dwFlags: DWORD): HResult; stdcall;
8132
        dwFlags: DWORD) : HResult; stdcall;
5263
    function Vertex(const lpVertexType): HResult; stdcall;
8133
    function Vertex (lpVertexType: pointer) : HResult;  stdcall;
5264
    function Index(wVertexIndex: WORD): HResult; stdcall;
8134
    function Index (wVertexIndex: WORD) : HResult;  stdcall;
5265
    function End_(dwFlags: DWORD): HResult; stdcall;
8135
    function End_ (dwFlags: DWORD) : HResult; stdcall;
-
 
8136
 
5266
    function GetRenderState(dwRenderStateType: TD3DRenderStateType;
8137
    function GetRenderState (dwRenderStateType: TD3DRenderStateType;
5267
        var lpdwRenderState: DWORD): HResult; stdcall;
8138
        var lpdwRenderState) : HResult; stdcall;
5268
    function SetRenderState(dwRenderStateType: TD3DRenderStateType;
8139
    function SetRenderState (dwRenderStateType: TD3DRenderStateType;
5269
        dwRenderState: DWORD): HResult; stdcall;
8140
        dwRenderState: DWORD) : HResult; stdcall;
5270
    function GetLightState(dwLightStateType: TD3DLightStateType;
8141
    function GetLightState (dwLightStateType: TD3DLightStateType;
5271
        var lpdwLightState: DWORD): HResult; stdcall;
8142
        var lpdwLightState) : HResult; stdcall;
5272
    function SetLightState(dwLightStateType: TD3DLightStateType;
8143
    function SetLightState (dwLightStateType: TD3DLightStateType;
5273
        dwLightState: DWORD): HResult; stdcall;
8144
        dwLightState: DWORD) : HResult; stdcall;
5274
    function SetTransform(dtstTransformStateType: TD3DTransformStateType;
8145
    function SetTransform (dtstTransformStateType: TD3DTransformStateType;
5275
        const lpD3DMatrix: TD3DMatrix): HResult; stdcall;
8146
        var lpD3DMatrix: TD3DMatrix) : HResult; stdcall;
5276
    function GetTransform(dtstTransformStateType: TD3DTransformStateType;
8147
    function GetTransform (dtstTransformStateType: TD3DTransformStateType;
5277
        var lpD3DMatrix: TD3DMatrix): HResult; stdcall;
8148
        var lpD3DMatrix: TD3DMatrix) : HResult; stdcall;
5278
    function MultiplyTransform(dtstTransformStateType: TD3DTransformStateType;
8149
    function MultiplyTransform (dtstTransformStateType: TD3DTransformStateType;
5279
        var lpD3DMatrix: TD3DMatrix): HResult; stdcall;
8150
        var lpD3DMatrix: TD3DMatrix) : HResult; stdcall;
-
 
8151
 
5280
    function DrawPrimitive(dptPrimitiveType: TD3DPrimitiveType;
8152
    function DrawPrimitive (dptPrimitiveType: TD3DPrimitiveType;
5281
        dvtVertexType: TD3DVertexType; const lpvVertices; dwVertexCount,
8153
        dvtVertexType: TD3DVertexType; var lpvVertices; dwVertexCount,
5282
        dwFlags: DWORD): HResult; stdcall;
8154
        dwFlags: DWORD) : HResult; stdcall;
5283
    function DrawIndexedPrimitive(dptPrimitiveType: TD3DPrimitiveType;
8155
    function DrawIndexedPrimitive (dptPrimitiveType: TD3DPrimitiveType;
5284
        dvtVertexType: TD3DVertexType; const lpvVertices;
-
 
5285
        dwVertexCount: DWORD; const dwIndices; dwIndexCount: DWORD;
8156
        dwVertexTypeDesc: DWORD; lpvVertices: pointer; dwVertexCount: DWORD;
5286
        dwFlags: DWORD): HResult; stdcall;
8157
        var lpwIndices: WORD; dwIndexCount, dwFlags: DWORD) : HResult; stdcall;
5287
    function SetClipStatus(const lpD3DClipStatus: TD3DClipStatus): HResult; stdcall;
8158
    function SetClipStatus (var lpD3DClipStatus: TD3DClipStatus) : HResult; stdcall;
5288
    function GetClipStatus(var lpD3DClipStatus: TD3DClipStatus): HResult; stdcall;
8159
    function GetClipStatus (var lpD3DClipStatus: TD3DClipStatus) : HResult; stdcall;
5289
  end;
8160
  end;
5290
 
8161
 
5291
  IDirect3DDevice3 = interface(IUnknown)
8162
  IDirect3DDevice3 = interface (IUnknown)
5292
    ['{B0AB3B60-33D7-11D1-A981-00C04FD7B174}']
8163
    ['{b0ab3b60-33d7-11d1-a981-00c04fd7b174}']
5293
    // IDirect3DDevice3 methods
8164
    (*** IDirect3DDevice2 methods ***)
5294
    function GetCaps(var lpD3DHWDevDesc: TD3DDeviceDesc;
8165
    function GetCaps (var lpD3DHWDevDesc: TD3DDeviceDesc;
5295
        var lpD3DHELDevDesc: TD3DDeviceDesc): HResult; stdcall;
8166
        var lpD3DHELDevDesc: TD3DDeviceDesc) : HResult; stdcall;
5296
    function GetStats(var lpD3DStats: TD3DStats): HResult; stdcall;
8167
    function GetStats (var lpD3DStats: TD3DStats) : HResult; stdcall;
5297
    function AddViewport(lpDirect3DViewport: IDirect3DViewport3): HResult; stdcall;
8168
    function AddViewport (lpDirect3DViewport: IDirect3DViewport3) : HResult; stdcall;
5298
    function DeleteViewport(lpDirect3DViewport: IDirect3DViewport3): HResult; stdcall;
8169
    function DeleteViewport (lpDirect3DViewport: IDirect3DViewport3) : HResult; stdcall;
5299
    function NextViewport(lpDirect3DViewport: IDirect3DViewport3;
8170
    function NextViewport (lpDirect3DViewport: IDirect3DViewport3;
5300
        out lplpDirect3DViewport: IDirect3DViewport3; dwFlags: DWORD): HResult; stdcall;
8171
        var lplpAnotherViewport: IDirect3DViewport3; dwFlags: DWORD) : HResult; stdcall;
-
 
8172
    function EnumTextureFormats (
5301
    function EnumTextureFormats(lpd3dEnumPixelProc: TD3DEnumPixelFormatsCallback;
8173
        lpd3dEnumPixelProc: TD3DEnumPixelFormatsCallback; lpArg: Pointer) :
5302
        lpArg: Pointer): HResult; stdcall;
8174
        HResult; stdcall;
5303
    function BeginScene: HResult; stdcall;
8175
    function BeginScene: HResult; stdcall;
5304
    function EndScene: HResult; stdcall;
8176
    function EndScene: HResult; stdcall;
5305
    function GetDirect3D(out lpD3D: IDirect3D3): HResult; stdcall;
8177
    function GetDirect3D (var lpD3D: IDirect3D3) : HResult; stdcall;
5306
    function SetCurrentViewport(lpd3dViewport: IDirect3DViewport3): HResult; stdcall;
8178
    function SetCurrentViewport (lpd3dViewport: IDirect3DViewport3)
-
 
8179
        : HResult; stdcall;
5307
    function GetCurrentViewport(out lplpd3dViewport: IDirect3DViewport3): HResult; stdcall;
8180
    function GetCurrentViewport (var lplpd3dViewport: IDirect3DViewport3)
-
 
8181
        : HResult; stdcall;
5308
    function SetRenderTarget(lpNewRenderTarget: IDirectDrawSurface4): HResult; stdcall;
8182
    function SetRenderTarget (lpNewRenderTarget: IDirectDrawSurface4)
-
 
8183
        : HResult; stdcall;
5309
    function GetRenderTarget(out lplpNewRenderTarget: IDirectDrawSurface4): HResult; stdcall;
8184
    function GetRenderTarget (var lplpNewRenderTarget: IDirectDrawSurface4)
-
 
8185
        : HResult; stdcall;
5310
    function Begin_(d3dpt: TD3DPrimitiveType; dwVertexTypeDesc: DWORD;
8186
    function Begin_ (d3dpt: TD3DPrimitiveType; dwVertexTypeDesc: DWORD;
5311
        dwFlags: DWORD): HResult; stdcall;
8187
        dwFlags: DWORD) : HResult; stdcall;
5312
    function BeginIndexed(dptPrimitiveType: TD3DPrimitiveType; dwVertexTypeDesc: DWORD;
8188
    function BeginIndexed (dptPrimitiveType: TD3DPrimitiveType;
-
 
8189
        dwVertexTypeDesc: DWORD; lpvVertices: pointer; dwNumVertices: DWORD;
5313
      const lpvVertices; dwNumVertices: DWORD; dwFlags: DWORD): HResult; stdcall;
8190
        dwFlags: DWORD) : HResult; stdcall;
5314
    function Vertex(const lpVertexType): HResult; stdcall;
8191
    function Vertex (lpVertex: pointer) : HResult;  stdcall;
5315
    function Index(wVertexIndex: WORD): HResult; stdcall;
8192
    function Index (wVertexIndex: WORD) : HResult;  stdcall;
5316
    function End_(dwFlags: DWORD): HResult; stdcall;
8193
    function End_ (dwFlags: DWORD) : HResult; stdcall;
5317
    function GetRenderState(dwRenderStateType: TD3DRenderStateType;
8194
    function GetRenderState (dwRenderStateType: TD3DRenderStateType;
5318
        var lpdwRenderState: DWORD): HResult; stdcall;
8195
        var lpdwRenderState) : HResult; stdcall;
5319
    function SetRenderState(dwRenderStateType: TD3DRenderStateType;
8196
    function SetRenderState (dwRenderStateType: TD3DRenderStateType;
5320
        dwRenderState: DWORD): HResult; stdcall;
8197
        dwRenderState: DWORD) : HResult; stdcall;
5321
    function GetLightState(dwLightStateType: TD3DLightStateType;
8198
    function GetLightState (dwLightStateType: TD3DLightStateType;
5322
        var lpdwLightState: DWORD): HResult; stdcall;
8199
        var lpdwLightState) : HResult; stdcall;
5323
    function SetLightState(dwLightStateType: TD3DLightStateType;
8200
    function SetLightState (dwLightStateType: TD3DLightStateType;
5324
        dwLightState: DWORD): HResult; stdcall;
8201
        dwLightState: DWORD) : HResult; stdcall;
5325
    function SetTransform(dtstTransformStateType: TD3DTransformStateType;
8202
    function SetTransform (dtstTransformStateType: TD3DTransformStateType;
5326
        const lpD3DMatrix: TD3DMatrix): HResult; stdcall;
8203
        var lpD3DMatrix: TD3DMatrix) : HResult; stdcall;
5327
    function GetTransform(dtstTransformStateType: TD3DTransformStateType;
8204
    function GetTransform (dtstTransformStateType: TD3DTransformStateType;
5328
        var lpD3DMatrix: TD3DMatrix): HResult; stdcall;
8205
        var lpD3DMatrix: TD3DMatrix) : HResult; stdcall;
5329
    function MultiplyTransform(dtstTransformStateType: TD3DTransformStateType;
8206
    function MultiplyTransform (dtstTransformStateType: TD3DTransformStateType;
5330
        var lpD3DMatrix: TD3DMatrix): HResult; stdcall;
8207
        var lpD3DMatrix: TD3DMatrix) : HResult; stdcall;
5331
    function DrawPrimitive(dptPrimitiveType: TD3DPrimitiveType;
8208
    function DrawPrimitive (dptPrimitiveType: TD3DPrimitiveType;
5332
        dwVertexTypeDesc: DWORD; const lpvVertices; dwVertexCount,
-
 
5333
        dwFlags: DWORD): HResult; stdcall;
-
 
5334
    function DrawIndexedPrimitive(dptPrimitiveType: TD3DPrimitiveType;
-
 
5335
        dwVertexTypeDesc: DWORD; const lpvVertices;
8209
        dwVertexTypeDesc: DWORD; const lpvVertices;
-
 
8210
        dwVertexCount, dwFlags: DWORD) : HResult; stdcall;
-
 
8211
    function DrawIndexedPrimitive (dptPrimitiveType: TD3DPrimitiveType;
5336
        dwVertexCount: DWORD; const dwIndices; dwIndexCount: DWORD;
8212
        dwVertexTypeDesc: DWORD; const lpvVertices; dwVertexCount: DWORD;
5337
        dwFlags: DWORD): HResult; stdcall;
8213
        var lpwIndices: WORD; dwIndexCount, dwFlags: DWORD) : HResult; stdcall;
5338
    function SetClipStatus(const lpD3DClipStatus: TD3DClipStatus): HResult; stdcall;
8214
    function SetClipStatus (var lpD3DClipStatus: TD3DClipStatus) : HResult; stdcall;
5339
    function GetClipStatus(var lpD3DClipStatus: TD3DClipStatus): HResult; stdcall;
8215
    function GetClipStatus (var lpD3DClipStatus: TD3DClipStatus) : HResult; stdcall;
5340
    function DrawPrimitiveStrided(dptPrimitiveType: TD3DPrimitiveType;
8216
    function DrawPrimitiveStrided (dptPrimitiveType: TD3DPrimitiveType;
5341
        dwVertexTypeDesc: DWORD; const lpVertexArray;
8217
        dwVertexTypeDesc : DWORD;
-
 
8218
        var lpVertexArray: TD3DDrawPrimitiveStridedData;
5342
        dwVertexCount: DWORD; dwFlags: DWORD): HResult; stdcall;
8219
        dwVertexCount, dwFlags: DWORD) : HResult; stdcall;
5343
    function DrawIndexedPrimitiveStrided(dptPrimitiveType: TD3DPrimitiveType;
8220
    function DrawIndexedPrimitiveStrided (dptPrimitiveType: TD3DPrimitiveType;
5344
        dwVertexTypeDesc: DWORD; const lpVertexArray;
8221
        dwVertexTypeDesc : DWORD;
-
 
8222
        var lpVertexArray: TD3DDrawPrimitiveStridedData; dwVertexCount: DWORD;
5345
        dwVertexCount: DWORD; const lpwIndices; dwIndexCount: DWORD; dwFlags: DWORD): HResult; stdcall;
8223
        var lpwIndices: WORD; dwIndexCount, dwFlags: DWORD) : HResult; stdcall;
5346
    function DrawPrimitiveVB(dptPrimitiveType: TD3DPrimitiveType;
8224
    function DrawPrimitiveVB (dptPrimitiveType: TD3DPrimitiveType;
5347
        lpd3dVertexBuffer: IDirect3DVertexBuffer; dwStartVertex, dwNumVertices: DWORD;
8225
        lpd3dVertexBuffer: IDirect3DVertexBuffer;
5348
        dwFlags: DWORD): HResult; stdcall;
8226
        dwStartVertex, dwNumVertices, dwFlags: DWORD) : HResult; stdcall;
5349
    function DrawIndexedPrimitiveVB(dptPrimitiveType: TD3DPrimitiveType;
8227
    function DrawIndexedPrimitiveVB (dptPrimitiveType: TD3DPrimitiveType;
5350
        lpd3dVertexBuffer: IDirect3DVertexBuffer; const lpwIndices; dwIndexCount: DWORD;
8228
        lpd3dVertexBuffer: IDirect3DVertexBuffer; var lpwIndices: WORD;
5351
        dwFlags: DWORD): HResult; stdcall;
8229
        dwIndexCount, dwFlags: DWORD) : HResult; stdcall;
5352
    function ComputeSphereVisibility(const lpCenters; const lpRadii;
8230
    function ComputeSphereVisibility (var lpCenters: TD3DVector;
-
 
8231
        var lpRadii: TD3DValue; dwNumSpheres, dwFlags: DWORD;
5353
        dwNumSpheres: DWORD; dwFlags: DWORD; var lpdwReturnValues): HResult; stdcall;
8232
        var lpdwReturnValues: DWORD) : HResult; stdcall;
5354
    function GetTexture(dwStage: DWORD; out lplpTexture: IDirect3DTexture2): HResult; stdcall;
8233
    function GetTexture (dwStage: DWORD; var lplpTexture: IDirect3DTexture2)
-
 
8234
        : HResult; stdcall;
5355
    function SetTexture(dwStage: DWORD; lpTexture: IDirect3DTexture2): HResult; stdcall;
8235
    function SetTexture (dwStage: DWORD; lplpTexture: IDirect3DTexture2)
-
 
8236
        : HResult; stdcall;
5356
    function GetTextureStageState(dwStage: DWORD; dwState: TD3DTextureStagesStateType;
8237
    function GetTextureStageState (dwStage: DWORD;
5357
       var lpdwValue: DWORD): HResult; stdcall;
8238
        dwState: TD3DTextureStageStateType; var lpdwValue: DWORD) : HResult; stdcall;
5358
    function SetTextureStageState(dwStage: DWORD; dwState: TD3DTextureStagesStateType;
8239
    function SetTextureStageState (dwStage: DWORD;
5359
       lpdwValue: DWORD): HResult; stdcall;
8240
        dwState: TD3DTextureStageStateType; lpdwValue: DWORD) : HResult; stdcall;
5360
    function ValidateDevice(var lpdwPasses: DWORD): HResult; stdcall;
8241
    function ValidateDevice (var lpdwExtraPasses: DWORD) : HResult; stdcall;
5361
  end;
8242
  end;
5362
 
8243
 
5363
  IDirect3DDevice7 = interface(IUnknown)
8244
  IDirect3DDevice7 = interface (IUnknown)
5364
    ['{F5049E79-4861-11D2-A407-00A0C90629A8}']
8245
    ['{f5049e79-4861-11d2-a407-00a0c90629a8}']
5365
    // IDirect3DDevice7 methods
8246
    (*** IDirect3DDevice7 methods ***)
5366
    function GetCaps(var lpD3DDeviceDesc: TD3DDeviceDesc7): HResult; stdcall;
8247
    function GetCaps(out lpD3DDevDesc: TD3DDeviceDesc7) : HResult; stdcall;
5367
    function EnumTextureFormats(lpd3dEnumPixelProc: TD3DEnumPixelFormatsCallback;
8248
    function EnumTextureFormats(lpd3dEnumPixelProc: TD3DEnumPixelFormatsCallback; lpArg: Pointer) : HResult; stdcall;
5368
        lpArg: Pointer): HResult; stdcall;
-
 
5369
    function BeginScene: HResult; stdcall;
8249
    function BeginScene: HResult; stdcall;
5370
    function EndScene: HResult; stdcall;
8250
    function EndScene: HResult; stdcall;
5371
    function GetDirect3D(out lplpD3D: IDirect3D7): HResult; stdcall;
8251
    function GetDirect3D(out lpD3D: IDirect3D7) : HResult; stdcall;
5372
    function SetRenderTarget(lpNewRenderTarget: IDirectDrawSurface7; dwFlags: DWORD): HResult; stdcall;
8252
    function SetRenderTarget(lpNewRenderTarget: IDirectDrawSurface7; dwFlags: DWORD) : HResult; stdcall;
5373
    function GetRenderTarget(out lplpRenderTarget: IDirectDrawSurface7): HResult; stdcall;
8253
    function GetRenderTarget(out lplpRenderTarget: IDirectDrawSurface7) : HResult; stdcall;
5374
    function Clear(dwCount: DWORD; const lpRects: TD3DRect; dwFlags: DWORD; dwColor: TD3DColor;
8254
    function Clear(dwCount: DWORD; lpRects: PD3DRect; dwFlags, dwColor: DWORD; dvZ: TD3DValue; dwStencil: DWORD) : HResult; stdcall;
-
 
8255
    function SetTransform(dtstTransformStateType: TD3DTransformStateType;
5375
        dvZ: TD3DValue; dwStencil: DWORD): HResult; stdcall;
8256
        const lpD3DMatrix: TD3DMatrix) : HResult; stdcall;
5376
    function SetTransform(dtstTransformStateType: TD3DTransformStateType; const lpD3DMatrix: TD3DMatrix): HResult; stdcall;
8257
    function GetTransform(dtstTransformStateType: TD3DTransformStateType;
5377
    function GetTransform(dtstTransformStateType: TD3DTransformStateType; var lpD3DMatrix: TD3DMatrix): HResult; stdcall;
8258
        out lpD3DMatrix: TD3DMatrix) : HResult; stdcall;
5378
    function SetViewport(const lpViewport: TD3DViewport7): HResult; stdcall;
8259
    function SetViewport(const lpViewport: TD3DViewport7) : HResult; stdcall;
5379
    function MultiplyTransform(dtstTransformStateType: TD3DTransformStateType; const lpD3DMatrix: TD3DMatrix): HResult; stdcall;
8260
    function MultiplyTransform(dtstTransformStateType: TD3DTransformStateType;
-
 
8261
        const lpD3DMatrix: TD3DMatrix) : HResult; stdcall;
5380
    function GetViewport(var lpViewport: TD3DViewport7): HResult; stdcall;
8262
    function GetViewport(out lpViewport: TD3DViewport7) : HResult; stdcall;
5381
    function SetMaterial(const lpMaterial: TD3DMaterial7): HResult; stdcall;
8263
    function SetMaterial(const lpMaterial: TD3DMaterial7) : HResult; stdcall;
5382
    function GetMaterial(var lpMaterial: TD3DMaterial7): HResult; stdcall;
8264
    function GetMaterial(out lpMaterial: TD3DMaterial7) : HResult; stdcall;
5383
    function SetLight(dwLightIndex: DWORD; const lpLight: TD3DLight7): HResult; stdcall;
8265
    function SetLight(dwLightIndex: DWORD; const lpLight: TD3DLight7) : HResult; stdcall;
5384
    function GetLight(dwLightIndex: DWORD; var lpLight: TD3DLight7): HResult; stdcall;
8266
    function GetLight(dwLightIndex: DWORD; out lpLight: TD3DLight7) : HResult; stdcall;
5385
    function SetRenderState(dwRenderStateType: TD3DRenderStateType; dwRenderState: DWORD): HResult; stdcall;
8267
    function SetRenderState(dwRenderStateType: TD3DRenderStateType; dwRenderState: DWORD) : HResult; stdcall;
5386
    function GetRenderState(dwRenderStateType: TD3DRenderStateType; var lpdwRenderState: DWORD): HResult; stdcall;
8268
    function GetRenderState(dwRenderStateType: TD3DRenderStateType; out dwRenderState: DWORD) : HResult; stdcall;
5387
    function BeginStateBlock: HResult; stdcall;
8269
    function BeginStateBlock : HResult; stdcall;
5388
    function EndStateBlock(var lpdwBlockHandle: DWORD): HResult; stdcall;
8270
    function EndStateBlock(out lpdwBlockHandle: DWORD) : HResult; stdcall;
5389
    function PreLoad(lpddsTexture: IDirectDrawSurface7): HResult; stdcall;
8271
    function PreLoad(lpddsTexture: IDirectDrawSurface7) : HResult; stdcall;
5390
    function DrawPrimitive(dptPrimitiveType: TD3DPrimitiveType; dwVertexTypeDesc: DWORD;
8272
    function DrawPrimitive(dptPrimitiveType: TD3DPrimitiveType;
-
 
8273
        dwVertexTypeDesc: DWORD; const lpvVertices;
5391
        const lpvVertices; dwVertexCount: DWORD; dwFlags: DWORD): HResult; stdcall;
8274
        dwVertexCount, dwFlags: DWORD) : HResult; stdcall;
5392
    function DrawIndexedPrimitive(d3dptPrimitiveType: TD3DPrimitiveType; dwVertexTypeDesc: DWORD;
8275
    function DrawIndexedPrimitive(dptPrimitiveType: TD3DPrimitiveType;
-
 
8276
        dwVertexTypeDesc: DWORD; const lpvVertices; dwVertexCount: DWORD;
5393
        const lpvVertices; dwVertexCount: DWORD; const lpwIndices; dwIndexCount: DWORD; dwFlags: DWORD): HResult; stdcall;
8277
        const lpwIndices; dwIndexCount, dwFlags: DWORD) : HResult; stdcall;
5394
    function SetClipStatus(const lpD3DClipStatus: TD3DClipStatus): HResult; stdcall;
8278
    function SetClipStatus(const lpD3DClipStatus: TD3DClipStatus) : HResult; stdcall;
5395
    function GetClipStatus(var lpD3DClipStatus: TD3DClipStatus): HResult; stdcall;
8279
    function GetClipStatus(out lpD3DClipStatus: TD3DClipStatus) : HResult; stdcall;
5396
    function DrawPrimitiveStrided(dptPrimitiveType: TD3DPrimitiveType; dwVertexTypeDesc: DWORD;
8280
    function DrawPrimitiveStrided(dptPrimitiveType: TD3DPrimitiveType;
-
 
8281
        dwVertexTypeDesc : DWORD;
-
 
8282
        const lpVertexArray: TD3DDrawPrimitiveStridedData;
5397
        const lpVertexArray; dwVertexCount: DWORD; dwFlags: DWORD): HResult; stdcall;
8283
        dwVertexCount, dwFlags: DWORD) : HResult; stdcall;
5398
    function DrawIndexedPrimitiveStrided(d3dptPrimitiveType: TD3DPrimitiveType; dwVertexTypeDesc: DWORD;
8284
    function DrawIndexedPrimitiveStrided(dptPrimitiveType: TD3DPrimitiveType;
-
 
8285
        dwVertexTypeDesc : DWORD;
-
 
8286
        const lpVertexArray: TD3DDrawPrimitiveStridedData; dwVertexCount: DWORD;
5399
        const lpVertexArray; dwVertexCount: DWORD; const lpwIndices; dwIndexCount: DWORD; dwFlags: DWORD): HResult; stdcall;
8287
        var lpwIndices: WORD; dwIndexCount, dwFlags: DWORD) : HResult; stdcall;
5400
    function DrawPrimitiveVB(d3dptPrimitiveType: TD3DPrimitiveType; lpd3dVertexBuffer: IDirect3DVertexBuffer7;
8288
    function DrawPrimitiveVB(dptPrimitiveType: TD3DPrimitiveType;
-
 
8289
        lpd3dVertexBuffer: IDirect3DVertexBuffer7;
5401
        dwStartVertex: DWORD; dwNumVertices: DWORD; dwFlags: DWORD): HResult; stdcall;
8290
        dwStartVertex, dwNumVertices, dwFlags: DWORD) : HResult; stdcall;
5402
    function DrawIndexedPrimitiveVB(d3dptPrimitiveType: TD3DPrimitiveType; lpd3dVertexBuffer: IDirect3DVertexBuffer7;
8291
    function DrawIndexedPrimitiveVB(dptPrimitiveType: TD3DPrimitiveType;
-
 
8292
        lpd3dVertexBuffer: IDirect3DVertexBuffer7; dwStartVertex, dwNumVertices: DWORD;
5403
        dwStartVertex: DWORD; dwNumVertices: DWORD; const lpwIndices; dwIndexCount: DWORD; dwFlags: DWORD): HResult; stdcall;
8293
        var lpwIndices: WORD; dwIndexCount, dwFlags: DWORD) : HResult; stdcall;
5404
    function ComputeSphereVisibility(const lpCenters; const lpRadii; dwNumSpheres: DWORD; dwFlags: DWORD; var lpdwReturnValue): HResult; stdcall;
8294
    function ComputeSphereVisibility(const lpCenters: TD3DVector;
-
 
8295
        var lpRadii: TD3DValue; dwNumSpheres, dwFlags: DWORD;
-
 
8296
        var lpdwReturnValues: DWORD) : HResult; stdcall;
5405
    function GetTexture(dwStage: DWORD; out lplpTexture: IDirectDrawSurface7): HResult; stdcall;
8297
    function GetTexture(dwStage: DWORD; out lplpTexture: IDirectDrawSurface7) : HResult; stdcall;
5406
    function SetTexture(dwStage: DWORD; lpTexture: IDirectDrawSurface7): HResult; stdcall;
8298
    function SetTexture(dwStage: DWORD; lpTexture: IDirectDrawSurface7) : HResult; stdcall;
-
 
8299
    function GetTextureStageState(dwStage: DWORD;
5407
    function GetTextureStageState(dwStage: DWORD; dwState: TD3DTextureStagesStateType; var lpdwValue: DWORD): HResult; stdcall;
8300
        dwState: TD3DTextureStageStateType; out lpdwValue: DWORD) : HResult; stdcall;
-
 
8301
    function SetTextureStageState(dwStage: DWORD;
5408
    function SetTextureStageState(dwStage: DWORD; dwState: TD3DTextureStagesStateType; dwValue: DWORD): HResult; stdcall;
8302
        dwState: TD3DTextureStageStateType; lpdwValue: DWORD) : HResult; stdcall;
5409
    function ValidateDevice(var lpdwPasses: DWORD): HResult; stdcall;
8303
    function ValidateDevice(out lpdwExtraPasses: DWORD) : HResult; stdcall;
5410
    function ApplyStateBlock(dwBlockHandle: DWORD): HResult; stdcall;
8304
    function ApplyStateBlock(dwBlockHandle: DWORD) : HResult; stdcall;
5411
    function CaptureStateBlock(dwBlockHandle: DWORD): HResult; stdcall;
8305
    function CaptureStateBlock(dwBlockHandle: DWORD) : HResult; stdcall;
5412
    function DeleteStateBlock(dwBlockHandle: DWORD): HResult; stdcall;
8306
    function DeleteStateBlock(dwBlockHandle: DWORD) : HResult; stdcall;
5413
    function CreateStateBlock(d3dsbType: TD3DSTATEBLOCKTYPE; var lpdwBlockHandle: DWORD): HResult; stdcall;
8307
    function CreateStateBlock(d3dsbType: TD3DStateBlockType; out lpdwBlockHandle: DWORD) : HResult; stdcall;
-
 
8308
    function Load(lpDestTex: IDirectDrawSurface7; lpDestPoint: PPoint;
5414
    function Load(lpDestTex: IDirectDrawSurface7; const lpDestPoint: TPoint; lpSrcTex: IDirectDrawSurface7; const lprcSrcRect: TRect; dwFlags: DWORD): HResult; stdcall;
8309
        lpSrcTex: IDirectDrawSurface7; lprcSrcRect: PRect; dwFlags: DWORD) : HResult; stdcall;
5415
    function LightEnable(dwLightIndex: DWORD; bEnable: BOOL): HResult; stdcall;
8310
    function LightEnable(dwLightIndex: DWORD; bEnable: BOOL) : HResult; stdcall;
5416
    function GetLightEnable(dwLightIndex: DWORD; var pbEnable: BOOL): HResult; stdcall;
8311
    function GetLightEnable(dwLightIndex: DWORD; out bEnable: BOOL) : HResult; stdcall;
5417
    function SetClipPlane(dwIndex: DWORD; const pPlaneEquation): HResult; stdcall;
8312
    function SetClipPlane(dwIndex: DWORD; var pPlaneEquation: TD3DValue) : HResult; stdcall;
5418
    function GetClipPlane(dwIndex: DWORD; var pPlaneEquation): HResult; stdcall;
8313
    function GetClipPlane(dwIndex: DWORD; out pPlaneEquation: TD3DValue) : HResult; stdcall;
5419
    function GetInfo(dwDevInfoID: DWORD; pDevInfoStruct: Pointer; dwSize: DWORD): HResult; stdcall;
8314
    function GetInfo(dwDevInfoID: DWORD; pDevInfoStruct: Pointer; dwSize: DWORD) : HResult; stdcall;
5420
  end;
8315
  end;
5421
 
8316
 
-
 
8317
(*
-
 
8318
 * Execute Buffer interface
-
 
8319
 *)
-
 
8320
 
5422
  IDirect3DExecuteBuffer = interface(IUnknown)
8321
  IDirect3DExecuteBuffer = interface (IUnknown)
5423
    ['{4417C145-33AD-11CF-816F-0000C020156E}']
8322
    ['{4417C145-33AD-11CF-816F-0000C020156E}']
5424
    // IDirect3DExecuteBuffer methods
8323
    (*** IDirect3DExecuteBuffer methods ***)
5425
    function Initialize(lpDirect3DDevice: IDirect3DDevice;
8324
    function Initialize (lpDirect3DDevice: IDirect3DDevice;
5426
        const lpDesc: TD3DExecuteBufferDesc): HResult; stdcall;
8325
        var lpDesc: TD3DExecuteBufferDesc) : HResult; stdcall;
5427
    function Lock(var lpDesc: TD3DExecuteBufferDesc): HResult; stdcall;
8326
    function Lock (var lpDesc: TD3DExecuteBufferDesc) : HResult; stdcall;
5428
    function Unlock: HResult; stdcall;
8327
    function Unlock: HResult; stdcall;
5429
    function SetExecuteData(const lpData: TD3DExecuteData): HResult; stdcall;
8328
    function SetExecuteData (var lpData: TD3DExecuteData) : HResult; stdcall;
5430
    function GetExecuteData(var lpData: TD3DExecuteData): HResult; stdcall;
8329
    function GetExecuteData (var lpData: TD3DExecuteData) : HResult; stdcall;
5431
    function Validate(var lpdwOffset: DWORD; lpFunc: TD3DValidateCallback;
8330
    function Validate (var lpdwOffset: DWORD; lpFunc: TD3DValidateCallback;
5432
        lpUserArg: Pointer; dwReserved: DWORD): HResult; stdcall;
8331
        lpUserArg: Pointer; dwReserved: DWORD) : HResult; stdcall;
-
 
8332
    (*** Warning!  Optimize is defined differently in the header files
-
 
8333
         and the online documentation ***)
5433
    function Optimize(dwFlags: DWORD): HResult; stdcall;
8334
    function Optimize (dwFlags: DWORD) : HResult; stdcall;
5434
  end;
8335
  end;
5435
 
8336
 
-
 
8337
(*
-
 
8338
 * Light interfaces
-
 
8339
 *)
-
 
8340
 
5436
  IDirect3DLight = interface(IUnknown)
8341
  IDirect3DLight = interface (IUnknown)
5437
    ['{4417C142-33AD-11CF-816F-0000C020156E}']
8342
    ['{4417C142-33AD-11CF-816F-0000C020156E}']
5438
    // IDirect3DLight methods
8343
    (*** IDirect3DLight methods ***)
5439
    function Initialize(lpDirect3D: IDirect3D): HResult; stdcall;
8344
    function Initialize (lpDirect3D: IDirect3D) : HResult; stdcall;
5440
    function SetLight(const lpLight: TD3DLight): HResult; stdcall;
8345
    function SetLight (var lpLight: TD3DLight2) : HResult; stdcall;
5441
    function GetLight(var lpLight: TD3DLight): HResult; stdcall;
8346
    function GetLight (var lpLight: TD3DLight2) : HResult; stdcall;
5442
  end;
8347
  end;
5443
 
8348
 
-
 
8349
(*
-
 
8350
 * Material interfaces
-
 
8351
 *)
-
 
8352
 
5444
  IDirect3DMaterial = interface(IUnknown)
8353
  IDirect3DMaterial = interface (IUnknown)
5445
    ['{4417C144-33AD-11CF-816F-0000C020156E}']
8354
    ['{4417C144-33AD-11CF-816F-0000C020156E}']
5446
    // IDirect3DMaterial methods
8355
    (*** IDirect3DMaterial methods ***)
5447
    function Initialize(lpDirect3D: IDirect3D): HResult; stdcall;
8356
    function Initialize (lpDirect3D: IDirect3D) : HResult; stdcall;
5448
    function SetMaterial(const lpMat: TD3DMaterial): HResult; stdcall;
8357
    function SetMaterial (var lpMat: TD3DMaterial) : HResult; stdcall;
5449
    function GetMaterial(var lpMat: TD3DMaterial): HResult; stdcall;
8358
    function GetMaterial (var lpMat: TD3DMaterial) : HResult; stdcall;
5450
    function GetHandle(lpDirect3DDevice: IDirect3DDevice;
8359
    function GetHandle (lpDirect3DDevice: IDirect3DDevice;
5451
        var lpHandle: TD3DMaterialHandle): HResult; stdcall;
8360
        var lpHandle: TD3DMaterialHandle) : HResult; stdcall;
5452
    function Reserve: HResult; stdcall;
8361
    function Reserve: HResult; stdcall;
5453
    function Unreserve: HResult; stdcall;
8362
    function Unreserve: HResult; stdcall;
5454
  end;
8363
  end;
5455
 
8364
 
5456
  IDirect3DMaterial2 = interface(IUnknown)
8365
  IDirect3DMaterial2 = interface (IUnknown)
5457
    ['{93281503-8CF8-11D0-89AB-00A0C9054129}']
8366
    ['{93281503-8cf8-11d0-89ab-00a0c9054129}']
5458
    // IDirect3DMaterial2 methods
8367
    (*** IDirect3DMaterial2 methods ***)
5459
    function SetMaterial(const lpMat: TD3DMaterial): HResult; stdcall;
8368
    function SetMaterial (var lpMat: TD3DMaterial) : HResult; stdcall;
5460
    function GetMaterial(var lpMat: TD3DMaterial): HResult; stdcall;
8369
    function GetMaterial (var lpMat: TD3DMaterial) : HResult; stdcall;
5461
    function GetHandle(lpDirect3DDevice: IDirect3DDevice2;
8370
    function GetHandle (lpDirect3DDevice: IDirect3DDevice2;
5462
        var lpHandle: TD3DMaterialHandle): HResult; stdcall;
8371
        var lpHandle: TD3DMaterialHandle) : HResult; stdcall;
5463
  end;
8372
  end;
5464
 
8373
 
5465
  IDirect3DMaterial3 = interface(IUnknown)
8374
  IDirect3DMaterial3 = interface (IUnknown)
5466
    ['{CA9C46F4-D3C5-11D1-B75A-00600852B312}']
8375
    ['{ca9c46f4-d3c5-11d1-b75a-00600852b312}']
5467
    // IDirect3DMaterial3 methods
8376
    (*** IDirect3DMaterial2 methods ***)
5468
    function SetMaterial(const lpMat: TD3DMaterial): HResult; stdcall;
8377
    function SetMaterial (var lpMat: TD3DMaterial) : HResult; stdcall;
5469
    function GetMaterial(var lpMat: TD3DMaterial): HResult; stdcall;
8378
    function GetMaterial (var lpMat: TD3DMaterial) : HResult; stdcall;
5470
    function GetHandle(lpDirect3DDevice: IDirect3DDevice3;
8379
    function GetHandle (lpDirect3DDevice: IDirect3DDevice3;
5471
        var lpHandle: TD3DMaterialHandle): HResult; stdcall;
8380
        var lpHandle: TD3DMaterialHandle) : HResult; stdcall;
5472
  end;
8381
  end;
5473
 
8382
 
-
 
8383
(*
-
 
8384
 * Texture interfaces
-
 
8385
 *)
-
 
8386
 
5474
  IDirect3DTexture = interface(IUnknown)
8387
  IDirect3DTexture = interface (IUnknown)
5475
    ['{2CDCD9E0-25A0-11CF-A31A-00AA00B93356}']
8388
    ['{2CDCD9E0-25A0-11CF-A31A-00AA00B93356}']
5476
    // IDirect3DTexture methods
8389
    (*** IDirect3DTexture methods ***)
5477
    function Initialize(lpD3DDevice: IDirect3DDevice;
8390
    function Initialize (lpD3DDevice: IDirect3DDevice;
5478
        lpDDSurface: IDirectDrawSurface): HResult; stdcall;
8391
        lpDDSurface: IDirectDrawSurface) : HResult; stdcall;
5479
    function GetHandle(lpDirect3DDevice: IDirect3DDevice;
8392
    function GetHandle (lpDirect3DDevice: IDirect3DDevice;
5480
        var lpHandle: TD3DTextureHandle): HResult; stdcall;
8393
        var lpHandle: TD3DTextureHandle) : HResult; stdcall;
5481
    function PaletteChanged(dwStart: DWORD; dwCount: DWORD): HResult; stdcall;
8394
    function PaletteChanged (dwStart: DWORD; dwCount: DWORD) : HResult; stdcall;
5482
    function Load(lpD3DTexture: IDirect3DTexture): HResult; stdcall;
8395
    function Load (lpD3DTexture: IDirect3DTexture) : HResult; stdcall;
5483
    function Unload: HResult; stdcall;
8396
    function Unload: HResult; stdcall;
5484
  end;
8397
  end;
5485
 
8398
 
5486
  IDirect3DTexture2 = interface(IUnknown)
8399
  IDirect3DTexture2 = interface (IUnknown)
5487
    ['{93281502-8CF8-11D0-89AB-00A0C9054129}']
8400
    ['{93281502-8cf8-11d0-89ab-00a0c9054129}']
5488
    // IDirect3DTexture2 methods
8401
    (*** IDirect3DTexture2 methods ***)
5489
    function GetHandle(lpDirect3DDevice2: IDirect3DDevice2;
8402
    function GetHandle (lpDirect3DDevice: IDirect3DDevice2;
5490
        var lpHandle: TD3DTextureHandle): HResult; stdcall;
8403
        var lpHandle: TD3DTextureHandle) : HResult; stdcall;
5491
    function PaletteChanged(dwStart: DWORD; dwCount: DWORD): HResult; stdcall;
8404
    function PaletteChanged (dwStart: DWORD; dwCount: DWORD) : HResult; stdcall;
5492
    function Load(lpD3DTexture2: IDirect3DTexture2): HResult; stdcall;
8405
    function Load (lpD3DTexture: IDirect3DTexture2) : HResult; stdcall;
5493
  end;
8406
  end;
5494
 
8407
 
-
 
8408
(*
-
 
8409
 * Viewport interfaces
-
 
8410
 *)
-
 
8411
 
5495
  IDirect3DViewport = interface(IUnknown)
8412
  IDirect3DViewport = interface (IUnknown)
5496
    ['{4417C146-33AD-11CF-816F-0000C020156E}']
8413
    ['{4417C146-33AD-11CF-816F-0000C020156E}']
5497
    // IDirect3DViewport methods
8414
    (*** IDirect3DViewport methods ***)
5498
    function Initialize(lpDirect3D: IDirect3D): HResult; stdcall;
8415
    function Initialize (lpDirect3D: IDirect3D) : HResult; stdcall;
5499
    function GetViewport(var lpData: TD3DViewport): HResult; stdcall;
8416
    function GetViewport (out lpData: TD3DViewport) : HResult; stdcall;
5500
    function SetViewport(const lpData: TD3DViewport): HResult; stdcall;
8417
    function SetViewport (const lpData: TD3DViewport) : HResult; stdcall;
5501
    function TransformVertices(dwVertexCount: DWORD;
8418
    function TransformVertices (dwVertexCount: DWORD;
5502
        var lpData: TD3DTransformData; dwFlags: DWORD;
8419
        const lpData: TD3DTransformData; dwFlags: DWORD;
5503
        var lpOffscreen: DWORD): HResult; stdcall;
8420
        out lpOffscreen: DWORD) : HResult; stdcall;
5504
    function LightElements(dwElementCount: DWORD;
8421
    function LightElements (dwElementCount: DWORD;
5505
        var lpData: TD3DLightData): HResult; stdcall;
8422
        var lpData: TD3DLightData) : HResult; stdcall;
5506
    function SetBackground(hMat: TD3DMaterialHandle): HResult; stdcall;
8423
    function SetBackground (hMat: TD3DMaterialHandle) : HResult; stdcall;
5507
    function GetBackground(hMat: TD3DMaterialHandle): HResult; stdcall;
8424
    function GetBackground (out hMat: TD3DMaterialHandle) : HResult; stdcall;
5508
    function SetBackgroundDepth(lpDDSurface: IDirectDrawSurface): HResult; stdcall;
8425
    function SetBackgroundDepth (lpDDSurface: IDirectDrawSurface) :
-
 
8426
        HResult; stdcall;
5509
    function GetBackgroundDepth(out lplpDDSurface: IDirectDrawSurface;
8427
    function GetBackgroundDepth (out lplpDDSurface: IDirectDrawSurface;
5510
        var lpValid: BOOL): HResult; stdcall;
8428
        out lpValid: BOOL) : HResult; stdcall;
5511
    function Clear(dwCount: DWORD; const lpRects: TD3DRect; dwFlags: DWORD): HResult; stdcall;
8429
    function Clear (dwCount: DWORD; const lpRects: TD3DRect; dwFlags: DWORD) :
-
 
8430
        HResult; stdcall;
5512
    function AddLight(lpDirect3DLight: IDirect3DLight): HResult; stdcall;
8431
    function AddLight (lpDirect3DLight: IDirect3DLight) : HResult; stdcall;
5513
    function DeleteLight(lpDirect3DLight: IDirect3DLight): HResult; stdcall;
8432
    function DeleteLight (lpDirect3DLight: IDirect3DLight) : HResult; stdcall;
5514
    function NextLight(lpDirect3DLight: IDirect3DLight;
8433
     function NextLight (lpDirect3DLight: IDirect3DLight;
5515
        out lplpDirect3DLight: IDirect3DLight; dwFlags: DWORD): HResult; stdcall;
8434
        out lplpDirect3DLight: IDirect3DLight; dwFlags: DWORD) : HResult; stdcall;
5516
  end;
8435
  end;
5517
 
8436
 
5518
  IDirect3DViewport2 = interface(IDirect3DViewport)
8437
  IDirect3DViewport2 = interface (IUnknown)
5519
    ['{93281500-8CF8-11D0-89AB-00A0C9054129}']
8438
    ['{93281500-8cf8-11d0-89ab-00a0c9054129}']
-
 
8439
    (*** IDirect3DViewport2 methods ***)
-
 
8440
    function Initialize (lpDirect3D: IDirect3D) : HResult; stdcall;
-
 
8441
    function GetViewport (out lpData: TD3DViewport) : HResult; stdcall;
-
 
8442
    function SetViewport (const lpData: TD3DViewport) : HResult; stdcall;
-
 
8443
    function TransformVertices (dwVertexCount: DWORD;
-
 
8444
        const lpData: TD3DTransformData; dwFlags: DWORD;
-
 
8445
        out lpOffscreen: DWORD) : HResult; stdcall;
-
 
8446
    function LightElements (dwElementCount: DWORD;
-
 
8447
        var lpData: TD3DLightData) : HResult; stdcall;
-
 
8448
    function SetBackground (hMat: TD3DMaterialHandle) : HResult; stdcall;
-
 
8449
    function GetBackground (out hMat: TD3DMaterialHandle) : HResult; stdcall;
-
 
8450
    function SetBackgroundDepth (lpDDSurface: IDirectDrawSurface) :
-
 
8451
        HResult; stdcall;
-
 
8452
    function GetBackgroundDepth (out lplpDDSurface: IDirectDrawSurface;
-
 
8453
        out lpValid: BOOL) : HResult; stdcall;
-
 
8454
    function Clear (dwCount: DWORD; const lpRects: TD3DRect; dwFlags: DWORD) :
-
 
8455
        HResult; stdcall;
-
 
8456
    function AddLight (lpDirect3DLight: IDirect3DLight) : HResult; stdcall;
-
 
8457
    function DeleteLight (lpDirect3DLight: IDirect3DLight) : HResult; stdcall;
-
 
8458
    function NextLight (lpDirect3DLight: IDirect3DLight;
-
 
8459
        out lplpDirect3DLight: IDirect3DLight; dwFlags: DWORD) : HResult; stdcall;
5520
    // IDirect3DViewport2 methods
8460
    (*** IDirect3DViewport2 methods ***)
5521
    function GetViewport2(var lpData: TD3DViewport2): HResult; stdcall;
8461
    function GetViewport2 (out lpData: TD3DViewport2) : HResult; stdcall;
5522
    function SetViewport2(const lpData: TD3DViewport2): HResult; stdcall;
8462
    function SetViewport2 (const lpData: TD3DViewport2) : HResult; stdcall;
5523
  end;
8463
  end;
5524
 
8464
 
5525
  IDirect3DViewport3 = interface(IDirect3DViewport2)
8465
  IDirect3DViewport3 = interface (IUnknown)
5526
    ['{B0AB3B61-33D7-11D1-A981-00C04FD7B174}']
8466
    ['{b0ab3b61-33d7-11d1-a981-00c04fd7b174}']
5527
    // IDirect3DViewport3 methods
8467
    (*** IDirect3DViewport3 methods ***)
-
 
8468
    function Initialize (lpDirect3D: IDirect3D) : HResult; stdcall;
-
 
8469
    function GetViewport (out lpData: TD3DViewport) : HResult; stdcall;
-
 
8470
    function SetViewport (const lpData: TD3DViewport) : HResult; stdcall;
-
 
8471
    function TransformVertices (dwVertexCount: DWORD;
-
 
8472
        const lpData: TD3DTransformData; dwFlags: DWORD;
-
 
8473
        out lpOffscreen: DWORD) : HResult; stdcall;
-
 
8474
    function LightElements (dwElementCount: DWORD;
-
 
8475
        var lpData: TD3DLightData) : HResult; stdcall;
5528
    function SetBackgroundDepth2(lpDDS: IDirectDrawSurface4): HResult; stdcall;
8476
    function SetBackground (hMat: TD3DMaterialHandle) : HResult; stdcall;
-
 
8477
    function GetBackground (var hMat: TD3DMaterialHandle) : HResult; stdcall;
-
 
8478
    function SetBackgroundDepth (
-
 
8479
        lpDDSurface: IDirectDrawSurface) : HResult; stdcall;
-
 
8480
    function GetBackgroundDepth (out lplpDDSurface: IDirectDrawSurface;
-
 
8481
        out lpValid: BOOL) : HResult; stdcall;
-
 
8482
    function Clear (dwCount: DWORD; const lpRects: TD3DRect; dwFlags: DWORD) :
-
 
8483
        HResult; stdcall;
-
 
8484
    function AddLight (lpDirect3DLight: IDirect3DLight) : HResult; stdcall;
-
 
8485
    function DeleteLight (lpDirect3DLight: IDirect3DLight) : HResult; stdcall;
-
 
8486
    function NextLight (lpDirect3DLight: IDirect3DLight;
-
 
8487
        out lplpDirect3DLight: IDirect3DLight; dwFlags: DWORD) : HResult; stdcall;
-
 
8488
    function GetViewport2 (out lpData: TD3DViewport2) : HResult; stdcall;
-
 
8489
    function SetViewport2 (const lpData: TD3DViewport2) : HResult; stdcall;
-
 
8490
    function SetBackgroundDepth2 (
-
 
8491
        lpDDSurface: IDirectDrawSurface4) : HResult; stdcall;
5529
    function GetBackgroundDepth2(out lplpDDS: IDirectDrawSurface4; var lpValid: BOOL): HResult; stdcall;
8492
    function GetBackgroundDepth2 (out lplpDDSurface: IDirectDrawSurface4;
-
 
8493
        out lpValid: BOOL) : HResult; stdcall;
5530
    function Clear2(dwCount: DWORD; const lpRects: TD3DRect; dwFlags: DWORD;
8494
    function Clear2 (dwCount: DWORD; const lpRects: TD3DRect; dwFlags: DWORD;
5531
        dwColor: DWORD; dvZ: TD3DValue; dwStencil: DWORD): HResult; stdcall;
8495
        dwColor: DWORD; dvZ: TD3DValue; dwStencil: DWORD) : HResult; stdcall;
5532
  end;
8496
  end;
5533
 
8497
 
5534
  IDirect3DVertexBuffer = interface(IUnknown)
8498
  IDirect3DVertexBuffer = interface (IUnknown)
5535
    ['{7A503555-4A83-11D1-A5DB-00A0C90367F8}']
8499
    ['{7a503555-4a83-11d1-a5db-00a0c90367f8}']
5536
    // IDirect3DVertexBuffer methods
8500
    (*** IDirect3DVertexBuffer methods ***)
5537
    function Lock(dwFlags: DWORD; var lplpData: Pointer; var lpdwSize: DWORD): HResult; stdcall;
8501
    function Lock (dwFlags: DWORD; var lplpData: pointer; var lpdwSize: DWORD)
-
 
8502
        : HResult; stdcall;
5538
    function Unlock: HResult; stdcall;
8503
    function Unlock : HResult; stdcall;
5539
    function ProcessVertices(dwVertexOp: DWORD; dwDestIndex: DWORD; dwCount: DWORD;
8504
    function ProcessVertices (dwVertexOp, dwDestIndex, dwCount: DWORD;
5540
      lpSrcBuffer: IDirect3DVertexBuffer; dwSrcIndex: DWORD;
8505
        lpSrcBuffer: IDirect3DVertexBuffer; dwSrcIndex: DWORD;
5541
      lpD3DDevice: IDirect3DDevice3; dwFlags: DWORD): HResult; stdcall;
8506
        lpD3DDevice: IDirect3DDevice3; dwFlags: DWORD) : HResult; stdcall;
5542
    function GetVertexBufferDesc(var lpVBDesc: TD3DVertexBufferDesc): HResult; stdcall;
8507
    function GetVertexBufferDesc (var lpVBDesc: TD3DVertexBufferDesc) : HResult; stdcall;
5543
    function Optimize(lpD3DDevice: IDirect3DDevice3; dwFlags: DWORD): HResult; stdcall;
8508
    function Optimize(lpD3DDevice: IDirect3DDevice3; dwFlags: DWORD) : HResult; stdcall;
5544
  end;
8509
  end;
5545
 
8510
 
5546
  IDirect3DVertexBuffer7 = interface(IUnknown)
8511
  IDirect3DVertexBuffer7 = interface (IUnknown)
5547
    ['{F5049E7D-4861-11D2-A407-00A0C90629A8}']
8512
    ['{f5049e7d-4861-11d2-a407-00a0c90629a8}']
5548
    // IDirect3DVertexBuffer7 methods
8513
    (*** IDirect3DVertexBuffer methods ***)
5549
    function Lock(dwFlags: DWORD; var lplpData: Pointer; var lpdwSize: DWORD): HResult; stdcall;
8514
    function Lock (dwFlags: DWORD; out lplpData: Pointer; out lpdwSize: DWORD) : HResult; stdcall;
5550
    function Unlock: HResult; stdcall;
8515
    function Unlock : HResult; stdcall;
5551
    function ProcessVertices(dwVertexOp: DWORD; dwDestIndex: DWORD; dwCount: DWORD;
8516
    function ProcessVertices (dwVertexOp, dwDestIndex, dwCount: DWORD;
-
 
8517
        lpSrcBuffer: IDirect3DVertexBuffer7; dwSrcIndex: DWORD;
5552
      lpSrcBuffer: IDirect3DVertexBuffer7; dwSrcIndex: DWORD; lpD3DDevice: IDirect3DDevice7; dwFlags: DWORD): HResult; stdcall;
8518
        lpD3DDevice: IDirect3DDevice7; dwFlags: DWORD) : HResult; stdcall;
5553
    function GetVertexBufferDesc(var lpVBDesc: TD3DVertexBufferDesc): HResult; stdcall;
8519
    function GetVertexBufferDesc (out lpVBDesc: TD3DVertexBufferDesc) : HResult; stdcall;
5554
    function Optimize(lpD3DDevice: IDirect3DDevice7; dwFlags: DWORD): HResult; stdcall;
8520
    function Optimize(lpD3DDevice: IDirect3DDevice7; dwFlags: DWORD) : HResult; stdcall;
5555
    function ProcessVerticesStrided(dwVertexOp: DWORD; dwDestIndex: DWORD; dwCount: DWORD;
8521
    function ProcessVerticesStrided(dwVertexOp, dwDestIndex, dwCount: DWORD;
-
 
8522
      lpVertexArray: TD3DDrawPrimitiveStridedData; dwVertexTypeDesc: DWORD;
5556
      const lpVertexArray; dwSrcIndex: DWORD; lpD3DDevice: IDirect3DDevice7; dwFlags: DWORD): HResult; stdcall;
8523
      lpD3DDevice: IDirect3DDevice7; dwFlags: DWORD) : HResult; stdcall;
5557
  end;
8524
  end;
5558
 
8525
 
5559
const
8526
type
-
 
8527
  IID_IDirect3D = IDirect3D;
-
 
8528
  IID_IDirect3D2 = IDirect3D2;
-
 
8529
  IID_IDirect3D3 = IDirect3D3;
-
 
8530
  IID_IDirect3D7 = IDirect3D7;
-
 
8531
 
-
 
8532
  IID_IDirect3DDevice = IDirect3DDevice;
-
 
8533
  IID_IDirect3DDevice2 = IDirect3DDevice2;
-
 
8534
  IID_IDirect3DDevice3 = IDirect3DDevice3;
-
 
8535
  IID_IDirect3DDevice7 = IDirect3DDevice7;
-
 
8536
 
-
 
8537
  IID_IDirect3DTexture = IDirect3DTexture;
-
 
8538
  IID_IDirect3DTexture2 = IDirect3DTexture2;
-
 
8539
  IID_IDirect3DLight = IDirect3DLight;
-
 
8540
  IID_IDirect3DMaterial = IDirect3DMaterial;
-
 
8541
  IID_IDirect3DMaterial2 = IDirect3DMaterial2;
-
 
8542
  IID_IDirect3DMaterial3 = IDirect3DMaterial3;
-
 
8543
  IID_IDirect3DExecuteBuffer = IDirect3DExecuteBuffer;
-
 
8544
  IID_IDirect3DViewport = IDirect3DViewport;
-
 
8545
  IID_IDirect3DViewport2 = IDirect3DViewport2;
-
 
8546
  IID_IDirect3DViewport3 = IDirect3DViewport3;
-
 
8547
  IID_IDirect3DVertexBuffer = IDirect3DVertexBuffer;
-
 
8548
  IID_IDirect3DVertexBuffer7 = IDirect3DVertexBuffer7;
5560
 
8549
 
5561
{ Flags for IDirect3DDevice::NextViewport }
-
 
5562
 
8550
 
-
 
8551
const
-
 
8552
(****************************************************************************
-
 
8553
 *
-
 
8554
 * Flags for IDirect3DDevice::NextViewport
-
 
8555
 *
-
 
8556
 ****************************************************************************)
-
 
8557
 
-
 
8558
(*
-
 
8559
 * Return the next viewport
-
 
8560
 *)
5563
  D3DNEXT_NEXT = $00000001;
8561
  D3DNEXT_NEXT =        $00000001;
-
 
8562
 
-
 
8563
(*
-
 
8564
 * Return the first viewport
-
 
8565
 *)
5564
  D3DNEXT_HEAD = $00000002;
8566
  D3DNEXT_HEAD =        $00000002;
-
 
8567
 
-
 
8568
(*
-
 
8569
 * Return the last viewport
-
 
8570
 *)
5565
  D3DNEXT_TAIL = $00000004;
8571
  D3DNEXT_TAIL =        $00000004;
5566
 
8572
 
5567
{ Flags for DrawPrimitive/DrawIndexedPrimitive
-
 
5568
   Also valid for Begin/BeginIndexed }
-
 
5569
 
8573
 
-
 
8574
(****************************************************************************
-
 
8575
 *
-
 
8576
 * Flags for DrawPrimitive/DrawIndexedPrimitive
-
 
8577
 *   Also valid for Begin/BeginIndexed
-
 
8578
 *   Also valid for VertexBuffer::CreateVertexBuffer
-
 
8579
 ****************************************************************************)
-
 
8580
 
-
 
8581
(*
-
 
8582
 * Wait until the device is ready to draw the primitive
-
 
8583
 * This will cause DP to not return DDERR_WASSTILLDRAWING
-
 
8584
 *)
5570
  D3DDP_WAIT               = $00000001;
8585
  D3DDP_WAIT =                                  $00000001;
-
 
8586
 
-
 
8587
(*
-
 
8588
 * Hint that it is acceptable to render the primitive out of order.
-
 
8589
 *)
5571
  D3DDP_OUTOFORDER         = $00000002;
8590
  D3DDP_OUTOFORDER            = $00000002;
-
 
8591
 
-
 
8592
(*
-
 
8593
 * Hint that the primitives have been clipped by the application.
-
 
8594
 *)
5572
  D3DDP_DONOTCLIP          = $00000004;
8595
  D3DDP_DONOTCLIP =                             $00000004;
-
 
8596
 
-
 
8597
(*
-
 
8598
 * Hint that the extents need not be updated.
-
 
8599
 *)
5573
  D3DDP_DONOTUPDATEEXTENTS = $00000008;
8600
  D3DDP_DONOTUPDATEEXTENTS =    $00000008;
-
 
8601
 
-
 
8602
(*
-
 
8603
 * Hint that the lighting should not be applied on vertices.
-
 
8604
 *)
-
 
8605
 
5574
  D3DDP_DONOTLIGHT         = $00000010;
8606
  D3DDP_DONOTLIGHT            = $00000010;
5575
 
8607
 
-
 
8608
 
-
 
8609
(*
5576
{ Direct3D Errors }
8610
 * Direct3D Errors
-
 
8611
 * DirectDraw error codes are used when errors not specified here.
-
 
8612
 *)
-
 
8613
 
-
 
8614
const
-
 
8615
  MAKE_D3DHRESULT = HResult($88760000);
-
 
8616
 
-
 
8617
  D3D_OK                          = DD_OK;
-
 
8618
  D3DERR_BADMAJORVERSION          = MAKE_D3DHRESULT + 700;
-
 
8619
  D3DERR_BADMINORVERSION          = MAKE_D3DHRESULT + 701;
-
 
8620
 
-
 
8621
(*
-
 
8622
 * An invalid device was requested by the application.
-
 
8623
 *)
-
 
8624
  D3DERR_INVALID_DEVICE   = MAKE_D3DHRESULT + 705;
-
 
8625
  D3DERR_INITFAILED       = MAKE_D3DHRESULT + 706;
-
 
8626
 
-
 
8627
(*
-
 
8628
 * SetRenderTarget attempted on a device that was
-
 
8629
 * QI'd off the render target.
-
 
8630
 *)
-
 
8631
  D3DERR_DEVICEAGGREGATED = MAKE_D3DHRESULT + 707;
-
 
8632
 
-
 
8633
  D3DERR_EXECUTE_CREATE_FAILED    = MAKE_D3DHRESULT + 710;
-
 
8634
  D3DERR_EXECUTE_DESTROY_FAILED   = MAKE_D3DHRESULT + 711;
-
 
8635
  D3DERR_EXECUTE_LOCK_FAILED      = MAKE_D3DHRESULT + 712;
-
 
8636
  D3DERR_EXECUTE_UNLOCK_FAILED    = MAKE_D3DHRESULT + 713;
-
 
8637
  D3DERR_EXECUTE_LOCKED           = MAKE_D3DHRESULT + 714;
-
 
8638
  D3DERR_EXECUTE_NOT_LOCKED       = MAKE_D3DHRESULT + 715;
-
 
8639
 
-
 
8640
  D3DERR_EXECUTE_FAILED           = MAKE_D3DHRESULT + 716;
-
 
8641
  D3DERR_EXECUTE_CLIPPED_FAILED   = MAKE_D3DHRESULT + 717;
-
 
8642
 
-
 
8643
  D3DERR_TEXTURE_NO_SUPPORT       = MAKE_D3DHRESULT + 720;
-
 
8644
  D3DERR_TEXTURE_CREATE_FAILED    = MAKE_D3DHRESULT + 721;
-
 
8645
  D3DERR_TEXTURE_DESTROY_FAILED   = MAKE_D3DHRESULT + 722;
-
 
8646
  D3DERR_TEXTURE_LOCK_FAILED      = MAKE_D3DHRESULT + 723;
-
 
8647
  D3DERR_TEXTURE_UNLOCK_FAILED    = MAKE_D3DHRESULT + 724;
-
 
8648
  D3DERR_TEXTURE_LOAD_FAILED      = MAKE_D3DHRESULT + 725;
-
 
8649
  D3DERR_TEXTURE_SWAP_FAILED      = MAKE_D3DHRESULT + 726;
-
 
8650
  D3DERR_TEXTURE_LOCKED           = MAKE_D3DHRESULT + 727;
-
 
8651
  D3DERR_TEXTURE_NOT_LOCKED       = MAKE_D3DHRESULT + 728;
-
 
8652
  D3DERR_TEXTURE_GETSURF_FAILED   = MAKE_D3DHRESULT + 729;
-
 
8653
 
-
 
8654
  D3DERR_MATRIX_CREATE_FAILED     = MAKE_D3DHRESULT + 730;
-
 
8655
  D3DERR_MATRIX_DESTROY_FAILED    = MAKE_D3DHRESULT + 731;
-
 
8656
  D3DERR_MATRIX_SETDATA_FAILED    = MAKE_D3DHRESULT + 732;
-
 
8657
  D3DERR_MATRIX_GETDATA_FAILED    = MAKE_D3DHRESULT + 733;
-
 
8658
  D3DERR_SETVIEWPORTDATA_FAILED   = MAKE_D3DHRESULT + 734;
-
 
8659
 
-
 
8660
  D3DERR_INVALIDCURRENTVIEWPORT   = MAKE_D3DHRESULT + 735;
-
 
8661
  D3DERR_INVALIDPRIMITIVETYPE     = MAKE_D3DHRESULT + 736;
-
 
8662
  D3DERR_INVALIDVERTEXTYPE        = MAKE_D3DHRESULT + 737;
-
 
8663
  D3DERR_TEXTURE_BADSIZE          = MAKE_D3DHRESULT + 738;
-
 
8664
  D3DERR_INVALIDRAMPTEXTURE       = MAKE_D3DHRESULT + 739;
-
 
8665
 
-
 
8666
  D3DERR_MATERIAL_CREATE_FAILED   = MAKE_D3DHRESULT + 740;
-
 
8667
  D3DERR_MATERIAL_DESTROY_FAILED  = MAKE_D3DHRESULT + 741;
-
 
8668
  D3DERR_MATERIAL_SETDATA_FAILED  = MAKE_D3DHRESULT + 742;
-
 
8669
  D3DERR_MATERIAL_GETDATA_FAILED  = MAKE_D3DHRESULT + 743;
-
 
8670
 
-
 
8671
  D3DERR_INVALIDPALETTE           = MAKE_D3DHRESULT + 744;
-
 
8672
 
-
 
8673
  D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY = MAKE_D3DHRESULT + 745;
-
 
8674
  D3DERR_ZBUFF_NEEDS_VIDEOMEMORY  = MAKE_D3DHRESULT + 746;
-
 
8675
  D3DERR_SURFACENOTINVIDMEM       = MAKE_D3DHRESULT + 747;
-
 
8676
 
-
 
8677
  D3DERR_LIGHT_SET_FAILED         = MAKE_D3DHRESULT + 750;
-
 
8678
  D3DERR_LIGHTHASVIEWPORT         = MAKE_D3DHRESULT + 751;
-
 
8679
  D3DERR_LIGHTNOTINTHISVIEWPORT   = MAKE_D3DHRESULT + 752;
-
 
8680
 
-
 
8681
  D3DERR_SCENE_IN_SCENE           = MAKE_D3DHRESULT + 760;
-
 
8682
  D3DERR_SCENE_NOT_IN_SCENE       = MAKE_D3DHRESULT + 761;
-
 
8683
  D3DERR_SCENE_BEGIN_FAILED       = MAKE_D3DHRESULT + 762;
-
 
8684
  D3DERR_SCENE_END_FAILED         = MAKE_D3DHRESULT + 763;
-
 
8685
 
-
 
8686
  D3DERR_INBEGIN                  = MAKE_D3DHRESULT + 770;
-
 
8687
  D3DERR_NOTINBEGIN               = MAKE_D3DHRESULT + 771;
-
 
8688
  D3DERR_NOVIEWPORTS              = MAKE_D3DHRESULT + 772;
-
 
8689
  D3DERR_VIEWPORTDATANOTSET       = MAKE_D3DHRESULT + 773;
-
 
8690
  D3DERR_VIEWPORTHASNODEVICE      = MAKE_D3DHRESULT + 774;
-
 
8691
  D3DERR_NOCURRENTVIEWPORT        = MAKE_D3DHRESULT + 775;
-
 
8692
 
-
 
8693
  D3DERR_INVALIDVERTEXFORMAT      = MAKE_D3DHRESULT + 2048;
-
 
8694
 
-
 
8695
(*
-
 
8696
 * Attempted to CreateTexture on a surface that had a color key
-
 
8697
 *)
-
 
8698
  D3DERR_COLORKEYATTACHED                 = MAKE_D3DHRESULT + 2050;
-
 
8699
 
-
 
8700
  D3DERR_VERTEXBUFFEROPTIMIZED            = MAKE_D3DHRESULT + 2060;
-
 
8701
  D3DERR_VBUF_CREATE_FAILED               = MAKE_D3DHRESULT + 2061;
-
 
8702
  D3DERR_VERTEXBUFFERLOCKED               = MAKE_D3DHRESULT + 2062;
-
 
8703
 
-
 
8704
  D3DERR_ZBUFFER_NOTPRESENT               = MAKE_D3DHRESULT + 2070;
-
 
8705
  D3DERR_STENCILBUFFER_NOTPRESENT         = MAKE_D3DHRESULT + 2071;
-
 
8706
 
-
 
8707
  D3DERR_WRONGTEXTUREFORMAT               = MAKE_D3DHRESULT + 2072;
-
 
8708
  D3DERR_UNSUPPORTEDCOLOROPERATION        = MAKE_D3DHRESULT + 2073;
-
 
8709
  D3DERR_UNSUPPORTEDCOLORARG              = MAKE_D3DHRESULT + 2074;
-
 
8710
  D3DERR_UNSUPPORTEDALPHAOPERATION        = MAKE_D3DHRESULT + 2075;
-
 
8711
  D3DERR_UNSUPPORTEDALPHAARG              = MAKE_D3DHRESULT + 2076;
-
 
8712
  D3DERR_TOOMANYOPERATIONS                = MAKE_D3DHRESULT + 2077;
-
 
8713
  D3DERR_CONFLICTINGTEXTUREFILTER         = MAKE_D3DHRESULT + 2078;
-
 
8714
  D3DERR_UNSUPPORTEDFACTORVALUE           = MAKE_D3DHRESULT + 2079;
-
 
8715
  D3DERR_CONFLICTINGRENDERSTATE           = MAKE_D3DHRESULT + 2081;
-
 
8716
  D3DERR_UNSUPPORTEDTEXTUREFILTER         = MAKE_D3DHRESULT + 2082;
-
 
8717
  D3DERR_TOOMANYPRIMITIVES                = MAKE_D3DHRESULT + 2083;
-
 
8718
  D3DERR_INVALIDMATRIX                    = MAKE_D3DHRESULT + 2084;
-
 
8719
  D3DERR_TOOMANYVERTICES                  = MAKE_D3DHRESULT + 2085;
-
 
8720
  D3DERR_CONFLICTINGTEXTUREPALETTE        = MAKE_D3DHRESULT + 2086;
-
 
8721
 
-
 
8722
  D3DERR_INVALIDSTATEBLOCK        = MAKE_D3DHRESULT + 2100;
-
 
8723
  D3DERR_INBEGINSTATEBLOCK        = MAKE_D3DHRESULT + 2101;
-
 
8724
  D3DERR_NOTINBEGINSTATEBLOCK     = MAKE_D3DHRESULT + 2102;
-
 
8725
 
-
 
8726
procedure DisableFPUExceptions;
-
 
8727
procedure EnableFPUExceptions;
-
 
8728
 
-
 
8729
(***************************************************************************
-
 
8730
 *
-
 
8731
 *  Copyright (C) 1998-1999 Microsoft Corporation.  All Rights Reserved.
-
 
8732
 *
-
 
8733
 *  File:       dxfile.h
-
 
8734
 *
-
 
8735
 *  Content:    DirectX File public header file
-
 
8736
 *
-
 
8737
 ***************************************************************************)
-
 
8738
 
-
 
8739
var
-
 
8740
  DXFileDLL : HMODULE;
-
 
8741
 
-
 
8742
function DXFileErrorString(Value: HResult) : string;
-
 
8743
 
-
 
8744
type
-
 
8745
  TDXFileFormat = (
-
 
8746
    DXFILEFORMAT_BINARY,
-
 
8747
    DXFILEFORMAT_TEXT,
-
 
8748
    DXFILEFORMAT_COMPRESSED
-
 
8749
  );
-
 
8750
 
-
 
8751
  TDXFileLoadOptions = (
-
 
8752
    DXFILELOAD_FROMFILE,
-
 
8753
    DXFILELOAD_FROMRESOURCE,
-
 
8754
    DXFILELOAD_FROMMEMORY,
-
 
8755
    DXFILELOAD_INVALID_3,
-
 
8756
    DXFILELOAD_FROMSTREAM,
-
 
8757
    DXFILELOAD_INVALID_5,
-
 
8758
    DXFILELOAD_INVALID_6,
-
 
8759
    DXFILELOAD_INVALID_7,
-
 
8760
    DXFILELOAD_FROMURL
-
 
8761
  );
-
 
8762
 
-
 
8763
  PDXFileLoadResource = ^TDXFileLoadResource;
-
 
8764
  TDXFileLoadResource = packed record
-
 
8765
    hModule: HModule;
-
 
8766
    lpName: PAnsiChar;
-
 
8767
    lpType: PAnsiChar;
-
 
8768
  end;
-
 
8769
 
-
 
8770
  PDXFileLoadMemory = ^TDXFileLoadMemory;
-
 
8771
  TDXFileLoadMemory = packed record
-
 
8772
    lpMemory: Pointer;
-
 
8773
    dSize: DWORD;
-
 
8774
  end;
-
 
8775
 
-
 
8776
(*
-
 
8777
 * DirectX File object types.
-
 
8778
 *)
-
 
8779
 
-
 
8780
  IDirectXFile = interface;
-
 
8781
  IDirectXFileEnumObject = interface;
-
 
8782
  IDirectXFileSaveObject = interface;
-
 
8783
  IDirectXFileObject = interface;
-
 
8784
  IDirectXFileData = interface;
-
 
8785
  IDirectXFileDataReference = interface;
-
 
8786
  IDirectXFileBinary = interface;
-
 
8787
 
-
 
8788
(*
-
 
8789
 * DirectX File interfaces.
-
 
8790
 *)
-
 
8791
 
-
 
8792
  IDirectXFile = interface (IUnknown)
-
 
8793
    ['{3d82ab40-62da-11cf-ab39-0020af71e433}']
-
 
8794
    function CreateEnumObject (pvSource: Pointer;
-
 
8795
        dwLoadOptions: TDXFileLoadOptions;
-
 
8796
        var ppEnumObj: IDirectXFileEnumObject) : HResult; stdcall;
-
 
8797
    function CreateSaveObject (szFileName: PChar; dwFileFormat: TDXFileFormat;
-
 
8798
        var ppSaveObj: IDirectXFileSaveObject) : HResult; stdcall;
-
 
8799
    function RegisterTemplates (pvData: Pointer; cbSize: DWORD) : HResult; stdcall;
-
 
8800
  end;
-
 
8801
 
-
 
8802
  IDirectXFileEnumObject = interface (IUnknown)
-
 
8803
    ['{3d82ab41-62da-11cf-ab39-0020af71e433}']
-
 
8804
    function GetNextDataObject (var ppDataObj: IDirectXFileData) : HResult; stdcall;
-
 
8805
    function GetDataObjectById
-
 
8806
        (const rguid: TGUID; var ppDataObj: IDirectXFileData) : HResult; stdcall;
-
 
8807
    function GetDataObjectByName
-
 
8808
        (szName: PChar; var ppDataObj: IDirectXFileData) : HResult; stdcall;
-
 
8809
  end;
-
 
8810
 
-
 
8811
  IDirectXFileSaveObject = interface (IUnknown)
-
 
8812
    ['{3d82ab42-62da-11cf-ab39-0020af71e433}']
-
 
8813
    function SaveTemplates
-
 
8814
        (cTemplates: DWORD; var ppguidTemplates: PGUID) : HResult; stdcall;
-
 
8815
    function CreateDataObject (const rguidTemplate: TGUID; szName: PChar;
-
 
8816
        pguid: PGUID; cbSize: DWORD; pvData: Pointer;
-
 
8817
        var ppDataObj: IDirectXFileData) : HResult; stdcall;
-
 
8818
    function SaveData (pDataObj: IDirectXFileData) : HResult; stdcall;
-
 
8819
  end;
-
 
8820
 
-
 
8821
  IDirectXFileObject = interface (IUnknown)
-
 
8822
    ['{3d82ab43-62da-11cf-ab39-0020af71e433}']
-
 
8823
    function GetName (pstrNameBuf: PChar; var dwBufLen: DWORD) : HResult; stdcall;
-
 
8824
    function GetId (var pGuidBuf: TGUID) : HResult; stdcall;
-
 
8825
  end;
-
 
8826
 
-
 
8827
  IDirectXFileData = interface (IDirectXFileObject)
-
 
8828
    ['{3d82ab44-62da-11cf-ab39-0020af71e433}']
-
 
8829
    function GetData
-
 
8830
        (szMember: PChar; var pcbSize: DWORD; var ppvData: Pointer) : HResult; stdcall;
-
 
8831
    function GetType (var ppguid: PGUID) : HResult; stdcall;
-
 
8832
    function GetNextObject (var ppChildObj: IDirectXFileObject) : HResult; stdcall;
-
 
8833
    function AddDataObject (pDataObj: IDirectXFileData) : HResult; stdcall;
-
 
8834
    function AddDataReference (szRef: PChar; pguidRef: PGUID) : HResult; stdcall;
-
 
8835
    function AddBinaryObject (szName: PChar; pguid: PGUID; szMimeType: PChar;
-
 
8836
        pvData: Pointer; cbSize: DWORD) : HResult; stdcall;
-
 
8837
  end;
-
 
8838
 
-
 
8839
  IDirectXFileDataReference = interface (IDirectXFileObject)
-
 
8840
    ['{3d82ab45-62da-11cf-ab39-0020af71e433}']
-
 
8841
    function Resolve (var ppDataObj: IDirectXFileData) : HResult; stdcall;
-
 
8842
  end;
-
 
8843
 
-
 
8844
  IDirectXFileBinary = interface (IDirectXFileObject)
-
 
8845
    ['{3d82ab46-62da-11cf-ab39-0020af71e433}']
-
 
8846
    function GetSize (var pcbSize: DWORD) : HResult; stdcall;
-
 
8847
    function GetMimeType (var pszMimeType: PChar) : HResult; stdcall;
-
 
8848
    function Read(pvData: Pointer; cbSize: DWORD; pcbRead: PDWORD{?}) : HResult; stdcall;
-
 
8849
  end;
-
 
8850
 
-
 
8851
const
-
 
8852
 
-
 
8853
(*
-
 
8854
 * DirectXFile Object Class Id (for CoCreateInstance())
-
 
8855
 *)
-
 
8856
 
-
 
8857
   CLSID_CDirectXFile: TGUID =
-
 
8858
       (D1:$4516ec43;D2:$8f20;D3:$11d0;D4:($9b,$6d,$00,$00,$c0,$78,$1b,$c3));
-
 
8859
 
-
 
8860
(*
-
 
8861
 * DirectX File Interface GUIDs.
-
 
8862
 *)
-
 
8863
 
-
 
8864
type
-
 
8865
  IID_IDirectXFile = IDirectXFile;
-
 
8866
  IID_IDirectXFileEnumObject = IDirectXFileEnumObject;
-
 
8867
  IID_IDirectXFileSaveObject = IDirectXFileSaveObject;
-
 
8868
  IID_IDirectXFileObject = IDirectXFileObject;
-
 
8869
  IID_IDirectXFileData = IDirectXFileData;
-
 
8870
  IID_IDirectXFileDataReference = IDirectXFileDataReference;
-
 
8871
  IID_IDirectXFileBinary = IDirectXFileBinary;
-
 
8872
 
-
 
8873
(*
-
 
8874
 * DirectX File Header template's GUID.
-
 
8875
 *)
-
 
8876
const
-
 
8877
  TID_DXFILEHeader: TGUID =
-
 
8878
      (D1:$3d82ab43;D2:$62da;D3:$11cf;D4:($ab,$39,$00,$20,$af,$71,$e4,$33));
-
 
8879
 
-
 
8880
(*
-
 
8881
 * DirectX File errors.
-
 
8882
 *)
5577
 
8883
 
5578
const
8884
const
5579
  D3D_OK                  = HResult(DD_OK);
8885
  DXFILE_OK = 0;
5580
  D3DERR_BADMAJORVERSION  = HResult($88760000 + 700);
8886
 
5581
  D3DERR_BADMINORVERSION  = HResult($88760000 + 701);
8887
  DXFILEERR_BADOBJECT                 = MAKE_D3DHRESULT or 850;
5582
 
8888
  DXFILEERR_BADVALUE                  = MAKE_D3DHRESULT or 851;
5583
{ An invalid device was requested by the application. }
8889
  DXFILEERR_BADTYPE                   = MAKE_D3DHRESULT or 852;
5584
 
8890
  DXFILEERR_BADSTREAMHANDLE           = MAKE_D3DHRESULT or 853;
5585
  D3DERR_INVALID_DEVICE   = HResult($88760000 + 705);
8891
  DXFILEERR_BADALLOC                  = MAKE_D3DHRESULT or 854;
5586
  D3DERR_INITFAILED       = HResult($88760000 + 706);
8892
  DXFILEERR_NOTFOUND                  = MAKE_D3DHRESULT or 855;
5587
 
8893
  DXFILEERR_NOTDONEYET                = MAKE_D3DHRESULT or 856;
5588
{ SetRenderTarget attempted on a device that was
8894
  DXFILEERR_FILENOTFOUND              = MAKE_D3DHRESULT or 857;
5589
  QI'd off the render target. }
8895
  DXFILEERR_RESOURCENOTFOUND          = MAKE_D3DHRESULT or 858;
5590
 
8896
  DXFILEERR_URLNOTFOUND               = MAKE_D3DHRESULT or 859;
5591
  D3DERR_DEVICEAGGREGATED          = HResult($88760000 + 707);
8897
  DXFILEERR_BADRESOURCE               = MAKE_D3DHRESULT or 860;
5592
 
8898
  DXFILEERR_BADFILETYPE               = MAKE_D3DHRESULT or 861;
5593
  D3DERR_EXECUTE_CREATE_FAILED     = HResult($88760000 + 710);
8899
  DXFILEERR_BADFILEVERSION            = MAKE_D3DHRESULT or 862;
5594
  D3DERR_EXECUTE_DESTROY_FAILED    = HResult($88760000 + 711);
8900
  DXFILEERR_BADFILEFLOATSIZE          = MAKE_D3DHRESULT or 863;
5595
  D3DERR_EXECUTE_LOCK_FAILED       = HResult($88760000 + 712);
8901
  DXFILEERR_BADFILECOMPRESSIONTYPE    = MAKE_D3DHRESULT or 864;
5596
  D3DERR_EXECUTE_UNLOCK_FAILED     = HResult($88760000 + 713);
8902
  DXFILEERR_BADFILE                   = MAKE_D3DHRESULT or 865;
5597
  D3DERR_EXECUTE_LOCKED            = HResult($88760000 + 714);
8903
  DXFILEERR_PARSEERROR                = MAKE_D3DHRESULT or 866;
5598
  D3DERR_EXECUTE_NOT_LOCKED        = HResult($88760000 + 715);
8904
  DXFILEERR_NOTEMPLATE                = MAKE_D3DHRESULT or 867;
5599
 
8905
  DXFILEERR_BADARRAYSIZE              = MAKE_D3DHRESULT or 868;
5600
  D3DERR_EXECUTE_FAILED            = HResult($88760000 + 716);
8906
  DXFILEERR_BADDATAREFERENCE          = MAKE_D3DHRESULT or 869;
5601
  D3DERR_EXECUTE_CLIPPED_FAILED    = HResult($88760000 + 717);
8907
  DXFILEERR_INTERNALERROR             = MAKE_D3DHRESULT or 870;
5602
 
8908
  DXFILEERR_NOMOREOBJECTS             = MAKE_D3DHRESULT or 871;
5603
  D3DERR_TEXTURE_NO_SUPPORT        = HResult($88760000 + 720);
8909
  DXFILEERR_BADINTRINSICS             = MAKE_D3DHRESULT or 872;
5604
  D3DERR_TEXTURE_CREATE_FAILED     = HResult($88760000 + 721);
8910
  DXFILEERR_NOMORESTREAMHANDLES       = MAKE_D3DHRESULT or 873;
5605
  D3DERR_TEXTURE_DESTROY_FAILED    = HResult($88760000 + 722);
8911
  DXFILEERR_NOMOREDATA                = MAKE_D3DHRESULT or 874;
5606
  D3DERR_TEXTURE_LOCK_FAILED       = HResult($88760000 + 723);
8912
  DXFILEERR_BADCACHEFILE              = MAKE_D3DHRESULT or 875;
5607
  D3DERR_TEXTURE_UNLOCK_FAILED     = HResult($88760000 + 724);
8913
  DXFILEERR_NOINTERNET                = MAKE_D3DHRESULT or 876;
5608
  D3DERR_TEXTURE_LOAD_FAILED       = HResult($88760000 + 725);
8914
 
5609
  D3DERR_TEXTURE_SWAP_FAILED       = HResult($88760000 + 726);
8915
{$IFDEF D3DRM}
5610
  D3DERR_TEXTURE_LOCKED            = HResult($88760000 + 727);
8916
(*
5611
  D3DERR_TEXTURE_NOT_LOCKED        = HResult($88760000 + 728);
8917
 * API for creating IDirectXFile interface.
5612
  D3DERR_TEXTURE_GETSURF_FAILED    = HResult($88760000 + 729);
8918
 *)
5613
 
8919
 
5614
  D3DERR_MATRIX_CREATE_FAILED      = HResult($88760000 + 730);
8920
var
5615
  D3DERR_MATRIX_DESTROY_FAILED     = HResult($88760000 + 731);
8921
  DirectXFileCreate : function
5616
  D3DERR_MATRIX_SETDATA_FAILED     = HResult($88760000 + 732);
8922
    (out lplpDirectXFile: IDirectXFile) : HResult; stdcall;
5617
  D3DERR_MATRIX_GETDATA_FAILED     = HResult($88760000 + 733);
8923
 
5618
  D3DERR_SETVIEWPORTDATA_FAILED    = HResult($88760000 + 734);
8924
(* D3DRM XFile templates in binary form *)
5619
 
8925
const
5620
  D3DERR_INVALIDCURRENTVIEWPORT    = HResult($88760000 + 735);
8926
  D3DRM_XTEMPLATE_BYTES = 3215;
5621
  D3DERR_INVALIDPRIMITIVETYPE      = HResult($88760000 + 736);
8927
  D3DRM_XTEMPLATES: array [0..D3DRM_XTEMPLATE_BYTES-1] of byte = (
5622
  D3DERR_INVALIDVERTEXTYPE         = HResult($88760000 + 737);
8928
        $78, $6f, $66, $20, $30, $33, $30, $32, $62,
5623
  D3DERR_TEXTURE_BADSIZE           = HResult($88760000 + 738);
8929
        $69, $6e, $20, $30, $30, $36, $34, $1f, 0, $1,
5624
  D3DERR_INVALIDRAMPTEXTURE        = HResult($88760000 + 739);
8930
        0, $6, 0, 0, 0, $48, $65, $61, $64, $65,
5625
 
8931
        $72, $a, 0, $5, 0, $43, $ab, $82, $3d, $da,
5626
  D3DERR_MATERIAL_CREATE_FAILED    = HResult($88760000 + 740);
8932
        $62, $cf, $11, $ab, $39, 0, $20, $af, $71, $e4,
5627
  D3DERR_MATERIAL_DESTROY_FAILED   = HResult($88760000 + 741);
8933
        $33, $28, 0, $1, 0, $5, 0, 0, 0, $6d,
5628
  D3DERR_MATERIAL_SETDATA_FAILED   = HResult($88760000 + 742);
8934
        $61, $6a, $6f, $72, $14, 0, $28, 0, $1, 0,
5629
  D3DERR_MATERIAL_GETDATA_FAILED   = HResult($88760000 + 743);
8935
        $5, 0, 0, 0, $6d, $69, $6e, $6f, $72, $14,
5630
 
8936
        0, $29, 0, $1, 0, $5, 0, 0, 0, $66,
5631
  D3DERR_INVALIDPALETTE            = HResult($88760000 + 744);
8937
        $6c, $61, $67, $73, $14, 0, $b, 0, $1f, 0,
5632
 
8938
        $1, 0, $6, 0, 0, 0, $56, $65, $63, $74,
5633
  D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY  = HResult($88760000 + 745);
8939
        $6f, $72, $a, 0, $5, 0, $5e, $ab, $82, $3d,
5634
  D3DERR_ZBUFF_NEEDS_VIDEOMEMORY   = HResult($88760000 + 746);
8940
        $da, $62, $cf, $11, $ab, $39, 0, $20, $af, $71,
5635
  D3DERR_SURFACENOTINVIDMEM        = HResult($88760000 + 747);
8941
        $e4, $33, $2a, 0, $1, 0, $1, 0, 0, 0,
5636
 
8942
        $78, $14, 0, $2a, 0, $1, 0, $1, 0, 0,
5637
  D3DERR_LIGHT_SET_FAILED          = HResult($88760000 + 750);
8943
        0, $79, $14, 0, $2a, 0, $1, 0, $1, 0,
5638
  D3DERR_LIGHTHASVIEWPORT          = HResult($88760000 + 751);
8944
        0, 0, $7a, $14, 0, $b, 0, $1f, 0, $1,
5639
  D3DERR_LIGHTNOTINTHISVIEWPORT    = HResult($88760000 + 752);
8945
        0, $8, 0, 0, 0, $43, $6f, $6f, $72, $64,
5640
 
8946
        $73, $32, $64, $a, 0, $5, 0, $44, $3f, $f2,
5641
  D3DERR_SCENE_IN_SCENE            = HResult($88760000 + 760);
8947
        $f6, $86, $76, $cf, $11, $8f, $52, 0, $40, $33,
5642
  D3DERR_SCENE_NOT_IN_SCENE        = HResult($88760000 + 761);
8948
        $35, $94, $a3, $2a, 0, $1, 0, $1, 0, 0,
5643
  D3DERR_SCENE_BEGIN_FAILED        = HResult($88760000 + 762);
8949
        0, $75, $14, 0, $2a, 0, $1, 0, $1, 0,
5644
  D3DERR_SCENE_END_FAILED          = HResult($88760000 + 763);
8950
        0, 0, $76, $14, 0, $b, 0, $1f, 0, $1,
5645
 
8951
        0, $9, 0, 0, 0, $4d, $61, $74, $72, $69,
5646
  D3DERR_INBEGIN                   = HResult($88760000 + 770);
8952
        $78, $34, $78, $34, $a, 0, $5, 0, $45, $3f,
5647
  D3DERR_NOTINBEGIN                = HResult($88760000 + 771);
8953
        $f2, $f6, $86, $76, $cf, $11, $8f, $52, 0, $40,
5648
  D3DERR_NOVIEWPORTS               = HResult($88760000 + 772);
8954
        $33, $35, $94, $a3, $34, 0, $2a, 0, $1, 0,
5649
  D3DERR_VIEWPORTDATANOTSET        = HResult($88760000 + 773);
8955
        $6, 0, 0, 0, $6d, $61, $74, $72, $69, $78,
5650
  D3DERR_VIEWPORTHASNODEVICE       = HResult($88760000 + 774);
8956
        $e, 0, $3, 0, $10, 0, 0, 0, $f, 0,
5651
  D3DERR_NOCURRENTVIEWPORT         = HResult($88760000 + 775);
8957
        $14, 0, $b, 0, $1f, 0, $1, 0, $9, 0,
5652
 
8958
        0, 0, $43, $6f, $6c, $6f, $72, $52, $47, $42,
5653
  D3DERR_INVALIDVERTEXFORMAT       = HResult($88760000 + 2048);
8959
        $41, $a, 0, $5, 0, $e0, $44, $ff, $35, $7c,
5654
 
8960
        $6c, $cf, $11, $8f, $52, 0, $40, $33, $35, $94,
5655
  D3DERR_COLORKEYATTACHED          = HResult($88760000 + 2050);
8961
        $a3, $2a, 0, $1, 0, $3, 0, 0, 0, $72,
5656
 
8962
        $65, $64, $14, 0, $2a, 0, $1, 0, $5, 0,
5657
  D3DERR_VERTEXBUFFEROPTIMIZED     = HResult($88760000 + 2060);
8963
        0, 0, $67, $72, $65, $65, $6e, $14, 0, $2a,
5658
  D3DERR_VBUF_CREATE_FAILED        = HResult($88760000 + 2061);
8964
        0, $1, 0, $4, 0, 0, 0, $62, $6c, $75,
5659
  D3DERR_VERTEXBUFFERLOCKED        = HResult($88760000 + 2062);
8965
        $65, $14, 0, $2a, 0, $1, 0, $5, 0, 0,
5660
  D3DERR_VERTEXBUFFERUNLOCKFAILED  = HResult($88760000 + 2063);
8966
        0, $61, $6c, $70, $68, $61, $14, 0, $b, 0,
5661
 
8967
        $1f, 0, $1, 0, $8, 0, 0, 0, $43, $6f,
5662
  D3DERR_ZBUFFER_NOTPRESENT        = HResult($88760000 + 2070);
8968
        $6c, $6f, $72, $52, $47, $42, $a, 0, $5, 0,
5663
  D3DERR_STENCILBUFFER_NOTPRESENT  = HResult($88760000 + 2071);
8969
        $81, $6e, $e1, $d3, $35, $78, $cf, $11, $8f, $52,
5664
 
8970
        0, $40, $33, $35, $94, $a3, $2a, 0, $1, 0,
5665
  D3DERR_WRONGTEXTUREFORMAT        = HResult($88760000 + 2072);
8971
        $3, 0, 0, 0, $72, $65, $64, $14, 0, $2a,
5666
  D3DERR_UNSUPPORTEDCOLOROPERATION = HResult($88760000 + 2073);
8972
        0, $1, 0, $5, 0, 0, 0, $67, $72, $65,
5667
  D3DERR_UNSUPPORTEDCOLORARG       = HResult($88760000 + 2074);
8973
        $65, $6e, $14, 0, $2a, 0, $1, 0, $4, 0,
5668
  D3DERR_UNSUPPORTEDALPHAOPERATION = HResult($88760000 + 2075);
8974
        0, 0, $62, $6c, $75, $65, $14, 0, $b, 0,
5669
  D3DERR_UNSUPPORTEDALPHAARG       = HResult($88760000 + 2076);
8975
        $1f, 0, $1, 0, $c, 0, 0, 0, $49, $6e,
5670
  D3DERR_TOOMANYOPERATIONS         = HResult($88760000 + 2077);
8976
        $64, $65, $78, $65, $64, $43, $6f, $6c, $6f, $72,
5671
  D3DERR_CONFLICTINGTEXTUREFILTER  = HResult($88760000 + 2078);
8977
        $a, 0, $5, 0, $20, $b8, $30, $16, $42, $78,
5672
  D3DERR_UNSUPPORTEDFACTORVALUE    = HResult($88760000 + 2079);
8978
        $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3,
5673
  D3DERR_CONFLICTINGRENDERSTATE    = HResult($88760000 + 2081);
8979
        $29, 0, $1, 0, $5, 0, 0, 0, $69, $6e,
5674
  D3DERR_UNSUPPORTEDTEXTUREFILTER  = HResult($88760000 + 2082);
8980
        $64, $65, $78, $14, 0, $1, 0, $9, 0, 0,
5675
  D3DERR_TOOMANYPRIMITIVES         = HResult($88760000 + 2083);
8981
        0, $43, $6f, $6c, $6f, $72, $52, $47, $42, $41,
5676
  D3DERR_INVALIDMATRIX             = HResult($88760000 + 2084);
8982
        $1, 0, $a, 0, 0, 0, $69, $6e, $64, $65,
5677
  D3DERR_TOOMANYVERTICES           = HResult($88760000 + 2085);
8983
        $78, $43, $6f, $6c, $6f, $72, $14, 0, $b, 0,
5678
  D3DERR_CONFLICTINGTEXTUREPALETTE = HResult($88760000 + 2086);
8984
        $1f, 0, $1, 0, $7, 0, 0, 0, $42, $6f,
5679
 
8985
        $6f, $6c, $65, $61, $6e, $a, 0, $5, 0, $a0,
5680
  D3DERR_INVALIDSTATEBLOCK         = HResult($88760000 + 2100);
8986
        $a6, $7d, $53, $37, $ca, $d0, $11, $94, $1c, 0,
5681
  D3DERR_INBEGINSTATEBLOCK         = HResult($88760000 + 2101);
8987
        $80, $c8, $c, $fa, $7b, $29, 0, $1, 0, $9,
5682
  D3DERR_NOTINBEGINSTATEBLOCK      = HResult($88760000 + 2102);
8988
        0, 0, 0, $74, $72, $75, $65, $66, $61, $6c,
-
 
8989
        $73, $65, $14, 0, $b, 0, $1f, 0, $1, 0,
-
 
8990
        $9, 0, 0, 0, $42, $6f, $6f, $6c, $65, $61,
-
 
8991
        $6e, $32, $64, $a, 0, $5, 0, $63, $ae, $85,
-
 
8992
        $48, $e8, $78, $cf, $11, $8f, $52, 0, $40, $33,
-
 
8993
        $35, $94, $a3, $1, 0, $7, 0, 0, 0, $42,
-
 
8994
        $6f, $6f, $6c, $65, $61, $6e, $1, 0, $1, 0,
-
 
8995
        0, 0, $75, $14, 0, $1, 0, $7, 0, 0,
-
 
8996
        0, $42, $6f, $6f, $6c, $65, $61, $6e, $1, 0,
-
 
8997
        $1, 0, 0, 0, $76, $14, 0, $b, 0, $1f,
-
 
8998
        0, $1, 0, $c, 0, 0, 0, $4d, $61, $74,
-
 
8999
        $65, $72, $69, $61, $6c, $57, $72, $61, $70, $a,
-
 
9000
        0, $5, 0, $60, $ae, $85, $48, $e8, $78, $cf,
-
 
9001
        $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $1,
-
 
9002
        0, $7, 0, 0, 0, $42, $6f, $6f, $6c, $65,
-
 
9003
        $61, $6e, $1, 0, $1, 0, 0, 0, $75, $14,
-
 
9004
        0, $1, 0, $7, 0, 0, 0, $42, $6f, $6f,
-
 
9005
        $6c, $65, $61, $6e, $1, 0, $1, 0, 0, 0,
-
 
9006
        $76, $14, 0, $b, 0, $1f, 0, $1, 0, $f,
-
 
9007
        0, 0, 0, $54, $65, $78, $74, $75, $72, $65,
-
 
9008
        $46, $69, $6c, $65, $6e, $61, $6d, $65, $a, 0,
-
 
9009
        $5, 0, $e1, $90, $27, $a4, $10, $78, $cf, $11,
-
 
9010
        $8f, $52, 0, $40, $33, $35, $94, $a3, $31, 0,
-
 
9011
        $1, 0, $8, 0, 0, 0, $66, $69, $6c, $65,
-
 
9012
        $6e, $61, $6d, $65, $14, 0, $b, 0, $1f, 0,
-
 
9013
        $1, 0, $8, 0, 0, 0, $4d, $61, $74, $65,
-
 
9014
        $72, $69, $61, $6c, $a, 0, $5, 0, $4d, $ab,
-
 
9015
        $82, $3d, $da, $62, $cf, $11, $ab, $39, 0, $20,
-
 
9016
        $af, $71, $e4, $33, $1, 0, $9, 0, 0, 0,
-
 
9017
        $43, $6f, $6c, $6f, $72, $52, $47, $42, $41, $1,
-
 
9018
        0, $9, 0, 0, 0, $66, $61, $63, $65, $43,
-
 
9019
        $6f, $6c, $6f, $72, $14, 0, $2a, 0, $1, 0,
-
 
9020
        $5, 0, 0, 0, $70, $6f, $77, $65, $72, $14,
-
 
9021
        0, $1, 0, $8, 0, 0, 0, $43, $6f, $6c,
-
 
9022
        $6f, $72, $52, $47, $42, $1, 0, $d, 0, 0,
-
 
9023
        0, $73, $70, $65, $63, $75, $6c, $61, $72, $43,
-
 
9024
        $6f, $6c, $6f, $72, $14, 0, $1, 0, $8, 0,
-
 
9025
        0, 0, $43, $6f, $6c, $6f, $72, $52, $47, $42,
-
 
9026
        $1, 0, $d, 0, 0, 0, $65, $6d, $69, $73,
-
 
9027
        $73, $69, $76, $65, $43, $6f, $6c, $6f, $72, $14,
-
 
9028
        0, $e, 0, $12, 0, $12, 0, $12, 0, $f,
-
 
9029
        0, $b, 0, $1f, 0, $1, 0, $8, 0, 0,
-
 
9030
        0, $4d, $65, $73, $68, $46, $61, $63, $65, $a,
-
 
9031
        0, $5, 0, $5f, $ab, $82, $3d, $da, $62, $cf,
-
 
9032
        $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $29,
-
 
9033
        0, $1, 0, $12, 0, 0, 0, $6e, $46, $61,
-
 
9034
        $63, $65, $56, $65, $72, $74, $65, $78, $49, $6e,
-
 
9035
        $64, $69, $63, $65, $73, $14, 0, $34, 0, $29,
-
 
9036
        0, $1, 0, $11, 0, 0, 0, $66, $61, $63,
-
 
9037
        $65, $56, $65, $72, $74, $65, $78, $49, $6e, $64,
-
 
9038
        $69, $63, $65, $73, $e, 0, $1, 0, $12, 0,
-
 
9039
        0, 0, $6e, $46, $61, $63, $65, $56, $65, $72,
-
 
9040
        $74, $65, $78, $49, $6e, $64, $69, $63, $65, $73,
-
 
9041
        $f, 0, $14, 0, $b, 0, $1f, 0, $1, 0,
-
 
9042
        $d, 0, 0, 0, $4d, $65, $73, $68, $46, $61,
-
 
9043
        $63, $65, $57, $72, $61, $70, $73, $a, 0, $5,
-
 
9044
        0, $c0, $c5, $1e, $ed, $a8, $c0, $d0, $11, $94,
-
 
9045
        $1c, 0, $80, $c8, $c, $fa, $7b, $29, 0, $1,
-
 
9046
        0, $f, 0, 0, 0, $6e, $46, $61, $63, $65,
-
 
9047
        $57, $72, $61, $70, $56, $61, $6c, $75, $65, $73,
-
 
9048
        $14, 0, $34, 0, $1, 0, $9, 0, 0, 0,
-
 
9049
        $42, $6f, $6f, $6c, $65, $61, $6e, $32, $64, $1,
-
 
9050
        0, $e, 0, 0, 0, $66, $61, $63, $65, $57,
-
 
9051
        $72, $61, $70, $56, $61, $6c, $75, $65, $73, $e,
-
 
9052
        0, $1, 0, $f, 0, 0, 0, $6e, $46, $61,
-
 
9053
        $63, $65, $57, $72, $61, $70, $56, $61, $6c, $75,
-
 
9054
        $65, $73, $f, 0, $14, 0, $b, 0, $1f, 0,
-
 
9055
        $1, 0, $11, 0, 0, 0, $4d, $65, $73, $68,
-
 
9056
        $54, $65, $78, $74, $75, $72, $65, $43, $6f, $6f,
-
 
9057
        $72, $64, $73, $a, 0, $5, 0, $40, $3f, $f2,
-
 
9058
        $f6, $86, $76, $cf, $11, $8f, $52, 0, $40, $33,
-
 
9059
        $35, $94, $a3, $29, 0, $1, 0, $e, 0, 0,
-
 
9060
        0, $6e, $54, $65, $78, $74, $75, $72, $65, $43,
-
 
9061
        $6f, $6f, $72, $64, $73, $14, 0, $34, 0, $1,
-
 
9062
        0, $8, 0, 0, 0, $43, $6f, $6f, $72, $64,
-
 
9063
        $73, $32, $64, $1, 0, $d, 0, 0, 0, $74,
-
 
9064
        $65, $78, $74, $75, $72, $65, $43, $6f, $6f, $72,
-
 
9065
        $64, $73, $e, 0, $1, 0, $e, 0, 0, 0,
-
 
9066
        $6e, $54, $65, $78, $74, $75, $72, $65, $43, $6f,
-
 
9067
        $6f, $72, $64, $73, $f, 0, $14, 0, $b, 0,
-
 
9068
        $1f, 0, $1, 0, $10, 0, 0, 0, $4d, $65,
-
 
9069
        $73, $68, $4d, $61, $74, $65, $72, $69, $61, $6c,
-
 
9070
        $4c, $69, $73, $74, $a, 0, $5, 0, $42, $3f,
-
 
9071
        $f2, $f6, $86, $76, $cf, $11, $8f, $52, 0, $40,
-
 
9072
        $33, $35, $94, $a3, $29, 0, $1, 0, $a, 0,
-
 
9073
        0, 0, $6e, $4d, $61, $74, $65, $72, $69, $61,
-
 
9074
        $6c, $73, $14, 0, $29, 0, $1, 0, $c, 0,
-
 
9075
        0, 0, $6e, $46, $61, $63, $65, $49, $6e, $64,
-
 
9076
        $65, $78, $65, $73, $14, 0, $34, 0, $29, 0,
-
 
9077
        $1, 0, $b, 0, 0, 0, $66, $61, $63, $65,
-
 
9078
        $49, $6e, $64, $65, $78, $65, $73, $e, 0, $1,
-
 
9079
        0, $c, 0, 0, 0, $6e, $46, $61, $63, $65,
-
 
9080
        $49, $6e, $64, $65, $78, $65, $73, $f, 0, $14,
-
 
9081
        0, $e, 0, $1, 0, $8, 0, 0, 0, $4d,
-
 
9082
        $61, $74, $65, $72, $69, $61, $6c, $f, 0, $b,
-
 
9083
        0, $1f, 0, $1, 0, $b, 0, 0, 0, $4d,
-
 
9084
        $65, $73, $68, $4e, $6f, $72, $6d, $61, $6c, $73,
-
 
9085
        $a, 0, $5, 0, $43, $3f, $f2, $f6, $86, $76,
-
 
9086
        $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3,
-
 
9087
        $29, 0, $1, 0, $8, 0, 0, 0, $6e, $4e,
-
 
9088
        $6f, $72, $6d, $61, $6c, $73, $14, 0, $34, 0,
-
 
9089
        $1, 0, $6, 0, 0, 0, $56, $65, $63, $74,
-
 
9090
        $6f, $72, $1, 0, $7, 0, 0, 0, $6e, $6f,
-
 
9091
        $72, $6d, $61, $6c, $73, $e, 0, $1, 0, $8,
-
 
9092
        0, 0, 0, $6e, $4e, $6f, $72, $6d, $61, $6c,
-
 
9093
        $73, $f, 0, $14, 0, $29, 0, $1, 0, $c,
-
 
9094
        0, 0, 0, $6e, $46, $61, $63, $65, $4e, $6f,
-
 
9095
        $72, $6d, $61, $6c, $73, $14, 0, $34, 0, $1,
-
 
9096
        0, $8, 0, 0, 0, $4d, $65, $73, $68, $46,
-
 
9097
        $61, $63, $65, $1, 0, $b, 0, 0, 0, $66,
-
 
9098
        $61, $63, $65, $4e, $6f, $72, $6d, $61, $6c, $73,
-
 
9099
        $e, 0, $1, 0, $c, 0, 0, 0, $6e, $46,
-
 
9100
        $61, $63, $65, $4e, $6f, $72, $6d, $61, $6c, $73,
-
 
9101
        $f, 0, $14, 0, $b, 0, $1f, 0, $1, 0,
-
 
9102
        $10, 0, 0, 0, $4d, $65, $73, $68, $56, $65,
-
 
9103
        $72, $74, $65, $78, $43, $6f, $6c, $6f, $72, $73,
-
 
9104
        $a, 0, $5, 0, $21, $b8, $30, $16, $42, $78,
-
 
9105
        $cf, $11, $8f, $52, 0, $40, $33, $35, $94, $a3,
-
 
9106
        $29, 0, $1, 0, $d, 0, 0, 0, $6e, $56,
-
 
9107
        $65, $72, $74, $65, $78, $43, $6f, $6c, $6f, $72,
-
 
9108
        $73, $14, 0, $34, 0, $1, 0, $c, 0, 0,
-
 
9109
        0, $49, $6e, $64, $65, $78, $65, $64, $43, $6f,
-
 
9110
        $6c, $6f, $72, $1, 0, $c, 0, 0, 0, $76,
-
 
9111
        $65, $72, $74, $65, $78, $43, $6f, $6c, $6f, $72,
-
 
9112
        $73, $e, 0, $1, 0, $d, 0, 0, 0, $6e,
-
 
9113
        $56, $65, $72, $74, $65, $78, $43, $6f, $6c, $6f,
-
 
9114
        $72, $73, $f, 0, $14, 0, $b, 0, $1f, 0,
-
 
9115
        $1, 0, $4, 0, 0, 0, $4d, $65, $73, $68,
-
 
9116
        $a, 0, $5, 0, $44, $ab, $82, $3d, $da, $62,
-
 
9117
        $cf, $11, $ab, $39, 0, $20, $af, $71, $e4, $33,
-
 
9118
        $29, 0, $1, 0, $9, 0, 0, 0, $6e, $56,
-
 
9119
        $65, $72, $74, $69, $63, $65, $73, $14, 0, $34,
-
 
9120
        0, $1, 0, $6, 0, 0, 0, $56, $65, $63,
-
 
9121
        $74, $6f, $72, $1, 0, $8, 0, 0, 0, $76,
-
 
9122
        $65, $72, $74, $69, $63, $65, $73, $e, 0, $1,
-
 
9123
        0, $9, 0, 0, 0, $6e, $56, $65, $72, $74,
-
 
9124
        $69, $63, $65, $73, $f, 0, $14, 0, $29, 0,
-
 
9125
        $1, 0, $6, 0, 0, 0, $6e, $46, $61, $63,
-
 
9126
        $65, $73, $14, 0, $34, 0, $1, 0, $8, 0,
-
 
9127
        0, 0, $4d, $65, $73, $68, $46, $61, $63, $65,
-
 
9128
        $1, 0, $5, 0, 0, 0, $66, $61, $63, $65,
-
 
9129
        $73, $e, 0, $1, 0, $6, 0, 0, 0, $6e,
-
 
9130
        $46, $61, $63, $65, $73, $f, 0, $14, 0, $e,
-
 
9131
        0, $12, 0, $12, 0, $12, 0, $f, 0, $b,
-
 
9132
        0, $1f, 0, $1, 0, $14, 0, 0, 0, $46,
-
 
9133
        $72, $61, $6d, $65, $54, $72, $61, $6e, $73, $66,
-
 
9134
        $6f, $72, $6d, $4d, $61, $74, $72, $69, $78, $a,
-
 
9135
        0, $5, 0, $41, $3f, $f2, $f6, $86, $76, $cf,
-
 
9136
        $11, $8f, $52, 0, $40, $33, $35, $94, $a3, $1,
-
 
9137
        0, $9, 0, 0, 0, $4d, $61, $74, $72, $69,
-
 
9138
        $78, $34, $78, $34, $1, 0, $b, 0, 0, 0,
-
 
9139
        $66, $72, $61, $6d, $65, $4d, $61, $74, $72, $69,
-
 
9140
        $78, $14, 0, $b, 0, $1f, 0, $1, 0, $5,
-
 
9141
        0, 0, 0, $46, $72, $61, $6d, $65, $a, 0,
-
 
9142
        $5, 0, $46, $ab, $82, $3d, $da, $62, $cf, $11,
-
 
9143
        $ab, $39, 0, $20, $af, $71, $e4, $33, $e, 0,
-
 
9144
        $12, 0, $12, 0, $12, 0, $f, 0, $b, 0,
-
 
9145
        $1f, 0, $1, 0, $9, 0, 0, 0, $46, $6c,
-
 
9146
        $6f, $61, $74, $4b, $65, $79, $73, $a, 0, $5,
-
 
9147
        0, $a9, $46, $dd, $10, $5b, $77, $cf, $11, $8f,
-
 
9148
        $52, 0, $40, $33, $35, $94, $a3, $29, 0, $1,
-
 
9149
        0, $7, 0, 0, 0, $6e, $56, $61, $6c, $75,
-
 
9150
        $65, $73, $14, 0, $34, 0, $2a, 0, $1, 0,
-
 
9151
        $6, 0, 0, 0, $76, $61, $6c, $75, $65, $73,
-
 
9152
        $e, 0, $1, 0, $7, 0, 0, 0, $6e, $56,
-
 
9153
        $61, $6c, $75, $65, $73, $f, 0, $14, 0, $b,
-
 
9154
        0, $1f, 0, $1, 0, $e, 0, 0, 0, $54,
-
 
9155
        $69, $6d, $65, $64, $46, $6c, $6f, $61, $74, $4b,
-
 
9156
        $65, $79, $73, $a, 0, $5, 0, $80, $b1, $6,
-
 
9157
        $f4, $3b, $7b, $cf, $11, $8f, $52, 0, $40, $33,
-
 
9158
        $35, $94, $a3, $29, 0, $1, 0, $4, 0, 0,
-
 
9159
        0, $74, $69, $6d, $65, $14, 0, $1, 0, $9,
-
 
9160
        0, 0, 0, $46, $6c, $6f, $61, $74, $4b, $65,
-
 
9161
        $79, $73, $1, 0, $6, 0, 0, 0, $74, $66,
-
 
9162
        $6b, $65, $79, $73, $14, 0, $b, 0, $1f, 0,
-
 
9163
        $1, 0, $c, 0, 0, 0, $41, $6e, $69, $6d,
-
 
9164
        $61, $74, $69, $6f, $6e, $4b, $65, $79, $a, 0,
-
 
9165
        $5, 0, $a8, $46, $dd, $10, $5b, $77, $cf, $11,
-
 
9166
        $8f, $52, 0, $40, $33, $35, $94, $a3, $29, 0,
-
 
9167
        $1, 0, $7, 0, 0, 0, $6b, $65, $79, $54,
-
 
9168
        $79, $70, $65, $14, 0, $29, 0, $1, 0, $5,
-
 
9169
        0, 0, 0, $6e, $4b, $65, $79, $73, $14, 0,
-
 
9170
        $34, 0, $1, 0, $e, 0, 0, 0, $54, $69,
-
 
9171
        $6d, $65, $64, $46, $6c, $6f, $61, $74, $4b, $65,
-
 
9172
        $79, $73, $1, 0, $4, 0, 0, 0, $6b, $65,
-
 
9173
        $79, $73, $e, 0, $1, 0, $5, 0, 0, 0,
-
 
9174
        $6e, $4b, $65, $79, $73, $f, 0, $14, 0, $b,
-
 
9175
        0, $1f, 0, $1, 0, $10, 0, 0, 0, $41,
-
 
9176
        $6e, $69, $6d, $61, $74, $69, $6f, $6e, $4f, $70,
-
 
9177
        $74, $69, $6f, $6e, $73, $a, 0, $5, 0, $c0,
-
 
9178
        $56, $bf, $e2, $f, $84, $cf, $11, $8f, $52, 0,
-
 
9179
        $40, $33, $35, $94, $a3, $29, 0, $1, 0, $a,
-
 
9180
        0, 0, 0, $6f, $70, $65, $6e, $63, $6c, $6f,
-
 
9181
        $73, $65, $64, $14, 0, $29, 0, $1, 0, $f,
-
 
9182
        0, 0, 0, $70, $6f, $73, $69, $74, $69, $6f,
-
 
9183
        $6e, $71, $75, $61, $6c, $69, $74, $79, $14, 0,
-
 
9184
        $b, 0, $1f, 0, $1, 0, $9, 0, 0, 0,
-
 
9185
        $41, $6e, $69, $6d, $61, $74, $69, $6f, $6e, $a,
-
 
9186
        0, $5, 0, $4f, $ab, $82, $3d, $da, $62, $cf,
-
 
9187
        $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $e,
-
 
9188
        0, $12, 0, $12, 0, $12, 0, $f, 0, $b,
-
 
9189
        0, $1f, 0, $1, 0, $c, 0, 0, 0, $41,
-
 
9190
        $6e, $69, $6d, $61, $74, $69, $6f, $6e, $53, $65,
-
 
9191
        $74, $a, 0, $5, 0, $50, $ab, $82, $3d, $da,
-
 
9192
        $62, $cf, $11, $ab, $39, 0, $20, $af, $71, $e4,
-
 
9193
        $33, $e, 0, $1, 0, $9, 0, 0, 0, $41,
-
 
9194
        $6e, $69, $6d, $61, $74, $69, $6f, $6e, $f, 0,
-
 
9195
        $b, 0, $1f, 0, $1, 0, $a, 0, 0, 0,
-
 
9196
        $49, $6e, $6c, $69, $6e, $65, $44, $61, $74, $61,
-
 
9197
        $a, 0, $5, 0, $a0, $ee, $23, $3a, $b1, $94,
-
 
9198
        $d0, $11, $ab, $39, 0, $20, $af, $71, $e4, $33,
-
 
9199
        $e, 0, $1, 0, $6, 0, 0, 0, $42, $49,
-
 
9200
        $4e, $41, $52, $59, $f, 0, $b, 0, $1f, 0,
-
 
9201
        $1, 0, $3, 0, 0, 0, $55, $72, $6c, $a,
-
 
9202
        0, $5, 0, $a1, $ee, $23, $3a, $b1, $94, $d0,
-
 
9203
        $11, $ab, $39, 0, $20, $af, $71, $e4, $33, $29,
-
 
9204
        0, $1, 0, $5, 0, 0, 0, $6e, $55, $72,
-
 
9205
        $6c, $73, $14, 0, $34, 0, $31, 0, $1, 0,
-
 
9206
        $4, 0, 0, 0, $75, $72, $6c, $73, $e, 0,
-
 
9207
        $1, 0, $5, 0, 0, 0, $6e, $55, $72, $6c,
-
 
9208
        $73, $f, 0, $14, 0, $b, 0, $1f, 0, $1,
-
 
9209
        0, $f, 0, 0, 0, $50, $72, $6f, $67, $72,
-
 
9210
        $65, $73, $73, $69, $76, $65, $4d, $65, $73, $68,
-
 
9211
        $a, 0, $5, 0, $60, $c3, $63, $8a, $7d, $99,
-
 
9212
        $d0, $11, $94, $1c, 0, $80, $c8, $c, $fa, $7b,
-
 
9213
        $e, 0, $1, 0, $3, 0, 0, 0, $55, $72,
-
 
9214
        $6c, $13, 0, $1, 0, $a, 0, 0, 0, $49,
-
 
9215
        $6e, $6c, $69, $6e, $65, $44, $61, $74, $61, $f,
-
 
9216
        0, $b, 0, $1f, 0, $1, 0, $4, 0, 0,
-
 
9217
        0, $47, $75, $69, $64, $a, 0, $5, 0, $e0,
-
 
9218
        $90, $27, $a4, $10, $78, $cf, $11, $8f, $52, 0,
-
 
9219
        $40, $33, $35, $94, $a3, $29, 0, $1, 0, $5,
-
 
9220
        0, 0, 0, $64, $61, $74, $61, $31, $14, 0,
-
 
9221
        $28, 0, $1, 0, $5, 0, 0, 0, $64, $61,
-
 
9222
        $74, $61, $32, $14, 0, $28, 0, $1, 0, $5,
-
 
9223
        0, 0, 0, $64, $61, $74, $61, $33, $14, 0,
-
 
9224
        $34, 0, $2d, 0, $1, 0, $5, 0, 0, 0,
-
 
9225
        $64, $61, $74, $61, $34, $e, 0, $3, 0, $8,
-
 
9226
        0, 0, 0, $f, 0, $14, 0, $b, 0, $1f,
-
 
9227
        0, $1, 0, $e, 0, 0, 0, $53, $74, $72,
-
 
9228
        $69, $6e, $67, $50, $72, $6f, $70, $65, $72, $74,
-
 
9229
        $79, $a, 0, $5, 0, $e0, $21, $f, $7f, $e1,
-
 
9230
        $bf, $d1, $11, $82, $c0, 0, $a0, $c9, $69, $72,
-
 
9231
        $71, $31, 0, $1, 0, $3, 0, 0, 0, $6b,
-
 
9232
        $65, $79, $14, 0, $31, 0, $1, 0, $5, 0,
-
 
9233
        0, 0, $76, $61, $6c, $75, $65, $14, 0, $b,
-
 
9234
        0, $1f, 0, $1, 0, $b, 0, 0, 0, $50,
-
 
9235
        $72, $6f, $70, $65, $72, $74, $79, $42, $61, $67,
-
 
9236
        $a, 0, $5, 0, $e1, $21, $f, $7f, $e1, $bf,
-
 
9237
        $d1, $11, $82, $c0, 0, $a0, $c9, $69, $72, $71,
-
 
9238
        $e, 0, $1, 0, $e, 0, 0, 0, $53, $74,
-
 
9239
        $72, $69, $6e, $67, $50, $72, $6f, $70, $65, $72,
-
 
9240
        $74, $79, $f, 0, $b, 0, $1f, 0, $1, 0,
-
 
9241
        $e, 0, 0, 0, $45, $78, $74, $65, $72, $6e,
-
 
9242
        $61, $6c, $56, $69, $73, $75, $61, $6c, $a, 0,
-
 
9243
        $5, 0, $a0, $6a, $11, $98, $ba, $bd, $d1, $11,
-
 
9244
        $82, $c0, 0, $a0, $c9, $69, $72, $71, $1, 0,
-
 
9245
        $4, 0, 0, 0, $47, $75, $69, $64, $1, 0,
-
 
9246
        $12, 0, 0, 0, $67, $75, $69, $64, $45, $78,
-
 
9247
        $74, $65, $72, $6e, $61, $6c, $56, $69, $73, $75,
-
 
9248
        $61, $6c, $14, 0, $e, 0, $12, 0, $12, 0,
-
 
9249
        $12, 0, $f, 0, $b, 0);
-
 
9250
 
-
 
9251
//---------------
-
 
9252
 
-
 
9253
//Direct3DRM file
-
 
9254
(*==========================================================================;
-
 
9255
 *
-
 
9256
 *  Copyright (C) 1994-1997 Microsoft Corporation.  All Rights Reserved.
-
 
9257
 *
-
 
9258
 *  Files:      D3DRMDef.h D3DRMObj.h D3DRM.h D3DRMWin.h RMXFGUID.h RMXFTmpl.h
-
 
9259
 *  Content:    Direct3D Retained Mode include files
-
 
9260
 *
-
 
9261
 *  DirectX 7.0 Delphi adaptation by Erik Unger
-
 
9262
 *
-
 
9263
 *  Modified: 10-Sep-2000
-
 
9264
 *
-
 
9265
 *  Download: http://www.delphi-jedi.org/DelphiGraphics/
-
 
9266
 *  E-Mail: DelphiDirectX@next-reality.com
-
 
9267
 *
-
 
9268
 *
-
 
9269
 ***************************************************************************)
-
 
9270
 
-
 
9271
var
-
 
9272
  D3DRMDLL : HMODULE = 0;
5683
 
9273
 
5684
(*==========================================================================;
9274
(*==========================================================================;
5685
 *
9275
 *
5686
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
9276
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
5687
 *
9277
 *
5688
 *  File:       d3drmdef.h
9278
 *  File:       d3drmdef.h
5689
 *  Content:    Direct3DRM include file
9279
 *  Content:    Direct3DRM include file
5690
 *
9280
 *
5691
 ***************************************************************************)
9281
 ***************************************************************************)
5692
 
9282
 
5693
{ TD3DRMVector4D structure }
-
 
5694
 
-
 
5695
type
9283
type
5696
  PD3DRMVector4D = ^TD3DRMVector4D;
9284
  PD3DRMVector4D = ^TD3DRMVector4D;
5697
  TD3DRMVector4D = record
9285
  TD3DRMVector4D = packed record
5698
    x, y, z, w: TD3DValue;
9286
    x, y, z, w: TD3DValue;
5699
  end;
9287
  end;
5700
 
9288
 
5701
  D3DRMVECTOR4D = TD3DRMVector4D;
9289
  PD3DRMMatrix4D = ^TD3DRMMatrix4D;
5702
  LPD3DRMVECTOR4D = PD3DRMVector4D;
-
 
5703
 
-
 
5704
{ TD3DRMMatrix4D structure }
-
 
5705
 
-
 
5706
  TD3DRMMatrix4D = array[0..3, 0..3] of TD3DValue;
9290
  TD3DRMMatrix4D = array [0..3, 0..3] of TD3DValue;
5707
  D3DRMMATRIX4D = TD3DRMMatrix4D;
-
 
5708
 
-
 
5709
{ TD3DRMQuaternion structure }
-
 
5710
 
9291
 
5711
  PD3DRMQuaternion = ^TD3DRMQuaternion;
9292
  PD3DRMQuaternion = ^TD3DRMQuaternion;
5712
  TD3DRMQuaternion = record
9293
  TD3DRMQuaternion = packed record
5713
    s: TD3DValue;
9294
    s: TD3DValue;
5714
    v: TD3DVector;
9295
    v: TD3DVector;
5715
  end;
9296
  end;
5716
 
9297
 
5717
  D3DRMQUATERNION = TD3DRMQuaternion;
-
 
5718
  LPD3DRMQUATERNION = PD3DRMQUATERNION;
-
 
5719
 
-
 
5720
{ TD3DRMRay structure }
-
 
5721
 
-
 
5722
  PD3DRMRay = ^TD3DRMRay;
9298
  PD3DRMRay = ^TD3DRMRay;
5723
  TD3DRMRay = record
9299
  TD3DRMRay = packed record
5724
    dvDir: TD3DVector;
9300
    dvDir: TD3DVector;
5725
    dvPos: TD3DVector;
9301
    dvPos: TD3DVector;
5726
  end;
9302
  end;
5727
 
9303
 
5728
  D3DRMRAY = TD3DRMRay;
-
 
5729
  LPD3DRMRAY = PD3DRMRay;
-
 
5730
 
-
 
5731
{ TD3DRMBox structure }
-
 
5732
 
-
 
5733
  PD3DRMBox = ^TD3DRMBox;
9304
  PD3DRMBox = ^TD3DRMBox;
5734
  TD3DRMBox = record
9305
  TD3DRMBox = packed record
5735
    min, max: TD3DVector;
9306
    min, max: TD3DVector;
5736
  end;
9307
  end;
5737
 
9308
 
5738
  D3DRMBOX = TD3DRMBox;
-
 
5739
  LPD3DRMBOX = PD3DRMBox;
-
 
5740
 
-
 
5741
{ TD3DRMWrapCallback }
-
 
5742
 
-
 
5743
  TD3DRMWrapCallback = procedure(var lpD3DVector: TD3DVector; var lpU: Integer;
9309
  TD3DRMWrapCallback = procedure (var lpD3DVector: TD3DVector;
5744
      var lpV: Integer; var lpD3DRMVA: TD3DVector; lpD3DRMVB: TD3DVector;
9310
      var lpU, lpV: Integer; var lpD3DRMVA, lpD3DRMVB: TD3DVector; lpArg:
5745
      lpArg: Pointer); stdcall;
9311
      Pointer); stdcall; // unused ?
5746
 
-
 
5747
  D3DRMWRAPCALLBACK = TD3DRMWrapCallback;
-
 
5748
 
-
 
5749
{  TD3DRMLightType  }
-
 
5750
 
9312
 
-
 
9313
  PD3DRMLightType = ^TD3DRMLightType; // is it 16 or 32 bit ?
5751
  TD3DRMLightType = (
9314
  TD3DRMLightType = (
5752
    D3DRMLIGHT_AMBIENT,
9315
    D3DRMLIGHT_AMBIENT,
5753
    D3DRMLIGHT_POINT,
9316
    D3DRMLIGHT_POINT,
5754
    D3DRMLIGHT_SPOT,
9317
    D3DRMLIGHT_SPOT,
5755
    D3DRMLIGHT_DIRECTIONAL,
9318
    D3DRMLIGHT_DIRECTIONAL,
5756
    D3DRMLIGHT_PARALLELPOINT
9319
    D3DRMLIGHT_PARALLELPOINT
5757
  );
9320
  );
5758
 
9321
 
5759
  D3DRMLIGHTTYPE = TD3DRMLightType;
9322
  PD3DRMShadeMode = ^TD3DRMShadeMode;
5760
 
-
 
5761
{ TD3DRMShadeMode }
-
 
5762
 
-
 
5763
  TD3DRMShadeMode = Word;
9323
  TD3DRMShadeMode = WORD;
5764
  D3DRMSHADEMODE = TD3DRMShadeMode;
-
 
5765
 
9324
 
5766
const
9325
const
5767
  D3DRMSHADE_FLAT = 0;
9326
  D3DRMSHADE_FLAT = 0;
5768
  D3DRMSHADE_GOURAUD = 1;
9327
  D3DRMSHADE_GOURAUD = 1;
5769
  D3DRMSHADE_PHONG = 2;
9328
  D3DRMSHADE_PHONG = 2;
5770
  D3DRMSHADE_MASK = 7;
9329
  D3DRMSHADE_MASK = 7;
5771
  D3DRMSHADE_MAX = 8;
9330
  D3DRMSHADE_MAX = 8;
5772
 
9331
 
5773
{ TD3DRMLightMode }
-
 
5774
 
-
 
5775
type
9332
type
5776
  TD3DRMLightMode = Word;
9333
  PD3DRMLightMode = ^TD3DRMLightMode;
5777
  D3DRMLIGHTMODE = TD3DRMLightMode;
9334
  TD3DRMLightMode = WORD;
5778
 
9335
 
5779
const
9336
const
5780
  D3DRMLIGHT_OFF  = 0 * D3DRMSHADE_MAX;
9337
  D3DRMLIGHT_OFF  = 0 * D3DRMSHADE_MAX;
5781
  D3DRMLIGHT_ON   = 1 * D3DRMSHADE_MAX;
9338
  D3DRMLIGHT_ON   = 1 * D3DRMSHADE_MAX;
5782
  D3DRMLIGHT_MASK = 7 * D3DRMSHADE_MAX;
9339
  D3DRMLIGHT_MASK = 7 * D3DRMSHADE_MAX;
5783
  D3DRMLIGHT_MAX  = 8 * D3DRMSHADE_MAX;
9340
  D3DRMLIGHT_MAX  = 8 * D3DRMSHADE_MAX;
5784
 
9341
 
5785
{ TD3DRMFillMode }
-
 
5786
 
-
 
5787
type
9342
type
5788
  TD3DRMFillMode = Word;
9343
  PD3DRMFillMode = ^TD3DRMFillMode;
5789
  D3DRMFILLMODE = TD3DRMFillMode;
9344
  TD3DRMFillMode = WORD;
5790
 
9345
 
5791
const
9346
const
5792
  D3DRMFILL_POINTS    = 0 * D3DRMLIGHT_MAX;
9347
  D3DRMFILL_POINTS    = 0 * D3DRMLIGHT_MAX;
5793
  D3DRMFILL_WIREFRAME = 1 * D3DRMLIGHT_MAX;
9348
  D3DRMFILL_WIREFRAME = 1 * D3DRMLIGHT_MAX;
5794
  D3DRMFILL_SOLID     = 2 * D3DRMLIGHT_MAX;
9349
  D3DRMFILL_SOLID     = 2 * D3DRMLIGHT_MAX;
5795
  D3DRMFILL_MASK      = 7 * D3DRMLIGHT_MAX;
9350
  D3DRMFILL_MASK      = 7 * D3DRMLIGHT_MAX;
5796
  D3DRMFILL_MAX       = 8 * D3DRMLIGHT_MAX;
9351
  D3DRMFILL_MAX       = 8 * D3DRMLIGHT_MAX;
5797
 
9352
 
5798
{ TD3DRMRenderQuality }
-
 
5799
 
-
 
5800
type
9353
type
-
 
9354
  PD3DRMRenderQuality = ^TD3DRMRenderQuality;
5801
  TD3DRMRenderQuality = DWORD;
9355
  TD3DRMRenderQuality = DWORD;
5802
  D3DRMRENDERQUALITY = TD3DRMRenderQuality;
-
 
5803
 
9356
 
5804
const
9357
const
-
 
9358
  D3DRMRENDER_WIREFRAME   =
5805
  D3DRMRENDER_WIREFRAME   = D3DRMSHADE_FLAT + D3DRMLIGHT_OFF + D3DRMFILL_WIREFRAME;
9359
      (D3DRMSHADE_FLAT + D3DRMLIGHT_OFF + D3DRMFILL_WIREFRAME);
-
 
9360
  D3DRMRENDER_UNLITFLAT   =
5806
  D3DRMRENDER_UNLITFLAT   = D3DRMSHADE_FLAT + D3DRMLIGHT_OFF + D3DRMFILL_SOLID;
9361
      (D3DRMSHADE_FLAT + D3DRMLIGHT_OFF + D3DRMFILL_SOLID);
-
 
9362
  D3DRMRENDER_FLAT        =
5807
  D3DRMRENDER_FLAT        = D3DRMSHADE_FLAT + D3DRMLIGHT_ON + D3DRMFILL_SOLID;
9363
      (D3DRMSHADE_FLAT + D3DRMLIGHT_ON + D3DRMFILL_SOLID);
-
 
9364
  D3DRMRENDER_GOURAUD     =
5808
  D3DRMRENDER_GOURAUD     = D3DRMSHADE_GOURAUD + D3DRMLIGHT_ON + D3DRMFILL_SOLID;
9365
      (D3DRMSHADE_GOURAUD + D3DRMLIGHT_ON + D3DRMFILL_SOLID);
-
 
9366
  D3DRMRENDER_PHONG       =
5809
  D3DRMRENDER_PHONG       = D3DRMSHADE_PHONG + D3DRMLIGHT_ON + D3DRMFILL_SOLID;
9367
      (D3DRMSHADE_PHONG + D3DRMLIGHT_ON + D3DRMFILL_SOLID);
5810
 
9368
 
5811
  D3DRMRENDERMODE_BLENDEDTRANSPARENCY      = 1;
9369
  D3DRMRENDERMODE_BLENDEDTRANSPARENCY   =  1;
5812
  D3DRMRENDERMODE_SORTEDTRANSPARENCY       = 2;
9370
  D3DRMRENDERMODE_SORTEDTRANSPARENCY    =  2;
5813
  D3DRMRENDERMODE_LIGHTINMODELSPACE        = 8;
9371
  D3DRMRENDERMODE_LIGHTINMODELSPACE     =  8;
5814
  D3DRMRENDERMODE_VIEWDEPENDENTSPECULAR    = 16;
9372
  D3DRMRENDERMODE_VIEWDEPENDENTSPECULAR = 16;
5815
  D3DRMRENDERMODE_DISABLESORTEDALPHAZWRITE = 32;
-
 
5816
 
-
 
5817
{ TD3DRMTextureQuality }
-
 
5818
 
9373
 
5819
type
9374
type
-
 
9375
  PD3DRMTextureQuality = ^TD3DRMTextureQuality;
5820
  TD3DRMTextureQuality = (
9376
  TD3DRMTextureQuality = (
5821
    D3DRMTEXTURE_NEAREST,               // choose nearest texel
9377
    D3DRMTEXTURE_NEAREST,               (* choose nearest texel *)
5822
    D3DRMTEXTURE_LINEAR,                // interpolate 4 texels
9378
    D3DRMTEXTURE_LINEAR,                (* interpolate 4 texels *)
5823
    D3DRMTEXTURE_MIPNEAREST,            // nearest texel in nearest mipmap
9379
    D3DRMTEXTURE_MIPNEAREST,            (* nearest texel in nearest mipmap  *)
5824
    D3DRMTEXTURE_MIPLINEAR,             // interpolate 2 texels from 2 mipmaps
9380
    D3DRMTEXTURE_MIPLINEAR,             (* interpolate 2 texels from 2 mipmaps *)
5825
    D3DRMTEXTURE_LINEARMIPNEAREST,      // interpolate 4 texels in nearest mipmap
9381
    D3DRMTEXTURE_LINEARMIPNEAREST,      (* interpolate 4 texels in nearest mipmap *)
5826
    D3DRMTEXTURE_LINEARMIPLINEAR        // interpolate 8 texels from 2 mipmaps
9382
    D3DRMTEXTURE_LINEARMIPLINEAR        (* interpolate 8 texels from 2 mipmaps *)
5827
  );
9383
  );
5828
 
9384
 
5829
  D3DRMTEXTUREQUALITY = TD3DRMTextureQuality;
-
 
5830
 
-
 
5831
{ Texture flags }
-
 
5832
 
-
 
5833
const
-
 
5834
  D3DRMTEXTURE_FORCERESIDENT          = $00000001; // texture should be kept in video memory
-
 
5835
  D3DRMTEXTURE_STATIC                 = $00000002; // texture will not change
-
 
5836
  D3DRMTEXTURE_DOWNSAMPLEPOINT        = $00000004; // point filtering should be used when downsampling
-
 
5837
  D3DRMTEXTURE_DOWNSAMPLEBILINEAR     = $00000008; // bilinear filtering should be used when downsampling
-
 
5838
  D3DRMTEXTURE_DOWNSAMPLEREDUCEDEPTH  = $00000010; // reduce bit depth when downsampling
-
 
5839
  D3DRMTEXTURE_DOWNSAMPLENONE         = $00000020; // texture should never be downsampled
-
 
5840
  D3DRMTEXTURE_CHANGEDPIXELS          = $00000040; // pixels have changed
-
 
5841
  D3DRMTEXTURE_CHANGEDPALETTE         = $00000080; // palette has changed
-
 
5842
  D3DRMTEXTURE_INVALIDATEONLY         = $00000100; // dirty regions are invalid
-
 
5843
 
-
 
5844
{ Shadow flags }
-
 
5845
 
-
 
5846
const
9385
const
-
 
9386
(*
-
 
9387
 * Texture flags
-
 
9388
 *)
-
 
9389
  D3DRMTEXTURE_FORCERESIDENT          = $00000001; (* texture should be kept in video memory *)
-
 
9390
  D3DRMTEXTURE_STATIC                 = $00000002; (* texture will not change *)
-
 
9391
  D3DRMTEXTURE_DOWNSAMPLEPOINT        = $00000004; (* point filtering should be used when downsampling *)
5847
  D3DRMSHADOW_TRUEALPHA = $00000001; // shadow should render without artifacts when true alpha is on
9392
  D3DRMTEXTURE_DOWNSAMPLEBILINEAR     = $00000008; (* bilinear filtering should be used when downsampling *)
-
 
9393
  D3DRMTEXTURE_DOWNSAMPLEREDUCEDEPTH  = $00000010; (* reduce bit depth when downsampling *)
-
 
9394
  D3DRMTEXTURE_DOWNSAMPLENONE         = $00000020; (* texture should never be downsampled *)
-
 
9395
  D3DRMTEXTURE_CHANGEDPIXELS          = $00000040; (* pixels have changed *)
-
 
9396
  D3DRMTEXTURE_CHANGEDPALETTE         = $00000080; (* palette has changed *)
-
 
9397
  D3DRMTEXTURE_INVALIDATEONLY         = $00000100; (* dirty regions are invalid *)
5848
 
9398
 
-
 
9399
(*
5849
{ TD3DRMCombineType }
9400
 * Shadow flags
-
 
9401
 *)
-
 
9402
   D3DRMSHADOW_TRUEALPHA               = $00000001; (* shadow should render without artifacts when true alpha is on *)
5850
 
9403
 
5851
type
9404
type
-
 
9405
  PD3DRMCombineType = ^TD3DRMCombineType;
5852
  TD3DRMCombineType = (
9406
  TD3DRMCombineType = (
5853
     D3DRMCOMBINE_REPLACE,
9407
    D3DRMCOMBINE_REPLACE,
5854
     D3DRMCOMBINE_BEFORE,
9408
    D3DRMCOMBINE_BEFORE,
5855
     D3DRMCOMBINE_AFTER
9409
    D3DRMCOMBINE_AFTER
5856
  );
9410
  );
5857
 
9411
 
5858
  D3DRMCOMBINETYPE = TD3DRMCombineType;
9412
  PD3DRMColorModel = ^TD3DRMColorModel;
5859
 
-
 
5860
{ TD3DRMColorModel }
-
 
5861
 
-
 
5862
  TD3DRMColorModel = TD3DColorModel;
9413
  TD3DRMColorModel = TD3DColorModel;
5863
  D3DRMCOLORMODEL = TD3DRMColorModel;
-
 
5864
 
-
 
5865
{ TD3DRMPaletteFlags }
-
 
5866
 
9414
 
-
 
9415
  PD3DRMPaletteFlags = ^TD3DRMPaletteFlags;
5867
  TD3DRMPaletteFlags = (
9416
  TD3DRMPaletteFlags = (
5868
    D3DRMPALETTE_FREE,                  // renderer may use this entry freely
9417
    D3DRMPALETTE_FREE,                  (* renderer may use this entry freely *)
5869
    D3DRMPALETTE_READONLY,              // fixed but may be used by renderer
9418
    D3DRMPALETTE_READONLY,              (* fixed but may be used by renderer *)
5870
    D3DRMPALETTE_RESERVED               // may not be used by renderer
9419
    D3DRMPALETTE_RESERVED               (* may not be used by renderer *)
5871
  );
9420
  );
5872
 
9421
 
5873
  D3DRMPALETTEFLAGS = TD3DRMPaletteFlags;
-
 
5874
 
-
 
5875
{ TD3DRMPaletteEntry structure }
-
 
5876
 
-
 
5877
  PD3DRMPaletteEntry = ^TD3DRMPaletteEntry;
9422
  PD3DRMPaletteEntry = ^TD3DRMPaletteEntry;
5878
  TD3DRMPaletteEntry = record
9423
  TD3DRMPaletteEntry = packed record
5879
    red: Byte;          // 0 .. 255
9424
    red: Byte;          (* 0 .. 255 *)
5880
    green: Byte;        // 0 .. 255
9425
    green: Byte;        (* 0 .. 255 *)
5881
    blue: Byte;         // 0 .. 255
9426
    blue: Byte;         (* 0 .. 255 *)
5882
    flags: Byte;        // one of TD3DRMPaletteFlags
9427
    flags: Byte;        (* one of D3DRMPALETTEFLAGS *)
5883
  end;
9428
  end;
5884
 
9429
 
5885
  D3DRMPALETTEENTRY = TD3DRMPaletteEntry;
-
 
5886
  LPD3DRMPALETTEENTRY = PD3DRMPaletteEntry;
-
 
5887
 
-
 
5888
{ TD3DRMImage structure }
-
 
5889
 
-
 
5890
  PD3DRMImage = ^TD3DRMImage;
9430
  PD3DRMImage = ^TD3DRMImage;
5891
  TD3DRMImage = record
9431
  TD3DRMImage = packed record
5892
    width, height: Integer;    (* width and height in pixels *)
9432
    width, height: Integer;    (* width and height in pixels *)
5893
    aspectx, aspecty: Integer; (* aspect ratio for non-square pixels *)
9433
    aspectx, aspecty: Integer; (* aspect ratio for non-square pixels *)
5894
    depth: Integer;            (* bits per pixel *)
9434
    depth: Integer;            (* bits per pixel *)
5895
    rgb: Integer;              (* if false, pixels are indices into a
9435
    rgb: Integer;              (* if false, pixels are indices into a
5896
                                   palette otherwise, pixels encode
9436
                                   palette otherwise, pixels encode
Line 5900... Line 9440...
5900
                                   of 4. *)
9440
                                   of 4. *)
5901
    buffer1: Pointer;          (* memory to render into (first buffer). *)
9441
    buffer1: Pointer;          (* memory to render into (first buffer). *)
5902
    buffer2: Pointer;          (* second rendering buffer for double
9442
    buffer2: Pointer;          (* second rendering buffer for double
5903
                                   buffering, set to NULL for single
9443
                                   buffering, set to NULL for single
5904
                                   buffering. *)
9444
                                   buffering. *)
5905
    red_mask: Longint;
9445
    red_mask: DWORD;
5906
    green_mask: Longint;
9446
    green_mask: DWORD;
5907
    blue_mask: Longint;
9447
    blue_mask: DWORD;
5908
    alpha_mask: Longint;       (* if rgb is true, these are masks for
9448
    alpha_mask: DWORD;        (* if rgb is true, these are masks for
5909
                                   the red, green and blue parts of a
9449
                                   the red, green and blue parts of a
5910
                                   pixel.  Otherwise, these are masks
9450
                                   pixel.  Otherwise, these are masks
5911
                                   for the significant bits of the
9451
                                   for the significant bits of the
5912
                                   red, green and blue elements in the
9452
                                   red, green and blue elements in the
5913
                                   palette.  For instance, most SVGA
9453
                                   palette.  For instance, most SVGA
Line 5918... Line 9458...
5918
    palette: PD3DRMPaletteEntry; (* description of the palette (only if
9458
    palette: PD3DRMPaletteEntry; (* description of the palette (only if
5919
                                   rgb is false).  Must be (1<<depth)
9459
                                   rgb is false).  Must be (1<<depth)
5920
                                   elements. *)
9460
                                   elements. *)
5921
  end;
9461
  end;
5922
 
9462
 
5923
  D3DRMIMAGE = TD3DRMImage;
9463
  PD3DRMWrapType = ^TD3DRMWrapType;
5924
  LPD3DRMIMAGE = PD3DRMImage;
-
 
5925
 
-
 
5926
{ TD3DRMWrapType }
-
 
5927
 
-
 
5928
  TD3DRMWrapType = (
9464
  TD3DRMWrapType = (
5929
    D3DRMWRAP_FLAT,
9465
    D3DRMWRAP_FLAT,
5930
    D3DRMWRAP_CYLINDER,
9466
    D3DRMWRAP_CYLINDER,
5931
    D3DRMWRAP_SPHERE,
9467
    D3DRMWRAP_SPHERE,
5932
    D3DRMWRAP_CHROME,
9468
    D3DRMWRAP_CHROME,
5933
    D3DRMWRAP_SHEET,
9469
    D3DRMWRAP_SHEET,
5934
    D3DRMWRAP_BOX
9470
    D3DRMWRAP_BOX
5935
  );
9471
  );
5936
 
9472
 
5937
  D3DRMWRAPTYPE = TD3DRMWrapType;
-
 
5938
 
-
 
5939
const
9473
const
5940
  D3DRMWIREFRAME_CULL             = 1; // cull backfaces
9474
  D3DRMWIREFRAME_CULL             = 1; (* cull backfaces *)
5941
  D3DRMWIREFRAME_HIDDENLINE       = 2; // lines are obscured by closer objects
9475
  D3DRMWIREFRAME_HIDDENLINE       = 2; (* lines are obscured by closer objects *)
5942
 
-
 
5943
{ TD3DRMProjectionType }
-
 
5944
 
9476
 
5945
type
9477
type
-
 
9478
(*
-
 
9479
 * Do not use righthanded perspective in Viewport2::SetProjection().
-
 
9480
 * Set up righthanded mode by using IDirect3DRM3::SetOptions().
-
 
9481
 *)
-
 
9482
  PD3DRMProjectionType = ^TD3DRMProjectionType;
5946
  TD3DRMProjectionType = (
9483
  TD3DRMProjectionType = (
5947
    D3DRMPROJECT_PERSPECTIVE,
9484
    D3DRMPROJECT_PERSPECTIVE,
5948
    D3DRMPROJECT_ORTHOGRAPHIC,
9485
    D3DRMPROJECT_ORTHOGRAPHIC,
5949
    D3DRMPROJECT_RIGHTHANDPERSPECTIVE,  // Only valid pre-DX6
9486
    D3DRMPROJECT_RIGHTHANDPERSPECTIVE, (* Only valid pre-DX6 *)
5950
    D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC  // Only valid pre-DX6
9487
    D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC (* Only valid pre-DX6 *)
5951
  );
9488
  );
5952
 
9489
 
5953
  D3DRMPROJECTIONTYPE = TD3DRMProjectionType;
-
 
5954
 
-
 
5955
const
9490
const
5956
  D3DRMOPTIONS_LEFTHANDED  = $00000001; // Default
9491
  D3DRMOPTIONS_LEFTHANDED  = 00000001; (* Default *)
5957
  D3DRMOPTIONS_RIGHTHANDED = $00000002;
9492
  D3DRMOPTIONS_RIGHTHANDED = 00000002;
5958
 
-
 
5959
{ TD3DRMXOFFormat }
-
 
5960
 
9493
 
5961
type
9494
type
-
 
9495
  PD3DRMXOFFormat = ^TD3DRMXOFFormat;
5962
  TD3DRMXOFFormat = (
9496
  TD3DRMXOFFormat = (
5963
    D3DRMXOF_BINARY,
9497
    D3DRMXOF_BINARY,
5964
    D3DRMXOF_COMPRESSED,
9498
    D3DRMXOF_COMPRESSED,
5965
    D3DRMXOF_TEXT
9499
    D3DRMXOF_TEXT
5966
  );
9500
  );
5967
 
9501
 
5968
  D3DRMXOFFORMAT = TD3DRMXOFFormat;
-
 
5969
 
-
 
5970
{ TD3DRMSaveOptions }
-
 
5971
 
-
 
5972
  TD3DRMSaveOptions = DWORD;
9502
  TD3DRMSaveOptions = DWORD;
5973
  D3DRMSAVEOPTIONS = TD3DRMSaveOptions;
-
 
5974
 
-
 
5975
const
9503
const
5976
  D3DRMXOFSAVE_NORMALS = 1;
9504
  D3DRMXOFSAVE_NORMALS = 1;
5977
  D3DRMXOFSAVE_TEXTURECOORDINATES = 2;
9505
  D3DRMXOFSAVE_TEXTURECOORDINATES = 2;
5978
  D3DRMXOFSAVE_MATERIALS = 4;
9506
  D3DRMXOFSAVE_MATERIALS = 4;
5979
  D3DRMXOFSAVE_TEXTURENAMES = 8;
9507
  D3DRMXOFSAVE_TEXTURENAMES = 8;
5980
  D3DRMXOFSAVE_ALL = 15;
9508
  D3DRMXOFSAVE_ALL = 15;
5981
  D3DRMXOFSAVE_TEMPLATES = 16;
9509
  D3DRMXOFSAVE_TEMPLATES = 16;
5982
  D3DRMXOFSAVE_TEXTURETOPOLOGY = 32;
9510
  D3DRMXOFSAVE_TEXTURETOPOLOGY = 32;
5983
 
9511
 
5984
{ TD3DRMColorSource }
-
 
5985
 
-
 
5986
type
9512
type
-
 
9513
  PD3DRMColorSource = ^TD3DRMColorSource;
5987
  TD3DRMColorSource = (
9514
  TD3DRMColorSource = (
5988
    D3DRMCOLOR_FROMFACE,
9515
    D3DRMCOLOR_FROMFACE,
5989
    D3DRMCOLOR_FROMVERTEX
9516
    D3DRMCOLOR_FROMVERTEX
5990
  );
9517
  );
5991
 
9518
 
5992
  D3DRMCOLORSOURCE = TD3DRMColorSource;
9519
  PD3DRMFrameConstraint = ^TD3DRMFrameConstraint;
5993
 
-
 
5994
{ TD3DRMFrameConstraint }
-
 
5995
 
-
 
5996
  TD3DRMFrameConstraint = (
9520
  TD3DRMFrameConstraint = (
5997
    D3DRMCONSTRAIN_Z,           // use only X and Y rotations
9521
    D3DRMCONSTRAIN_Z,           (* use only X and Y rotations *)
5998
    D3DRMCONSTRAIN_Y,           // use only X and Z rotations
9522
    D3DRMCONSTRAIN_Y,           (* use only X and Z rotations *)
5999
    D3DRMCONSTRAIN_X            // use only Y and Z rotations
9523
    D3DRMCONSTRAIN_X            (* use only Y and Z rotations *)
6000
  );
9524
  );
6001
 
9525
 
6002
  D3DRMFRAMECONSTRAINT = TD3DRMFrameConstraint;
9526
  PD3DRMMaterialMode = ^TD3DRMMaterialMode;
6003
 
-
 
6004
{ TD3DRMMaterialMode }
-
 
6005
 
-
 
6006
  TD3DRMMaterialMode = (
9527
  TD3DRMMaterialMode = (
6007
    D3DRMMATERIAL_FROMMESH,
9528
    D3DRMMATERIAL_FROMMESH,
6008
    D3DRMMATERIAL_FROMPARENT,
9529
    D3DRMMATERIAL_FROMPARENT,
6009
    D3DRMMATERIAL_FROMFRAME
9530
    D3DRMMATERIAL_FROMFRAME
6010
  );
9531
  );
6011
 
9532
 
6012
  D3DRMMATERIALMODE = TD3DRMMaterialMode;
9533
  PD3DRMFogMode = ^TD3DRMFogMode;
6013
 
-
 
6014
{ TD3DRMFogMode }
-
 
6015
 
-
 
6016
  TD3DRMFogMode = (
9534
  TD3DRMFogMode = (
6017
    D3DRMFOG_LINEAR,            // linear between start and end
9535
    D3DRMFOG_LINEAR,            (* linear between start and end *)
6018
    D3DRMFOG_EXPONENTIAL,       // density * exp(-distance)
9536
    D3DRMFOG_EXPONENTIAL,       (* density * exp(-distance) *)
6019
    D3DRMFOG_EXPONENTIALSQUARED // density * exp(-distance*distance)
9537
    D3DRMFOG_EXPONENTIALSQUARED (* density * exp(-distance*distance) *)
6020
  );
9538
  );
6021
 
9539
 
6022
  D3DRMFOGMODE = TD3DRMFogMode;
9540
  PD3DRMZBufferMode = ^TD3DRMZBufferMode;
6023
 
-
 
6024
{ TD3DRMZBufferMode }
-
 
6025
 
-
 
6026
  TD3DRMZBufferMode = (
9541
  TD3DRMZBufferMode = (
6027
    D3DRMZBUFFER_FROMPARENT,    // default
9542
    D3DRMZBUFFER_FROMPARENT,    (* default *)
6028
    D3DRMZBUFFER_ENABLE,        // enable zbuffering
9543
    D3DRMZBUFFER_ENABLE,        (* enable zbuffering *)
6029
    D3DRMZBUFFER_DISABLE        // disable zbuffering
9544
    D3DRMZBUFFER_DISABLE        (* disable zbuffering *)
6030
  );
9545
  );
6031
 
9546
 
6032
  D3DRMZBUFFERMODE = TD3DRMZBufferMode;
9547
  PD3DRMSortMode = ^TD3DRMSortMode;
6033
 
-
 
6034
{ TD3DRMSortMode }
-
 
6035
 
-
 
6036
  TD3DRMSortMode = (
9548
  TD3DRMSortMode = (
6037
    D3DRMSORT_FROMPARENT,       // default
9549
    D3DRMSORT_FROMPARENT,       (* default *)
6038
    D3DRMSORT_NONE,             // don't sort child frames
9550
    D3DRMSORT_NONE,             (* don't sort child frames *)
6039
    D3DRMSORT_FRONTTOBACK,      // sort child frames front-to-back
9551
    D3DRMSORT_FRONTTOBACK,      (* sort child frames front-to-back *)
6040
    D3DRMSORT_BACKTOFRONT       // sort child frames back-to-front
9552
    D3DRMSORT_BACKTOFRONT       (* sort child frames back-to-front *)
6041
  );
9553
  );
6042
 
9554
 
6043
  D3DRMSORTMODE = TD3DRMSortMode;
-
 
6044
 
-
 
6045
{ TD3DRMMaterialOverride structure }
-
 
6046
 
-
 
6047
  PD3DRMMaterialOverride = ^TD3DRMMaterialOverride;
-
 
6048
  TD3DRMMaterialOverride = record
9555
  TD3DRMMaterialOverride = packed record
6049
    dwSize: DWORD;              // Size of this structure
9556
    dwSize : DWORD;       (* Size of this structure *)
6050
    dwFlags: DWORD;             // Indicate which fields are valid
9557
    dwFlags : DWORD;      (* Indicate which fields are valid *)
6051
    dcDiffuse: TD3DColorValue;  // RGBA
9558
    dcDiffuse : TD3DColorValue;    (* RGBA *)
6052
    dcAmbient: TD3DColorValue;  // RGB
9559
    dcAmbient : TD3DColorValue;    (* RGB *)
6053
    dcEmissive: TD3DColorValue; // RGB
9560
    dcEmissive : TD3DColorValue;   (* RGB *)
6054
    dcSpecular: TD3DColorValue; // RGB
9561
    dcSpecular : TD3DColorValue;   (* RGB *)
6055
    dvPower: TD3DValue;
9562
    dvPower : TD3DValue;
6056
    lpD3DRMTex: IUnknown;
9563
    lpD3DRMTex : IUnknown;
6057
  end;
9564
  end;
6058
 
9565
 
6059
  D3DRMMATERIALOVERRIDE = TD3DRMMaterialOverride;
-
 
6060
  LPD3DRMMATERIALOVERRIDE = PD3DRMMaterialOverride;
-
 
6061
 
-
 
6062
const
9566
const
6063
  D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAONLY     = $00000001;
9567
  D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAONLY     = $00000001;
6064
  D3DRMMATERIALOVERRIDE_DIFFUSE_RGBONLY       = $00000002;
9568
  D3DRMMATERIALOVERRIDE_DIFFUSE_RGBONLY       = $00000002;
6065
  D3DRMMATERIALOVERRIDE_DIFFUSE               = $00000003;
9569
  D3DRMMATERIALOVERRIDE_DIFFUSE               = $00000003;
6066
  D3DRMMATERIALOVERRIDE_AMBIENT               = $00000004;
9570
  D3DRMMATERIALOVERRIDE_AMBIENT               = $00000004;
Line 6080... Line 9584...
6080
  D3DRMSTATECHANGE_VOLATILE    = $000000002;
9584
  D3DRMSTATECHANGE_VOLATILE                 = $000000002;
6081
  D3DRMSTATECHANGE_NONVOLATILE = $000000004;
9585
  D3DRMSTATECHANGE_NONVOLATILE              = $000000004;
6082
  D3DRMSTATECHANGE_RENDER      = $000000020;
9586
  D3DRMSTATECHANGE_RENDER                   = $000000020;
6083
  D3DRMSTATECHANGE_LIGHT       = $000000040;
9587
  D3DRMSTATECHANGE_LIGHT                    = $000000040;
6084
 
9588
 
-
 
9589
(*
6085
{ Values for flags in RM3::CreateDeviceFromSurface }
9590
 * Values for flags in RM3::CreateDeviceFromSurface
6086
 
9591
 *)
6087
  D3DRMDEVICE_NOZBUFFER = $00000001;
9592
  D3DRMDEVICE_NOZBUFFER           = $00000001;
6088
 
9593
 
-
 
9594
(*
6089
{ Values for flags in Object2::SetClientData }
9595
 * Values for flags in Object2::SetClientData
6090
 
9596
 *)
6091
  D3DRMCLIENTDATA_NONE      = $00000001;
9597
  D3DRMCLIENTDATA_NONE            = $00000001;
6092
  D3DRMCLIENTDATA_LOCALFREE = $00000002;
9598
  D3DRMCLIENTDATA_LOCALFREE       = $00000002;
6093
  D3DRMCLIENTDATA_IUNKNOWN  = $00000004;
9599
  D3DRMCLIENTDATA_IUNKNOWN        = $00000004;
6094
 
9600
 
-
 
9601
(*
6095
{ Values for flags in Frame2::AddMoveCallback. }
9602
 * Values for flags in Frame2::AddMoveCallback.
6096
 
9603
 *)
6097
  D3DRMCALLBACK_PREORDER  = 0;
9604
  D3DRMCALLBACK_PREORDER                = 0;
6098
  D3DRMCALLBACK_POSTORDER = 1;
9605
  D3DRMCALLBACK_POSTORDER               = 1;
6099
 
9606
 
-
 
9607
(*
6100
{ Values for flags in MeshBuilder2::RayPick. }
9608
 * Values for flags in MeshBuilder2::RayPick.
6101
 
9609
 *)
6102
  D3DRMRAYPICK_ONLYBOUNDINGBOXES       = 1;
9610
  D3DRMRAYPICK_ONLYBOUNDINGBOXES        = 1;
6103
  D3DRMRAYPICK_IGNOREFURTHERPRIMITIVES = 2;
9611
  D3DRMRAYPICK_IGNOREFURTHERPRIMITIVES  = 2;
6104
  D3DRMRAYPICK_INTERPOLATEUV           = 4;
9612
  D3DRMRAYPICK_INTERPOLATEUV            = 4;
6105
  D3DRMRAYPICK_INTERPOLATECOLOR        = 8;
9613
  D3DRMRAYPICK_INTERPOLATECOLOR         = 8;
6106
  D3DRMRAYPICK_INTERPOLATENORMAL       = $10;
9614
  D3DRMRAYPICK_INTERPOLATENORMAL        = $10;
6107
 
9615
 
-
 
9616
(*
6108
{ Values for flags in MeshBuilder3::AddFacesIndexed. }
9617
 * Values for flags in MeshBuilder3::AddFacesIndexed.
6109
 
9618
 *)
6110
  D3DRMADDFACES_VERTICESONLY = 1;
9619
  D3DRMADDFACES_VERTICESONLY             = 1;
6111
 
9620
 
6112
 
9621
(*
6113
{ Values for flags in MeshBuilder2::GenerateNormals. }
9622
 * Values for flags in MeshBuilder2::GenerateNormals.
6114
 
9623
 *)
6115
  D3DRMGENERATENORMALS_PRECOMPACT     = 1;
9624
  D3DRMGENERATENORMALS_PRECOMPACT       = 1;
6116
  D3DRMGENERATENORMALS_USECREASEANGLE = 2;
9625
  D3DRMGENERATENORMALS_USECREASEANGLE   = 2;
6117
 
9626
 
-
 
9627
(*
6118
{ Values for MeshBuilder3::GetParentMesh }
9628
 * Values for MeshBuilder3::GetParentMesh
6119
 
9629
 *)
6120
  D3DRMMESHBUILDER_DIRECTPARENT = 1;
9630
  D3DRMMESHBUILDER_DIRECTPARENT          = 1;
6121
  D3DRMMESHBUILDER_ROOTMESH     = 2;
9631
  D3DRMMESHBUILDER_ROOTMESH              = 2;
6122
 
9632
 
-
 
9633
(*
6123
{ Flags for MeshBuilder3::Enable }
9634
 * Flags for MeshBuilder3::Enable
-
 
9635
 *)
6124
  D3DRMMESHBUILDER_RENDERENABLE = $00000001;
9636
  D3DRMMESHBUILDER_RENDERENABLE   = $00000001;
6125
  D3DRMMESHBUILDER_PICKENABLE   = $00000002;
9637
  D3DRMMESHBUILDER_PICKENABLE     = $00000002;
6126
 
9638
 
6127
{ Flags for MeshBuilder3::AddMeshBuilder }
-
 
6128
  D3DRMADDMESHBUILDER_DONTCOPYAPPDATA  = 1;
-
 
6129
  D3DRMADDMESHBUILDER_FLATTENSUBMESHES = 2;
-
 
6130
  D3DRMADDMESHBUILDER_NOSUBMESHES      = 4;
-
 
6131
 
9639
(*
6132
{ Flags for Object2::GetAge when used with MeshBuilders }
9640
 * Flags for Object2::GetAge when used with MeshBuilders
-
 
9641
 *)
6133
  D3DRMMESHBUILDERAGE_GEOMETRY  = $00000001;
9642
  D3DRMMESHBUILDERAGE_GEOMETRY    = $00000001;
6134
  D3DRMMESHBUILDERAGE_MATERIALS = $00000002;
9643
  D3DRMMESHBUILDERAGE_MATERIALS   = $00000002;
6135
  D3DRMMESHBUILDERAGE_TEXTURES  = $00000004;
9644
  D3DRMMESHBUILDERAGE_TEXTURES    = $00000004;
6136
 
9645
 
-
 
9646
(*
6137
{ Format flags for MeshBuilder3::AddTriangles. }
9647
 * Format flags for MeshBuilder3::AddTriangles.
6138
 
9648
 *)
6139
  D3DRMFVF_TYPE          = $00000001;
9649
  D3DRMFVF_TYPE                   = $00000001;
6140
  D3DRMFVF_NORMAL        = $00000002;
9650
  D3DRMFVF_NORMAL                 = $00000002;
6141
  D3DRMFVF_COLOR         = $00000004;
9651
  D3DRMFVF_COLOR                  = $00000004;
6142
  D3DRMFVF_TEXTURECOORDS = $00000008;
9652
  D3DRMFVF_TEXTURECOORDS          = $00000008;
6143
 
9653
 
6144
  D3DRMVERTEX_STRIP = $00000001;
9654
  D3DRMVERTEX_STRIP               = $00000001;
6145
  D3DRMVERTEX_FAN   = $00000002;
9655
  D3DRMVERTEX_FAN                 = $00000002;
6146
  D3DRMVERTEX_LIST  = $00000004;
9656
  D3DRMVERTEX_LIST                = $00000004;
6147
 
9657
 
-
 
9658
(*
6148
{ Values for flags in Viewport2::Clear2 }
9659
 * Values for flags in Viewport2::Clear2
6149
 
9660
 *)
6150
  D3DRMCLEAR_TARGET     = $00000001;
9661
  D3DRMCLEAR_TARGET               = $00000001;
6151
  D3DRMCLEAR_ZBUFFER    = $00000002;
9662
  D3DRMCLEAR_ZBUFFER              = $00000002;
6152
  D3DRMCLEAR_DIRTYRECTS = $00000004;
9663
  D3DRMCLEAR_DIRTYRECTS           = $00000004;
6153
  D3DRMCLEAR_ALL        = D3DRMCLEAR_TARGET or D3DRMCLEAR_ZBUFFER or D3DRMCLEAR_DIRTYRECTS;
9664
  D3DRMCLEAR_ALL                  = (D3DRMCLEAR_TARGET or
6154
 
-
 
6155
{ Values for flags in Frame3::SetSceneFogMethod }
9665
                                         D3DRMCLEAR_ZBUFFER or
-
 
9666
                                         D3DRMCLEAR_DIRTYRECTS);
6156
 
9667
 
-
 
9668
(*
-
 
9669
 * Values for flags in Frame3::SetSceneFogMethod
-
 
9670
 *)
6157
  D3DRMFOGMETHOD_VERTEX = $00000001;
9671
  D3DRMFOGMETHOD_VERTEX          = $00000001;
6158
  D3DRMFOGMETHOD_TABLE  = $00000002;
9672
  D3DRMFOGMETHOD_TABLE           = $00000002;
6159
  D3DRMFOGMETHOD_ANY    = $00000004;
9673
  D3DRMFOGMETHOD_ANY             = $00000004;
6160
 
9674
 
-
 
9675
(*
6161
{ Values for flags in Frame3::SetTraversalOptions }
9676
 * Values for flags in Frame3::SetTraversalOptions
6162
 
9677
 *)
6163
  D3DRMFRAME_RENDERENABLE = $00000001;
9678
  D3DRMFRAME_RENDERENABLE        = $00000001;
6164
  D3DRMFRAME_PICKENABLE   = $00000002;
9679
  D3DRMFRAME_PICKENABLE          = $00000002;
6165
 
9680
 
6166
{ TD3DRMAnimationOptions }
-
 
6167
 
-
 
6168
type
9681
type
6169
  TD3DRMAnimationOptions = DWORD;
9682
  TD3DRMAnimationOptions = DWORD;
6170
  D3DRMANIMATIONOPTIONS = TD3DRMAnimationOptions;
-
 
6171
 
9683
 
6172
const
9684
const
6173
  D3DRMANIMATION_OPEN             = $01;
9685
  D3DRMANIMATION_OPEN = $01;
6174
  D3DRMANIMATION_CLOSED           = $02;
9686
  D3DRMANIMATION_CLOSED = $02;
6175
  D3DRMANIMATION_LINEARPOSITION   = $04;
9687
  D3DRMANIMATION_LINEARPOSITION = $04;
6176
  D3DRMANIMATION_SPLINEPOSITION   = $08;
9688
  D3DRMANIMATION_SPLINEPOSITION = $08;
6177
  D3DRMANIMATION_SCALEANDROTATION = $00000010;
9689
  D3DRMANIMATION_SCALEANDROTATION = $00000010;
6178
  D3DRMANIMATION_POSITION         = $00000020;
9690
  D3DRMANIMATION_POSITION = $00000020;
6179
 
9691
 
6180
{ TD3DRMInterpolationOptions }
-
 
6181
 
-
 
6182
type
9692
type
6183
  TD3DRMInterpolationOptions = DWORD;
9693
  TD3DRMInterpolationOptions = DWORD;
6184
  D3DRMINTERPOLATIONOPTIONS = TD3DRMInterpolationOptions;
-
 
6185
 
-
 
6186
const
9694
const
6187
  D3DRMINTERPOLATION_OPEN         = $01;
9695
  D3DRMINTERPOLATION_OPEN = $01;
6188
  D3DRMINTERPOLATION_CLOSED       = $02;
9696
  D3DRMINTERPOLATION_CLOSED = $02;
6189
  D3DRMINTERPOLATION_NEAREST      = $0100;
9697
  D3DRMINTERPOLATION_NEAREST = $0100;
6190
  D3DRMINTERPOLATION_LINEAR       = $04;
9698
  D3DRMINTERPOLATION_LINEAR = $04;
6191
  D3DRMINTERPOLATION_SPLINE       = $08;
9699
  D3DRMINTERPOLATION_SPLINE = $08;
6192
  D3DRMINTERPOLATION_VERTEXCOLOR  = $40;
9700
  D3DRMINTERPOLATION_VERTEXCOLOR = $40;
6193
  D3DRMINTERPOLATION_SLERPNORMALS = $80;
9701
  D3DRMINTERPOLATION_SLERPNORMALS = $80;
6194
 
9702
 
6195
{ TD3DRMLoadOptions }
-
 
6196
 
-
 
6197
type
9703
type
6198
  TD3DRMLoadOptions = DWORD;
9704
  TD3DRMLoadOptions = DWORD;
6199
  D3DRMLOADOPTIONS = TD3DRMLoadOptions;
-
 
6200
 
9705
 
6201
const
9706
const
6202
  D3DRMLOAD_FROMFILE  = $00;
9707
  D3DRMLOAD_FROMFILE  = $00;
6203
  D3DRMLOAD_FROMRESOURCE = $01;
9708
  D3DRMLOAD_FROMRESOURCE = $01;
6204
  D3DRMLOAD_FROMMEMORY = $02;
9709
  D3DRMLOAD_FROMMEMORY = $02;
Line 6213... Line 9718...
6213
  D3DRMLOAD_INSTANCEBYREFERENCE = $100;
9718
  D3DRMLOAD_INSTANCEBYREFERENCE = $100;
6214
  D3DRMLOAD_INSTANCEBYCOPYING = $200;
9719
  D3DRMLOAD_INSTANCEBYCOPYING = $200;
6215
 
9720
 
6216
  D3DRMLOAD_ASYNCHRONOUS = $400;
9721
  D3DRMLOAD_ASYNCHRONOUS = $400;
6217
 
9722
 
6218
{ TD3DRMLoadReource }
-
 
6219
 
-
 
6220
type
9723
type
6221
  PD3DRMLoadReource = ^TD3DRMLoadReource;
9724
  PD3DRMLoadResource = ^TD3DRMLoadResource;
6222
  TD3DRMLoadReource = record
9725
  TD3DRMLoadResource = packed record
6223
    hModule: HMODULE;
9726
    hModule: HMODULE;
6224
    lpName: PChar;
9727
    lpName: PAnsiChar;
6225
    lpType: PChar;
9728
    lpType: PAnsiChar;
6226
  end;
9729
  end;
6227
 
9730
 
6228
  D3DRMLOADRESOURCE = TD3DRMLoadReource;
-
 
6229
  LPD3DRMLOADRESOURCE = PD3DRMLoadReource;
-
 
6230
 
-
 
6231
{ TD3DRMLoadMemory }
-
 
6232
 
-
 
6233
  PD3DRMLoadMemory = ^TD3DRMLoadMemory;
9731
  PD3DRMLoadMemory = ^TD3DRMLoadMemory;
6234
  TD3DRMLoadMemory = record
9732
  TD3DRMLoadMemory = packed record
6235
    lpMemory: Pointer;
9733
    lpMemory: Pointer;
6236
    dSize: DWORD;
9734
    dwSize: DWORD;
6237
  end;
9735
  end;
6238
 
9736
 
6239
  D3DRMLOADMEMORY = TD3DRMLoadMemory;
-
 
6240
  LPD3DRMLOADMEMORY = PD3DRMLoadMemory;
-
 
6241
 
-
 
6242
const
9737
const
6243
  D3DRMPMESHSTATUS_VALID            = $01;
9738
  D3DRMPMESHSTATUS_VALID = $01;
6244
  D3DRMPMESHSTATUS_INTERRUPTED      = $02;
9739
  D3DRMPMESHSTATUS_INTERRUPTED = $02;
6245
  D3DRMPMESHSTATUS_BASEMESHCOMPLETE = $04;
9740
  D3DRMPMESHSTATUS_BASEMESHCOMPLETE = $04;
6246
  D3DRMPMESHSTATUS_COMPLETE         = $08;
9741
  D3DRMPMESHSTATUS_COMPLETE = $08;
6247
  D3DRMPMESHSTATUS_RENDERABLE       = $10;
9742
  D3DRMPMESHSTATUS_RENDERABLE = $10;
6248
 
9743
 
6249
  D3DRMPMESHEVENT_BASEMESH = $01;
9744
  D3DRMPMESHEVENT_BASEMESH = $01;
6250
  D3DRMPMESHEVENT_COMPLETE = $02;
9745
  D3DRMPMESHEVENT_COMPLETE = $02;
6251
 
9746
 
6252
{ TD3DRMPMeshLoadStatus }
-
 
6253
 
-
 
6254
type
9747
type
6255
  PD3DRMPMeshLoadStatus = ^TD3DRMPMeshLoadStatus;
9748
  PD3DRMPMeshLoadStatus = ^TD3DRMPMeshLoadStatus;
6256
  TD3DRMPMeshLoadStatus = record
9749
  TD3DRMPMeshLoadStatus = packed record
6257
    dwSize: DWORD;           // Size of this structure
9750
    dwSize,            // Size of this structure
6258
    dwPMeshSize: DWORD;      // Total Size (bytes)
9751
    dwPMeshSize,       // Total Size (bytes)
6259
    dwBaseMeshSize: DWORD;   // Total Size of the Base Mesh
9752
    dwBaseMeshSize,    // Total Size of the Base Mesh
6260
    dwBytesLoaded: DWORD;    // Total bytes loaded
9753
    dwBytesLoaded,     // Total bytes loaded
6261
    dwVerticesLoaded: DWORD; // Number of vertices loaded
9754
    dwVerticesLoaded,  // Number of vertices loaded
6262
    dwFacesLoaded: DWORD;    // Number of faces loaded
9755
    dwFacesLoaded : DWORD;     // Number of faces loaded
6263
    dwLoadResult: HResult;   // Result of the load operation
9756
    dwLoadResult : HResult;    // Result of the load operation
6264
    dwFlags: DWORD;
9757
    dwFlags : DWORD;
6265
  end;
9758
  end;
6266
 
9759
 
6267
  D3DRMPMESHLOADSTATUS = TD3DRMPMeshLoadStatus;
9760
  PD3DRMUserVisualReason = ^TD3DRMUserVisualReason;
6268
  LPD3DRMPMESHLOADSTATUS = PD3DRMPMeshLoadStatus;
-
 
6269
 
-
 
6270
{ TD3DRMUserVisualReason }
-
 
6271
 
-
 
6272
  TD3DRMUserVisualReason = (
9761
  TD3DRMUserVisualReason = (
6273
    D3DRMUSERVISUAL_CANSEE,
9762
    D3DRMUSERVISUAL_CANSEE,
6274
    D3DRMUSERVISUAL_RENDER
9763
    D3DRMUSERVISUAL_RENDER
6275
  );
9764
  );
6276
 
9765
 
6277
  D3DRMUSERVISUALREASON = TD3DRMUserVisualReason;
-
 
6278
 
-
 
6279
{ TD3DRMAnimationKey }
-
 
6280
 
-
 
6281
  PD3DRMAnimationKey = ^TD3DRMAnimationKey;
9766
  PD3DRMAnimationKey = ^TD3DRMAnimationKey;
6282
  TD3DRMAnimationKey = record
9767
  TD3DRMAnimationKey = packed record
6283
    dwSize: DWORD;
9768
    dwSize : DWORD;
6284
    dwKeyType: DWORD;
9769
    dwKeyType : DWORD;
6285
    dvTime: TD3DValue;
9770
    dvTime : TD3DValue;
6286
    dwID: DWORD;
9771
    dwID : DWORD;
6287
 
-
 
6288
    case Integer of
9772
    case integer of
6289
      0: (dqRotateKey: TD3DRMQuaternion);
9773
      0 : (dqRotateKey : TD3DRMQuaternion);
6290
      1: (dvScaleKey: TD3DVector);
9774
      1 : (dvScaleKey : TD3DVector);
6291
      2: (dvPositionKey: TD3DVector);
9775
      2 : (dvPositionKey : TD3DVector);
6292
      3: (dvK: array[0..3] of TD3DValue);
9776
      3 : (dvK : array [0..3] of TD3DValue);
6293
    end;
9777
    end;
6294
 
9778
 
6295
  D3DRMANIMATIONKEY = TD3DRMAnimationKey;
9779
procedure D3DRMAnimationGetRotateKey
6296
  LPD3DRMANIMATIONKEY = PD3DRMAnimationKey;
9780
    (var rmKey: TD3DRMAnimationKey; var rmQuat: TD3DRMQuaternion);
6297
 
9781
 
6298
procedure D3DRMAnimationGetRotateKey(const rmKey: TD3DRMAnimationKey; var rmQuat: TD3DRMQuaternion);
-
 
6299
procedure D3DRMAnimationGetScaleKey(const rmKey: TD3DRMAnimationKey; var dvVec: TD3DVector);
9782
procedure D3DRMAnimationGetScaleKey
6300
procedure D3DRMAnimationGetPositionKey(const rmKey: TD3DRMAnimationKey; var dvVec: TD3DVector);
-
 
6301
procedure D3DRMAnimationSetRotateKey(var rmKey: TD3DRMAnimationKey; const rmQuat: TD3DRMQuaternion);
-
 
6302
procedure D3DRMAnimationSetScaleKey(var rmKey: TD3DRMAnimationKey; const dvVec: TD3DVector);
9783
    (var rmKey: TD3DRMAnimationKey; var dvVec: TD3DVector);
6303
procedure D3DRMAnimationSetPositionKey(var rmKey: TD3DRMAnimationKey; const dvVec: TD3DVector);
-
 
6304
 
-
 
6305
const
-
 
6306
  D3DRMANIMATION_ROTATEKEY   = $01;
-
 
6307
  D3DRMANIMATION_SCALEKEY    = $02;
-
 
6308
  D3DRMANIMATION_POSITIONKEY = $03;
-
 
6309
 
9784
 
6310
{ TD3DRMMapping }
9785
procedure D3DRMAnimationGetPositionKey
-
 
9786
    (var rmKey: TD3DRMAnimationKey; var dvVec: TD3DVector);
6311
 
9787
 
6312
type
-
 
6313
  TD3DRMMapping = DWORD;
9788
procedure D3DRMAnimatioSetRotateKey
6314
  D3DRMMAPPING = TD3DRMMapping;
9789
    (var rmKey: TD3DRMAnimationKey; var rmQuat: TD3DRMQuaternion);
6315
 
9790
 
6316
{ TD3DRMMappingFlag }
9791
procedure D3DRMAnimationSetScaleKey
-
 
9792
    (var rmKey: TD3DRMAnimationKey; var dvVec: TD3DVector);
6317
 
9793
 
-
 
9794
procedure D3DRMAnimationSetPositionKey
-
 
9795
    (var rmKey: TD3DRMAnimationKey; var dvVec: TD3DVector);
-
 
9796
 
-
 
9797
const
-
 
9798
  D3DRMANIMATION_ROTATEKEY = 01;
-
 
9799
  D3DRMANIMATION_SCALEKEY = 02;
-
 
9800
  D3DRMANIMATION_POSITIONKEY = 03;
-
 
9801
 
-
 
9802
type
-
 
9803
  TD3DRMMapping = DWORD;
-
 
9804
  PD3DRMMappingFlag = ^TD3DRMMappingFlag;
6318
  TD3DRMMappingFlag = DWORD;
9805
  TD3DRMMappingFlag = DWORD;
6319
  D3DRMMAPPINGFLAG = TD3DRMMappingFlag;
-
 
6320
 
9806
 
6321
const
9807
const
6322
  D3DRMMAP_WRAPU        = 1;
9808
  D3DRMMAP_WRAPU = 1;
6323
  D3DRMMAP_WRAPV        = 2;
9809
  D3DRMMAP_WRAPV = 2;
6324
  D3DRMMAP_PERSPCORRECT = 4;
9810
  D3DRMMAP_PERSPCORRECT = 4;
6325
 
9811
 
6326
{ TD3DRMVertex }
-
 
6327
 
-
 
6328
type
9812
type
6329
  PD3DRMVertex = ^TD3DRMVertex;
9813
  PD3DRMVertex = ^TD3DRMVertex;
6330
  TD3DRMVertex = record
9814
  TD3DRMVertex = packed record
6331
    position: TD3DVector;
9815
    position: TD3DVector;
6332
    normal: TD3DVector;
9816
    normal: TD3DVector;
6333
    tu, tv: TD3DValue;
9817
    tu, tv: TD3DValue;
6334
    color: TD3DColor;
9818
    color: TD3DColor;
6335
  end;
9819
  end;
6336
 
9820
 
6337
  D3DRMVERTEX = TD3DRMVertex;
-
 
6338
  LPD3DRMVERTEX = PD3DRMVertex;
-
 
6339
 
-
 
6340
{ TD3DRMGroupIndex }
-
 
6341
 
-
 
6342
  TD3DRMGroupIndex = Longint;
-
 
6343
  D3DRMGROUPINDEX = TD3DRMGroupIndex; // group indexes begin a 0
9821
  TD3DRMGroupIndex = LongInt; (* group indexes begin a 0 *)
6344
 
9822
 
6345
const
9823
const
6346
  D3DRMGROUP_ALLGROUPS = -1;
9824
  D3DRMGROUP_ALLGROUPS = -1;
6347
 
9825
 
-
 
9826
var
-
 
9827
(*
6348
{ Create a color from three components in the range 0-1 inclusive. }
9828
 * Create a color from three components in the range 0-1 inclusive.
-
 
9829
 *)
6349
function D3DRMCreateColorRGB(red, green, blue: TD3DValue): TD3DColor; stdcall;
9830
  D3DRMCreateColorRGB : function (red, green, blue: TD3DValue) : TD3DColor;
-
 
9831
      stdcall;
6350
 
9832
 
-
 
9833
(*
6351
{ Create a color from four components in the range 0-1 inclusive. }
9834
 * Create a color from four components in the range 0-1 inclusive.
-
 
9835
 *)
6352
function D3DRMCreateColorRGBA(red, green, blue, alpha: TD3DValue): TD3DColor; stdcall;
9836
  D3DRMCreateColorRGBA : function (red, green, blue, alpha: TD3DValue)
-
 
9837
      : TD3DColor; stdcall;
-
 
9838
 
-
 
9839
(*
-
 
9840
 * Get the red component of a color.
-
 
9841
 *)
-
 
9842
  D3DRMColorGetRed : function (d3drmc: TD3DColor) : TD3DValue; stdcall;
6353
 
9843
 
-
 
9844
(*
6354
{ Get the red component of a color. }
9845
 * Get the green component of a color.
-
 
9846
 *)
6355
function D3DRMColorGetRed(d3drmc: TD3DColor): TD3DValue; stdcall;
9847
  D3DRMColorGetGreen : function (d3drmc: TD3DColor) : TD3DValue; stdcall;
6356
 
9848
 
-
 
9849
(*
6357
{ Get the green component of a color. }
9850
 * Get the blue component of a color.
-
 
9851
 *)
6358
function D3DRMColorGetGreen(d3drmc: TD3DColor): TD3DValue; stdcall;
9852
  D3DRMColorGetBlue : function (d3drmc: TD3DColor) : TD3DValue; stdcall;
6359
 
9853
 
-
 
9854
(*
6360
{ Get the blue component of a color. }
9855
 * Get the alpha component of a color.
-
 
9856
 *)
6361
function D3DRMColorGetBlue(d3drmc: TD3DColor): TD3DValue; stdcall;
9857
  D3DRMColorGetAlpha : function (d3drmc: TD3DColor) : TD3DValue; stdcall;
6362
 
9858
 
-
 
9859
(*
6363
{ Get the alpha component of a color. }
9860
 * Add two vectors.  Returns its first argument.
-
 
9861
 *)
6364
function D3DRMColorGetAlpha(d3drmc: TD3DColor): TD3DValue; stdcall;
9862
  D3DRMVectorAdd : function (var d, s1, s2: TD3DVector) : PD3DVector; stdcall;
6365
 
9863
 
-
 
9864
(*
6366
{ Add two vectors.  Returns its first argument. }
9865
 * Subtract two vectors.  Returns its first argument.
-
 
9866
 *)
6367
function D3DRMVectorAdd(var d, s1, s2: TD3DVector): PD3DVector; stdcall;
9867
  D3DRMVectorSubtract : function (var d, s1, s2: TD3DVector) : PD3DVector;
-
 
9868
      stdcall;
6368
 
9869
 
-
 
9870
(*
6369
{ Subtract two vectors.  Returns its first argument. }
9871
 * Reflect a ray about a given normal.  Returns its first argument.
-
 
9872
 *)
6370
function D3DRMVectorSubtract(var d, s1, s2: TD3DVector): PD3DVector; stdcall;
9873
  D3DRMVectorReflect : function (var d, ray, norm: TD3DVector) : PD3DVector;
-
 
9874
      stdcall;
6371
 
9875
 
-
 
9876
(*
6372
{ Reflect a ray about a given normal.  Returns its first argument. }
9877
 * Calculate the vector cross product.  Returns its first argument.
-
 
9878
 *)
6373
function D3DRMVectorReflect(var d, ray, norm: TD3DVector): PD3DVector; stdcall;
9879
  D3DRMVectorCrossProduct : function (var d, s1, s2: TD3DVector) : PD3DVector;
-
 
9880
      stdcall;
6374
 
9881
 
-
 
9882
(*
6375
{ Calculate the vector cross product.  Returns its first argument. }
9883
 * Return the vector dot product.
-
 
9884
 *)
6376
function D3DRMVectorCrossProduct(var d, s1, s2: TD3DVector): PD3DVector; stdcall;
9885
  D3DRMVectorDotProduct : function (var s1, s2: TD3DVector) : TD3DValue;
-
 
9886
      stdcall;
6377
 
9887
 
-
 
9888
(*
-
 
9889
 * Scale a vector so that its modulus is 1.  Returns its argument or
6378
{ Return the vector dot product. }
9890
 * NULL if there was an error (e.g. a zero vector was passed).
-
 
9891
 *)
6379
function D3DRMVectorDotProduct(var s1, s2: TD3DVector): TD3DValue; stdcall;
9892
  D3DRMVectorNormalize : function (var lpv: TD3DVector) : PD3DVector; stdcall;
6380
 
9893
 
6381
{ Scale a vector so that its modulus is 1.  Returns its argument or
-
 
-
 
9894
(*
6382
  NULL if there was an error (e.g. a zero vector was passed). }
9895
 * Return the length of a vector (e.g. sqrt(x*x + y*y + z*z)).
-
 
9896
 *)
6383
function D3DRMVectorNormalize(var lpv: TD3DVector): PD3DVector; stdcall;
9897
  D3DRMVectorModulus : function (var v: TD3DVector) : TD3DValue; stdcall;
6384
 
9898
 
-
 
9899
(*
6385
{ Return the length of a vector (e.g. sqrt(x*x + y*y + z*z)). }
9900
 * Set the rotation part of a matrix to be a rotation of theta radians
-
 
9901
 * around the given axis.
-
 
9902
 *)
6386
function D3DRMVectorModulus(var v: TD3DVector): TD3DValue; stdcall;
9903
  D3DRMVectorRotate : function (var r, v, axis: TD3DVector; theta: TD3DValue) :
-
 
9904
      PD3DVector; stdcall;
6387
 
9905
 
-
 
9906
(*
6388
{ Set the rotation part of a matrix to be a rotation of theta radians
9907
 * Scale a vector uniformly in all three axes
6389
  around the given axis. }
9908
 *)
6390
function D3DRMVectorRotate(var r, v, axis: TD3DVector; theta: TD3DValue): PD3DVector; stdcall;
9909
  D3DRMVectorScale : function (var d, s: TD3DVector; factor: TD3DValue) :
-
 
9910
      PD3DVector; stdcall;
6391
 
9911
 
-
 
9912
(*
6392
{ Scale a vector uniformly in all three axes }
9913
 * Return a random unit vector
-
 
9914
 *)
6393
function D3DRMVectorScale( var d, s: TD3DVector; factor: TD3DValue): PD3DVector; stdcall;
9915
  D3DRMVectorRandom : function (var d: TD3DVector) : PD3DVector; stdcall;
6394
 
9916
 
-
 
9917
(*
6395
{ Return a random unit vector }
9918
 * Returns a unit quaternion that represents a rotation of theta radians
6396
function D3DRMVectorRandom(var d: TD3DVector): PD3DVector; stdcall;
9919
 * around the given axis.
-
 
9920
 *)
6397
 
9921
 
6398
{ Returns a unit quaternion that represents a rotation of theta radians
-
 
6399
  around the given axis. }
-
 
6400
function D3DRMQuaternionFromRotation(var quat: PD3DRMQuaternion;
9922
  D3DRMQuaternionFromRotation : function (var quat: TD3DRMQuaternion;
6401
    var v: TD3DVector; theta: TD3DValue): PD3DRMQuaternion; stdcall;
9923
      var v: TD3DVector; theta: TD3DValue) : PD3DRMQuaternion; stdcall;
6402
 
9924
 
-
 
9925
(*
6403
{ Calculate the product of two quaternions }
9926
 * Calculate the product of two quaternions
-
 
9927
 *)
6404
function D3DRMQuaternionMultiply(var q, a, b: TD3DRMQuaternion): PD3DRMQuaternion; stdcall;
9928
  D3DRMQuaternionMultiply : function (var q, a, b: TD3DRMQuaternion) :
-
 
9929
      PD3DRMQuaternion; stdcall;
6405
 
9930
 
-
 
9931
(*
6406
{ Interpolate between two quaternions }
9932
 * Interpolate between two quaternions
-
 
9933
 *)
6407
function D3DRMQuaternionSlerp(var q, a, b: TD3DRMQuaternion; alpha: TD3DValue): PD3DRMQuaternion; stdcall;
9934
  D3DRMQuaternionSlerp : function (var q, a, b: TD3DRMQuaternion;
-
 
9935
      alpha: TD3DValue) : PD3DRMQuaternion; stdcall;
6408
 
9936
 
-
 
9937
(*
6409
{ Calculate the matrix for the rotation that a unit quaternion represents }
9938
 * Calculate the matrix for the rotation that a unit quaternion represents
-
 
9939
 *)
6410
procedure D3DRMMatrixFromQuaternion(dmMat: TD3DRMMatrix4D; var lpDqQuat: TD3DRMQuaternion); stdcall;
9940
  D3DRMMatrixFromQuaternion : procedure (dmMat: TD3DRMMatrix4D; var lpDqQuat:
-
 
9941
      TD3DRMQuaternion); stdcall;
6411
 
9942
 
-
 
9943
(*
6412
{ Calculate the quaternion that corresponds to a rotation matrix }
9944
 * Calculate the quaternion that corresponds to a rotation matrix
-
 
9945
 *)
6413
function D3DRMQuaternionFromMatrix(var lpQuat: TD3DRMQuaternion; Mat: TD3DRMMatrix4D): PD3DRMQuaternion;
9946
  D3DRMQuaternionFromMatrix : function (var lpQuat: TD3DRMQuaternion;
-
 
9947
      Mat: TD3DRMMatrix4D) : PD3DRMQuaternion; stdcall;
6414
 
9948
 
6415
(*==========================================================================;
9949
(*==========================================================================;
6416
 *
9950
 *
6417
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
9951
 *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
6418
 *
9952
 *
6419
 *  File:       d3drm.h, d3drmobj.h, d3drmwin.h
9953
 *  File:       d3drmobj.h
6420
 *  Content:    Direct3DRM include file
9954
 *  Content:    Direct3DRM include file
6421
 *
9955
 *
6422
 ***************************************************************************)
9956
 ***************************************************************************)
6423
 
9957
 
-
 
9958
(*
6424
{ Direct3DRM Object classes }
9959
 * Direct3DRM Object classes
-
 
9960
 *)
-
 
9961
 
6425
const
9962
const
6426
  CLSID_CDirect3DRMDevice: TGUID = '{4FA3568E-623F-11CF-AC4A-0000C03825A1}';
9963
  CLSID_CDirect3DRMDevice: TGUID =
6427
  CLSID_CDirect3DRMViewport: TGUID = '{4FA3568F-623F-11CF-AC4A-0000C03825A1}';
9964
      (D1:$4fa3568e;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6428
  CLSID_CDirect3DRMFrame: TGUID = '{4FA35690-623F-11CF-AC4A-0000C03825A1}';
9965
  CLSID_CDirect3DRMViewport: TGUID =
6429
  CLSID_CDirect3DRMMesh: TGUID = '{4FA35691-623F-11CF-AC4A-0000C03825A1}';
9966
      (D1:$4fa3568f;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6430
  CLSID_CDirect3DRMMeshBuilder: TGUID = '{4FA35692-623F-11CF-AC4A-0000C03825A1}';
-
 
6431
  CLSID_CDirect3DRMFace: TGUID = '{4FA35693-623F-11CF-AC4A-0000C03825A1}';
9967
  CLSID_CDirect3DRMFrame: TGUID =
6432
  CLSID_CDirect3DRMLight: TGUID = '{4FA35694-623F-11CF-AC4A-0000C03825A1}';
9968
      (D1:$4fa35690;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6433
  CLSID_CDirect3DRMTexture: TGUID = '{4FA35695-623F-11CF-AC4A-0000C03825A1}';
9969
  CLSID_CDirect3DRMMesh: TGUID =
6434
  CLSID_CDirect3DRMWrap: TGUID = '{4FA35696-623F-11CF-AC4A-0000C03825A1}';
9970
      (D1:$4fa35691;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6435
  CLSID_CDirect3DRMMaterial: TGUID = '{4FA35697-623F-11CF-AC4A-0000C03825A1}';
9971
  CLSID_CDirect3DRMMeshBuilder: TGUID =
6436
  CLSID_CDirect3DRMAnimation: TGUID = '{4FA35698-623F-11CF-AC4A-0000C03825A1}';
9972
      (D1:$4fa35692;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6437
  CLSID_CDirect3DRMAnimationSet: TGUID = '{4FA35699-623F-11CF-AC4A-0000C03825A1}';
9973
  CLSID_CDirect3DRMFace: TGUID =
6438
  CLSID_CDirect3DRMUserVisual: TGUID = '{4FA3569A-623F-11CF-AC4A-0000C03825A1}';
9974
      (D1:$4fa35693;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6439
  CLSID_CDirect3DRMShadow: TGUID = '{4FA3569B-623F-11CF-AC4A-0000C03825A1}';
9975
  CLSID_CDirect3DRMLight: TGUID =
6440
  CLSID_CDirect3DRMViewportInterpolator: TGUID = '{0DE9EAA1-3B84-11D0-9B6D-0000C0781BC3}';
-
 
6441
  CLSID_CDirect3DRMFrameInterpolator: TGUID = '{0DE9EAA2-3B84-11D0-9B6D-0000C0781BC3}';
9976
      (D1:$4fa35694;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6442
  CLSID_CDirect3DRMMeshInterpolator: TGUID = '{0DE9EAA3-3B84-11D0-9B6D-0000C0781BC3}';
9977
  CLSID_CDirect3DRMTexture: TGUID =
6443
  CLSID_CDirect3DRMLightInterpolator: TGUID = '{0DE9EAA6-3B84-11D0-9B6D-0000C0781BC3}';
9978
      (D1:$4fa35695;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1));
6444
  CLSID_CDirect3DRMMaterialInterpolator: TGUID = '{0DE9EAA7-3B84-11D0-9B6D-0000C0781BC3}';
-
 
6445
  CLSID_CDirect3DRMTextureInterpolator: TGUID = '{0DE9EAA8-3B84-11D0-9B6D-0000C0781BC3}';
-
 
6446
  CLSID_CDirect3DRMProgressiveMesh: TGUID = '{4516EC40-8F20-11D0-9B6D-0000C0781BC3}';
9979
  CLSID_CDirect3DRMWrap: TGUID =
6447
  CLSID_CDirect3DRMClippedVisual: TGUID = '{5434E72D-6D66-11D1-BB0B-0000F875865A}';
9980
      (D1:$4fa35696;D2:$623f;D3:$11cf;D4:($ac,$4a,$00,$00,$c0,$38,$25,$a1)